Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-26 00:00:41 +01:00
Handle DESTROY creative action
Dieser Commit ist enthalten in:
Ursprung
2d37d3f276
Commit
4a8d93752b
@ -407,6 +407,17 @@ public class PlayerInventoryTranslator extends InventoryTranslator {
|
||||
craftState = CraftState.DEPRECATED;
|
||||
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 PLACE: {
|
||||
TransferStackRequestActionData transferAction = (TransferStackRequestActionData) action;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren