ViaBackwards icon indicating copy to clipboard operation
ViaBackwards copied to clipboard

Fix display entities for pre 1.19.4 clients

Open GliczDev opened this issue 2 years ago • 11 comments

TODO:

  • [x] Fix text display
  • [x] Fix item display
  • [ ] Fix block display
  • [ ] Transformation (only translation) support
  • [ ] Interpolation delay and duration support (might be moved into another PR)

GliczDev avatar Mar 26 '23 18:03 GliczDev

If you have any idea how can i set block for a falling block using metadata, please let me know

GliczDev avatar Mar 26 '23 18:03 GliczDev

When I change rewriting block display from falling block to armor stand, it shows, any idea why???

GliczDev avatar Mar 26 '23 19:03 GliczDev

The falling block entity doesn't use the metadata system to define its blockstate. One idea would be to cancel the spawn packet and send a falling block spawn when you receive the blockstate metadata.

tomcraft avatar Mar 26 '23 19:03 tomcraft

Okay, but how can I send a falling block spawn

GliczDev avatar Mar 26 '23 19:03 GliczDev

You have to build the packet from scratch using PacketWrapper. I think you can find some examples in other places of the source-code.

tomcraft avatar Mar 26 '23 19:03 tomcraft

Unfortunately i still don't know how to do this. If I won't find solution, I'll just leave it without block display fix

GliczDev avatar Mar 26 '23 20:03 GliczDev

Finally, I almost fixed block display, but I don't know how can I set and read metadata in spawn entity packet handler

GliczDev avatar Mar 27 '23 14:03 GliczDev

Also, display entities have 0.5 'added' to x and z position, and when I add it to this falling block, after some time it removes this position change

wrapper.set(Type.DOUBLE, 0, wrapper.get(Type.DOUBLE, 0) + 0.5);
wrapper.set(Type.DOUBLE, 2, wrapper.get(Type.DOUBLE, 2) + 0.5);

GliczDev avatar Mar 27 '23 14:03 GliczDev

As I see, entity meta is sent after spawn entity, so idk how can I finish fixing block display entity

GliczDev avatar Mar 27 '23 14:03 GliczDev

Are you still working on this PR / planning on updating it?

FlorianMichael avatar Feb 15 '24 17:02 FlorianMichael

I totally forgot about this PR because of problems I had, I can try to finish it

GliczDev avatar Feb 15 '24 20:02 GliczDev