ProtocolLib

3M Downloads

Packet spawn entity error

inrh opened this issue · 6 comments

commented

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

Screenshots
https://proxy.spigotmc.org/dabac827a46d855b59a418083419e908ad3dcac1?url=https%3A%2F%2Finrhinrh.coding.net%2Fp%2Ftuchuang%2Fd%2Ftuchuang%2Fgit%2Fraw%2F523ea71e1bff260aba3bde112f86cec748c15ecf%2Fproa.png

Version Info
Paper-1.14.4, ProtocolLib-4.5.0

Additional context
null

commented
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);
commented

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

commented

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.

commented

You're gonna have to provide some code

commented

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

commented

you cant just copy paste code from 1.13 to 1.15 and expect it work.
look at wiki.vg and the new packet format and adjust your code.