more particle improvements

This commit is contained in:
Sen 2025-07-10 18:24:08 +02:00
parent 28d6850668
commit d95a3f8b11
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
58 changed files with 266 additions and 444 deletions

View file

@ -149,13 +149,10 @@ public class EntityAIMate extends EntityAIBase
for (int i = 0; i < 7; ++i)
{
double d0 = random.gaussian() * 0.02D;
double d1 = random.gaussian() * 0.02D;
double d2 = random.gaussian() * 0.02D;
double d3 = random.doublev() * (double)this.theAnimal.width * 2.0D - (double)this.theAnimal.width;
double d4 = 0.5D + random.doublev() * (double)this.theAnimal.height;
double d5 = random.doublev() * (double)this.theAnimal.width * 2.0D - (double)this.theAnimal.width;
this.theWorld.spawnParticle(ParticleType.HEART, this.theAnimal.posX + d3, this.theAnimal.posY + d4, this.theAnimal.posZ + d5, d0, d1, d2);
this.theWorld.spawnParticle(ParticleType.HEART, this.theAnimal.posX + d3, this.theAnimal.posY + d4, this.theAnimal.posZ + d5);
}
if (entityplayer != null && Vars.breedingXP) // FIX xp

View file

@ -156,13 +156,10 @@ public class BlockDragonEgg extends Block
for (int j = 0; j < 128; ++j)
{
double d0 = worldIn.rand.doublev();
float f = (worldIn.rand.floatv() - 0.5F) * 0.2F;
float f1 = (worldIn.rand.floatv() - 0.5F) * 0.2F;
float f2 = (worldIn.rand.floatv() - 0.5F) * 0.2F;
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 d3 = (double)blockpos.getZ() + (double)(pos.getZ() - blockpos.getZ()) * d0 + (worldIn.rand.doublev() - 0.5D) * 1.0D + 0.5D;
worldIn.spawnParticle(ParticleType.TELEPORT, d1, d2, d3, (double)f, (double)f1, (double)f2);
worldIn.spawnParticle(ParticleType.TELEPORT, d1, d2, d3);
}
}
else

View file

@ -96,10 +96,7 @@ public class BlockFloorPortal extends Block
double d0 = (double)((float)pos.getX() + rand.floatv());
double d1 = (double)((float)pos.getY() + 0.8F);
double d2 = (double)((float)pos.getZ() + rand.floatv());
double d3 = 0.0D;
double d4 = 0.0D;
double d5 = 0.0D;
worldIn.spawnParticle(ParticleType.SMOKE, d0, d1, d2, d3, d4, d5);
worldIn.spawnParticle(ParticleType.SMOKE, d0, d1, d2);
}
public Item getItem(World worldIn, BlockPos pos)

View file

@ -224,23 +224,18 @@ public class BlockPortal extends Block
double d0 = (double)((float)pos.getX() + rand.floatv());
double d1 = (double)((float)pos.getY() + rand.floatv());
double d2 = (double)((float)pos.getZ() + rand.floatv());
double d3 = ((double)rand.floatv() - 0.5D) * 0.5D;
double d4 = ((double)rand.floatv() - 0.5D) * 0.5D;
double d5 = ((double)rand.floatv() - 0.5D) * 0.5D;
int j = rand.zrange(2) * 2 - 1;
if (worldIn.getState(pos.west()).getBlock() != this && worldIn.getState(pos.east()).getBlock() != this)
{
d0 = (double)pos.getX() + 0.5D + 0.25D * (double)j;
d3 = (double)(rand.floatv() * 2.0F * (float)j);
}
else
{
d2 = (double)pos.getZ() + 0.5D + 0.25D * (double)j;
d5 = (double)(rand.floatv() * 2.0F * (float)j);
}
worldIn.spawnParticle(ParticleType.TELEPORT, d0, d1, d2, d3, d4, d5);
worldIn.spawnParticle(ParticleType.TELEPORT, d0, d1, d2);
}
}

View file

@ -75,7 +75,7 @@ public class BlockMycelium extends Block
if (rand.chance(10))
{
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);
worldIn.spawnParticle(ParticleType.SPORE, (double)((float)pos.getX() + rand.floatv()), (double)((float)pos.getY() + 1.1F), (double)((float)pos.getZ() + rand.floatv()));
}
}

View file

@ -270,7 +270,7 @@ public abstract class BlockLiquid extends Block
double d8 = d0 + (double)rand.floatv();
double d4 = d1 + this.maxY;
double d6 = d2 + (double)rand.floatv();
worldIn.spawnParticle(ParticleType.LAVA, d8, d4, d6, 0.0D, 0.0D, 0.0D);
worldIn.spawnParticle(ParticleType.LAVA, d8, d4, d6);
worldIn.playSound(d8, d4, d6, SoundEvent.LAVA_POP, 0.2F + rand.floatv() * 0.2F);
}
@ -349,7 +349,7 @@ public abstract class BlockLiquid extends Block
for (int i = 0; i < 8; ++i)
{
worldIn.spawnParticle(ParticleType.SMOKE, 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());
}
}

View file

@ -17,7 +17,7 @@ public class BlockBedrock extends Block {
{
if(/* worldIn.canShowVoidParticles() && */ pos.getY() <= 5 && rand.chance(8)) {
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());
}
}
}

View file

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

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))
{
worldIn.spawnParticle(ParticleType.DUST, d1, d2, d3, 1.0D, 0.0D, 0.0D);
worldIn.spawnParticle(ParticleType.DUST, d1, d2, d3, 0xff0000);
}
}
}

View file

@ -458,7 +458,7 @@ public class BlockBrewingStand extends BlockContainer
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 d2 = (double)((float)pos.getZ() + 0.4F + rand.floatv() * 0.2F);
worldIn.spawnParticle(ParticleType.SMOKE, d0, d1, d2, 0.0D, 0.0D, 0.0D);
worldIn.spawnParticle(ParticleType.SMOKE, d0, d1, d2);
}
public void onBlockRemoved(AWorldServer worldIn, BlockPos pos, State state)

View file

@ -98,23 +98,23 @@ public class BlockFurnace extends BlockContainer implements Rotatable
switch (enumfacing)
{
case WEST:
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.SMOKE, d0 - d3, d1, d2 + d4);
worldIn.spawnParticle(ParticleType.FLAME, d0 - d3, d1, d2 + d4);
break;
case EAST:
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.SMOKE, d0 + d3, d1, d2 + d4);
worldIn.spawnParticle(ParticleType.FLAME, d0 + d3, d1, d2 + d4);
break;
case NORTH:
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.SMOKE, d0 + d4, d1, d2 - d3);
worldIn.spawnParticle(ParticleType.FLAME, d0 + d4, d1, d2 - d3);
break;
case SOUTH:
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.SMOKE, d0 + d4, d1, d2 + d3);
worldIn.spawnParticle(ParticleType.FLAME, d0 + d4, d1, d2 + d3);
}
}
}

View file

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

View file

@ -140,7 +140,7 @@ public class BlockRedstoneTorch extends BlockTorch
double d0 = (double)pos.getX() + 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;
worldIn.spawnParticle(ParticleType.SMOKE, d0, d1, d2, 0.0D, 0.0D, 0.0D);
worldIn.spawnParticle(ParticleType.SMOKE, d0, d1, d2);
}
worldIn.scheduleUpdate(pos, worldIn.getState(pos).getBlock(), 160);
@ -206,7 +206,7 @@ public class BlockRedstoneTorch extends BlockTorch
d2 += 0.27D * (double)enumfacing1.getFrontOffsetZ();
}
worldIn.spawnParticle(ParticleType.DUST, d0, d1, d2, 1.0D, 0.0D, 0.0D);
worldIn.spawnParticle(ParticleType.DUST, d0, d1, d2, 0xff0000);
}
}

View file

@ -785,11 +785,7 @@ public class BlockRedstoneWire extends Block
double d0 = (double)pos.getX() + 0.5D + ((double)rand.floatv() - 0.5D) * 0.2D;
double d1 = (double)((float)pos.getY() + 0.0625F);
double d2 = (double)pos.getZ() + 0.5D + ((double)rand.floatv() - 0.5D) * 0.2D;
float f = (float)i / 15.0F;
float f1 = f * 0.6F + 0.4F;
float f2 = Math.max(0.0F, f * f * 0.7F - 0.5F);
float f3 = Math.max(0.0F, f * f * 0.6F - 0.7F);
worldIn.spawnParticle(ParticleType.DUST, d0, d1, d2, (double)f1, (double)f2, (double)f3);
worldIn.spawnParticle(ParticleType.DUST, d0, d1, d2, this.colorMultiplier(i));
}
}

View file

@ -229,13 +229,13 @@ public class BlockTorch extends Block implements DirectionalUp
if (enumfacing.getAxis().isHorizontal())
{
Facing enumfacing1 = enumfacing.getOpposite();
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.SMOKE, d0 + d4 * (double)enumfacing1.getFrontOffsetX(), d1 + d3, d2 + d4 * (double)enumfacing1.getFrontOffsetZ());
worldIn.spawnParticle(ParticleType.FLAME, d0 + d4 * (double)enumfacing1.getFrontOffsetX(), d1 + d3, d2 + d4 * (double)enumfacing1.getFrontOffsetZ());
}
else
{
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.SMOKE, d0, d1, d2);
worldIn.spawnParticle(ParticleType.FLAME, d0, d1, d2);
}
}

View file

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

View file

@ -1006,7 +1006,7 @@ public abstract class Entity
{
float f2 = (this.rand.floatv() * 2.0F - 1.0F) * this.width;
float f3 = (this.rand.floatv() * 2.0F - 1.0F) * this.width;
this.worldObj.spawnParticle(ParticleType.SPLASH, this.posX + (double)f2, (double)(f1 + 1.0F), this.posZ + (double)f3, this.motionX, this.motionY - (double)(this.rand.floatv() * 0.2F), this.motionZ);
this.worldObj.spawnParticle(ParticleType.SPLASH, this.posX + (double)f2, (double)(f1 + 1.0F), this.posZ + (double)f3);
}
if(this.worldObj.getState(new BlockPos(this.posX, this.posY, this.posZ)).getBlock().getMaterial() == Material.WATER) {
@ -1014,7 +1014,7 @@ public abstract class Entity
{
float f4 = (this.rand.floatv() * 2.0F - 1.0F) * this.width;
float f5 = (this.rand.floatv() * 2.0F - 1.0F) * this.width;
this.worldObj.spawnParticle(ParticleType.SPLASH, this.posX + (double)f4, (double)(f1 + 1.0F), this.posZ + (double)f5, this.motionX, this.motionY, this.motionZ);
this.worldObj.spawnParticle(ParticleType.SPLASH, this.posX + (double)f4, (double)(f1 + 1.0F), this.posZ + (double)f5);
}
}
}
@ -1041,7 +1041,7 @@ public abstract class Entity
if (block.getRenderType() != -1)
{
this.worldObj.spawnParticle(ParticleType.BLOCK_CRACK, this.posX + ((double)this.rand.floatv() - 0.5D) * (double)this.width, this.getEntityBoundingBox().minY + 0.1D, this.posZ + ((double)this.rand.floatv() - 0.5D) * (double)this.width, -this.motionX * 4.0D, 1.5D, -this.motionZ * 4.0D, BlockRegistry.getId(iblockstate));
this.worldObj.spawnParticle(ParticleType.BLOCK_CRACK, this.posX + ((double)this.rand.floatv() - 0.5D) * (double)this.width, this.getEntityBoundingBox().minY + 0.1D, this.posZ + ((double)this.rand.floatv() - 0.5D) * (double)this.width, BlockRegistry.getId(iblockstate));
}
}

View file

@ -121,7 +121,7 @@ public class EntityDragon extends EntityLiving implements IEntityMultiPart
float f11 = (this.rand.floatv() - 0.5F) * 8.0F;
float f13 = (this.rand.floatv() - 0.5F) * 4.0F;
float f14 = (this.rand.floatv() - 0.5F) * 8.0F;
this.worldObj.spawnParticle(ParticleType.EXPLOSION_LARGE, this.posX + (double)f11, this.posY + 2.0D + (double)f13, this.posZ + (double)f14, 0.0D, 0.0D, 0.0D);
this.worldObj.spawnParticle(ParticleType.EXPLOSION_LARGE, this.posX + (double)f11, this.posY + 2.0D + (double)f13, this.posZ + (double)f14, 100);
}
else
{

View file

@ -1716,10 +1716,7 @@ public class EntityHorse extends EntityAnimal implements IInvBasic
for (int i = 0; i < 7; ++i)
{
double d0 = this.rand.gaussian() * 0.02D;
double d1 = this.rand.gaussian() * 0.02D;
double d2 = this.rand.gaussian() * 0.02D;
this.worldObj.spawnParticle(enumparticletypes, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posY + 0.5D + (double)(this.rand.floatv() * this.height), this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, d0, d1, d2);
this.worldObj.spawnParticle(enumparticletypes, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posY + 0.5D + (double)(this.rand.floatv() * this.height), this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width);
}
}

View file

@ -46,7 +46,7 @@ public class EntityMooshroom extends EntityCow
if (itemstack != null && itemstack.getItem() instanceof ItemShears && !this.isChild())
{
this.setDead();
this.worldObj.spawnParticle(ParticleType.EXPLOSION_LARGE, this.posX, this.posY + (double)(this.height / 2.0F), this.posZ, 0.0D, 0.0D, 0.0D);
this.worldObj.spawnParticle(ParticleType.EXPLOSION_LARGE, this.posX, this.posY + (double)(this.height / 2.0F), this.posZ, 100);
if (!this.worldObj.client)
{

View file

@ -36,7 +36,6 @@ import common.potion.StatusEffect;
import common.tags.TagObject;
import common.util.BlockPos;
import common.util.ExtMath;
import common.util.ParticleType;
import common.util.Vec3;
import common.vars.Vars;
import common.world.State;
@ -330,7 +329,7 @@ public class EntityRabbit extends EntityAnimal {
}
protected void consumeBlock(BlockPos pos, State state) {
this.worldObj.setEntityState(this, (byte)19);
this.worldObj.playAuxSFX(2001, pos, BlockRegistry.getId(state));
this.foodCooldown = this.rand.excl(10, this.isChild() ? 20 : 50);
if(this.isChild())
this.grow(this.rand.range(250, 350));
@ -353,13 +352,6 @@ public class EntityRabbit extends EntityAnimal {
this.jumpRotFactor = 10;
this.jumpRotTimer = 0;
}
else if(id == 19) {
this.worldObj.spawnParticle(ParticleType.BLOCK_CRACK,
this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width,
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,
BlockRegistry.getId(this.worldObj.getState(this.getPosition())));
}
else {
super.handleStatusUpdate(id);
}

View file

@ -249,7 +249,7 @@ public class EntityWolf extends EntityTameable
{
float f1 = (this.rand.floatv() * 2.0F - 1.0F) * this.width * 0.5F;
float f2 = (this.rand.floatv() * 2.0F - 1.0F) * this.width * 0.5F;
this.worldObj.spawnParticle(ParticleType.SPLASH, this.posX + (double)f1, (double)(f + 0.8F), this.posZ + (double)f2, this.motionX, this.motionY, this.motionZ);
this.worldObj.spawnParticle(ParticleType.SPLASH, this.posX + (double)f1, (double)(f + 0.8F), this.posZ + (double)f2);
}
}
}

View file

@ -279,13 +279,13 @@ public class EntityBoat extends Entity
{
double d7 = this.posX - d2 * d5 * 0.8D + d4 * d6;
double d8 = this.posZ - d4 * d5 * 0.8D - d2 * d6;
this.worldObj.spawnParticle(ParticleType.SPLASH, d7, this.posY - 0.125D, d8, this.motionX, this.motionY, this.motionZ);
this.worldObj.spawnParticle(ParticleType.SPLASH, d7, this.posY - 0.125D, d8);
}
else
{
double d24 = this.posX + d2 + d4 * d5 * 0.7D;
double d25 = this.posZ + d4 - d2 * d5 * 0.7D;
this.worldObj.spawnParticle(ParticleType.SPLASH, d24, this.posY - 0.125D, d25, this.motionX, this.motionY, this.motionZ);
this.worldObj.spawnParticle(ParticleType.SPLASH, d24, this.posY - 0.125D, d25);
}
}
}

View file

@ -66,11 +66,10 @@ public class EntityItem extends Entity
public void fall(float distance, float damageMultiplier)
{
if(!this.worldObj.client && Vars.itemFallDamage && distance >= 1.0f && this.getEntityItem().getItem().isFragile()) {
// for(int z = 0; z < 8; z++) {
((AWorldServer)this.worldObj).spawnParticle(ParticleType.ITEM_CRACK, this.posX, this.posY, this.posZ,
8, this.rand.gaussian() * 0.15D, this.rand.doublev() * 0.2D, this.rand.gaussian() * 0.15D, 0.1f,
ItemRegistry.getId(this.getEntityItem().getItem()));
// }
for(int z = 0; z < 8; z++) {
((AWorldServer)this.worldObj).spawnParticles(ParticleType.ITEM_CRACK, this.posX + this.rand.drange(-0.15, 0.15), this.posY + 0.15, this.posZ + this.rand.drange(-0.15, 0.15),
ItemRegistry.getId(this.getEntityItem().getItem()));
}
this.worldObj.playAuxSFX(1023, this.getPosition(), 0);
this.setDead();
}

View file

@ -82,7 +82,7 @@ public class EntityNuke extends Entity
{
this.handleWaterMovement();
// if(!this.isInvisible()) {
this.worldObj.spawnParticle(ParticleType.FLAME, this.posX, this.posY + 1.1D, this.posZ, 0.0D, 0.0D, 0.0D);
this.worldObj.spawnParticle(ParticleType.FLAME, this.posX, this.posY + 1.1D, this.posZ);
// }
}
}

View file

@ -64,7 +64,7 @@ public class EntityOrb extends EntityThrowable
for (int i = 0; i < 32; ++i)
{
this.worldObj.spawnParticle(ParticleType.TELEPORT, 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 - 0.25 + this.rand.doublev() * 0.5, this.posY + this.rand.doublev() * 2.0D, this.posZ - 0.25 + this.rand.doublev() * 0.5);
}
if (!this.worldObj.client)

View file

@ -96,7 +96,7 @@ public class EntityTnt extends Entity implements IObjectData
else
{
this.handleWaterMovement();
this.worldObj.spawnParticle(ParticleType.SMOKE, 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);
}
}

View file

@ -50,7 +50,7 @@ public class EntityTntCart extends EntityCart
if (this.minecartTNTFuse > 0)
{
--this.minecartTNTFuse;
this.worldObj.spawnParticle(ParticleType.SMOKE, 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);
}
else if (this.minecartTNTFuse == 0)
{

View file

@ -337,14 +337,10 @@ public class EntityXp extends Entity implements IObjectData
this.xpValue = id;
for (int i = 0; i < 2; i++)
{
double d0 = this.rand.gaussian() * 0.02D;
double d1 = this.rand.gaussian() * 0.02D;
double d2 = this.rand.gaussian() * 0.02D;
this.worldObj.spawnParticle(ParticleType.GROW,
this.posX + (double)(this.rand.floatv() * this.width) - (double)this.width * 0.5,
this.posY + (double)(this.rand.floatv() * this.height),
this.posZ + (double)(this.rand.floatv() * this.width) - (double)this.width * 0.5,
d0, d1, d2);
this.posZ + (double)(this.rand.floatv() * this.width) - (double)this.width * 0.5);
}
}

View file

@ -91,7 +91,7 @@ public class EntityDarkMage extends EntityHoveringNPC {
for(int i = 0; i < 2; ++i) {
this.worldObj.spawnParticle(ParticleType.SMOKE, 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, 0.0D, 0.0D, 0.0D);
this.posZ + (this.rand.doublev() - 0.5D) * (double)this.width);
}
}
super.onLivingUpdate();

View file

@ -88,14 +88,14 @@ public class EntityGargoyle extends EntityFlyingNPC
for (int l = 0; l < 5; ++l)
{
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);
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);
}
if (this.getInvulTime() > 0)
{
for (int i1 = 0; i1 < 3; ++i1)
{
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);
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);
}
}
}

View file

@ -610,10 +610,7 @@ public abstract class EntityNPC extends EntityLiving
if (this.inLove == 10)
{
this.inLove = 0;
double d0 = this.rand.gaussian() * 0.02D;
double d1 = this.rand.gaussian() * 0.02D;
double d2 = this.rand.gaussian() * 0.02D;
this.worldObj.spawnParticle(ParticleType.HEART, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posY + 0.5D + (double)(this.rand.floatv() * this.height), this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, d0, d1, d2);
this.worldObj.spawnParticle(ParticleType.HEART, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posY + 0.5D + (double)(this.rand.floatv() * this.height), this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width);
}
}
else {
@ -1234,19 +1231,19 @@ public abstract class EntityNPC extends EntityLiving
}
else {
this.worldObj.playAuxSFX(1013, new BlockPos(ox, oy, oz), 0);
((AWorldServer)this.worldObj).spawnParticle(ParticleType.TELEPORT,
ox + (this.rand.doublev() - 0.5D) * (double)this.width * 2.0D,
oy + this.rand.doublev() * (double)this.height,
oz + (this.rand.doublev() - 0.5D) * (double)this.width * 2.0D, 8,
(this.rand.floatv() - 0.5F) * 0.2F, (this.rand.floatv() - 0.5F) * 0.2F, (this.rand.floatv() - 0.5F) * 0.2F,
0.15D, 0);
for(int n = 0; n < 8; n++) {
((AWorldServer)this.worldObj).spawnParticles(ParticleType.TELEPORT,
ox + (this.rand.doublev() - 0.5D) * (double)this.width * 2.0D,
oy + this.rand.doublev() * (double)this.height,
oz + (this.rand.doublev() - 0.5D) * (double)this.width * 2.0D);
}
this.worldObj.playAuxSFX(1005, this.getPosition(), 0);
((AWorldServer)this.worldObj).spawnParticle(ParticleType.TELEPORT,
this.posX + (this.rand.doublev() - 0.5D) * (double)this.width * 2.0D,
this.posY + this.rand.doublev() * (double)this.height,
this.posZ + (this.rand.doublev() - 0.5D) * (double)this.width * 2.0D, 8,
(this.rand.floatv() - 0.5F) * 0.2F, (this.rand.floatv() - 0.5F) * 0.2F, (this.rand.floatv() - 0.5F) * 0.2F,
0.15D, 0);
for(int n = 0; n < 8; n++) {
((AWorldServer)this.worldObj).spawnParticles(ParticleType.TELEPORT,
this.posX + (this.rand.doublev() - 0.5D) * (double)this.width * 2.0D,
this.posY + this.rand.doublev() * (double)this.height,
this.posZ + (this.rand.doublev() - 0.5D) * (double)this.width * 2.0D);
}
return true;
}
}

View file

@ -180,7 +180,7 @@ public class EntitySlime extends EntityNPC
World world = this.worldObj;
double d0 = this.posX + (double)f2;
double d1 = this.posZ + (double)f3;
world.spawnParticle(ParticleType.ITEM_CRACK, d0, this.getEntityBoundingBox().minY, d1, 0.0D, 0.0D, 0.0D, ItemRegistry.getId(Items.slime_ball));
world.spawnParticle(ParticleType.ITEM_CRACK, d0, this.getEntityBoundingBox().minY, d1, ItemRegistry.getId(Items.slime_ball));
}
// if (!this.isChild())

View file

@ -404,7 +404,7 @@ public class EntityArrow extends Entity implements IProjectile, IObjectData
{
for (int k = 0; k < 4; ++k)
{
this.worldObj.spawnParticle(ParticleType.CRIT, this.posX + this.motionX * (double)k / 4.0D, this.posY + this.motionY * (double)k / 4.0D, this.posZ + this.motionZ * (double)k / 4.0D, -this.motionX, -this.motionY + 0.2D, -this.motionZ);
this.worldObj.spawnParticle(ParticleType.CRIT, this.posX + this.motionX * (double)k / 4.0D, this.posY + this.motionY * (double)k / 4.0D, this.posZ + this.motionZ * (double)k / 4.0D);
}
}
@ -444,7 +444,7 @@ public class EntityArrow extends Entity implements IProjectile, IObjectData
for (int i1 = 0; i1 < 4; ++i1)
{
float f8 = 0.25F;
this.worldObj.spawnParticle(ParticleType.SPLASH, this.posX - this.motionX * (double)f8, this.posY - this.motionY * (double)f8, this.posZ - this.motionZ * (double)f8, this.motionX, this.motionY, this.motionZ);
this.worldObj.spawnParticle(ParticleType.SPLASH, this.posX - this.motionX * (double)f8, this.posY - this.motionY * (double)f8, this.posZ - this.motionZ * (double)f8);
}
f4 = 0.6F;

View file

@ -49,7 +49,7 @@ public class EntityDynamite extends EntityThrowable implements IObjectData
for (int k = 0; k < 8; ++k)
{
this.worldObj.spawnParticle(ParticleType.ITEM_CRACK, this.posX, this.posY, this.posZ, ((double)this.rand.floatv() - 0.5D) * 0.08D, ((double)this.rand.floatv() - 0.5D) * 0.08D, ((double)this.rand.floatv() - 0.5D) * 0.08D, ItemRegistry.getId(ItemRegistry.byName("dynamite" + (this.explosionSize <= 0 || this.explosionSize >= 8 ? "" : "_" + this.explosionSize))));
this.worldObj.spawnParticle(ParticleType.ITEM_CRACK, this.posX, this.posY, this.posZ, ItemRegistry.getId(ItemRegistry.byName("dynamite" + (this.explosionSize <= 0 || this.explosionSize >= 8 ? "" : "_" + this.explosionSize))));
}
if (!this.worldObj.client)

View file

@ -60,7 +60,7 @@ public class EntityEgg extends EntityThrowable
for (int k = 0; k < 8; ++k)
{
this.worldObj.spawnParticle(ParticleType.ITEM_CRACK, this.posX, this.posY, this.posZ, ((double)this.rand.floatv() - 0.5D) * 0.08D, ((double)this.rand.floatv() - 0.5D) * 0.08D, ((double)this.rand.floatv() - 0.5D) * 0.08D, ItemRegistry.getId(Items.egg));
this.worldObj.spawnParticle(ParticleType.ITEM_CRACK, this.posX, this.posY, this.posZ, ItemRegistry.getId(Items.egg));
}
if (!this.worldObj.client)

View file

@ -417,8 +417,10 @@ public class EntityHook extends Entity implements IObjectData
this.motionY -= 0.20000000298023224D;
this.playSound(SoundEvent.SPLASH, 0.25F);
float f8 = (float)ExtMath.floord(this.getEntityBoundingBox().minY);
worldserver.spawnParticle(ParticleType.SPLASH, 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);
for(int z = 0; z < 5; z++) {
worldserver.spawnParticles(ParticleType.SPLASH, this.posX + this.rand.gaussian() * (double)this.width, (double)(f8 + 1.0F), this.posZ + this.rand.gaussian() * (double)this.width);
worldserver.spawnParticles(ParticleType.WATER_DROP, this.posX, (double)(f8 + 1.0F), this.posZ);
}
this.ticksCatchable = this.rand.range(10, 30);
}
else
@ -436,13 +438,13 @@ public class EntityHook extends Entity implements IObjectData
{
if (this.rand.floatv() < 0.15F)
{
worldserver.spawnParticle(ParticleType.SPLASH, d13, d15 - 0.10000000149011612D, d16, 1, (double)f10, 0.1D, (double)f11, 0.0D, 0);
worldserver.spawnParticles(ParticleType.SPLASH, d13, d15 - 0.10000000149011612D, d16);
}
float f3 = f10 * 0.04F;
float f4 = f11 * 0.04F;
worldserver.spawnParticle(ParticleType.WATER_DROP, 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.spawnParticles(ParticleType.WATER_DROP, d13, d15, d16);
worldserver.spawnParticles(ParticleType.WATER_DROP, d13, d15, d16);
}
}
}
@ -475,7 +477,10 @@ public class EntityHook extends Entity implements IObjectData
if (block == Blocks.water || block == Blocks.flowing_water)
{
worldserver.spawnParticle(ParticleType.SPLASH, d12, d14, d6, this.rand.range(2, 3), 0.10000000149011612D, 0.0D, 0.10000000149011612D, 0.0D, 0);
int amt = this.rand.range(2, 3);
for(int z = 0; z < amt; z++) {
worldserver.spawnParticles(ParticleType.SPLASH, d12 + this.rand.gaussian() * 0.1, d14, d6 + this.rand.gaussian() * 0.1);
}
}
}

View file

@ -39,8 +39,7 @@ public class EntityMissile extends EntityBullet {
public void onUpdate() {
super.onUpdate();
if(this.worldObj.client && this.age % 2 < 2)
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.worldObj.spawnParticle(ParticleType.SMOKE, this.posX, this.posY, this.posZ);
if(!this.worldObj.client && this.age > this.fuse)
this.explode();
}

View file

@ -214,7 +214,7 @@ public abstract class EntityProjectile extends Entity
for (int j = 0; j < 4; ++j)
{
float f3 = 0.25F;
this.worldObj.spawnParticle(ParticleType.SPLASH, this.posX - this.motionX * (double)f3, this.posY - this.motionY * (double)f3, this.posZ - this.motionZ * (double)f3, this.motionX, this.motionY, this.motionZ);
this.worldObj.spawnParticle(ParticleType.SPLASH, this.posX - this.motionX * (double)f3, this.posY - this.motionY * (double)f3, this.posZ - this.motionZ * (double)f3);
}
f2 = 0.8F;
@ -226,7 +226,7 @@ public abstract class EntityProjectile extends Entity
this.motionX *= (double)f2;
this.motionY *= (double)f2;
this.motionZ *= (double)f2;
this.worldObj.spawnParticle(ParticleType.SMOKE, 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);
this.setPosition(this.posX, this.posY, this.posZ);
}
else

View file

@ -47,7 +47,7 @@ public class EntitySnowball extends EntityThrowable
for (int j = 0; j < 8; ++j)
{
this.worldObj.spawnParticle(ParticleType.ITEM_CRACK, this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D, ItemRegistry.getId(Items.snowball));
this.worldObj.spawnParticle(ParticleType.ITEM_CRACK, this.posX, this.posY, this.posZ, ItemRegistry.getId(Items.snowball));
}
if (!this.worldObj.client)

View file

@ -67,10 +67,7 @@ public abstract class EntityAnimal extends EntityLiving
if (this.inLove == 10)
{
this.inLove = 0;
double d0 = this.rand.gaussian() * 0.02D;
double d1 = this.rand.gaussian() * 0.02D;
double d2 = this.rand.gaussian() * 0.02D;
this.worldObj.spawnParticle(ParticleType.HEART, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posY + 0.5D + (double)(this.rand.floatv() * this.height), this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, d0, d1, d2);
this.worldObj.spawnParticle(ParticleType.HEART, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posY + 0.5D + (double)(this.rand.floatv() * this.height), this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width);
}
}
}
@ -242,10 +239,7 @@ public abstract class EntityAnimal extends EntityLiving
{
for (int i = 0; i < 7; ++i)
{
double d0 = this.rand.gaussian() * 0.02D;
double d1 = this.rand.gaussian() * 0.02D;
double d2 = this.rand.gaussian() * 0.02D;
this.worldObj.spawnParticle(ParticleType.HEART, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posY + 0.5D + (double)(this.rand.floatv() * this.height), this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, d0, d1, d2);
this.worldObj.spawnParticle(ParticleType.HEART, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posY + 0.5D + (double)(this.rand.floatv() * this.height), this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width);
}
}
else

View file

@ -220,8 +220,10 @@ public abstract class EntityLiving extends Entity
d0 = 2.5D;
}
int i = (int)(150.0D * d0);
((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));
int i = (int)(15.0D * d0);
for(int z = 0; z < i; z++) {
((AWorldServer)this.worldObj).spawnParticles(ParticleType.BLOCK_CRACK, this.posX, this.posY, this.posZ, BlockRegistry.getId(iblockstate));
}
}
}
@ -432,10 +434,7 @@ public abstract class EntityLiving extends Entity
for (int k = 0; k < 20; ++k)
{
double d2 = this.rand.gaussian() * 0.02D;
double d0 = this.rand.gaussian() * 0.02D;
double d1 = this.rand.gaussian() * 0.02D;
this.worldObj.spawnParticle(ParticleType.EXPLOSION_NORMAL, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posY + (double)(this.rand.floatv() * this.height), this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, d2, d0, d1);
this.worldObj.spawnParticle(ParticleType.EXPLOSION_NORMAL, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posY + (double)(this.rand.floatv() * this.height), this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width);
}
}
}
@ -970,7 +969,7 @@ public abstract class EntityLiving extends Entity
vec31 = vec31.rotatePitch(-this.rotPitch * (float)Math.PI / 180.0F);
vec31 = vec31.rotateYaw(-this.rotYaw * (float)Math.PI / 180.0F);
vec31 = vec31.addVector(this.posX, this.posY + (double)this.getEyeHeight(), this.posZ);
this.worldObj.spawnParticle(ParticleType.ITEM_CRACK, vec31.xCoord, vec31.yCoord, vec31.zCoord, vec3.xCoord, vec3.yCoord + 0.05D, vec3.zCoord, ItemRegistry.getId(stack.getItem()));
this.worldObj.spawnParticle(ParticleType.ITEM_CRACK, vec31.xCoord, vec31.yCoord, vec31.zCoord, ItemRegistry.getId(stack.getItem()));
}
}
@ -1972,7 +1971,7 @@ public abstract class EntityLiving extends Entity
{
if (this.particleTimer % 4 == 0)
{
this.worldObj.spawnParticle(ParticleType.GROW, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, 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.worldObj.spawnParticle(ParticleType.GROW, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posY + 0.5D + (double)(this.rand.floatv() * this.height), this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width);
}
--this.particleTimer;
@ -2480,7 +2479,7 @@ public abstract class EntityLiving extends Entity
this.worldObj.spawnParticle(ParticleType.EXPLOSION_NORMAL,
this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width - d0 * d3,
this.posY + (double)(this.rand.floatv() * this.height) - d1 * d3,
this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width - d2 * d3, d0, d1, d2);
this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width - d2 * d3);
}
}
else {
@ -3034,10 +3033,7 @@ public abstract class EntityLiving extends Entity
{
for (int i = 0; i < 5; ++i)
{
double d0 = this.rand.gaussian() * 0.02D;
double d1 = this.rand.gaussian() * 0.02D;
double d2 = this.rand.gaussian() * 0.02D;
this.worldObj.spawnParticle(particleType, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posY + 1.0D + (double)(this.rand.floatv() * this.height), this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, d0, d1, d2);
this.worldObj.spawnParticle(particleType, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posY + 1.0D + (double)(this.rand.floatv() * this.height), this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width);
}
}

View file

@ -74,10 +74,7 @@ public abstract class EntityTameable extends EntityAnimal implements IEntityOwna
for (int i = 0; i < 7; ++i)
{
double d0 = this.rand.gaussian() * 0.02D;
double d1 = this.rand.gaussian() * 0.02D;
double d2 = this.rand.gaussian() * 0.02D;
this.worldObj.spawnParticle(enumparticletypes, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posY + 0.5D + (double)(this.rand.floatv() * this.height), this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, d0, d1, d2);
this.worldObj.spawnParticle(enumparticletypes, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posY + 0.5D + (double)(this.rand.floatv() * this.height), this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width);
}
}

View file

@ -274,7 +274,7 @@ public abstract class EntityThrowable extends Entity implements IProjectile
for (int i = 0; i < 4; ++i)
{
float f4 = 0.25F;
this.worldObj.spawnParticle(ParticleType.SPLASH, this.posX - this.motionX * (double)f4, this.posY - this.motionY * (double)f4, this.posZ - this.motionZ * (double)f4, this.motionX, this.motionY, this.motionZ);
this.worldObj.spawnParticle(ParticleType.SPLASH, this.posX - this.motionX * (double)f4, this.posY - this.motionY * (double)f4, this.posZ - this.motionZ * (double)f4);
}
f2 = 0.8F;

View file

@ -176,10 +176,7 @@ public class ItemDye extends Item {
for (int i = 0; i < amount; ++i)
{
double d0 = worldIn.rand.gaussian() * 0.02D;
double d1 = worldIn.rand.gaussian() * 0.02D;
double d2 = worldIn.rand.gaussian() * 0.02D;
worldIn.spawnParticle(ParticleType.GROW, (double)((float)pos.getX() + worldIn.rand.floatv()), (double)pos.getY() + (double)worldIn.rand.floatv() * block.getBlockBoundsMaxY(), (double)((float)pos.getZ() + worldIn.rand.floatv()), d0, d1, d2);
worldIn.spawnParticle(ParticleType.GROW, (double)((float)pos.getX() + worldIn.rand.floatv()), (double)pos.getY() + (double)worldIn.rand.floatv() * block.getBlockBoundsMaxY(), (double)((float)pos.getZ() + worldIn.rand.floatv()));
}
}
}

View file

@ -277,7 +277,7 @@ public class ItemBucket extends Item
for (int l = 0; l < 8; ++l)
{
worldIn.spawnParticle(ParticleType.SMOKE, (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());
}
}
else

View file

@ -66,10 +66,7 @@ public class ItemChargedOrb extends ItemFragile
double d0 = (double)((float)pos.getX() + (5.0F + worldIn.rand.floatv() * 6.0F) / 16.0F);
double d1 = (double)((float)pos.getY() + 0.8125F);
double d2 = (double)((float)pos.getZ() + (5.0F + worldIn.rand.floatv() * 6.0F) / 16.0F);
double d3 = 0.0D;
double d4 = 0.0D;
double d5 = 0.0D;
worldIn.spawnParticle(ParticleType.SMOKE, d0, d1, d2, d3, d4, d5);
worldIn.spawnParticle(ParticleType.SMOKE, d0, d1, d2);
}
Facing enumfacing = (Facing)iblockstate.getValue(BlockPortalFrame.FACING);

View file

@ -13,28 +13,18 @@ public class SPacketParticles implements Packet<IClientPlayer>
private float xCoord;
private float yCoord;
private float zCoord;
private float xOffset;
private float yOffset;
private float zOffset;
private float particleSpeed;
private int particleCount;
private int particleArgument;
public SPacketParticles()
{
}
public SPacketParticles(ParticleType particleTypeIn, float x, float y, float z, float xOffsetIn, float yOffset, float zOffset, float particleSpeedIn, int particleCountIn, int particleArgumentIn)
public SPacketParticles(ParticleType particleTypeIn, float x, float y, float z, int particleArgumentIn)
{
this.particleType = particleTypeIn;
this.xCoord = x;
this.yCoord = y;
this.zCoord = z;
this.xOffset = xOffsetIn;
this.yOffset = yOffset;
this.zOffset = zOffset;
this.particleSpeed = particleSpeedIn;
this.particleCount = particleCountIn;
this.particleArgument = particleArgumentIn;
}
@ -47,11 +37,6 @@ public class SPacketParticles implements Packet<IClientPlayer>
this.xCoord = buf.readFloat();
this.yCoord = buf.readFloat();
this.zCoord = buf.readFloat();
this.xOffset = buf.readFloat();
this.yOffset = buf.readFloat();
this.zOffset = buf.readFloat();
this.particleSpeed = buf.readFloat();
this.particleCount = buf.readInt();
this.particleArgument = buf.readVarInt();
}
@ -64,11 +49,6 @@ public class SPacketParticles implements Packet<IClientPlayer>
buf.writeFloat(this.xCoord);
buf.writeFloat(this.yCoord);
buf.writeFloat(this.zCoord);
buf.writeFloat(this.xOffset);
buf.writeFloat(this.yOffset);
buf.writeFloat(this.zOffset);
buf.writeFloat(this.particleSpeed);
buf.writeInt(this.particleCount);
buf.writeVarInt(this.particleArgument);
}
@ -101,46 +81,6 @@ public class SPacketParticles implements Packet<IClientPlayer>
return (double)this.zCoord;
}
/**
* Gets the x coordinate offset for the particle. The particle may use the offset for particle spread.
*/
public float getXOffset()
{
return this.xOffset;
}
/**
* Gets the y coordinate offset for the particle. The particle may use the offset for particle spread.
*/
public float getYOffset()
{
return this.yOffset;
}
/**
* Gets the z coordinate offset for the particle. The particle may use the offset for particle spread.
*/
public float getZOffset()
{
return this.zOffset;
}
/**
* Gets the speed of the particle animation (used in client side rendering).
*/
public float getParticleSpeed()
{
return this.particleSpeed;
}
/**
* Gets the amount of particles to spawn
*/
public int getParticleCount()
{
return this.particleCount;
}
/**
* Gets the particle arguments. Some particles rely on block and/or item ids and sometimes metadata ids to color or
* texture the particle.

View file

@ -31,8 +31,10 @@ public abstract class AWorldServer extends World {
public abstract void resetUpdateEntityTick();
public abstract void strikeLightning(double x, double y, double z, int color, int damage, boolean fire, EntityLiving summoner);
public abstract void resetWeather();
public abstract void spawnParticle(ParticleType particleType, double xCoord, double yCoord, double zCoord, int numberOfParticles, double xOffset, double yOffset,
double zOffset, double particleSpeed, int data);
public abstract void spawnParticles(ParticleType particleType, double xCoord, double yCoord, double zCoord, int data);
public final void spawnParticles(ParticleType particleType, double xCoord, double yCoord, double zCoord) {
this.spawnParticles(particleType, xCoord, yCoord, zCoord, 0);
}
public abstract long getSeed();
public abstract boolean isExterminated();
public abstract boolean exterminate();

View file

@ -202,7 +202,7 @@ public class Explosion
worldObj.setState(blockpos, Blocks.air.getState(), 3);
if(rand.chance(1000)) {
worldObj.playSound(SoundEvent.EXPLODE, explosionX + x, explosionY + y, explosionZ + z, 4.0F);
((AWorldServer)worldObj).spawnParticle(ParticleType.EXPLOSION_HUGE, explosionX + x, explosionY + y, explosionZ + z, 0, rand.gaussian() * 0.02D, rand.gaussian() * 0.02D, rand.gaussian() * 0.02D, 1.0, 0);
((AWorldServer)worldObj).spawnParticles(ParticleType.EXPLOSION_HUGE, explosionX + x, explosionY + y, explosionZ + z);
}
}
cnt++;
@ -302,11 +302,11 @@ public class Explosion
if (this.explosionSize >= 2.0F && this.isSmoking)
{
this.worldObj.spawnParticle(ParticleType.EXPLOSION_HUGE, this.explosionX, this.explosionY, this.explosionZ, 1.0D, 0.0D, 0.0D);
this.worldObj.spawnParticle(ParticleType.EXPLOSION_HUGE, this.explosionX, this.explosionY, this.explosionZ);
}
else
{
this.worldObj.spawnParticle(ParticleType.EXPLOSION_LARGE, this.explosionX, this.explosionY, this.explosionZ, 1.0D, 0.0D, 0.0D);
this.worldObj.spawnParticle(ParticleType.EXPLOSION_LARGE, this.explosionX, this.explosionY, this.explosionZ, 100);
}
if (this.isSmoking)
@ -321,20 +321,8 @@ public class Explosion
double d0 = (double)((float)blockpos.getX() + this.worldObj.rand.floatv());
double d1 = (double)((float)blockpos.getY() + this.worldObj.rand.floatv());
double d2 = (double)((float)blockpos.getZ() + this.worldObj.rand.floatv());
double d3 = d0 - this.explosionX;
double d4 = d1 - this.explosionY;
double d5 = d2 - this.explosionZ;
double d6 = (double)ExtMath.sqrtd(d3 * d3 + d4 * d4 + d5 * d5);
d3 = d3 / d6;
d4 = d4 / d6;
d5 = d5 / d6;
double d7 = 0.5D / (d6 / (double)this.explosionSize + 0.1D);
d7 = d7 * (double)(this.worldObj.rand.floatv() * this.worldObj.rand.floatv() + 0.3F);
d3 = d3 * d7;
d4 = d4 * 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.SMOKE, d0, d1, d2, 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);
this.worldObj.spawnParticle(ParticleType.SMOKE, d0, d1, d2);
}
if (block != Blocks.air)

View file

@ -2089,13 +2089,11 @@ public abstract class World implements IWorldAccess {
public void scheduleUpdate(BlockPos pos, Block blockIn, int delay) {
}
public void spawnParticle(ParticleType particleType, double xCoord, double yCoord, double zCoord, double xOffset, double yOffset,
double zOffset, int data) {
public void spawnParticle(ParticleType particleType, double xCoord, double yCoord, double zCoord, int data) {
}
public final void spawnParticle(ParticleType particleType, double xCoord, double yCoord, double zCoord, double xOffset, double yOffset,
double zOffset) {
this.spawnParticle(particleType, xCoord, yCoord, zCoord, xOffset, yOffset, zOffset, 0);
public final void spawnParticle(ParticleType particleType, double xCoord, double yCoord, double zCoord) {
this.spawnParticle(particleType, xCoord, yCoord, zCoord, 0);
}
// public Difficulty getDifficulty() {