From 9fdb65b5553cc77e70cffed89349b299a44177a7 Mon Sep 17 00:00:00 2001 From: Sotr Date: Sat, 23 Mar 2019 17:37:53 +0800 Subject: [PATCH] Remove all client handled calc --- .../java/net/minecraft/server/BlockFluids.java | 8 ++++++++ .../java/net/minecraft/server/BlockNote.java | 2 +- .../net/minecraft/server/BlockPumpkinCarved.java | 4 ++++ .../net/minecraft/server/BlockRedstoneOre.java | 4 ++++ .../net/minecraft/server/BlockRedstoneTorch.java | 4 ++++ .../net/minecraft/server/BlockWitherSkull.java | 4 ++++ src/main/java/net/minecraft/server/Entity.java | 15 ++++++++++++--- .../java/net/minecraft/server/EntityAgeable.java | 4 ++++ .../java/net/minecraft/server/EntityAnimal.java | 4 ++++ .../java/net/minecraft/server/EntityArrow.java | 4 ++++ .../java/net/minecraft/server/EntityBoat.java | 2 +- .../net/minecraft/server/EntityEnderDragon.java | 6 +++++- .../net/minecraft/server/EntityEnderPearl.java | 4 ++++ .../net/minecraft/server/EntityFireball.java | 6 +++++- .../minecraft/server/EntityHorseAbstract.java | 2 +- .../server/EntityIllagerIllusioner.java | 4 ++++ .../net/minecraft/server/EntityIronGolem.java | 4 ++++ .../java/net/minecraft/server/EntityLiving.java | 16 ++++++++++++++++ .../java/net/minecraft/server/EntityLlama.java | 2 +- .../net/minecraft/server/EntityMushroomCow.java | 2 +- .../java/net/minecraft/server/EntityPhantom.java | 4 ++++ .../net/minecraft/server/EntityProjectile.java | 4 ++++ .../java/net/minecraft/server/EntitySlime.java | 8 ++++---- .../java/net/minecraft/server/EntitySquid.java | 3 +++ .../net/minecraft/server/EntityTNTPrimed.java | 2 +- .../java/net/minecraft/server/EntityWither.java | 4 ++++ .../java/net/minecraft/server/EntityWolf.java | 4 ++++ .../java/net/minecraft/server/Explosion.java | 8 ++++++++ .../java/net/minecraft/server/FluidTypeLava.java | 4 ++++ .../java/net/minecraft/server/ItemBucket.java | 2 +- .../net/minecraft/server/MobSpawnerAbstract.java | 4 ++++ .../minecraft/server/PathfinderGoalBreed.java | 4 ++++ 32 files changed, 136 insertions(+), 16 deletions(-) diff --git a/src/main/java/net/minecraft/server/BlockFluids.java b/src/main/java/net/minecraft/server/BlockFluids.java index b53a88c33..a4a85d1cf 100644 --- a/src/main/java/net/minecraft/server/BlockFluids.java +++ b/src/main/java/net/minecraft/server/BlockFluids.java @@ -155,15 +155,23 @@ public class BlockFluids extends Block implements IFluidSource { } protected void fizz(GeneratorAccess generatoraccess, BlockPosition blockposition) { + // Akarin start - this handle by client + /* double d0 = (double) blockposition.getX(); double d1 = (double) blockposition.getY(); double d2 = (double) blockposition.getZ(); + */ + // Akarin end generatoraccess.a((EntityHuman) null, blockposition, SoundEffects.BLOCK_LAVA_EXTINGUISH, SoundCategory.BLOCKS, 0.5F, 2.6F + (generatoraccess.m().nextFloat() - generatoraccess.m().nextFloat()) * 0.8F); + // Akarin start - this handle by client + /* for (int i = 0; i < 8; ++i) { generatoraccess.addParticle(Particles.F, d0 + Math.random(), d1 + 1.2D, d2 + Math.random(), 0.0D, 0.0D, 0.0D); } + */ + // Akarin end } diff --git a/src/main/java/net/minecraft/server/BlockNote.java b/src/main/java/net/minecraft/server/BlockNote.java index 631c79fa0..d41dd5c6a 100644 --- a/src/main/java/net/minecraft/server/BlockNote.java +++ b/src/main/java/net/minecraft/server/BlockNote.java @@ -68,7 +68,7 @@ public class BlockNote extends Block { float f = (float) Math.pow(2.0D, (double) (k - 12) / 12.0D); world.a((EntityHuman) null, blockposition, ((BlockPropertyInstrument) iblockdata.get(BlockNote.INSTRUMENT)).a(), SoundCategory.RECORDS, 3.0F, f); - world.addParticle(Particles.I, (double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 1.2D, (double) blockposition.getZ() + 0.5D, (double) k / 24.0D, 0.0D, 0.0D); + //world.addParticle(Particles.I, (double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 1.2D, (double) blockposition.getZ() + 0.5D, (double) k / 24.0D, 0.0D, 0.0D); // Akarin - this handle by client return true; } diff --git a/src/main/java/net/minecraft/server/BlockPumpkinCarved.java b/src/main/java/net/minecraft/server/BlockPumpkinCarved.java index 265369984..c413aa1a0 100644 --- a/src/main/java/net/minecraft/server/BlockPumpkinCarved.java +++ b/src/main/java/net/minecraft/server/BlockPumpkinCarved.java @@ -104,9 +104,13 @@ public class BlockPumpkinCarved extends BlockFacingHorizontal { CriterionTriggers.n.a(entityplayer, (Entity) entityirongolem); } + // Akarin start - this handle by client + /* for (j = 0; j < 120; ++j) { world.addParticle(Particles.E, (double) blockposition2.getX() + world.random.nextDouble(), (double) blockposition2.getY() + world.random.nextDouble() * 3.9D, (double) blockposition2.getZ() + world.random.nextDouble(), 0.0D, 0.0D, 0.0D); } + */ + // Akarin end for (j = 0; j < this.g().c(); ++j) { for (k = 0; k < this.g().b(); ++k) { diff --git a/src/main/java/net/minecraft/server/BlockRedstoneOre.java b/src/main/java/net/minecraft/server/BlockRedstoneOre.java index 7f2dcefa0..90052a985 100644 --- a/src/main/java/net/minecraft/server/BlockRedstoneOre.java +++ b/src/main/java/net/minecraft/server/BlockRedstoneOre.java @@ -112,6 +112,8 @@ public class BlockRedstoneOre extends Block { } private static void playEffect(World world, BlockPosition blockposition) { + // Akarin start - this handle by client + /* double d0 = 0.5625D; Random random = world.random; EnumDirection[] aenumdirection = EnumDirection.values(); @@ -130,6 +132,8 @@ public class BlockRedstoneOre extends Block { world.addParticle(ParticleParamRedstone.a, (double) blockposition.getX() + d1, (double) blockposition.getY() + d2, (double) blockposition.getZ() + d3, 0.0D, 0.0D, 0.0D); } } + */ + // Akarin end } diff --git a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java index 74b63fe1d..84eb99704 100644 --- a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java +++ b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java @@ -97,6 +97,8 @@ public class BlockRedstoneTorch extends BlockTorch { if (a(world, blockposition, true)) { world.a((EntityHuman) null, blockposition, SoundEffects.BLOCK_REDSTONE_TORCH_BURNOUT, SoundCategory.BLOCKS, 0.5F, 2.6F + (world.random.nextFloat() - world.random.nextFloat()) * 0.8F); + // Akarin start - this handle by client + /* for (int i = 0; i < 5; ++i) { double d0 = (double) blockposition.getX() + random.nextDouble() * 0.6D + 0.2D; double d1 = (double) blockposition.getY() + random.nextDouble() * 0.6D + 0.2D; @@ -104,6 +106,8 @@ public class BlockRedstoneTorch extends BlockTorch { world.addParticle(Particles.M, d0, d1, d2, 0.0D, 0.0D, 0.0D); } + */ + // Akarin end world.getBlockTickList().a(blockposition, world.getType(blockposition).getBlock(), 160); } diff --git a/src/main/java/net/minecraft/server/BlockWitherSkull.java b/src/main/java/net/minecraft/server/BlockWitherSkull.java index e6063bb46..eab8106e2 100644 --- a/src/main/java/net/minecraft/server/BlockWitherSkull.java +++ b/src/main/java/net/minecraft/server/BlockWitherSkull.java @@ -80,9 +80,13 @@ public class BlockWitherSkull extends BlockSkull { int k; + // Akarin start - this handle by client + /* for (k = 0; k < 120; ++k) { world.addParticle(Particles.E, (double) blockposition1.getX() + world.random.nextDouble(), (double) (blockposition1.getY() - 2) + world.random.nextDouble() * 3.9D, (double) blockposition1.getZ() + world.random.nextDouble(), 0.0D, 0.0D, 0.0D); } + */ + // Akarin end for (k = 0; k < shapedetector.c(); ++k) { for (int l = 0; l < shapedetector.b(); ++l) { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java index a644a7576..94c89742e 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1229,12 +1229,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke if (this.getVehicle() instanceof EntityBoat) { this.inWater = false; } else if (this.b(TagsFluid.WATER)) { - // Akarin start - this handle by client - /* if (!this.inWater && !this.justCreated) { this.au(); } - */ this.fallDistance = 0.0F; this.inWater = true; @@ -1265,6 +1262,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.a(this.af(), f1, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.4F); } + // Akarin start - this handle by client + /* float f2 = (float) MathHelper.floor(this.getBoundingBox().minY); float f3; @@ -1282,17 +1281,25 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke f4 = (this.random.nextFloat() * 2.0F - 1.0F) * this.width; this.world.addParticle(Particles.R, this.locX + (double) f3, (double) (f2 + 1.0F), this.locZ + (double) f4, this.motX, this.motY, this.motZ); } + */ + // Akarin end } public void av() { + // Akarin start - this handle by client + /* if (this.isSprinting() && !this.isInWater()) { this.aw(); } + */ + // Akarin end } protected void aw() { + // Akarin start - this handle by client + /* int i = MathHelper.floor(this.locX); int j = MathHelper.floor(this.locY - 0.20000000298023224D); int k = MathHelper.floor(this.locZ); @@ -1302,6 +1309,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke if (iblockdata.i() != EnumRenderType.INVISIBLE) { this.world.addParticle(new ParticleParamBlock(Particles.d, iblockdata), this.locX + ((double) this.random.nextFloat() - 0.5D) * (double) this.width, this.getBoundingBox().minY + 0.1D, this.locZ + ((double) this.random.nextFloat() - 0.5D) * (double) this.width, -this.motX * 4.0D, 1.5D, -this.motZ * 4.0D); } + */ + // Akarin end } diff --git a/src/main/java/net/minecraft/server/EntityAgeable.java b/src/main/java/net/minecraft/server/EntityAgeable.java index aa54e380e..87db1bc2d 100644 --- a/src/main/java/net/minecraft/server/EntityAgeable.java +++ b/src/main/java/net/minecraft/server/EntityAgeable.java @@ -146,9 +146,13 @@ public abstract class EntityAgeable extends EntityCreature { super.movementTick(); if (this.world.isClientSide || ageLocked) { // CraftBukkit if (this.c > 0) { + // Akarin start - this handle by client + /* if (this.c % 4 == 0) { this.world.addParticle(Particles.z, this.locX + (double) (this.random.nextFloat() * this.width * 2.0F) - (double) this.width, this.locY + 0.5D + (double) (this.random.nextFloat() * this.length), this.locZ + (double) (this.random.nextFloat() * this.width * 2.0F) - (double) this.width, 0.0D, 0.0D, 0.0D); } + */ + // Akarin end --this.c; } diff --git a/src/main/java/net/minecraft/server/EntityAnimal.java b/src/main/java/net/minecraft/server/EntityAnimal.java index a7481df5f..3298a7e03 100644 --- a/src/main/java/net/minecraft/server/EntityAnimal.java +++ b/src/main/java/net/minecraft/server/EntityAnimal.java @@ -31,6 +31,8 @@ public abstract class EntityAnimal extends EntityAgeable implements IAnimal { if (this.bC > 0) { --this.bC; + // Akarin start - this handle by client + /* if (this.bC % 10 == 0) { double d0 = this.random.nextGaussian() * 0.02D; double d1 = this.random.nextGaussian() * 0.02D; @@ -38,6 +40,8 @@ public abstract class EntityAnimal extends EntityAgeable implements IAnimal { this.world.addParticle(Particles.A, this.locX + (double) (this.random.nextFloat() * this.width * 2.0F) - (double) this.width, this.locY + 0.5D + (double) (this.random.nextFloat() * this.length), this.locZ + (double) (this.random.nextFloat() * this.width * 2.0F) - (double) this.width, d0, d1, d2); } + */ + // Akarin end } } diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java index 6aa518f17..b6aca46d0 100644 --- a/src/main/java/net/minecraft/server/EntityArrow.java +++ b/src/main/java/net/minecraft/server/EntityArrow.java @@ -209,11 +209,15 @@ public abstract class EntityArrow extends Entity implements IProjectile { this.impulse = true; } + // Akarin start - this handle by client + /* if (this.isCritical()) { for (int i = 0; i < 4; ++i) { this.world.addParticle(Particles.h, this.locX + this.motX * (double) i / 4.0D, this.locY + this.motY * (double) i / 4.0D, this.locZ + this.motZ * (double) i / 4.0D, -this.motX, -this.motY + 0.2D, -this.motZ); } } + */ + // Akarin end this.locX += this.motX; this.locY += this.motY; diff --git a/src/main/java/net/minecraft/server/EntityBoat.java b/src/main/java/net/minecraft/server/EntityBoat.java index 79040416a..e4e3ef87d 100644 --- a/src/main/java/net/minecraft/server/EntityBoat.java +++ b/src/main/java/net/minecraft/server/EntityBoat.java @@ -163,7 +163,7 @@ public class EntityBoat extends Entity { } } - this.world.addParticle(Particles.R, this.locX + (double) this.random.nextFloat(), this.locY + 0.7D, this.locZ + (double) this.random.nextFloat(), 0.0D, 0.0D, 0.0D); + //this.world.addParticle(Particles.R, this.locX + (double) this.random.nextFloat(), this.locY + 0.7D, this.locZ + (double) this.random.nextFloat(), 0.0D, 0.0D, 0.0D); // Akarin - this handle by client if (this.random.nextInt(20) == 0) { this.world.a(this.locX, this.locY, this.locZ, this.ae(), this.bV(), 1.0F, 0.8F + 0.4F * this.random.nextFloat(), false); } diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java index fcc82d8eb..e0a126f9d 100644 --- a/src/main/java/net/minecraft/server/EntityEnderDragon.java +++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java @@ -111,7 +111,7 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo this.bL = this.bM; float f2; - if (this.getHealth() <= 0.0F) { + if (false && this.getHealth() <= 0.0F) { // Akarin - this handle by client f = (this.random.nextFloat() - 0.5F) * 8.0F; f1 = (this.random.nextFloat() - 0.5F) * 4.0F; f2 = (this.random.nextFloat() - 0.5F) * 8.0F; @@ -487,6 +487,8 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo } // CraftBukkit end + // Akarin start - this handle by client + /* if (flag1) { double d0 = axisalignedbb.minX + (axisalignedbb.maxX - axisalignedbb.minX) * (double) this.random.nextFloat(); double d1 = axisalignedbb.minY + (axisalignedbb.maxY - axisalignedbb.minY) * (double) this.random.nextFloat(); @@ -494,6 +496,8 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo this.world.addParticle(Particles.u, d0, d1, d2, 0.0D, 0.0D, 0.0D); } + */ + // Akarin end return flag; } diff --git a/src/main/java/net/minecraft/server/EntityEnderPearl.java b/src/main/java/net/minecraft/server/EntityEnderPearl.java index a372f6508..57030de4a 100644 --- a/src/main/java/net/minecraft/server/EntityEnderPearl.java +++ b/src/main/java/net/minecraft/server/EntityEnderPearl.java @@ -54,9 +54,13 @@ public class EntityEnderPearl extends EntityProjectile { } } + // Akarin start + /* for (int i = 0; i < 32; ++i) { this.world.addParticle(Particles.K, this.locX, this.locY + this.random.nextDouble() * 2.0D, this.locZ, this.random.nextGaussian(), 0.0D, this.random.nextGaussian()); } + */ + // Akarin end if (!this.world.isClientSide) { if (entityliving instanceof EntityPlayer) { diff --git a/src/main/java/net/minecraft/server/EntityFireball.java b/src/main/java/net/minecraft/server/EntityFireball.java index 58cc4824c..ce1824033 100644 --- a/src/main/java/net/minecraft/server/EntityFireball.java +++ b/src/main/java/net/minecraft/server/EntityFireball.java @@ -91,6 +91,8 @@ public abstract class EntityFireball extends Entity { this.locY += this.motY; this.locZ += this.motZ; ProjectileHelper.a(this, 0.2F); + // Akarin start - this handle by client + /* float f = this.k(); if (this.isInWater()) { @@ -102,6 +104,8 @@ public abstract class EntityFireball extends Entity { f = 0.8F; } + */ + // Akarin end this.motX += this.dirX; this.motY += this.dirY; @@ -109,7 +113,7 @@ public abstract class EntityFireball extends Entity { this.motX *= (double) f; this.motY *= (double) f; this.motZ *= (double) f; - this.world.addParticle(this.i(), this.locX, this.locY + 0.5D, this.locZ, 0.0D, 0.0D, 0.0D); + this.world.addParticle(this.i(), this.locX, this.locY + 0.5D, this.locZ, 0.0D, 0.0D, 0.0D); // Akarin - this handle by client this.setPosition(this.locX, this.locY, this.locZ); } } diff --git a/src/main/java/net/minecraft/server/EntityHorseAbstract.java b/src/main/java/net/minecraft/server/EntityHorseAbstract.java index 953277631..36d36b5ee 100644 --- a/src/main/java/net/minecraft/server/EntityHorseAbstract.java +++ b/src/main/java/net/minecraft/server/EntityHorseAbstract.java @@ -415,7 +415,7 @@ public abstract class EntityHorseAbstract extends EntityAnimal implements IInven } if (this.isBaby() && short0 > 0) { - this.world.addParticle(Particles.z, this.locX + (double) (this.random.nextFloat() * this.width * 2.0F) - (double) this.width, this.locY + 0.5D + (double) (this.random.nextFloat() * this.length), this.locZ + (double) (this.random.nextFloat() * this.width * 2.0F) - (double) this.width, 0.0D, 0.0D, 0.0D); + //this.world.addParticle(Particles.z, this.locX + (double) (this.random.nextFloat() * this.width * 2.0F) - (double) this.width, this.locY + 0.5D + (double) (this.random.nextFloat() * this.length), this.locZ + (double) (this.random.nextFloat() * this.width * 2.0F) - (double) this.width, 0.0D, 0.0D, 0.0D); // Akarin - this handle by client if (!this.world.isClientSide) { this.setAge(short0); } diff --git a/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java b/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java index 8b595979e..e1cf43f24 100644 --- a/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java +++ b/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java @@ -85,9 +85,13 @@ public class EntityIllagerIllusioner extends EntityIllagerWizard implements IRan this.bC[1][j] = new Vec3D((double) (-6.0F + (float) this.random.nextInt(13)) * 0.5D, (double) Math.max(0, this.random.nextInt(6) - 4), (double) (-6.0F + (float) this.random.nextInt(13)) * 0.5D); } + // Akarin start - this handle by client + /* for (j = 0; j < 16; ++j) { this.world.addParticle(Particles.g, this.locX + (this.random.nextDouble() - 0.5D) * (double) this.width, this.locY + this.random.nextDouble() * (double) this.length, this.locZ + (this.random.nextDouble() - 0.5D) * (double) this.width, 0.0D, 0.0D, 0.0D); } + */ + // Akarin end this.world.a(this.locX, this.locY, this.locZ, SoundEffects.ENTITY_ILLUSIONER_MIRROR_MOVE, this.bV(), 1.0F, 1.0F, false); } diff --git a/src/main/java/net/minecraft/server/EntityIronGolem.java b/src/main/java/net/minecraft/server/EntityIronGolem.java index ae2692704..8efd3abc7 100644 --- a/src/main/java/net/minecraft/server/EntityIronGolem.java +++ b/src/main/java/net/minecraft/server/EntityIronGolem.java @@ -82,6 +82,8 @@ public class EntityIronGolem extends EntityGolem { --this.bD; } + // Akarin start - this handle by client + /* if (this.motX * this.motX + this.motZ * this.motZ > 2.500000277905201E-7D && this.random.nextInt(5) == 0) { int i = MathHelper.floor(this.locX); int j = MathHelper.floor(this.locY - 0.20000000298023224D); @@ -92,6 +94,8 @@ public class EntityIronGolem extends EntityGolem { this.world.addParticle(new ParticleParamBlock(Particles.d, iblockdata), this.locX + ((double) this.random.nextFloat() - 0.5D) * (double) this.width, this.getBoundingBox().minY + 0.1D, this.locZ + ((double) this.random.nextFloat() - 0.5D) * (double) this.width, 4.0D * ((double) this.random.nextFloat() - 0.5D), 0.5D, ((double) this.random.nextFloat() - 0.5D) * 4.0D); } } + */ + // Akarin end } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java index 6fad521f4..f89b2e537 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -248,6 +248,8 @@ public abstract class EntityLiving extends Entity { if (this.getAirTicks() == -20) { this.setAirTicks(0); + // Akarin start - this handle by client + /* for (int i = 0; i < 8; ++i) { float f = this.random.nextFloat() - this.random.nextFloat(); float f1 = this.random.nextFloat() - this.random.nextFloat(); @@ -255,6 +257,8 @@ public abstract class EntityLiving extends Entity { this.world.addParticle(Particles.e, this.locX + (double) f, this.locY + (double) f1, this.locZ + (double) f2, this.motX, this.motY, this.motZ); } + */ + // Akarin end this.damageEntity(DamageSource.DROWN, 2.0F); } @@ -369,6 +373,8 @@ public abstract class EntityLiving extends Entity { this.die(); + // Akarin start - this handle by client + /* for (i = 0; i < 20; ++i) { double d0 = this.random.nextGaussian() * 0.02D; double d1 = this.random.nextGaussian() * 0.02D; @@ -376,6 +382,8 @@ public abstract class EntityLiving extends Entity { this.world.addParticle(Particles.J, this.locX + (double) (this.random.nextFloat() * this.width * 2.0F) - (double) this.width, this.locY + (double) (this.random.nextFloat() * this.length), this.locZ + (double) (this.random.nextFloat() * this.width * 2.0F) - (double) this.width, d0, d1, d2); } + */ + // Akarin end } } @@ -2672,6 +2680,8 @@ public abstract class EntityLiving extends Entity { } private void a(ItemStack itemstack, int i) { + // Akarin start - this handle by client + /* for (int j = 0; j < i; ++j) { Vec3D vec3d = new Vec3D(((double) this.random.nextFloat() - 0.5D) * 0.1D, Math.random() * 0.1D + 0.1D, 0.0D); @@ -2685,6 +2695,8 @@ public abstract class EntityLiving extends Entity { vec3d1 = vec3d1.add(this.locX, this.locY + (double) this.getHeadHeight(), this.locZ); this.world.addParticle(new ParticleParamItem(Particles.C, itemstack), vec3d1.x, vec3d1.y, vec3d1.z, vec3d.x, vec3d.y + 0.05D, vec3d.z); } + */ + // Akarin end } @@ -2825,6 +2837,8 @@ public abstract class EntityLiving extends Entity { } else { flag1 = true; + // Akarin start - this handle by client + /* for (int i = 0; i < 128; ++i) { double d6 = (double) i / 127.0D; float f = (random.nextFloat() - 0.5F) * 0.2F; @@ -2836,6 +2850,8 @@ public abstract class EntityLiving extends Entity { world.addParticle(Particles.K, d7, d8, d9, (double) f, (double) f1, (double) f2); } + */ + // Akarin end if (this instanceof EntityCreature) { ((EntityCreature) this).getNavigation().q(); diff --git a/src/main/java/net/minecraft/server/EntityLlama.java b/src/main/java/net/minecraft/server/EntityLlama.java index 82a32c61e..b7fe7dad0 100644 --- a/src/main/java/net/minecraft/server/EntityLlama.java +++ b/src/main/java/net/minecraft/server/EntityLlama.java @@ -139,7 +139,7 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn } if (this.isBaby() && b0 > 0) { - this.world.addParticle(Particles.z, this.locX + (double) (this.random.nextFloat() * this.width * 2.0F) - (double) this.width, this.locY + 0.5D + (double) (this.random.nextFloat() * this.length), this.locZ + (double) (this.random.nextFloat() * this.width * 2.0F) - (double) this.width, 0.0D, 0.0D, 0.0D); + //this.world.addParticle(Particles.z, this.locX + (double) (this.random.nextFloat() * this.width * 2.0F) - (double) this.width, this.locY + 0.5D + (double) (this.random.nextFloat() * this.length), this.locZ + (double) (this.random.nextFloat() * this.width * 2.0F) - (double) this.width, 0.0D, 0.0D, 0.0D); // Akarin - this handle by client if (!this.world.isClientSide) { this.setAge(b0); } diff --git a/src/main/java/net/minecraft/server/EntityMushroomCow.java b/src/main/java/net/minecraft/server/EntityMushroomCow.java index 638dbe978..f442bc59b 100644 --- a/src/main/java/net/minecraft/server/EntityMushroomCow.java +++ b/src/main/java/net/minecraft/server/EntityMushroomCow.java @@ -37,7 +37,7 @@ public class EntityMushroomCow extends EntityCow { return false; } // CraftBukkit end - this.world.addParticle(Particles.u, this.locX, this.locY + (double) (this.length / 2.0F), this.locZ, 0.0D, 0.0D, 0.0D); + //this.world.addParticle(Particles.u, this.locX, this.locY + (double) (this.length / 2.0F), this.locZ, 0.0D, 0.0D, 0.0D); // Akarin start - this handle by client if (!this.world.isClientSide) { // this.die(); // CraftBukkit - moved down EntityCow entitycow = EntityTypes.COW.create(world); // Paper diff --git a/src/main/java/net/minecraft/server/EntityPhantom.java b/src/main/java/net/minecraft/server/EntityPhantom.java index f576264a8..da6e344a1 100644 --- a/src/main/java/net/minecraft/server/EntityPhantom.java +++ b/src/main/java/net/minecraft/server/EntityPhantom.java @@ -87,6 +87,8 @@ public class EntityPhantom extends EntityFlying implements IMonster { this.world.a(this.locX, this.locY, this.locZ, SoundEffects.ENTITY_PHANTOM_FLAP, this.bV(), 0.95F + this.random.nextFloat() * 0.05F, 0.95F + this.random.nextFloat() * 0.05F, false); } + // Akarin start - this handle by client + /* int i = this.getSize(); float f2 = MathHelper.cos(this.yaw * 0.017453292F) * (1.3F + 0.21F * (float) i); float f3 = MathHelper.sin(this.yaw * 0.017453292F) * (1.3F + 0.21F * (float) i); @@ -94,6 +96,8 @@ public class EntityPhantom extends EntityFlying implements IMonster { this.world.addParticle(Particles.H, this.locX + (double) f2, this.locY + (double) f4, this.locZ + (double) f3, 0.0D, 0.0D, 0.0D); this.world.addParticle(Particles.H, this.locX - (double) f2, this.locY + (double) f4, this.locZ - (double) f3, 0.0D, 0.0D, 0.0D); + */ + // Akarin end } if (!this.world.isClientSide && this.world.getDifficulty() == EnumDifficulty.PEACEFUL) { diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java index 60ab1c751..1a5d946f5 100644 --- a/src/main/java/net/minecraft/server/EntityProjectile.java +++ b/src/main/java/net/minecraft/server/EntityProjectile.java @@ -195,11 +195,15 @@ public abstract class EntityProjectile extends Entity implements IProjectile { float f2 = this.f(); if (this.isInWater()) { + // Akarin start - this handle by client + /* for (int j = 0; j < 4; ++j) { float f3 = 0.25F; this.world.addParticle(Particles.e, this.locX - this.motX * 0.25D, this.locY - this.motY * 0.25D, this.locZ - this.motZ * 0.25D, this.motX, this.motY, this.motZ); } + */ + // Akarin end f1 = 0.8F; } diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java index 04f3fb15e..afbdc00c2 100644 --- a/src/main/java/net/minecraft/server/EntitySlime.java +++ b/src/main/java/net/minecraft/server/EntitySlime.java @@ -106,6 +106,8 @@ public class EntitySlime extends EntityInsentient implements IMonster { this.c = this.b; super.tick(); if (this.onGround && !this.bD) { + // Akarin start - this handle by client + /* int i = this.getSize(); for (int j = 0; j < i * 8; ++j) { @@ -120,6 +122,8 @@ public class EntitySlime extends EntityInsentient implements IMonster { world.addParticle(particleparam, d0, this.getBoundingBox().minY, d1, 0.0D, 0.0D, 0.0D); } + */ + // Akarin end this.a(this.dv(), this.cD(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) / 0.8F); this.a = -0.5F; @@ -146,13 +150,9 @@ public class EntitySlime extends EntityInsentient implements IMonster { this.setSize(0.51000005F * (float) i, 0.51000005F * (float) i); this.yaw = this.aS; this.aQ = this.aS; - // Akarin start - this handle by client - /* if (this.isInWater() && this.random.nextInt(20) == 0) { this.au(); } - */ - // Akarin end } super.a(datawatcherobject); diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java index ab79317a2..a23b1d337 100644 --- a/src/main/java/net/minecraft/server/EntitySquid.java +++ b/src/main/java/net/minecraft/server/EntitySquid.java @@ -231,9 +231,12 @@ public class EntitySquid extends EntityWaterAnimal { EntitySquid.this.c((float) vec3d.x / 20.0F, (float) vec3d.y / 20.0F, (float) vec3d.z / 20.0F); } + // Akarin start - this handle by client + /* if (this.b % 10 == 5) { EntitySquid.this.world.addParticle(Particles.e, EntitySquid.this.locX, EntitySquid.this.locY, EntitySquid.this.locZ, 0.0D, 0.0D, 0.0D); } + */ } } diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java index 7a8670323..55efec83e 100644 --- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java +++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java @@ -84,7 +84,7 @@ public class EntityTNTPrimed extends Entity { // CraftBukkit end } else { this.at(); - this.world.addParticle(Particles.M, this.locX, this.locY + 0.5D, this.locZ, 0.0D, 0.0D, 0.0D); + //this.world.addParticle(Particles.M, this.locX, this.locY + 0.5D, this.locZ, 0.0D, 0.0D, 0.0D); // Akarin start - this handle by client } } diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java index ed4ca8abb..4b7fd2b98 100644 --- a/src/main/java/net/minecraft/server/EntityWither.java +++ b/src/main/java/net/minecraft/server/EntityWither.java @@ -161,6 +161,8 @@ public class EntityWither extends EntityMonster implements IRangedEntity { } } + // Akarin start - this handle by client + /* boolean flag = this.dA(); for (j = 0; j < 3; ++j) { @@ -179,6 +181,8 @@ public class EntityWither extends EntityMonster implements IRangedEntity { this.world.addParticle(Particles.s, this.locX + this.random.nextGaussian(), this.locY + (double) (this.random.nextFloat() * 3.3F), this.locZ + this.random.nextGaussian(), 0.699999988079071D, 0.699999988079071D, 0.8999999761581421D); } } + */ + // Akarin end } diff --git a/src/main/java/net/minecraft/server/EntityWolf.java b/src/main/java/net/minecraft/server/EntityWolf.java index 46d8e0a1f..ca8e19985 100644 --- a/src/main/java/net/minecraft/server/EntityWolf.java +++ b/src/main/java/net/minecraft/server/EntityWolf.java @@ -181,6 +181,8 @@ public class EntityWolf extends EntityTameableAnimal { this.bN = 0.0F; } + // Akarin start - this handle by client + /* if (this.bN > 0.4F) { float f = (float) this.getBoundingBox().minY; int i = (int) (MathHelper.sin((this.bN - 0.4F) * 3.1415927F) * 7.0F); @@ -192,6 +194,8 @@ public class EntityWolf extends EntityTameableAnimal { this.world.addParticle(Particles.R, this.locX + (double) f1, (double) (f + 0.8F), this.locZ + (double) f2, this.motX, this.motY, this.motZ); } } + */ + // Akarin end } } diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java index 5591ccb3b..defb159cd 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java @@ -175,11 +175,15 @@ public class Explosion { public void a(boolean flag) { this.world.a((EntityHuman) null, this.posX, this.posY, this.posZ, SoundEffects.ENTITY_GENERIC_EXPLODE, SoundCategory.BLOCKS, 4.0F, (1.0F + (this.world.random.nextFloat() - this.world.random.nextFloat()) * 0.2F) * 0.7F); + // Akarin start - this handle by client + /* if (this.size >= 2.0F && this.b) { this.world.addParticle(Particles.t, this.posX, this.posY, this.posZ, 1.0D, 0.0D, 0.0D); } else { this.world.addParticle(Particles.u, this.posX, this.posY, this.posZ, 1.0D, 0.0D, 0.0D); } + */ + // Akarin end Iterator iterator; BlockPosition blockposition; @@ -236,6 +240,8 @@ public class Explosion { IBlockData iblockdata = this.world.getType(blockposition); Block block = iblockdata.getBlock(); + // Akarin start - this handle by client + /* if (flag) { double d0 = (double) ((float) blockposition.getX() + this.world.random.nextFloat()); double d1 = (double) ((float) blockposition.getY() + this.world.random.nextFloat()); @@ -257,6 +263,8 @@ public class Explosion { this.world.addParticle(Particles.J, (d0 + this.posX) / 2.0D, (d1 + this.posY) / 2.0D, (d2 + this.posZ) / 2.0D, d3, d4, d5); this.world.addParticle(Particles.M, d0, d1, d2, d3, d4, d5); } + */ + // Akarin end if (!iblockdata.isAir()) { if (block.a(this)) { diff --git a/src/main/java/net/minecraft/server/FluidTypeLava.java b/src/main/java/net/minecraft/server/FluidTypeLava.java index 8bb4f3b78..25a19736a 100644 --- a/src/main/java/net/minecraft/server/FluidTypeLava.java +++ b/src/main/java/net/minecraft/server/FluidTypeLava.java @@ -132,6 +132,8 @@ public abstract class FluidTypeLava extends FluidTypeFlowing { } protected void a(GeneratorAccess generatoraccess, BlockPosition blockposition) { + // Akarin start - this handle by client + /* double d0 = (double) blockposition.getX(); double d1 = (double) blockposition.getY(); double d2 = (double) blockposition.getZ(); @@ -141,6 +143,8 @@ public abstract class FluidTypeLava extends FluidTypeFlowing { for (int i = 0; i < 8; ++i) { generatoraccess.addParticle(Particles.F, d0 + Math.random(), d1 + 1.2D, d2 + Math.random(), 0.0D, 0.0D, 0.0D); } + */ + // Akarin end } diff --git a/src/main/java/net/minecraft/server/ItemBucket.java b/src/main/java/net/minecraft/server/ItemBucket.java index a064897fc..934b4abcd 100644 --- a/src/main/java/net/minecraft/server/ItemBucket.java +++ b/src/main/java/net/minecraft/server/ItemBucket.java @@ -146,7 +146,7 @@ public class ItemBucket extends Item { } } // CraftBukkit end - if (world.worldProvider.isNether() && this.fluidType.a(TagsFluid.WATER)) { + if (false && world.worldProvider.isNether() && this.fluidType.a(TagsFluid.WATER)) { // Akarin - this handle by client int i = blockposition.getX(); int j = blockposition.getY(); int k = blockposition.getZ(); diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java index b2d2de7f8..72043c144 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java @@ -63,12 +63,16 @@ public abstract class MobSpawnerAbstract { BlockPosition blockposition = this.b(); if (this.a().isClientSide) { + // Akarin start - this handle by client + /* double d0 = (double) ((float) blockposition.getX() + this.a().random.nextFloat()); double d1 = (double) ((float) blockposition.getY() + this.a().random.nextFloat()); double d2 = (double) ((float) blockposition.getZ() + this.a().random.nextFloat()); this.a().addParticle(Particles.M, d0, d1, d2, 0.0D, 0.0D, 0.0D); this.a().addParticle(Particles.y, d0, d1, d2, 0.0D, 0.0D, 0.0D); + */ + // Akarin end if (this.spawnDelay > 0) { this.spawnDelay -= tickDelay; // Paper } diff --git a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java index 55f978768..59935b176 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java @@ -106,6 +106,8 @@ public class PathfinderGoalBreed extends PathfinderGoal { entityageable.setAgeRaw(-24000); entityageable.setPositionRotation(this.animal.locX, this.animal.locY, this.animal.locZ, 0.0F, 0.0F); this.b.addEntity(entityageable, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BREEDING); // CraftBukkit - added SpawnReason + // Akarin start - this handle by client + /* Random random = this.animal.getRandom(); for (int i = 0; i < 7; ++i) { @@ -118,6 +120,8 @@ public class PathfinderGoalBreed extends PathfinderGoal { this.b.addParticle(Particles.A, this.animal.locX + d3, this.animal.locY + d4, this.animal.locZ + d5, d0, d1, d2); } + */ + // Akarin end if (this.b.getGameRules().getBoolean("doMobLoot")) { // CraftBukkit start - use event experience