mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-15 04:30:29 +00:00
Fix lock code being null for newly placed blocks
This causes an NPE when serialising or opening printers and disk drives. Fixes #1109
This commit is contained in:
parent
1e044aed68
commit
93f3cd4a53
@ -60,7 +60,7 @@ public final class TileDiskDrive extends TileGeneric implements DefaultInventory
|
|||||||
}
|
}
|
||||||
|
|
||||||
ITextComponent customName;
|
ITextComponent customName;
|
||||||
private LockCode lockCode;
|
private LockCode lockCode = LockCode.NO_LOCK;
|
||||||
|
|
||||||
private final Map<IComputerAccess, MountInfo> computers = new HashMap<>();
|
private final Map<IComputerAccess, MountInfo> computers = new HashMap<>();
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ public final class TilePrinter extends TileGeneric implements DefaultSidedInvent
|
|||||||
private static final int[] SIDE_SLOTS = new int[] { 0 };
|
private static final int[] SIDE_SLOTS = new int[] { 0 };
|
||||||
|
|
||||||
ITextComponent customName;
|
ITextComponent customName;
|
||||||
private LockCode lockCode;
|
private LockCode lockCode = LockCode.NO_LOCK;
|
||||||
|
|
||||||
private final NonNullList<ItemStack> inventory = NonNullList.withSize( SLOTS, ItemStack.EMPTY );
|
private final NonNullList<ItemStack> inventory = NonNullList.withSize( SLOTS, ItemStack.EMPTY );
|
||||||
private final SidedCaps<IItemHandler> itemHandlerCaps =
|
private final SidedCaps<IItemHandler> itemHandlerCaps =
|
||||||
|
Loading…
Reference in New Issue
Block a user