Skip to content

Commit

Permalink
Fix shift double click in inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
Shevchik committed Mar 23, 2019
1 parent d40305a commit 70c1cdf
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -5,6 +5,7 @@
import protocolsupport.protocol.packet.middle.serverbound.play.MiddleInventoryClick;
import protocolsupport.protocol.serializer.ItemStackSerializer;
import protocolsupport.protocol.typeremapper.basic.WindowSlotsRemappingHelper;
import protocolsupport.protocol.utils.types.NetworkItemStack;

public class InventoryClick extends MiddleInventoryClick {

Expand Down Expand Up @@ -37,6 +38,9 @@ public void readFromClientData(ByteBuf clientdata) {
actionNumber = clientdata.readShort();
mode = clientdata.readUnsignedByte();
itemstack = ItemStackSerializer.readItemStack(clientdata, version, cache.getAttributesCache().getLocale());
if (button == 0 && mode == 1) {
itemstack = NetworkItemStack.NULL;
}
}

}

0 comments on commit 70c1cdf

Please sign in to comment.