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

Fix display entities for pre 1.19.4 clients #538

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GliczDev
Copy link

@GliczDev GliczDev commented Mar 26, 2023

TODO:

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

@GliczDev GliczDev marked this pull request as draft March 26, 2023 18:27
@GliczDev
Copy link
Author

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

@GliczDev
Copy link
Author

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

@tomcraft
Copy link

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.

@GliczDev
Copy link
Author

Okay, but how can I send a falling block spawn

@tomcraft
Copy link

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

@GliczDev
Copy link
Author

GliczDev commented Mar 26, 2023

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 GliczDev changed the title Fix display entities on versions below 1.19.4 Fix display entities for pre 1.19.4 clients Mar 26, 2023
@GliczDev
Copy link
Author

GliczDev commented Mar 27, 2023

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

@GliczDev
Copy link
Author

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
Copy link
Author

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

@FlorianMichael
Copy link
Member

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

@GliczDev
Copy link
Author

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

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.

3 participants