Skip to content

Commit

Permalink
Fixed boat crashing
Browse files Browse the repository at this point in the history
  • Loading branch information
Adubbz committed Jan 4, 2025
1 parent 6045e8f commit a7ea249
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions common/src/main/java/biomesoplenty/init/ModClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -53,7 +55,6 @@ public class ModClient
public static void setup()
{
setupRenderTypes();
registerRenderers();
registerWoodTypes();
}

Expand All @@ -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()
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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<SignBlockEntityBOP>) BOPBlockEntities.SIGN, SignRenderer::new);
RenderHelper.registerBlockEntityRenderer((BlockEntityType<HangingSignBlockEntityBOP>)BOPBlockEntities.HANGING_SIGN, HangingSignRenderer::new);
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a7ea249

Please sign in to comment.