1.21.1 is so back

This commit is contained in:
2026-04-12 19:31:40 +02:00
parent db2cbbbe8d
commit e38184d3a3
16 changed files with 163 additions and 117 deletions

View File

@@ -2,20 +2,16 @@ 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.ResourceLocation
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
import com.google.common.base.Suppliers
open class BaseBlock : Block { // TODO: create a TieredBaseBlock class that extends this or something
open class BaseBlock : Block(BlockBehaviour.Properties.of()) { // TODO: create a TieredBaseBlock class that extends this or something
// val tier: Int
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);