Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

com.comphenix.protocol.reflect.FieldAccessException: No field with type net.minecraft.server.v1_16_R2.ItemStack exists in class PacketPlayOutEntityEquipment. #74

Open
alexandrage opened this issue Aug 17, 2020 · 3 comments

Comments

@alexandrage
Copy link

com.comphenix.protocol.reflect.FieldAccessException: No field with type net.minecraft.server.v1_16_R2.ItemStack exists in class PacketPlayOutEntityEquipment.
at com.comphenix.protocol.reflect.StructureModifier.writeInternal(StructureModifier.java:363) ~[?:?]
at com.comphenix.protocol.reflect.StructureModifier.write(StructureModifier.java:343) ~[?:?]
at com.comphenix.packetwrapper.WrapperPlayServerEntityEquipment.setItem(WrapperPlayServerEntityEquipment.java:109) ~[?:?]

@MeFisto94
Copy link

MeFisto94 commented Aug 29, 2020

Actually, I get a different error: No field with type net.minecraft.server.v1_16_R2.EnumItemSlot exists in class PacketPlayOutEntityEquipment.

And indeed, the protocl has changed:

private int a;
private final List<Pair<EnumItemSlot, ItemStack>> b;

Not sure if ProtocolLib supports Pair at all, I'll check that

Edit: okay, we need to wait that dmulloy2/ProtocolLib@f19bfc6 is deployed as a Snapshot.
The other question is, whether the regeneration script should be ran or whether this code change should be done manually?

@alexandrage
Copy link
Author

This works for block setting yes getSlotStackPairLists

@JarvisCraft
Copy link

JarvisCraft commented Jan 20, 2021

The other question is, whether the regeneration script should be ran or whether this code change should be done manually?

As I am aware, the work on new format support is done manually.

This exact fix is partly available here: #78 (although the PR seems to be incorrect as write operations seem to be missing).

Also it should be available as part of this changeset: #60 (lazily, but I am working on it as I now have some sponsoring for it).

As a temporary workaround you can either do these operations directly by modifying the underlying PacketContainer manually or either add the Draft-PR branch as a git submodule and use it for building.

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

No branches or pull requests

3 participants