fix gui items not updated on shift

This commit is contained in:
Flemmli97 2021-05-03 21:05:25 +02:00
parent 96130119af
commit da5044d5c4
2 changed files with 8 additions and 5 deletions

View File

@ -1,7 +1,8 @@
Flan 1.3.1 Flan 1.3.1
====================== ======================
- Fix the nullpointer when creating claims - Fix the nullpointer when creating claims. derp
- Fix personal groups not reading from file - Fix personal groups not reading from file. derp x2
- Fix items in gui not updated clientside on shift click
Flan 1.3.0 Flan 1.3.0
====================== ======================

View File

@ -75,9 +75,11 @@ public abstract class ServerOnlyScreenHandler extends ScreenHandler {
Slot slot = this.slots.get(i); Slot slot = this.slots.get(i);
if (this.isRightSlot(i)) if (this.isRightSlot(i))
this.handleSlotClicked((ServerPlayerEntity) playerEntity, i, slot, j); this.handleSlotClicked((ServerPlayerEntity) playerEntity, i, slot, j);
this.sendContentUpdates(); ItemStack stack = slot.getStack().copy();
for(ScreenHandlerListener listener : this.listeners)
listener.onSlotUpdate(this, i, stack);
((ServerPlayerEntity) playerEntity).updateCursorStack(); ((ServerPlayerEntity) playerEntity).updateCursorStack();
return this.inventory.getStack(i); return stack;
} }
@Override @Override
@ -88,7 +90,7 @@ public abstract class ServerOnlyScreenHandler extends ScreenHandler {
if (this.isRightSlot(index)) if (this.isRightSlot(index))
this.handleSlotClicked((ServerPlayerEntity) player, index, slot, 0); this.handleSlotClicked((ServerPlayerEntity) player, index, slot, 0);
this.sendContentUpdates(); this.sendContentUpdates();
return this.inventory.getStack(index); return slot.getStack().copy();
} }
@Override @Override