1
0
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:
Jonathan Coates 2022-06-16 07:56:54 +01:00
parent 1e044aed68
commit 93f3cd4a53
No known key found for this signature in database
GPG Key ID: B9E431FF07C98D06
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -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 =