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

Breaking blocks doesn't add break sound & particles #150

Open
Poswn opened this issue Jan 21, 2022 · 0 comments
Open

Breaking blocks doesn't add break sound & particles #150

Poswn opened this issue Jan 21, 2022 · 0 comments

Comments

@Poswn
Copy link

Poswn commented Jan 21, 2022

Expected Behavior

Breaking a block will play a sound and show particles of where block was broken.

Actual Behavior

No sound played or particles shown.

Steps to Reproduce

Go into creative mode (can't break any blocks in survival for some reason) and break a block.

Debug information

I dug into this a bit myself and it seems be from this piece of code (or look at code I copied below) where chunk.getPlayerLoaders() in fact is empty.

This code snippet is taken from here.

if (createParticles) {
    Chunk chunk = this.getLoadedChunk(target.getPosition());
    if (chunk != null) {
        this.addParticle(new DestroyBlockParticle(target.getPosition().toFloat().add(0.5, 0.5, 0.5), target.getState()), (Collection<Player>) chunk.getPlayerLoaders());
    }
}
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

No branches or pull requests

1 participant