Packet spawn entity error
inrh opened this issue · 6 comments
Describe the bug
It does not show the armor stand, but it does show bubbles.
I found that 1.12.2 did not have this problem, but 1.14.4 did.
To Reproduce
null
Expected behavior
Spawn armor stand
Version Info
Paper-1.14.4, ProtocolLib-4.5.0
Additional context
null
ProtocolManager protocolManager = ProtocolLibrary.getProtocolManager();
PacketContainer packet = protocolManager.createPacket(PacketType.Play.Server.SPAWN_ENTITY_LIVING);
packet.getIntegers().write(0, somerandomentityid);
packet.getIntegers().write(1, 78);
packet.getIntegers().write(2, (int)(location.getX() * 32D));
packet.getIntegers().write(3, (int)(location.getY() * 32D));
packet.getIntegers().write(4, (int)(location.getZ() * 32D));
packet.getDataWatcherModifier().write(0, WrappedDataWatcher());
protocolManager.sendServerPacket(player, packet);
you dont even fill all values in the packet.
please resort to the protocol documentation, this is not protocollib issue.
metadata isnt even part of that packet anymore
This is the code from the Internet, almost.
It has been a long time since I have deleted the code.
All in all, version 1.13 or older displays normally, while 1.14-1.15 displays only black bubbles.
Okay, I'll see the new content of the document when I have time.
Additionally, entity ids can and do change just about every version, so you shouldn’t hard code it. My guess is that 78 is now area effect cloud instead of armor stand