Commits

Anonymous committed 579c247

more bug fix

  • Participants
  • Parent commits 006368e

Comments (0)

Files changed (1)

File src/info/daybreaker/minecraft/PhilosophersCircuitPistonListener.java

 				ItemStack resultStack = inventory.getItem(indexOfResult);
 
 				if (plugin.config.getBoolean("furnaceDuplicator.preventInfiniteLoop", true)
-						&& (sourceStack.getType().equals(Material.COBBLESTONE)
-						|| sourceStack.getType().equals(Material.OBSIDIAN))) {
+						&& (sourceStack.getType().equals(Material.COBBLESTONE) || sourceStack.getType().equals(
+								Material.OBSIDIAN))) {
 					return;
 				}
 
 					resultStack.setData(sourceStack.getData());
 					resultStack.setDurability(sourceStack.getDurability());
 					newAmount = resultStack.getAmount()
-							+ Math.min(Utils.countBlocksAbove(piston, Material.OBSIDIAN, 2),
-									resultStack.getMaxStackSize());
+							+ Math.min(
+									Utils.countBlocksAbove(piston, Material.OBSIDIAN, 2),
+									(resultStack.getTypeId() == 0 || resultStack.getMaxStackSize() == -1) ? Integer.MAX_VALUE
+											: resultStack.getMaxStackSize());
 					resultStack.setAmount(newAmount);
-					if (resultStack.getAmount() == newAmount || resultStack.getAmount() == resultStack.getMaxStackSize())
+					if (resultStack.getAmount() == newAmount
+							|| resultStack.getAmount() == resultStack.getMaxStackSize())
 						if (fuelAmount == 1)
 							inventory.clear(indexOfFuel);
 						else