mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Handle DESTROY creative action
This commit is contained in:
parent
2d37d3f276
commit
4a8d93752b
1 changed files with 11 additions and 0 deletions
|
@ -407,6 +407,17 @@ public class PlayerInventoryTranslator extends InventoryTranslator {
|
||||||
craftState = CraftState.DEPRECATED;
|
craftState = CraftState.DEPRECATED;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case DESTROY: {
|
||||||
|
DestroyStackRequestActionData destroyAction = (DestroyStackRequestActionData) action;
|
||||||
|
if (craftState != CraftState.DEPRECATED) {
|
||||||
|
return rejectRequest(request);
|
||||||
|
}
|
||||||
|
|
||||||
|
int sourceSlot = bedrockSlotToJava(destroyAction.getSource());
|
||||||
|
inventory.setItem(sourceSlot, GeyserItemStack.EMPTY, session); //assume all creative destroy requests will empty the slot
|
||||||
|
affectedSlots.add(sourceSlot);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case TAKE:
|
case TAKE:
|
||||||
case PLACE: {
|
case PLACE: {
|
||||||
TransferStackRequestActionData transferAction = (TransferStackRequestActionData) action;
|
TransferStackRequestActionData transferAction = (TransferStackRequestActionData) action;
|
||||||
|
|
Loading…
Reference in a new issue