From 7a3057a3ad8519c099f3e1e0027ec8f5c4600edb Mon Sep 17 00:00:00 2001 From: Daniel Orr Date: Sun, 12 Jan 2025 19:54:42 +0000 Subject: [PATCH] fix: deprecation --- .../blueprint/block/entity/BlueprintBlockEntityTypes.kt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/kotlin/net/mcbrawls/blueprint/block/entity/BlueprintBlockEntityTypes.kt b/src/main/kotlin/net/mcbrawls/blueprint/block/entity/BlueprintBlockEntityTypes.kt index 26b7adc..8ea6f98 100644 --- a/src/main/kotlin/net/mcbrawls/blueprint/block/entity/BlueprintBlockEntityTypes.kt +++ b/src/main/kotlin/net/mcbrawls/blueprint/block/entity/BlueprintBlockEntityTypes.kt @@ -6,20 +6,16 @@ import net.mcbrawls.blueprint.BlueprintMod import net.mcbrawls.blueprint.block.BlueprintBlocks import net.minecraft.block.entity.BlockEntity import net.minecraft.block.entity.BlockEntityType -import net.minecraft.datafixer.TypeReferences import net.minecraft.registry.Registries import net.minecraft.registry.Registry import net.minecraft.util.Identifier -import net.minecraft.util.Util object BlueprintBlockEntityTypes { val REGION_ID = register("region_id", FabricBlockEntityTypeBuilder.create(::RegionIdBlockEntity, BlueprintBlocks.POINT_REGION)) private fun register(id: String, builder: FabricBlockEntityTypeBuilder): BlockEntityType { - val identifier = Identifier.of(BlueprintMod.MOD_ID, id) - val datafixType = Util.getChoiceType(TypeReferences.BLOCK_ENTITY, identifier.toString()); - val type = builder.build(datafixType) + val type = builder.build() PolymerBlockUtils.registerBlockEntity(type) - return Registry.register(Registries.BLOCK_ENTITY_TYPE, identifier, type); + return Registry.register(Registries.BLOCK_ENTITY_TYPE, Identifier.of(BlueprintMod.MOD_ID, id), type); } }