use of net.minecraft.client.particle.Particle in project DynamicSurroundings by OreCruncher.
the class ParticleDustJet method spawnJetParticle.
@Override
protected void spawnJetParticle() {
final double x = this.posX + RANDOM.nextGaussian() * 0.2D;
final double z = this.posZ + RANDOM.nextGaussian() * 0.2D;
final Particle particle = new ParticleDust(this.world, x, this.posY, z, this.blockState).init();
addParticle(particle);
}
use of net.minecraft.client.particle.Particle in project DynamicSurroundings by OreCruncher.
the class ParticleFountainJet method spawnJetParticle.
@Override
protected void spawnJetParticle() {
final double motionX = RANDOM.nextGaussian() * 0.03D;
final double motionZ = RANDOM.nextGaussian() * 0.03D;
final double x = this.posX + RANDOM.nextGaussian() * 0.2D;
final double z = this.posZ + RANDOM.nextGaussian() * 0.2D;
final Particle particle = new ParticleFountain(this.world, x, this.posY, z, motionX, 0.5D, motionZ, this.block).init();
addParticle(particle);
}
use of net.minecraft.client.particle.Particle in project DynamicSurroundings by OreCruncher.
the class ParticleBubbleJet method spawnJetParticle.
@Override
protected void spawnJetParticle() {
final Particle particle = this.factory.createParticle(EnumParticleTypes.WATER_BUBBLE.getParticleID(), this.world, this.posX, this.posY, this.posZ, 0D, 0.5D + this.jetStrength / 10.0D, 0D);
addParticle(particle);
}
use of net.minecraft.client.particle.Particle in project DynamicSurroundings by OreCruncher.
the class ParticleFireJet method spawnJetParticle.
@Override
protected void spawnJetParticle() {
final double speedY = this.isLava ? 0 : this.jetStrength / 10.0D;
final Particle particle = this.factory.createParticle(this.particleId, this.world, this.posX, this.posY, this.posZ, 0D, speedY, 0D);
if (!this.isLava) {
final ParticleFlame flame = (ParticleFlame) particle;
flame.flameScale *= this.jetStrength;
}
addParticle(particle);
}
use of net.minecraft.client.particle.Particle in project EnderIO by SleepyTrousers.
the class AbstractBlockObelisk method randomDisplayTick.
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(@Nonnull IBlockState bs, @Nonnull World world, @Nonnull BlockPos pos, @Nonnull Random rand) {
if (isActive(world, pos) && shouldDoWorkThisTick(world, pos, 5)) {
float startX = pos.getX() + 1.0F;
float startY = pos.getY() + 0.85F;
float startZ = pos.getZ() + 1.0F;
for (int i = 0; i < 1; i++) {
float xOffset = -0.2F - rand.nextFloat() * 0.6F;
float yOffset = -0.1F + rand.nextFloat() * 0.2F;
float zOffset = -0.2F - rand.nextFloat() * 0.6F;
Particle fx = Minecraft.getMinecraft().effectRenderer.spawnEffectParticle(EnumParticleTypes.SPELL.getParticleID(), startX + xOffset, startY + yOffset, startZ + zOffset, 0.0D, 0.0D, 0.0D);
if (fx != null) {
fx.setRBGColorF(0.2f, 0.2f, 0.8f);
ClientUtil.setParticleVelocityY(fx, ClientUtil.getParticleVelocityY(fx) * 0.5);
}
}
}
}
Aggregations