remove old particles

This commit is contained in:
Sen 2025-07-08 18:08:51 +02:00
parent eca1f242c4
commit 874e118d9d
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
63 changed files with 154 additions and 1585 deletions

View file

@ -21,7 +21,6 @@ import client.gui.container.GuiMerchant;
import client.gui.container.GuiRepair; import client.gui.container.GuiRepair;
import client.gui.ingame.GuiSign; import client.gui.ingame.GuiSign;
import client.gui.ingame.GuiForm; import client.gui.ingame.GuiForm;
import client.renderer.particle.EntityPickupFX;
import client.renderer.texture.EntityTexManager; import client.renderer.texture.EntityTexManager;
import client.util.PlayerController; import client.util.PlayerController;
import client.world.ChunkClient; import client.world.ChunkClient;
@ -801,7 +800,6 @@ public class ClientPlayer implements IClientPlayer
this.world.playSoundAtEntity(entity, SoundEvent.POP, 0.2F); this.world.playSoundAtEntity(entity, SoundEvent.POP, 0.2F);
} }
this.gm.effectRenderer.addEffect(new EntityPickupFX(this.world, entity, entitylivingbase, 0.5F));
this.world.removeEntityFromWorld(packetIn.getCollectedItemEntityID()); this.world.removeEntityFromWorld(packetIn.getCollectedItemEntityID());
} }
} }
@ -898,7 +896,8 @@ public class ClientPlayer implements IClientPlayer
} }
else if (packetIn.getAnimationType() == 5) else if (packetIn.getAnimationType() == 5)
{ {
this.gm.effectRenderer.emitParticleAtEntity(entity, ParticleType.CRIT_MAGIC); this.gm.effectRenderer.emitParticleAtEntity(entity, ParticleType.CRIT);
this.gm.effectRenderer.emitParticleAtEntity(entity, ParticleType.CRIT);
} }
} }
} }

View file

@ -1134,7 +1134,7 @@ public class EntityRenderer {
} }
} }
if(temp < 194.0f || this.random.chance(8)) if(temp < 194.0f || this.random.chance(8))
this.gm.world.spawnParticle(temp >= 194.0f && this.random.chance(20) ? ParticleType.LAVA : ParticleType.SMOKE_NORMAL, (double)blockpos1.getX() + d3, (double)((float)blockpos1.getY() + 0.1F) - block.getBlockBoundsMinY(), (double)blockpos1.getZ() + d4, 0.0D, 0.0D, 0.0D); this.gm.world.spawnParticle(temp >= 194.0f && this.random.chance(20) ? ParticleType.LAVA : ParticleType.SMOKE, (double)blockpos1.getX() + d3, (double)((float)blockpos1.getY() + 0.1F) - block.getBlockBoundsMinY(), (double)blockpos1.getZ() + d4, 0.0D, 0.0D, 0.0D);
} }
else if (block != Blocks.air) else if (block != Blocks.air)
{ {

View file

@ -62,41 +62,22 @@ public class EffectRenderer
this.register(ParticleType.EXPLOSION_NORMAL, new EntityExplodeFX.Factory()); this.register(ParticleType.EXPLOSION_NORMAL, new EntityExplodeFX.Factory());
this.register(ParticleType.WATER_BUBBLE, new EntityBubbleFX.Factory()); this.register(ParticleType.WATER_BUBBLE, new EntityBubbleFX.Factory());
this.register(ParticleType.WATER_SPLASH, new EntitySplashFX.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.WATER_DROP, new EntityDownfallFX.RainFactory());
this.register(ParticleType.SUSPENDED, new EntitySuspendFX.Factory()); this.register(ParticleType.DEPTH, new EntityAuraFX.SuspendFactory());
this.register(ParticleType.SUSPENDED_DEPTH, new EntityAuraFX.SuspendFactory()); this.register(ParticleType.CRIT, new EntityCritFX.Factory());
this.register(ParticleType.CRIT, new EntityCrit2FX.Factory()); this.register(ParticleType.SMOKE, new EntitySmokeFX.Factory());
this.register(ParticleType.CRIT_MAGIC, new EntityCrit2FX.MagicFactory()); this.register(ParticleType.POTION, new EntitySpellParticleFX.Factory());
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.GROW, new EntityAuraFX.GrowFactory());
this.register(ParticleType.TOWN_AURA, new EntityAuraFX.Factory()); this.register(ParticleType.SPORE, new EntityAuraFX.Factory());
this.register(ParticleType.NOTE, new EntityNoteFX.Factory()); this.register(ParticleType.TELEPORT, new EntityPortalFX.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.FLAME, new EntityFlameFX.Factory());
this.register(ParticleType.LAVA, new EntityLavaFX.Factory()); this.register(ParticleType.LAVA, new EntityLavaFX.Factory());
this.register(ParticleType.FOOTSTEP, new EntityFootStepFX.Factory()); this.register(ParticleType.DUST, new EntityReddustFX.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.HEART, new EntityHeartFX.Factory());
this.register(ParticleType.ITEM_CRACK, new EntityBreakingFX.Factory()); this.register(ParticleType.ITEM_CRACK, new EntityBreakingFX.Factory());
this.register(ParticleType.BLOCK_CRACK, new EntityDiggingFX.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_HUGE, new EntityHugeExplodeFX.Factory());
this.register(ParticleType.EXPLOSION_LARGE, new EntityLargeExplodeFX.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()); this.register(ParticleType.HAIL_CORN, new EntityDownfallFX.HailFactory());
} }

View file

@ -1,25 +0,0 @@
package client.renderer.particle;
import common.init.BlockRegistry;
import common.world.State;
import common.world.World;
public class EntityBlockDustFX extends EntityDiggingFX
{
protected EntityBlockDustFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, State state)
{
super(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn, state);
this.motionX = xSpeedIn;
this.motionY = ySpeedIn;
this.motionZ = zSpeedIn;
}
public static class Factory implements IParticleFactory
{
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
{
State iblockstate = BlockRegistry.byId(data);
return iblockstate == null || iblockstate.getBlock().getRenderType() == -1 ? null : (new EntityBlockDustFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn, iblockstate)).calculateColor();
}
}
}

View file

@ -4,7 +4,6 @@ import client.Client;
import client.renderer.RenderBuffer; import client.renderer.RenderBuffer;
import common.entity.Entity; import common.entity.Entity;
import common.init.ItemRegistry; import common.init.ItemRegistry;
import common.init.Items;
import common.item.Item; import common.item.Item;
import common.world.World; import common.world.World;
@ -74,20 +73,4 @@ public class EntityBreakingFX extends EntityFX
return item == null ? null : new EntityBreakingFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn, item); return item == null ? null : new EntityBreakingFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn, item);
} }
} }
public static class SlimeFactory implements IParticleFactory
{
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);
}
}
public static class SnowballFactory implements IParticleFactory
{
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);
}
}
} }

View file

@ -1,85 +0,0 @@
package client.renderer.particle;
import client.renderer.RenderBuffer;
import common.entity.Entity;
import common.entity.npc.EntityNPC;
import common.util.ExtMath;
import common.world.World;
public class EntityCloudFX extends EntityFX
{
float field_70569_a;
protected EntityCloudFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double p_i1221_8_, double p_i1221_10_, double p_i1221_12_)
{
super(worldIn, xCoordIn, yCoordIn, zCoordIn, 0.0D, 0.0D, 0.0D);
float f = 2.5F;
this.motionX *= 0.10000000149011612D;
this.motionY *= 0.10000000149011612D;
this.motionZ *= 0.10000000149011612D;
this.motionX += p_i1221_8_;
this.motionY += p_i1221_10_;
this.motionZ += p_i1221_12_;
this.particleRed = this.particleGreen = this.particleBlue = 1.0F - (float)(Math.random() * 0.30000001192092896D);
this.particleScale *= 0.75F;
this.particleScale *= f;
this.field_70569_a = this.particleScale;
this.particleMaxAge = (int)(8.0D / (Math.random() * 0.8D + 0.3D));
this.particleMaxAge = (int)((float)this.particleMaxAge * f);
this.noClip = false;
}
/**
* Renders the particle
*/
public void renderParticle(RenderBuffer worldRendererIn, Entity entityIn, float partialTicks, float rotationX, float rotationZ, float rotationYZ, float rotationXY, float rotationXZ)
{
float f = ((float)this.particleAge + partialTicks) / (float)this.particleMaxAge * 32.0F;
f = ExtMath.clampf(f, 0.0F, 1.0F);
this.particleScale = this.field_70569_a * f;
super.renderParticle(worldRendererIn, entityIn, partialTicks, rotationX, rotationZ, rotationYZ, rotationXY, rotationXZ);
}
/**
* Called to update the entity's position/logic.
*/
public void onUpdate()
{
this.prevX = this.posX;
this.prevY = this.posY;
this.prevZ = this.posZ;
if (this.particleAge++ >= this.particleMaxAge)
{
this.setDead();
}
this.setParticleTextureIndex(7 - this.particleAge * 8 / this.particleMaxAge);
this.moveEntity(this.motionX, this.motionY, this.motionZ);
this.motionX *= 0.9599999785423279D;
this.motionY *= 0.9599999785423279D;
this.motionZ *= 0.9599999785423279D;
EntityNPC entityplayer = this.worldObj.getClosestPlayerToEntity(this, 2.0D);
if (entityplayer != null && this.posY > entityplayer.getEntityBoundingBox().minY)
{
this.posY += (entityplayer.getEntityBoundingBox().minY - this.posY) * 0.2D;
this.motionY += (entityplayer.motionY - this.motionY) * 0.2D;
this.setPosition(this.posX, this.posY, this.posZ);
}
if (this.onGround)
{
this.motionX *= 0.699999988079071D;
this.motionZ *= 0.699999988079071D;
}
}
public static class Factory implements IParticleFactory
{
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);
}
}
}

View file

@ -1,95 +0,0 @@
package client.renderer.particle;
import client.renderer.RenderBuffer;
import common.entity.Entity;
import common.util.ExtMath;
import common.world.World;
public class EntityCrit2FX extends EntityFX
{
float field_174839_a;
protected EntityCrit2FX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double p_i46284_8_, double p_i46284_10_, double p_i46284_12_)
{
this(worldIn, xCoordIn, yCoordIn, zCoordIn, p_i46284_8_, p_i46284_10_, p_i46284_12_, 1.0F);
}
protected EntityCrit2FX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double p_i46285_8_, double p_i46285_10_, double p_i46285_12_, float p_i46285_14_)
{
super(worldIn, xCoordIn, yCoordIn, zCoordIn, 0.0D, 0.0D, 0.0D);
this.motionX *= 0.10000000149011612D;
this.motionY *= 0.10000000149011612D;
this.motionZ *= 0.10000000149011612D;
this.motionX += p_i46285_8_ * 0.4D;
this.motionY += p_i46285_10_ * 0.4D;
this.motionZ += p_i46285_12_ * 0.4D;
this.particleRed = this.particleGreen = this.particleBlue = (float)(Math.random() * 0.30000001192092896D + 0.6000000238418579D);
this.particleScale *= 0.75F;
this.particleScale *= p_i46285_14_;
this.field_174839_a = this.particleScale;
this.particleMaxAge = (int)(6.0D / (Math.random() * 0.8D + 0.6D));
this.particleMaxAge = (int)((float)this.particleMaxAge * p_i46285_14_);
this.noClip = false;
this.setParticleTextureIndex(65);
this.onUpdate();
}
/**
* Renders the particle
*/
public void renderParticle(RenderBuffer worldRendererIn, Entity entityIn, float partialTicks, float rotationX, float rotationZ, float rotationYZ, float rotationXY, float rotationXZ)
{
float f = ((float)this.particleAge + partialTicks) / (float)this.particleMaxAge * 32.0F;
f = ExtMath.clampf(f, 0.0F, 1.0F);
this.particleScale = this.field_174839_a * f;
super.renderParticle(worldRendererIn, entityIn, partialTicks, rotationX, rotationZ, rotationYZ, rotationXY, rotationXZ);
}
/**
* Called to update the entity's position/logic.
*/
public void onUpdate()
{
this.prevX = this.posX;
this.prevY = this.posY;
this.prevZ = this.posZ;
if (this.particleAge++ >= this.particleMaxAge)
{
this.setDead();
}
this.moveEntity(this.motionX, this.motionY, this.motionZ);
this.particleGreen = (float)((double)this.particleGreen * 0.96D);
this.particleBlue = (float)((double)this.particleBlue * 0.9D);
this.motionX *= 0.699999988079071D;
this.motionY *= 0.699999988079071D;
this.motionZ *= 0.699999988079071D;
this.motionY -= 0.019999999552965164D;
if (this.onGround)
{
this.motionX *= 0.699999988079071D;
this.motionZ *= 0.699999988079071D;
}
}
public static class Factory implements IParticleFactory
{
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);
}
}
public static class MagicFactory implements IParticleFactory
{
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());
entityfx.nextTextureIndexX();
return entityfx;
}
}
}

View file

@ -1,12 +1,78 @@
package client.renderer.particle; package client.renderer.particle;
import client.renderer.RenderBuffer;
import common.entity.Entity;
import common.util.ExtMath;
import common.world.World; import common.world.World;
public class EntityCritFX extends EntitySmokeFX public class EntityCritFX extends EntityFX
{ {
protected EntityCritFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double p_i1201_8_, double p_i1201_10_, double p_i1201_12_) float field_174839_a;
protected EntityCritFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double p_i46284_8_, double p_i46284_10_, double p_i46284_12_)
{ {
super(worldIn, xCoordIn, yCoordIn, zCoordIn, p_i1201_8_, p_i1201_10_, p_i1201_12_, 2.5F); this(worldIn, xCoordIn, yCoordIn, zCoordIn, p_i46284_8_, p_i46284_10_, p_i46284_12_, 1.0F);
}
protected EntityCritFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double p_i46285_8_, double p_i46285_10_, double p_i46285_12_, float p_i46285_14_)
{
super(worldIn, xCoordIn, yCoordIn, zCoordIn, 0.0D, 0.0D, 0.0D);
this.motionX *= 0.10000000149011612D;
this.motionY *= 0.10000000149011612D;
this.motionZ *= 0.10000000149011612D;
this.motionX += p_i46285_8_ * 0.4D;
this.motionY += p_i46285_10_ * 0.4D;
this.motionZ += p_i46285_12_ * 0.4D;
this.particleRed = this.particleGreen = this.particleBlue = (float)(Math.random() * 0.30000001192092896D + 0.6000000238418579D);
this.particleScale *= 0.75F;
this.particleScale *= p_i46285_14_;
this.field_174839_a = this.particleScale;
this.particleMaxAge = (int)(6.0D / (Math.random() * 0.8D + 0.6D));
this.particleMaxAge = (int)((float)this.particleMaxAge * p_i46285_14_);
this.noClip = false;
this.setParticleTextureIndex(66);
this.onUpdate();
this.setRBGColorF(this.getRedColorF() * 0.3F, this.getGreenColorF() * 0.8F, this.getBlueColorF());
}
/**
* Renders the particle
*/
public void renderParticle(RenderBuffer worldRendererIn, Entity entityIn, float partialTicks, float rotationX, float rotationZ, float rotationYZ, float rotationXY, float rotationXZ)
{
float f = ((float)this.particleAge + partialTicks) / (float)this.particleMaxAge * 32.0F;
f = ExtMath.clampf(f, 0.0F, 1.0F);
this.particleScale = this.field_174839_a * f;
super.renderParticle(worldRendererIn, entityIn, partialTicks, rotationX, rotationZ, rotationYZ, rotationXY, rotationXZ);
}
/**
* Called to update the entity's position/logic.
*/
public void onUpdate()
{
this.prevX = this.posX;
this.prevY = this.posY;
this.prevZ = this.posZ;
if (this.particleAge++ >= this.particleMaxAge)
{
this.setDead();
}
this.moveEntity(this.motionX, this.motionY, this.motionZ);
this.particleGreen = (float)((double)this.particleGreen * 0.96D);
this.particleBlue = (float)((double)this.particleBlue * 0.9D);
this.motionX *= 0.699999988079071D;
this.motionY *= 0.699999988079071D;
this.motionZ *= 0.699999988079071D;
this.motionY -= 0.019999999552965164D;
if (this.onGround)
{
this.motionX *= 0.699999988079071D;
this.motionZ *= 0.699999988079071D;
}
} }
public static class Factory implements IParticleFactory public static class Factory implements IParticleFactory

View file

@ -1,158 +0,0 @@
package client.renderer.particle;
import common.block.Material;
import common.block.liquid.BlockLiquid;
import common.model.ParticleType;
import common.util.BlockPos;
import common.util.ExtMath;
import common.world.State;
import common.world.World;
public class EntityDropParticleFX extends EntityFX
{
/** the material type for dropped items/blocks */
private Material materialType;
/** The height of the current bob */
private int bobTimer;
protected EntityDropParticleFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, Material p_i1203_8_)
{
super(worldIn, xCoordIn, yCoordIn, zCoordIn, 0.0D, 0.0D, 0.0D);
this.motionX = this.motionY = this.motionZ = 0.0D;
if (p_i1203_8_ == Material.WATER)
{
this.particleRed = 0.0F;
this.particleGreen = 0.0F;
this.particleBlue = 1.0F;
}
else
{
this.particleRed = 1.0F;
this.particleGreen = 0.0F;
this.particleBlue = 0.0F;
}
this.setParticleTextureIndex(113);
this.setSize(0.01F, 0.01F);
this.particleGravity = 0.06F;
this.materialType = p_i1203_8_;
this.bobTimer = 40;
this.particleMaxAge = (int)(64.0D / (Math.random() * 0.8D + 0.2D));
this.motionX = this.motionY = this.motionZ = 0.0D;
}
public int getBrightnessForRender(float partialTicks)
{
return this.materialType == Material.WATER ? super.getBrightnessForRender(partialTicks) : 257;
}
/**
* Gets how bright this entity is.
*/
public float getBrightness(float partialTicks)
{
return this.materialType == Material.WATER ? super.getBrightness(partialTicks) : 1.0F;
}
/**
* Called to update the entity's position/logic.
*/
public void onUpdate()
{
this.prevX = this.posX;
this.prevY = this.posY;
this.prevZ = this.posZ;
if (this.materialType == Material.WATER)
{
this.particleRed = 0.2F;
this.particleGreen = 0.3F;
this.particleBlue = 1.0F;
}
else
{
this.particleRed = 1.0F;
this.particleGreen = 16.0F / (float)(40 - this.bobTimer + 16);
this.particleBlue = 4.0F / (float)(40 - this.bobTimer + 8);
}
this.motionY -= (double)this.particleGravity;
if (this.bobTimer-- > 0)
{
this.motionX *= 0.02D;
this.motionY *= 0.02D;
this.motionZ *= 0.02D;
this.setParticleTextureIndex(113);
}
else
{
this.setParticleTextureIndex(112);
}
this.moveEntity(this.motionX, this.motionY, this.motionZ);
this.motionX *= 0.9800000190734863D;
this.motionY *= 0.9800000190734863D;
this.motionZ *= 0.9800000190734863D;
if (this.particleMaxAge-- <= 0)
{
this.setDead();
}
if (this.onGround)
{
if (this.materialType == Material.WATER)
{
this.setDead();
this.worldObj.spawnParticle(ParticleType.WATER_SPLASH, this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
}
else
{
this.setParticleTextureIndex(114);
}
this.motionX *= 0.699999988079071D;
this.motionZ *= 0.699999988079071D;
}
BlockPos blockpos = new BlockPos(this);
State iblockstate = this.worldObj.getState(blockpos);
Material material = iblockstate.getBlock().getMaterial();
if (material.isLiquid() || material.isSolid())
{
double d0 = 0.0D;
if (iblockstate.getBlock() instanceof BlockLiquid)
{
d0 = (double)BlockLiquid.getLiquidHeightPercent(((Integer)iblockstate.getValue(BlockLiquid.LEVEL)).intValue());
}
double d1 = (double)(ExtMath.floord(this.posY) + 1) - d0;
if (this.posY < d1)
{
this.setDead();
}
}
}
public static class LavaFactory implements IParticleFactory
{
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);
}
}
public static class WaterFactory implements IParticleFactory
{
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);
}
}
}

View file

@ -1,94 +0,0 @@
package client.renderer.particle;
import common.world.World;
public class EntityEnchantmentTableParticleFX extends EntityFX
{
private float field_70565_a;
private double coordX;
private double coordY;
private double coordZ;
protected EntityEnchantmentTableParticleFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn)
{
super(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
this.motionX = xSpeedIn;
this.motionY = ySpeedIn;
this.motionZ = zSpeedIn;
this.coordX = xCoordIn;
this.coordY = yCoordIn;
this.coordZ = zCoordIn;
this.posX = this.prevX = xCoordIn + xSpeedIn;
this.posY = this.prevY = yCoordIn + ySpeedIn;
this.posZ = this.prevZ = zCoordIn + zSpeedIn;
float f = this.rand.floatv() * 0.6F + 0.4F;
this.field_70565_a = this.particleScale = this.rand.floatv() * 0.5F + 0.2F;
this.particleRed = this.particleGreen = this.particleBlue = 1.0F * f;
this.particleGreen *= 0.9F;
this.particleRed *= 0.9F;
this.particleMaxAge = (int)(Math.random() * 10.0D) + 30;
this.noClip = true;
this.setParticleTextureIndex((int)(Math.random() * 26.0D + 1.0D + 224.0D));
}
public int getBrightnessForRender(float partialTicks)
{
int i = super.getBrightnessForRender(partialTicks);
float f = (float)this.particleAge / (float)this.particleMaxAge;
f = f * f;
f = f * f;
int j = i & 255;
int k = i >> 16 & 255;
k = k + (int)(f * 15.0F * 16.0F);
if (k > 240)
{
k = 240;
}
return j | k << 16;
}
/**
* Gets how bright this entity is.
*/
public float getBrightness(float partialTicks)
{
float f = super.getBrightness(partialTicks);
float f1 = (float)this.particleAge / (float)this.particleMaxAge;
f1 = f1 * f1;
f1 = f1 * f1;
return f * (1.0F - f1) + f1;
}
/**
* Called to update the entity's position/logic.
*/
public void onUpdate()
{
this.prevX = this.posX;
this.prevY = this.posY;
this.prevZ = this.posZ;
float f = (float)this.particleAge / (float)this.particleMaxAge;
f = 1.0F - f;
float f1 = 1.0F - f;
f1 = f1 * f1;
f1 = f1 * f1;
this.posX = this.coordX + this.motionX * (double)f;
this.posY = this.coordY + this.motionY * (double)f - (double)(f1 * 1.2F);
this.posZ = this.coordZ + this.motionZ * (double)f;
if (this.particleAge++ >= this.particleMaxAge)
{
this.setDead();
}
}
public static class EnchantmentTable implements IParticleFactory
{
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);
}
}
}

View file

@ -1,158 +0,0 @@
package client.renderer.particle;
import client.Client;
import client.renderer.RenderBuffer;
import common.entity.Entity;
import common.util.BoundingBox;
import common.util.ExtMath;
import common.world.World;
public class EntityFirework
{
public static class Factory implements IParticleFactory
{
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);
return entityfirework$sparkfx;
}
}
public static class OverlayFX extends EntityFX
{
protected OverlayFX(World p_i46466_1_, double p_i46466_2_, double p_i46466_4_, double p_i46466_6_)
{
super(p_i46466_1_, p_i46466_2_, p_i46466_4_, p_i46466_6_);
this.particleMaxAge = 4;
}
public void renderParticle(RenderBuffer worldRendererIn, Entity entityIn, float partialTicks, float rotationX, float rotationZ, float rotationYZ, float rotationXY, float rotationXZ)
{
float f = 0.25F;
float f1 = 0.5F;
float f2 = 0.125F;
float f3 = 0.375F;
float f4 = 7.1F * ExtMath.sin(((float)this.particleAge + partialTicks - 1.0F) * 0.25F * (float)Math.PI);
this.particleAlpha = 0.6F - ((float)this.particleAge + partialTicks - 1.0F) * 0.25F * 0.5F;
float f5 = (float)(this.prevX + (this.posX - this.prevX) * (double)partialTicks - interpPosX);
float f6 = (float)(this.prevY + (this.posY - this.prevY) * (double)partialTicks - interpPosY);
float f7 = (float)(this.prevZ + (this.posZ - this.prevZ) * (double)partialTicks - interpPosZ);
int i = this.getBrightnessForRender(partialTicks);
int j = i >> 16 & 65535;
int k = i & 65535;
worldRendererIn.pos((double)(f5 - rotationX * f4 - rotationXY * f4), (double)(f6 - rotationZ * f4), (double)(f7 - rotationYZ * f4 - rotationXZ * f4)).tex(0.5D, 0.375D).color(this.particleRed, this.particleGreen, this.particleBlue, this.particleAlpha).lightmap(j, k).endVertex();
worldRendererIn.pos((double)(f5 - rotationX * f4 + rotationXY * f4), (double)(f6 + rotationZ * f4), (double)(f7 - rotationYZ * f4 + rotationXZ * f4)).tex(0.5D, 0.125D).color(this.particleRed, this.particleGreen, this.particleBlue, this.particleAlpha).lightmap(j, k).endVertex();
worldRendererIn.pos((double)(f5 + rotationX * f4 + rotationXY * f4), (double)(f6 + rotationZ * f4), (double)(f7 + rotationYZ * f4 + rotationXZ * f4)).tex(0.25D, 0.125D).color(this.particleRed, this.particleGreen, this.particleBlue, this.particleAlpha).lightmap(j, k).endVertex();
worldRendererIn.pos((double)(f5 + rotationX * f4 - rotationXY * f4), (double)(f6 - rotationZ * f4), (double)(f7 + rotationYZ * f4 - rotationXZ * f4)).tex(0.25D, 0.375D).color(this.particleRed, this.particleGreen, this.particleBlue, this.particleAlpha).lightmap(j, k).endVertex();
}
}
public static class SparkFX extends EntityFX
{
private int baseTextureIndex = 160;
private boolean trail;
private boolean twinkle;
private final EffectRenderer field_92047_az;
private float fadeColourRed;
private float fadeColourGreen;
private float fadeColourBlue;
private boolean hasFadeColour;
public SparkFX(World p_i46465_1_, double p_i46465_2_, double p_i46465_4_, double p_i46465_6_, double p_i46465_8_, double p_i46465_10_, double p_i46465_12_, EffectRenderer p_i46465_14_)
{
super(p_i46465_1_, p_i46465_2_, p_i46465_4_, p_i46465_6_);
this.motionX = p_i46465_8_;
this.motionY = p_i46465_10_;
this.motionZ = p_i46465_12_;
this.field_92047_az = p_i46465_14_;
this.particleScale *= 0.75F;
this.particleMaxAge = 48 + this.rand.zrange(12);
this.noClip = false;
}
public BoundingBox getCollisionBoundingBox()
{
return null;
}
public boolean canBePushed()
{
return false;
}
public void renderParticle(RenderBuffer worldRendererIn, Entity entityIn, float partialTicks, float rotationX, float rotationZ, float rotationYZ, float rotationXY, float rotationXZ)
{
if (!this.twinkle || this.particleAge < this.particleMaxAge / 3 || (this.particleAge + this.particleMaxAge) / 3 % 2 == 0)
{
super.renderParticle(worldRendererIn, entityIn, partialTicks, rotationX, rotationZ, rotationYZ, rotationXY, rotationXZ);
}
}
public void onUpdate()
{
this.prevX = this.posX;
this.prevY = this.posY;
this.prevZ = this.posZ;
if (this.particleAge++ >= this.particleMaxAge)
{
this.setDead();
}
if (this.particleAge > this.particleMaxAge / 2)
{
this.setAlphaF(1.0F - ((float)this.particleAge - (float)(this.particleMaxAge / 2)) / (float)this.particleMaxAge);
if (this.hasFadeColour)
{
this.particleRed += (this.fadeColourRed - this.particleRed) * 0.2F;
this.particleGreen += (this.fadeColourGreen - this.particleGreen) * 0.2F;
this.particleBlue += (this.fadeColourBlue - this.particleBlue) * 0.2F;
}
}
this.setParticleTextureIndex(this.baseTextureIndex + (7 - this.particleAge * 8 / this.particleMaxAge));
this.motionY -= 0.004D;
this.moveEntity(this.motionX, this.motionY, this.motionZ);
this.motionX *= 0.9100000262260437D;
this.motionY *= 0.9100000262260437D;
this.motionZ *= 0.9100000262260437D;
if (this.onGround)
{
this.motionX *= 0.699999988079071D;
this.motionZ *= 0.699999988079071D;
}
if (this.trail && this.particleAge < this.particleMaxAge / 2 && (this.particleAge + this.particleMaxAge) % 2 == 0)
{
EntityFirework.SparkFX entityfirework$sparkfx = new EntityFirework.SparkFX(this.worldObj, this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D, this.field_92047_az);
entityfirework$sparkfx.setAlphaF(0.99F);
entityfirework$sparkfx.setRBGColorF(this.particleRed, this.particleGreen, this.particleBlue);
entityfirework$sparkfx.particleAge = entityfirework$sparkfx.particleMaxAge / 2;
if (this.hasFadeColour)
{
entityfirework$sparkfx.hasFadeColour = true;
entityfirework$sparkfx.fadeColourRed = this.fadeColourRed;
entityfirework$sparkfx.fadeColourGreen = this.fadeColourGreen;
entityfirework$sparkfx.fadeColourBlue = this.fadeColourBlue;
}
entityfirework$sparkfx.twinkle = this.twinkle;
this.field_92047_az.addEffect(entityfirework$sparkfx);
}
}
public int getBrightnessForRender(float partialTicks)
{
return 15728880;
}
public float getBrightness(float partialTicks)
{
return 1.0F;
}
}
}

View file

@ -1,56 +0,0 @@
package client.renderer.particle;
import common.world.World;
public class EntityFishWakeFX extends EntityFX
{
protected EntityFishWakeFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double p_i45073_8_, double p_i45073_10_, double p_i45073_12_)
{
super(worldIn, xCoordIn, yCoordIn, zCoordIn, 0.0D, 0.0D, 0.0D);
this.motionX *= 0.30000001192092896D;
this.motionY = Math.random() * 0.20000000298023224D + 0.10000000149011612D;
this.motionZ *= 0.30000001192092896D;
this.particleRed = 1.0F;
this.particleGreen = 1.0F;
this.particleBlue = 1.0F;
this.setParticleTextureIndex(19);
this.setSize(0.01F, 0.01F);
this.particleMaxAge = (int)(8.0D / (Math.random() * 0.8D + 0.2D));
this.particleGravity = 0.0F;
this.motionX = p_i45073_8_;
this.motionY = p_i45073_10_;
this.motionZ = p_i45073_12_;
}
/**
* Called to update the entity's position/logic.
*/
public void onUpdate()
{
this.prevX = this.posX;
this.prevY = this.posY;
this.prevZ = this.posZ;
this.motionY -= (double)this.particleGravity;
this.moveEntity(this.motionX, this.motionY, this.motionZ);
this.motionX *= 0.9800000190734863D;
this.motionY *= 0.9800000190734863D;
this.motionZ *= 0.9800000190734863D;
int i = 60 - this.particleMaxAge;
float f = (float)i * 0.001F;
this.setSize(f, f);
this.setParticleTextureIndex(19 + i % 4);
if (this.particleMaxAge-- <= 0)
{
this.setDead();
}
}
public static class Factory implements IParticleFactory
{
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);
}
}
}

View file

@ -1,94 +0,0 @@
package client.renderer.particle;
import org.lwjgl.opengl.GL11;
import client.Client;
import client.renderer.DefaultVertexFormats;
import client.renderer.GlState;
import client.renderer.RenderBuffer;
import client.renderer.Tessellator;
import client.renderer.texture.TextureManager;
import common.entity.Entity;
import common.util.BlockPos;
import common.world.World;
public class EntityFootStepFX extends EntityFX
{
private int footstepAge;
private int footstepMaxAge;
private TextureManager currentFootSteps;
protected EntityFootStepFX(TextureManager currentFootStepsIn, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn)
{
super(worldIn, xCoordIn, yCoordIn, zCoordIn, 0.0D, 0.0D, 0.0D);
this.currentFootSteps = currentFootStepsIn;
this.motionX = this.motionY = this.motionZ = 0.0D;
this.footstepMaxAge = 200;
}
/**
* Renders the particle
*/
public void renderParticle(RenderBuffer worldRendererIn, Entity entityIn, float partialTicks, float rotationX, float rotationZ, float rotationYZ, float rotationXY, float rotationXZ)
{
double u = 2.0F / 16.0F;
double u1 = u + 0.0624375F;
double u2 = 6.0F / 16.0F;
double u3 = u2 + 0.0624375F;
float f = ((float)this.footstepAge + partialTicks) / (float)this.footstepMaxAge;
f = f * f;
float f1 = 2.0F - f * 2.0F;
if (f1 > 1.0F)
{
f1 = 1.0F;
}
f1 = f1 * 0.2F;
GlState.disableLighting();
float f2 = 0.125F;
float f3 = (float)(this.posX - interpPosX);
float f4 = (float)(this.posY - interpPosY);
float f5 = (float)(this.posZ - interpPosZ);
float f6 = this.worldObj.getLightBrightness(new BlockPos(this));
this.currentFootSteps.bindTexture(EffectRenderer.particleTextures);
GlState.enableBlend();
GlState.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
worldRendererIn.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR);
worldRendererIn.pos((double)(f3 - 0.125F), (double)f4, (double)(f5 + 0.125F)).tex(u1, u3).color(f6, f6, f6, f1).endVertex();
worldRendererIn.pos((double)(f3 + 0.125F), (double)f4, (double)(f5 + 0.125F)).tex(u1, u2).color(f6, f6, f6, f1).endVertex();
worldRendererIn.pos((double)(f3 + 0.125F), (double)f4, (double)(f5 - 0.125F)).tex(u, u2).color(f6, f6, f6, f1).endVertex();
worldRendererIn.pos((double)(f3 - 0.125F), (double)f4, (double)(f5 - 0.125F)).tex(u, u3).color(f6, f6, f6, f1).endVertex();
// Tessellator.getInstance();
Tessellator.draw();
GlState.disableBlend();
GlState.enableLighting();
}
/**
* Called to update the entity's position/logic.
*/
public void onUpdate()
{
++this.footstepAge;
if (this.footstepAge == this.footstepMaxAge)
{
this.setDead();
}
}
public int getFXLayer()
{
return 3;
}
public static class Factory implements IParticleFactory
{
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);
}
}
}

View file

@ -71,7 +71,7 @@ public class EntityLavaFX extends EntityFX
if (this.rand.floatv() > f) if (this.rand.floatv() > f)
{ {
this.worldObj.spawnParticle(ParticleType.SMOKE_NORMAL, this.posX, this.posY, this.posZ, this.motionX, this.motionY, this.motionZ); this.worldObj.spawnParticle(ParticleType.SMOKE, this.posX, this.posY, this.posZ, this.motionX, this.motionY, this.motionZ);
} }
this.motionY -= 0.03D; this.motionY -= 0.03D;

View file

@ -1,86 +0,0 @@
package client.renderer.particle;
import client.renderer.RenderBuffer;
import common.entity.Entity;
import common.util.ExtMath;
import common.world.World;
public class EntityNoteFX extends EntityFX
{
float noteParticleScale;
protected EntityNoteFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double p_i46353_8_, double p_i46353_10_, double p_i46353_12_)
{
this(worldIn, xCoordIn, yCoordIn, zCoordIn, p_i46353_8_, p_i46353_10_, p_i46353_12_, 2.0F);
}
protected EntityNoteFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double p_i1217_8_, double p_i1217_10_, double p_i1217_12_, float p_i1217_14_)
{
super(worldIn, xCoordIn, yCoordIn, zCoordIn, 0.0D, 0.0D, 0.0D);
this.motionX *= 0.009999999776482582D;
this.motionY *= 0.009999999776482582D;
this.motionZ *= 0.009999999776482582D;
this.motionY += 0.2D;
this.particleRed = ExtMath.sin(((float)p_i1217_8_ + 0.0F) * (float)Math.PI * 2.0F) * 0.65F + 0.35F;
this.particleGreen = ExtMath.sin(((float)p_i1217_8_ + 0.33333334F) * (float)Math.PI * 2.0F) * 0.65F + 0.35F;
this.particleBlue = ExtMath.sin(((float)p_i1217_8_ + 0.6666667F) * (float)Math.PI * 2.0F) * 0.65F + 0.35F;
this.particleScale *= 0.75F;
this.particleScale *= p_i1217_14_;
this.noteParticleScale = this.particleScale;
this.particleMaxAge = 6;
this.noClip = false;
this.setParticleTextureIndex(64);
}
/**
* Renders the particle
*/
public void renderParticle(RenderBuffer worldRendererIn, Entity entityIn, float partialTicks, float rotationX, float rotationZ, float rotationYZ, float rotationXY, float rotationXZ)
{
float f = ((float)this.particleAge + partialTicks) / (float)this.particleMaxAge * 32.0F;
f = ExtMath.clampf(f, 0.0F, 1.0F);
this.particleScale = this.noteParticleScale * f;
super.renderParticle(worldRendererIn, entityIn, partialTicks, rotationX, rotationZ, rotationYZ, rotationXY, rotationXZ);
}
/**
* Called to update the entity's position/logic.
*/
public void onUpdate()
{
this.prevX = this.posX;
this.prevY = this.posY;
this.prevZ = this.posZ;
if (this.particleAge++ >= this.particleMaxAge)
{
this.setDead();
}
this.moveEntity(this.motionX, this.motionY, this.motionZ);
if (this.posY == this.prevY)
{
this.motionX *= 1.1D;
this.motionZ *= 1.1D;
}
this.motionX *= 0.6600000262260437D;
this.motionY *= 0.6600000262260437D;
this.motionZ *= 0.6600000262260437D;
if (this.onGround)
{
this.motionX *= 0.699999988079071D;
this.motionZ *= 0.699999988079071D;
}
}
public static class Factory implements IParticleFactory
{
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);
}
}
}

View file

@ -1,74 +0,0 @@
package client.renderer.particle;
import org.lwjgl.opengl.GL13;
import client.Client;
import client.renderer.GlState;
import client.renderer.RenderBuffer;
import client.renderer.entity.RenderManager;
import common.entity.Entity;
import common.world.World;
public class EntityPickupFX extends EntityFX
{
private Entity field_174840_a;
private Entity field_174843_ax;
private int age;
private int maxAge;
private float field_174841_aA;
private RenderManager field_174842_aB = Client.CLIENT.getRenderManager();
public EntityPickupFX(World worldIn, Entity p_i1233_2_, Entity p_i1233_3_, float p_i1233_4_)
{
super(worldIn, p_i1233_2_.posX, p_i1233_2_.posY, p_i1233_2_.posZ, p_i1233_2_.motionX, p_i1233_2_.motionY, p_i1233_2_.motionZ);
this.field_174840_a = p_i1233_2_;
this.field_174843_ax = p_i1233_3_;
this.maxAge = 3;
this.field_174841_aA = p_i1233_4_;
}
/**
* Renders the particle
*/
public void renderParticle(RenderBuffer worldRendererIn, Entity entityIn, float partialTicks, float rotationX, float rotationZ, float rotationYZ, float rotationXY, float rotationXZ)
{
float f = ((float)this.age + partialTicks) / (float)this.maxAge;
f = f * f;
double d0 = this.field_174840_a.posX;
double d1 = this.field_174840_a.posY;
double d2 = this.field_174840_a.posZ;
double d3 = this.field_174843_ax.lastTickPosX + (this.field_174843_ax.posX - this.field_174843_ax.lastTickPosX) * (double)partialTicks;
double d4 = this.field_174843_ax.lastTickPosY + (this.field_174843_ax.posY - this.field_174843_ax.lastTickPosY) * (double)partialTicks + (double)this.field_174841_aA;
double d5 = this.field_174843_ax.lastTickPosZ + (this.field_174843_ax.posZ - this.field_174843_ax.lastTickPosZ) * (double)partialTicks;
double d6 = d0 + (d3 - d0) * (double)f;
double d7 = d1 + (d4 - d1) * (double)f;
double d8 = d2 + (d5 - d2) * (double)f;
int i = this.getBrightnessForRender(partialTicks);
int j = i % 65536;
int k = i / 65536;
GL13.glMultiTexCoord2f(GL13.GL_TEXTURE1, (float)j / 1.0F, (float)k / 1.0F);
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
d6 = d6 - interpPosX;
d7 = d7 - interpPosY;
d8 = d8 - interpPosZ;
this.field_174842_aB.renderEntity(this.field_174840_a, (double)((float)d6), (double)((float)d7), (double)((float)d8), partialTicks);
}
/**
* Called to update the entity's position/logic.
*/
public void onUpdate()
{
++this.age;
if (this.age == this.maxAge)
{
this.setDead();
}
}
public int getFXLayer()
{
return 3;
}
}

View file

@ -1,81 +0,0 @@
package client.renderer.particle;
import client.renderer.RenderBuffer;
import common.entity.Entity;
import common.util.ExtMath;
import common.world.World;
public class EntitySnowShovelFX extends EntityFX
{
float snowDigParticleScale;
protected EntitySnowShovelFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn)
{
this(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn, 1.0F);
}
protected EntitySnowShovelFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, float p_i1228_14_)
{
super(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
this.motionX *= 0.10000000149011612D;
this.motionY *= 0.10000000149011612D;
this.motionZ *= 0.10000000149011612D;
this.motionX += xSpeedIn;
this.motionY += ySpeedIn;
this.motionZ += zSpeedIn;
this.particleRed = this.particleGreen = this.particleBlue = 1.0F - (float)(Math.random() * 0.30000001192092896D);
this.particleScale *= 0.75F;
this.particleScale *= p_i1228_14_;
this.snowDigParticleScale = this.particleScale;
this.particleMaxAge = (int)(8.0D / (Math.random() * 0.8D + 0.2D));
this.particleMaxAge = (int)((float)this.particleMaxAge * p_i1228_14_);
this.noClip = false;
}
/**
* Renders the particle
*/
public void renderParticle(RenderBuffer worldRendererIn, Entity entityIn, float partialTicks, float rotationX, float rotationZ, float rotationYZ, float rotationXY, float rotationXZ)
{
float f = ((float)this.particleAge + partialTicks) / (float)this.particleMaxAge * 32.0F;
f = ExtMath.clampf(f, 0.0F, 1.0F);
this.particleScale = this.snowDigParticleScale * f;
super.renderParticle(worldRendererIn, entityIn, partialTicks, rotationX, rotationZ, rotationYZ, rotationXY, rotationXZ);
}
/**
* Called to update the entity's position/logic.
*/
public void onUpdate()
{
this.prevX = this.posX;
this.prevY = this.posY;
this.prevZ = this.posZ;
if (this.particleAge++ >= this.particleMaxAge)
{
this.setDead();
}
this.setParticleTextureIndex(7 - this.particleAge * 8 / this.particleMaxAge);
this.motionY -= 0.03D;
this.moveEntity(this.motionX, this.motionY, this.motionZ);
this.motionX *= 0.9900000095367432D;
this.motionY *= 0.9900000095367432D;
this.motionZ *= 0.9900000095367432D;
if (this.onGround)
{
this.motionX *= 0.699999988079071D;
this.motionZ *= 0.699999988079071D;
}
}
public static class Factory implements IParticleFactory
{
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);
}
}
}

View file

@ -10,9 +10,6 @@ public class EntitySpellParticleFX extends EntityFX
{ {
private static final Random RANDOM = new Random(); private static final Random RANDOM = new Random();
/** Base spell texture index */
private int baseSpellTextureIndex = 128;
protected EntitySpellParticleFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double p_i1229_8_, double p_i1229_10_, double p_i1229_12_) protected EntitySpellParticleFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double p_i1229_8_, double p_i1229_10_, double p_i1229_12_)
{ {
super(worldIn, xCoordIn, yCoordIn, zCoordIn, 0.5D - RANDOM.doublev(), p_i1229_10_, 0.5D - RANDOM.doublev()); super(worldIn, xCoordIn, yCoordIn, zCoordIn, 0.5D - RANDOM.doublev(), p_i1229_10_, 0.5D - RANDOM.doublev());
@ -53,7 +50,7 @@ public class EntitySpellParticleFX extends EntityFX
this.setDead(); this.setDead();
} }
this.setParticleTextureIndex(this.baseSpellTextureIndex + (7 - this.particleAge * 8 / this.particleMaxAge)); this.setParticleTextureIndex(144 + (7 - this.particleAge * 8 / this.particleMaxAge));
this.motionY += 0.004D; this.motionY += 0.004D;
this.moveEntity(this.motionX, this.motionY, this.motionZ); this.moveEntity(this.motionX, this.motionY, this.motionZ);
@ -74,25 +71,6 @@ public class EntitySpellParticleFX extends EntityFX
} }
} }
/**
* Sets the base spell texture index
*/
public void setBaseSpellTextureIndex(int baseSpellTextureIndexIn)
{
this.baseSpellTextureIndex = baseSpellTextureIndexIn;
}
public static class AmbientMobFactory implements IParticleFactory
{
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);
entityfx.setRBGColorF((float)xSpeedIn, (float)ySpeedIn, (float)zSpeedIn);
return entityfx;
}
}
public static class Factory implements IParticleFactory public static class Factory implements IParticleFactory
{ {
public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data) public EntityFX getEntityFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int data)
@ -100,36 +78,4 @@ public class EntitySpellParticleFX extends EntityFX
return new EntitySpellParticleFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn); return new EntitySpellParticleFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
} }
} }
public static class InstantFactory implements IParticleFactory
{
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);
return entityfx;
}
}
public static class MobFactory implements IParticleFactory
{
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);
return entityfx;
}
}
public static class WitchFactory implements IParticleFactory
{
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);
float f = worldIn.rand.floatv() * 0.5F + 0.35F;
entityfx.setRBGColorF(1.0F * f, 0.0F * f, 1.0F * f);
return entityfx;
}
}
} }

View file

@ -1,52 +0,0 @@
package client.renderer.particle;
import common.block.Material;
import common.util.BlockPos;
import common.world.World;
public class EntitySuspendFX extends EntityFX
{
protected EntitySuspendFX(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn)
{
super(worldIn, xCoordIn, yCoordIn - 0.125D, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
this.particleRed = 0.4F;
this.particleGreen = 0.4F;
this.particleBlue = 0.7F;
this.setParticleTextureIndex(0);
this.setSize(0.01F, 0.01F);
this.particleScale *= this.rand.floatv() * 0.6F + 0.2F;
this.motionX = xSpeedIn * 0.0D;
this.motionY = ySpeedIn * 0.0D;
this.motionZ = zSpeedIn * 0.0D;
this.particleMaxAge = (int)(16.0D / (Math.random() * 0.8D + 0.2D));
}
/**
* Called to update the entity's position/logic.
*/
public void onUpdate()
{
this.prevX = this.posX;
this.prevY = this.posY;
this.prevZ = this.posZ;
this.moveEntity(this.motionX, this.motionY, this.motionZ);
if (this.worldObj.getState(new BlockPos(this)).getBlock().getMaterial() != Material.WATER)
{
this.setDead();
}
if (this.particleMaxAge-- <= 0)
{
this.setDead();
}
}
public static class Factory implements IParticleFactory
{
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);
}
}
}

View file

@ -299,7 +299,7 @@ public class WorldClient extends AWorldClient
float x = ((float)posX) + (rand.floatv() - rand.floatv() - 0.5f) * 32.0f; float x = ((float)posX) + (rand.floatv() - rand.floatv() - 0.5f) * 32.0f;
float y = -64.0f + rand.floatv() * 65.0f; // * 68.0f; float y = -64.0f + rand.floatv() * 65.0f; // * 68.0f;
float z = ((float)posZ) + (rand.floatv() - rand.floatv() - 0.5f) * 32.0f; float z = ((float)posZ) + (rand.floatv() - rand.floatv() - 0.5f) * 32.0f;
this.spawnParticle(ParticleType.SUSPENDED_DEPTH, (double)x, (double)y, (double)z, 0.0D, 0.0D, 0.0D); this.spawnParticle(ParticleType.DEPTH, (double)x, (double)y, (double)z, 0.0D, 0.0D, 0.0D);
} }
// } // }
} }
@ -622,7 +622,7 @@ public class WorldClient extends AWorldClient
double d8 = (double)l * d20 + this.rand.gaussian() * 0.01D; double d8 = (double)l * d20 + this.rand.gaussian() * 0.01D;
double d10 = -0.03D + this.rand.gaussian() * 0.01D; double d10 = -0.03D + this.rand.gaussian() * 0.01D;
double d12 = (double)i * d20 + this.rand.gaussian() * 0.01D; double d12 = (double)i * d20 + this.rand.gaussian() * 0.01D;
this.spawnEntityFX(ParticleType.SMOKE_NORMAL, ParticleType.SMOKE_NORMAL.isUnlimited(), d21, d4, d6, d8, d10, d12, 0); this.spawnEntityFX(ParticleType.SMOKE, ParticleType.SMOKE.isUnlimited(), d21, d4, d6, d8, d10, d12, 0);
} }
return; return;
@ -658,12 +658,7 @@ public class WorldClient extends AWorldClient
f = (float)(j1 >> 16 & 255) / 255.0F; f = (float)(j1 >> 16 & 255) / 255.0F;
f1 = (float)(j1 >> 8 & 255) / 255.0F; f1 = (float)(j1 >> 8 & 255) / 255.0F;
f2 = (float)(j1 >> 0 & 255) / 255.0F; f2 = (float)(j1 >> 0 & 255) / 255.0F;
enumparticletypes = ParticleType.SPELL; enumparticletypes = ParticleType.POTION;
if (potion.isEffectInstant())
{
enumparticletypes = ParticleType.SPELL_INSTANT;
}
} }
for (int l1 = 0; l1 < 100; ++l1) for (int l1 = 0; l1 < 100; ++l1)

View file

@ -162,7 +162,7 @@ public class BlockDragonEgg extends Block
double d1 = (double)blockpos.getX() + (double)(pos.getX() - blockpos.getX()) * d0 + (worldIn.rand.doublev() - 0.5D) * 1.0D + 0.5D; double d1 = (double)blockpos.getX() + (double)(pos.getX() - blockpos.getX()) * d0 + (worldIn.rand.doublev() - 0.5D) * 1.0D + 0.5D;
double d2 = (double)blockpos.getY() + (double)(pos.getY() - blockpos.getY()) * d0 + worldIn.rand.doublev() * 1.0D - 0.5D; double d2 = (double)blockpos.getY() + (double)(pos.getY() - blockpos.getY()) * d0 + worldIn.rand.doublev() * 1.0D - 0.5D;
double d3 = (double)blockpos.getZ() + (double)(pos.getZ() - blockpos.getZ()) * d0 + (worldIn.rand.doublev() - 0.5D) * 1.0D + 0.5D; double d3 = (double)blockpos.getZ() + (double)(pos.getZ() - blockpos.getZ()) * d0 + (worldIn.rand.doublev() - 0.5D) * 1.0D + 0.5D;
worldIn.spawnParticle(ParticleType.PORTAL, d1, d2, d3, (double)f, (double)f1, (double)f2); worldIn.spawnParticle(ParticleType.TELEPORT, d1, d2, d3, (double)f, (double)f1, (double)f2);
} }
} }
else else

View file

@ -99,7 +99,7 @@ public class BlockFloorPortal extends Block
double d3 = 0.0D; double d3 = 0.0D;
double d4 = 0.0D; double d4 = 0.0D;
double d5 = 0.0D; double d5 = 0.0D;
worldIn.spawnParticle(ParticleType.SMOKE_NORMAL, d0, d1, d2, d3, d4, d5); worldIn.spawnParticle(ParticleType.SMOKE, d0, d1, d2, d3, d4, d5);
} }
public Item getItem(World worldIn, BlockPos pos) public Item getItem(World worldIn, BlockPos pos)

View file

@ -240,7 +240,7 @@ public class BlockPortal extends Block
d5 = (double)(rand.floatv() * 2.0F * (float)j); d5 = (double)(rand.floatv() * 2.0F * (float)j);
} }
worldIn.spawnParticle(ParticleType.PORTAL, d0, d1, d2, d3, d4, d5); worldIn.spawnParticle(ParticleType.TELEPORT, d0, d1, d2, d3, d4, d5);
} }
} }

View file

@ -19,7 +19,6 @@ import common.item.block.ItemColored;
import common.item.tool.ItemShears; import common.item.tool.ItemShears;
import common.model.Model; import common.model.Model;
import common.model.ModelProvider; import common.model.ModelProvider;
import common.model.ParticleType;
import common.properties.Property; import common.properties.Property;
import common.properties.PropertyBool; import common.properties.PropertyBool;
import common.rng.Random; import common.rng.Random;
@ -28,7 +27,6 @@ import common.util.BlockPos;
import common.util.Facing; import common.util.Facing;
import common.vars.Vars; import common.vars.Vars;
import common.world.IWorldAccess; import common.world.IWorldAccess;
import common.world.AWorldClient;
import common.world.State; import common.world.State;
import common.world.World; import common.world.World;
import common.world.AWorldServer; import common.world.AWorldServer;
@ -217,17 +215,6 @@ public class BlockLeaves extends BlockLeavesBase
// } // }
} }
public void randomDisplayTick(AWorldClient worldIn, BlockPos pos, State state, Random rand)
{
if (worldIn.isRainingAt(pos.up(), true) && !worldIn.isBlockSolid(pos.down()) && rand.chance(15)) // == 1
{
double d0 = (double)((float)pos.getX() + rand.floatv());
double d1 = (double)pos.getY() - 0.05D;
double d2 = (double)((float)pos.getZ() + rand.floatv());
worldIn.spawnParticle(ParticleType.DRIP_WATER, d0, d1, d2, 0.0D, 0.0D, 0.0D);
}
}
private void destroy(World worldIn, BlockPos pos) private void destroy(World worldIn, BlockPos pos)
{ {
this.dropBlockAsItem(worldIn, pos, worldIn.getState(pos), 0); this.dropBlockAsItem(worldIn, pos, worldIn.getState(pos), 0);

View file

@ -75,7 +75,7 @@ public class BlockMycelium extends Block
if (rand.chance(10)) if (rand.chance(10))
{ {
worldIn.spawnParticle(ParticleType.TOWN_AURA, (double)((float)pos.getX() + rand.floatv()), (double)((float)pos.getY() + 1.1F), (double)((float)pos.getZ() + rand.floatv()), 0.0D, 0.0D, 0.0D); worldIn.spawnParticle(ParticleType.SPORE, (double)((float)pos.getX() + rand.floatv()), (double)((float)pos.getY() + 1.1F), (double)((float)pos.getZ() + rand.floatv()), 0.0D, 0.0D, 0.0D);
} }
} }

View file

@ -261,10 +261,6 @@ public abstract class BlockLiquid extends Block
worldIn.playSound(d0 + 0.5D, d1 + 0.5D, d2 + 0.5D, SoundEvent.WATER, rand.floatv() * 0.25F + 0.75F); worldIn.playSound(d0 + 0.5D, d1 + 0.5D, d2 + 0.5D, SoundEvent.WATER, rand.floatv() * 0.25F + 0.75F);
} }
} }
else if (rand.chance(10))
{
worldIn.spawnParticle(ParticleType.SUSPENDED, d0 + (double)rand.floatv(), d1 + (double)rand.floatv(), d2 + (double)rand.floatv(), 0.0D, 0.0D, 0.0D);
}
} }
if (this.material == Material.LAVA && worldIn.getState(pos.up()).getBlock() == Blocks.air && !worldIn.getState(pos.up()).getBlock().isOpaqueCube()) if (this.material == Material.LAVA && worldIn.getState(pos.up()).getBlock() == Blocks.air && !worldIn.getState(pos.up()).getBlock().isOpaqueCube())
@ -283,27 +279,6 @@ public abstract class BlockLiquid extends Block
worldIn.playSound(d0, d1, d2, SoundEvent.LAVA, 0.2F + rand.floatv() * 0.2F); worldIn.playSound(d0, d1, d2, SoundEvent.LAVA, 0.2F + rand.floatv() * 0.2F);
} }
} }
if (rand.chance(10) && worldIn.isBlockSolid(pos.down()))
{
Material material = worldIn.getState(pos.down(2)).getBlock().getMaterial();
if (!material.blocksMovement() && !material.isLiquid())
{
double d3 = d0 + (double)rand.floatv();
double d5 = d1 - 1.05D;
double d7 = d2 + (double)rand.floatv();
if (this.material == Material.WATER)
{
worldIn.spawnParticle(ParticleType.DRIP_WATER, d3, d5, d7, 0.0D, 0.0D, 0.0D);
}
else
{
worldIn.spawnParticle(ParticleType.DRIP_LAVA, d3, d5, d7, 0.0D, 0.0D, 0.0D);
}
}
}
} }
public static double getFlowDirection(IBlockAccess worldIn, BlockPos pos, BlockLiquid block) public static double getFlowDirection(IBlockAccess worldIn, BlockPos pos, BlockLiquid block)
@ -374,7 +349,7 @@ public abstract class BlockLiquid extends Block
for (int i = 0; i < 8; ++i) for (int i = 0; i < 8; ++i)
{ {
worldIn.spawnParticle(ParticleType.SMOKE_LARGE, d0 + Math.random(), d1 + 1.2D, d2 + Math.random(), 0.0D, 0.0D, 0.0D); worldIn.spawnParticle(ParticleType.SMOKE, d0 + Math.random(), d1 + 1.2D, d2 + Math.random(), 0.0D, 0.0D, 0.0D);
} }
} }

View file

@ -16,7 +16,7 @@ public class BlockBedrock extends Block {
public void randomDisplayTick(AWorldClient worldIn, BlockPos pos, State state, Random rand) public void randomDisplayTick(AWorldClient worldIn, BlockPos pos, State state, Random rand)
{ {
if(/* worldIn.canShowVoidParticles() && */ pos.getY() <= 5 && rand.chance(8)) { if(/* worldIn.canShowVoidParticles() && */ pos.getY() <= 5 && rand.chance(8)) {
worldIn.spawnParticle(ParticleType.SUSPENDED_DEPTH, (double)pos.getX() + rand.floatv(), (double)(pos.getY()+1) + (rand.floatv() * 0.5f), worldIn.spawnParticle(ParticleType.DEPTH, (double)pos.getX() + rand.floatv(), (double)(pos.getY()+1) + (rand.floatv() * 0.5f),
(double)pos.getZ() + rand.floatv(), 0.0D, 0.0D, 0.0D); (double)pos.getZ() + rand.floatv(), 0.0D, 0.0D, 0.0D);
} }
} }

View file

@ -364,7 +364,7 @@ public class BlockFire extends Block
double d3 = (double)pos.getX() + rand.doublev() * 0.10000000149011612D; double d3 = (double)pos.getX() + rand.doublev() * 0.10000000149011612D;
double d8 = (double)pos.getY() + rand.doublev(); double d8 = (double)pos.getY() + rand.doublev();
double d13 = (double)pos.getZ() + rand.doublev(); double d13 = (double)pos.getZ() + rand.doublev();
worldIn.spawnParticle(ParticleType.SMOKE_LARGE, d3, d8, d13, 0.0D, 0.0D, 0.0D); worldIn.spawnParticle(ParticleType.SMOKE, d3, d8, d13, 0.0D, 0.0D, 0.0D);
} }
} }
@ -375,7 +375,7 @@ public class BlockFire extends Block
double d4 = (double)(pos.getX() + 1) - rand.doublev() * 0.10000000149011612D; double d4 = (double)(pos.getX() + 1) - rand.doublev() * 0.10000000149011612D;
double d9 = (double)pos.getY() + rand.doublev(); double d9 = (double)pos.getY() + rand.doublev();
double d14 = (double)pos.getZ() + rand.doublev(); double d14 = (double)pos.getZ() + rand.doublev();
worldIn.spawnParticle(ParticleType.SMOKE_LARGE, d4, d9, d14, 0.0D, 0.0D, 0.0D); worldIn.spawnParticle(ParticleType.SMOKE, d4, d9, d14, 0.0D, 0.0D, 0.0D);
} }
} }
@ -386,7 +386,7 @@ public class BlockFire extends Block
double d5 = (double)pos.getX() + rand.doublev(); double d5 = (double)pos.getX() + rand.doublev();
double d10 = (double)pos.getY() + rand.doublev(); double d10 = (double)pos.getY() + rand.doublev();
double d15 = (double)pos.getZ() + rand.doublev() * 0.10000000149011612D; double d15 = (double)pos.getZ() + rand.doublev() * 0.10000000149011612D;
worldIn.spawnParticle(ParticleType.SMOKE_LARGE, d5, d10, d15, 0.0D, 0.0D, 0.0D); worldIn.spawnParticle(ParticleType.SMOKE, d5, d10, d15, 0.0D, 0.0D, 0.0D);
} }
} }
@ -397,7 +397,7 @@ public class BlockFire extends Block
double d6 = (double)pos.getX() + rand.doublev(); double d6 = (double)pos.getX() + rand.doublev();
double d11 = (double)pos.getY() + rand.doublev(); double d11 = (double)pos.getY() + rand.doublev();
double d16 = (double)(pos.getZ() + 1) - rand.doublev() * 0.10000000149011612D; double d16 = (double)(pos.getZ() + 1) - rand.doublev() * 0.10000000149011612D;
worldIn.spawnParticle(ParticleType.SMOKE_LARGE, d6, d11, d16, 0.0D, 0.0D, 0.0D); worldIn.spawnParticle(ParticleType.SMOKE, d6, d11, d16, 0.0D, 0.0D, 0.0D);
} }
} }
@ -408,7 +408,7 @@ public class BlockFire extends Block
double d7 = (double)pos.getX() + rand.doublev(); double d7 = (double)pos.getX() + rand.doublev();
double d12 = (double)(pos.getY() + 1) - rand.doublev() * 0.10000000149011612D; double d12 = (double)(pos.getY() + 1) - rand.doublev() * 0.10000000149011612D;
double d17 = (double)pos.getZ() + rand.doublev(); double d17 = (double)pos.getZ() + rand.doublev();
worldIn.spawnParticle(ParticleType.SMOKE_LARGE, d7, d12, d17, 0.0D, 0.0D, 0.0D); worldIn.spawnParticle(ParticleType.SMOKE, d7, d12, d17, 0.0D, 0.0D, 0.0D);
} }
} }
} }
@ -419,7 +419,7 @@ public class BlockFire extends Block
double d0 = (double)pos.getX() + rand.doublev(); double d0 = (double)pos.getX() + rand.doublev();
double d1 = (double)pos.getY() + rand.doublev() * 0.5D + 0.5D; double d1 = (double)pos.getY() + rand.doublev() * 0.5D + 0.5D;
double d2 = (double)pos.getZ() + rand.doublev(); double d2 = (double)pos.getZ() + rand.doublev();
worldIn.spawnParticle(ParticleType.SMOKE_LARGE, d0, d1, d2, 0.0D, 0.0D, 0.0D); worldIn.spawnParticle(ParticleType.SMOKE, d0, d1, d2, 0.0D, 0.0D, 0.0D);
} }
} }
} }

View file

@ -171,7 +171,7 @@ public class BlockRedstoneOre extends Block
if (d1 < (double)pos.getX() || d1 > (double)(pos.getX() + 1) || d2 < 0.0D || d2 > (double)(pos.getY() + 1) || d3 < (double)pos.getZ() || d3 > (double)(pos.getZ() + 1)) if (d1 < (double)pos.getX() || d1 > (double)(pos.getX() + 1) || d2 < 0.0D || d2 > (double)(pos.getY() + 1) || d3 < (double)pos.getZ() || d3 > (double)(pos.getZ() + 1))
{ {
worldIn.spawnParticle(ParticleType.REDSTONE, d1, d2, d3, 0.0D, 0.0D, 0.0D); worldIn.spawnParticle(ParticleType.DUST, d1, d2, d3, 0.0D, 0.0D, 0.0D);
} }
} }
} }

View file

@ -458,7 +458,7 @@ public class BlockBrewingStand extends BlockContainer
double d0 = (double)((float)pos.getX() + 0.4F + rand.floatv() * 0.2F); double d0 = (double)((float)pos.getX() + 0.4F + rand.floatv() * 0.2F);
double d1 = (double)((float)pos.getY() + 0.7F + rand.floatv() * 0.3F); double d1 = (double)((float)pos.getY() + 0.7F + rand.floatv() * 0.3F);
double d2 = (double)((float)pos.getZ() + 0.4F + rand.floatv() * 0.2F); double d2 = (double)((float)pos.getZ() + 0.4F + rand.floatv() * 0.2F);
worldIn.spawnParticle(ParticleType.SMOKE_NORMAL, d0, d1, d2, 0.0D, 0.0D, 0.0D); worldIn.spawnParticle(ParticleType.SMOKE, d0, d1, d2, 0.0D, 0.0D, 0.0D);
} }
public void onBlockRemoved(AWorldServer worldIn, BlockPos pos, State state) public void onBlockRemoved(AWorldServer worldIn, BlockPos pos, State state)

View file

@ -4,18 +4,14 @@ import common.block.BlockContainer;
import common.block.Material; import common.block.Material;
import common.entity.npc.EntityNPC; import common.entity.npc.EntityNPC;
import common.entity.types.EntityLiving; import common.entity.types.EntityLiving;
import common.init.Blocks;
import common.item.CheatTab; import common.item.CheatTab;
import common.item.ItemStack; import common.item.ItemStack;
import common.model.Model; import common.model.Model;
import common.model.ModelProvider; import common.model.ModelProvider;
import common.model.ParticleType;
import common.rng.Random;
import common.tileentity.TileEntity; import common.tileentity.TileEntity;
import common.tileentity.TileEntityEnchantmentTable; import common.tileentity.TileEntityEnchantmentTable;
import common.util.BlockPos; import common.util.BlockPos;
import common.util.Facing; import common.util.Facing;
import common.world.AWorldClient;
import common.world.State; import common.world.State;
import common.world.World; import common.world.World;
@ -44,40 +40,6 @@ public class BlockEnchantmentTable extends BlockContainer
return false; return false;
} }
public void randomDisplayTick(AWorldClient worldIn, BlockPos pos, State state, Random rand)
{
super.randomDisplayTick(worldIn, pos, state, rand);
for (int i = -2; i <= 2; ++i)
{
for (int j = -2; j <= 2; ++j)
{
if (i > -2 && i < 2 && j == -1)
{
j = 2;
}
if (rand.chance(16))
{
for (int k = 0; k <= 1; ++k)
{
BlockPos blockpos = pos.add(i, k, j);
if (worldIn.getState(blockpos).getBlock() == Blocks.bookshelf)
{
if (!worldIn.isAirBlock(pos.add(i / 2, 0, j / 2)))
{
break;
}
worldIn.spawnParticle(ParticleType.ENCHANTMENT_TABLE, (double)pos.getX() + 0.5D, (double)pos.getY() + 2.0D, (double)pos.getZ() + 0.5D, (double)((float)i + rand.floatv()) - 0.5D, (double)((float)k - rand.floatv() - 1.0F), (double)((float)j + rand.floatv()) - 0.5D);
}
}
}
}
}
}
/** /**
* Used to determine ambient occlusion and culling when rebuilding chunks for render * Used to determine ambient occlusion and culling when rebuilding chunks for render
*/ */

View file

@ -98,22 +98,22 @@ public class BlockFurnace extends BlockContainer implements Rotatable
switch (enumfacing) switch (enumfacing)
{ {
case WEST: case WEST:
worldIn.spawnParticle(ParticleType.SMOKE_NORMAL, d0 - d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D); worldIn.spawnParticle(ParticleType.SMOKE, d0 - d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D);
worldIn.spawnParticle(ParticleType.FLAME, d0 - d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D); worldIn.spawnParticle(ParticleType.FLAME, d0 - d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D);
break; break;
case EAST: case EAST:
worldIn.spawnParticle(ParticleType.SMOKE_NORMAL, d0 + d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D); worldIn.spawnParticle(ParticleType.SMOKE, d0 + d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D);
worldIn.spawnParticle(ParticleType.FLAME, d0 + d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D); worldIn.spawnParticle(ParticleType.FLAME, d0 + d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D);
break; break;
case NORTH: case NORTH:
worldIn.spawnParticle(ParticleType.SMOKE_NORMAL, d0 + d4, d1, d2 - d3, 0.0D, 0.0D, 0.0D); worldIn.spawnParticle(ParticleType.SMOKE, d0 + d4, d1, d2 - d3, 0.0D, 0.0D, 0.0D);
worldIn.spawnParticle(ParticleType.FLAME, d0 + d4, d1, d2 - d3, 0.0D, 0.0D, 0.0D); worldIn.spawnParticle(ParticleType.FLAME, d0 + d4, d1, d2 - d3, 0.0D, 0.0D, 0.0D);
break; break;
case SOUTH: case SOUTH:
worldIn.spawnParticle(ParticleType.SMOKE_NORMAL, d0 + d4, d1, d2 + d3, 0.0D, 0.0D, 0.0D); worldIn.spawnParticle(ParticleType.SMOKE, d0 + d4, d1, d2 + d3, 0.0D, 0.0D, 0.0D);
worldIn.spawnParticle(ParticleType.FLAME, d0 + d4, d1, d2 + d3, 0.0D, 0.0D, 0.0D); worldIn.spawnParticle(ParticleType.FLAME, d0 + d4, d1, d2 + d3, 0.0D, 0.0D, 0.0D);
} }
} }

View file

@ -6,7 +6,6 @@ import common.entity.npc.EntityNPC;
import common.init.Blocks; import common.init.Blocks;
import common.init.SoundEvent; import common.init.SoundEvent;
import common.item.CheatTab; import common.item.CheatTab;
import common.model.ParticleType;
import common.util.BlockPos; import common.util.BlockPos;
import common.util.Facing; import common.util.Facing;
import common.world.State; import common.world.State;
@ -36,8 +35,6 @@ public class BlockNote extends Block {
public boolean onBlockEventReceived(World worldIn, BlockPos pos, State state, int eventID, int eventParam) { public boolean onBlockEventReceived(World worldIn, BlockPos pos, State state, int eventID, int eventParam) {
worldIn.playSound(SoundEvent.NOTE, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, 3.0F); worldIn.playSound(SoundEvent.NOTE, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, 3.0F);
worldIn.spawnParticle(ParticleType.NOTE, (double)pos.getX() + 0.5D, (double)pos.getY() + 1.2D, (double)pos.getZ() + 0.5D,
(double)eventParam / 24.0D, 0.0D, 0.0D);
return true; return true;
} }

View file

@ -126,7 +126,7 @@ public class BlockRedstoneRepeater extends BlockRedstoneDiode
f = f / 16.0F; f = f / 16.0F;
double d3 = (double)(f * (float)enumfacing.getFrontOffsetX()); double d3 = (double)(f * (float)enumfacing.getFrontOffsetX());
double d4 = (double)(f * (float)enumfacing.getFrontOffsetZ()); double d4 = (double)(f * (float)enumfacing.getFrontOffsetZ());
worldIn.spawnParticle(ParticleType.REDSTONE, d0 + d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D); worldIn.spawnParticle(ParticleType.DUST, d0 + d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D);
} }
} }

View file

@ -140,7 +140,7 @@ public class BlockRedstoneTorch extends BlockTorch
double d0 = (double)pos.getX() + rand.doublev() * 0.6D + 0.2D; double d0 = (double)pos.getX() + rand.doublev() * 0.6D + 0.2D;
double d1 = (double)pos.getY() + rand.doublev() * 0.6D + 0.2D; double d1 = (double)pos.getY() + rand.doublev() * 0.6D + 0.2D;
double d2 = (double)pos.getZ() + rand.doublev() * 0.6D + 0.2D; double d2 = (double)pos.getZ() + rand.doublev() * 0.6D + 0.2D;
worldIn.spawnParticle(ParticleType.SMOKE_NORMAL, d0, d1, d2, 0.0D, 0.0D, 0.0D); worldIn.spawnParticle(ParticleType.SMOKE, d0, d1, d2, 0.0D, 0.0D, 0.0D);
} }
worldIn.scheduleUpdate(pos, worldIn.getState(pos).getBlock(), 160); worldIn.scheduleUpdate(pos, worldIn.getState(pos).getBlock(), 160);
@ -206,7 +206,7 @@ public class BlockRedstoneTorch extends BlockTorch
d2 += 0.27D * (double)enumfacing1.getFrontOffsetZ(); d2 += 0.27D * (double)enumfacing1.getFrontOffsetZ();
} }
worldIn.spawnParticle(ParticleType.REDSTONE, d0, d1, d2, 0.0D, 0.0D, 0.0D); worldIn.spawnParticle(ParticleType.DUST, d0, d1, d2, 0.0D, 0.0D, 0.0D);
} }
} }

View file

@ -790,7 +790,7 @@ public class BlockRedstoneWire extends Block
float f1 = f * 0.6F + 0.4F; float f1 = f * 0.6F + 0.4F;
float f2 = Math.max(0.0F, f * f * 0.7F - 0.5F); float f2 = Math.max(0.0F, f * f * 0.7F - 0.5F);
float f3 = Math.max(0.0F, f * f * 0.6F - 0.7F); float f3 = Math.max(0.0F, f * f * 0.6F - 0.7F);
worldIn.spawnParticle(ParticleType.REDSTONE, d0, d1, d2, (double)f1, (double)f2, (double)f3); worldIn.spawnParticle(ParticleType.DUST, d0, d1, d2, (double)f1, (double)f2, (double)f3);
} }
} }

View file

@ -229,12 +229,12 @@ public class BlockTorch extends Block implements DirectionalUp
if (enumfacing.getAxis().isHorizontal()) if (enumfacing.getAxis().isHorizontal())
{ {
Facing enumfacing1 = enumfacing.getOpposite(); Facing enumfacing1 = enumfacing.getOpposite();
worldIn.spawnParticle(ParticleType.SMOKE_NORMAL, d0 + d4 * (double)enumfacing1.getFrontOffsetX(), d1 + d3, d2 + d4 * (double)enumfacing1.getFrontOffsetZ(), 0.0D, 0.0D, 0.0D); worldIn.spawnParticle(ParticleType.SMOKE, d0 + d4 * (double)enumfacing1.getFrontOffsetX(), d1 + d3, d2 + d4 * (double)enumfacing1.getFrontOffsetZ(), 0.0D, 0.0D, 0.0D);
worldIn.spawnParticle(ParticleType.FLAME, d0 + d4 * (double)enumfacing1.getFrontOffsetX(), d1 + d3, d2 + d4 * (double)enumfacing1.getFrontOffsetZ(), 0.0D, 0.0D, 0.0D); worldIn.spawnParticle(ParticleType.FLAME, d0 + d4 * (double)enumfacing1.getFrontOffsetX(), d1 + d3, d2 + d4 * (double)enumfacing1.getFrontOffsetZ(), 0.0D, 0.0D, 0.0D);
} }
else else
{ {
worldIn.spawnParticle(ParticleType.SMOKE_NORMAL, d0, d1, d2, 0.0D, 0.0D, 0.0D); worldIn.spawnParticle(ParticleType.SMOKE, d0, d1, d2, 0.0D, 0.0D, 0.0D);
worldIn.spawnParticle(ParticleType.FLAME, d0, d1, d2, 0.0D, 0.0D, 0.0D); worldIn.spawnParticle(ParticleType.FLAME, d0, d1, d2, 0.0D, 0.0D, 0.0D);
} }
} }

View file

@ -127,7 +127,7 @@ public class BlockWarpChest extends Block implements Rotatable
double d3 = (double)(rand.floatv() * (float)j); double d3 = (double)(rand.floatv() * (float)j);
double d4 = ((double)rand.floatv() - 0.5D) * 0.125D; double d4 = ((double)rand.floatv() - 0.5D) * 0.125D;
double d5 = (double)(rand.floatv() * (float)k); double d5 = (double)(rand.floatv() * (float)k);
worldIn.spawnParticle(ParticleType.PORTAL, d0, d1, d2, d3, d4, d5); worldIn.spawnParticle(ParticleType.TELEPORT, d0, d1, d2, d3, d4, d5);
} }
} }

View file

@ -1712,7 +1712,7 @@ public class EntityHorse extends EntityAnimal implements IInvBasic
*/ */
protected void spawnHorseParticles(boolean p_110216_1_) protected void spawnHorseParticles(boolean p_110216_1_)
{ {
ParticleType enumparticletypes = p_110216_1_ ? ParticleType.HEART : ParticleType.SMOKE_NORMAL; ParticleType enumparticletypes = p_110216_1_ ? ParticleType.HEART : ParticleType.SMOKE;
for (int i = 0; i < 7; ++i) for (int i = 0; i < 7; ++i)
{ {

View file

@ -354,7 +354,7 @@ public class EntityRabbit extends EntityAnimal {
this.jumpRotTimer = 0; this.jumpRotTimer = 0;
} }
else if(id == 19) { else if(id == 19) {
this.worldObj.spawnParticle(ParticleType.BLOCK_DUST, this.worldObj.spawnParticle(ParticleType.BLOCK_CRACK,
this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width,
this.posY + 0.5D + (double)(this.rand.floatv() * this.height), this.posY + 0.5D + (double)(this.rand.floatv() * this.height),
this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, 0.0D, 0.0D, 0.0D, this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, 0.0D, 0.0D, 0.0D,

View file

@ -64,7 +64,7 @@ public class EntityOrb extends EntityThrowable
for (int i = 0; i < 32; ++i) for (int i = 0; i < 32; ++i)
{ {
this.worldObj.spawnParticle(ParticleType.PORTAL, this.posX, this.posY + this.rand.doublev() * 2.0D, this.posZ, this.rand.gaussian(), 0.0D, this.rand.gaussian()); this.worldObj.spawnParticle(ParticleType.TELEPORT, this.posX, this.posY + this.rand.doublev() * 2.0D, this.posZ, this.rand.gaussian(), 0.0D, this.rand.gaussian());
} }
if (!this.worldObj.client) if (!this.worldObj.client)

View file

@ -96,7 +96,7 @@ public class EntityTnt extends Entity implements IObjectData
else else
{ {
this.handleWaterMovement(); this.handleWaterMovement();
this.worldObj.spawnParticle(ParticleType.SMOKE_NORMAL, this.posX, this.posY + 0.5D, this.posZ, 0.0D, 0.0D, 0.0D); this.worldObj.spawnParticle(ParticleType.SMOKE, this.posX, this.posY + 0.5D, this.posZ, 0.0D, 0.0D, 0.0D);
} }
} }

View file

@ -50,7 +50,7 @@ public class EntityTntCart extends EntityCart
if (this.minecartTNTFuse > 0) if (this.minecartTNTFuse > 0)
{ {
--this.minecartTNTFuse; --this.minecartTNTFuse;
this.worldObj.spawnParticle(ParticleType.SMOKE_NORMAL, this.posX, this.posY + 0.5D, this.posZ, 0.0D, 0.0D, 0.0D); this.worldObj.spawnParticle(ParticleType.SMOKE, this.posX, this.posY + 0.5D, this.posZ, 0.0D, 0.0D, 0.0D);
} }
else if (this.minecartTNTFuse == 0) else if (this.minecartTNTFuse == 0)
{ {

View file

@ -89,7 +89,7 @@ public class EntityDarkMage extends EntityHoveringNPC {
1.0F + this.rand.floatv()); 1.0F + this.rand.floatv());
} }
for(int i = 0; i < 2; ++i) { for(int i = 0; i < 2; ++i) {
this.worldObj.spawnParticle(ParticleType.SMOKE_LARGE, this.posX + (this.rand.doublev() - 0.5D) * (double)this.width, this.worldObj.spawnParticle(ParticleType.SMOKE, this.posX + (this.rand.doublev() - 0.5D) * (double)this.width,
this.posY + this.rand.doublev() * (double)this.height, this.posY + this.rand.doublev() * (double)this.height,
this.posZ + (this.rand.doublev() - 0.5D) * (double)this.width, 0.0D, 0.0D, 0.0D); this.posZ + (this.rand.doublev() - 0.5D) * (double)this.width, 0.0D, 0.0D, 0.0D);
} }

View file

@ -88,14 +88,14 @@ public class EntityGargoyle extends EntityFlyingNPC
for (int l = 0; l < 5; ++l) for (int l = 0; l < 5; ++l)
{ {
this.worldObj.spawnParticle(ParticleType.SMOKE_NORMAL, this.posX + this.rand.gaussian() * 0.30000001192092896D, this.posY + this.height + this.rand.gaussian() * 0.30000001192092896D, this.posZ + this.rand.gaussian() * 0.30000001192092896D, 0.0D, 0.0D, 0.0D); this.worldObj.spawnParticle(ParticleType.SMOKE, this.posX + this.rand.gaussian() * 0.30000001192092896D, this.posY + this.height + this.rand.gaussian() * 0.30000001192092896D, this.posZ + this.rand.gaussian() * 0.30000001192092896D, 0.0D, 0.0D, 0.0D);
} }
if (this.getInvulTime() > 0) if (this.getInvulTime() > 0)
{ {
for (int i1 = 0; i1 < 3; ++i1) for (int i1 = 0; i1 < 3; ++i1)
{ {
this.worldObj.spawnParticle(ParticleType.SPELL_MOB, this.posX + this.rand.gaussian() * 1.0D, this.posY + (double)(this.rand.floatv() * 3.3F), this.posZ + this.rand.gaussian() * 1.0D, 0.699999988079071D, 0.699999988079071D, 0.8999999761581421D); this.worldObj.spawnParticle(ParticleType.CRIT, this.posX + this.rand.gaussian() * 1.0D, this.posY + (double)(this.rand.floatv() * 3.3F), this.posZ + this.rand.gaussian() * 1.0D, 0.699999988079071D, 0.699999988079071D, 0.8999999761581421D);
} }
} }
} }

View file

@ -1,175 +0,0 @@
package common.entity.npc;
import common.model.ParticleType;
import common.world.World;
public class EntityMagma extends EntitySlime
{
public EntityMagma(World worldIn)
{
super(worldIn);
// this.fireImmune = true;
}
public boolean isImmuneToFire()
{
return true;
}
// protected void applyEntityAttributes()
// {
// super.applyEntityAttributes();
// this.getEntityAttribute(Attributes.MOVEMENT_SPEED).setBaseValue(0.20000000298023224D);
// }
/**
* Checks if the entity's current position is a valid location to spawn this entity.
*/
public boolean getCanSpawnHere()
{
return true; // this.worldObj.getDifficulty() != Difficulty.PEACEFUL;
}
// /**
// * Checks that the entity is not colliding with any blocks / liquids
// */
// public boolean isNotColliding()
// {
// return this.worldObj.checkNoEntityCollision(this.getEntityBoundingBox(), this) && this.worldObj.getCollidingBoundingBoxes(this, this.getEntityBoundingBox()).isEmpty() && !this.worldObj.isAnyLiquid(this.getEntityBoundingBox());
// }
// /**
// * Returns the current armor value as determined by a call to InventoryPlayer.getTotalArmorValue
// */
// public int getTotalArmorValue()
// {
// return this.getSlimeSize() * 3;
// }
// public int getBrightnessForRender(float partialTicks)
// {
// return 15728880;
// }
//
// /**
// * Gets how bright this entity is.
// */
// public float getBrightness(float partialTicks)
// {
// return 1.0F;
// }
protected ParticleType getParticleType()
{
return ParticleType.FLAME;
}
protected EntitySlime createInstance()
{
return new EntityMagma(this.worldObj);
}
// protected Item getDropItem()
// {
// return Items.magma_cream;
// }
// /**
// * Drop 0-2 items of this living's type
// *
// * @param wasRecentlyHit true if this this entity was recently hit by appropriate entity (generally only if player
// * or tameable)
// * @param lootingModifier level of enchanment to be applied to this drop
// */
// protected void dropFewItems(boolean wasRecentlyHit, int lootingModifier)
// {
// Item item = this.getDropItem();
//
// if (item != null && this.getSlimeSize() > 1)
// {
// int i = this.rand.range(-2, 1);
//
// if (lootingModifier > 0)
// {
// i += this.rand.zrange(lootingModifier + 1);
// }
//
// for (int j = 0; j < i; ++j)
// {
// this.dropItem(item, 1);
// }
// }
// }
// /**
// * Returns true if the entity is on fire. Used by render to add the fire effect on rendering.
// */
// public boolean isBurning()
// {
// return false;
// }
// /**
// * Gets the amount of time the slime needs to wait between jumps.
// */
// protected int getJumpDelay()
// {
// return super.getJumpDelay() * 4;
// }
// protected void alterSquishAmount()
// {
// this.squishAmount *= 0.9F;
// }
// /**
// * Causes this entity to do an upwards motion (jumping).
// */
// protected void jump()
// {
// this.motionY = 0.67;
// this.isAirBorne = true;
// }
protected void handleJumpLava()
{
this.motionY = 0.345;
this.isAirBorne = true;
}
// /**
// * Indicates weather the slime is able to damage the player (based upon the slime's size)
// */
// public boolean canDamagePlayer()
// {
// return true;
// }
// /**
// * Gets the amount of damage dealt to the player when "attacked" by the slime.
// */
// protected int getAttackStrength()
// {
// return super.getAttackStrength() + 2;
// }
// /**
// * Returns the name of the sound played when the slime jumps.
// */
// protected String getJumpSound()
// {
// return this.getSlimeSize() > 1 ? "mob.magmacube.big" : "mob.magmacube.small";
// }
// /**
// * Returns true if the slime makes a sound when it lands after a jump (based upon the slime's size)
// */
// protected boolean makesSoundOnLand()
// {
// return true;
// }
public int getColor() {
return 0xee9300;
}
}

View file

@ -1247,14 +1247,14 @@ public abstract class EntityNPC extends EntityLiving
} }
else { else {
this.worldObj.playAuxSFX(1013, new BlockPos(ox, oy, oz), 0); this.worldObj.playAuxSFX(1013, new BlockPos(ox, oy, oz), 0);
((AWorldServer)this.worldObj).spawnParticle(ParticleType.PORTAL, ((AWorldServer)this.worldObj).spawnParticle(ParticleType.TELEPORT,
ox + (this.rand.doublev() - 0.5D) * (double)this.width * 2.0D, ox + (this.rand.doublev() - 0.5D) * (double)this.width * 2.0D,
oy + this.rand.doublev() * (double)this.height, oy + this.rand.doublev() * (double)this.height,
oz + (this.rand.doublev() - 0.5D) * (double)this.width * 2.0D, 8, 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, (this.rand.floatv() - 0.5F) * 0.2F, (this.rand.floatv() - 0.5F) * 0.2F, (this.rand.floatv() - 0.5F) * 0.2F,
0.15D, 0); 0.15D, 0);
this.worldObj.playAuxSFX(1005, this.getPosition(), 0); this.worldObj.playAuxSFX(1005, this.getPosition(), 0);
((AWorldServer)this.worldObj).spawnParticle(ParticleType.PORTAL, ((AWorldServer)this.worldObj).spawnParticle(ParticleType.TELEPORT,
this.posX + (this.rand.doublev() - 0.5D) * (double)this.width * 2.0D, this.posX + (this.rand.doublev() - 0.5D) * (double)this.width * 2.0D,
this.posY + this.rand.doublev() * (double)this.height, this.posY + this.rand.doublev() * (double)this.height,
this.posZ + (this.rand.doublev() - 0.5D) * (double)this.width * 2.0D, 8, this.posZ + (this.rand.doublev() - 0.5D) * (double)this.width * 2.0D, 8,
@ -2182,8 +2182,10 @@ public abstract class EntityNPC extends EntityLiving
{ {
if(this.connection != null) if(this.connection != null)
this.connection.onEnchantmentCritical(entityHit); this.connection.onEnchantmentCritical(entityHit);
else if(this.client != null) else if(this.client != null) {
this.client.emitParticleAtEntity(entityHit, ParticleType.CRIT_MAGIC); this.client.emitParticleAtEntity(entityHit, ParticleType.CRIT);
this.client.emitParticleAtEntity(entityHit, ParticleType.CRIT);
}
} }
/** /**
@ -3063,7 +3065,7 @@ public abstract class EntityNPC extends EntityLiving
} }
else if (id == 13) else if (id == 13)
{ {
this.spawnParticles(ParticleType.SMOKE_NORMAL); this.spawnParticles(ParticleType.SMOKE);
} }
else else
{ {

View file

@ -6,6 +6,8 @@ import common.biome.Biome;
import common.entity.DamageSource; import common.entity.DamageSource;
import common.entity.Entity; import common.entity.Entity;
import common.entity.types.EntityLiving; import common.entity.types.EntityLiving;
import common.init.ItemRegistry;
import common.init.Items;
import common.init.SoundEvent; import common.init.SoundEvent;
import common.model.ParticleType; import common.model.ParticleType;
import common.pathfinding.PathNavigateGround; import common.pathfinding.PathNavigateGround;
@ -151,11 +153,6 @@ public class EntitySlime extends EntityNPC
this.wasOnGround = tagCompund.getBool("wasOnGround"); this.wasOnGround = tagCompund.getBool("wasOnGround");
} }
protected ParticleType getParticleType()
{
return ParticleType.SLIME;
}
/** /**
* Called to update the entity's position/logic. * Called to update the entity's position/logic.
*/ */
@ -181,10 +178,9 @@ public class EntitySlime extends EntityNPC
float f2 = ExtMath.sin(f) * this.width * f1; float f2 = ExtMath.sin(f) * this.width * f1;
float f3 = ExtMath.cos(f) * this.width * f1; float f3 = ExtMath.cos(f) * this.width * f1;
World world = this.worldObj; World world = this.worldObj;
ParticleType enumparticletypes = this.getParticleType();
double d0 = this.posX + (double)f2; double d0 = this.posX + (double)f2;
double d1 = this.posZ + (double)f3; double d1 = this.posZ + (double)f3;
world.spawnParticle(enumparticletypes, d0, this.getEntityBoundingBox().minY, d1, 0.0D, 0.0D, 0.0D); world.spawnParticle(ParticleType.ITEM_CRACK, d0, this.getEntityBoundingBox().minY, d1, 0.0D, 0.0D, 0.0D, ItemRegistry.getId(Items.slime_ball));
} }
// if (!this.isChild()) // if (!this.isChild())

View file

@ -418,7 +418,7 @@ public class EntityHook extends Entity implements IObjectData
this.playSound(SoundEvent.SPLASH, 0.25F); this.playSound(SoundEvent.SPLASH, 0.25F);
float f8 = (float)ExtMath.floord(this.getEntityBoundingBox().minY); 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, 0); 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); worldserver.spawnParticle(ParticleType.WATER_DROP, 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); this.ticksCatchable = this.rand.range(10, 30);
} }
else else
@ -441,8 +441,8 @@ public class EntityHook extends Entity implements IObjectData
float f3 = f10 * 0.04F; float f3 = f10 * 0.04F;
float f4 = f11 * 0.04F; float f4 = f11 * 0.04F;
worldserver.spawnParticle(ParticleType.WATER_WAKE, d13, d15, d16, 0, (double)f4, 0.01D, (double)(-f3), 1.0D, 0); worldserver.spawnParticle(ParticleType.WATER_DROP, 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); worldserver.spawnParticle(ParticleType.WATER_DROP, d13, d15, d16, 0, (double)(-f4), 0.01D, (double)f3, 1.0D, 0);
} }
} }
} }

View file

@ -3,7 +3,6 @@ package common.entity.projectile;
import common.entity.Entity; import common.entity.Entity;
import common.entity.EntityType; import common.entity.EntityType;
import common.entity.types.EntityLiving; import common.entity.types.EntityLiving;
import common.init.SoundEvent;
import common.model.ParticleType; import common.model.ParticleType;
import common.tags.TagObject; import common.tags.TagObject;
import common.util.BlockPos; import common.util.BlockPos;
@ -40,7 +39,7 @@ public class EntityMissile extends EntityBullet {
public void onUpdate() { public void onUpdate() {
super.onUpdate(); super.onUpdate();
if(this.worldObj.client && this.age % 2 < 2) if(this.worldObj.client && this.age % 2 < 2)
this.worldObj.spawnParticle(ParticleType.SMOKE_NORMAL, this.posX, this.posY, this.posZ, this.rand.gaussian() * 0.05D, this.worldObj.spawnParticle(ParticleType.SMOKE, this.posX, this.posY, this.posZ, this.rand.gaussian() * 0.05D,
this.rand.gaussian() * 0.05D, this.rand.gaussian() * 0.05D); this.rand.gaussian() * 0.05D, this.rand.gaussian() * 0.05D);
if(!this.worldObj.client && this.age > this.fuse) if(!this.worldObj.client && this.age > this.fuse)
this.explode(); this.explode();

View file

@ -226,7 +226,7 @@ public abstract class EntityProjectile extends Entity
this.motionX *= (double)f2; this.motionX *= (double)f2;
this.motionY *= (double)f2; this.motionY *= (double)f2;
this.motionZ *= (double)f2; this.motionZ *= (double)f2;
this.worldObj.spawnParticle(ParticleType.SMOKE_NORMAL, this.posX, this.posY + 0.5D, this.posZ, 0.0D, 0.0D, 0.0D); this.worldObj.spawnParticle(ParticleType.SMOKE, this.posX, this.posY + 0.5D, this.posZ, 0.0D, 0.0D, 0.0D);
this.setPosition(this.posX, this.posY, this.posZ); this.setPosition(this.posX, this.posY, this.posZ);
} }
else else

View file

@ -3,6 +3,8 @@ package common.entity.projectile;
import common.entity.DamageSource; import common.entity.DamageSource;
import common.entity.types.EntityLiving; import common.entity.types.EntityLiving;
import common.entity.types.EntityThrowable; import common.entity.types.EntityThrowable;
import common.init.ItemRegistry;
import common.init.Items;
import common.model.ParticleType; import common.model.ParticleType;
import common.util.HitPosition; import common.util.HitPosition;
import common.vars.Vars; import common.vars.Vars;
@ -45,7 +47,7 @@ public class EntitySnowball extends EntityThrowable
for (int j = 0; j < 8; ++j) for (int j = 0; j < 8; ++j)
{ {
this.worldObj.spawnParticle(ParticleType.SNOWBALL, this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D); this.worldObj.spawnParticle(ParticleType.ITEM_CRACK, this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D, ItemRegistry.getId(Items.snowball));
} }
if (!this.worldObj.client) if (!this.worldObj.client)

View file

@ -51,7 +51,6 @@ import common.pathfinding.PathNavigate;
import common.pathfinding.PathNavigateGround; import common.pathfinding.PathNavigateGround;
import common.potion.Potion; import common.potion.Potion;
import common.potion.PotionEffect; import common.potion.PotionEffect;
import common.potion.PotionHelper;
import common.rng.Random; import common.rng.Random;
import common.tags.TagObject; import common.tags.TagObject;
import common.util.BlockPos; import common.util.BlockPos;
@ -181,8 +180,6 @@ public abstract class EntityLiving extends Entity
protected void entityInit() protected void entityInit()
{ {
this.dataWatcher.addObject(2, 0); // potion color
this.dataWatcher.addObject(3, (byte)0); // potion ambient
this.dataWatcher.addObject(4, (byte)0); // arrows this.dataWatcher.addObject(4, (byte)0); // arrows
this.dataWatcher.addObject(5, 1); // max health this.dataWatcher.addObject(5, 1); // max health
this.dataWatcher.addObject(6, 1); // health this.dataWatcher.addObject(6, 1); // health
@ -224,7 +221,7 @@ public abstract class EntityLiving extends Entity
} }
int i = (int)(150.0D * d0); int i = (int)(150.0D * d0);
((AWorldServer)this.worldObj).spawnParticle(ParticleType.BLOCK_DUST, this.posX, this.posY, this.posZ, i, 0.0D, 0.0D, 0.0D, 0.15000000596046448D, BlockRegistry.getId(iblockstate)); ((AWorldServer)this.worldObj).spawnParticle(ParticleType.BLOCK_CRACK, this.posX, this.posY, this.posZ, i, 0.0D, 0.0D, 0.0D, 0.15000000596046448D, BlockRegistry.getId(iblockstate));
} }
} }
@ -661,36 +658,6 @@ public abstract class EntityLiving extends Entity
this.effectsDirty = false; this.effectsDirty = false;
} }
int i = this.dataWatcher.getWatchableObjectInt(2);
boolean flag1 = this.dataWatcher.getWatchableObjectByte(3) > 0;
if (i > 0)
{
boolean flag = false;
// if (!this.isInvisible())
// {
flag = this.rand.chance();
// }
// else
// {
// flag = this.rand.chance(15);
// }
if (flag1)
{
flag &= this.rand.chance(5);
}
if (flag && i > 0)
{
double d0 = (double)(i >> 16 & 255) / 255.0D;
double d1 = (double)(i >> 8 & 255) / 255.0D;
double d2 = (double)(i >> 0 & 255) / 255.0D;
this.worldObj.spawnParticle(flag1 ? ParticleType.SPELL_MOB_AMBIENT : ParticleType.SPELL_MOB, this.posX + (this.rand.doublev() - 0.5D) * (double)this.width, this.posY + this.rand.doublev() * (double)this.height, this.posZ + (this.rand.doublev() - 0.5D) * (double)this.width, d0, d1, d2);
}
}
} }
/** /**
@ -699,27 +666,6 @@ public abstract class EntityLiving extends Entity
*/ */
protected void updateEffectMeta() protected void updateEffectMeta()
{ {
if (this.effects.isEmpty())
{
this.resetPotionEffectMetadata();
// this.setInvisible(false);
}
else
{
int i = PotionHelper.calcPotionLiquidColor(this.effects.values());
this.dataWatcher.updateObject(3, Byte.valueOf((byte)(PotionHelper.getAreAmbient(this.effects.values()) ? 1 : 0)));
this.dataWatcher.updateObject(2, Integer.valueOf(i));
// this.setInvisible(this.hasEffect(Potion.invisibility.id));
}
}
/**
* Resets the potion effect color and ambience metadata values
*/
protected void resetPotionEffectMetadata()
{
this.dataWatcher.updateObject(3, Byte.valueOf((byte)0));
this.dataWatcher.updateObject(2, Integer.valueOf(0));
} }
public void clearEffects(boolean negative) public void clearEffects(boolean negative)

View file

@ -69,7 +69,7 @@ public abstract class EntityTameable extends EntityAnimal implements IEntityOwna
if (!play) if (!play)
{ {
enumparticletypes = ParticleType.SMOKE_NORMAL; enumparticletypes = ParticleType.SMOKE;
} }
for (int i = 0; i < 7; ++i) for (int i = 0; i < 7; ++i)

View file

@ -21,7 +21,6 @@ import common.entity.npc.EntityGoblin;
import common.entity.npc.EntityHaunter; import common.entity.npc.EntityHaunter;
import common.entity.npc.EntityHuman; import common.entity.npc.EntityHuman;
import common.entity.npc.EntityMage; import common.entity.npc.EntityMage;
import common.entity.npc.EntityMagma;
import common.entity.npc.EntityMetalhead; import common.entity.npc.EntityMetalhead;
import common.entity.npc.EntityNPC; import common.entity.npc.EntityNPC;
import common.entity.npc.EntityOrc; import common.entity.npc.EntityOrc;
@ -123,7 +122,6 @@ public abstract class SpeciesRegistry {
":mage_4", ":mage_5", ":mage_6"); ":mage_4", ":mage_5", ":mage_6");
registerSpecies("Gargoyle", EntityGargoyle.class, "tbd", "Gargoyle", 0x401010, 0x534437); registerSpecies("Gargoyle", EntityGargoyle.class, "tbd", "Gargoyle", 0x401010, 0x534437);
registerSpecies("Slime", EntitySlime.class, "tbd", "Schleim", ModelType.SLIME, 0x51a03e, 0x7ebf6e); registerSpecies("Slime", EntitySlime.class, "tbd", "Schleim", ModelType.SLIME, 0x51a03e, 0x7ebf6e);
registerSpecies("Magma", EntityMagma.class, "thedric", "Magmaschleim", ModelType.SLIME, 0x340000, 0xfcfc00);
registerSpecies("Orc", EntityOrc.class, "tbd", "Ork", 0x00af00, 0x004000, ":orc_1", ":orc_2", ":orc_3", registerSpecies("Orc", EntityOrc.class, "tbd", "Ork", 0x00af00, 0x004000, ":orc_1", ":orc_2", ":orc_3",
":orc_4", ":orc_5", ":orc_6", ":orc_7", ":orc_8", ":orc_9", ":orc_10", ":orc_11", ":orc_12"); ":orc_4", ":orc_5", ":orc_6", ":orc_7", ":orc_8", ":orc_9", ":orc_10", ":orc_11", ":orc_12");
registerSpecies("Vampire", EntityVampire.class, "transylvania", "Vampir", 0x7f0000, 0xff0000, ":vampire_1", ":vampire_2", ":vampire_3", registerSpecies("Vampire", EntityVampire.class, "transylvania", "Vampir", 0x7f0000, 0xff0000, ":vampire_1", ":vampire_2", ":vampire_3",

View file

@ -277,7 +277,7 @@ public class ItemBucket extends Item
for (int l = 0; l < 8; ++l) for (int l = 0; l < 8; ++l)
{ {
worldIn.spawnParticle(ParticleType.SMOKE_LARGE, (double)i + Math.random(), (double)j + Math.random(), (double)k + Math.random(), 0.0D, 0.0D, 0.0D); worldIn.spawnParticle(ParticleType.SMOKE, (double)i + Math.random(), (double)j + Math.random(), (double)k + Math.random(), 0.0D, 0.0D, 0.0D);
} }
} }
else else

View file

@ -69,7 +69,7 @@ public class ItemChargedOrb extends ItemFragile
double d3 = 0.0D; double d3 = 0.0D;
double d4 = 0.0D; double d4 = 0.0D;
double d5 = 0.0D; double d5 = 0.0D;
worldIn.spawnParticle(ParticleType.SMOKE_NORMAL, d0, d1, d2, d3, d4, d5); worldIn.spawnParticle(ParticleType.SMOKE, d0, d1, d2, d3, d4, d5);
} }
Facing enumfacing = (Facing)iblockstate.getValue(BlockPortalFrame.FACING); Facing enumfacing = (Facing)iblockstate.getValue(BlockPortalFrame.FACING);

View file

@ -4,44 +4,24 @@ import common.util.Identifyable;
public enum ParticleType implements Identifyable { public enum ParticleType implements Identifyable {
EXPLOSION_NORMAL("explode", true), EXPLOSION_NORMAL("explode", true),
EXPLOSION_LARGE("largeexplode", true), EXPLOSION_LARGE("explode_large", true),
EXPLOSION_HUGE("hugeexplosion", true), EXPLOSION_HUGE("explode_huge", true),
FIREWORKS_SPARK("fireworksSpark"),
WATER_BUBBLE("bubble"), WATER_BUBBLE("bubble"),
WATER_SPLASH("splash"), WATER_SPLASH("splash"),
WATER_WAKE("wake"), DEPTH("depth"),
SUSPENDED("suspended"),
SUSPENDED_DEPTH("depthsuspend"),
CRIT("crit"), CRIT("crit"),
CRIT_MAGIC("magicCrit"), SMOKE("smoke"),
SMOKE_NORMAL("smoke"), POTION("potion"),
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"), GROW("grow"),
TOWN_AURA("townaura"), SPORE("spore"),
NOTE("note"), TELEPORT("teleport"),
PORTAL("portal"),
ENCHANTMENT_TABLE("enchantmenttable"),
FLAME("flame"), FLAME("flame"),
LAVA("lava"), LAVA("lava"),
FOOTSTEP("footstep"), DUST("dust"),
CLOUD("cloud"),
REDSTONE("reddust"),
SNOWBALL("snowballpoof"),
SNOW_SHOVEL("snowshovel"),
SLIME("slime"),
HEART("heart"), HEART("heart"),
ITEM_CRACK("iconcrack"), ITEM_CRACK("item_crack"),
BLOCK_CRACK("blockcrack"), BLOCK_CRACK("block_crack"),
BLOCK_DUST("blockdust"),
WATER_DROP("droplet"), WATER_DROP("droplet"),
ITEM_TAKE("take"),
HAIL_CORN("hail"); HAIL_CORN("hail");
private final String name; private final String name;

View file

@ -334,7 +334,7 @@ public class Explosion
d4 = d4 * d7; d4 = d4 * d7;
d5 = d5 * d7; d5 = d5 * d7;
this.worldObj.spawnParticle(ParticleType.EXPLOSION_NORMAL, (d0 + this.explosionX * 1.0D) / 2.0D, (d1 + this.explosionY * 1.0D) / 2.0D, (d2 + this.explosionZ * 1.0D) / 2.0D, d3, d4, d5); this.worldObj.spawnParticle(ParticleType.EXPLOSION_NORMAL, (d0 + this.explosionX * 1.0D) / 2.0D, (d1 + this.explosionY * 1.0D) / 2.0D, (d2 + this.explosionZ * 1.0D) / 2.0D, d3, d4, d5);
this.worldObj.spawnParticle(ParticleType.SMOKE_NORMAL, d0, d1, d2, d3, d4, d5); this.worldObj.spawnParticle(ParticleType.SMOKE, d0, d1, d2, d3, d4, d5);
} }
if (block != Blocks.air) if (block != Blocks.air)

View file

@ -4,7 +4,6 @@ import common.biome.Biome;
import common.entity.npc.EntityBloodElf; import common.entity.npc.EntityBloodElf;
import common.entity.npc.EntityCultivator; import common.entity.npc.EntityCultivator;
import common.entity.npc.EntityFireDemon; import common.entity.npc.EntityFireDemon;
import common.entity.npc.EntityMagma;
import common.entity.npc.EntityMetalhead; import common.entity.npc.EntityMetalhead;
import common.entity.npc.EntityTiefling; import common.entity.npc.EntityTiefling;
import common.init.Blocks; import common.init.Blocks;
@ -71,7 +70,6 @@ public class BiomeHell extends GenBiome
protected void addMobs(WeightedList<RngSpawn> mobs) { protected void addMobs(WeightedList<RngSpawn> mobs) {
mobs.add(new RngSpawn(EntityFireDemon.class, 50, 4, 4)); mobs.add(new RngSpawn(EntityFireDemon.class, 50, 4, 4));
mobs.add(new RngSpawn(EntityTiefling.class, 100, 4, 4)); mobs.add(new RngSpawn(EntityTiefling.class, 100, 4, 4));
mobs.add(new RngSpawn(EntityMagma.class, 1, 4, 4));
} }
public void decorate(WorldServer worldIn, Random rand, BlockPos pos) public void decorate(WorldServer worldIn, Random rand, BlockPos pos)

View file

@ -31,18 +31,10 @@ public class EnumParser<T> extends DefaultingParser {
public T parse(CommandEnvironment env, String input) { public T parse(CommandEnvironment env, String input) {
T value = this.lookup.get(input.toLowerCase()); T value = this.lookup.get(input.toLowerCase());
if(value != null) if(value == null)
return value;
int id = -1;
try {
id = Integer.parseInt(input);
}
catch(NumberFormatException e) {
}
if(id < 0 || id >= this.selections.length)
throw new RunException("Ungültige Auswahl '%s', muss eine von diesen Optionen sein: %s", input, throw new RunException("Ungültige Auswahl '%s', muss eine von diesen Optionen sein: %s", input,
joinArgs(this.selections)); joinArgs(this.selections));
return this.selections[id]; return value;
} }
public Class<?> getTypeClass(boolean required) { public Class<?> getTypeClass(boolean required) {

View file

@ -1699,7 +1699,7 @@ public final class WorldServer extends AWorldServer {
(float)player.posX, (float)this.getSeaLevel() + 4.0f, (float)player.posZ, (float)128.0, (float)player.posX, (float)this.getSeaLevel() + 4.0f, (float)player.posZ, (float)128.0,
(float)2.0, (float)128.0, (float)0.15, 1000, 0); (float)2.0, (float)128.0, (float)0.15, 1000, 0);
player.connection.sendPacket(packet); player.connection.sendPacket(packet);
packet = new SPacketParticles(ParticleType.CLOUD, true, packet = new SPacketParticles(ParticleType.EXPLOSION_NORMAL, true,
(float)player.posX, (float)this.getSeaLevel() + 4.0f, (float)player.posZ, (float)128.0, (float)player.posX, (float)this.getSeaLevel() + 4.0f, (float)player.posZ, (float)128.0,
(float)2.0, (float)128.0, (float)0.15, 1000, 0); (float)2.0, (float)128.0, (float)0.15, 1000, 0);
player.connection.sendPacket(packet); player.connection.sendPacket(packet);

View file

@ -2,7 +2,6 @@ package server.worldgen;
import common.entity.npc.EntityDarkMage; import common.entity.npc.EntityDarkMage;
import common.entity.npc.EntityMage; import common.entity.npc.EntityMage;
import common.entity.npc.EntityMagma;
import common.entity.npc.EntityTiefling; import common.entity.npc.EntityTiefling;
import common.entity.npc.EntityUndead; import common.entity.npc.EntityUndead;
import common.rng.WeightedList; import common.rng.WeightedList;
@ -11,6 +10,5 @@ import server.biome.RngSpawn;
public abstract class MobConstants { public abstract class MobConstants {
public static final WeightedList<RngSpawn> MAGEHUT_MOBS = new WeightedList<RngSpawn>(new RngSpawn(EntityMage.class, 1, 1, 1)); public static final WeightedList<RngSpawn> MAGEHUT_MOBS = new WeightedList<RngSpawn>(new RngSpawn(EntityMage.class, 1, 1, 1));
public static final WeightedList<RngSpawn> FORTRESS_MOBS = new WeightedList<RngSpawn>(new RngSpawn(EntityDarkMage.class, 10, 2, 3), public static final WeightedList<RngSpawn> FORTRESS_MOBS = new WeightedList<RngSpawn>(new RngSpawn(EntityDarkMage.class, 10, 2, 3),
new RngSpawn(EntityTiefling.class, 5, 4, 4), new RngSpawn(EntityUndead.class, 10, 4, 4), new RngSpawn(EntityTiefling.class, 5, 4, 4), new RngSpawn(EntityUndead.class, 10, 4, 4));
new RngSpawn(EntityMagma.class, 3, 4, 4));
} }