From a7ea249ab0c8c48f18c9c2f09219d1275f182cfa Mon Sep 17 00:00:00 2001 From: Adubbz Date: Sun, 5 Jan 2025 10:50:43 +1100 Subject: [PATCH] Fixed boat crashing --- .../src/main/java/biomesoplenty/init/ModClient.java | 12 ++++++++++-- gradle.properties | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/common/src/main/java/biomesoplenty/init/ModClient.java b/common/src/main/java/biomesoplenty/init/ModClient.java index 6a49b7d02..8ceb51772 100644 --- a/common/src/main/java/biomesoplenty/init/ModClient.java +++ b/common/src/main/java/biomesoplenty/init/ModClient.java @@ -17,7 +17,9 @@ import biomesoplenty.particle.*; import glitchcore.event.EventManager; import glitchcore.event.client.RegisterColorsEvent; +import glitchcore.event.client.RegisterLayerDefinitionsEvent; import glitchcore.event.client.RegisterParticleSpritesEvent; +import glitchcore.event.client.RegisterRenderersEvent; import glitchcore.util.RenderHelper; import glitchcore.util.SheetHelper; import net.minecraft.client.Minecraft; @@ -53,7 +55,6 @@ public class ModClient public static void setup() { setupRenderTypes(); - registerRenderers(); registerWoodTypes(); } @@ -64,6 +65,10 @@ public static void addClientHandlers() // Particles EventManager.addListener(ModClient::registerParticleSprites); + + // Renderers + EventManager.addListener(ModClient::registerLayerDefinitions); + EventManager.addListener(ModClient::registerRenderers); } public static void setupRenderTypes() @@ -264,7 +269,7 @@ public static void setupRenderTypes() RenderHelper.setRenderType(BOPFluids.LIQUID_NULL, translucentRenderType); } - public static void registerRenderers() + public static void registerLayerDefinitions(RegisterLayerDefinitionsEvent event) { // Register boat layer definitions LayerDefinition boatLayerDefinition = BoatModel.createBoatModel(); @@ -296,7 +301,10 @@ public static void registerRenderers() RenderHelper.registerLayerDefinition(ModModelLayers.HELLBARK_CHEST_BOAT, () -> chestBoatLayerDefinition); RenderHelper.registerLayerDefinition(ModModelLayers.EMPYREAL_BOAT, () -> boatLayerDefinition); RenderHelper.registerLayerDefinition(ModModelLayers.EMPYREAL_CHEST_BOAT, () -> chestBoatLayerDefinition); + } + public static void registerRenderers(RegisterRenderersEvent event) + { // Register block entity renderers RenderHelper.registerBlockEntityRenderer((BlockEntityType) BOPBlockEntities.SIGN, SignRenderer::new); RenderHelper.registerBlockEntityRenderer((BlockEntityType)BOPBlockEntities.HANGING_SIGN, HangingSignRenderer::new); diff --git a/gradle.properties b/gradle.properties index cd16bb1e8..6cf3fdb80 100644 --- a/gradle.properties +++ b/gradle.properties @@ -40,5 +40,5 @@ org.gradle.daemon=false # Dependencies nightconfig_version=3.6.7 -glitchcore_version=2.3.0.3 +glitchcore_version=2.3.0.4 terrablender_version=4.3.0.0 \ No newline at end of file