Skip to content

Commit

Permalink
Holding SHIFT with an empty hand will increase the amount of items set
Browse files Browse the repository at this point in the history
 on interfaces and on pattern terminal
  • Loading branch information
PrototypeTrousers committed Feb 21, 2021
1 parent e50eb79 commit a7a1a87
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/main/java/appeng/client/gui/AEBaseGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,16 @@ private void mouseWheelEvent( final int x, final int y, final int wheel )
}
}
}
if( slot instanceof SlotFake )
{
final ItemStack stack = ( (SlotFake) slot ).getStack();
if( stack != ItemStack.EMPTY )
{
InventoryAction direction = wheel > 0 ? InventoryAction.PLACE_SINGLE : InventoryAction.PICKUP_SINGLE;
final PacketInventoryAction p = new PacketInventoryAction( direction , slot.slotNumber , 0);
NetworkHandler.instance().sendToServer( p );
}
}
}

protected boolean enableSpaceClicking()
Expand Down
17 changes: 16 additions & 1 deletion src/main/java/appeng/container/AEBaseContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -699,8 +699,23 @@ public void doAction( final EntityPlayerMP player, final InventoryAction action,
is.setCount( 1 );
s.putStack( is );
}

else
{
final ItemStack is = s.getStack().copy();
if (is.getCount() < is.getMaxStackSize())
is.grow( 1 );
s.putStack( is );
}
break;
case PICKUP_SINGLE:
if( hand.isEmpty() )
{
final ItemStack is = s.getStack().copy();
if (is.getCount() > 1)
is.shrink( 1 );
s.putStack( is );
}
break;
case SPLIT_OR_PLACE_SINGLE:

ItemStack is = s.getStack();
Expand Down

0 comments on commit a7a1a87

Please sign in to comment.