Update MCP mappings to snapshot_nodoc_20161220 (#3551)

This commit is contained in:
James Mitchell authored and LexManos committed 2016-12-21 15:52:30 -08:00
1 parent 1f4007e5d8
commit 5165dc52bf
88 files changed
+445 -436

No files matched your search

@@ -39,7 +39,7 @@ public class ItemStackHandler implements IItemHandler, IItemHandlerModifiable, I
public ItemStackHandler(int size)
{
stacks = NonNullList.func_191197_a(size, ItemStack.field_190927_a);
stacks = NonNullList.withSize(size, ItemStack.EMPTY);
}
public ItemStackHandler(NonNullList<ItemStack> stacks)
@@ -49,7 +49,7 @@ public class ItemStackHandler implements IItemHandler, IItemHandlerModifiable, I
public void setSize(int size)
{
stacks = NonNullList.func_191197_a(size, ItemStack.field_190927_a);
stacks = NonNullList.withSize(size, ItemStack.EMPTY);
}
@Override
@@ -80,8 +80,8 @@ public class ItemStackHandler implements IItemHandler, IItemHandlerModifiable, I
@Nonnull
public ItemStack insertItem(int slot, @Nonnull ItemStack stack, boolean simulate)
{
if (stack.func_190926_b())
return ItemStack.field_190927_a;
if (stack.isEmpty())
return ItemStack.EMPTY;
validateSlotIndex(slot);
@@ -89,55 +89,55 @@ public class ItemStackHandler implements IItemHandler, IItemHandlerModifiable, I
int limit = getStackLimit(slot, stack);
if (!existing.func_190926_b())
if (!existing.isEmpty())
{
if (!ItemHandlerHelper.canItemStacksStack(stack, existing))
return stack;
limit -= existing.func_190916_E();
limit -= existing.getCount();
}
if (limit <= 0)
return stack;
boolean reachedLimit = stack.func_190916_E() > limit;
boolean reachedLimit = stack.getCount() > limit;
if (!simulate)
{
if (existing.func_190926_b())
if (existing.isEmpty())
{
this.stacks.set(slot, reachedLimit ? ItemHandlerHelper.copyStackWithSize(stack, limit) : stack);
}
else
{
existing.func_190917_f(reachedLimit ? limit : stack.func_190916_E());
existing.grow(reachedLimit ? limit : stack.getCount());
}
onContentsChanged(slot);
}
return reachedLimit ? ItemHandlerHelper.copyStackWithSize(stack, stack.func_190916_E()- limit) : ItemStack.field_190927_a;
return reachedLimit ? ItemHandlerHelper.copyStackWithSize(stack, stack.getCount()- limit) : ItemStack.EMPTY;
}
@Nonnull
public ItemStack extractItem(int slot, int amount, boolean simulate)
{
if (amount == 0)
return ItemStack.field_190927_a;
return ItemStack.EMPTY;
validateSlotIndex(slot);
ItemStack existing = this.stacks.get(slot);
if (existing.func_190926_b())
return ItemStack.field_190927_a;
if (existing.isEmpty())
return ItemStack.EMPTY;
int toExtract = Math.min(amount, existing.getMaxStackSize());
if (existing.func_190916_E() <= toExtract)
if (existing.getCount() <= toExtract)
{
if (!simulate)
{
this.stacks.set(slot, ItemStack.field_190927_a);
this.stacks.set(slot, ItemStack.EMPTY);
onContentsChanged(slot);
}
return existing;
@@ -146,7 +146,7 @@ public class ItemStackHandler implements IItemHandler, IItemHandlerModifiable, I
{
if (!simulate)
{
this.stacks.set(slot, ItemHandlerHelper.copyStackWithSize(existing, existing.func_190916_E() - toExtract));
this.stacks.set(slot, ItemHandlerHelper.copyStackWithSize(existing, existing.getCount() - toExtract));
onContentsChanged(slot);
}
@@ -171,7 +171,7 @@ public class ItemStackHandler implements IItemHandler, IItemHandlerModifiable, I
NBTTagList nbtTagList = new NBTTagList();
for (int i = 0; i < stacks.size(); i++)
{
if (!stacks.get(i).func_190926_b())
if (!stacks.get(i).isEmpty())
{
NBTTagCompound itemTag = new NBTTagCompound();
itemTag.setInteger("Slot", i);