mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-29 13:04:59 +00:00
Enhance container handling for Minecraft protocol updates
- Updated the Container class to include a protocol version parameter for accurate container type mapping. - Modified the GetContainerType method to account for changes in container types introduced in Minecraft 1.20.4. - Added new container types, including Crafter, to the ContainerType enum. - Adjusted ContainerTypeExtensions to reflect the new container mappings and ensure compatibility with the updated protocol.
This commit is contained in:
parent
22f46d14a9
commit
ef133f3d6d
4 changed files with 69 additions and 19 deletions
|
|
@ -2319,7 +2319,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
var windowId = dataTypes.ReadNextVarInt(packetData);
|
||||
var windowType = dataTypes.ReadNextVarInt(packetData);
|
||||
var title = dataTypes.ReadNextChat(packetData);
|
||||
Container inventory = new(windowId, windowType, ChatParser.ParseText(title));
|
||||
Container inventory = new(windowId, windowType, ChatParser.ParseText(title), protocolVersion);
|
||||
handler.OnInventoryOpen(windowId, inventory);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue