Skip to content

How to draw particles from BlockPos A to BlockPos B #2161

Discussion options

You must be logged in to vote

The cloud particle effect hardwires its Particle.collidesWithWorld to false in its constructor.
But even then, I believe setting it to true just checks block collisions and the world border, not entity collision.

To get entity collisions you are going to have to write your own Particle (e.g. copy CloudParticle) then override the Particle.move() method to also check entity collision.
Again, you have to do this yourself, normaly entity collision requires an entity to check against other entities, e.g. see ProjectileUtil.getEntityCollision.

Replies: 1 comment 83 replies

Comment options

You must be logged in to vote
83 replies
@warjort
Comment options

warjort Apr 26, 2022
Collaborator

@SirEnder125
Comment options

@SirEnder125
Comment options

@SirEnder125
Comment options

@SirEnder125
Comment options

Answer selected by SirEnder125
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants