use of micdoodle8.mods.galacticraft.planets.mars.client.fx.EntityBacterialDripFX in project Galacticraft by micdoodle8.
the class MarsModuleClient method spawnParticle.
@Override
public void spawnParticle(String particleID, Vector3 position, Vector3 motion, Object... extraData) {
Minecraft mc = FMLClientHandler.instance().getClient();
if (mc != null && mc.getRenderViewEntity() != null && mc.effectRenderer != null) {
final double dPosX = mc.getRenderViewEntity().posX - position.x;
final double dPosY = mc.getRenderViewEntity().posY - position.y;
final double dPosZ = mc.getRenderViewEntity().posZ - position.z;
EntityFX particle = null;
final double maxDistSqrd = 64.0D;
if (dPosX * dPosX + dPosY * dPosY + dPosZ * dPosZ < maxDistSqrd * maxDistSqrd) {
if (particleID.equals("sludgeDrip")) {
// particle = new EntityDropParticleFX(mc.theWorld, position.x, position.y, position.z, Material.water); TODO
} else if (particleID.equals("bacterialDrip")) {
particle = new EntityBacterialDripFX(mc.theWorld, position.x, position.y, position.z);
}
}
if (particle != null) {
particle.prevPosX = particle.posX;
particle.prevPosY = particle.posY;
particle.prevPosZ = particle.posZ;
mc.effectRenderer.addEffect(particle);
}
}
}
Aggregations