Reverse invpanel scroll behavior and remove a sysout

This commit is contained in:
tterrag1098 committed 2015-04-20 01:02:59 -04:00
1 parent ef26336fca
commit cf46c0cf93
2 files changed
+11 -10

No files matched your search

@@ -337,15 +337,17 @@ public class GuiInventoryPanel extends GuiMachineBase<TileInventoryPanel> {
boolean shift = isShiftKeyDown();
if(shift && inventoryArea.contains(x, y)) {
scrollbar.scrollBy(-Integer.signum(delta));
} else if(!shift && delta > 0 & (hoverGhostSlot instanceof InvSlot)) {
InvSlot invSlot = (InvSlot) hoverGhostSlot;
InventoryDatabaseClient db = getDatabase();
if(invSlot.stack != null && invSlot.entry != null && db != null) {
ItemStack itemStack = mc.thePlayer.inventory.getItemStack();
if(itemStack == null || ItemUtil.areStackMergable(itemStack, hoverGhostSlot.stack)) {
PacketHandler.INSTANCE.sendToServer(new PacketFetchItem(db.getGeneration(), invSlot.entry, -1, 1));
if(inventoryArea.contains(x, y)) {
if(!shift) {
scrollbar.scrollBy(-Integer.signum(delta));
} else if(hoverGhostSlot instanceof InvSlot) {
InvSlot invSlot = (InvSlot) hoverGhostSlot;
InventoryDatabaseClient db = getDatabase();
if(invSlot.stack != null && invSlot.entry != null && db != null) {
ItemStack itemStack = mc.thePlayer.inventory.getItemStack();
if(itemStack == null || ItemUtil.areStackMergable(itemStack, hoverGhostSlot.stack)) {
PacketHandler.INSTANCE.sendToServer(new PacketFetchItem(db.getGeneration(), invSlot.entry, -1, 1));
}
}
}
}
@@ -96,7 +96,6 @@ public abstract class InventoryDatabase<ItemEntry extends ItemEntryBase> {
if(entry == null && create) {
entry = createItemEntry(dbID, dbID, itemID, meta, null);
simpleRegsitry.put(dbID, entry);
System.out.println("New simple item: " + entry);
}
return entry;
}