Merge pull request #4478 from EdrowsLuo/fix-4477

- Fixed crash when Schematicannon gets placed by another Schematicannon
This commit is contained in:
simibubi 2023-03-08 13:46:08 +01:00 committed by GitHub
commit 0959e4408c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -155,7 +155,8 @@ public class SchematicannonTileEntity extends SmartTileEntity implements MenuPro
schematicProgress = compound.getFloat("Progress");
bookPrintingProgress = compound.getFloat("PaperProgress");
fuelLevel = compound.getFloat("Fuel");
state = State.valueOf(compound.getString("State"));
String stateString = compound.getString("State");
state = stateString.isEmpty() ? State.STOPPED : State.valueOf(compound.getString("State"));
blocksPlaced = compound.getInt("AmountPlaced");
blocksToPlace = compound.getInt("AmountToPlace");