Skip to content

Commit

Permalink
fix: restore null check
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
techno-sam committed Sep 9, 2023
1 parent 6434cb1 commit 807559c
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import com.railwayteam.railways.content.conductor.toolbox.MountedToolbox;
import com.railwayteam.railways.content.conductor.vent.VentBlock;
import com.railwayteam.railways.content.switches.TrackSwitchBlock;
import com.railwayteam.railways.multiloader.Env;
import com.railwayteam.railways.registry.CREntities;
import com.railwayteam.railways.registry.CRPackets;
import com.railwayteam.railways.registry.CRTags;
Expand Down Expand Up @@ -542,7 +541,7 @@ public float getViewXRot(float partialTicks) {

@Override
public boolean isCrouching() {
return level.isClientSide ? visualBaseEntity.isCrouching() : super.isCrouching();
return level.isClientSide ? (visualBaseEntity != null ? visualBaseEntity.isCrouching() : super.isCrouching()) : super.isCrouching();
}

// make public
Expand Down

0 comments on commit 807559c

Please sign in to comment.