Added station blockstate check

This commit is contained in:
cakeGit 2024-02-07 20:12:41 +00:00
parent 2201d87da7
commit 378e970005

View file

@ -364,6 +364,10 @@ public class StationBlockEntity extends SmartBlockEntity implements ITransformab
if (!tryEnterAssemblyMode())
return false;
//Check the station wasn't destroyed
if (!(level.getBlockState(worldPosition).getBlock() instanceof StationBlock))
return true;
BlockState newState = getBlockState().setValue(StationBlock.ASSEMBLING, true);
level.setBlock(getBlockPos(), newState, 3);
refreshBlockState();