Why so screenious

This commit is contained in:
mewhenthe
2026-04-11 17:45:43 +02:00
parent 9af5b77a1f
commit 0d92d59958
11 changed files with 153 additions and 248 deletions

View File

@@ -1,11 +1,23 @@
package org.neoflock.neocomputers.block
import dev.architectury.registry.registries.RegistrySupplier
import net.minecraft.core.registries.Registries
import net.minecraft.resources.Identifier
import net.minecraft.resources.ResourceKey
import net.minecraft.world.level.block.Block
import net.minecraft.world.level.block.state.BlockBehaviour
import org.neoflock.neocomputers.NeoComputers
import java.util.function.Supplier
class BaseBlock : Block {
val tier: Int
open class BaseBlock : Block { // TODO: create a TieredBaseBlock class that extends this or something
// val tier: Int
constructor(tier: Int): super(Properties.of()) {
this.tier = tier
constructor(name: String):super(
BlockBehaviour.Properties.of()
.setId(ResourceKey
.create(Registries.BLOCK, Identifier.fromNamespaceAndPath(NeoComputers.MODID, name))))
companion object Registry {
fun register(name: String, sup: Supplier<BaseBlock>): RegistrySupplier<Block> = Blocks.BLOCKS.register(name, sup);
}
}