mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Update Protocol and fix item stack encoding
This commit is contained in:
parent
0bc39d5a19
commit
4f7e9fca9c
2 changed files with 5 additions and 4 deletions
|
@ -29,6 +29,7 @@ import it.unimi.dsi.fastutil.ints.*;
|
|||
import lombok.AllArgsConstructor;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.cloudburstmc.protocol.bedrock.data.inventory.ContainerSlotType;
|
||||
import org.cloudburstmc.protocol.bedrock.data.inventory.FullContainerName;
|
||||
import org.cloudburstmc.protocol.bedrock.data.inventory.itemstack.request.ItemStackRequest;
|
||||
import org.cloudburstmc.protocol.bedrock.data.inventory.itemstack.request.ItemStackRequestSlotData;
|
||||
import org.cloudburstmc.protocol.bedrock.data.inventory.itemstack.request.action.*;
|
||||
|
@ -894,11 +895,11 @@ public abstract class InventoryTranslator {
|
|||
|
||||
List<ItemStackResponseContainer> containerEntries = new ArrayList<>();
|
||||
for (Map.Entry<ContainerSlotType, List<ItemStackResponseSlot>> entry : containerMap.entrySet()) {
|
||||
containerEntries.add(new ItemStackResponseContainer(entry.getKey(), entry.getValue(), null));
|
||||
containerEntries.add(new ItemStackResponseContainer(entry.getKey(), entry.getValue(), new FullContainerName(entry.getKey(), 0)));
|
||||
}
|
||||
|
||||
ItemStackResponseSlot cursorEntry = makeItemEntry(0, session.getPlayerInventory().getCursor());
|
||||
containerEntries.add(new ItemStackResponseContainer(ContainerSlotType.CURSOR, Collections.singletonList(cursorEntry), null));
|
||||
containerEntries.add(new ItemStackResponseContainer(ContainerSlotType.CURSOR, Collections.singletonList(cursorEntry), new FullContainerName(ContainerSlotType.CURSOR, 0)));
|
||||
|
||||
return containerEntries;
|
||||
}
|
||||
|
@ -952,4 +953,4 @@ public abstract class InventoryTranslator {
|
|||
TRANSFER,
|
||||
DONE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue