Renamed the particles to match vanilla

This commit is contained in:
Sollace 2019-02-03 20:01:50 +02:00
parent 29af8f173d
commit d4d1c2e586
12 changed files with 26 additions and 25 deletions

View file

@ -1,8 +1,8 @@
package com.minelittlepony.unicopia;
import com.minelittlepony.unicopia.particle.Particles;
import com.minelittlepony.unicopia.particle.client.EntityMagicFX;
import com.minelittlepony.unicopia.particle.client.EntityRaindropFX;
import com.minelittlepony.unicopia.particle.client.ParticleUnicornMagic;
import com.minelittlepony.unicopia.particle.client.ParticleRaindrops;
import com.minelittlepony.unicopia.particle.client.ParticleChanglingMagic;
import net.minecraftforge.fml.relauncher.Side;
@ -10,14 +10,15 @@ import net.minecraftforge.fml.relauncher.SideOnly;
public class UParticles {
public static int MAGIC_PARTICLE;
public static int RAIN_PARTICLE;
public static int UNICORN_MAGIC;
public static int CHANGELING_MAGIC;
public static int RAIN_DROPS;
@SideOnly(Side.CLIENT)
static void init() {
MAGIC_PARTICLE = Particles.instance().registerParticle(EntityMagicFX::new);
RAIN_PARTICLE = Particles.instance().registerParticle(EntityRaindropFX::new);
UNICORN_MAGIC = Particles.instance().registerParticle(ParticleUnicornMagic::new);
RAIN_DROPS = Particles.instance().registerParticle(ParticleRaindrops::new);
CHANGELING_MAGIC = Particles.instance().registerParticle(ParticleChanglingMagic::new);
}
}

View file

@ -202,7 +202,7 @@ public class EntityCloud extends EntityFlying implements IAnimals {
double y = getEntityBoundingBox().minY + height/2;
double z = posZ + randomIn(rand, boundingbox.minX, boundingbox.maxX) - width / 2;
int particleId = canSnowHere(new BlockPos(x, y, z)) ? EnumParticleTypes.SNOW_SHOVEL.getParticleID() : UParticles.RAIN_PARTICLE;
int particleId = canSnowHere(new BlockPos(x, y, z)) ? EnumParticleTypes.SNOW_SHOVEL.getParticleID() : UParticles.RAIN_DROPS;
Particles.instance().spawnParticle(particleId, false, x, y, z, 0, 0, 0);
}

View file

@ -5,13 +5,13 @@ import net.minecraft.client.particle.Particle;
import net.minecraft.client.particle.ParticleRain;
import net.minecraft.world.World;
public class EntityRaindropFX extends ParticleRain {
public class ParticleRaindrops extends ParticleRain {
public EntityRaindropFX(int id, World w, double x, double y, double z, double vX, double vY, double vZ, int... args) {
public ParticleRaindrops(int id, World w, double x, double y, double z, double vX, double vY, double vZ, int... args) {
this(w, x, y, z);
}
public EntityRaindropFX(World w, double x, double y, double z) {
public ParticleRaindrops(World w, double x, double y, double z) {
super(w, x, y, z);
motionY = -0.1;
particleMaxAge += 19;
@ -30,7 +30,7 @@ public class EntityRaindropFX extends ParticleRain {
public static class Factory implements IParticleFactory {
@Override
public Particle createParticle(int id, World w, double x, double y, double z, double vX, double vY, double vZ, int... args) {
return new EntityRaindropFX(w, x, y, z);
return new ParticleRaindrops(w, x, y, z);
}
}

View file

@ -6,17 +6,17 @@ import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.entity.Entity;
import net.minecraft.world.World;
public class EntityMagicFX extends Particle {
public class ParticleUnicornMagic extends Particle {
private float portalParticleScale;
private double portalPosX;
private double portalPosY;
private double portalPosZ;
public EntityMagicFX(int id, World w, double x, double y, double z, double vX, double vY, double vZ, int... args) {
public ParticleUnicornMagic(int id, World w, double x, double y, double z, double vX, double vY, double vZ, int... args) {
this(w, x, y, z, vX, vY, vZ);
}
public EntityMagicFX(World w, double x, double y, double z, double vX, double vY, double vZ) {
public ParticleUnicornMagic(World w, double x, double y, double z, double vX, double vY, double vZ) {
super(w, x, y, z, vX, vY, vZ);
motionX = vX;
motionY = vY;

View file

@ -80,11 +80,11 @@ public class PowerCloudBase implements IPower<Numeric> {
@Override
public void preApply(IPlayer player) {
IPower.spawnParticles(UParticles.MAGIC_PARTICLE, player, 10);
IPower.spawnParticles(UParticles.UNICORN_MAGIC, player, 10);
}
@Override
public void postApply(IPlayer player) {
IPower.spawnParticles(UParticles.RAIN_PARTICLE, player, 5);
IPower.spawnParticles(UParticles.RAIN_DROPS, player, 5);
}
}

View file

@ -103,7 +103,7 @@ public class PowerGrow implements IPower<Location> {
player.addExertion(3);
if (player.getWorld().isRemote) {
IPower.spawnParticles(UParticles.MAGIC_PARTICLE, player, 1);
IPower.spawnParticles(UParticles.UNICORN_MAGIC, player, 1);
}
}

View file

@ -56,11 +56,11 @@ public class PowerMagic implements IPower<Hit> {
@Override
public void preApply(IPlayer player) {
IPower.spawnParticles(UParticles.MAGIC_PARTICLE, player, 5);
IPower.spawnParticles(UParticles.UNICORN_MAGIC, player, 5);
}
@Override
public void postApply(IPlayer player) {
IPower.spawnParticles(UParticles.MAGIC_PARTICLE, player, 5);
IPower.spawnParticles(UParticles.UNICORN_MAGIC, player, 5);
}
}

View file

@ -160,11 +160,11 @@ public class PowerTeleport implements IPower<Location> {
public void preApply(IPlayer player) {
player.addExertion(3);
IPower.spawnParticles(UParticles.MAGIC_PARTICLE, player, 5);
IPower.spawnParticles(UParticles.UNICORN_MAGIC, player, 5);
}
@Override
public void postApply(IPlayer player) {
IPower.spawnParticles(UParticles.MAGIC_PARTICLE, player, 5);
IPower.spawnParticles(UParticles.UNICORN_MAGIC, player, 5);
}
}

View file

@ -48,7 +48,7 @@ public class SpellCharge extends AbstractSpell {
IShape line = new Line(start, target.getPositionVector());
source.spawnParticles(line, (int)line.getVolumeOfSpawnableSpace(), pos -> {
Particles.instance().spawnParticle(UParticles.MAGIC_PARTICLE, false, pos.add(start), 0, 0, 0);
Particles.instance().spawnParticle(UParticles.UNICORN_MAGIC, false, pos.add(start), 0, 0, 0);
});
}

View file

@ -156,7 +156,7 @@ public class SpellPortal extends AbstractSpell implements IUseAction {
@Override
public void render(ICaster<?> source, int level) {
source.spawnParticles(getPortalZone(), 10, pos -> {
Particles.instance().spawnParticle(UParticles.MAGIC_PARTICLE, false, pos, 0, 0, 0);
Particles.instance().spawnParticle(UParticles.UNICORN_MAGIC, false, pos, 0, 0, 0);
});
}

View file

@ -52,7 +52,7 @@ public class SpellShield extends AbstractSpell {
protected void spawnParticles(ICaster<?> source, int strength) {
source.spawnParticles(new Sphere(true, strength), strength * 6, pos -> {
Particles.instance().spawnParticle(UParticles.MAGIC_PARTICLE, false, pos, 0, 0, 0);
Particles.instance().spawnParticle(UParticles.UNICORN_MAGIC, false, pos, 0, 0, 0);
});
}

View file

@ -21,7 +21,7 @@ public class SpellVortex extends SpellShield {
Vec3d pos = source.getOriginVector();
source.spawnParticles(new Sphere(false, strength), strength * 9, p -> {
Particles.instance().spawnParticle(UParticles.MAGIC_PARTICLE, false, p, p.subtract(pos));
Particles.instance().spawnParticle(UParticles.UNICORN_MAGIC, false, p, p.subtract(pos));
});
}