Search in sources :

Example 1 with ParticleAlienBerry

use of stevekung.mods.moreplanets.module.planets.nibiru.client.particle.ParticleAlienBerry 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);
        }
    }
}
Also used : ParticleInfectedGuardianAppearance(stevekung.mods.moreplanets.module.planets.nibiru.client.particle.ParticleInfectedGuardianAppearance) ParticleInfectedSpore(stevekung.mods.moreplanets.module.planets.nibiru.client.particle.ParticleInfectedSpore) ParticleDarkPortal(stevekung.mods.moreplanets.module.planets.diona.client.particle.ParticleDarkPortal) ParticleLavaMC(stevekung.mods.moreplanets.util.client.particle.ParticleLavaMC) ParticleFallingDustMP(stevekung.mods.moreplanets.util.client.particle.ParticleFallingDustMP) Minecraft(net.minecraft.client.Minecraft) ParticleBreakingMC(stevekung.mods.moreplanets.util.client.particle.ParticleBreakingMC) Particle(net.minecraft.client.particle.Particle) ParticleAlienMinerSpark(stevekung.mods.moreplanets.module.planets.diona.client.particle.ParticleAlienMinerSpark) Item(net.minecraft.item.Item) ParticleAlienBerry(stevekung.mods.moreplanets.module.planets.nibiru.client.particle.ParticleAlienBerry) ParticleLiquidDrip(stevekung.mods.moreplanets.util.client.particle.ParticleLiquidDrip) ParticleCrystallizeFlame(stevekung.mods.moreplanets.module.planets.diona.client.particle.ParticleCrystallizeFlame) ParticleKoentusMeteor(stevekung.mods.moreplanets.module.moons.koentus.client.particle.ParticleKoentusMeteor)

Aggregations

Minecraft (net.minecraft.client.Minecraft)1 Particle (net.minecraft.client.particle.Particle)1 Item (net.minecraft.item.Item)1 ParticleKoentusMeteor (stevekung.mods.moreplanets.module.moons.koentus.client.particle.ParticleKoentusMeteor)1 ParticleAlienMinerSpark (stevekung.mods.moreplanets.module.planets.diona.client.particle.ParticleAlienMinerSpark)1 ParticleCrystallizeFlame (stevekung.mods.moreplanets.module.planets.diona.client.particle.ParticleCrystallizeFlame)1 ParticleDarkPortal (stevekung.mods.moreplanets.module.planets.diona.client.particle.ParticleDarkPortal)1 ParticleAlienBerry (stevekung.mods.moreplanets.module.planets.nibiru.client.particle.ParticleAlienBerry)1 ParticleInfectedGuardianAppearance (stevekung.mods.moreplanets.module.planets.nibiru.client.particle.ParticleInfectedGuardianAppearance)1 ParticleInfectedSpore (stevekung.mods.moreplanets.module.planets.nibiru.client.particle.ParticleInfectedSpore)1 ParticleBreakingMC (stevekung.mods.moreplanets.util.client.particle.ParticleBreakingMC)1 ParticleFallingDustMP (stevekung.mods.moreplanets.util.client.particle.ParticleFallingDustMP)1 ParticleLavaMC (stevekung.mods.moreplanets.util.client.particle.ParticleLavaMC)1 ParticleLiquidDrip (stevekung.mods.moreplanets.util.client.particle.ParticleLiquidDrip)1