Search in sources :

Example 1 with InventoryActionData

use of com.nukkitx.protocol.bedrock.data.inventory.InventoryActionData in project Protocol by CloudburstMC.

the class BedrockPacketHelper_v431 method readInventoryActions.

@Override
public boolean readInventoryActions(ByteBuf buffer, BedrockSession session, List<InventoryActionData> actions) {
    this.readArray(buffer, actions, session, (buf, helper, aSession) -> {
        InventorySource source = helper.readSource(buf);
        int slot = VarInts.readUnsignedInt(buf);
        ItemData fromItem = helper.readItem(buf, aSession);
        ItemData toItem = helper.readItem(buf, aSession);
        return new InventoryActionData(source, slot, fromItem, toItem);
    });
    return false;
}
Also used : InventoryActionData(com.nukkitx.protocol.bedrock.data.inventory.InventoryActionData) InventorySource(com.nukkitx.protocol.bedrock.data.inventory.InventorySource) ItemData(com.nukkitx.protocol.bedrock.data.inventory.ItemData)

Aggregations

InventoryActionData (com.nukkitx.protocol.bedrock.data.inventory.InventoryActionData)1 InventorySource (com.nukkitx.protocol.bedrock.data.inventory.InventorySource)1 ItemData (com.nukkitx.protocol.bedrock.data.inventory.ItemData)1