diff --git a/src/main/java/com/simibubi/create/AllBlockSpoutingBehaviours.java b/src/main/java/com/simibubi/create/AllBlockSpoutingBehaviours.java index 13ce541b17..555ed9ad3a 100644 --- a/src/main/java/com/simibubi/create/AllBlockSpoutingBehaviours.java +++ b/src/main/java/com/simibubi/create/AllBlockSpoutingBehaviours.java @@ -9,6 +9,7 @@ import com.simibubi.create.api.behaviour.spouting.StateChangingBehavior; import com.simibubi.create.compat.Mods; import com.simibubi.create.compat.tconstruct.SpoutCasting; +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; @@ -18,9 +19,9 @@ import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.material.Fluid; import net.minecraft.world.level.material.Fluids; -import net.minecraftforge.registries.ForgeRegistries; public class AllBlockSpoutingBehaviours { + static void registerDefaults() { Predicate isWater = fluid -> fluid.isSame(Fluids.WATER); BlockSpoutingBehaviour toMud = StateChangingBehavior.setTo(250, isWater, Blocks.MUD); @@ -38,8 +39,8 @@ public class AllBlockSpoutingBehaviours { for (String name : List.of("table", "basin")) { ResourceLocation id = Mods.TCONSTRUCT.rl(name); - if (ForgeRegistries.BLOCK_ENTITY_TYPES.containsKey(id)) { - BlockEntityType table = ForgeRegistries.BLOCK_ENTITY_TYPES.getValue(id); + if (BuiltInRegistries.BLOCK_ENTITY_TYPE.containsKey(id)) { + BlockEntityType table = BuiltInRegistries.BLOCK_ENTITY_TYPE.get(id); BlockSpoutingBehaviour.BY_BLOCK_ENTITY.register(table, SpoutCasting.INSTANCE); } else { Create.LOGGER.warn("Block entity {} wasn't found. Outdated compat?", id); diff --git a/src/main/java/com/simibubi/create/content/contraptions/render/ContraptionVisual.java b/src/main/java/com/simibubi/create/content/contraptions/render/ContraptionVisual.java index ba7343b387..a89239ae67 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/render/ContraptionVisual.java +++ b/src/main/java/com/simibubi/create/content/contraptions/render/ContraptionVisual.java @@ -30,6 +30,7 @@ import dev.engine_room.flywheel.lib.instance.InstanceTypes; import dev.engine_room.flywheel.lib.instance.TransformedInstance; import dev.engine_room.flywheel.lib.material.SimpleMaterial; import dev.engine_room.flywheel.lib.model.ModelUtil; +import dev.engine_room.flywheel.lib.model.baked.BlockModelBuilder; import dev.engine_room.flywheel.lib.task.ForEachPlan; import dev.engine_room.flywheel.lib.task.NestedPlan; import dev.engine_room.flywheel.lib.task.PlanMap; @@ -94,7 +95,7 @@ public class ContraptionVisual extends Abst } }; - model = new MultiBlockModelBuilder(modelWorld, blocks.positions()) + model = new BlockModelBuilder(modelWorld, blocks.positions()) .materialFunc((renderType, aBoolean) -> SimpleMaterial.builderOf(ModelUtil.getMaterial(renderType, aBoolean)) .cardinalLightingMode(CardinalLightingMode.CHUNK)) .build(); diff --git a/src/main/java/com/simibubi/create/content/equipment/potatoCannon/PotatoCannonPacket.java b/src/main/java/com/simibubi/create/content/equipment/potatoCannon/PotatoCannonPacket.java index e1bfb63a41..20e460d0cd 100644 --- a/src/main/java/com/simibubi/create/content/equipment/potatoCannon/PotatoCannonPacket.java +++ b/src/main/java/com/simibubi/create/content/equipment/potatoCannon/PotatoCannonPacket.java @@ -19,7 +19,7 @@ public class PotatoCannonPacket extends ShootGadgetPacket { public static final StreamCodec STREAM_CODEC = StreamCodec.composite( CatnipStreamCodecs.VEC3, packet -> packet.location, CatnipStreamCodecs.VEC3, packet -> packet.motion, - ItemStack.STREAM_CODEC, packet -> packet.item, + ItemStack.OPTIONAL_STREAM_CODEC, packet -> packet.item, CatnipStreamCodecs.HAND, packet -> packet.hand, ByteBufCodecs.FLOAT, packet -> packet.pitch, ByteBufCodecs.BOOL, packet -> packet.self,