use of net.minecraft.particle.ParticleEffect in project friends-and-foes by Faboslav.
the class GlareEntity method showEmoteParticle.
protected void showEmoteParticle(boolean positive) {
ParticleEffect particleEffect;
if (positive) {
particleEffect = ParticleTypes.HEART;
} else {
particleEffect = ParticleTypes.SMOKE;
}
for (int i = 0; i < 7; ++i) {
double d = this.random.nextGaussian() * 0.02D;
double e = this.random.nextGaussian() * 0.02D;
double f = this.random.nextGaussian() * 0.02D;
this.world.addParticle(particleEffect, this.getParticleX(1.0D), this.getRandomBodyY() + 0.5D, this.getParticleZ(1.0D), d, e, f);
}
}
use of net.minecraft.particle.ParticleEffect in project Immersive-Weathering by AstralOrdana.
the class IcicleBlock method createParticle.
private static void createParticle(World world, BlockPos pos, BlockState state, Fluid fluid) {
Vec3d vec3d = state.getModelOffset(world, pos);
double e = (double) pos.getX() + 0.5D + vec3d.x;
double f = (double) ((float) (pos.getY() + 1) - 0.6875F) - 0.0625D;
double g = (double) pos.getZ() + 0.5D + vec3d.z;
Fluid fluid2 = getDripFluid(world, fluid);
ParticleEffect particleEffect = fluid2.isIn(FluidTags.LAVA) ? ParticleTypes.DRIPPING_DRIPSTONE_LAVA : ParticleTypes.DRIPPING_DRIPSTONE_WATER;
world.addParticle(particleEffect, e, f, g, 0.0D, 0.0D, 0.0D);
}
Aggregations