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

BlockParticleOption#pos is not serialized and end up breaking blocks that relay on ModelData for particles #1629

Open
ZeroNoRyouki opened this issue Oct 25, 2024 · 1 comment · May be fixed by #1673
Assignees
Labels
1.21.1 Targeted at Minecraft 1.21.1 1.21.3 Targeted at Minecraft 1.21.3 bug A bug or error

Comments

@ZeroNoRyouki
Copy link

Minecraft Version: 1.21.1

NeoForge Version: 21.1.22 (dev-env) / 21.1.72 (production)

Steps to Reproduce:

  1. Put a breakpoint in both the constructors of ClientboundLevelParticlesPacket
  2. Fall on any blocks from some distance
  3. Observe that the pos field of the pos field of the object referenced to by ClientboundLevelParticlesPacket#particle is non-null (and the position of the fallen-on block) at the end of the "logical server side" constructor and null at the end of the constructor used by the netty thread.

Image

Description of issue:
The position of the fallen-on block is not know on the client. If the block model depend on ModelData to retrive the correct particle it is unable to do so since the correct ModelData can't be retrived (ModelData.EMPTY is used instead)

Having discussed this with XFactHD on discord, it looks like this problem originated at the introduction of the pos field in BlockParticleOption

Z

@ZeroNoRyouki ZeroNoRyouki added the triage Needs triaging and confirmation label Oct 25, 2024
@XFactHD XFactHD added bug A bug or error 1.21.1 Targeted at Minecraft 1.21.1 1.21.3 Targeted at Minecraft 1.21.3 and removed triage Needs triaging and confirmation labels Oct 25, 2024
@XFactHD XFactHD self-assigned this Oct 25, 2024
ZeroNoRyouki added a commit to ZeroNoRyouki/ZeroCore2 that referenced this issue Oct 27, 2024
…when fall damage particles are requested for ModelData-aware blocks (see neoforged/NeoForge#1629). To address this, a "fallback" ModelData option has been added, which will be used in cases where the requested ModelData returns empty.
ZeroNoRyouki added a commit to ZeroNoRyouki/ExtremeReactors2 that referenced this issue Oct 27, 2024
ZeroNoRyouki added a commit to ZeroNoRyouki/ZeroCore2 that referenced this issue Oct 27, 2024
…when fall damage particles are requested for ModelData-aware blocks (see neoforged/NeoForge#1629). To address this, a "fallback" ModelData option has been added, which will be used in cases where the requested ModelData returns empty.
ZeroNoRyouki added a commit to ZeroNoRyouki/ExtremeReactors2 that referenced this issue Oct 27, 2024
@XFactHD
Copy link
Member

XFactHD commented Nov 9, 2024

I've made a PR to fix this in 1.21.3, though I'm not sure yet how to deal with it in 1.21.1 since the fix used in the PR is technically a network compatibility break.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.21.1 Targeted at Minecraft 1.21.1 1.21.3 Targeted at Minecraft 1.21.3 bug A bug or error
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants