Permalink
Browse files

Don't ever call update on inventories.

  • Loading branch information...
me4502 committed Aug 19, 2017
1 parent 6213cd1 commit d88416a6752655bbf9ad1ac3e902110fff254089
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/main/java/com/sk89q/craftbook/util/InventoryUtil.java
@@ -48,8 +48,8 @@
return addItemsToBrewingStand((BrewingStand) container, stacks);
} else { //Basic inventories like chests, dispensers, storage carts, etc.
ArrayList<ItemStack> leftovers = new ArrayList<>(container.getInventory().addItem(stacks).values());
if(container instanceof BlockState && update)
((BlockState) container).update();
//if(container instanceof BlockState && update)
// ((BlockState) container).update();
return leftovers;
}
}
@@ -86,7 +86,7 @@
}
leftovers.removeAll(Collections.singleton(null));
furnace.update();
//furnace.update();
return leftovers;
}
@@ -120,7 +120,7 @@
}
}
brewingStand.update();
//brewingStand.update();
return leftovers;
}
@@ -190,8 +190,8 @@ public static boolean removeItemsFromInventory(InventoryHolder inv, ItemStack ..
inv.getInventory().addItem(itemsToAdd.toArray(new ItemStack[itemsToAdd.size()]));
}
if(inv instanceof BlockState)
((BlockState) inv).update();
//if(inv instanceof BlockState)
// ((BlockState) inv).update();
return leftovers.isEmpty();
}

0 comments on commit d88416a

Please sign in to comment.