Fixed create loading items that don't exist
Since the create saves item stacks different than MC it would load them even if the item they went too no longer existed. I'll work on a more improved fix for this that will save the unlocalized name so in case the IDs change the create remembers what was in it.
This commit is contained in:
parent
6f8dd90743
commit
c07803de22
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ public class InventoryCrate extends InvChest
|
|||
public void buildInventory(ItemStack sampleStack)
|
||||
{
|
||||
this.containedItems = new ItemStack[this.getSizeInventory()];
|
||||
if (sampleStack != null)
|
||||
if (sampleStack != null && sampleStack.getItem() != null)
|
||||
{
|
||||
ItemStack baseStack = sampleStack.copy();
|
||||
int itemsLeft = baseStack.stackSize;
|
||||
|
|
Loading…
Reference in a new issue