Skip to content

Commit

Permalink
fix crash with Sodium and Litematica (#819)
Browse files Browse the repository at this point in the history
  • Loading branch information
pama1234 authored Apr 22, 2024
1 parent d9e0db7 commit fcae3be
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ private static void renderShipBlockEntityInShipyard(final PoseStack instance, fi
final double camZ, final BlockEntityRenderDispatcher dispatcher, final BlockEntity entity) {

final BlockPos pos = entity.getBlockPos();

// fix for https://github.com/ValkyrienSkies/Valkyrien-Skies-2/issues/818
if(!(dispatcher.level instanceof ClientLevel)) return;

final ClientLevel level = (ClientLevel) dispatcher.level;
final ClientShip ship = VSGameUtilsKt.getShipObjectManagingPos(level, pos);

Expand Down

0 comments on commit fcae3be

Please sign in to comment.