use of stevekung.mods.moreplanets.util.client.particle.ParticleBreakingMC in project MorePlanets by SteveKunG.
the class ClientProxyMP method spawnParticle.
@Override
public void spawnParticle(EnumParticleTypesMP type, double x, double y, double z, double motionX, double motionY, double motionZ, Object[] data) {
Particle entityfx = null;
Minecraft mc = Minecraft.getMinecraft();
if (mc.getRenderViewEntity() != null && mc.effectRenderer != null && mc.world != null) {
int i = mc.gameSettings.particleSetting;
double d6 = mc.getRenderViewEntity().posX - x;
double d7 = mc.getRenderViewEntity().posY - y;
double d8 = mc.getRenderViewEntity().posZ - z;
double d9 = 16.0D;
if (i == 1 && mc.world.rand.nextInt(3) == 0) {
i = 2;
}
if (d6 * d6 + d7 * d7 + d8 * d8 > d9 * d9) {
return;
} else if (i > 1) {
return;
}
if (type == EnumParticleTypesMP.CRYSTALLIZE_FLAME) {
entityfx = new ParticleCrystallizeFlame(mc.world, x, y, z);
} else if (type == EnumParticleTypesMP.CHEESE_OF_MILK_DRIP) {
entityfx = new ParticleLiquidDrip(mc.world, x, y, z, 1.0F, 0.85F, 0.5F, 0.4F, false);
} else if (type == EnumParticleTypesMP.INFECTED_SPORE) {
entityfx = new ParticleInfectedSpore(mc.world, x, y, z, motionX, motionY, motionZ);
} else if (type == EnumParticleTypesMP.ALIEN_MINER_SPARK) {
entityfx = new ParticleAlienMinerSpark(mc.world, x, y, z, (float) data[0]);
} else if (type == EnumParticleTypesMP.INFECTED_GUARDIAN_APPEARANCE) {
entityfx = new ParticleInfectedGuardianAppearance(mc.world, x, y, z);
} else if (type == EnumParticleTypesMP.DARK_PORTAL) {
entityfx = new ParticleDarkPortal(mc.world, x, y, z, motionX, motionY, motionZ);
} else if (type == EnumParticleTypesMP.ALIEN_BERRY_LEAVES) {
entityfx = new ParticleAlienBerry(mc.world, x, y, z);
} else if (type == EnumParticleTypesMP.CUSTOM_BREAKING) {
entityfx = new ParticleBreakingMC(mc.world, x, y, z, (Item) data[0]);
} else if (type == EnumParticleTypesMP.CUSTOM_BREAKING_META) {
entityfx = new ParticleBreakingMC(mc.world, x, y, z, (Item) data[0], (int) data[1]);
} else if (type == EnumParticleTypesMP.CUSTOM_BREAKING_MOTION) {
entityfx = new ParticleBreakingMC(mc.world, x, y, z, motionX, motionY, motionZ, (Item) data[0]);
} else if (type == EnumParticleTypesMP.INFECTED_WATER_DRIP) {
entityfx = new ParticleLiquidDrip(mc.world, x, y, z, 0.95F, 0.4F, 0.3F, 0.6F, false);
} else if (type == EnumParticleTypesMP.CRYSTALLIZE_WATER_DRIP) {
entityfx = new ParticleLiquidDrip(mc.world, x, y, z, 0.6F, 0.2F, 0.8F, 0.6F, false);
} else if (type == EnumParticleTypesMP.CRYSTALLIZE_LAVA_DRIP) {
entityfx = new ParticleLiquidDrip(mc.world, x, y, z, 0.6F, 0.2F, 0.8F, 1.0F, true);
} else if (type == EnumParticleTypesMP.CRYSTALLIZE_LAVA) {
entityfx = new ParticleLavaMC(mc.world, x, y, z, "crystallize_lava");
} else if (type == EnumParticleTypesMP.MC_SMOKE_LARGE) {
mc.world.spawnParticle(EnumParticleTypes.SMOKE_LARGE, x, y, z, 0.0D, 0.0D, 0.0D);
} else if (type == EnumParticleTypesMP.NUCLEAR_WASTE_DRIP) {
entityfx = new ParticleLiquidDrip(mc.world, x, y, z, 0.4F, 0.8F, 0.1F, 1.0F, true);
} else if (type == EnumParticleTypesMP.PURIFY_WATER_DRIP) {
entityfx = new ParticleLiquidDrip(mc.world, x, y, z, 0.45F, 0.8F, 1.0F, 0.6F, false);
} else if (type == EnumParticleTypesMP.KOENTUS_METEOR_SMOKE) {
entityfx = new ParticleKoentusMeteor(mc.world, x, y, z, motionX, motionY, motionZ);
} else if (type == EnumParticleTypesMP.CUSTOM_FALLING_DUST) {
entityfx = new ParticleFallingDustMP(mc.world, x, y, z, (int) data[0]);
}
if (entityfx != null) {
mc.effectRenderer.addEffect(entityfx);
}
}
}
Aggregations