Skip to content

Commit c6a0499

Browse files
Copilotrubensworks
andauthored
Fix crash when breaking Box of Eternal Closure (#1191)
* Initial plan * Fix crash when breaking box of eternal closure by checking block type before setValue Agent-Logs-Url: https://github.com/CyclopsMC/EvilCraft/sessions/205ac6b4-c029-46f4-aa60-4fbc2552960e Co-authored-by: rubensworks <440384+rubensworks@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: rubensworks <440384+rubensworks@users.noreply.github.com>
1 parent 86c32ff commit c6a0499

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/org/cyclops/evilcraft/client/render/blockentity/RenderBlockEntityBoxOfEternalClosure.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public void submit(RenderState renderState, PoseStack poseStack, SubmitNodeColle
101101
poseStack.translate(-0.5F, -0.5F, -0.5F);
102102

103103
// Render box
104-
BlockState blockState = renderState.blockState != null
104+
BlockState blockState = (renderState.blockState != null && renderState.blockState.getBlock() instanceof org.cyclops.evilcraft.block.BlockBoxOfEternalClosure)
105105
? renderState.blockState.setValue(org.cyclops.evilcraft.block.BlockBoxOfEternalClosure.FACING, Direction.NORTH)
106106
: org.cyclops.evilcraft.RegistryEntries.BLOCK_BOX_OF_ETERNAL_CLOSURE.get().defaultBlockState().setValue(org.cyclops.evilcraft.block.BlockBoxOfEternalClosure.FACING, Direction.NORTH);
107107
ModelBoxOfEternalClosureBaked model = (ModelBoxOfEternalClosureBaked) IModHelpers.get().getRenderHelpers().getBakedModel(blockState);

0 commit comments

Comments
 (0)