use of biomesoplenty.client.particle.EntityTrailFX 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);
}
}
Aggregations