Skip to content

Support for 1.20.5#2894

Merged
dmulloy2 merged 3 commits intodmulloy2:masterfrom
Imprex-Development:feat-1.20.5-support
Apr 28, 2024
Merged

Support for 1.20.5#2894
dmulloy2 merged 3 commits intodmulloy2:masterfrom
Imprex-Development:feat-1.20.5-support

Conversation

@Ingrim4
Copy link
Copy Markdown
Collaborator

@Ingrim4 Ingrim4 commented Apr 23, 2024

Description

Adds support for minecraft 1.20.5 (missing new packet types as of now). To be honest I have no idea how updates for ProtocolLib are usually done regarding PacketTypes so this PR will only fix the new packet id system and some minor issues that occurred while testing 1.20.5.

Related Issue

closes #2893
closes #2896

How Has This Been Tested?

Tested with latest spigot 1.20.5 and 1.20.4 build with an early build of orebfuscator for 1.20.5. I couldn't observe any obvious errors.

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

P.S. could someone please also review my other fix: #2545

@Ingrim4 Ingrim4 changed the title WIP - Support for 1.20.5 Support for 1.20.5 Apr 24, 2024
@Ingrim4 Ingrim4 marked this pull request as ready for review April 24, 2024 16:31
@DoubleNico
Copy link
Copy Markdown
Contributor

I found a packet error with 1.20.5, I saw that the com.comphenix.protocol.wrappers.WrappedLevelChunkData$ChunkData class cannot be initialized because the constructor for the real packet changed.
On 1.20.4 it was
public ClientboundLevelChunkPacketData(PacketDataSerializer packetdataserializer, int i, int j)
Now it's
public ClientboundLevelChunkPacketData(RegistryFriendlyByteBuf registryfriendlybytebuf, int i, int j)

@Ingrim4
Copy link
Copy Markdown
Collaborator Author

Ingrim4 commented Apr 27, 2024

I found a packet error with 1.20.5, I saw that the com.comphenix.protocol.wrappers.WrappedLevelChunkData$ChunkData class cannot be initialized because the constructor for the real packet changed. On 1.20.4 it was public ClientboundLevelChunkPacketData(PacketDataSerializer packetdataserializer, int i, int j) Now it's public ClientboundLevelChunkPacketData(RegistryFriendlyByteBuf registryfriendlybytebuf, int i, int j)

Oh I didn't notice the new RegistryFriendlyByteBuf that will need some major rework of the packet wrapper system since a bunch of packets require this new derivative to even read/create a new packet. I will look into it once I'm back from vacation. I would probably just use the new MinecraftRegistryAccess class from this PR for the registry accessor and rewrite some parts of the StructureCache to work with the new class.

@dmulloy2 dmulloy2 merged commit 70e4812 into dmulloy2:master Apr 28, 2024
@ghost
Copy link
Copy Markdown

ghost commented May 3, 2024

1.20.5 support does not work on paper.

@Ingrim4 Ingrim4 mentioned this pull request May 5, 2024
3 tasks
@Ingrim4 Ingrim4 deleted the feat-1.20.5-support branch June 6, 2024 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to find a field that matches {modifiers=[required: 10000, banned: 1000] 1.20.5 support

3 participants