diff --git a/gradle.properties b/gradle.properties index 37cf3be0..3c305ee8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ org.gradle.jvmargs = -Xmx1G org.gradle.parallel = true # Mod Properties -version = 0.1.6-blanketcon +version = 0.1.7-blanketcon maven_group = dev.sweetberry archives_base_name = wwizardry diff --git a/src/main/java/dev/sweetberry/wwizardry/client/render/AltarPedestalBlockEntityRenderer.java b/src/main/java/dev/sweetberry/wwizardry/client/render/AltarPedestalBlockEntityRenderer.java index 6ccbd5a5..9668cb1f 100644 --- a/src/main/java/dev/sweetberry/wwizardry/client/render/AltarPedestalBlockEntityRenderer.java +++ b/src/main/java/dev/sweetberry/wwizardry/client/render/AltarPedestalBlockEntityRenderer.java @@ -1,5 +1,6 @@ package dev.sweetberry.wwizardry.client.render; +import dev.sweetberry.wwizardry.block.AltarPedestalBlock; import dev.sweetberry.wwizardry.block.entity.AltarPedestalBlockEntity; import net.minecraft.block.HorizontalFacingBlock; import net.minecraft.client.render.VertexConsumerProvider; @@ -15,7 +16,16 @@ public AltarPedestalBlockEntityRenderer(BlockEntityRendererFactory.Context ctx) public void beforeRender(AltarPedestalBlockEntity entity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) { matrices.translate(0.5, 0.9509, 0.5); - var blockState = entity.getWorld().getBlockState(entity.getPos()); + var world = entity.getWorld(); + + if (world == null) + return; + + var blockState = world.getBlockState(entity.getPos()); + + if (!blockState.isOf(AltarPedestalBlock.INSTANCE)) + return; + var dir = blockState.get(HorizontalFacingBlock.FACING); switch (dir) {