I couldn't give a better title. I have a code that generates some particles when an item gets thrown. I just don't understand why the particles are invisible. Im using wolrd.addParticle() to add them to the world. My code:
public class ThrowFireEvent {
@SubscribeEvent
public static void ThrowFireEvent(ItemTossEvent event) {
ItemEntity item = event.getEntityItem();
World world = item.getEntityWorld();
double x = (double)item.getPosition().getX();
double y = (double)item.getPosition().getY();
double z = (double)item.getPosition().getZ();
world.addParticle(ParticleTypes.CAMPFIRE_COSY_SMOKE, true, x, y, z, 0.0D, 0.05D, 0.0D);
}
}
There are no errors in the code and once I printed out the world and the coordinates and they were all right. I also took a look at minecraft's torch block and It does it at the same way. Hopefully you know the answer, and every bit of help is appreciated. (Sorry for bad English, and plus note, I'm using 1.15.2)
Edit: It does work when I call it in other events.