use of net.minecraft.client.particle.Particle in project Binnie by ForestryMC.
the class InoculatorFX method onDisplayTick.
@SideOnly(Side.CLIENT)
@Override
public void onDisplayTick(World world, BlockPos pos, Random rand) {
if (!this.getUtil().getProcess().isInProgress())
return;
final int tick = (int) (world.getTotalWorldTime() % 3L);
if (tick == 0) {
final Particle particle = new InoculatorParticle(world, pos);
BinnieCore.getBinnieProxy().getMinecraftInstance().effectRenderer.addEffect(particle);
}
}
use of net.minecraft.client.particle.Particle in project Binnie by ForestryMC.
the class IsolatorFX method onRandomDisplayTick.
@SideOnly(Side.CLIENT)
@Override
public void onRandomDisplayTick(World world, BlockPos pos, Random rand) {
if (!this.getUtil().getProcess().isInProgress()) {
return;
}
final Particle particle = new IsolaterParticleRandomTick(world, pos, rand);
BinnieCore.getBinnieProxy().getMinecraftInstance().effectRenderer.addEffect(particle);
}
use of net.minecraft.client.particle.Particle in project Binnie by ForestryMC.
the class IsolatorFX method onDisplayTick.
@SideOnly(Side.CLIENT)
@Override
public void onDisplayTick(World world, BlockPos pos, Random rand) {
if (!this.getUtil().getProcess().isInProgress())
return;
final int tick = (int) (world.getTotalWorldTime() % 6L);
if (tick == 0 || tick == 5) {
final Particle particle = new IsolatorParticle(world, pos);
BinnieCore.getBinnieProxy().getMinecraftInstance().effectRenderer.addEffect(particle);
}
}
use of net.minecraft.client.particle.Particle in project BiomesOPlenty by Glitchfiend.
the class ClientProxy method spawnParticle.
@Override
public void spawnParticle(BOPParticleTypes type, World parWorld, double x, double y, double z, Object... info) {
Minecraft minecraft = Minecraft.getMinecraft();
Particle entityFx = null;
switch(type) {
case PIXIETRAIL:
entityFx = new EntityPixieTrailFX(parWorld, x, y, z, MathHelper.nextDouble(parWorld.rand, -0.03, 0.03), -0.02D, MathHelper.nextDouble(parWorld.rand, -0.03, 0.03));
break;
case MUD:
int itemId = Item.getIdFromItem(BOPItems.mudball);
minecraft.world.spawnParticle(EnumParticleTypes.ITEM_CRACK, x, y, z, MathHelper.nextDouble(parWorld.rand, -0.08D, 0.08D), MathHelper.nextDouble(parWorld.rand, -0.08D, 0.08D), MathHelper.nextDouble(parWorld.rand, -0.08D, 0.08D), itemId);
return;
case PLAYER_TRAIL:
if (info.length < 1)
throw new RuntimeException("Missing argument for trail name!");
entityFx = new EntityTrailFX(parWorld, x, y, z, (String) info[0]);
break;
default:
break;
}
if (entityFx != null) {
minecraft.effectRenderer.addEffect(entityFx);
}
}
use of net.minecraft.client.particle.Particle in project Railcraft by Railcraft.
the class ClientEffects method fireSparkEffect.
public void fireSparkEffect(World world, Vec3d start, Vec3d end) {
if (thinParticles(false))
return;
IEffectSource es = EffectManager.getEffectSource(start);
Particle particle = new ParticleFireSpark(world, start, end);
spawnParticle(particle);
SoundHelper.playSoundClient(world, es.getPos(), SoundEvents.BLOCK_LAVA_POP, SoundCategory.BLOCKS, .2F + rand.nextFloat() * .2F, .9F + rand.nextFloat() * .15F);
}
Aggregations