amijesse
Guest
Member
While inside an event handler for "InventoryMoveItemEvent" checking the contents of a hopper inventory, it will always report a stack size of 1 for the stack being "moved".
Code (Text):
@EventHandler
public static void onHopperItemChange(InventoryMoveItemEvent e){
if (e.getSource().getType() != InventoryType.HOPPER){
return;
}
for (ItemStack slot: e.getSource().getStorageContents()){
if (slot == null){
continue;
}...
Hopper reports wrong item stack size inside of "InventoryMoveItemEvent" event
Continue reading...
Code (Text):
@EventHandler
public static void onHopperItemChange(InventoryMoveItemEvent e){
if (e.getSource().getType() != InventoryType.HOPPER){
return;
}
for (ItemStack slot: e.getSource().getStorageContents()){
if (slot == null){
continue;
}...
Hopper reports wrong item stack size inside of "InventoryMoveItemEvent" event
Continue reading...