Merge pull request #6088 from cakeGit/patch-2

Added station blockstate check
This commit is contained in:
simibubi 2024-07-25 18:36:00 +02:00 committed by GitHub
commit 5fc2153d52
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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();