mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-14 09:04:42 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac653d46c1 | ||
|
|
63d9935d01 | ||
|
|
ba695b977d | ||
|
|
6b1dfb1596 | ||
|
|
fff02be71d | ||
|
|
0e5b9e4957 | ||
|
|
3415030fbf |
No files matched your search
@@ -1,6 +1,6 @@
|
||||
mcversion=1.7.10
|
||||
forgeversion=10.13.0.1207
|
||||
version_major=3
|
||||
version_minor=1
|
||||
version_patch=1
|
||||
version_minor=2
|
||||
version_patch=0
|
||||
|
||||
+1
-1
Submodule lang updated: 17e04cd6e5...8ca6c91070.
@@ -96,7 +96,7 @@ public class TileLeaves extends TileTreeContainer implements IPollinatable, IFru
|
||||
maturationTime = nbttagcompound.getInteger("CATMAT");
|
||||
caterpillar = (IButterfly)AlleleManager.alleleRegistry.getSpeciesRoot("rootButterflies").getMember(nbttagcompound.getCompoundTag("CATER"));
|
||||
}
|
||||
|
||||
isDecorative = nbttagcompound.getBoolean("Decorative");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -114,7 +114,7 @@ public class TileLeaves extends TileTreeContainer implements IPollinatable, IFru
|
||||
caterpillar.writeToNBT(subcompound);
|
||||
nbttagcompound.setTag("CATER", subcompound);
|
||||
}
|
||||
|
||||
nbttagcompound.setBoolean("Decorative", isDecorative);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -135,7 +135,7 @@ public class ShapedRecipeCustom implements IDescriptiveRecipe {
|
||||
if (resource == null && compare == null)
|
||||
return true;
|
||||
|
||||
if (resource == null && compare != null || resource != null && compare == null)
|
||||
if (resource == null || compare == null)
|
||||
return false;
|
||||
|
||||
if (compare.getItem() != resource.getItem())
|
||||
|
||||
@@ -64,9 +64,7 @@ public class MachineCentrifuge extends TilePowered implements ISidedInventory, I
|
||||
public boolean matches(ItemStack res) {
|
||||
if (res == null && resource == null)
|
||||
return true;
|
||||
else if (res == null && resource != null)
|
||||
return false;
|
||||
else if (res != null && resource == null)
|
||||
else if (res == null || resource == null)
|
||||
return false;
|
||||
else
|
||||
return resource.isItemEqual(res);
|
||||
@@ -428,10 +426,11 @@ public class MachineCentrifuge extends TilePowered implements ISidedInventory, I
|
||||
ItemStack product = null;
|
||||
|
||||
for (int i = SLOT_PRODUCT_1; i < inventory.getSizeInventory(); i++) {
|
||||
if (inventory.getStackInSlot(i) == null)
|
||||
ItemStack stack = inventory.getStackInSlot(i);
|
||||
if (stack == null)
|
||||
continue;
|
||||
|
||||
product = new ItemStack(inventory.getStackInSlot(i).getItem(), 1, inventory.getStackInSlot(i).getItemDamage());
|
||||
product = StackUtils.createSplitStack(stack, 1);
|
||||
if (doRemove)
|
||||
decrStackSize(i, 1);
|
||||
|
||||
@@ -446,24 +445,25 @@ public class MachineCentrifuge extends TilePowered implements ISidedInventory, I
|
||||
|
||||
@Override
|
||||
public int addItem(ItemStack stack, boolean doAdd, ForgeDirection from) {
|
||||
if (inventory.getStackInSlot(SLOT_RESOURCE) == null) {
|
||||
ItemStack resource = inventory.getStackInSlot(SLOT_RESOURCE);
|
||||
if (resource == null) {
|
||||
if (doAdd)
|
||||
inventory.setInventorySlotContents(SLOT_RESOURCE, stack.copy());
|
||||
return stack.stackSize;
|
||||
}
|
||||
|
||||
if (!inventory.getStackInSlot(SLOT_RESOURCE).isItemEqual(stack))
|
||||
if (!StackUtils.isIdenticalItem(resource, stack))
|
||||
return 0;
|
||||
|
||||
int space = inventory.getStackInSlot(SLOT_RESOURCE).getMaxStackSize() - inventory.getStackInSlot(SLOT_RESOURCE).stackSize;
|
||||
int space = resource.getMaxStackSize() - resource.stackSize;
|
||||
if (space <= 0)
|
||||
return 0;
|
||||
|
||||
if (doAdd)
|
||||
if (stack.stackSize <= space)
|
||||
inventory.getStackInSlot(SLOT_RESOURCE).stackSize += stack.stackSize;
|
||||
resource.stackSize += stack.stackSize;
|
||||
else
|
||||
inventory.getStackInSlot(SLOT_RESOURCE).stackSize += space;
|
||||
resource.stackSize += space;
|
||||
|
||||
return Math.min(stack.stackSize, space);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user