fix particles
This commit is contained in:
parent
30e6b4eb74
commit
0171d81724
41 changed files with 181 additions and 239 deletions
|
@ -1838,7 +1838,7 @@ public class ClientPlayer implements IClientPlayer
|
|||
try
|
||||
{
|
||||
ParticleType particle = packetIn.getParticleType();
|
||||
this.world.spawnEntityFX(particle, particle.getShouldIgnoreRange() | packetIn.isLongDistance(), packetIn.getXCoordinate(), packetIn.getYCoordinate(), packetIn.getZCoordinate(), d0, d2, d4, new int[] {packetIn.getParticleArg()});
|
||||
this.world.spawnEntityFX(particle, particle.isUnlimited() | packetIn.isLongDistance(), packetIn.getXCoordinate(), packetIn.getYCoordinate(), packetIn.getZCoordinate(), d0, d2, d4, packetIn.getParticleArg());
|
||||
}
|
||||
catch (Throwable var17)
|
||||
{
|
||||
|
@ -1859,7 +1859,7 @@ public class ClientPlayer implements IClientPlayer
|
|||
try
|
||||
{
|
||||
ParticleType particle = packetIn.getParticleType();
|
||||
this.world.spawnEntityFX(particle, particle.getShouldIgnoreRange() | packetIn.isLongDistance(), packetIn.getXCoordinate() + d1, packetIn.getYCoordinate() + d3, packetIn.getZCoordinate() + d5, d6, d7, d8, new int[] {packetIn.getParticleArg()});
|
||||
this.world.spawnEntityFX(particle, particle.isUnlimited() | packetIn.isLongDistance(), packetIn.getXCoordinate() + d1, packetIn.getYCoordinate() + d3, packetIn.getZCoordinate() + d5, d6, d7, d8, packetIn.getParticleArg());
|
||||
}
|
||||
catch (Throwable var16)
|
||||
{
|
||||
|
|
|
@ -37,7 +37,7 @@ public class EffectRenderer
|
|||
|
||||
/** RNG. */
|
||||
private Random rand = new Random();
|
||||
private Map<Integer, IParticleFactory> particleTypes = Maps.<Integer, IParticleFactory>newHashMap();
|
||||
private Map<ParticleType, IParticleFactory> particleTypes = Maps.<ParticleType, IParticleFactory>newEnumMap(ParticleType.class);
|
||||
|
||||
public EffectRenderer(World worldIn, TextureManager rendererIn)
|
||||
{
|
||||
|
@ -59,52 +59,50 @@ public class EffectRenderer
|
|||
|
||||
private void registerVanillaParticles()
|
||||
{
|
||||
this.registerParticle(ParticleType.EXPLOSION_NORMAL.getParticleID(), new EntityExplodeFX.Factory());
|
||||
this.registerParticle(ParticleType.WATER_BUBBLE.getParticleID(), new EntityBubbleFX.Factory());
|
||||
this.registerParticle(ParticleType.WATER_SPLASH.getParticleID(), new EntitySplashFX.Factory());
|
||||
this.registerParticle(ParticleType.WATER_WAKE.getParticleID(), new EntityFishWakeFX.Factory());
|
||||
this.registerParticle(ParticleType.WATER_DROP.getParticleID(), new EntityDownfallFX.RainFactory());
|
||||
this.registerParticle(ParticleType.SUSPENDED.getParticleID(), new EntitySuspendFX.Factory());
|
||||
this.registerParticle(ParticleType.SUSPENDED_DEPTH.getParticleID(), new EntityAuraFX.SuspendFactory());
|
||||
this.registerParticle(ParticleType.CRIT.getParticleID(), new EntityCrit2FX.Factory());
|
||||
this.registerParticle(ParticleType.CRIT_MAGIC.getParticleID(), new EntityCrit2FX.MagicFactory());
|
||||
this.registerParticle(ParticleType.SMOKE_NORMAL.getParticleID(), new EntitySmokeFX.Factory());
|
||||
this.registerParticle(ParticleType.SMOKE_LARGE.getParticleID(), new EntityCritFX.Factory());
|
||||
this.registerParticle(ParticleType.SPELL.getParticleID(), new EntitySpellParticleFX.Factory());
|
||||
this.registerParticle(ParticleType.SPELL_INSTANT.getParticleID(), new EntitySpellParticleFX.InstantFactory());
|
||||
this.registerParticle(ParticleType.SPELL_MOB.getParticleID(), new EntitySpellParticleFX.MobFactory());
|
||||
this.registerParticle(ParticleType.SPELL_MOB_AMBIENT.getParticleID(), new EntitySpellParticleFX.AmbientMobFactory());
|
||||
this.registerParticle(ParticleType.SPELL_WITCH.getParticleID(), new EntitySpellParticleFX.WitchFactory());
|
||||
this.registerParticle(ParticleType.DRIP_WATER.getParticleID(), new EntityDropParticleFX.WaterFactory());
|
||||
this.registerParticle(ParticleType.DRIP_LAVA.getParticleID(), new EntityDropParticleFX.LavaFactory());
|
||||
// this.registerParticle(EnumParticleTypes.VILLAGER_ANGRY.getParticleID(), new EntityHeartFX.AngryVillagerFactory());
|
||||
this.registerParticle(ParticleType.GROW.getParticleID(), new EntityAuraFX.GrowFactory());
|
||||
this.registerParticle(ParticleType.TOWN_AURA.getParticleID(), new EntityAuraFX.Factory());
|
||||
this.registerParticle(ParticleType.NOTE.getParticleID(), new EntityNoteFX.Factory());
|
||||
this.registerParticle(ParticleType.PORTAL.getParticleID(), new EntityPortalFX.Factory());
|
||||
this.registerParticle(ParticleType.ENCHANTMENT_TABLE.getParticleID(), new EntityEnchantmentTableParticleFX.EnchantmentTable());
|
||||
this.registerParticle(ParticleType.FLAME.getParticleID(), new EntityFlameFX.Factory());
|
||||
this.registerParticle(ParticleType.LAVA.getParticleID(), new EntityLavaFX.Factory());
|
||||
this.registerParticle(ParticleType.FOOTSTEP.getParticleID(), new EntityFootStepFX.Factory());
|
||||
this.registerParticle(ParticleType.CLOUD.getParticleID(), new EntityCloudFX.Factory());
|
||||
this.registerParticle(ParticleType.REDSTONE.getParticleID(), new EntityReddustFX.Factory());
|
||||
this.registerParticle(ParticleType.SNOWBALL.getParticleID(), new EntityBreakingFX.SnowballFactory());
|
||||
this.registerParticle(ParticleType.SNOW_SHOVEL.getParticleID(), new EntitySnowShovelFX.Factory());
|
||||
this.registerParticle(ParticleType.SLIME.getParticleID(), new EntityBreakingFX.SlimeFactory());
|
||||
this.registerParticle(ParticleType.HEART.getParticleID(), new EntityHeartFX.Factory());
|
||||
// this.registerParticle(EnumParticleTypes.BARRIER.getParticleID(), new Barrier.Factory());
|
||||
this.registerParticle(ParticleType.ITEM_CRACK.getParticleID(), new EntityBreakingFX.Factory());
|
||||
this.registerParticle(ParticleType.BLOCK_CRACK.getParticleID(), new EntityDiggingFX.Factory());
|
||||
this.registerParticle(ParticleType.BLOCK_DUST.getParticleID(), new EntityBlockDustFX.Factory());
|
||||
this.registerParticle(ParticleType.EXPLOSION_HUGE.getParticleID(), new EntityHugeExplodeFX.Factory());
|
||||
this.registerParticle(ParticleType.EXPLOSION_LARGE.getParticleID(), new EntityLargeExplodeFX.Factory());
|
||||
this.registerParticle(ParticleType.FIREWORKS_SPARK.getParticleID(), new EntityFirework.Factory());
|
||||
this.registerParticle(ParticleType.HAIL_CORN.getParticleID(), new EntityDownfallFX.HailFactory());
|
||||
this.register(ParticleType.EXPLOSION_NORMAL, new EntityExplodeFX.Factory());
|
||||
this.register(ParticleType.WATER_BUBBLE, new EntityBubbleFX.Factory());
|
||||
this.register(ParticleType.WATER_SPLASH, new EntitySplashFX.Factory());
|
||||
this.register(ParticleType.WATER_WAKE, new EntityFishWakeFX.Factory());
|
||||
this.register(ParticleType.WATER_DROP, new EntityDownfallFX.RainFactory());
|
||||
this.register(ParticleType.SUSPENDED, new EntitySuspendFX.Factory());
|
||||
this.register(ParticleType.SUSPENDED_DEPTH, new EntityAuraFX.SuspendFactory());
|
||||
this.register(ParticleType.CRIT, new EntityCrit2FX.Factory());
|
||||
this.register(ParticleType.CRIT_MAGIC, new EntityCrit2FX.MagicFactory());
|
||||
this.register(ParticleType.SMOKE_NORMAL, new EntitySmokeFX.Factory());
|
||||
this.register(ParticleType.SMOKE_LARGE, new EntityCritFX.Factory());
|
||||
this.register(ParticleType.SPELL, new EntitySpellParticleFX.Factory());
|
||||
this.register(ParticleType.SPELL_INSTANT, new EntitySpellParticleFX.InstantFactory());
|
||||
this.register(ParticleType.SPELL_MOB, new EntitySpellParticleFX.MobFactory());
|
||||
this.register(ParticleType.SPELL_MOB_AMBIENT, new EntitySpellParticleFX.AmbientMobFactory());
|
||||
this.register(ParticleType.SPELL_WITCH, new EntitySpellParticleFX.WitchFactory());
|
||||
this.register(ParticleType.DRIP_WATER, new EntityDropParticleFX.WaterFactory());
|
||||
this.register(ParticleType.DRIP_LAVA, new EntityDropParticleFX.LavaFactory());
|
||||
this.register(ParticleType.GROW, new EntityAuraFX.GrowFactory());
|
||||
this.register(ParticleType.TOWN_AURA, new EntityAuraFX.Factory());
|
||||
this.register(ParticleType.NOTE, new EntityNoteFX.Factory());
|
||||
this.register(ParticleType.PORTAL, new EntityPortalFX.Factory());
|
||||
this.register(ParticleType.ENCHANTMENT_TABLE, new EntityEnchantmentTableParticleFX.EnchantmentTable());
|
||||
this.register(ParticleType.FLAME, new EntityFlameFX.Factory());
|
||||
this.register(ParticleType.LAVA, new EntityLavaFX.Factory());
|
||||
this.register(ParticleType.FOOTSTEP, new EntityFootStepFX.Factory());
|
||||
this.register(ParticleType.CLOUD, new EntityCloudFX.Factory());
|
||||
this.register(ParticleType.REDSTONE, new EntityReddustFX.Factory());
|
||||
this.register(ParticleType.SNOWBALL, new EntityBreakingFX.SnowballFactory());
|
||||
this.register(ParticleType.SNOW_SHOVEL, new EntitySnowShovelFX.Factory());
|
||||
this.register(ParticleType.SLIME, new EntityBreakingFX.SlimeFactory());
|
||||
this.register(ParticleType.HEART, new EntityHeartFX.Factory());
|
||||
this.register(ParticleType.ITEM_CRACK, new EntityBreakingFX.Factory());
|
||||
this.register(ParticleType.BLOCK_CRACK, new EntityDiggingFX.Factory());
|
||||
this.register(ParticleType.BLOCK_DUST, new EntityBlockDustFX.Factory());
|
||||
this.register(ParticleType.EXPLOSION_HUGE, new EntityHugeExplodeFX.Factory());
|
||||
this.register(ParticleType.EXPLOSION_LARGE, new EntityLargeExplodeFX.Factory());
|
||||
this.register(ParticleType.FIREWORKS_SPARK, new EntityFirework.Factory());
|
||||
this.register(ParticleType.HAIL_CORN, new EntityDownfallFX.HailFactory());
|
||||
}
|
||||
|
||||
public void registerParticle(int id, IParticleFactory particleFactory)
|
||||
public void register(ParticleType id, IParticleFactory factory)
|
||||
{
|
||||
this.particleTypes.put(Integer.valueOf(id), particleFactory);
|
||||
this.particleTypes.put(id, factory);
|
||||
}
|
||||
|
||||
public void emitParticleAtEntity(Entity entityIn, ParticleType particleTypes)
|
||||
|
@ -123,13 +121,13 @@ public class EffectRenderer
|
|||
* @param zSpeed Z speed of the particle
|
||||
* @param parameters Parameters for the particle (color for redstone, ...)
|
||||
*/
|
||||
public EntityFX spawnEffectParticle(int particleId, double xCoord, double yCoord, double zCoord, double xSpeed, double ySpeed, double zSpeed, int[] parameters)
|
||||
public EntityFX spawnEffectParticle(ParticleType particleId, double xCoord, double yCoord, double zCoord, double xSpeed, double ySpeed, double zSpeed, int data)
|
||||
{
|
||||
IParticleFactory iparticlefactory = (IParticleFactory)this.particleTypes.get(Integer.valueOf(particleId));
|
||||
IParticleFactory iparticlefactory = this.particleTypes.get(particleId);
|
||||
|
||||
if (iparticlefactory != null)
|
||||
{
|
||||
EntityFX entityfx = iparticlefactory.getEntityFX(particleId, this.worldObj, xCoord, yCoord, zCoord, xSpeed, ySpeed, zSpeed, parameters);
|
||||
EntityFX entityfx = iparticlefactory.getEntityFX(this.worldObj, xCoord, yCoord, zCoord, xSpeed, ySpeed, zSpeed, data);
|
||||
|
||||
if (entityfx != null)
|
||||
{
|
||||
|
|
|
@ -55,7 +55,7 @@ public class EntityAuraFX extends EntityFX
|
|||
|
||||
public static class SuspendFactory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
return new EntityAuraFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn, true);
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ public class EntityAuraFX extends EntityFX
|
|||
|
||||
public static class Factory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
return new EntityAuraFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn, false);
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ public class EntityAuraFX extends EntityFX
|
|||
|
||||
public static class GrowFactory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
EntityFX entityfx = new EntityAuraFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn, false);
|
||||
entityfx.setParticleTextureIndex(82);
|
||||
|
|
|
@ -16,9 +16,9 @@ public class EntityBlockDustFX extends EntityDiggingFX
|
|||
|
||||
public static class Factory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
State iblockstate = BlockRegistry.byId(p_178902_15_[0]);
|
||||
State iblockstate = BlockRegistry.byId(data);
|
||||
return iblockstate == null || iblockstate.getBlock().getRenderType() == -1 ? null : (new EntityBlockDustFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn, iblockstate)).calculateColor();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,15 +68,16 @@ public class EntityBreakingFX extends EntityFX
|
|||
|
||||
public static class Factory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
return new EntityBreakingFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn, ItemRegistry.byId(p_178902_15_[0]));
|
||||
Item item = ItemRegistry.byId(data);
|
||||
return item == null ? null : new EntityBreakingFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn, item);
|
||||
}
|
||||
}
|
||||
|
||||
public static class SlimeFactory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
return new EntityBreakingFX(worldIn, xCoordIn, yCoordIn, zCoordIn, Items.slime_ball);
|
||||
}
|
||||
|
@ -84,7 +85,7 @@ public class EntityBreakingFX extends EntityFX
|
|||
|
||||
public static class SnowballFactory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
return new EntityBreakingFX(worldIn, xCoordIn, yCoordIn, zCoordIn, Items.snowball);
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ public class EntityBubbleFX extends EntityFX
|
|||
|
||||
public static class Factory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
return new EntityBubbleFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ public class EntityCloudFX extends EntityFX
|
|||
|
||||
public static class Factory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
return new EntityCloudFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ public class EntityCrit2FX extends EntityFX
|
|||
|
||||
public static class Factory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
return new EntityCrit2FX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ public class EntityCrit2FX extends EntityFX
|
|||
|
||||
public static class MagicFactory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
EntityFX entityfx = new EntityCrit2FX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
|
||||
entityfx.setRBGColorF(entityfx.getRedColorF() * 0.3F, entityfx.getGreenColorF() * 0.8F, entityfx.getBlueColorF());
|
||||
|
|
|
@ -11,7 +11,7 @@ public class EntityCritFX extends EntitySmokeFX
|
|||
|
||||
public static class Factory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
return new EntityCritFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
|
||||
}
|
||||
|
|
|
@ -116,9 +116,9 @@ public class EntityDiggingFX extends EntityFX
|
|||
|
||||
public static class Factory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
State state = BlockRegistry.byId(p_178902_15_[0]);
|
||||
State state = BlockRegistry.byId(data);
|
||||
return state == null ? null : (new EntityDiggingFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn, state)).calculateColor();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ public class EntityDownfallFX extends EntityFX
|
|||
|
||||
public static class RainFactory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
return new EntityDownfallFX(worldIn, xCoordIn, yCoordIn, zCoordIn, 0, 4);
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ public class EntityDownfallFX extends EntityFX
|
|||
|
||||
public static class HailFactory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
return new EntityDownfallFX(worldIn, xCoordIn, yCoordIn, zCoordIn, 1, 4);
|
||||
}
|
||||
|
|
|
@ -142,7 +142,7 @@ public class EntityDropParticleFX extends EntityFX
|
|||
|
||||
public static class LavaFactory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
return new EntityDropParticleFX(worldIn, xCoordIn, yCoordIn, zCoordIn, Material.LAVA);
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ public class EntityDropParticleFX extends EntityFX
|
|||
|
||||
public static class WaterFactory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
return new EntityDropParticleFX(worldIn, xCoordIn, yCoordIn, zCoordIn, Material.WATER);
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ public class EntityEnchantmentTableParticleFX extends EntityFX
|
|||
|
||||
public static class EnchantmentTable implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
return new EntityEnchantmentTableParticleFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ public class EntityExplodeFX extends EntityFX
|
|||
|
||||
public static class Factory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
return new EntityExplodeFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ public class EntityFirework
|
|||
{
|
||||
public static class Factory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
EntityFirework.SparkFX entityfirework$sparkfx = new EntityFirework.SparkFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn, Client.CLIENT.effectRenderer);
|
||||
entityfirework$sparkfx.setAlphaF(0.99F);
|
||||
|
|
|
@ -48,7 +48,7 @@ public class EntityFishWakeFX extends EntityFX
|
|||
|
||||
public static class Factory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
return new EntityFishWakeFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
|
||||
}
|
||||
|
|
|
@ -92,7 +92,7 @@ public class EntityFlameFX extends EntityFX
|
|||
|
||||
public static class Factory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
return new EntityFlameFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ public class EntityFootStepFX extends EntityFX
|
|||
|
||||
public static class Factory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
return new EntityFootStepFX(Client.CLIENT.getTextureManager(), worldIn, xCoordIn, yCoordIn, zCoordIn);
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ public class EntityHeartFX extends EntityFX
|
|||
|
||||
public static class Factory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
return new EntityHeartFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ public class EntityHugeExplodeFX extends EntityFX
|
|||
|
||||
public static class Factory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
return new EntityHugeExplodeFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
|
||||
}
|
||||
|
|
|
@ -93,7 +93,7 @@ public class EntityLargeExplodeFX extends EntityFX
|
|||
|
||||
public static class Factory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
return new EntityLargeExplodeFX(Client.CLIENT.getTextureManager(), worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ public class EntityLavaFX extends EntityFX
|
|||
|
||||
public static class Factory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
return new EntityLavaFX(worldIn, xCoordIn, yCoordIn, zCoordIn);
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ public class EntityNoteFX extends EntityFX
|
|||
|
||||
public static class Factory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
return new EntityNoteFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ public class EntityParticleEmitter extends EntityFX
|
|||
final double xCoord = d3;
|
||||
final double yCoord = d4;
|
||||
final double zCoord = d5;
|
||||
((WorldClient)this.worldObj).spawnEntityFX(this.particleTypes, this.particleTypes.getShouldIgnoreRange(), xCoord, yCoord, zCoord, d0, d1 + 0.2D, d2, new int[0]);
|
||||
((WorldClient)this.worldObj).spawnEntityFX(this.particleTypes, this.particleTypes.isUnlimited(), xCoord, yCoord, zCoord, d0, d1 + 0.2D, d2, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ public class EntityPortalFX extends EntityFX
|
|||
|
||||
public static class Factory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
return new EntityPortalFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ public class EntityReddustFX extends EntityFX
|
|||
|
||||
public static class Factory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
return new EntityReddustFX(worldIn, xCoordIn, yCoordIn, zCoordIn, (float)xSpeedIn, (float)ySpeedIn, (float)zSpeedIn);
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ public class EntitySmokeFX extends EntityFX
|
|||
|
||||
public static class Factory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
return new EntitySmokeFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ public class EntitySnowShovelFX extends EntityFX
|
|||
|
||||
public static class Factory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
return new EntitySnowShovelFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ public class EntitySpellParticleFX extends EntityFX
|
|||
|
||||
public static class AmbientMobFactory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
EntityFX entityfx = new EntitySpellParticleFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
|
||||
entityfx.setAlphaF(0.15F);
|
||||
|
@ -95,7 +95,7 @@ public class EntitySpellParticleFX extends EntityFX
|
|||
|
||||
public static class Factory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
return new EntitySpellParticleFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ public class EntitySpellParticleFX extends EntityFX
|
|||
|
||||
public static class InstantFactory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
EntityFX entityfx = new EntitySpellParticleFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
|
||||
((EntitySpellParticleFX)entityfx).setBaseSpellTextureIndex(144);
|
||||
|
@ -113,7 +113,7 @@ public class EntitySpellParticleFX extends EntityFX
|
|||
|
||||
public static class MobFactory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
EntityFX entityfx = new EntitySpellParticleFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
|
||||
entityfx.setRBGColorF((float)xSpeedIn, (float)ySpeedIn, (float)zSpeedIn);
|
||||
|
@ -123,7 +123,7 @@ public class EntitySpellParticleFX extends EntityFX
|
|||
|
||||
public static class WitchFactory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
EntityFX entityfx = new EntitySpellParticleFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
|
||||
((EntitySpellParticleFX)entityfx).setBaseSpellTextureIndex(144);
|
||||
|
|
|
@ -20,7 +20,7 @@ public class EntitySplashFX extends EntityDownfallFX
|
|||
|
||||
public static class Factory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
return new EntitySplashFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ public class EntitySuspendFX extends EntityFX
|
|||
|
||||
public static class Factory implements IParticleFactory
|
||||
{
|
||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
|
||||
{
|
||||
return new EntitySuspendFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
|
||||
}
|
||||
|
|
|
@ -4,5 +4,5 @@ import common.world.World;
|
|||
|
||||
public interface IParticleFactory
|
||||
{
|
||||
EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_);
|
||||
EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data);
|
||||
}
|
||||
|
|
|
@ -424,15 +424,14 @@ public class WorldClient extends AWorldClient
|
|||
// }
|
||||
|
||||
public void spawnParticle(ParticleType particleType, double xCoord, double yCoord, double zCoord, double xOffset, double yOffset,
|
||||
double zOffset, int... data) {
|
||||
this.spawnEntityFX(particleType, particleType.getShouldIgnoreRange(), xCoord, yCoord, zCoord, xOffset, yOffset, zOffset, data);
|
||||
double zOffset, int data) {
|
||||
this.spawnEntityFX(particleType, particleType.isUnlimited(), xCoord, yCoord, zCoord, xOffset, yOffset, zOffset, data);
|
||||
}
|
||||
|
||||
public EntityFX spawnEntityFX(ParticleType particle, boolean ignoreRange, double xCoord, double yCoord, double zCoord, double xOffset, double yOffset, double zOffset, int[] parameters)
|
||||
public EntityFX spawnEntityFX(ParticleType particle, boolean ignoreRange, double xCoord, double yCoord, double zCoord, double xOffset, double yOffset, double zOffset, int data)
|
||||
{
|
||||
if (this.gm.getRenderViewEntity() != null)
|
||||
{
|
||||
int particleID = particle.getParticleID();
|
||||
// int i = this.gm.particleSetting;
|
||||
//
|
||||
// if (i == 1 && this.rand.zrange(3) == 0)
|
||||
|
@ -446,14 +445,14 @@ public class WorldClient extends AWorldClient
|
|||
|
||||
if (ignoreRange)
|
||||
{
|
||||
return this.gm.effectRenderer.spawnEffectParticle(particleID, xCoord, yCoord, zCoord, xOffset, yOffset, zOffset, parameters);
|
||||
return this.gm.effectRenderer.spawnEffectParticle(particle, xCoord, yCoord, zCoord, xOffset, yOffset, zOffset, data);
|
||||
}
|
||||
else
|
||||
{
|
||||
double d3 = 16.0D;
|
||||
if(d0 * d0 + d1 * d1 + d2 * d2 > 256.0D)
|
||||
return null;
|
||||
return this.gm.effectRenderer.spawnEffectParticle(particleID, xCoord, yCoord, zCoord, xOffset, yOffset, zOffset, parameters);
|
||||
return this.gm.effectRenderer.spawnEffectParticle(particle, xCoord, yCoord, zCoord, xOffset, yOffset, zOffset, data);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -630,7 +629,7 @@ public class WorldClient extends AWorldClient
|
|||
double d8 = (double)l * d20 + this.rand.gaussian() * 0.01D;
|
||||
double d10 = -0.03D + this.rand.gaussian() * 0.01D;
|
||||
double d12 = (double)i * d20 + this.rand.gaussian() * 0.01D;
|
||||
this.spawnEntityFX(ParticleType.SMOKE_NORMAL, ParticleType.SMOKE_NORMAL.getShouldIgnoreRange(), d21, d4, d6, d8, d10, d12, new int[0]);
|
||||
this.spawnEntityFX(ParticleType.SMOKE_NORMAL, ParticleType.SMOKE_NORMAL.isUnlimited(), d21, d4, d6, d8, d10, d12, 0);
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -653,7 +652,7 @@ public class WorldClient extends AWorldClient
|
|||
|
||||
for (int i1 = 0; i1 < 8; ++i1)
|
||||
{
|
||||
this.spawnEntityFX(ParticleType.ITEM_CRACK, ParticleType.ITEM_CRACK.getShouldIgnoreRange(), d13, d14, d16, this.rand.gaussian() * 0.15D, this.rand.doublev() * 0.2D, this.rand.gaussian() * 0.15D, new int[] {ItemRegistry.getId(Items.potion)});
|
||||
this.spawnEntityFX(ParticleType.ITEM_CRACK, ParticleType.ITEM_CRACK.isUnlimited(), d13, d14, d16, this.rand.gaussian() * 0.15D, this.rand.doublev() * 0.2D, this.rand.gaussian() * 0.15D, ItemRegistry.getId(Items.potion));
|
||||
}
|
||||
|
||||
ParticleType enumparticletypes = ParticleType.WATER_SPLASH;
|
||||
|
@ -681,7 +680,7 @@ public class WorldClient extends AWorldClient
|
|||
double d24 = Math.cos(d23) * d22;
|
||||
double d9 = 0.01D + this.rand.doublev() * 0.5D;
|
||||
double d11 = Math.sin(d23) * d22;
|
||||
EntityFX entityfx = this.spawnEntityFX(enumparticletypes, enumparticletypes.getShouldIgnoreRange(), d13 + d24 * 0.1D, d14 + 0.3D, d16 + d11 * 0.1D, d24, d9, d11, new int[0]);
|
||||
EntityFX entityfx = this.spawnEntityFX(enumparticletypes, enumparticletypes.isUnlimited(), d13 + d24 * 0.1D, d14 + 0.3D, d16 + d11 * 0.1D, d24, d9, d11, 0);
|
||||
|
||||
if (entityfx != null)
|
||||
{
|
||||
|
|
|
@ -1274,14 +1274,14 @@ public abstract class EntityNPC extends EntityLiving
|
|||
oy + this.rand.doublev() * (double)this.height,
|
||||
oz + (this.rand.doublev() - 0.5D) * (double)this.width * 2.0D, 8,
|
||||
(this.rand.floatv() - 0.5F) * 0.2F, (this.rand.floatv() - 0.5F) * 0.2F, (this.rand.floatv() - 0.5F) * 0.2F,
|
||||
0.15D);
|
||||
0.15D, 0);
|
||||
this.worldObj.playAuxSFX(1005, this.getPosition(), 0);
|
||||
((AWorldServer)this.worldObj).spawnParticle(ParticleType.PORTAL,
|
||||
this.posX + (this.rand.doublev() - 0.5D) * (double)this.width * 2.0D,
|
||||
this.posY + this.rand.doublev() * (double)this.height,
|
||||
this.posZ + (this.rand.doublev() - 0.5D) * (double)this.width * 2.0D, 8,
|
||||
(this.rand.floatv() - 0.5F) * 0.2F, (this.rand.floatv() - 0.5F) * 0.2F, (this.rand.floatv() - 0.5F) * 0.2F,
|
||||
0.15D);
|
||||
0.15D, 0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -417,8 +417,8 @@ public class EntityHook extends Entity implements IObjectData
|
|||
this.motionY -= 0.20000000298023224D;
|
||||
this.playSound(SoundEvent.SPLASH, 0.25F);
|
||||
float f8 = (float)ExtMath.floord(this.getEntityBoundingBox().minY);
|
||||
worldserver.spawnParticle(ParticleType.WATER_BUBBLE, this.posX, (double)(f8 + 1.0F), this.posZ, (int)(1.0F + this.width * 20.0F), (double)this.width, 0.0D, (double)this.width, 0.20000000298023224D);
|
||||
worldserver.spawnParticle(ParticleType.WATER_WAKE, this.posX, (double)(f8 + 1.0F), this.posZ, (int)(1.0F + this.width * 20.0F), (double)this.width, 0.0D, (double)this.width, 0.20000000298023224D);
|
||||
worldserver.spawnParticle(ParticleType.WATER_BUBBLE, this.posX, (double)(f8 + 1.0F), this.posZ, (int)(1.0F + this.width * 20.0F), (double)this.width, 0.0D, (double)this.width, 0.20000000298023224D, 0);
|
||||
worldserver.spawnParticle(ParticleType.WATER_WAKE, this.posX, (double)(f8 + 1.0F), this.posZ, (int)(1.0F + this.width * 20.0F), (double)this.width, 0.0D, (double)this.width, 0.20000000298023224D, 0);
|
||||
this.ticksCatchable = this.rand.range(10, 30);
|
||||
}
|
||||
else
|
||||
|
@ -436,13 +436,13 @@ public class EntityHook extends Entity implements IObjectData
|
|||
{
|
||||
if (this.rand.floatv() < 0.15F)
|
||||
{
|
||||
worldserver.spawnParticle(ParticleType.WATER_BUBBLE, d13, d15 - 0.10000000149011612D, d16, 1, (double)f10, 0.1D, (double)f11, 0.0D);
|
||||
worldserver.spawnParticle(ParticleType.WATER_BUBBLE, d13, d15 - 0.10000000149011612D, d16, 1, (double)f10, 0.1D, (double)f11, 0.0D, 0);
|
||||
}
|
||||
|
||||
float f3 = f10 * 0.04F;
|
||||
float f4 = f11 * 0.04F;
|
||||
worldserver.spawnParticle(ParticleType.WATER_WAKE, d13, d15, d16, 0, (double)f4, 0.01D, (double)(-f3), 1.0D);
|
||||
worldserver.spawnParticle(ParticleType.WATER_WAKE, d13, d15, d16, 0, (double)(-f4), 0.01D, (double)f3, 1.0D);
|
||||
worldserver.spawnParticle(ParticleType.WATER_WAKE, d13, d15, d16, 0, (double)f4, 0.01D, (double)(-f3), 1.0D, 0);
|
||||
worldserver.spawnParticle(ParticleType.WATER_WAKE, d13, d15, d16, 0, (double)(-f4), 0.01D, (double)f3, 1.0D, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -475,7 +475,7 @@ public class EntityHook extends Entity implements IObjectData
|
|||
|
||||
if (block == Blocks.water || block == Blocks.flowing_water)
|
||||
{
|
||||
worldserver.spawnParticle(ParticleType.WATER_SPLASH, d12, d14, d6, this.rand.range(2, 3), 0.10000000149011612D, 0.0D, 0.10000000149011612D, 0.0D);
|
||||
worldserver.spawnParticle(ParticleType.WATER_SPLASH, d12, d14, d6, this.rand.range(2, 3), 0.10000000149011612D, 0.0D, 0.10000000149011612D, 0.0D, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,119 +1,66 @@
|
|||
package common.model;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import common.util.Identifyable;
|
||||
|
||||
import common.collect.Lists;
|
||||
import common.collect.Maps;
|
||||
public enum ParticleType implements Identifyable {
|
||||
EXPLOSION_NORMAL("explode", true),
|
||||
EXPLOSION_LARGE("largeexplode", true),
|
||||
EXPLOSION_HUGE("hugeexplosion", true),
|
||||
FIREWORKS_SPARK("fireworksSpark"),
|
||||
WATER_BUBBLE("bubble"),
|
||||
WATER_SPLASH("splash"),
|
||||
WATER_WAKE("wake"),
|
||||
SUSPENDED("suspended"),
|
||||
SUSPENDED_DEPTH("depthsuspend"),
|
||||
CRIT("crit"),
|
||||
CRIT_MAGIC("magicCrit"),
|
||||
SMOKE_NORMAL("smoke"),
|
||||
SMOKE_LARGE("largesmoke"),
|
||||
SPELL("spell"),
|
||||
SPELL_INSTANT("instantSpell"),
|
||||
SPELL_MOB("mobSpell"),
|
||||
SPELL_MOB_AMBIENT("mobSpellAmbient"),
|
||||
SPELL_WITCH("witchMagic"),
|
||||
DRIP_WATER("dripWater"),
|
||||
DRIP_LAVA("dripLava"),
|
||||
GROW("grow"),
|
||||
TOWN_AURA("townaura"),
|
||||
NOTE("note"),
|
||||
PORTAL("portal"),
|
||||
ENCHANTMENT_TABLE("enchantmenttable"),
|
||||
FLAME("flame"),
|
||||
LAVA("lava"),
|
||||
FOOTSTEP("footstep"),
|
||||
CLOUD("cloud"),
|
||||
REDSTONE("reddust"),
|
||||
SNOWBALL("snowballpoof"),
|
||||
SNOW_SHOVEL("snowshovel"),
|
||||
SLIME("slime"),
|
||||
HEART("heart"),
|
||||
ITEM_CRACK("iconcrack"),
|
||||
BLOCK_CRACK("blockcrack"),
|
||||
BLOCK_DUST("blockdust"),
|
||||
WATER_DROP("droplet"),
|
||||
ITEM_TAKE("take"),
|
||||
HAIL_CORN("hail");
|
||||
|
||||
public enum ParticleType
|
||||
{
|
||||
EXPLOSION_NORMAL("explode", 0, true),
|
||||
EXPLOSION_LARGE("largeexplode", 1, true),
|
||||
EXPLOSION_HUGE("hugeexplosion", 2, true),
|
||||
FIREWORKS_SPARK("fireworksSpark", 3, false),
|
||||
WATER_BUBBLE("bubble", 4, false),
|
||||
WATER_SPLASH("splash", 5, false),
|
||||
WATER_WAKE("wake", 6, false),
|
||||
SUSPENDED("suspended", 7, false),
|
||||
SUSPENDED_DEPTH("depthsuspend", 8, false),
|
||||
CRIT("crit", 9, false),
|
||||
CRIT_MAGIC("magicCrit", 10, false),
|
||||
SMOKE_NORMAL("smoke", 11, false),
|
||||
SMOKE_LARGE("largesmoke", 12, false),
|
||||
SPELL("spell", 13, false),
|
||||
SPELL_INSTANT("instantSpell", 14, false),
|
||||
SPELL_MOB("mobSpell", 15, false),
|
||||
SPELL_MOB_AMBIENT("mobSpellAmbient", 16, false),
|
||||
SPELL_WITCH("witchMagic", 17, false),
|
||||
DRIP_WATER("dripWater", 18, false),
|
||||
DRIP_LAVA("dripLava", 19, false),
|
||||
// VILLAGER_ANGRY("angryVillager", 20, false),
|
||||
GROW("grow", 21, false),
|
||||
TOWN_AURA("townaura", 22, false),
|
||||
NOTE("note", 23, false),
|
||||
PORTAL("portal", 24, false),
|
||||
ENCHANTMENT_TABLE("enchantmenttable", 25, false),
|
||||
FLAME("flame", 26, false),
|
||||
LAVA("lava", 27, false),
|
||||
FOOTSTEP("footstep", 28, false),
|
||||
CLOUD("cloud", 29, false),
|
||||
REDSTONE("reddust", 30, false),
|
||||
SNOWBALL("snowballpoof", 31, false),
|
||||
SNOW_SHOVEL("snowshovel", 32, false),
|
||||
SLIME("slime", 33, false),
|
||||
HEART("heart", 34, false),
|
||||
// BARRIER("barrier", 35, false),
|
||||
ITEM_CRACK("iconcrack_", 36, false, true),
|
||||
BLOCK_CRACK("blockcrack_", 37, false, true),
|
||||
BLOCK_DUST("blockdust_", 38, false, true),
|
||||
WATER_DROP("droplet", 39, false),
|
||||
ITEM_TAKE("take", 40, false),
|
||||
HAIL_CORN("hail", 41, false);
|
||||
private final String name;
|
||||
private final boolean unlimited;
|
||||
|
||||
private final String particleName;
|
||||
private final int particleID;
|
||||
private final boolean shouldIgnoreRange;
|
||||
private final boolean argument;
|
||||
private static final Map<Integer, ParticleType> PARTICLES = Maps.<Integer, ParticleType>newHashMap();
|
||||
private static final String[] PARTICLE_NAMES;
|
||||
private ParticleType(String name, boolean unlimited) {
|
||||
this.name = name;
|
||||
this.unlimited = unlimited;
|
||||
}
|
||||
|
||||
private ParticleType(String particleNameIn, int particleIDIn, boolean unlimited, boolean argumentCountIn)
|
||||
{
|
||||
this.particleName = particleNameIn;
|
||||
this.particleID = particleIDIn;
|
||||
this.shouldIgnoreRange = unlimited;
|
||||
this.argument = argumentCountIn;
|
||||
}
|
||||
private ParticleType(String name) {
|
||||
this(name, false);
|
||||
}
|
||||
|
||||
private ParticleType(String particleNameIn, int particleIDIn, boolean unlimited)
|
||||
{
|
||||
this(particleNameIn, particleIDIn, unlimited, false);
|
||||
}
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public static String[] getParticleNames()
|
||||
{
|
||||
return PARTICLE_NAMES;
|
||||
}
|
||||
|
||||
public String getParticleName()
|
||||
{
|
||||
return this.particleName;
|
||||
}
|
||||
|
||||
public int getParticleID()
|
||||
{
|
||||
return this.particleID;
|
||||
}
|
||||
|
||||
public boolean hasArgument()
|
||||
{
|
||||
return this.argument;
|
||||
}
|
||||
|
||||
public boolean getShouldIgnoreRange()
|
||||
{
|
||||
return this.shouldIgnoreRange;
|
||||
}
|
||||
|
||||
public static ParticleType getParticleFromId(int particleId)
|
||||
{
|
||||
return PARTICLES.get(particleId);
|
||||
}
|
||||
|
||||
static {
|
||||
List<String> list = Lists.<String>newArrayList();
|
||||
|
||||
for (ParticleType enumparticletypes : values())
|
||||
{
|
||||
PARTICLES.put(enumparticletypes.getParticleID(), enumparticletypes);
|
||||
|
||||
if (!enumparticletypes.getParticleName().endsWith("_"))
|
||||
{
|
||||
list.add(enumparticletypes.getParticleName());
|
||||
}
|
||||
}
|
||||
|
||||
PARTICLE_NAMES = list.toArray(new String[list.size()]);
|
||||
}
|
||||
public boolean isUnlimited() {
|
||||
return this.unlimited;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,13 +45,7 @@ public class SPacketParticles implements Packet<IClientPlayer>
|
|||
*/
|
||||
public void readPacketData(PacketBuffer buf) throws IOException
|
||||
{
|
||||
this.particleType = ParticleType.getParticleFromId(buf.readInt());
|
||||
|
||||
if (this.particleType == null)
|
||||
{
|
||||
this.particleType = ParticleType.HEART; //TODO: ???
|
||||
}
|
||||
|
||||
this.particleType = buf.readEnumValue(ParticleType.class);
|
||||
this.longDistance = buf.readBoolean();
|
||||
this.xCoord = buf.readFloat();
|
||||
this.yCoord = buf.readFloat();
|
||||
|
@ -61,8 +55,7 @@ public class SPacketParticles implements Packet<IClientPlayer>
|
|||
this.zOffset = buf.readFloat();
|
||||
this.particleSpeed = buf.readFloat();
|
||||
this.particleCount = buf.readInt();
|
||||
if(this.particleType.hasArgument())
|
||||
this.particleArgument = buf.readVarInt();
|
||||
this.particleArgument = buf.readVarInt();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -70,7 +63,7 @@ public class SPacketParticles implements Packet<IClientPlayer>
|
|||
*/
|
||||
public void writePacketData(PacketBuffer buf) throws IOException
|
||||
{
|
||||
buf.writeInt(this.particleType.getParticleID());
|
||||
buf.writeEnumValue(this.particleType);
|
||||
buf.writeBoolean(this.longDistance);
|
||||
buf.writeFloat(this.xCoord);
|
||||
buf.writeFloat(this.yCoord);
|
||||
|
@ -80,8 +73,7 @@ public class SPacketParticles implements Packet<IClientPlayer>
|
|||
buf.writeFloat(this.zOffset);
|
||||
buf.writeFloat(this.particleSpeed);
|
||||
buf.writeInt(this.particleCount);
|
||||
if(this.particleType.hasArgument())
|
||||
buf.writeVarInt(this.particleArgument);
|
||||
buf.writeVarInt(this.particleArgument);
|
||||
}
|
||||
|
||||
public ParticleType getParticleType()
|
||||
|
|
|
@ -32,7 +32,7 @@ public abstract class AWorldServer extends World {
|
|||
public abstract void strikeLightning(double x, double y, double z, int color, int damage, boolean fire, EntityLiving summoner);
|
||||
public abstract void resetWeather();
|
||||
public abstract void spawnParticle(ParticleType particleType, double xCoord, double yCoord, double zCoord, int numberOfParticles, double xOffset, double yOffset,
|
||||
double zOffset, double particleSpeed, int... particleArguments);
|
||||
double zOffset, double particleSpeed, int data);
|
||||
public abstract long getSeed();
|
||||
public abstract boolean isExterminated();
|
||||
public abstract boolean exterminate();
|
||||
|
|
|
@ -171,7 +171,7 @@ public class Explosion
|
|||
worldObj.setState(blockpos, Blocks.air.getState(), 3);
|
||||
if(rand.chance(1000)) {
|
||||
worldObj.playSound(SoundEvent.EXPLODE, explosionX + x, explosionY + y, explosionZ + z, 4.0F);
|
||||
((AWorldServer)worldObj).spawnParticle(ParticleType.EXPLOSION_HUGE, explosionX + x, explosionY + y, explosionZ + z, 0, rand.gaussian() * 0.02D, rand.gaussian() * 0.02D, rand.gaussian() * 0.02D, 1.0);
|
||||
((AWorldServer)worldObj).spawnParticle(ParticleType.EXPLOSION_HUGE, explosionX + x, explosionY + y, explosionZ + z, 0, rand.gaussian() * 0.02D, rand.gaussian() * 0.02D, rand.gaussian() * 0.02D, 1.0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2089,7 +2089,12 @@ public abstract class World implements IWorldAccess {
|
|||
}
|
||||
|
||||
public void spawnParticle(ParticleType particleType, double xCoord, double yCoord, double zCoord, double xOffset, double yOffset,
|
||||
double zOffset, int... data) {
|
||||
double zOffset, int data) {
|
||||
}
|
||||
|
||||
public final void spawnParticle(ParticleType particleType, double xCoord, double yCoord, double zCoord, double xOffset, double yOffset,
|
||||
double zOffset) {
|
||||
this.spawnParticle(particleType, xCoord, yCoord, zCoord, xOffset, yOffset, zOffset, 0);
|
||||
}
|
||||
|
||||
// public Difficulty getDifficulty() {
|
||||
|
|
|
@ -1288,15 +1288,15 @@ public final class WorldServer extends AWorldServer {
|
|||
}
|
||||
|
||||
public void spawnParticle(ParticleType particleType, double xCoord, double yCoord, double zCoord, int numberOfParticles, double xOffset,
|
||||
double yOffset, double zOffset, double particleSpeed, int... particleArguments) {
|
||||
double yOffset, double zOffset, double particleSpeed, int data) {
|
||||
this.spawnParticle(particleType, false, xCoord, yCoord, zCoord, numberOfParticles, xOffset, yOffset, zOffset, particleSpeed,
|
||||
particleArguments);
|
||||
data);
|
||||
}
|
||||
|
||||
public void spawnParticle(ParticleType particleType, boolean longDistance, double xCoord, double yCoord, double zCoord,
|
||||
int numberOfParticles, double xOffset, double yOffset, double zOffset, double particleSpeed, int[] particleArguments) {
|
||||
int numberOfParticles, double xOffset, double yOffset, double zOffset, double particleSpeed, int data) {
|
||||
Packet packet = new SPacketParticles(particleType, longDistance, (float)xCoord, (float)yCoord, (float)zCoord, (float)xOffset,
|
||||
(float)yOffset, (float)zOffset, (float)particleSpeed, numberOfParticles, particleArguments.length == 0 ? 0 : particleArguments[0]);
|
||||
(float)yOffset, (float)zOffset, (float)particleSpeed, numberOfParticles, data);
|
||||
|
||||
for(int i = 0; i < this.players.size(); ++i) {
|
||||
EntityNPC entityplayermp = this.players.get(i);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue