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 EmptyHandler implements IItemHandlerModifiable
@Nonnull
public ItemStack getStackInSlot(int slot)
{
return ItemStack.field_190927_a;
return ItemStack.EMPTY;
}
@Override
@@ -53,7 +53,7 @@ public class EmptyHandler implements IItemHandlerModifiable
@Nonnull
public ItemStack extractItem(int slot, int amount, boolean simulate)
{
return ItemStack.field_190927_a;
return ItemStack.EMPTY;
}
@Override
@@ -72,8 +72,8 @@ public class InvWrapper implements IItemHandlerModifiable
@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;
if (!getInv().isItemValidForSlot(slot, stack))
return stack;
@@ -81,24 +81,24 @@ public class InvWrapper implements IItemHandlerModifiable
ItemStack stackInSlot = getInv().getStackInSlot(slot);
int m;
if (!stackInSlot.func_190926_b())
if (!stackInSlot.isEmpty())
{
if (!ItemHandlerHelper.canItemStacksStack(stack, stackInSlot))
return stack;
m = Math.min(stack.getMaxStackSize(), getSlotLimit(slot)) - stackInSlot.func_190916_E();
m = Math.min(stack.getMaxStackSize(), getSlotLimit(slot)) - stackInSlot.getCount();
if (stack.func_190916_E() <= m)
if (stack.getCount() <= m)
{
if (!simulate)
{
ItemStack copy = stack.copy();
copy.func_190917_f(stackInSlot.func_190916_E());
copy.grow(stackInSlot.getCount());
getInv().setInventorySlotContents(slot, copy);
getInv().markDirty();
}
return ItemStack.field_190927_a;
return ItemStack.EMPTY;
}
else
{
@@ -107,14 +107,14 @@ public class InvWrapper implements IItemHandlerModifiable
if (!simulate)
{
ItemStack copy = stack.splitStack(m);
copy.func_190917_f(stackInSlot.func_190916_E());
copy.grow(stackInSlot.getCount());
getInv().setInventorySlotContents(slot, copy);
getInv().markDirty();
return stack;
}
else
{
stack.func_190918_g(m);
stack.shrink(m);
return stack;
}
}
@@ -122,7 +122,7 @@ public class InvWrapper implements IItemHandlerModifiable
else
{
m = Math.min(stack.getMaxStackSize(), getSlotLimit(slot));
if (m < stack.func_190916_E())
if (m < stack.getCount())
{
// copy the stack to not modify the original one
stack = stack.copy();
@@ -134,7 +134,7 @@ public class InvWrapper implements IItemHandlerModifiable
}
else
{
stack.func_190918_g(m);
stack.shrink(m);
return stack;
}
}
@@ -145,7 +145,7 @@ public class InvWrapper implements IItemHandlerModifiable
getInv().setInventorySlotContents(slot, stack);
getInv().markDirty();
}
return ItemStack.field_190927_a;
return ItemStack.EMPTY;
}
}
@@ -156,29 +156,29 @@ public class InvWrapper implements IItemHandlerModifiable
public ItemStack extractItem(int slot, int amount, boolean simulate)
{
if (amount == 0)
return ItemStack.field_190927_a;
return ItemStack.EMPTY;
ItemStack stackInSlot = getInv().getStackInSlot(slot);
if (stackInSlot.func_190926_b())
return ItemStack.field_190927_a;
if (stackInSlot.isEmpty())
return ItemStack.EMPTY;
if (simulate)
{
if (stackInSlot.func_190916_E() < amount)
if (stackInSlot.getCount() < amount)
{
return stackInSlot.copy();
}
else
{
ItemStack copy = stackInSlot.copy();
copy.func_190920_e(amount);
copy.setCount(amount);
return copy;
}
}
else
{
int m = Math.min(stackInSlot.func_190916_E(), amount);
int m = Math.min(stackInSlot.getCount(), amount);
ItemStack decrStackSize = getInv().decrStackSize(slot, m);
getInv().markDirty();
@@ -49,7 +49,7 @@ public class PlayerArmorInvWrapper extends RangedWrapper
}
}
// check if it's valid for the armor slot
if (equ != null && slot < 4 && !stack.func_190926_b() && stack.getItem().isValidArmor(stack, equ, getInventoryPlayer().player))
if (equ != null && slot < 4 && !stack.isEmpty() && stack.getItem().isValidArmor(stack, equ, getInventoryPlayer().player))
{
return super.insertItem(slot, stack, simulate);
}
@@ -44,15 +44,15 @@ public class PlayerMainInvWrapper extends RangedWrapper
public ItemStack insertItem(int slot, @Nonnull ItemStack stack, boolean simulate)
{
ItemStack rest = super.insertItem(slot, stack, simulate);
if (rest.func_190916_E()!= stack.func_190916_E())
if (rest.getCount()!= stack.getCount())
{
// the stack in the slot changed, animate it
ItemStack inSlot = getStackInSlot(slot);
if(!inSlot.func_190926_b())
if(!inSlot.isEmpty())
{
if (getInventoryPlayer().player.worldObj.isRemote)
if (getInventoryPlayer().player.world.isRemote)
{
inSlot.func_190915_d(5);
inSlot.setAnimationsToGo(5);
}
else if(getInventoryPlayer().player instanceof EntityPlayerMP) {
getInventoryPlayer().player.openContainer.detectAndSendChanges();
@@ -58,7 +58,7 @@ public class RangedWrapper implements IItemHandlerModifiable {
return compose.getStackInSlot(slot + minSlot);
}
return ItemStack.field_190927_a;
return ItemStack.EMPTY;
}
@Override
@@ -82,7 +82,7 @@ public class RangedWrapper implements IItemHandlerModifiable {
return compose.extractItem(slot + minSlot, amount, simulate);
}
return ItemStack.field_190927_a;
return ItemStack.EMPTY;
}
@Override
@@ -78,15 +78,15 @@ public class SidedInvWrapper implements IItemHandlerModifiable
public ItemStack getStackInSlot(int slot)
{
int i = getSlot(inv, slot, side);
return i == -1 ? ItemStack.field_190927_a : inv.getStackInSlot(i);
return i == -1 ? ItemStack.EMPTY : inv.getStackInSlot(i);
}
@Override
@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;
int slot1 = getSlot(inv, slot, side);
@@ -99,23 +99,23 @@ public class SidedInvWrapper implements IItemHandlerModifiable
ItemStack stackInSlot = inv.getStackInSlot(slot1);
int m;
if (!stackInSlot.func_190926_b())
if (!stackInSlot.isEmpty())
{
if (!ItemHandlerHelper.canItemStacksStack(stack, stackInSlot))
return stack;
m = Math.min(stack.getMaxStackSize(), getSlotLimit(slot)) - stackInSlot.func_190916_E();
m = Math.min(stack.getMaxStackSize(), getSlotLimit(slot)) - stackInSlot.getCount();
if (stack.func_190916_E() <= m)
if (stack.getCount() <= m)
{
if (!simulate)
{
ItemStack copy = stack.copy();
copy.func_190917_f(stackInSlot.func_190916_E());
copy.grow(stackInSlot.getCount());
inv.setInventorySlotContents(slot1, copy);
}
return ItemStack.field_190927_a;
return ItemStack.EMPTY;
}
else
{
@@ -124,13 +124,13 @@ public class SidedInvWrapper implements IItemHandlerModifiable
if (!simulate)
{
ItemStack copy = stack.splitStack(m);
copy.func_190917_f(stackInSlot.func_190916_E());
copy.grow(stackInSlot.getCount());
inv.setInventorySlotContents(slot1, copy);
return stack;
}
else
{
stack.func_190918_g(m);
stack.shrink(m);
return stack;
}
}
@@ -138,7 +138,7 @@ public class SidedInvWrapper implements IItemHandlerModifiable
else
{
m = Math.min(stack.getMaxStackSize(), getSlotLimit(slot));
if (m < stack.func_190916_E())
if (m < stack.getCount())
{
// copy the stack to not modify the original one
stack = stack.copy();
@@ -149,7 +149,7 @@ public class SidedInvWrapper implements IItemHandlerModifiable
}
else
{
stack.func_190918_g(m);
stack.shrink(m);
return stack;
}
}
@@ -157,7 +157,7 @@ public class SidedInvWrapper implements IItemHandlerModifiable
{
if (!simulate)
inv.setInventorySlotContents(slot1, stack);
return ItemStack.field_190927_a;
return ItemStack.EMPTY;
}
}
@@ -177,37 +177,37 @@ public class SidedInvWrapper implements IItemHandlerModifiable
public ItemStack extractItem(int slot, int amount, boolean simulate)
{
if (amount == 0)
return ItemStack.field_190927_a;
return ItemStack.EMPTY;
int slot1 = getSlot(inv, slot, side);
if (slot1 == -1)
return ItemStack.field_190927_a;
return ItemStack.EMPTY;
ItemStack stackInSlot = inv.getStackInSlot(slot1);
if (stackInSlot.func_190926_b())
return ItemStack.field_190927_a;
if (stackInSlot.isEmpty())
return ItemStack.EMPTY;
if (!inv.canExtractItem(slot1, stackInSlot, side))
return ItemStack.field_190927_a;
return ItemStack.EMPTY;
if (simulate)
{
if (stackInSlot.func_190916_E() < amount)
if (stackInSlot.getCount() < amount)
{
return stackInSlot.copy();
}
else
{
ItemStack copy = stackInSlot.copy();
copy.func_190920_e(amount);
copy.setCount(amount);
return copy;
}
}
else
{
int m = Math.min(stackInSlot.func_190916_E(), amount);
int m = Math.min(stackInSlot.getCount(), amount);
return inv.decrStackSize(slot1, m);
}
}