From 93813d62649c0e75f50d44efea685a2f3cf04a12 Mon Sep 17 00:00:00 2001 From: Wesley Wolfe Date: Sat, 14 Sep 2013 18:15:01 -0500 Subject: [PATCH] Update to 1.6.4 --- net/minecraft/server/BanList.java | 2 +- net/minecraft/server/BiomeMeta.java | 4 + net/minecraft/server/BlockDeadBush.java | 2 +- net/minecraft/server/BlockFire.java | 6 +- net/minecraft/server/BlockLeaves.java | 2 +- net/minecraft/server/BlockLongGrass.java | 2 +- net/minecraft/server/BlockPortal.java | 4 +- .../server/BlockPressurePlateBinary.java | 2 +- net/minecraft/server/BlockSoil.java | 2 +- net/minecraft/server/BlockTNT.java | 4 +- net/minecraft/server/BlockTripwire.java | 4 +- net/minecraft/server/BlockVine.java | 2 +- net/minecraft/server/BlockWeb.java | 2 +- net/minecraft/server/Chunk.java | 4 +- .../server/ChunkProviderGenerate.java | 2 +- net/minecraft/server/ChunkProviderHell.java | 8 +- net/minecraft/server/CombatTracker.java | 6 +- net/minecraft/server/CommandDispatcher.java | 1 + net/minecraft/server/CommandEffect.java | 2 +- net/minecraft/server/CommandEnchant.java | 2 +- net/minecraft/server/CommandIdleTimeout.java | 29 +++ net/minecraft/server/CrashReportVersion.java | 2 +- net/minecraft/server/DamageSource.java | 2 +- net/minecraft/server/DedicatedServer.java | 29 +-- net/minecraft/server/EnchantmentManager.java | 14 +- net/minecraft/server/Entity.java | 102 +++++------ net/minecraft/server/EntityAnimal.java | 10 +- net/minecraft/server/EntityArrow.java | 10 +- net/minecraft/server/EntityBat.java | 26 +-- net/minecraft/server/EntityBlaze.java | 10 +- net/minecraft/server/EntityBoat.java | 16 +- net/minecraft/server/EntityCaveSpider.java | 4 +- net/minecraft/server/EntityChicken.java | 10 +- net/minecraft/server/EntityComplexPart.java | 2 +- net/minecraft/server/EntityCow.java | 12 +- net/minecraft/server/EntityCreature.java | 16 +- net/minecraft/server/EntityCreeper.java | 12 +- net/minecraft/server/EntityDamageSource.java | 2 +- .../server/EntityDamageSourceIndirect.java | 2 +- net/minecraft/server/EntityEnderCrystal.java | 2 +- net/minecraft/server/EntityEnderDragon.java | 16 +- net/minecraft/server/EntityEnderPearl.java | 2 +- net/minecraft/server/EntityEnderSignal.java | 4 +- net/minecraft/server/EntityEnderman.java | 12 +- net/minecraft/server/EntityExperienceOrb.java | 6 +- net/minecraft/server/EntityFallingBlock.java | 2 +- net/minecraft/server/EntityFireball.java | 12 +- net/minecraft/server/EntityFireworks.java | 2 +- net/minecraft/server/EntityFishingHook.java | 6 +- net/minecraft/server/EntityFlying.java | 4 +- net/minecraft/server/EntityGhast.java | 16 +- net/minecraft/server/EntityGiantZombie.java | 4 +- net/minecraft/server/EntityGolem.java | 4 +- net/minecraft/server/EntityHanging.java | 6 +- net/minecraft/server/EntityHorse.java | 48 ++--- net/minecraft/server/EntityHuman.java | 94 +++++----- net/minecraft/server/EntityInsentient.java | 60 +++--- net/minecraft/server/EntityIronGolem.java | 24 +-- net/minecraft/server/EntityItem.java | 6 +- net/minecraft/server/EntityItemFrame.java | 24 +-- net/minecraft/server/EntityLargeFireball.java | 8 +- net/minecraft/server/EntityLeash.java | 10 +- net/minecraft/server/EntityLiving.java | 172 +++++++++--------- net/minecraft/server/EntityMagmaCube.java | 14 +- .../server/EntityMinecartAbstract.java | 22 +-- .../server/EntityMinecartHopper.java | 6 +- net/minecraft/server/EntityMinecartTNT.java | 6 +- net/minecraft/server/EntityMonster.java | 8 +- net/minecraft/server/EntityOcelot.java | 14 +- net/minecraft/server/EntityPig.java | 16 +- net/minecraft/server/EntityPigZombie.java | 12 +- net/minecraft/server/EntityPlayer.java | 17 +- net/minecraft/server/EntityPotion.java | 28 +-- net/minecraft/server/EntityProjectile.java | 6 +- net/minecraft/server/EntitySheep.java | 14 +- net/minecraft/server/EntitySilverfish.java | 12 +- net/minecraft/server/EntitySkeleton.java | 30 +-- net/minecraft/server/EntitySlime.java | 14 +- net/minecraft/server/EntitySmallFireball.java | 2 +- net/minecraft/server/EntitySnowman.java | 10 +- net/minecraft/server/EntitySpider.java | 10 +- net/minecraft/server/EntitySquid.java | 18 +- net/minecraft/server/EntityTNTPrimed.java | 2 +- net/minecraft/server/EntityTrackerEntry.java | 10 +- net/minecraft/server/EntityVillager.java | 20 +- net/minecraft/server/EntityWaterAnimal.java | 8 +- net/minecraft/server/EntityWitch.java | 14 +- net/minecraft/server/EntityWither.java | 22 +-- net/minecraft/server/EntityWitherSkull.java | 2 +- net/minecraft/server/EntityWolf.java | 18 +- net/minecraft/server/EntityZombie.java | 20 +- net/minecraft/server/FoodMetaData.java | 2 +- net/minecraft/server/ItemBoat.java | 4 +- net/minecraft/server/ItemCarrotStick.java | 2 +- net/minecraft/server/ItemFishingRod.java | 4 +- net/minecraft/server/ItemLeash.java | 4 +- net/minecraft/server/ItemMilkBucket.java | 2 +- net/minecraft/server/ItemStack.java | 4 +- net/minecraft/server/MinecraftServer.java | 100 +++++----- net/minecraft/server/MobEffectAbsorption.java | 4 +- net/minecraft/server/MobEffectList.java | 8 +- .../server/MojangStatisticsGenerator.java | 2 +- net/minecraft/server/Navigation.java | 6 +- net/minecraft/server/Pathfinder.java | 6 +- net/minecraft/server/PathfinderGoalBeg.java | 2 +- .../server/PathfinderGoalBreakDoor.java | 2 +- net/minecraft/server/PathfinderGoalBreed.java | 2 +- .../server/PathfinderGoalDefendVillage.java | 2 +- .../server/PathfinderGoalEatTile.java | 2 +- .../server/PathfinderGoalFleeSun.java | 2 +- net/minecraft/server/PathfinderGoalFloat.java | 4 +- .../server/PathfinderGoalHurtByTarget.java | 4 +- .../server/PathfinderGoalJumpOnBlock.java | 4 +- .../server/PathfinderGoalLeapAtTarget.java | 2 +- .../server/PathfinderGoalLookAtPlayer.java | 4 +- .../server/PathfinderGoalMakeLove.java | 4 +- .../server/PathfinderGoalMeleeAttack.java | 6 +- .../server/PathfinderGoalMoveIndoors.java | 2 +- ...PathfinderGoalNearestAttackableTarget.java | 2 +- .../server/PathfinderGoalOfferFlower.java | 2 +- .../PathfinderGoalOwnerHurtByTarget.java | 4 +- .../server/PathfinderGoalOwnerHurtTarget.java | 6 +- .../PathfinderGoalPassengerCarrotStick.java | 8 +- net/minecraft/server/PathfinderGoalPlay.java | 2 +- .../PathfinderGoalRandomLookaround.java | 6 +- .../server/PathfinderGoalRandomStroll.java | 4 +- net/minecraft/server/PathfinderGoalSit.java | 2 +- .../server/PathfinderGoalTakeFlower.java | 2 +- net/minecraft/server/PathfinderGoalTame.java | 6 +- .../server/PathfinderGoalTarget.java | 2 +- net/minecraft/server/PathfinderGoalTempt.java | 2 +- .../server/PathfinderGoalTradeWithPlayer.java | 2 +- net/minecraft/server/PendingConnection.java | 32 ++-- net/minecraft/server/PlayerConnection.java | 19 +- .../server/PlayerInteractManager.java | 10 +- net/minecraft/server/PortalTravelAgent.java | 2 +- .../server/RandomPositionGenerator.java | 2 +- .../server/ScoreboardHealthCriteria.java | 2 +- net/minecraft/server/SlotAnvilResult.java | 2 +- .../server/StructureBoundingBox.java | 15 ++ net/minecraft/server/StructureGenerator.java | 60 +++++- net/minecraft/server/StructurePiece.java | 33 +++- net/minecraft/server/StructureStart.java | 66 ++++++- net/minecraft/server/World.java | 10 +- net/minecraft/server/WorldGenFactory.java | 89 +++++++++ net/minecraft/server/WorldGenFeature.java | 33 ++++ .../server/WorldGenJungleTemple.java | 18 ++ .../server/WorldGenLargeFeature.java | 18 +- .../server/WorldGenLargeFeatureStart.java | 3 + net/minecraft/server/WorldGenMineshaft.java | 4 + .../server/WorldGenMineshaftCorridor.java | 26 ++- .../server/WorldGenMineshaftCross.java | 18 +- .../server/WorldGenMineshaftPieces.java | 11 +- .../server/WorldGenMineshaftRoom.java | 33 +++- .../server/WorldGenMineshaftStairs.java | 8 +- .../server/WorldGenMineshaftStart.java | 3 + net/minecraft/server/WorldGenNether.java | 6 +- net/minecraft/server/WorldGenNetherPiece.java | 32 ++-- .../server/WorldGenNetherPiece1.java | 2 + .../server/WorldGenNetherPiece10.java | 12 ++ .../server/WorldGenNetherPiece11.java | 2 + .../server/WorldGenNetherPiece12.java | 12 ++ .../server/WorldGenNetherPiece13.java | 2 + .../server/WorldGenNetherPiece15.java | 17 +- .../server/WorldGenNetherPiece16.java | 2 + .../server/WorldGenNetherPiece2.java | 12 ++ .../server/WorldGenNetherPiece3.java | 2 + .../server/WorldGenNetherPiece4.java | 2 + .../server/WorldGenNetherPiece5.java | 2 + .../server/WorldGenNetherPiece6.java | 2 + .../server/WorldGenNetherPiece7.java | 2 + .../server/WorldGenNetherPiece8.java | 12 ++ .../server/WorldGenNetherPiece9.java | 2 + .../server/WorldGenNetherPieces.java | 22 ++- net/minecraft/server/WorldGenNetherStart.java | 5 +- .../server/WorldGenPyramidPiece.java | 18 ++ .../server/WorldGenRegistration.java | 10 + .../server/WorldGenScatteredPiece.java | 22 ++- net/minecraft/server/WorldGenStronghold.java | 4 + .../server/WorldGenStronghold2Start.java | 7 +- .../WorldGenStrongholdChestCorridor.java | 25 ++- .../server/WorldGenStrongholdCorridor.java | 18 +- .../server/WorldGenStrongholdCrossing.java | 53 ++++-- .../server/WorldGenStrongholdLeftTurn.java | 8 +- .../server/WorldGenStrongholdLibrary.java | 39 ++-- .../server/WorldGenStrongholdPiece.java | 39 ++-- .../server/WorldGenStrongholdPieces.java | 24 ++- .../server/WorldGenStrongholdPortalRoom.java | 34 ++-- .../server/WorldGenStrongholdPrison.java | 16 +- .../server/WorldGenStrongholdRightTurn.java | 6 +- .../WorldGenStrongholdRoomCrossing.java | 29 ++- .../server/WorldGenStrongholdStairs.java | 35 ++-- .../server/WorldGenStrongholdStairs2.java | 23 ++- .../WorldGenStrongholdStairsStraight.java | 8 +- .../server/WorldGenStrongholdStart.java | 2 + net/minecraft/server/WorldGenVillage.java | 4 + .../server/WorldGenVillageBlacksmith.java | 27 ++- .../server/WorldGenVillageButcher.java | 10 +- net/minecraft/server/WorldGenVillageFarm.java | 35 ++-- .../server/WorldGenVillageFarm2.java | 47 +++-- .../server/WorldGenVillageHouse.java | 29 ++- .../server/WorldGenVillageHouse2.java | 10 +- net/minecraft/server/WorldGenVillageHut.java | 39 ++-- .../server/WorldGenVillageLibrary.java | 10 +- .../server/WorldGenVillageLight.java | 10 +- .../server/WorldGenVillagePiece.java | 41 +++-- .../server/WorldGenVillagePieces.java | 24 ++- net/minecraft/server/WorldGenVillageRoad.java | 28 ++- .../server/WorldGenVillageRoadPiece.java | 2 + .../server/WorldGenVillageStart.java | 15 +- .../server/WorldGenVillageStartPiece.java | 11 +- .../server/WorldGenVillageTemple.java | 10 +- net/minecraft/server/WorldGenVillageWell.java | 19 +- net/minecraft/server/WorldGenWitchHut.java | 12 ++ net/minecraft/server/WorldServer.java | 6 +- 215 files changed, 1947 insertions(+), 1061 deletions(-) create mode 100644 net/minecraft/server/CommandIdleTimeout.java create mode 100644 net/minecraft/server/WorldGenFactory.java create mode 100644 net/minecraft/server/WorldGenFeature.java create mode 100644 net/minecraft/server/WorldGenRegistration.java diff --git a/net/minecraft/server/BanList.java b/net/minecraft/server/BanList.java index 781878cc8..5eef7f770 100644 --- a/net/minecraft/server/BanList.java +++ b/net/minecraft/server/BanList.java @@ -105,7 +105,7 @@ public void save(boolean flag) { PrintWriter printwriter = new PrintWriter(new FileWriter(this.b, false)); if (flag) { - printwriter.println("# Updated " + (new SimpleDateFormat()).format(new Date()) + " by Minecraft " + "1.6.2"); + printwriter.println("# Updated " + (new SimpleDateFormat()).format(new Date()) + " by Minecraft " + "1.6.4"); printwriter.println("# victim name | ban date | banned by | banned until | reason"); printwriter.println(); } diff --git a/net/minecraft/server/BiomeMeta.java b/net/minecraft/server/BiomeMeta.java index 0f271c8da..9645c8464 100644 --- a/net/minecraft/server/BiomeMeta.java +++ b/net/minecraft/server/BiomeMeta.java @@ -12,4 +12,8 @@ public BiomeMeta(Class oclass, int i, int j, int k) { this.c = j; this.d = k; } + + public String toString() { + return this.b.getSimpleName() + "*(" + this.c + "-" + this.d + "):" + this.a; + } } diff --git a/net/minecraft/server/BlockDeadBush.java b/net/minecraft/server/BlockDeadBush.java index 9c64d40bc..367757e00 100644 --- a/net/minecraft/server/BlockDeadBush.java +++ b/net/minecraft/server/BlockDeadBush.java @@ -20,7 +20,7 @@ public int getDropType(int i, Random random, int j) { } public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) { - if (!world.isStatic && entityhuman.bx() != null && entityhuman.bx().id == Item.SHEARS.id) { + if (!world.isStatic && entityhuman.by() != null && entityhuman.by().id == Item.SHEARS.id) { entityhuman.a(StatisticList.C[this.id], 1); this.b(world, i, j, k, new ItemStack(Block.DEAD_BUSH, 1, l)); } else { diff --git a/net/minecraft/server/BlockFire.java b/net/minecraft/server/BlockFire.java index 42f53228a..fd3e01852 100644 --- a/net/minecraft/server/BlockFire.java +++ b/net/minecraft/server/BlockFire.java @@ -73,7 +73,7 @@ public void a(World world, int i, int j, int k, Random random) { world.setAir(i, j, k); } - if (!flag && world.Q() && (world.F(i, j, k) || world.F(i - 1, j, k) || world.F(i + 1, j, k) || world.F(i, j, k - 1) || world.F(i, j, k + 1))) { + if (!flag && world.Q() && (world.isRainingAt(i, j, k) || world.isRainingAt(i - 1, j, k) || world.isRainingAt(i + 1, j, k) || world.isRainingAt(i, j, k - 1) || world.isRainingAt(i, j, k + 1))) { world.setAir(i, j, k); } else { int l = world.getData(i, j, k); @@ -123,7 +123,7 @@ public void a(World world, int i, int j, int k, Random random) { j2 /= 2; } - if (j2 > 0 && random.nextInt(l1) <= j2 && (!world.Q() || !world.F(i1, k1, j1)) && !world.F(i1 - 1, k1, k) && !world.F(i1 + 1, k1, j1) && !world.F(i1, k1, j1 - 1) && !world.F(i1, k1, j1 + 1)) { + if (j2 > 0 && random.nextInt(l1) <= j2 && (!world.Q() || !world.isRainingAt(i1, k1, j1)) && !world.isRainingAt(i1 - 1, k1, k) && !world.isRainingAt(i1 + 1, k1, j1) && !world.isRainingAt(i1, k1, j1 - 1) && !world.isRainingAt(i1, k1, j1 + 1)) { int k2 = l + random.nextInt(5) / 4; if (k2 > 15) { @@ -152,7 +152,7 @@ private void a(World world, int i, int j, int k, int l, Random random, int i1) { if (random.nextInt(l) < j1) { boolean flag = world.getTypeId(i, j, k) == Block.TNT.id; - if (random.nextInt(i1 + 10) < 5 && !world.F(i, j, k)) { + if (random.nextInt(i1 + 10) < 5 && !world.isRainingAt(i, j, k)) { int k1 = i1 + random.nextInt(5) / 4; if (k1 > 15) { diff --git a/net/minecraft/server/BlockLeaves.java b/net/minecraft/server/BlockLeaves.java index ed4769357..e3db52834 100644 --- a/net/minecraft/server/BlockLeaves.java +++ b/net/minecraft/server/BlockLeaves.java @@ -167,7 +167,7 @@ public void dropNaturally(World world, int i, int j, int k, int l, float f, int } public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) { - if (!world.isStatic && entityhuman.bx() != null && entityhuman.bx().id == Item.SHEARS.id) { + if (!world.isStatic && entityhuman.by() != null && entityhuman.by().id == Item.SHEARS.id) { entityhuman.a(StatisticList.C[this.id], 1); this.b(world, i, j, k, new ItemStack(Block.LEAVES.id, 1, l & 3)); } else { diff --git a/net/minecraft/server/BlockLongGrass.java b/net/minecraft/server/BlockLongGrass.java index 0643d3c3b..94fe2a869 100644 --- a/net/minecraft/server/BlockLongGrass.java +++ b/net/minecraft/server/BlockLongGrass.java @@ -22,7 +22,7 @@ public int getDropCount(int i, Random random) { } public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) { - if (!world.isStatic && entityhuman.bx() != null && entityhuman.bx().id == Item.SHEARS.id) { + if (!world.isStatic && entityhuman.by() != null && entityhuman.by().id == Item.SHEARS.id) { entityhuman.a(StatisticList.C[this.id], 1); this.b(world, i, j, k, new ItemStack(Block.LONG_GRASS, 1, l)); } else { diff --git a/net/minecraft/server/BlockPortal.java b/net/minecraft/server/BlockPortal.java index 29eb7bdc4..5555edb43 100644 --- a/net/minecraft/server/BlockPortal.java +++ b/net/minecraft/server/BlockPortal.java @@ -22,7 +22,7 @@ public void a(World world, int i, int j, int k, Random random) { Entity entity = ItemMonsterEgg.a(world, 57, (double) i + 0.5D, (double) l + 1.1D, (double) k + 0.5D); if (entity != null) { - entity.portalCooldown = entity.ab(); + entity.portalCooldown = entity.ac(); } } } @@ -153,7 +153,7 @@ public int a(Random random) { public void a(World world, int i, int j, int k, Entity entity) { if (entity.vehicle == null && entity.passenger == null) { - entity.aa(); + entity.ab(); } } } diff --git a/net/minecraft/server/BlockPressurePlateBinary.java b/net/minecraft/server/BlockPressurePlateBinary.java index 9ce62f296..d2131724e 100644 --- a/net/minecraft/server/BlockPressurePlateBinary.java +++ b/net/minecraft/server/BlockPressurePlateBinary.java @@ -41,7 +41,7 @@ protected int e(World world, int i, int j, int k) { while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); - if (!entity.at()) { + if (!entity.au()) { return 15; } } diff --git a/net/minecraft/server/BlockSoil.java b/net/minecraft/server/BlockSoil.java index 1335ae258..33a16fd0e 100644 --- a/net/minecraft/server/BlockSoil.java +++ b/net/minecraft/server/BlockSoil.java @@ -24,7 +24,7 @@ public boolean b() { } public void a(World world, int i, int j, int k, Random random) { - if (!this.m(world, i, j, k) && !world.F(i, j + 1, k)) { + if (!this.m(world, i, j, k) && !world.isRainingAt(i, j + 1, k)) { int l = world.getData(i, j, k); if (l > 0) { diff --git a/net/minecraft/server/BlockTNT.java b/net/minecraft/server/BlockTNT.java index d33690106..9acd4f23f 100644 --- a/net/minecraft/server/BlockTNT.java +++ b/net/minecraft/server/BlockTNT.java @@ -53,10 +53,10 @@ public void a(World world, int i, int j, int k, int l, EntityLiving entityliving } public boolean interact(World world, int i, int j, int k, EntityHuman entityhuman, int l, float f, float f1, float f2) { - if (entityhuman.bx() != null && entityhuman.bx().id == Item.FLINT_AND_STEEL.id) { + if (entityhuman.by() != null && entityhuman.by().id == Item.FLINT_AND_STEEL.id) { this.a(world, i, j, k, 1, entityhuman); world.setAir(i, j, k); - entityhuman.bx().damage(1, entityhuman); + entityhuman.by().damage(1, entityhuman); return true; } else { return super.interact(world, i, j, k, entityhuman, l, f, f1, f2); diff --git a/net/minecraft/server/BlockTripwire.java b/net/minecraft/server/BlockTripwire.java index 0996dd1e1..30f3fc3c4 100644 --- a/net/minecraft/server/BlockTripwire.java +++ b/net/minecraft/server/BlockTripwire.java @@ -74,7 +74,7 @@ public void remove(World world, int i, int j, int k, int l, int i1) { public void a(World world, int i, int j, int k, int l, EntityHuman entityhuman) { if (!world.isStatic) { - if (entityhuman.bx() != null && entityhuman.bx().id == Item.SHEARS.id) { + if (entityhuman.by() != null && entityhuman.by().id == Item.SHEARS.id) { world.setData(i, j, k, l | 8, 4); } } @@ -138,7 +138,7 @@ private void k(World world, int i, int j, int k) { while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); - if (!entity.at()) { + if (!entity.au()) { flag1 = true; break; } diff --git a/net/minecraft/server/BlockVine.java b/net/minecraft/server/BlockVine.java index 25b691c2d..319cfa8d0 100644 --- a/net/minecraft/server/BlockVine.java +++ b/net/minecraft/server/BlockVine.java @@ -284,7 +284,7 @@ public int a(Random random) { } public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) { - if (!world.isStatic && entityhuman.bx() != null && entityhuman.bx().id == Item.SHEARS.id) { + if (!world.isStatic && entityhuman.by() != null && entityhuman.by().id == Item.SHEARS.id) { entityhuman.a(StatisticList.C[this.id], 1); this.b(world, i, j, k, new ItemStack(Block.VINE, 1, 0)); } else { diff --git a/net/minecraft/server/BlockWeb.java b/net/minecraft/server/BlockWeb.java index 30e8c0ff7..f44920189 100644 --- a/net/minecraft/server/BlockWeb.java +++ b/net/minecraft/server/BlockWeb.java @@ -10,7 +10,7 @@ public BlockWeb(int i) { } public void a(World world, int i, int j, int k, Entity entity) { - entity.al(); + entity.am(); } public boolean c() { diff --git a/net/minecraft/server/Chunk.java b/net/minecraft/server/Chunk.java index d8b2f404e..3eea9f6b8 100644 --- a/net/minecraft/server/Chunk.java +++ b/net/minecraft/server/Chunk.java @@ -630,7 +630,7 @@ public void addEntities() { while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); - entity.Q(); + entity.R(); } this.world.a(this.entitySlices[i]); @@ -678,7 +678,7 @@ public void a(Entity entity, AxisAlignedBB axisalignedbb, List list, IEntitySele if (entity1 != entity && entity1.boundingBox.b(axisalignedbb) && (ientityselector == null || ientityselector.a(entity1))) { list.add(entity1); - Entity[] aentity = entity1.an(); + Entity[] aentity = entity1.ao(); if (aentity != null) { for (int i1 = 0; i1 < aentity.length; ++i1) { diff --git a/net/minecraft/server/ChunkProviderGenerate.java b/net/minecraft/server/ChunkProviderGenerate.java index 09130665c..b00086ce9 100644 --- a/net/minecraft/server/ChunkProviderGenerate.java +++ b/net/minecraft/server/ChunkProviderGenerate.java @@ -422,7 +422,7 @@ public String getName() { public List getMobsFor(EnumCreatureType enumcreaturetype, int i, int j, int k) { BiomeBase biomebase = this.p.getBiome(i, k); - return biomebase == null ? null : (biomebase == BiomeBase.SWAMPLAND && enumcreaturetype == EnumCreatureType.MONSTER && this.x.a(i, j, k) ? this.x.a() : biomebase.getMobs(enumcreaturetype)); + return biomebase == null ? null : (enumcreaturetype == EnumCreatureType.MONSTER && this.x.a(i, j, k) ? this.x.b() : biomebase.getMobs(enumcreaturetype)); } public ChunkPosition findNearestMapFeature(World world, String s, int i, int j, int k) { diff --git a/net/minecraft/server/ChunkProviderHell.java b/net/minecraft/server/ChunkProviderHell.java index 101266643..44a9eecca 100644 --- a/net/minecraft/server/ChunkProviderHell.java +++ b/net/minecraft/server/ChunkProviderHell.java @@ -421,12 +421,12 @@ public String getName() { public List getMobsFor(EnumCreatureType enumcreaturetype, int i, int j, int k) { if (enumcreaturetype == EnumCreatureType.MONSTER) { - if (this.c.a(i, j, k)) { - return this.c.a(); + if (this.c.b(i, j, k)) { + return this.c.b(); } - if (this.c.b(i, j, k) && this.o.getTypeId(i, j - 1, k) == Block.NETHER_BRICK.id) { - return this.c.a(); + if (this.c.d(i, j, k) && this.o.getTypeId(i, j - 1, k) == Block.NETHER_BRICK.id) { + return this.c.b(); } } diff --git a/net/minecraft/server/CombatTracker.java b/net/minecraft/server/CombatTracker.java index e33778cee..3a5e6aa5b 100644 --- a/net/minecraft/server/CombatTracker.java +++ b/net/minecraft/server/CombatTracker.java @@ -27,7 +27,7 @@ public void a() { } else if (i == Block.VINE.id) { this.f = "vines"; } - } else if (this.b.G()) { + } else if (this.b.H()) { this.f = "water"; } } @@ -59,7 +59,7 @@ public ChatMessage b() { if (combatentry.a() != DamageSource.FALL && combatentry.a() != DamageSource.OUT_OF_WORLD) { if (s1 != null && (s == null || !s1.equals(s))) { Entity entity1 = combatentry.a().getEntity(); - ItemStack itemstack = entity1 instanceof EntityLiving ? ((EntityLiving) entity1).aY() : null; + ItemStack itemstack = entity1 instanceof EntityLiving ? ((EntityLiving) entity1).aZ() : null; if (itemstack != null && itemstack.hasName()) { chatmessage = ChatMessage.b("death.fell.assist.item", new Object[] { this.b.getScoreboardDisplayName(), s1, itemstack.getName()}); @@ -67,7 +67,7 @@ public ChatMessage b() { chatmessage = ChatMessage.b("death.fell.assist", new Object[] { this.b.getScoreboardDisplayName(), s1}); } } else if (s != null) { - ItemStack itemstack1 = entity instanceof EntityLiving ? ((EntityLiving) entity).aY() : null; + ItemStack itemstack1 = entity instanceof EntityLiving ? ((EntityLiving) entity).aZ() : null; if (itemstack1 != null && itemstack1.hasName()) { chatmessage = ChatMessage.b("death.fell.finish.item", new Object[] { this.b.getScoreboardDisplayName(), s, itemstack1.getName()}); diff --git a/net/minecraft/server/CommandDispatcher.java b/net/minecraft/server/CommandDispatcher.java index 72a876f86..ff83fc220 100644 --- a/net/minecraft/server/CommandDispatcher.java +++ b/net/minecraft/server/CommandDispatcher.java @@ -45,6 +45,7 @@ public CommandDispatcher() { this.a(new CommandKick()); this.a(new CommandList()); this.a(new CommandWhitelist()); + this.a(new CommandIdleTimeout()); } else { this.a(new CommandPublish()); } diff --git a/net/minecraft/server/CommandEffect.java b/net/minecraft/server/CommandEffect.java index 940f40aaf..c1a32a1cd 100644 --- a/net/minecraft/server/CommandEffect.java +++ b/net/minecraft/server/CommandEffect.java @@ -29,7 +29,7 @@ public void b(ICommandListener icommandlistener, String[] astring) { throw new CommandException("commands.effect.failure.notActive.all", new Object[] { entityplayer.getLocalizedName()}); } - entityplayer.aJ(); + entityplayer.aK(); a(icommandlistener, "commands.effect.success.removed.all", new Object[] { entityplayer.getLocalizedName()}); } else { int i = a(icommandlistener, astring[1], 1); diff --git a/net/minecraft/server/CommandEnchant.java b/net/minecraft/server/CommandEnchant.java index 780a8568a..f99194536 100644 --- a/net/minecraft/server/CommandEnchant.java +++ b/net/minecraft/server/CommandEnchant.java @@ -25,7 +25,7 @@ public void b(ICommandListener icommandlistener, String[] astring) { EntityPlayer entityplayer = d(icommandlistener, astring[0]); int i = a(icommandlistener, astring[1], 0, Enchantment.byId.length - 1); int j = 1; - ItemStack itemstack = entityplayer.bx(); + ItemStack itemstack = entityplayer.by(); if (itemstack == null) { throw new CommandException("commands.enchant.noItem", new Object[0]); diff --git a/net/minecraft/server/CommandIdleTimeout.java b/net/minecraft/server/CommandIdleTimeout.java new file mode 100644 index 000000000..6fd4d5ae7 --- /dev/null +++ b/net/minecraft/server/CommandIdleTimeout.java @@ -0,0 +1,29 @@ +package net.minecraft.server; + +public class CommandIdleTimeout extends CommandAbstract { + + public CommandIdleTimeout() {} + + public String c() { + return "setidletimeout"; + } + + public int a() { + return 3; + } + + public String c(ICommandListener icommandlistener) { + return "commands.setidletimeout.usage"; + } + + public void b(ICommandListener icommandlistener, String[] astring) { + if (astring.length == 1) { + int i = a(icommandlistener, astring[0], 0); + + MinecraftServer.getServer().e(i); + a(icommandlistener, "commands.setidletimeout.success", new Object[] { Integer.valueOf(i)}); + } else { + throw new ExceptionUsage("commands.setidletimeout.usage", new Object[0]); + } + } +} diff --git a/net/minecraft/server/CrashReportVersion.java b/net/minecraft/server/CrashReportVersion.java index 728f89364..c32b1881a 100644 --- a/net/minecraft/server/CrashReportVersion.java +++ b/net/minecraft/server/CrashReportVersion.java @@ -11,7 +11,7 @@ class CrashReportVersion implements Callable { } public String a() { - return "1.6.2"; + return "1.6.4"; } public Object call() { diff --git a/net/minecraft/server/DamageSource.java b/net/minecraft/server/DamageSource.java index 2075c49f6..097e566ca 100644 --- a/net/minecraft/server/DamageSource.java +++ b/net/minecraft/server/DamageSource.java @@ -117,7 +117,7 @@ protected DamageSource l() { } public ChatMessage getLocalizedDeathMessage(EntityLiving entityliving) { - EntityLiving entityliving1 = entityliving.aR(); + EntityLiving entityliving1 = entityliving.aS(); String s = "death.attack." + this.translationIndex; String s1 = s + ".player"; diff --git a/net/minecraft/server/DedicatedServer.java b/net/minecraft/server/DedicatedServer.java index c1356ec71..30d2e1bc3 100644 --- a/net/minecraft/server/DedicatedServer.java +++ b/net/minecraft/server/DedicatedServer.java @@ -32,7 +32,7 @@ protected boolean init() { threadcommandreader.setDaemon(true); threadcommandreader.start(); - this.getLogger().info("Starting minecraft server version 1.6.2"); + this.getLogger().info("Starting minecraft server version 1.6.4"); if (Runtime.getRuntime().maxMemory() / 1024L / 1024L < 512L) { this.getLogger().warning("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\""); } @@ -53,6 +53,7 @@ protected boolean init() { this.setTexturePack(this.propertyManager.getString("texture-pack", "")); this.setMotd(this.propertyManager.getString("motd", "A Minecraft Server")); this.setForceGamemode(this.propertyManager.getBoolean("force-gamemode", false)); + this.e(this.propertyManager.getInt("player-idle-timeout", 0)); if (this.propertyManager.getInt("difficulty", 1) < 0) { this.propertyManager.a("difficulty", Integer.valueOf(0)); } else if (this.propertyManager.getInt("difficulty", 1) > 3) { @@ -167,7 +168,7 @@ public boolean isHardcore() { protected void a(CrashReport crashreport) { while (this.isRunning()) { - this.ar(); + this.as(); try { Thread.sleep(10L); @@ -190,7 +191,7 @@ protected void r() { protected void t() { super.t(); - this.ar(); + this.as(); } public boolean getAllowNether() { @@ -202,8 +203,8 @@ public boolean getSpawnMonsters() { } public void a(MojangStatisticsGenerator mojangstatisticsgenerator) { - mojangstatisticsgenerator.a("whitelist_enabled", Boolean.valueOf(this.as().getHasWhitelist())); - mojangstatisticsgenerator.a("whitelist_count", Integer.valueOf(this.as().getWhitelisted().size())); + mojangstatisticsgenerator.a("whitelist_enabled", Boolean.valueOf(this.at().getHasWhitelist())); + mojangstatisticsgenerator.a("whitelist_count", Integer.valueOf(this.at().getWhitelisted().size())); super.a(mojangstatisticsgenerator); } @@ -215,7 +216,7 @@ public void issueCommand(String s, ICommandListener icommandlistener) { this.l.add(new ServerCommand(s, icommandlistener)); } - public void ar() { + public void as() { while (!this.l.isEmpty()) { ServerCommand servercommand = (ServerCommand) this.l.remove(0); @@ -227,7 +228,7 @@ public boolean V() { return true; } - public DedicatedPlayerList as() { + public DedicatedPlayerList at() { return (DedicatedPlayerList) super.getPlayerList(); } @@ -261,7 +262,7 @@ public String b_() { return file1 != null ? file1.getAbsolutePath() : "No settings file"; } - public void at() { + public void au() { ServerGUI.a(this); this.t = true; } @@ -285,9 +286,9 @@ public int getSpawnProtection() { public boolean a(World world, int i, int j, int k, EntityHuman entityhuman) { if (world.worldProvider.dimension != 0) { return false; - } else if (this.as().getOPs().isEmpty()) { + } else if (this.at().getOPs().isEmpty()) { return false; - } else if (this.as().isOp(entityhuman.getName())) { + } else if (this.at().isOp(entityhuman.getName())) { return false; } else if (this.getSpawnProtection() <= 0) { return false; @@ -309,7 +310,13 @@ public int k() { return this.propertyManager.getInt("op-permission-level", 4); } + public void e(int i) { + super.e(i); + this.propertyManager.a("player-idle-timeout", Integer.valueOf(i)); + this.a(); + } + public PlayerList getPlayerList() { - return this.as(); + return this.at(); } } diff --git a/net/minecraft/server/EnchantmentManager.java b/net/minecraft/server/EnchantmentManager.java index e26f0622c..c27d53e93 100644 --- a/net/minecraft/server/EnchantmentManager.java +++ b/net/minecraft/server/EnchantmentManager.java @@ -141,16 +141,16 @@ public static int a(ItemStack[] aitemstack, DamageSource damagesource) { public static float a(EntityLiving entityliving, EntityLiving entityliving1) { c.a = 0.0F; c.b = entityliving1; - a((EnchantmentModifier) c, entityliving.aY()); + a((EnchantmentModifier) c, entityliving.aZ()); return c.a; } public static int getKnockbackEnchantmentLevel(EntityLiving entityliving, EntityLiving entityliving1) { - return getEnchantmentLevel(Enchantment.KNOCKBACK.id, entityliving.aY()); + return getEnchantmentLevel(Enchantment.KNOCKBACK.id, entityliving.aZ()); } public static int getFireAspectEnchantmentLevel(EntityLiving entityliving) { - return getEnchantmentLevel(Enchantment.FIRE_ASPECT.id, entityliving.aY()); + return getEnchantmentLevel(Enchantment.FIRE_ASPECT.id, entityliving.aZ()); } public static int getOxygenEnchantmentLevel(EntityLiving entityliving) { @@ -158,19 +158,19 @@ public static int getOxygenEnchantmentLevel(EntityLiving entityliving) { } public static int getDigSpeedEnchantmentLevel(EntityLiving entityliving) { - return getEnchantmentLevel(Enchantment.DIG_SPEED.id, entityliving.aY()); + return getEnchantmentLevel(Enchantment.DIG_SPEED.id, entityliving.aZ()); } public static boolean hasSilkTouchEnchantment(EntityLiving entityliving) { - return getEnchantmentLevel(Enchantment.SILK_TOUCH.id, entityliving.aY()) > 0; + return getEnchantmentLevel(Enchantment.SILK_TOUCH.id, entityliving.aZ()) > 0; } public static int getBonusBlockLootEnchantmentLevel(EntityLiving entityliving) { - return getEnchantmentLevel(Enchantment.LOOT_BONUS_BLOCKS.id, entityliving.aY()); + return getEnchantmentLevel(Enchantment.LOOT_BONUS_BLOCKS.id, entityliving.aZ()); } public static int getBonusMonsterLootEnchantmentLevel(EntityLiving entityliving) { - return getEnchantmentLevel(Enchantment.LOOT_BONUS_MOBS.id, entityliving.aY()); + return getEnchantmentLevel(Enchantment.LOOT_BONUS_MOBS.id, entityliving.aZ()); } public static boolean hasWaterWorkerEnchantment(EntityLiving entityliving) { diff --git a/net/minecraft/server/Entity.java b/net/minecraft/server/Entity.java index c9ddbc231..a4027b6fb 100644 --- a/net/minecraft/server/Entity.java +++ b/net/minecraft/server/Entity.java @@ -168,10 +168,10 @@ public void setPosition(double d0, double d1, double d2) { } public void l_() { - this.x(); + this.y(); } - public void x() { + public void y() { this.world.methodProfiler.a("entityBaseTick"); if (this.vehicle != null && this.vehicle.dead) { this.vehicle = null; @@ -189,12 +189,12 @@ public void x() { this.world.methodProfiler.a("portal"); MinecraftServer minecraftserver = ((WorldServer) this.world).getMinecraftServer(); - i = this.y(); + i = this.z(); if (this.ap) { if (minecraftserver.getAllowNether()) { if (this.vehicle == null && this.aq++ >= i) { this.aq = i; - this.portalCooldown = this.ab(); + this.portalCooldown = this.ac(); byte b0; if (this.world.worldProvider.dimension == -1) { @@ -225,7 +225,7 @@ public void x() { this.world.methodProfiler.b(); } - if (this.isSprinting() && !this.G()) { + if (this.isSprinting() && !this.H()) { int j = MathHelper.floor(this.locX); i = MathHelper.floor(this.locY - 0.20000000298023224D - (double) this.height); @@ -237,7 +237,7 @@ public void x() { } } - this.H(); + this.I(); if (this.world.isStatic) { this.fireTicks = 0; } else if (this.fireTicks > 0) { @@ -255,13 +255,13 @@ public void x() { } } - if (this.I()) { - this.z(); + if (this.J()) { + this.A(); this.fallDistance *= 0.5F; } if (this.locY < -64.0D) { - this.B(); + this.C(); } if (!this.world.isStatic) { @@ -272,11 +272,11 @@ public void x() { this.world.methodProfiler.b(); } - public int y() { + public int z() { return 0; } - protected void z() { + protected void A() { if (!this.fireProof) { this.damageEntity(DamageSource.LAVA, 4.0F); this.setOnFire(15); @@ -296,7 +296,7 @@ public void extinguish() { this.fireTicks = 0; } - protected void B() { + protected void C() { this.die(); } @@ -540,7 +540,7 @@ public void move(double d0, double d1, double d2) { this.S = (float) ((double) this.S + (double) MathHelper.sqrt(d10 * d10 + d11 * d11 + d12 * d12) * 0.6D); if (this.S > (float) this.c && j1 > 0) { this.c = (int) this.S + 1; - if (this.G()) { + if (this.H()) { float f = MathHelper.sqrt(this.motX * this.motX * 0.20000000298023224D + this.motY * this.motY + this.motZ * this.motZ * 0.20000000298023224D) * 0.35F; if (f > 1.0F) { @@ -556,7 +556,7 @@ public void move(double d0, double d1, double d2) { } try { - this.C(); + this.D(); } catch (Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Checking entity tile collision"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being checked for collision"); @@ -565,7 +565,7 @@ public void move(double d0, double d1, double d2) { throw new ReportedException(crashreport); } - boolean flag2 = this.F(); + boolean flag2 = this.G(); if (this.world.e(this.boundingBox.shrink(0.001D, 0.001D, 0.001D))) { this.burn(1); @@ -588,7 +588,7 @@ public void move(double d0, double d1, double d2) { } } - protected void C() { + protected void D() { int i = MathHelper.floor(this.boundingBox.a + 0.001D); int j = MathHelper.floor(this.boundingBox.b + 0.001D); int k = MathHelper.floor(this.boundingBox.c + 0.001D); @@ -649,7 +649,7 @@ protected void a(double d0, boolean flag) { } } - public AxisAlignedBB D() { + public AxisAlignedBB E() { return null; } @@ -669,15 +669,15 @@ protected void b(float f) { } } - public boolean F() { - return this.inWater || this.world.F(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ)) || this.world.F(MathHelper.floor(this.locX), MathHelper.floor(this.locY + (double) this.length), MathHelper.floor(this.locZ)); + public boolean G() { + return this.inWater || this.world.isRainingAt(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ)) || this.world.isRainingAt(MathHelper.floor(this.locX), MathHelper.floor(this.locY + (double) this.length), MathHelper.floor(this.locZ)); } - public boolean G() { + public boolean H() { return this.inWater; } - public boolean H() { + public boolean I() { if (this.world.a(this.boundingBox.grow(0.0D, -0.4000000059604645D, 0.0D).shrink(0.001D, 0.001D, 0.001D), Material.WATER, this)) { if (!this.inWater && !this.justCreated) { float f = MathHelper.sqrt(this.motX * this.motX * 0.20000000298023224D + this.motY * this.motY + this.motZ * this.motZ * 0.20000000298023224D) * 0.2F; @@ -737,7 +737,7 @@ public float getHeadHeight() { return 0.0F; } - public boolean I() { + public boolean J() { return this.world.a(this.boundingBox.grow(-0.10000000149011612D, -0.4000000059604645D, -0.10000000149011612D), Material.LAVA); } @@ -878,7 +878,7 @@ public void g(double d0, double d1, double d2) { this.an = true; } - protected void J() { + protected void K() { this.velocityChanged = true; } @@ -886,23 +886,23 @@ public boolean damageEntity(DamageSource damagesource, float f) { if (this.isInvulnerable()) { return false; } else { - this.J(); + this.K(); return false; } } - public boolean K() { + public boolean L() { return false; } - public boolean L() { + public boolean M() { return false; } public void b(Entity entity, int i) {} public boolean c(NBTTagCompound nbttagcompound) { - String s = this.P(); + String s = this.Q(); if (!this.dead && s != null) { nbttagcompound.setString("id", s); @@ -914,7 +914,7 @@ public boolean c(NBTTagCompound nbttagcompound) { } public boolean d(NBTTagCompound nbttagcompound) { - String s = this.P(); + String s = this.Q(); if (!this.dead && s != null && this.passenger == null) { nbttagcompound.setString("id", s); @@ -996,7 +996,7 @@ public void f(NBTTagCompound nbttagcompound) { this.setPosition(this.locX, this.locY, this.locZ); this.b(this.yaw, this.pitch); this.a(nbttagcompound); - if (this.O()) { + if (this.P()) { this.setPosition(this.locX, this.locY, this.locZ); } } catch (Throwable throwable) { @@ -1008,11 +1008,11 @@ public void f(NBTTagCompound nbttagcompound) { } } - protected boolean O() { + protected boolean P() { return true; } - protected final String P() { + protected final String Q() { return EntityTypes.b(this); } @@ -1020,7 +1020,7 @@ protected final String P() { protected abstract void b(NBTTagCompound nbttagcompound); - public void Q() {} + public void R() {} protected NBTTagList a(double... adouble) { NBTTagList nbttaglist = new NBTTagList(); @@ -1099,7 +1099,7 @@ public AxisAlignedBB g(Entity entity) { return null; } - public void U() { + public void V() { if (this.vehicle.dead) { this.vehicle = null; } else { @@ -1108,7 +1108,7 @@ public void U() { this.motZ = 0.0D; this.l_(); if (this.vehicle != null) { - this.vehicle.V(); + this.vehicle.W(); this.g += (double) (this.vehicle.yaw - this.vehicle.lastYaw); for (this.f += (double) (this.vehicle.pitch - this.vehicle.lastPitch); this.g >= 180.0D; this.g -= 360.0D) { @@ -1153,17 +1153,17 @@ public void U() { } } - public void V() { + public void W() { if (this.passenger != null) { - this.passenger.setPosition(this.locX, this.locY + this.X() + this.passenger.W(), this.locZ); + this.passenger.setPosition(this.locX, this.locY + this.Y() + this.passenger.X(), this.locZ); } } - public double W() { + public double X() { return (double) this.height; } - public double X() { + public double Y() { return (double) this.length * 0.75D; } @@ -1187,17 +1187,17 @@ public void mount(Entity entity) { } } - public float Y() { + public float Z() { return 0.1F; } - public Vec3D Z() { + public Vec3D aa() { return null; } - public void aa() { + public void ab() { if (this.portalCooldown > 0) { - this.portalCooldown = this.ab(); + this.portalCooldown = this.ac(); } else { double d0 = this.lastX - this.locX; double d1 = this.lastZ - this.locZ; @@ -1210,7 +1210,7 @@ public void aa() { } } - public int ab() { + public int ac() { return 900; } @@ -1224,7 +1224,7 @@ public boolean isBurning() { return !this.fireProof && (this.fireTicks > 0 || this.f(0)); } - public boolean af() { + public boolean ag() { return this.vehicle != null; } @@ -1364,7 +1364,7 @@ protected boolean i(double d0, double d1, double d2) { } } - public void al() { + public void am() { this.K = true; this.fallDistance = 0.0F; } @@ -1379,7 +1379,7 @@ public String getLocalizedName() { return LocaleI18n.get("entity." + s + ".name"); } - public Entity[] an() { + public Entity[] ao() { return null; } @@ -1391,7 +1391,7 @@ public float getHeadRotation() { return 0.0F; } - public boolean ap() { + public boolean aq() { return true; } @@ -1469,15 +1469,15 @@ public boolean a(Explosion explosion, World world, int i, int j, int k, int l, f return true; } - public int ar() { + public int as() { return 3; } - public int as() { + public int at() { return this.as; } - public boolean at() { + public boolean au() { return false; } @@ -1494,7 +1494,7 @@ public UUID getUniqueID() { return this.uniqueID; } - public boolean aw() { + public boolean ax() { return true; } diff --git a/net/minecraft/server/EntityAnimal.java b/net/minecraft/server/EntityAnimal.java index f164f9889..22948d4dd 100644 --- a/net/minecraft/server/EntityAnimal.java +++ b/net/minecraft/server/EntityAnimal.java @@ -11,12 +11,12 @@ public EntityAnimal(World world) { super(world); } - protected void bj() { + protected void bk() { if (this.getAge() != 0) { this.love = 0; } - super.bj(); + super.bk(); } public void c() { @@ -53,7 +53,7 @@ protected void a(Entity entity, float f) { EntityHuman entityhuman = (EntityHuman) entity; - if (entityhuman.bx() == null || !this.c(entityhuman.bx())) { + if (entityhuman.by() == null || !this.c(entityhuman.by())) { this.target = null; } } else if (entity instanceof EntityAnimal) { @@ -121,7 +121,7 @@ public boolean damageEntity(DamageSource damagesource, float f) { return false; } else { this.bo = 60; - if (!this.be()) { + if (!this.bf()) { AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.d); if (attributeinstance.a(h) == null) { @@ -173,7 +173,7 @@ protected Entity findTarget() { for (i = 0; i < list.size(); ++i) { EntityHuman entityhuman = (EntityHuman) list.get(i); - if (entityhuman.bx() != null && this.c(entityhuman.bx())) { + if (entityhuman.by() != null && this.c(entityhuman.by())) { return entityhuman; } } diff --git a/net/minecraft/server/EntityArrow.java b/net/minecraft/server/EntityArrow.java index 34d04d107..629f974dc 100644 --- a/net/minecraft/server/EntityArrow.java +++ b/net/minecraft/server/EntityArrow.java @@ -170,7 +170,7 @@ public void l_() { for (l = 0; l < list.size(); ++l) { Entity entity1 = (Entity) list.get(l); - if (entity1.K() && (entity1 != this.shooter || this.au >= 5)) { + if (entity1.L() && (entity1 != this.shooter || this.au >= 5)) { f1 = 0.3F; AxisAlignedBB axisalignedbb1 = entity1.boundingBox.grow((double) f1, (double) f1, (double) f1); MovingObjectPosition movingobjectposition1 = axisalignedbb1.a(vec3d, vec3d1); @@ -227,7 +227,7 @@ public void l_() { EntityLiving entityliving = (EntityLiving) movingobjectposition.entity; if (!this.world.isStatic) { - entityliving.m(entityliving.aT() + 1); + entityliving.m(entityliving.aU() + 1); } if (this.aw > 0) { @@ -314,7 +314,7 @@ public void l_() { float f4 = 0.99F; f1 = 0.05F; - if (this.G()) { + if (this.H()) { for (int j1 = 0; j1 < 4; ++j1) { f3 = 0.25F; this.world.addParticle("bubble", this.locX - this.motX * (double) f3, this.locY - this.motY * (double) f3, this.locZ - this.motZ * (double) f3, this.motX, this.motY, this.motZ); @@ -328,7 +328,7 @@ public void l_() { this.motZ *= (double) f4; this.motY -= (double) f1; this.setPosition(this.locX, this.locY, this.locZ); - this.C(); + this.D(); } } @@ -395,7 +395,7 @@ public void a(int i) { this.aw = i; } - public boolean ap() { + public boolean aq() { return false; } diff --git a/net/minecraft/server/EntityBat.java b/net/minecraft/server/EntityBat.java index 20f30dfc0..6e330fd16 100644 --- a/net/minecraft/server/EntityBat.java +++ b/net/minecraft/server/EntityBat.java @@ -17,36 +17,36 @@ protected void a() { this.datawatcher.a(16, new Byte((byte) 0)); } - protected float aZ() { + protected float ba() { return 0.1F; } - protected float ba() { - return super.ba() * 0.95F; + protected float bb() { + return super.bb() * 0.95F; } protected String r() { return this.bJ() && this.random.nextInt(4) != 0 ? null : "mob.bat.idle"; } - protected String aN() { + protected String aO() { return "mob.bat.hurt"; } - protected String aO() { + protected String aP() { return "mob.bat.death"; } - public boolean L() { + public boolean M() { return false; } protected void n(Entity entity) {} - protected void bi() {} + protected void bj() {} - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(6.0D); } @@ -64,7 +64,7 @@ public void a(boolean flag) { } } - protected boolean be() { + protected boolean bf() { return true; } @@ -78,8 +78,8 @@ public void l_() { } } - protected void bh() { - super.bh(); + protected void bi() { + super.bi(); if (this.bJ()) { if (!this.world.u(MathHelper.floor(this.locX), (int) this.locY + 1, MathHelper.floor(this.locZ))) { this.a(false); @@ -129,7 +129,7 @@ protected void b(float f) {} protected void a(double d0, boolean flag) {} - public boolean at() { + public boolean au() { return true; } diff --git a/net/minecraft/server/EntityBlaze.java b/net/minecraft/server/EntityBlaze.java index 6952f0ab9..13880706c 100644 --- a/net/minecraft/server/EntityBlaze.java +++ b/net/minecraft/server/EntityBlaze.java @@ -12,8 +12,8 @@ public EntityBlaze(World world) { this.b = 10; } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.e).setValue(6.0D); } @@ -26,11 +26,11 @@ protected String r() { return "mob.blaze.breathe"; } - protected String aN() { + protected String aO() { return "mob.blaze.hit"; } - protected String aO() { + protected String aP() { return "mob.blaze.death"; } @@ -40,7 +40,7 @@ public float d(float f) { public void c() { if (!this.world.isStatic) { - if (this.F()) { + if (this.G()) { this.damageEntity(DamageSource.DROWN, 1.0F); } diff --git a/net/minecraft/server/EntityBoat.java b/net/minecraft/server/EntityBoat.java index 590865867..57085779c 100644 --- a/net/minecraft/server/EntityBoat.java +++ b/net/minecraft/server/EntityBoat.java @@ -36,11 +36,11 @@ public AxisAlignedBB g(Entity entity) { return entity.boundingBox; } - public AxisAlignedBB D() { + public AxisAlignedBB E() { return this.boundingBox; } - public boolean L() { + public boolean M() { return true; } @@ -55,7 +55,7 @@ public EntityBoat(World world, double d0, double d1, double d2) { this.lastZ = d2; } - public double X() { + public double Y() { return (double) this.length * 0.0D - 0.30000001192092896D; } @@ -66,7 +66,7 @@ public boolean damageEntity(DamageSource damagesource, float f) { this.c(-this.h()); this.a(10); this.setDamage(this.getDamage() + f * 10.0F); - this.J(); + this.K(); boolean flag = damagesource.getEntity() instanceof EntityHuman && ((EntityHuman) damagesource.getEntity()).abilities.canInstantlyBuild; if (flag || this.getDamage() > 40.0F) { @@ -87,7 +87,7 @@ public boolean damageEntity(DamageSource damagesource, float f) { } } - public boolean K() { + public boolean L() { return !this.dead; } @@ -269,7 +269,7 @@ public void l_() { for (l = 0; l < list.size(); ++l) { Entity entity = (Entity) list.get(l); - if (entity != this.passenger && entity.L() && entity instanceof EntityBoat) { + if (entity != this.passenger && entity.M() && entity instanceof EntityBoat) { entity.collide(this); } } @@ -298,12 +298,12 @@ public void l_() { } } - public void V() { + public void W() { if (this.passenger != null) { double d0 = Math.cos((double) this.yaw * 3.141592653589793D / 180.0D) * 0.4D; double d1 = Math.sin((double) this.yaw * 3.141592653589793D / 180.0D) * 0.4D; - this.passenger.setPosition(this.locX + d0, this.locY + this.X() + this.passenger.W(), this.locZ + d1); + this.passenger.setPosition(this.locX + d0, this.locY + this.Y() + this.passenger.X(), this.locZ + d1); } } diff --git a/net/minecraft/server/EntityCaveSpider.java b/net/minecraft/server/EntityCaveSpider.java index 55e977951..9fa950b67 100644 --- a/net/minecraft/server/EntityCaveSpider.java +++ b/net/minecraft/server/EntityCaveSpider.java @@ -7,8 +7,8 @@ public EntityCaveSpider(World world) { this.a(0.7F, 0.5F); } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(12.0D); } diff --git a/net/minecraft/server/EntityChicken.java b/net/minecraft/server/EntityChicken.java index 14c783e2a..730bcb93a 100644 --- a/net/minecraft/server/EntityChicken.java +++ b/net/minecraft/server/EntityChicken.java @@ -23,12 +23,12 @@ public EntityChicken(World world) { this.goalSelector.a(7, new PathfinderGoalRandomLookaround(this)); } - public boolean be() { + public boolean bf() { return true; } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(4.0D); this.getAttributeInstance(GenericAttributes.d).setValue(0.25D); } @@ -69,11 +69,11 @@ protected String r() { return "mob.chicken.say"; } - protected String aN() { + protected String aO() { return "mob.chicken.hurt"; } - protected String aO() { + protected String aP() { return "mob.chicken.hurt"; } diff --git a/net/minecraft/server/EntityComplexPart.java b/net/minecraft/server/EntityComplexPart.java index 19059cacc..df36fe450 100644 --- a/net/minecraft/server/EntityComplexPart.java +++ b/net/minecraft/server/EntityComplexPart.java @@ -18,7 +18,7 @@ protected void a(NBTTagCompound nbttagcompound) {} protected void b(NBTTagCompound nbttagcompound) {} - public boolean K() { + public boolean L() { return true; } diff --git a/net/minecraft/server/EntityCow.java b/net/minecraft/server/EntityCow.java index c65eedb97..a1bc80518 100644 --- a/net/minecraft/server/EntityCow.java +++ b/net/minecraft/server/EntityCow.java @@ -16,12 +16,12 @@ public EntityCow(World world) { this.goalSelector.a(7, new PathfinderGoalRandomLookaround(this)); } - public boolean be() { + public boolean bf() { return true; } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(10.0D); this.getAttributeInstance(GenericAttributes.d).setValue(0.20000000298023224D); } @@ -30,11 +30,11 @@ protected String r() { return "mob.cow.say"; } - protected String aN() { + protected String aO() { return "mob.cow.hurt"; } - protected String aO() { + protected String aP() { return "mob.cow.hurt"; } @@ -42,7 +42,7 @@ protected void a(int i, int j, int k, int l) { this.makeSound("mob.cow.step", 0.15F, 1.0F); } - protected float aZ() { + protected float ba() { return 0.4F; } diff --git a/net/minecraft/server/EntityCreature.java b/net/minecraft/server/EntityCreature.java index 50e55524a..b9e75da57 100644 --- a/net/minecraft/server/EntityCreature.java +++ b/net/minecraft/server/EntityCreature.java @@ -23,7 +23,7 @@ protected boolean bJ() { return false; } - protected void bk() { + protected void bl() { this.world.methodProfiler.a("ai"); if (this.bo > 0 && --this.bo == 0) { AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.d); @@ -57,8 +57,8 @@ protected void bk() { } int i = MathHelper.floor(this.boundingBox.b + 0.5D); - boolean flag = this.G(); - boolean flag1 = this.I(); + boolean flag = this.H(); + boolean flag1 = this.J(); this.pitch = 0.0F; if (this.pathEntity != null && this.random.nextInt(100) != 0) { @@ -124,7 +124,7 @@ protected void bk() { this.world.methodProfiler.b(); } else { - super.bk(); + super.bl(); this.pathEntity = null; } } @@ -224,15 +224,15 @@ public boolean bS() { protected void bF() { super.bF(); - if (this.bH() && this.bI() != null && this.bI().world == this.world) { - Entity entity = this.bI(); + if (this.bH() && this.getLeashHolder() != null && this.getLeashHolder().world == this.world) { + Entity entity = this.getLeashHolder(); this.b((int) entity.locX, (int) entity.locY, (int) entity.locZ, 5); float f = this.d(entity); if (this instanceof EntityTameableAnimal && ((EntityTameableAnimal) this).isSitting()) { if (f > 10.0F) { - this.a(true, true); + this.unleash(true, true); } return; @@ -260,7 +260,7 @@ protected void bF() { } if (f > 10.0F) { - this.a(true, true); + this.unleash(true, true); } } else if (!this.bH() && this.bt) { this.bt = false; diff --git a/net/minecraft/server/EntityCreeper.java b/net/minecraft/server/EntityCreeper.java index 37f5c7c77..4806943a7 100644 --- a/net/minecraft/server/EntityCreeper.java +++ b/net/minecraft/server/EntityCreeper.java @@ -20,16 +20,16 @@ public EntityCreeper(World world) { this.targetSelector.a(2, new PathfinderGoalHurtByTarget(this, false)); } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.d).setValue(0.25D); } - public boolean be() { + public boolean bf() { return true; } - public int ar() { + public int as() { return this.getGoalTarget() == null ? 3 : 3 + (int) (this.getHealth() - 1.0F); } @@ -102,11 +102,11 @@ public void l_() { super.l_(); } - protected String aN() { + protected String aO() { return "mob.creeper.say"; } - protected String aO() { + protected String aP() { return "mob.creeper.death"; } diff --git a/net/minecraft/server/EntityDamageSource.java b/net/minecraft/server/EntityDamageSource.java index 8e4e19ee4..95a0f1172 100644 --- a/net/minecraft/server/EntityDamageSource.java +++ b/net/minecraft/server/EntityDamageSource.java @@ -14,7 +14,7 @@ public Entity getEntity() { } public ChatMessage getLocalizedDeathMessage(EntityLiving entityliving) { - ItemStack itemstack = this.p instanceof EntityLiving ? ((EntityLiving) this.p).aY() : null; + ItemStack itemstack = this.p instanceof EntityLiving ? ((EntityLiving) this.p).aZ() : null; String s = "death.attack." + this.translationIndex; String s1 = s + ".item"; diff --git a/net/minecraft/server/EntityDamageSourceIndirect.java b/net/minecraft/server/EntityDamageSourceIndirect.java index 3bddce21c..d266704bf 100644 --- a/net/minecraft/server/EntityDamageSourceIndirect.java +++ b/net/minecraft/server/EntityDamageSourceIndirect.java @@ -19,7 +19,7 @@ public Entity getEntity() { public ChatMessage getLocalizedDeathMessage(EntityLiving entityliving) { String s = this.owner == null ? this.p.getScoreboardDisplayName() : this.owner.getScoreboardDisplayName(); - ItemStack itemstack = this.owner instanceof EntityLiving ? ((EntityLiving) this.owner).aY() : null; + ItemStack itemstack = this.owner instanceof EntityLiving ? ((EntityLiving) this.owner).aZ() : null; String s1 = "death.attack." + this.translationIndex; String s2 = s1 + ".item"; diff --git a/net/minecraft/server/EntityEnderCrystal.java b/net/minecraft/server/EntityEnderCrystal.java index 3bec56532..e4296be15 100644 --- a/net/minecraft/server/EntityEnderCrystal.java +++ b/net/minecraft/server/EntityEnderCrystal.java @@ -41,7 +41,7 @@ protected void b(NBTTagCompound nbttagcompound) {} protected void a(NBTTagCompound nbttagcompound) {} - public boolean K() { + public boolean L() { return true; } diff --git a/net/minecraft/server/EntityEnderDragon.java b/net/minecraft/server/EntityEnderDragon.java index 207e10a1e..6ab905d5a 100644 --- a/net/minecraft/server/EntityEnderDragon.java +++ b/net/minecraft/server/EntityEnderDragon.java @@ -37,8 +37,8 @@ public EntityEnderDragon(World world) { this.am = true; } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(200.0D); } @@ -441,7 +441,7 @@ protected boolean dealDamage(DamageSource damagesource, float f) { return super.damageEntity(damagesource, f); } - protected void aA() { + protected void aB() { ++this.bB; if (this.bB >= 180 && this.bB <= 200) { float f = (this.random.nextFloat() - 0.5F) * 8.0F; @@ -528,13 +528,13 @@ private void c(int i, int j) { BlockEnderPortal.a = false; } - protected void bo() {} + protected void u() {} - public Entity[] an() { + public Entity[] ao() { return this.children; } - public boolean K() { + public boolean L() { return false; } @@ -546,11 +546,11 @@ protected String r() { return "mob.enderdragon.growl"; } - protected String aN() { + protected String aO() { return "mob.enderdragon.hit"; } - protected float aZ() { + protected float ba() { return 5.0F; } } diff --git a/net/minecraft/server/EntityEnderPearl.java b/net/minecraft/server/EntityEnderPearl.java index 672da8c26..cbd7dfe4a 100644 --- a/net/minecraft/server/EntityEnderPearl.java +++ b/net/minecraft/server/EntityEnderPearl.java @@ -24,7 +24,7 @@ protected void a(MovingObjectPosition movingobjectposition) { EntityPlayer entityplayer = (EntityPlayer) this.getShooter(); if (!entityplayer.playerConnection.disconnected && entityplayer.world == this.world) { - if (this.getShooter().af()) { + if (this.getShooter().ag()) { this.getShooter().mount((Entity) null); } diff --git a/net/minecraft/server/EntityEnderSignal.java b/net/minecraft/server/EntityEnderSignal.java index 6aa30200b..1fabbd596 100644 --- a/net/minecraft/server/EntityEnderSignal.java +++ b/net/minecraft/server/EntityEnderSignal.java @@ -95,7 +95,7 @@ public void l_() { float f3 = 0.25F; - if (this.G()) { + if (this.H()) { for (int i = 0; i < 4; ++i) { this.world.addParticle("bubble", this.locX - this.motX * (double) f3, this.locY - this.motY * (double) f3, this.locZ - this.motZ * (double) f3, this.motX, this.motY, this.motZ); } @@ -125,7 +125,7 @@ public float d(float f) { return 1.0F; } - public boolean ap() { + public boolean aq() { return false; } } diff --git a/net/minecraft/server/EntityEnderman.java b/net/minecraft/server/EntityEnderman.java index e126e9597..b81ade18d 100644 --- a/net/minecraft/server/EntityEnderman.java +++ b/net/minecraft/server/EntityEnderman.java @@ -18,8 +18,8 @@ public EntityEnderman(World world) { this.Y = 1.0F; } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(40.0D); this.getAttributeInstance(GenericAttributes.d).setValue(0.30000001192092896D); this.getAttributeInstance(GenericAttributes.e).setValue(7.0D); @@ -85,7 +85,7 @@ private boolean f(EntityHuman entityhuman) { } public void c() { - if (this.F()) { + if (this.G()) { this.damageEntity(DamageSource.DROWN, 1.0F); } @@ -147,7 +147,7 @@ public void c() { } } - if (this.F() || this.isBurning()) { + if (this.G() || this.isBurning()) { this.target = null; this.a(false); this.bv = false; @@ -266,11 +266,11 @@ protected String r() { return this.bX() ? "mob.endermen.scream" : "mob.endermen.idle"; } - protected String aN() { + protected String aO() { return "mob.endermen.hit"; } - protected String aO() { + protected String aP() { return "mob.endermen.death"; } diff --git a/net/minecraft/server/EntityExperienceOrb.java b/net/minecraft/server/EntityExperienceOrb.java index fbaf45f24..f4d25ddd7 100644 --- a/net/minecraft/server/EntityExperienceOrb.java +++ b/net/minecraft/server/EntityExperienceOrb.java @@ -103,7 +103,7 @@ public void l_() { } } - public boolean H() { + public boolean I() { return this.world.a(this.boundingBox, Material.WATER, (Entity) this); } @@ -115,7 +115,7 @@ public boolean damageEntity(DamageSource damagesource, float f) { if (this.isInvulnerable()) { return false; } else { - this.J(); + this.K(); this.d = (int) ((float) this.d - f); if (this.d <= 0) { this.die(); @@ -157,7 +157,7 @@ public static int getOrbValue(int i) { return i >= 2477 ? 2477 : (i >= 1237 ? 1237 : (i >= 617 ? 617 : (i >= 307 ? 307 : (i >= 149 ? 149 : (i >= 73 ? 73 : (i >= 37 ? 37 : (i >= 17 ? 17 : (i >= 7 ? 7 : (i >= 3 ? 3 : 1))))))))); } - public boolean ap() { + public boolean aq() { return false; } } diff --git a/net/minecraft/server/EntityFallingBlock.java b/net/minecraft/server/EntityFallingBlock.java index d4af68bd5..e79e174cd 100644 --- a/net/minecraft/server/EntityFallingBlock.java +++ b/net/minecraft/server/EntityFallingBlock.java @@ -51,7 +51,7 @@ protected boolean e_() { protected void a() {} - public boolean K() { + public boolean L() { return !this.dead; } diff --git a/net/minecraft/server/EntityFireball.java b/net/minecraft/server/EntityFireball.java index 3222c775b..6e672e244 100644 --- a/net/minecraft/server/EntityFireball.java +++ b/net/minecraft/server/EntityFireball.java @@ -98,7 +98,7 @@ public void l_() { for (int j = 0; j < list.size(); ++j) { Entity entity1 = (Entity) list.get(j); - if (entity1.K() && (!entity1.h(this.shooter) || this.au >= 25)) { + if (entity1.L() && (!entity1.h(this.shooter) || this.au >= 25)) { float f = 0.3F; AxisAlignedBB axisalignedbb = entity1.boundingBox.grow((double) f, (double) f, (double) f); MovingObjectPosition movingobjectposition1 = axisalignedbb.a(vec3d, vec3d1); @@ -149,7 +149,7 @@ public void l_() { this.yaw = this.lastYaw + (this.yaw - this.lastYaw) * 0.2F; float f2 = this.c(); - if (this.G()) { + if (this.H()) { for (int k = 0; k < 4; ++k) { float f3 = 0.25F; @@ -202,11 +202,11 @@ public void a(NBTTagCompound nbttagcompound) { } } - public boolean K() { + public boolean L() { return true; } - public float Y() { + public float Z() { return 1.0F; } @@ -214,9 +214,9 @@ public boolean damageEntity(DamageSource damagesource, float f) { if (this.isInvulnerable()) { return false; } else { - this.J(); + this.K(); if (damagesource.getEntity() != null) { - Vec3D vec3d = damagesource.getEntity().Z(); + Vec3D vec3d = damagesource.getEntity().aa(); if (vec3d != null) { this.motX = vec3d.c; diff --git a/net/minecraft/server/EntityFireworks.java b/net/minecraft/server/EntityFireworks.java index c7d8d29eb..0e0e2b4a1 100644 --- a/net/minecraft/server/EntityFireworks.java +++ b/net/minecraft/server/EntityFireworks.java @@ -115,7 +115,7 @@ public float d(float f) { return super.d(f); } - public boolean ap() { + public boolean aq() { return false; } } diff --git a/net/minecraft/server/EntityFishingHook.java b/net/minecraft/server/EntityFishingHook.java index ab8ebecf9..0281f0735 100644 --- a/net/minecraft/server/EntityFishingHook.java +++ b/net/minecraft/server/EntityFishingHook.java @@ -87,7 +87,7 @@ public void l_() { this.b(this.yaw, this.pitch); } else { if (!this.world.isStatic) { - ItemStack itemstack = this.owner.bx(); + ItemStack itemstack = this.owner.by(); if (this.owner.dead || !this.owner.isAlive() || itemstack == null || itemstack.getItem() != Item.FISHING_ROD || this.e(this.owner) > 1024.0D) { this.die(); @@ -152,7 +152,7 @@ public void l_() { for (int j = 0; j < list.size(); ++j) { Entity entity1 = (Entity) list.get(j); - if (entity1.K() && (entity1 != this.owner || this.j >= 5)) { + if (entity1.L() && (entity1 != this.owner || this.j >= 5)) { float f = 0.3F; AxisAlignedBB axisalignedbb = entity1.boundingBox.grow((double) f, (double) f, (double) f); MovingObjectPosition movingobjectposition1 = axisalignedbb.a(vec3d, vec3d1); @@ -230,7 +230,7 @@ public void l_() { } else { short short1 = 500; - if (this.world.F(MathHelper.floor(this.locX), MathHelper.floor(this.locY) + 1, MathHelper.floor(this.locZ))) { + if (this.world.isRainingAt(MathHelper.floor(this.locX), MathHelper.floor(this.locY) + 1, MathHelper.floor(this.locZ))) { short1 = 300; } diff --git a/net/minecraft/server/EntityFlying.java b/net/minecraft/server/EntityFlying.java index 52e12ae56..bdb7ce62c 100644 --- a/net/minecraft/server/EntityFlying.java +++ b/net/minecraft/server/EntityFlying.java @@ -11,13 +11,13 @@ protected void b(float f) {} protected void a(double d0, boolean flag) {} public void e(float f, float f1) { - if (this.G()) { + if (this.H()) { this.a(f, f1, 0.02F); this.move(this.motX, this.motY, this.motZ); this.motX *= 0.800000011920929D; this.motY *= 0.800000011920929D; this.motZ *= 0.800000011920929D; - } else if (this.I()) { + } else if (this.J()) { this.a(f, f1, 0.02F); this.move(this.motX, this.motY, this.motZ); this.motX *= 0.5D; diff --git a/net/minecraft/server/EntityGhast.java b/net/minecraft/server/EntityGhast.java index 76453fce9..bbabb4aa8 100644 --- a/net/minecraft/server/EntityGhast.java +++ b/net/minecraft/server/EntityGhast.java @@ -36,17 +36,17 @@ protected void a() { this.datawatcher.a(16, Byte.valueOf((byte) 0)); } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(10.0D); } - protected void bk() { + protected void bl() { if (!this.world.isStatic && this.world.difficulty == 0) { this.die(); } - this.bo(); + this.u(); this.bo = this.bp; double d0 = this.i - this.locX; double d1 = this.j - this.locY; @@ -102,7 +102,7 @@ protected void bk() { this.world.a((EntityHuman) null, 1008, (int) this.locX, (int) this.locY, (int) this.locZ, 0); EntityLargeFireball entitylargefireball = new EntityLargeFireball(this.world, this, d5, d6, d7); - entitylargefireball.e = this.explosionPower; + entitylargefireball.yield = this.explosionPower; double d8 = 4.0D; Vec3D vec3d = this.j(1.0F); @@ -152,11 +152,11 @@ protected String r() { return "mob.ghast.moan"; } - protected String aN() { + protected String aO() { return "mob.ghast.scream"; } - protected String aO() { + protected String aP() { return "mob.ghast.death"; } @@ -180,7 +180,7 @@ protected void dropDeathLoot(boolean flag, int i) { } } - protected float aZ() { + protected float ba() { return 10.0F; } diff --git a/net/minecraft/server/EntityGiantZombie.java b/net/minecraft/server/EntityGiantZombie.java index e3cf999b4..b3b87f14e 100644 --- a/net/minecraft/server/EntityGiantZombie.java +++ b/net/minecraft/server/EntityGiantZombie.java @@ -8,8 +8,8 @@ public EntityGiantZombie(World world) { this.a(this.width * 6.0F, this.length * 6.0F); } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(100.0D); this.getAttributeInstance(GenericAttributes.d).setValue(0.5D); this.getAttributeInstance(GenericAttributes.e).setValue(50.0D); diff --git a/net/minecraft/server/EntityGolem.java b/net/minecraft/server/EntityGolem.java index 85b5b9e2f..fc8dd9ec8 100644 --- a/net/minecraft/server/EntityGolem.java +++ b/net/minecraft/server/EntityGolem.java @@ -12,11 +12,11 @@ protected String r() { return "none"; } - protected String aN() { + protected String aO() { return "none"; } - protected String aO() { + protected String aP() { return "none"; } diff --git a/net/minecraft/server/EntityHanging.java b/net/minecraft/server/EntityHanging.java index b8da7c5b6..afbb9c7ea 100644 --- a/net/minecraft/server/EntityHanging.java +++ b/net/minecraft/server/EntityHanging.java @@ -165,7 +165,7 @@ public boolean survives() { } } - public boolean K() { + public boolean L() { return true; } @@ -179,7 +179,7 @@ public boolean damageEntity(DamageSource damagesource, float f) { } else { if (!this.dead && !this.world.isStatic) { this.die(); - this.J(); + this.K(); this.b(damagesource.getEntity()); } @@ -258,7 +258,7 @@ public void a(NBTTagCompound nbttagcompound) { public abstract void b(Entity entity); - protected boolean O() { + protected boolean P() { return false; } } diff --git a/net/minecraft/server/EntityHorse.java b/net/minecraft/server/EntityHorse.java index e18738a3e..a71f28668 100644 --- a/net/minecraft/server/EntityHorse.java +++ b/net/minecraft/server/EntityHorse.java @@ -49,7 +49,7 @@ public EntityHorse(World world) { this.goalSelector.a(6, new PathfinderGoalRandomStroll(this, 0.7D)); this.goalSelector.a(7, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 6.0F)); this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this)); - this.cH(); + this.loadChest(); } protected void a() { @@ -233,7 +233,7 @@ public void setTemper(int i) { } public int t(int i) { - int j = MathHelper.a(this.getTemper() + i, 0, this.cq()); + int j = MathHelper.a(this.getTemper() + i, 0, this.getMaxDomestication()); this.setTemper(j); return j; @@ -245,11 +245,11 @@ public boolean damageEntity(DamageSource damagesource, float f) { return this.passenger != null && this.passenger.equals(entity) ? false : super.damageEntity(damagesource, f); } - public int aP() { + public int aQ() { return by[this.cf()]; } - public boolean L() { + public boolean M() { return this.passenger == null; } @@ -302,7 +302,7 @@ private int cG() { return this.hasChest() && (i == 1 || i == 2) ? 17 : 2; } - private void cH() { + private void loadChest() { InventoryHorseChest inventoryhorsechest = this.inventoryChest; this.inventoryChest = new InventoryHorseChest("HorseChest", this.cG()); @@ -379,7 +379,7 @@ public double getJumpStrength() { return this.getAttributeInstance(attributeJumpStrength).getValue(); } - protected String aO() { + protected String aP() { this.cM(); int i = this.getType(); @@ -393,7 +393,7 @@ protected int getLootId() { return i == 4 ? Item.BONE.id : (i == 3 ? (flag ? 0 : Item.ROTTEN_FLESH.id) : Item.LEATHER.id); } - protected String aN() { + protected String aO() { this.cM(); if (this.random.nextInt(3) == 0) { this.cO(); @@ -410,7 +410,7 @@ public boolean co() { protected String r() { this.cM(); - if (this.random.nextInt(10) == 0 && !this.bb()) { + if (this.random.nextInt(10) == 0 && !this.bc()) { this.cO(); } @@ -455,9 +455,9 @@ protected void a(int i, int j, int k, int l) { } } - protected void ay() { - super.ay(); - this.aW().b(attributeJumpStrength); + protected void az() { + super.az(); + this.aX().b(attributeJumpStrength); this.getAttributeInstance(GenericAttributes.a).setValue(53.0D); this.getAttributeInstance(GenericAttributes.d).setValue(0.22499999403953552D); } @@ -466,11 +466,11 @@ public int bv() { return 6; } - public int cq() { + public int getMaxDomestication() { return 100; } - protected float aZ() { + protected float ba() { return 0.8F; } @@ -579,7 +579,7 @@ public boolean a(EntityHuman entityhuman) { flag = true; } - if (b1 > 0 && (flag || !this.isTame()) && b1 < this.cq()) { + if (b1 > 0 && (flag || !this.isTame()) && b1 < this.getMaxDomestication()) { flag = true; this.t(b1); } @@ -602,7 +602,7 @@ public boolean a(EntityHuman entityhuman) { this.setHasChest(true); this.makeSound("mob.chickenplop", 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F); flag = true; - this.cH(); + this.loadChest(); } if (!flag && this.ca() && !this.co() && itemstack.id == Item.SADDLE.id) { @@ -652,7 +652,7 @@ public boolean cw() { return i == 2 || i == 1; } - protected boolean bb() { + protected boolean bc() { return this.passenger != null && this.co() ? true : this.cg() || this.ch(); } @@ -822,7 +822,7 @@ public void cD() { String s = this.cp(); if (s != null) { - this.makeSound(s, this.aZ(), this.ba()); + this.makeSound(s, this.ba(), this.bb()); } } @@ -888,7 +888,7 @@ public void e(float f, float f1) { } this.Y = 1.0F; - this.aR = this.bf() * 0.1F; + this.aR = this.bg() * 0.1F; if (!this.world.isStatic) { this.i((float) this.getAttributeInstance(GenericAttributes.d).getValue()); super.e(f, f1); @@ -969,7 +969,7 @@ public void a(NBTTagCompound nbttagcompound) { this.setOwnerName(nbttagcompound.getString("OwnerName")); } - AttributeInstance attributeinstance = this.aW().a("Speed"); + AttributeInstance attributeinstance = this.aX().a("Speed"); if (attributeinstance != null) { this.getAttributeInstance(GenericAttributes.d).setValue(attributeinstance.b() * 0.25D); @@ -978,7 +978,7 @@ public void a(NBTTagCompound nbttagcompound) { if (this.hasChest()) { NBTTagList nbttaglist = nbttagcompound.getList("Items"); - this.cH(); + this.loadChest(); for (int i = 0; i < nbttaglist.size(); ++i) { NBTTagCompound nbttagcompound1 = (NBTTagCompound) nbttaglist.get(i); @@ -1132,7 +1132,7 @@ public GroupDataEntity a(GroupDataEntity groupdataentity) { return (GroupDataEntity) object; } - protected boolean be() { + protected boolean bf() { return true; } @@ -1153,15 +1153,15 @@ public void u(int i) { } } - public void V() { - super.V(); + public void W() { + super.W(); if (this.bM > 0.0F) { float f = MathHelper.sin(this.aN * 3.1415927F / 180.0F); float f1 = MathHelper.cos(this.aN * 3.1415927F / 180.0F); float f2 = 0.7F * this.bM; float f3 = 0.15F * this.bM; - this.passenger.setPosition(this.locX + (double) (f2 * f), this.locY + this.X() + this.passenger.W() + (double) f3, this.locZ - (double) (f2 * f1)); + this.passenger.setPosition(this.locX + (double) (f2 * f), this.locY + this.Y() + this.passenger.X() + (double) f3, this.locZ - (double) (f2 * f1)); if (this.passenger instanceof EntityLiving) { ((EntityLiving) this.passenger).aN = this.aN; } diff --git a/net/minecraft/server/EntityHuman.java b/net/minecraft/server/EntityHuman.java index c905dcf13..8ddacbe75 100644 --- a/net/minecraft/server/EntityHuman.java +++ b/net/minecraft/server/EntityHuman.java @@ -54,9 +54,9 @@ public EntityHuman(World world, String s) { this.maxFireTicks = 20; } - protected void ay() { - super.ay(); - this.aW().b(GenericAttributes.e).setValue(1.0D); + protected void az() { + super.az(); + this.aX().b(GenericAttributes.e).setValue(1.0D); } protected void a() { @@ -66,19 +66,19 @@ protected void a() { this.datawatcher.a(18, Integer.valueOf(0)); } - public boolean bq() { + public boolean br() { return this.f != null; } - public void bs() { + public void bt() { if (this.f != null) { this.f.b(this.world, this, this.g); } - this.bt(); + this.bu(); } - public void bt() { + public void bu() { this.f = null; this.g = 0; if (!this.world.isStatic) { @@ -87,7 +87,7 @@ public void bt() { } public boolean isBlocking() { - return this.bq() && Item.byId[this.f.id].c_(this.f) == EnumAnimation.BLOCK; + return this.br() && Item.byId[this.f.id].c_(this.f) == EnumAnimation.BLOCK; } public void l_() { @@ -103,7 +103,7 @@ public void l_() { this.n(); } } else { - this.bt(); + this.bu(); } } @@ -186,11 +186,11 @@ public void l_() { } } - public int y() { + public int z() { return this.abilities.isInvulnerable ? 0 : 80; } - public int ab() { + public int ac() { return 10; } @@ -234,11 +234,11 @@ protected void n() { } } - this.bt(); + this.bu(); } } - protected boolean bb() { + protected boolean bc() { return this.getHealth() <= 0.0F || this.isSleeping(); } @@ -262,7 +262,7 @@ public void mount(Entity entity) { } } - public void U() { + public void V() { if (!this.world.isStatic && this.isSneaking()) { this.mount((Entity) null); this.setSneaking(false); @@ -273,7 +273,7 @@ public void U() { float f = this.yaw; float f1 = this.pitch; - super.U(); + super.V(); this.bs = this.bt; this.bt = 0.0F; this.k(this.locX - d0, this.locY - d1, this.locZ - d2); @@ -285,9 +285,9 @@ public void U() { } } - protected void bk() { - super.bk(); - this.aV(); + protected void bl() { + super.bl(); + this.aW(); } public void c() { @@ -638,11 +638,11 @@ protected void h(float f) { this.inventory.a(f); } - public int aP() { + public int aQ() { return this.inventory.l(); } - public float bw() { + public float bx() { int i = 0; ItemStack[] aitemstack = this.inventory.armor; int j = aitemstack.length; @@ -668,14 +668,14 @@ protected void d(DamageSource damagesource, float f) { f = this.c(damagesource, f); float f1 = f; - f = Math.max(f - this.bm(), 0.0F); - this.m(this.bm() - (f1 - f)); + f = Math.max(f - this.bn(), 0.0F); + this.m(this.bn() - (f1 - f)); if (f != 0.0F) { this.a(damagesource.f()); float f2 = this.getHealth(); this.setHealth(this.getHealth() - f); - this.aQ().a(damagesource, f2, f); + this.aR().a(damagesource, f2, f); } } } @@ -695,7 +695,7 @@ public void openTrade(IMerchant imerchant, String s) {} public void c(ItemStack itemstack) {} public boolean p(Entity entity) { - ItemStack itemstack = this.bx(); + ItemStack itemstack = this.by(); ItemStack itemstack1 = itemstack != null ? itemstack.cloneItemStack() : null; if (!entity.c(this)) { @@ -706,7 +706,7 @@ public boolean p(Entity entity) { if (itemstack.a(this, (EntityLiving) entity)) { if (itemstack.count <= 0 && !this.abilities.canInstantlyBuild) { - this.by(); + this.bz(); } return true; @@ -715,9 +715,9 @@ public boolean p(Entity entity) { return false; } else { - if (itemstack != null && itemstack == this.bx()) { + if (itemstack != null && itemstack == this.by()) { if (itemstack.count <= 0 && !this.abilities.canInstantlyBuild) { - this.by(); + this.bz(); } else if (itemstack.count < itemstack1.count && this.abilities.canInstantlyBuild) { itemstack.count = itemstack1.count; } @@ -727,20 +727,20 @@ public boolean p(Entity entity) { } } - public ItemStack bx() { + public ItemStack by() { return this.inventory.getItemInHand(); } - public void by() { + public void bz() { this.inventory.setItem(this.inventory.itemInHandIndex, (ItemStack) null); } - public double W() { + public double X() { return (double) (this.height - 0.5F); } public void attack(Entity entity) { - if (entity.ap()) { + if (entity.aq()) { if (!entity.i(this)) { float f = (float) this.getAttributeInstance(GenericAttributes.e).getValue(); int i = 0; @@ -756,7 +756,7 @@ public void attack(Entity entity) { } if (f > 0.0F || f1 > 0.0F) { - boolean flag = this.fallDistance > 0.0F && !this.onGround && !this.e() && !this.G() && !this.hasEffect(MobEffectList.BLINDNESS) && this.vehicle == null && entity instanceof EntityLiving; + boolean flag = this.fallDistance > 0.0F && !this.onGround && !this.e() && !this.H() && !this.hasEffect(MobEffectList.BLINDNESS) && this.vehicle == null && entity instanceof EntityLiving; if (flag && f > 0.0F) { f *= 1.5F; @@ -799,7 +799,7 @@ public void attack(Entity entity) { } } - ItemStack itemstack = this.bx(); + ItemStack itemstack = this.by(); Object object = entity; if (entity instanceof EntityComplexPart) { @@ -813,7 +813,7 @@ public void attack(Entity entity) { if (itemstack != null && object instanceof EntityLiving) { itemstack.a((EntityLiving) object, this); if (itemstack.count <= 0) { - this.by(); + this.bz(); } } @@ -875,7 +875,7 @@ public EnumBedResult a(int i, int j, int k) { } } - if (this.af()) { + if (this.ag()) { this.mount((Entity) null); } @@ -1043,8 +1043,8 @@ public void a(Statistic statistic) { public void a(Statistic statistic, int i) {} - protected void bd() { - super.bd(); + protected void be() { + super.be(); this.a(StatisticList.u, 1); if (this.isSprinting()) { this.a(0.8F); @@ -1073,7 +1073,7 @@ public void e(float f, float f1) { this.checkMovement(this.locX - d0, this.locY - d1, this.locZ - d2); } - public float bf() { + public float bg() { return (float) this.getAttributeInstance(GenericAttributes.d).getValue(); } @@ -1087,7 +1087,7 @@ public void checkMovement(double d0, double d1, double d2) { this.a(StatisticList.q, i); this.a(0.015F * (float) i * 0.01F); } - } else if (this.G()) { + } else if (this.H()) { i = Math.round(MathHelper.sqrt(d0 * d0 + d2 * d2) * 100.0F); if (i > 0) { this.a(StatisticList.m, i); @@ -1153,9 +1153,9 @@ public void a(EntityLiving entityliving) { } } - public void al() { + public void am() { if (!this.abilities.isFlying) { - super.al(); + super.am(); } } @@ -1215,7 +1215,7 @@ public boolean g(boolean flag) { return (flag || this.foodData.c()) && !this.abilities.isInvulnerable; } - public boolean bI() { + public boolean bJ() { return this.getHealth() > 0.0F && this.getHealth() < this.getMaxHealth(); } @@ -1242,8 +1242,8 @@ public boolean d(int i, int j, int k) { return true; } - if (this.bx() != null) { - ItemStack itemstack = this.bx(); + if (this.by() != null) { + ItemStack itemstack = this.by(); if (itemstack.b(block) || itemstack.a(block) > 1.0F) { return true; @@ -1322,7 +1322,7 @@ public ItemStack getEquipment(int i) { return i == 0 ? this.inventory.getItemInHand() : this.inventory.armor[i - 1]; } - public ItemStack aY() { + public ItemStack aZ() { return this.inventory.getItemInHand(); } @@ -1334,7 +1334,7 @@ public ItemStack[] getEquipment() { return this.inventory.armor; } - public boolean aw() { + public boolean ax() { return !this.abilities.isFlying; } @@ -1358,7 +1358,7 @@ public void m(float f) { this.getDataWatcher().watch(17, Float.valueOf(f)); } - public float bm() { + public float bn() { return this.getDataWatcher().getFloat(17); } } diff --git a/net/minecraft/server/EntityInsentient.java b/net/minecraft/server/EntityInsentient.java index 443edeeda..87ffdc93c 100644 --- a/net/minecraft/server/EntityInsentient.java +++ b/net/minecraft/server/EntityInsentient.java @@ -44,9 +44,9 @@ public EntityInsentient(World world) { } } - protected void ay() { - super.ay(); - this.aW().b(GenericAttributes.b).setValue(16.0D); + protected void az() { + super.az(); + this.aX().b(GenericAttributes.b).setValue(16.0D); } public ControllerLook getControllerLook() { @@ -97,12 +97,12 @@ public void p() { String s = this.r(); if (s != null) { - this.makeSound(s, this.aZ(), this.ba()); + this.makeSound(s, this.ba(), this.bb()); } } - public void x() { - super.x(); + public void y() { + super.y(); this.world.methodProfiler.a("mobBaseTick"); if (this.isAlive() && this.random.nextInt(1000) < this.a_++) { this.a_ = -this.o(); @@ -148,7 +148,7 @@ public void l_() { } protected float f(float f, float f1) { - if (this.be()) { + if (this.bf()) { this.bn.a(); return f1; } else { @@ -337,7 +337,7 @@ public void c() { this.world.methodProfiler.b(); } - protected boolean be() { + protected boolean bf() { return false; } @@ -345,7 +345,7 @@ protected boolean isTypeNotPersistent() { return true; } - protected void bo() { + protected void u() { if (this.persistent) { this.aV = 0; } else { @@ -370,10 +370,10 @@ protected void bo() { } } - protected void bh() { + protected void bi() { ++this.aV; this.world.methodProfiler.a("checkDespawn"); - this.bo(); + this.u(); this.world.methodProfiler.b(); this.world.methodProfiler.a("sensing"); this.bq.a(); @@ -388,7 +388,7 @@ protected void bh() { this.navigation.f(); this.world.methodProfiler.b(); this.world.methodProfiler.a("mob tick"); - this.bj(); + this.bk(); this.world.methodProfiler.b(); this.world.methodProfiler.a("controls"); this.world.methodProfiler.a("move"); @@ -401,11 +401,11 @@ protected void bh() { this.world.methodProfiler.b(); } - protected void bk() { - super.bk(); + protected void bl() { + super.bl(); this.be = 0.0F; this.bf = 0.0F; - this.bo(); + this.u(); float f = 8.0F; if (this.random.nextFloat() < 0.02F) { @@ -433,8 +433,8 @@ protected void bk() { this.pitch = this.f; } - boolean flag = this.G(); - boolean flag1 = this.I(); + boolean flag = this.H(); + boolean flag1 = this.J(); if (flag || flag1) { this.bd = this.random.nextFloat() < 0.8F; @@ -488,7 +488,7 @@ public int bv() { return 4; } - public int ar() { + public int as() { if (this.getGoalTarget() == null) { return 3; } else { @@ -503,7 +503,7 @@ public int ar() { } } - public ItemStack aY() { + public ItemStack aZ() { return this.equipment[0]; } @@ -670,8 +670,8 @@ public static Item a(int i, int j) { protected void bx() { float f = this.world.b(this.locX, this.locY, this.locZ); - if (this.aY() != null && this.random.nextFloat() < 0.25F * f) { - EnchantmentManager.a(this.random, this.aY(), (int) (5.0F + f * (float) this.random.nextInt(18))); + if (this.aZ() != null && this.random.nextFloat() < 0.25F * f) { + EnchantmentManager.a(this.random, this.aZ(), (int) (5.0F + f * (float) this.random.nextInt(18))); } for (int i = 0; i < 4; ++i) { @@ -737,21 +737,21 @@ public boolean isPersistent() { } public final boolean c(EntityHuman entityhuman) { - if (this.bH() && this.bI() == entityhuman) { - this.a(true, !entityhuman.abilities.canInstantlyBuild); + if (this.bH() && this.getLeashHolder() == entityhuman) { + this.unleash(true, !entityhuman.abilities.canInstantlyBuild); return true; } else { ItemStack itemstack = entityhuman.inventory.getItemInHand(); if (itemstack != null && itemstack.id == Item.LEASH.id && this.bG()) { if (!(this instanceof EntityTameableAnimal) || !((EntityTameableAnimal) this).isTamed()) { - this.b(entityhuman, true); + this.setLeashHolder(entityhuman, true); --itemstack.count; return true; } if (entityhuman.getName().equalsIgnoreCase(((EntityTameableAnimal) this).getOwnerName())) { - this.b(entityhuman, true); + this.setLeashHolder(entityhuman, true); --itemstack.count; return true; } @@ -772,12 +772,12 @@ protected void bF() { if (this.bv) { if (this.bw == null || this.bw.dead) { - this.a(true, true); + this.unleash(true, true); } } } - public void a(boolean flag, boolean flag1) { + public void unleash(boolean flag, boolean flag1) { if (this.bv) { this.bv = false; this.bw = null; @@ -799,11 +799,11 @@ public boolean bH() { return this.bv; } - public Entity bI() { + public Entity getLeashHolder() { return this.bw; } - public void b(Entity entity, boolean flag) { + public void setLeashHolder(Entity entity, boolean flag) { this.bv = true; this.bw = entity; if (!this.world.isStatic && flag && this.world instanceof WorldServer) { @@ -838,7 +838,7 @@ private void bJ() { this.bw = entityleash; } else { - this.a(false, true); + this.unleash(false, true); } } diff --git a/net/minecraft/server/EntityIronGolem.java b/net/minecraft/server/EntityIronGolem.java index 626e05deb..5ff20cc96 100644 --- a/net/minecraft/server/EntityIronGolem.java +++ b/net/minecraft/server/EntityIronGolem.java @@ -29,11 +29,11 @@ protected void a() { this.datawatcher.a(16, Byte.valueOf((byte) 0)); } - public boolean be() { + public boolean bf() { return true; } - protected void bj() { + protected void bk() { if (--this.bq <= 0) { this.bq = 70 + this.random.nextInt(50); this.bp = this.world.villages.getClosestVillage(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ), 32); @@ -46,11 +46,11 @@ protected void bj() { } } - super.bj(); + super.bk(); } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(100.0D); this.getAttributeInstance(GenericAttributes.d).setValue(0.25D); } @@ -60,7 +60,7 @@ protected int h(int i) { } protected void n(Entity entity) { - if (entity instanceof IMonster && this.aC().nextInt(20) == 0) { + if (entity instanceof IMonster && this.aD().nextInt(20) == 0) { this.setGoalTarget((EntityLiving) entity); } @@ -90,12 +90,12 @@ public void c() { } public boolean a(Class oclass) { - return this.bW() && EntityHuman.class.isAssignableFrom(oclass) ? false : super.a(oclass); + return this.isPlayerCreated() && EntityHuman.class.isAssignableFrom(oclass) ? false : super.a(oclass); } public void b(NBTTagCompound nbttagcompound) { super.b(nbttagcompound); - nbttagcompound.setBoolean("PlayerCreated", this.bW()); + nbttagcompound.setBoolean("PlayerCreated", this.isPlayerCreated()); } public void a(NBTTagCompound nbttagcompound) { @@ -129,11 +129,11 @@ protected String r() { return "none"; } - protected String aN() { + protected String aO() { return "mob.irongolem.hit"; } - protected String aO() { + protected String aP() { return "mob.irongolem.death"; } @@ -161,7 +161,7 @@ public int bV() { return this.bs; } - public boolean bW() { + public boolean isPlayerCreated() { return (this.datawatcher.getByte(16) & 1) != 0; } @@ -176,7 +176,7 @@ public void setPlayerCreated(boolean flag) { } public void die(DamageSource damagesource) { - if (!this.bW() && this.killer != null && this.bp != null) { + if (!this.isPlayerCreated() && this.killer != null && this.bp != null) { this.bp.a(this.killer.getName(), -5); } diff --git a/net/minecraft/server/EntityItem.java b/net/minecraft/server/EntityItem.java index 959c609b0..33ab56f55 100644 --- a/net/minecraft/server/EntityItem.java +++ b/net/minecraft/server/EntityItem.java @@ -140,7 +140,7 @@ public void c() { this.age = 4800; } - public boolean H() { + public boolean I() { return this.world.a(this.boundingBox, Material.WATER, (Entity) this); } @@ -154,7 +154,7 @@ public boolean damageEntity(DamageSource damagesource, float f) { } else if (this.getItemStack() != null && this.getItemStack().id == Item.NETHER_STAR.id && damagesource.c()) { return false; } else { - this.J(); + this.K(); this.d = (int) ((float) this.d - f); if (this.d <= 0) { this.die(); @@ -218,7 +218,7 @@ public String getLocalizedName() { return LocaleI18n.get("item." + this.getItemStack().a()); } - public boolean ap() { + public boolean aq() { return false; } diff --git a/net/minecraft/server/EntityItemFrame.java b/net/minecraft/server/EntityItemFrame.java index 0a0455ee6..b45ecfa68 100644 --- a/net/minecraft/server/EntityItemFrame.java +++ b/net/minecraft/server/EntityItemFrame.java @@ -27,7 +27,7 @@ public int e() { } public void b(Entity entity) { - ItemStack itemstack = this.h(); + ItemStack itemstack = this.getItem(); if (entity instanceof EntityHuman) { EntityHuman entityhuman = (EntityHuman) entity; @@ -58,11 +58,11 @@ private void b(ItemStack itemstack) { } } - public ItemStack h() { + public ItemStack getItem() { return this.getDataWatcher().getItemStack(2); } - public void a(ItemStack itemstack) { + public void setItem(ItemStack itemstack) { itemstack = itemstack.cloneItemStack(); itemstack.count = 1; itemstack.a(this); @@ -70,7 +70,7 @@ public void a(ItemStack itemstack) { this.getDataWatcher().h(2); } - public int i() { + public int getRotation() { return this.getDataWatcher().getByte(3); } @@ -79,9 +79,9 @@ public void setRotation(int i) { } public void b(NBTTagCompound nbttagcompound) { - if (this.h() != null) { - nbttagcompound.setCompound("Item", this.h().save(new NBTTagCompound())); - nbttagcompound.setByte("ItemRotation", (byte) this.i()); + if (this.getItem() != null) { + nbttagcompound.setCompound("Item", this.getItem().save(new NBTTagCompound())); + nbttagcompound.setByte("ItemRotation", (byte) this.getRotation()); nbttagcompound.setFloat("ItemDropChance", this.e); } @@ -92,7 +92,7 @@ public void a(NBTTagCompound nbttagcompound) { NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("Item"); if (nbttagcompound1 != null && !nbttagcompound1.isEmpty()) { - this.a(ItemStack.createStack(nbttagcompound1)); + this.setItem(ItemStack.createStack(nbttagcompound1)); this.setRotation(nbttagcompound.getByte("ItemRotation")); if (nbttagcompound.hasKey("ItemDropChance")) { this.e = nbttagcompound.getFloat("ItemDropChance"); @@ -103,17 +103,17 @@ public void a(NBTTagCompound nbttagcompound) { } public boolean c(EntityHuman entityhuman) { - if (this.h() == null) { - ItemStack itemstack = entityhuman.aY(); + if (this.getItem() == null) { + ItemStack itemstack = entityhuman.aZ(); if (itemstack != null && !this.world.isStatic) { - this.a(itemstack); + this.setItem(itemstack); if (!entityhuman.abilities.canInstantlyBuild && --itemstack.count <= 0) { entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, (ItemStack) null); } } } else if (!this.world.isStatic) { - this.setRotation(this.i() + 1); + this.setRotation(this.getRotation() + 1); } return true; diff --git a/net/minecraft/server/EntityLargeFireball.java b/net/minecraft/server/EntityLargeFireball.java index 143ee5275..8d0f3e2e9 100644 --- a/net/minecraft/server/EntityLargeFireball.java +++ b/net/minecraft/server/EntityLargeFireball.java @@ -2,7 +2,7 @@ public class EntityLargeFireball extends EntityFireball { - public int e = 1; + public int yield = 1; public EntityLargeFireball(World world) { super(world); @@ -18,20 +18,20 @@ protected void a(MovingObjectPosition movingobjectposition) { movingobjectposition.entity.damageEntity(DamageSource.fireball(this, this.shooter), 6.0F); } - this.world.createExplosion((Entity) null, this.locX, this.locY, this.locZ, (float) this.e, true, this.world.getGameRules().getBoolean("mobGriefing")); + this.world.createExplosion((Entity) null, this.locX, this.locY, this.locZ, (float) this.yield, true, this.world.getGameRules().getBoolean("mobGriefing")); this.die(); } } public void b(NBTTagCompound nbttagcompound) { super.b(nbttagcompound); - nbttagcompound.setInt("ExplosionPower", this.e); + nbttagcompound.setInt("ExplosionPower", this.yield); } public void a(NBTTagCompound nbttagcompound) { super.a(nbttagcompound); if (nbttagcompound.hasKey("ExplosionPower")) { - this.e = nbttagcompound.getInt("ExplosionPower"); + this.yield = nbttagcompound.getInt("ExplosionPower"); } } } diff --git a/net/minecraft/server/EntityLeash.java b/net/minecraft/server/EntityLeash.java index d7f33d03f..53e190086 100644 --- a/net/minecraft/server/EntityLeash.java +++ b/net/minecraft/server/EntityLeash.java @@ -39,7 +39,7 @@ public void b(NBTTagCompound nbttagcompound) {} public void a(NBTTagCompound nbttagcompound) {} public boolean c(EntityHuman entityhuman) { - ItemStack itemstack = entityhuman.aY(); + ItemStack itemstack = entityhuman.aZ(); boolean flag = false; double d0; List list; @@ -54,8 +54,8 @@ public boolean c(EntityHuman entityhuman) { while (iterator.hasNext()) { entityinsentient = (EntityInsentient) iterator.next(); - if (entityinsentient.bH() && entityinsentient.bI() == entityhuman) { - entityinsentient.b(this, true); + if (entityinsentient.bH() && entityinsentient.getLeashHolder() == entityhuman) { + entityinsentient.setLeashHolder(this, true); flag = true; } } @@ -72,8 +72,8 @@ public boolean c(EntityHuman entityhuman) { while (iterator.hasNext()) { entityinsentient = (EntityInsentient) iterator.next(); - if (entityinsentient.bH() && entityinsentient.bI() == this) { - entityinsentient.a(true, false); + if (entityinsentient.bH() && entityinsentient.getLeashHolder() == this) { + entityinsentient.unleash(true, false); } } } diff --git a/net/minecraft/server/EntityLiving.java b/net/minecraft/server/EntityLiving.java index cf5ab115f..6f5759e57 100644 --- a/net/minecraft/server/EntityLiving.java +++ b/net/minecraft/server/EntityLiving.java @@ -71,7 +71,7 @@ public abstract class EntityLiving extends Entity { public EntityLiving(World world) { super(world); - this.ay(); + this.az(); this.setHealth(this.getMaxHealth()); this.m = true; this.aM = (float) (Math.random() + 1.0D) * 0.01F; @@ -89,18 +89,18 @@ protected void a() { this.datawatcher.a(6, Float.valueOf(1.0F)); } - protected void ay() { - this.aW().b(GenericAttributes.a); - this.aW().b(GenericAttributes.c); - this.aW().b(GenericAttributes.d); - if (!this.be()) { + protected void az() { + this.aX().b(GenericAttributes.a); + this.aX().b(GenericAttributes.c); + this.aX().b(GenericAttributes.d); + if (!this.bf()) { this.getAttributeInstance(GenericAttributes.d).setValue(0.10000000149011612D); } } protected void a(double d0, boolean flag) { - if (!this.G()) { - this.H(); + if (!this.H()) { + this.I(); } if (flag && this.fallDistance > 0.0F) { @@ -125,13 +125,13 @@ protected void a(double d0, boolean flag) { super.a(d0, flag); } - public boolean az() { + public boolean aA() { return false; } - public void x() { + public void y() { this.aD = this.aE; - super.x(); + super.y(); this.world.methodProfiler.a("livingEntityBaseTick"); if (this.isAlive() && this.inBlock()) { this.damageEntity(DamageSource.STUCK, 1.0F); @@ -144,7 +144,7 @@ public void x() { boolean flag = this instanceof EntityHuman && ((EntityHuman) this).abilities.isInvulnerable; if (this.isAlive() && this.a(Material.WATER)) { - if (!this.az() && !this.hasEffect(MobEffectList.WATER_BREATHING.id) && !flag) { + if (!this.aA() && !this.hasEffect(MobEffectList.WATER_BREATHING.id) && !flag) { this.setAirTicks(this.h(this.getAirTicks())); if (this.getAirTicks() == -20) { this.setAirTicks(0); @@ -162,7 +162,7 @@ public void x() { } this.extinguish(); - if (!this.world.isStatic && this.af() && this.vehicle instanceof EntityLiving) { + if (!this.world.isStatic && this.ag() && this.vehicle instanceof EntityLiving) { this.mount((Entity) null); } } else { @@ -183,7 +183,7 @@ public void x() { } if (this.getHealth() <= 0.0F) { - this.aA(); + this.aB(); } if (this.lastDamageByPlayerTime > 0) { @@ -200,7 +200,7 @@ public void x() { this.b((EntityLiving) null); } - this.aI(); + this.aJ(); this.aZ = this.aY; this.aO = this.aN; this.aQ = this.aP; @@ -213,7 +213,7 @@ public boolean isBaby() { return false; } - protected void aA() { + protected void aB() { ++this.deathTicks; if (this.deathTicks == 20) { int i; @@ -255,7 +255,7 @@ protected boolean alwaysGivesExp() { return false; } - public Random aC() { + public Random aD() { return this.random; } @@ -263,7 +263,7 @@ public EntityLiving getLastDamager() { return this.lastDamager; } - public int aE() { + public int aF() { return this.j; } @@ -272,11 +272,11 @@ public void b(EntityLiving entityliving) { this.j = this.ticksLived; } - public EntityLiving aF() { + public EntityLiving aG() { return this.bn; } - public int aG() { + public int aH() { return this.bo; } @@ -290,7 +290,7 @@ public void k(Entity entity) { this.bo = this.ticksLived; } - public int aH() { + public int aI() { return this.aV; } @@ -300,7 +300,7 @@ public void b(NBTTagCompound nbttagcompound) { nbttagcompound.setShort("HurtTime", (short) this.hurtTicks); nbttagcompound.setShort("DeathTime", (short) this.deathTicks); nbttagcompound.setShort("AttackTime", (short) this.attackTicks); - nbttagcompound.setFloat("AbsorptionAmount", this.bm()); + nbttagcompound.setFloat("AbsorptionAmount", this.bn()); ItemStack[] aitemstack = this.getEquipment(); int i = aitemstack.length; @@ -314,7 +314,7 @@ public void b(NBTTagCompound nbttagcompound) { } } - nbttagcompound.set("Attributes", GenericAttributes.a(this.aW())); + nbttagcompound.set("Attributes", GenericAttributes.a(this.aX())); aitemstack = this.getEquipment(); i = aitemstack.length; @@ -342,7 +342,7 @@ public void b(NBTTagCompound nbttagcompound) { public void a(NBTTagCompound nbttagcompound) { this.m(nbttagcompound.getFloat("AbsorptionAmount")); if (nbttagcompound.hasKey("Attributes") && this.world != null && !this.world.isStatic) { - GenericAttributes.a(this.aW(), nbttagcompound.getList("Attributes"), this.world == null ? null : this.world.getLogger()); + GenericAttributes.a(this.aX(), nbttagcompound.getList("Attributes"), this.world == null ? null : this.world.getLogger()); } if (nbttagcompound.hasKey("ActiveEffects")) { @@ -375,7 +375,7 @@ public void a(NBTTagCompound nbttagcompound) { this.attackTicks = nbttagcompound.getShort("AttackTime"); } - protected void aI() { + protected void aJ() { Iterator iterator = this.effects.keySet().iterator(); while (iterator.hasNext()) { @@ -437,7 +437,7 @@ protected void aI() { } } - public void aJ() { + public void aK() { Iterator iterator = this.effects.keySet().iterator(); while (iterator.hasNext()) { @@ -491,7 +491,7 @@ public boolean d(MobEffect mobeffect) { return true; } - public boolean aL() { + public boolean aM() { return this.getMonsterType() == EnumMonsterType.UNDEAD; } @@ -506,22 +506,22 @@ public void k(int i) { protected void a(MobEffect mobeffect) { this.updateEffects = true; if (!this.world.isStatic) { - MobEffectList.byId[mobeffect.getEffectId()].b(this, this.aW(), mobeffect.getAmplifier()); + MobEffectList.byId[mobeffect.getEffectId()].b(this, this.aX(), mobeffect.getAmplifier()); } } protected void a(MobEffect mobeffect, boolean flag) { this.updateEffects = true; if (flag && !this.world.isStatic) { - MobEffectList.byId[mobeffect.getEffectId()].a(this, this.aW(), mobeffect.getAmplifier()); - MobEffectList.byId[mobeffect.getEffectId()].b(this, this.aW(), mobeffect.getAmplifier()); + MobEffectList.byId[mobeffect.getEffectId()].a(this, this.aX(), mobeffect.getAmplifier()); + MobEffectList.byId[mobeffect.getEffectId()].b(this, this.aX(), mobeffect.getAmplifier()); } } protected void b(MobEffect mobeffect) { this.updateEffects = true; if (!this.world.isStatic) { - MobEffectList.byId[mobeffect.getEffectId()].a(this, this.aW(), mobeffect.getAmplifier()); + MobEffectList.byId[mobeffect.getEffectId()].a(this, this.aX(), mobeffect.getAmplifier()); } } @@ -601,7 +601,7 @@ public boolean damageEntity(DamageSource damagesource, float f) { if (flag) { this.world.broadcastEntityEffect(this, (byte) 2); if (damagesource != DamageSource.DROWN) { - this.J(); + this.K(); } if (entity != null) { @@ -622,12 +622,12 @@ public boolean damageEntity(DamageSource damagesource, float f) { if (this.getHealth() <= 0.0F) { if (flag) { - this.makeSound(this.aO(), this.aZ(), this.ba()); + this.makeSound(this.aP(), this.ba(), this.bb()); } this.die(damagesource); } else if (flag) { - this.makeSound(this.aN(), this.aZ(), this.ba()); + this.makeSound(this.aO(), this.ba(), this.bb()); } return true; @@ -654,7 +654,7 @@ public void a(ItemStack itemstack) { public void die(DamageSource damagesource) { Entity entity = damagesource.getEntity(); - EntityLiving entityliving = this.aR(); + EntityLiving entityliving = this.aS(); if (this.bb >= 0 && entityliving != null) { entityliving.b(this, this.bb); @@ -708,11 +708,11 @@ public void a(Entity entity, float f, double d0, double d1) { } } - protected String aN() { + protected String aO() { return "damage.hit"; } - protected String aO() { + protected String aP() { return "damage.hit"; } @@ -757,7 +757,7 @@ protected void b(float f) { } } - public int aP() { + public int aQ() { int i = 0; ItemStack[] aitemstack = this.getEquipment(); int j = aitemstack.length; @@ -779,7 +779,7 @@ protected void h(float f) {} protected float b(DamageSource damagesource, float f) { if (!damagesource.ignoresArmor()) { - int i = 25 - this.aP(); + int i = 25 - this.aQ(); float f1 = f * (float) i; this.h(f); @@ -829,23 +829,23 @@ protected void d(DamageSource damagesource, float f) { f = this.c(damagesource, f); float f1 = f; - f = Math.max(f - this.bm(), 0.0F); - this.m(this.bm() - (f1 - f)); + f = Math.max(f - this.bn(), 0.0F); + this.m(this.bn() - (f1 - f)); if (f != 0.0F) { float f2 = this.getHealth(); this.setHealth(f2 - f); - this.aQ().a(damagesource, f2, f); - this.m(this.bm() - f); + this.aR().a(damagesource, f2, f); + this.m(this.bn() - f); } } } - public CombatTracker aQ() { + public CombatTracker aR() { return this.combatTracker; } - public EntityLiving aR() { + public EntityLiving aS() { return (EntityLiving) (this.combatTracker.c() != null ? this.combatTracker.c() : (this.killer != null ? this.killer : (this.lastDamager != null ? this.lastDamager : null))); } @@ -853,7 +853,7 @@ public final float getMaxHealth() { return (float) this.getAttributeInstance(GenericAttributes.a).getValue(); } - public final int aT() { + public final int aU() { return this.datawatcher.getByte(9); } @@ -865,7 +865,7 @@ private int h() { return this.hasEffect(MobEffectList.FASTER_DIG) ? 6 - (1 + this.getEffect(MobEffectList.FASTER_DIG).getAmplifier()) * 1 : (this.hasEffect(MobEffectList.SLOWER_DIG) ? 6 + (1 + this.getEffect(MobEffectList.SLOWER_DIG).getAmplifier()) * 2 : 6); } - public void aU() { + public void aV() { if (!this.au || this.av >= this.h() / 2 || this.av < 0) { this.av = -1; this.au = true; @@ -875,11 +875,11 @@ public void aU() { } } - protected void B() { + protected void C() { this.damageEntity(DamageSource.OUT_OF_WORLD, 4.0F); } - protected void aV() { + protected void aW() { int i = this.h(); if (this.au) { @@ -896,10 +896,10 @@ protected void aV() { } public AttributeInstance getAttributeInstance(IAttribute iattribute) { - return this.aW().a(iattribute); + return this.aX().a(iattribute); } - public AttributeMapBase aW() { + public AttributeMapBase aX() { if (this.d == null) { this.d = new AttributeMapServer(); } @@ -911,7 +911,7 @@ public EnumMonsterType getMonsterType() { return EnumMonsterType.UNDEFINED; } - public abstract ItemStack aY(); + public abstract ItemStack aZ(); public abstract ItemStack getEquipment(int i); @@ -932,15 +932,15 @@ public void setSprinting(boolean flag) { public abstract ItemStack[] getEquipment(); - protected float aZ() { + protected float ba() { return 1.0F; } - protected float ba() { + protected float bb() { return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F; } - protected boolean bb() { + protected boolean bc() { return this.getHealth() <= 0.0F; } @@ -979,7 +979,7 @@ public void l(Entity entity) { this.enderTeleportTo(d0, d1, d2); } - protected void bd() { + protected void be() { this.motY = 0.41999998688697815D; if (this.hasEffect(MobEffectList.JUMP)) { this.motY += (double) ((float) (this.getEffect(MobEffectList.JUMP).getAmplifier() + 1) * 0.1F); @@ -998,9 +998,9 @@ protected void bd() { public void e(float f, float f1) { double d0; - if (this.G() && (!(this instanceof EntityHuman) || !((EntityHuman) this).abilities.isFlying)) { + if (this.H() && (!(this instanceof EntityHuman) || !((EntityHuman) this).abilities.isFlying)) { d0 = this.locY; - this.a(f, f1, this.be() ? 0.04F : 0.02F); + this.a(f, f1, this.bf() ? 0.04F : 0.02F); this.move(this.motX, this.motY, this.motZ); this.motX *= 0.800000011920929D; this.motY *= 0.800000011920929D; @@ -1009,7 +1009,7 @@ public void e(float f, float f1) { if (this.positionChanged && this.c(this.motX, this.motY + 0.6000000238418579D - this.locY + d0, this.motZ)) { this.motY = 0.30000001192092896D; } - } else if (this.I() && (!(this instanceof EntityHuman) || !((EntityHuman) this).abilities.isFlying)) { + } else if (this.J() && (!(this instanceof EntityHuman) || !((EntityHuman) this).abilities.isFlying)) { d0 = this.locY; this.a(f, f1, 0.02F); this.move(this.motX, this.motY, this.motZ); @@ -1036,7 +1036,7 @@ public void e(float f, float f1) { float f4; if (this.onGround) { - f4 = this.bf() * f3; + f4 = this.bg() * f3; } else { f4 = this.aR; } @@ -1116,12 +1116,12 @@ public void e(float f, float f1) { this.aH += this.aG; } - protected boolean be() { + protected boolean bf() { return false; } - public float bf() { - return this.be() ? this.bp : 0.1F; + public float bg() { + return this.bf() ? this.bp : 0.1F; } public void i(float f) { @@ -1140,7 +1140,7 @@ public boolean isSleeping() { public void l_() { super.l_(); if (!this.world.isStatic) { - int i = this.aT(); + int i = this.aU(); if (i > 0) { if (this.aw <= 0) { @@ -1281,7 +1281,7 @@ public void c() { --this.bh; this.setPosition(d0, d1, d2); this.b(this.yaw, this.pitch); - } else if (!this.bl()) { + } else if (!this.bm()) { this.motX *= 0.98D; this.motY *= 0.98D; this.motZ *= 0.98D; @@ -1300,19 +1300,19 @@ public void c() { } this.world.methodProfiler.a("ai"); - if (this.bb()) { + if (this.bc()) { this.bd = false; this.be = 0.0F; this.bf = 0.0F; this.bg = 0.0F; - } else if (this.bl()) { - if (this.be()) { + } else if (this.bm()) { + if (this.bf()) { this.world.methodProfiler.a("newAi"); - this.bh(); + this.bi(); this.world.methodProfiler.b(); } else { this.world.methodProfiler.a("oldAi"); - this.bk(); + this.bl(); this.world.methodProfiler.b(); this.aP = this.yaw; } @@ -1321,9 +1321,9 @@ public void c() { this.world.methodProfiler.b(); this.world.methodProfiler.a("jump"); if (this.bd) { - if (!this.G() && !this.I()) { + if (!this.H() && !this.J()) { if (this.onGround && this.bq == 0) { - this.bd(); + this.be(); this.bq = 10; } } else { @@ -1342,22 +1342,22 @@ public void c() { this.world.methodProfiler.b(); this.world.methodProfiler.a("push"); if (!this.world.isStatic) { - this.bi(); + this.bj(); } this.world.methodProfiler.b(); } - protected void bh() {} + protected void bi() {} - protected void bi() { + protected void bj() { List list = this.world.getEntities(this, this.boundingBox.grow(0.20000000298023224D, 0.0D, 0.20000000298023224D)); if (list != null && !list.isEmpty()) { for (int i = 0; i < list.size(); ++i) { Entity entity = (Entity) list.get(i); - if (entity.L()) { + if (entity.M()) { this.n(entity); } } @@ -1368,16 +1368,16 @@ protected void n(Entity entity) { entity.collide(this); } - public void U() { - super.U(); + public void V() { + super.V(); this.aW = this.aX; this.aX = 0.0F; this.fallDistance = 0.0F; } - protected void bj() {} + protected void bk() {} - protected void bk() { + protected void bl() { ++this.aV; } @@ -1407,7 +1407,7 @@ public boolean o(Entity entity) { return this.world.a(this.world.getVec3DPool().create(this.locX, this.locY + (double) this.getHeadHeight(), this.locZ), this.world.getVec3DPool().create(entity.locX, entity.locY + (double) entity.getHeadHeight(), entity.locZ)) == null; } - public Vec3D Z() { + public Vec3D aa() { return this.j(1.0F); } @@ -1435,15 +1435,15 @@ public Vec3D j(float f) { } } - public boolean bl() { + public boolean bm() { return !this.world.isStatic; } - public boolean K() { + public boolean L() { return !this.dead; } - public boolean L() { + public boolean M() { return !this.dead; } @@ -1451,7 +1451,7 @@ public float getHeadHeight() { return this.length * 0.85F; } - protected void J() { + protected void K() { this.velocityChanged = this.random.nextDouble() >= this.getAttributeInstance(GenericAttributes.c).getValue(); } @@ -1459,7 +1459,7 @@ public float getHeadRotation() { return this.aP; } - public float bm() { + public float bn() { return this.br; } diff --git a/net/minecraft/server/EntityMagmaCube.java b/net/minecraft/server/EntityMagmaCube.java index c69268281..a0efdb2e1 100644 --- a/net/minecraft/server/EntityMagmaCube.java +++ b/net/minecraft/server/EntityMagmaCube.java @@ -7,8 +7,8 @@ public EntityMagmaCube(World world) { this.fireProof = true; } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.d).setValue(0.20000000298023224D); } @@ -16,7 +16,7 @@ public boolean canSpawn() { return this.world.difficulty > 0 && this.world.b(this.boundingBox) && this.world.getCubes(this, this.boundingBox).isEmpty() && !this.world.containsLiquid(this.boundingBox); } - public int aP() { + public int aQ() { return this.getSize() * 3; } @@ -64,7 +64,7 @@ protected void bM() { this.h *= 0.9F; } - protected void bd() { + protected void be() { this.motY = (double) (0.42F + (float) this.getSize() * 0.1F); this.an = true; } @@ -79,11 +79,11 @@ protected int bO() { return super.bO() + 2; } - protected String aN() { + protected String aO() { return "mob.slime." + (this.getSize() > 1 ? "big" : "small"); } - protected String aO() { + protected String aP() { return "mob.slime." + (this.getSize() > 1 ? "big" : "small"); } @@ -91,7 +91,7 @@ protected String bP() { return this.getSize() > 1 ? "mob.magmacube.big" : "mob.magmacube.small"; } - public boolean I() { + public boolean J() { return false; } diff --git a/net/minecraft/server/EntityMinecartAbstract.java b/net/minecraft/server/EntityMinecartAbstract.java index bd06759e6..18df34b81 100644 --- a/net/minecraft/server/EntityMinecartAbstract.java +++ b/net/minecraft/server/EntityMinecartAbstract.java @@ -59,14 +59,14 @@ protected void a() { } public AxisAlignedBB g(Entity entity) { - return entity.L() ? entity.boundingBox : null; + return entity.M() ? entity.boundingBox : null; } - public AxisAlignedBB D() { + public AxisAlignedBB E() { return null; } - public boolean L() { + public boolean M() { return true; } @@ -81,7 +81,7 @@ public EntityMinecartAbstract(World world, double d0, double d1, double d2) { this.lastZ = d2; } - public double X() { + public double Y() { return (double) this.length * 0.0D - 0.30000001192092896D; } @@ -92,7 +92,7 @@ public boolean damageEntity(DamageSource damagesource, float f) { } else { this.h(-this.k()); this.c(10); - this.J(); + this.K(); this.setDamage(this.getDamage() + f * 10.0F); boolean flag = damagesource.getEntity() instanceof EntityHuman && ((EntityHuman) damagesource.getEntity()).abilities.canInstantlyBuild; @@ -126,7 +126,7 @@ public void a(DamageSource damagesource) { this.a(itemstack, 0.0F); } - public boolean K() { + public boolean L() { return !this.dead; } @@ -151,7 +151,7 @@ public void l_() { } if (this.locY < -64.0D) { - this.B(); + this.C(); } int i; @@ -160,12 +160,12 @@ public void l_() { this.world.methodProfiler.a("portal"); MinecraftServer minecraftserver = ((WorldServer) this.world).getMinecraftServer(); - i = this.y(); + i = this.z(); if (this.ap) { if (minecraftserver.getAllowNether()) { if (this.vehicle == null && this.aq++ >= i) { this.aq = i; - this.portalCooldown = this.ab(); + this.portalCooldown = this.ac(); byte b0; if (this.world.worldProvider.dimension == -1) { @@ -241,7 +241,7 @@ public void l_() { this.b(d4); } - this.C(); + this.D(); this.pitch = 0.0F; double d6 = this.lastX - this.locX; double d7 = this.lastZ - this.locZ; @@ -267,7 +267,7 @@ public void l_() { for (int j1 = 0; j1 < list.size(); ++j1) { Entity entity = (Entity) list.get(j1); - if (entity != this.passenger && entity.L() && entity instanceof EntityMinecartAbstract) { + if (entity != this.passenger && entity.M() && entity instanceof EntityMinecartAbstract) { entity.collide(this); } } diff --git a/net/minecraft/server/EntityMinecartHopper.java b/net/minecraft/server/EntityMinecartHopper.java index cead20429..01b3d2d3e 100644 --- a/net/minecraft/server/EntityMinecartHopper.java +++ b/net/minecraft/server/EntityMinecartHopper.java @@ -42,12 +42,12 @@ public boolean c(EntityHuman entityhuman) { public void a(int i, int j, int k, boolean flag) { boolean flag1 = !flag; - if (flag1 != this.ay()) { + if (flag1 != this.u()) { this.f(flag1); } } - public boolean ay() { + public boolean u() { return this.a; } @@ -73,7 +73,7 @@ public double aC() { public void l_() { super.l_(); - if (!this.world.isStatic && this.isAlive() && this.ay()) { + if (!this.world.isStatic && this.isAlive() && this.u()) { --this.b; if (!this.aE()) { this.l(0); diff --git a/net/minecraft/server/EntityMinecartTNT.java b/net/minecraft/server/EntityMinecartTNT.java index 754f9fd60..214a79489 100644 --- a/net/minecraft/server/EntityMinecartTNT.java +++ b/net/minecraft/server/EntityMinecartTNT.java @@ -88,16 +88,16 @@ public void d() { } } - public boolean ay() { + public boolean u() { return this.fuse > -1; } public float a(Explosion explosion, World world, int i, int j, int k, Block block) { - return this.ay() && (BlockMinecartTrackAbstract.e_(block.id) || BlockMinecartTrackAbstract.d_(world, i, j + 1, k)) ? 0.0F : super.a(explosion, world, i, j, k, block); + return this.u() && (BlockMinecartTrackAbstract.e_(block.id) || BlockMinecartTrackAbstract.d_(world, i, j + 1, k)) ? 0.0F : super.a(explosion, world, i, j, k, block); } public boolean a(Explosion explosion, World world, int i, int j, int k, int l, float f) { - return this.ay() && (BlockMinecartTrackAbstract.e_(l) || BlockMinecartTrackAbstract.d_(world, i, j + 1, k)) ? false : super.a(explosion, world, i, j, k, l, f); + return this.u() && (BlockMinecartTrackAbstract.e_(l) || BlockMinecartTrackAbstract.d_(world, i, j + 1, k)) ? false : super.a(explosion, world, i, j, k, l, f); } protected void a(NBTTagCompound nbttagcompound) { diff --git a/net/minecraft/server/EntityMonster.java b/net/minecraft/server/EntityMonster.java index bdba2ad4b..0492f7c3c 100644 --- a/net/minecraft/server/EntityMonster.java +++ b/net/minecraft/server/EntityMonster.java @@ -8,7 +8,7 @@ public EntityMonster(World world) { } public void c() { - this.aV(); + this.aW(); float f = this.d(1.0F); if (f > 0.5F) { @@ -120,8 +120,8 @@ public boolean canSpawn() { return this.world.difficulty > 0 && this.i_() && super.canSpawn(); } - protected void ay() { - super.ay(); - this.aW().b(GenericAttributes.e); + protected void az() { + super.az(); + this.aX().b(GenericAttributes.e); } } diff --git a/net/minecraft/server/EntityOcelot.java b/net/minecraft/server/EntityOcelot.java index d780223f8..8b5d7f2f6 100644 --- a/net/minecraft/server/EntityOcelot.java +++ b/net/minecraft/server/EntityOcelot.java @@ -27,7 +27,7 @@ protected void a() { this.datawatcher.a(18, Byte.valueOf((byte) 0)); } - public void bj() { + public void bk() { if (this.getControllerMove().a()) { double d0 = this.getControllerMove().b(); @@ -51,12 +51,12 @@ protected boolean isTypeNotPersistent() { return !this.isTamed() && this.ticksLived > 2400; } - public boolean be() { + public boolean bf() { return true; } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(10.0D); this.getAttributeInstance(GenericAttributes.d).setValue(0.30000001192092896D); } @@ -77,15 +77,15 @@ protected String r() { return this.isTamed() ? (this.bY() ? "mob.cat.purr" : (this.random.nextInt(4) == 0 ? "mob.cat.purreow" : "mob.cat.meow")) : ""; } - protected String aN() { + protected String aO() { return "mob.cat.hitt"; } - protected String aO() { + protected String aP() { return "mob.cat.hitt"; } - protected float aZ() { + protected float ba() { return 0.4F; } diff --git a/net/minecraft/server/EntityPig.java b/net/minecraft/server/EntityPig.java index 487dd3b84..b968836da 100644 --- a/net/minecraft/server/EntityPig.java +++ b/net/minecraft/server/EntityPig.java @@ -20,22 +20,22 @@ public EntityPig(World world) { this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this)); } - public boolean be() { + public boolean bf() { return true; } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(10.0D); this.getAttributeInstance(GenericAttributes.d).setValue(0.25D); } - protected void bh() { - super.bh(); + protected void bi() { + super.bi(); } public boolean by() { - ItemStack itemstack = ((EntityHuman) this.passenger).aY(); + ItemStack itemstack = ((EntityHuman) this.passenger).aZ(); return itemstack != null && itemstack.id == Item.CARROT_STICK.id; } @@ -59,11 +59,11 @@ protected String r() { return "mob.pig.say"; } - protected String aN() { + protected String aO() { return "mob.pig.say"; } - protected String aO() { + protected String aP() { return "mob.pig.death"; } diff --git a/net/minecraft/server/EntityPigZombie.java b/net/minecraft/server/EntityPigZombie.java index 22eac2458..94ee6473e 100644 --- a/net/minecraft/server/EntityPigZombie.java +++ b/net/minecraft/server/EntityPigZombie.java @@ -16,14 +16,14 @@ public EntityPigZombie(World world) { this.fireProof = true; } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(bp).setValue(0.0D); this.getAttributeInstance(GenericAttributes.d).setValue(0.5D); this.getAttributeInstance(GenericAttributes.e).setValue(5.0D); } - protected boolean be() { + protected boolean bf() { return false; } @@ -39,7 +39,7 @@ public void l_() { this.bu = this.target; if (this.soundDelay > 0 && --this.soundDelay == 0) { - this.makeSound("mob.zombiepig.zpigangry", this.aZ() * 2.0F, ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) * 1.8F); + this.makeSound("mob.zombiepig.zpigangry", this.ba() * 2.0F, ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) * 1.8F); } super.l_(); @@ -99,11 +99,11 @@ protected String r() { return "mob.zombiepig.zpig"; } - protected String aN() { + protected String aO() { return "mob.zombiepig.zpighurt"; } - protected String aO() { + protected String aP() { return "mob.zombiepig.zpigdeath"; } diff --git a/net/minecraft/server/EntityPlayer.java b/net/minecraft/server/EntityPlayer.java index 957be40c7..a29ec58e0 100644 --- a/net/minecraft/server/EntityPlayer.java +++ b/net/minecraft/server/EntityPlayer.java @@ -29,6 +29,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { private int bU; private int bV; private boolean bW = true; + private long bX = 0L; private int containerCounter; public boolean h; public int ping; @@ -152,6 +153,10 @@ public void l_() { } } } + + if (this.bX > 0L && this.server.ar() > 0 && MinecraftServer.aq() - this.bX > (long) (this.server.ar() * 1000 * 60)) { + this.playerConnection.disconnect("You have been idle for too long!"); + } } public void h() { @@ -177,8 +182,8 @@ public void h() { this.bR = this.foodData.e() == 0.0F; } - if (this.getHealth() + this.bm() != this.bO) { - this.bO = this.getHealth() + this.bm(); + if (this.getHealth() + this.bn() != this.bO) { + this.bO = this.getHealth() + this.bn(); Collection collection = this.getScoreboard().getObjectivesForCriteria(IScoreboardCriteria.f); Iterator iterator = collection.iterator(); @@ -203,7 +208,7 @@ public void h() { } public void die(DamageSource damagesource) { - this.server.getPlayerList().sendMessage(this.aQ().b()); + this.server.getPlayerList().sendMessage(this.aR().b()); if (!this.world.getGameRules().getBoolean("keepInventory")) { this.inventory.m(); } @@ -218,7 +223,7 @@ public void die(DamageSource damagesource) { scoreboardscore.incrementScore(); } - EntityLiving entityliving = this.aR(); + EntityLiving entityliving = this.aS(); if (entityliving != null) { entityliving.b(this, this.bb); @@ -657,4 +662,8 @@ public void a(String s, int i) { public ChunkCoordinates b() { return new ChunkCoordinates(MathHelper.floor(this.locX), MathHelper.floor(this.locY + 0.5D), MathHelper.floor(this.locZ)); } + + public void u() { + this.bX = MinecraftServer.aq(); + } } diff --git a/net/minecraft/server/EntityPotion.java b/net/minecraft/server/EntityPotion.java index 263adf4b2..e24f23df7 100644 --- a/net/minecraft/server/EntityPotion.java +++ b/net/minecraft/server/EntityPotion.java @@ -5,7 +5,7 @@ public class EntityPotion extends EntityProjectile { - private ItemStack c; + private ItemStack item; public EntityPotion(World world) { super(world); @@ -17,12 +17,12 @@ public EntityPotion(World world, EntityLiving entityliving, int i) { public EntityPotion(World world, EntityLiving entityliving, ItemStack itemstack) { super(world, entityliving); - this.c = itemstack; + this.item = itemstack; } public EntityPotion(World world, double d0, double d1, double d2, ItemStack itemstack) { super(world, d0, d1, d2); - this.c = itemstack; + this.item = itemstack; } protected float e() { @@ -38,24 +38,24 @@ protected float d() { } public void setPotionValue(int i) { - if (this.c == null) { - this.c = new ItemStack(Item.POTION, 1, 0); + if (this.item == null) { + this.item = new ItemStack(Item.POTION, 1, 0); } - this.c.setData(i); + this.item.setData(i); } public int getPotionValue() { - if (this.c == null) { - this.c = new ItemStack(Item.POTION, 1, 0); + if (this.item == null) { + this.item = new ItemStack(Item.POTION, 1, 0); } - return this.c.getData(); + return this.item.getData(); } protected void a(MovingObjectPosition movingobjectposition) { if (!this.world.isStatic) { - List list = Item.POTION.g(this.c); + List list = Item.POTION.g(this.item); if (list != null && !list.isEmpty()) { AxisAlignedBB axisalignedbb = this.boundingBox.grow(4.0D, 2.0D, 4.0D); @@ -104,20 +104,20 @@ protected void a(MovingObjectPosition movingobjectposition) { public void a(NBTTagCompound nbttagcompound) { super.a(nbttagcompound); if (nbttagcompound.hasKey("Potion")) { - this.c = ItemStack.createStack(nbttagcompound.getCompound("Potion")); + this.item = ItemStack.createStack(nbttagcompound.getCompound("Potion")); } else { this.setPotionValue(nbttagcompound.getInt("potionValue")); } - if (this.c == null) { + if (this.item == null) { this.die(); } } public void b(NBTTagCompound nbttagcompound) { super.b(nbttagcompound); - if (this.c != null) { - nbttagcompound.setCompound("Potion", this.c.save(new NBTTagCompound())); + if (this.item != null) { + nbttagcompound.setCompound("Potion", this.item.save(new NBTTagCompound())); } } } diff --git a/net/minecraft/server/EntityProjectile.java b/net/minecraft/server/EntityProjectile.java index 13dacc363..ce2b3165b 100644 --- a/net/minecraft/server/EntityProjectile.java +++ b/net/minecraft/server/EntityProjectile.java @@ -128,7 +128,7 @@ public void l_() { for (int j = 0; j < list.size(); ++j) { Entity entity1 = (Entity) list.get(j); - if (entity1.K() && (entity1 != entityliving || this.j >= 5)) { + if (entity1.L() && (entity1 != entityliving || this.j >= 5)) { float f = 0.3F; AxisAlignedBB axisalignedbb = entity1.boundingBox.grow((double) f, (double) f, (double) f); MovingObjectPosition movingobjectposition1 = axisalignedbb.a(vec3d, vec3d1); @@ -151,7 +151,7 @@ public void l_() { if (movingobjectposition != null) { if (movingobjectposition.type == EnumMovingObjectType.TILE && this.world.getTypeId(movingobjectposition.b, movingobjectposition.c, movingobjectposition.d) == Block.PORTAL.id) { - this.aa(); + this.ab(); } else { this.a(movingobjectposition); } @@ -185,7 +185,7 @@ public void l_() { float f2 = 0.99F; float f3 = this.e(); - if (this.G()) { + if (this.H()) { for (int k = 0; k < 4; ++k) { float f4 = 0.25F; diff --git a/net/minecraft/server/EntitySheep.java b/net/minecraft/server/EntitySheep.java index 6717c8c90..e6f0abf89 100644 --- a/net/minecraft/server/EntitySheep.java +++ b/net/minecraft/server/EntitySheep.java @@ -26,13 +26,13 @@ public EntitySheep(World world) { this.bq.setItem(1, new ItemStack(Item.INK_SACK, 1, 0)); } - protected boolean be() { + protected boolean bf() { return true; } - protected void bh() { + protected void bi() { this.br = this.bs.f(); - super.bh(); + super.bi(); } public void c() { @@ -43,8 +43,8 @@ public void c() { super.c(); } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(8.0D); this.getAttributeInstance(GenericAttributes.d).setValue(0.23000000417232513D); } @@ -104,11 +104,11 @@ protected String r() { return "mob.sheep.say"; } - protected String aN() { + protected String aO() { return "mob.sheep.say"; } - protected String aO() { + protected String aP() { return "mob.sheep.say"; } diff --git a/net/minecraft/server/EntitySilverfish.java b/net/minecraft/server/EntitySilverfish.java index c440a9499..3a2ea018a 100644 --- a/net/minecraft/server/EntitySilverfish.java +++ b/net/minecraft/server/EntitySilverfish.java @@ -9,8 +9,8 @@ public EntitySilverfish(World world) { this.a(0.3F, 0.7F); } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(8.0D); this.getAttributeInstance(GenericAttributes.d).setValue(0.6000000238418579D); this.getAttributeInstance(GenericAttributes.e).setValue(1.0D); @@ -30,11 +30,11 @@ protected String r() { return "mob.silverfish.say"; } - protected String aN() { + protected String aO() { return "mob.silverfish.hit"; } - protected String aO() { + protected String aP() { return "mob.silverfish.kill"; } @@ -70,8 +70,8 @@ public void l_() { super.l_(); } - protected void bk() { - super.bk(); + protected void bl() { + super.bl(); if (!this.world.isStatic) { int i; int j; diff --git a/net/minecraft/server/EntitySkeleton.java b/net/minecraft/server/EntitySkeleton.java index 4afdda74c..295794f3a 100644 --- a/net/minecraft/server/EntitySkeleton.java +++ b/net/minecraft/server/EntitySkeleton.java @@ -22,8 +22,8 @@ public EntitySkeleton(World world) { } } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.d).setValue(0.25D); } @@ -32,7 +32,7 @@ protected void a() { this.datawatcher.a(13, new Byte((byte) 0)); } - public boolean be() { + public boolean bf() { return true; } @@ -40,11 +40,11 @@ protected String r() { return "mob.skeleton.say"; } - protected String aN() { + protected String aO() { return "mob.skeleton.hurt"; } - protected String aO() { + protected String aP() { return "mob.skeleton.death"; } @@ -101,8 +101,8 @@ public void c() { super.c(); } - public void U() { - super.U(); + public void V() { + super.V(); if (this.vehicle instanceof EntityCreature) { EntityCreature entitycreature = (EntityCreature) this.vehicle; @@ -165,7 +165,7 @@ protected void bw() { public GroupDataEntity a(GroupDataEntity groupdataentity) { groupdataentity = super.a(groupdataentity); - if (this.world.worldProvider instanceof WorldProviderHell && this.aC().nextInt(5) > 0) { + if (this.world.worldProvider instanceof WorldProviderHell && this.aD().nextInt(5) > 0) { this.goalSelector.a(4, this.bq); this.setSkeletonType(1); this.setEquipment(0, new ItemStack(Item.STONE_SWORD)); @@ -192,7 +192,7 @@ public GroupDataEntity a(GroupDataEntity groupdataentity) { public void bT() { this.goalSelector.a((PathfinderGoal) this.bq); this.goalSelector.a((PathfinderGoal) this.bp); - ItemStack itemstack = this.aY(); + ItemStack itemstack = this.aZ(); if (itemstack != null && itemstack.id == Item.BOW.id) { this.goalSelector.a(4, this.bp); @@ -203,8 +203,8 @@ public void bT() { public void a(EntityLiving entityliving, float f) { EntityArrow entityarrow = new EntityArrow(this.world, this, entityliving, 1.6F, (float) (14 - this.world.difficulty * 4)); - int i = EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_DAMAGE.id, this.aY()); - int j = EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_KNOCKBACK.id, this.aY()); + int i = EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_DAMAGE.id, this.aZ()); + int j = EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_KNOCKBACK.id, this.aZ()); entityarrow.b((double) (f * 2.0F) + this.random.nextGaussian() * 0.25D + (double) ((float) this.world.difficulty * 0.11F)); if (i > 0) { @@ -215,11 +215,11 @@ public void a(EntityLiving entityliving, float f) { entityarrow.a(j); } - if (EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_FIRE.id, this.aY()) > 0 || this.getSkeletonType() == 1) { + if (EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_FIRE.id, this.aZ()) > 0 || this.getSkeletonType() == 1) { entityarrow.setOnFire(100); } - this.makeSound("random.bow", 1.0F, 1.0F / (this.aC().nextFloat() * 0.4F + 0.8F)); + this.makeSound("random.bow", 1.0F, 1.0F / (this.aD().nextFloat() * 0.4F + 0.8F)); this.world.addEntity(entityarrow); } @@ -260,7 +260,7 @@ public void setEquipment(int i, ItemStack itemstack) { } } - public double W() { - return super.W() - 0.5D; + public double X() { + return super.X() - 0.5D; } } diff --git a/net/minecraft/server/EntitySlime.java b/net/minecraft/server/EntitySlime.java index 6556794fb..40685c2d6 100644 --- a/net/minecraft/server/EntitySlime.java +++ b/net/minecraft/server/EntitySlime.java @@ -77,7 +77,7 @@ public void l_() { } if (this.bQ()) { - this.makeSound(this.bP(), this.aZ(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) / 0.8F); + this.makeSound(this.bP(), this.ba(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) / 0.8F); } this.h = -0.5F; @@ -92,8 +92,8 @@ public void l_() { } } - protected void bk() { - this.bo(); + protected void bl() { + this.u(); EntityHuman entityhuman = this.world.findNearbyVulnerablePlayer(this, 16.0D); if (entityhuman != null) { @@ -108,7 +108,7 @@ protected void bk() { this.bd = true; if (this.bS()) { - this.makeSound(this.bP(), this.aZ(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) * 0.8F); + this.makeSound(this.bP(), this.ba(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) * 0.8F); } this.be = 1.0F - this.random.nextFloat() * 2.0F; @@ -171,11 +171,11 @@ protected int bO() { return this.getSize(); } - protected String aN() { + protected String aO() { return "mob.slime." + (this.getSize() > 1 ? "big" : "small"); } - protected String aO() { + protected String aP() { return "mob.slime." + (this.getSize() > 1 ? "big" : "small"); } @@ -205,7 +205,7 @@ public boolean canSpawn() { } } - protected float aZ() { + protected float ba() { return 0.4F * (float) this.getSize(); } diff --git a/net/minecraft/server/EntitySmallFireball.java b/net/minecraft/server/EntitySmallFireball.java index 2d1b6e4f5..47c7ebc1b 100644 --- a/net/minecraft/server/EntitySmallFireball.java +++ b/net/minecraft/server/EntitySmallFireball.java @@ -62,7 +62,7 @@ protected void a(MovingObjectPosition movingobjectposition) { } } - public boolean K() { + public boolean L() { return false; } diff --git a/net/minecraft/server/EntitySnowman.java b/net/minecraft/server/EntitySnowman.java index 68ef4d1a5..7209c2b14 100644 --- a/net/minecraft/server/EntitySnowman.java +++ b/net/minecraft/server/EntitySnowman.java @@ -13,19 +13,19 @@ public EntitySnowman(World world) { this.targetSelector.a(1, new PathfinderGoalNearestAttackableTarget(this, EntityInsentient.class, 0, true, false, IMonster.a)); } - public boolean be() { + public boolean bf() { return true; } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(4.0D); this.getAttributeInstance(GenericAttributes.d).setValue(0.20000000298023224D); } public void c() { super.c(); - if (this.F()) { + if (this.G()) { this.damageEntity(DamageSource.DROWN, 1.0F); } @@ -67,7 +67,7 @@ public void a(EntityLiving entityliving, float f) { float f1 = MathHelper.sqrt(d0 * d0 + d2 * d2) * 0.2F; entitysnowball.shoot(d0, d1 + (double) f1, d2, 1.6F, 12.0F); - this.makeSound("random.bow", 1.0F, 1.0F / (this.aC().nextFloat() * 0.4F + 0.8F)); + this.makeSound("random.bow", 1.0F, 1.0F / (this.aD().nextFloat() * 0.4F + 0.8F)); this.world.addEntity(entitysnowball); } } diff --git a/net/minecraft/server/EntitySpider.java b/net/minecraft/server/EntitySpider.java index b81144f97..8785cf5d5 100644 --- a/net/minecraft/server/EntitySpider.java +++ b/net/minecraft/server/EntitySpider.java @@ -19,8 +19,8 @@ public void l_() { } } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(16.0D); this.getAttributeInstance(GenericAttributes.d).setValue(0.800000011920929D); } @@ -41,11 +41,11 @@ protected String r() { return "mob.spider.say"; } - protected String aN() { + protected String aO() { return "mob.spider.say"; } - protected String aO() { + protected String aP() { return "mob.spider.death"; } @@ -90,7 +90,7 @@ public boolean e() { return this.bT(); } - public void al() {} + public void am() {} public EnumMonsterType getMonsterType() { return EnumMonsterType.ARTHROPOD; diff --git a/net/minecraft/server/EntitySquid.java b/net/minecraft/server/EntitySquid.java index a5d86d4d7..80c8af0fa 100644 --- a/net/minecraft/server/EntitySquid.java +++ b/net/minecraft/server/EntitySquid.java @@ -23,8 +23,8 @@ public EntitySquid(World world) { this.by = 1.0F / (this.random.nextFloat() + 1.0F) * 0.2F; } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(10.0D); } @@ -32,15 +32,15 @@ protected String r() { return null; } - protected String aN() { + protected String aO() { return null; } - protected String aO() { + protected String aP() { return null; } - protected float aZ() { + protected float ba() { return 0.4F; } @@ -60,7 +60,7 @@ protected void dropDeathLoot(boolean flag, int i) { } } - public boolean G() { + public boolean H() { return this.world.a(this.boundingBox.grow(0.0D, -0.6000000238418579D, 0.0D), Material.WATER, (Entity) this); } @@ -78,7 +78,7 @@ public void c() { } } - if (this.G()) { + if (this.H()) { float f; if (this.bt < 3.1415927F) { @@ -124,7 +124,7 @@ public void e(float f, float f1) { this.move(this.motX, this.motY, this.motZ); } - protected void bk() { + protected void bl() { ++this.aV; if (this.aV > 100) { this.bA = this.bB = this.bC = 0.0F; @@ -136,7 +136,7 @@ protected void bk() { this.bC = MathHelper.sin(f) * 0.2F; } - this.bo(); + this.u(); } public boolean canSpawn() { diff --git a/net/minecraft/server/EntityTNTPrimed.java b/net/minecraft/server/EntityTNTPrimed.java index bf07bd6ff..6b828d6f8 100644 --- a/net/minecraft/server/EntityTNTPrimed.java +++ b/net/minecraft/server/EntityTNTPrimed.java @@ -33,7 +33,7 @@ protected boolean e_() { return false; } - public boolean K() { + public boolean L() { return !this.dead; } diff --git a/net/minecraft/server/EntityTrackerEntry.java b/net/minecraft/server/EntityTrackerEntry.java index 9477914d0..49ee83979 100644 --- a/net/minecraft/server/EntityTrackerEntry.java +++ b/net/minecraft/server/EntityTrackerEntry.java @@ -71,7 +71,7 @@ public void track(List list) { if (this.tracker instanceof EntityItemFrame && this.m % 10 == 0) { EntityItemFrame i3 = (EntityItemFrame) this.tracker; - ItemStack i4 = i3.h(); + ItemStack i4 = i3.getItem(); if (i4 != null && i4.getItem() instanceof ItemWorldMap) { WorldMap i6 = Item.MAP.getSavedMap(i4, this.tracker.world); @@ -200,7 +200,7 @@ private void b() { } if (this.tracker instanceof EntityLiving) { - AttributeMapServer attributemapserver = (AttributeMapServer) ((EntityLiving) this.tracker).aW(); + AttributeMapServer attributemapserver = (AttributeMapServer) ((EntityLiving) this.tracker).aX(); Set set = attributemapserver.b(); if (!set.isEmpty()) { @@ -261,7 +261,7 @@ public void updatePlayer(EntityPlayer entityplayer) { } if (this.tracker instanceof EntityLiving) { - AttributeMapServer attributemapserver = (AttributeMapServer) ((EntityLiving) this.tracker).aW(); + AttributeMapServer attributemapserver = (AttributeMapServer) ((EntityLiving) this.tracker).aX(); Collection collection = attributemapserver.c(); if (!collection.isEmpty()) { @@ -280,8 +280,8 @@ public void updatePlayer(EntityPlayer entityplayer) { entityplayer.playerConnection.sendPacket(new Packet39AttachEntity(0, this.tracker, this.tracker.vehicle)); } - if (this.tracker instanceof EntityInsentient && ((EntityInsentient) this.tracker).bI() != null) { - entityplayer.playerConnection.sendPacket(new Packet39AttachEntity(1, this.tracker, ((EntityInsentient) this.tracker).bI())); + if (this.tracker instanceof EntityInsentient && ((EntityInsentient) this.tracker).getLeashHolder() != null) { + entityplayer.playerConnection.sendPacket(new Packet39AttachEntity(1, this.tracker, ((EntityInsentient) this.tracker).getLeashHolder())); } if (this.tracker instanceof EntityLiving) { diff --git a/net/minecraft/server/EntityVillager.java b/net/minecraft/server/EntityVillager.java index 48bfff410..d51284cba 100644 --- a/net/minecraft/server/EntityVillager.java +++ b/net/minecraft/server/EntityVillager.java @@ -50,16 +50,16 @@ public EntityVillager(World world, int i) { this.goalSelector.a(10, new PathfinderGoalLookAtPlayer(this, EntityInsentient.class, 8.0F)); } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.d).setValue(0.5D); } - public boolean be() { + public boolean bf() { return true; } - protected void bj() { + protected void bk() { if (--this.profession <= 0) { this.world.villages.a(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ)); this.profession = 70 + this.random.nextInt(50); @@ -105,7 +105,7 @@ protected void bj() { } } - super.bj(); + super.bk(); } public boolean a(EntityHuman entityhuman) { @@ -157,11 +157,11 @@ protected String r() { return this.bW() ? "mob.villager.haggle" : "mob.villager.idle"; } - protected String aN() { + protected String aO() { return "mob.villager.hit"; } - protected String aO() { + protected String aP() { return "mob.villager.death"; } @@ -245,7 +245,7 @@ public boolean bW() { public void a(MerchantRecipe merchantrecipe) { merchantrecipe.f(); this.a_ = -this.o(); - this.makeSound("mob.villager.yes", this.aZ(), this.ba()); + this.makeSound("mob.villager.yes", this.ba(), this.bb()); if (merchantrecipe.a((MerchantRecipe) this.bu.get(this.bu.size() - 1))) { this.bv = 40; this.bw = true; @@ -265,9 +265,9 @@ public void a_(ItemStack itemstack) { if (!this.world.isStatic && this.a_ > -this.o() + 20) { this.a_ = -this.o(); if (itemstack != null) { - this.makeSound("mob.villager.yes", this.aZ(), this.ba()); + this.makeSound("mob.villager.yes", this.ba(), this.bb()); } else { - this.makeSound("mob.villager.no", this.aZ(), this.ba()); + this.makeSound("mob.villager.no", this.ba(), this.bb()); } } } diff --git a/net/minecraft/server/EntityWaterAnimal.java b/net/minecraft/server/EntityWaterAnimal.java index 061be9d39..b42bee412 100644 --- a/net/minecraft/server/EntityWaterAnimal.java +++ b/net/minecraft/server/EntityWaterAnimal.java @@ -6,7 +6,7 @@ public EntityWaterAnimal(World world) { super(world); } - public boolean az() { + public boolean aA() { return true; } @@ -26,11 +26,11 @@ protected int getExpValue(EntityHuman entityhuman) { return 1 + this.world.random.nextInt(3); } - public void x() { + public void y() { int i = this.getAirTicks(); - super.x(); - if (this.isAlive() && !this.G()) { + super.y(); + if (this.isAlive() && !this.H()) { --i; this.setAirTicks(i); if (this.getAirTicks() == -20) { diff --git a/net/minecraft/server/EntityWitch.java b/net/minecraft/server/EntityWitch.java index c9df74e30..96af9ccca 100644 --- a/net/minecraft/server/EntityWitch.java +++ b/net/minecraft/server/EntityWitch.java @@ -31,11 +31,11 @@ protected String r() { return "mob.witch.idle"; } - protected String aN() { + protected String aO() { return "mob.witch.hurt"; } - protected String aO() { + protected String aP() { return "mob.witch.death"; } @@ -47,13 +47,13 @@ public boolean bT() { return this.getDataWatcher().getByte(21) == 1; } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(26.0D); this.getAttributeInstance(GenericAttributes.d).setValue(0.25D); } - public boolean be() { + public boolean bf() { return true; } @@ -62,7 +62,7 @@ public void c() { if (this.bT()) { if (this.bs-- <= 0) { this.a(false); - ItemStack itemstack = this.aY(); + ItemStack itemstack = this.aZ(); this.setEquipment(0, (ItemStack) null); if (itemstack != null && itemstack.id == Item.POTION.id) { @@ -96,7 +96,7 @@ public void c() { if (short1 > -1) { this.setEquipment(0, new ItemStack(Item.POTION, 1, short1)); - this.bs = this.aY().n(); + this.bs = this.aZ().n(); this.a(true); AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.d); diff --git a/net/minecraft/server/EntityWither.java b/net/minecraft/server/EntityWither.java index affc2c6f6..3b87c353f 100644 --- a/net/minecraft/server/EntityWither.java +++ b/net/minecraft/server/EntityWither.java @@ -51,11 +51,11 @@ protected String r() { return "mob.wither.idle"; } - protected String aN() { + protected String aO() { return "mob.wither.hurt"; } - protected String aO() { + protected String aP() { return "mob.wither.death"; } @@ -150,7 +150,7 @@ public void c() { } } - protected void bh() { + protected void bi() { int i; if (this.bU() > 0) { @@ -165,7 +165,7 @@ protected void bh() { this.heal(10.0F); } } else { - super.bh(); + super.bi(); int j; @@ -269,9 +269,9 @@ public void bT() { this.setHealth(this.getMaxHealth() / 3.0F); } - public void al() {} + public void am() {} - public int aP() { + public int aQ() { return 4; } @@ -381,11 +381,11 @@ protected void dropDeathLoot(boolean flag, int i) { this.b(Item.NETHER_STAR.id, 1); } - protected void bo() { + protected void u() { this.aV = 0; } - public boolean K() { + public boolean L() { return !this.dead; } @@ -393,12 +393,12 @@ protected void b(float f) {} public void addEffect(MobEffect mobeffect) {} - protected boolean be() { + protected boolean bf() { return true; } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(300.0D); this.getAttributeInstance(GenericAttributes.d).setValue(0.6000000238418579D); this.getAttributeInstance(GenericAttributes.b).setValue(40.0D); diff --git a/net/minecraft/server/EntityWitherSkull.java b/net/minecraft/server/EntityWitherSkull.java index 253fd4062..4c98c8b94 100644 --- a/net/minecraft/server/EntityWitherSkull.java +++ b/net/minecraft/server/EntityWitherSkull.java @@ -63,7 +63,7 @@ protected void a(MovingObjectPosition movingobjectposition) { } } - public boolean K() { + public boolean L() { return false; } diff --git a/net/minecraft/server/EntityWolf.java b/net/minecraft/server/EntityWolf.java index 250efbf82..5d38d3333 100644 --- a/net/minecraft/server/EntityWolf.java +++ b/net/minecraft/server/EntityWolf.java @@ -30,8 +30,8 @@ public EntityWolf(World world) { this.setTamed(false); } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.d).setValue(0.30000001192092896D); if (this.isTamed()) { this.getAttributeInstance(GenericAttributes.a).setValue(20.0D); @@ -40,7 +40,7 @@ protected void ay() { } } - public boolean be() { + public boolean bf() { return true; } @@ -53,7 +53,7 @@ public void setGoalTarget(EntityLiving entityliving) { } } - protected void bj() { + protected void bk() { this.datawatcher.watch(18, Float.valueOf(this.getHealth())); } @@ -86,15 +86,15 @@ protected String r() { return this.isAngry() ? "mob.wolf.growl" : (this.random.nextInt(3) == 0 ? (this.isTamed() && this.datawatcher.getFloat(18) < 10.0F ? "mob.wolf.whine" : "mob.wolf.panting") : "mob.wolf.bark"); } - protected String aN() { + protected String aO() { return "mob.wolf.hurt"; } - protected String aO() { + protected String aP() { return "mob.wolf.death"; } - protected float aZ() { + protected float ba() { return 0.4F; } @@ -125,14 +125,14 @@ public void l_() { this.g = 10; } - if (this.F()) { + if (this.G()) { this.bs = true; this.bt = false; this.bu = 0.0F; this.bv = 0.0F; } else if ((this.bs || this.bt) && this.bt) { if (this.bu == 0.0F) { - this.makeSound("mob.wolf.shake", this.aZ(), (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F); + this.makeSound("mob.wolf.shake", this.ba(), (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F); } this.bv = this.bu; diff --git a/net/minecraft/server/EntityZombie.java b/net/minecraft/server/EntityZombie.java index 395937ef2..228dd3aad 100644 --- a/net/minecraft/server/EntityZombie.java +++ b/net/minecraft/server/EntityZombie.java @@ -27,12 +27,12 @@ public EntityZombie(World world) { this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget(this, EntityVillager.class, 0, false)); } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.b).setValue(40.0D); this.getAttributeInstance(GenericAttributes.d).setValue(0.23000000417232513D); this.getAttributeInstance(GenericAttributes.e).setValue(3.0D); - this.aW().b(bp).setValue(this.random.nextDouble() * 0.10000000149011612D); + this.aX().b(bp).setValue(this.random.nextDouble() * 0.10000000149011612D); } protected void a() { @@ -42,8 +42,8 @@ protected void a() { this.getDataWatcher().a(14, Byte.valueOf((byte) 0)); } - public int aP() { - int i = super.aP() + 2; + public int aQ() { + int i = super.aQ() + 2; if (i > 20) { i = 20; @@ -52,7 +52,7 @@ public int aP() { return i; } - protected boolean be() { + protected boolean bf() { return true; } @@ -168,7 +168,7 @@ public void l_() { public boolean m(Entity entity) { boolean flag = super.m(entity); - if (flag && this.aY() == null && this.isBurning() && this.random.nextFloat() < (float) this.world.difficulty * 0.3F) { + if (flag && this.aZ() == null && this.isBurning() && this.random.nextFloat() < (float) this.world.difficulty * 0.3F) { entity.setOnFire(2 * this.world.difficulty); } @@ -179,11 +179,11 @@ protected String r() { return "mob.zombie.say"; } - protected String aN() { + protected String aO() { return "mob.zombie.hurt"; } - protected String aO() { + protected String aP() { return "mob.zombie.death"; } @@ -320,7 +320,7 @@ public GroupDataEntity a(GroupDataEntity groupdataentity) { } public boolean a(EntityHuman entityhuman) { - ItemStack itemstack = entityhuman.bx(); + ItemStack itemstack = entityhuman.by(); if (itemstack != null && itemstack.getItem() == Item.GOLDEN_APPLE && itemstack.getData() == 0 && this.isVillager() && this.hasEffect(MobEffectList.WEAKNESS)) { if (!entityhuman.abilities.canInstantlyBuild) { diff --git a/net/minecraft/server/FoodMetaData.java b/net/minecraft/server/FoodMetaData.java index f1371832a..ee7f81bfb 100644 --- a/net/minecraft/server/FoodMetaData.java +++ b/net/minecraft/server/FoodMetaData.java @@ -32,7 +32,7 @@ public void a(EntityHuman entityhuman) { } } - if (entityhuman.world.getGameRules().getBoolean("naturalRegeneration") && this.foodLevel >= 18 && entityhuman.bI()) { + if (entityhuman.world.getGameRules().getBoolean("naturalRegeneration") && this.foodLevel >= 18 && entityhuman.bJ()) { ++this.foodTickTimer; if (this.foodTickTimer >= 80) { entityhuman.heal(1.0F); diff --git a/net/minecraft/server/ItemBoat.java b/net/minecraft/server/ItemBoat.java index 76dee4a80..bc5a276a5 100644 --- a/net/minecraft/server/ItemBoat.java +++ b/net/minecraft/server/ItemBoat.java @@ -41,8 +41,8 @@ public ItemStack a(ItemStack itemstack, World world, EntityHuman entityhuman) { for (i = 0; i < list.size(); ++i) { Entity entity = (Entity) list.get(i); - if (entity.K()) { - float f10 = entity.Y(); + if (entity.L()) { + float f10 = entity.Z(); AxisAlignedBB axisalignedbb = entity.boundingBox.grow((double) f10, (double) f10, (double) f10); if (axisalignedbb.a(vec3d)) { diff --git a/net/minecraft/server/ItemCarrotStick.java b/net/minecraft/server/ItemCarrotStick.java index 820ee0c36..6885acb4b 100644 --- a/net/minecraft/server/ItemCarrotStick.java +++ b/net/minecraft/server/ItemCarrotStick.java @@ -10,7 +10,7 @@ public ItemCarrotStick(int i) { } public ItemStack a(ItemStack itemstack, World world, EntityHuman entityhuman) { - if (entityhuman.af() && entityhuman.vehicle instanceof EntityPig) { + if (entityhuman.ag() && entityhuman.vehicle instanceof EntityPig) { EntityPig entitypig = (EntityPig) entityhuman.vehicle; if (entitypig.bU().h() && itemstack.l() - itemstack.getData() >= 7) { diff --git a/net/minecraft/server/ItemFishingRod.java b/net/minecraft/server/ItemFishingRod.java index bd61c59b2..1c220ee40 100644 --- a/net/minecraft/server/ItemFishingRod.java +++ b/net/minecraft/server/ItemFishingRod.java @@ -14,14 +14,14 @@ public ItemStack a(ItemStack itemstack, World world, EntityHuman entityhuman) { int i = entityhuman.hookedFish.c(); itemstack.damage(i, entityhuman); - entityhuman.aU(); + entityhuman.aV(); } else { world.makeSound(entityhuman, "random.bow", 0.5F, 0.4F / (f.nextFloat() * 0.4F + 0.8F)); if (!world.isStatic) { world.addEntity(new EntityFishingHook(world, entityhuman)); } - entityhuman.aU(); + entityhuman.aV(); } return itemstack; diff --git a/net/minecraft/server/ItemLeash.java b/net/minecraft/server/ItemLeash.java index 7be274318..92389ff61 100644 --- a/net/minecraft/server/ItemLeash.java +++ b/net/minecraft/server/ItemLeash.java @@ -37,12 +37,12 @@ public static boolean a(EntityHuman entityhuman, World world, int i, int j, int while (iterator.hasNext()) { EntityInsentient entityinsentient = (EntityInsentient) iterator.next(); - if (entityinsentient.bH() && entityinsentient.bI() == entityhuman) { + if (entityinsentient.bH() && entityinsentient.getLeashHolder() == entityhuman) { if (entityleash == null) { entityleash = EntityLeash.a(world, i, j, k); } - entityinsentient.b(entityleash, true); + entityinsentient.setLeashHolder(entityleash, true); flag = true; } } diff --git a/net/minecraft/server/ItemMilkBucket.java b/net/minecraft/server/ItemMilkBucket.java index 9b8ff5bd6..a497d6df0 100644 --- a/net/minecraft/server/ItemMilkBucket.java +++ b/net/minecraft/server/ItemMilkBucket.java @@ -14,7 +14,7 @@ public ItemStack b(ItemStack itemstack, World world, EntityHuman entityhuman) { } if (!world.isStatic) { - entityhuman.aJ(); + entityhuman.aK(); } return itemstack.count <= 0 ? new ItemStack(Item.BUCKET) : itemstack; diff --git a/net/minecraft/server/ItemStack.java b/net/minecraft/server/ItemStack.java index b2ed81209..a46ea09e8 100644 --- a/net/minecraft/server/ItemStack.java +++ b/net/minecraft/server/ItemStack.java @@ -185,7 +185,7 @@ public boolean isDamaged(int i, Random random) { public void damage(int i, EntityLiving entityliving) { if (!(entityliving instanceof EntityHuman) || !((EntityHuman) entityliving).abilities.canInstantlyBuild) { if (this.g()) { - if (this.isDamaged(i, entityliving.aC())) { + if (this.isDamaged(i, entityliving.aD())) { entityliving.a(this); --this.count; if (entityliving instanceof EntityHuman) { @@ -193,7 +193,7 @@ public void damage(int i, EntityLiving entityliving) { entityhuman.a(StatisticList.F[this.id], 1); if (this.count == 0 && this.getItem() instanceof ItemBow) { - entityhuman.by(); + entityhuman.bz(); } } diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java index 2cf1904cf..85a04fb08 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java @@ -39,45 +39,47 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo private boolean allowFlight; private String motd; private int D; - private long E; + private int E; private long F; private long G; private long H; + private long I; public final long[] f; public final long[] g; public final long[] h; public final long[] i; public final long[] j; public long[][] k; - private KeyPair I; - private String J; + private KeyPair J; private String K; + private String L; private boolean demoMode; - private boolean N; private boolean O; - private String P; - private boolean Q; - private long R; - private String S; - private boolean T; + private boolean P; + private String Q; + private boolean R; + private long S; + private String T; private boolean U; + private boolean V; public MinecraftServer(File file1) { this.c = Proxy.NO_PROXY; + this.E = 0; this.f = new long[100]; this.g = new long[100]; this.h = new long[100]; this.i = new long[100]; this.j = new long[100]; - this.P = ""; + this.Q = ""; l = this; this.universe = file1; this.q = new CommandDispatcher(); this.convertable = new WorldLoaderServer(file1); - this.ar(); + this.as(); } - private void ar() { + private void as() { DispenserRegistry.a(); } @@ -92,7 +94,7 @@ protected void a(String s) { } protected synchronized void b(String s) { - this.S = s; + this.T = s; } protected void a(String s, String s1, long i, WorldType worldtype, String s2) { @@ -111,7 +113,7 @@ protected void a(String s, String s1, long i, WorldType worldtype, String s2) { worldsettings = new WorldSettings(worlddata); } - if (this.N) { + if (this.O) { worldsettings.a(); } @@ -202,7 +204,7 @@ protected void l() { } protected void saveChunks(boolean flag) { - if (!this.O) { + if (!this.P) { WorldServer[] aworldserver = this.worldServer; int i = aworldserver.length; @@ -225,7 +227,7 @@ protected void saveChunks(boolean flag) { } public void stop() { - if (!this.O) { + if (!this.P) { this.getLogger().info("Stopping server"); if (this.ag() != null) { this.ag().a(); @@ -273,14 +275,14 @@ public void run() { if (this.init()) { long i = aq(); - for (long j = 0L; this.isRunning; this.Q = true) { + for (long j = 0L; this.isRunning; this.R = true) { long k = aq(); long l = k - i; - if (l > 2000L && i - this.R >= 15000L) { + if (l > 2000L && i - this.S >= 15000L) { this.getLogger().warning("Can\'t keep up! Did the system time change, or is the server overloaded?"); l = 2000L; - this.R = i; + this.S = i; } if (l < 0L) { @@ -350,8 +352,8 @@ protected void s() { AxisAlignedBB.a().a(); ++this.ticks; - if (this.T) { - this.T = false; + if (this.U) { + this.U = false; this.methodProfiler.a = true; this.methodProfiler.a(); } @@ -367,14 +369,14 @@ protected void s() { this.methodProfiler.a("tallying"); this.j[this.ticks % 100] = System.nanoTime() - i; - this.f[this.ticks % 100] = Packet.q - this.E; - this.E = Packet.q; - this.g[this.ticks % 100] = Packet.r - this.F; - this.F = Packet.r; - this.h[this.ticks % 100] = Packet.o - this.G; - this.G = Packet.o; - this.i[this.ticks % 100] = Packet.p - this.H; - this.H = Packet.p; + this.f[this.ticks % 100] = Packet.q - this.F; + this.F = Packet.q; + this.g[this.ticks % 100] = Packet.r - this.G; + this.G = Packet.r; + this.h[this.ticks % 100] = Packet.o - this.H; + this.H = Packet.o; + this.i[this.ticks % 100] = Packet.p - this.I; + this.I = Packet.p; this.methodProfiler.b(); this.methodProfiler.a("snooper"); if (!this.n.d() && this.ticks > 100) { @@ -535,7 +537,7 @@ public static void main(String[] astring) { } if (flag) { - dedicatedserver.at(); + dedicatedserver.au(); } dedicatedserver.v(); @@ -582,7 +584,7 @@ public String y() { } public String getVersion() { - return "1.6.2"; + return "1.6.4"; } public int A() { @@ -700,7 +702,7 @@ public ICommandHandler getCommandHandler() { } public KeyPair H() { - return this.I; + return this.J; } public int I() { @@ -712,27 +714,27 @@ public void setPort(int i) { } public String J() { - return this.J; + return this.K; } public void j(String s) { - this.J = s; + this.K = s; } public boolean K() { - return this.J != null; + return this.K != null; } public String L() { - return this.K; + return this.L; } public void k(String s) { - this.K = s; + this.L = s; } public void a(KeyPair keypair) { - this.I = keypair; + this.J = keypair; } public void c(int i) { @@ -767,7 +769,7 @@ public void b(boolean flag) { } public void c(boolean flag) { - this.N = flag; + this.O = flag; } public Convertable getConvertable() { @@ -775,7 +777,7 @@ public Convertable getConvertable() { } public void R() { - this.O = true; + this.P = true; this.getConvertable().d(); for (int i = 0; i < this.worldServer.length; ++i) { @@ -791,11 +793,11 @@ public void R() { } public String getTexturePack() { - return this.P; + return this.Q; } public void setTexturePack(String s) { - this.P = s; + this.Q = s; } public void a(MojangStatisticsGenerator mojangstatisticsgenerator) { @@ -940,7 +942,7 @@ public int aj() { } public void ak() { - this.T = true; + this.U = true; } public ChunkCoordinates b() { @@ -962,11 +964,11 @@ public boolean a(World world, int i, int j, int k, EntityHuman entityhuman) { public abstract IConsoleLogManager getLogger(); public void setForceGamemode(boolean flag) { - this.U = flag; + this.V = flag; } public boolean getForceGamemode() { - return this.U; + return this.V; } public Proxy ap() { @@ -977,6 +979,14 @@ public static long aq() { return System.currentTimeMillis(); } + public int ar() { + return this.E; + } + + public void e(int i) { + this.E = i; + } + public static PlayerList a(MinecraftServer minecraftserver) { return minecraftserver.t; } diff --git a/net/minecraft/server/MobEffectAbsorption.java b/net/minecraft/server/MobEffectAbsorption.java index 35323634f..09b69a333 100644 --- a/net/minecraft/server/MobEffectAbsorption.java +++ b/net/minecraft/server/MobEffectAbsorption.java @@ -7,12 +7,12 @@ protected MobEffectAbsorption(int i, boolean flag, int j) { } public void a(EntityLiving entityliving, AttributeMapBase attributemapbase, int i) { - entityliving.m(entityliving.bm() - (float) (4 * (i + 1))); + entityliving.m(entityliving.bn() - (float) (4 * (i + 1))); super.a(entityliving, attributemapbase, i); } public void b(EntityLiving entityliving, AttributeMapBase attributemapbase, int i) { - entityliving.m(entityliving.bm() + (float) (4 * (i + 1))); + entityliving.m(entityliving.bn() + (float) (4 * (i + 1))); super.b(entityliving, attributemapbase, i); } } diff --git a/net/minecraft/server/MobEffectList.java b/net/minecraft/server/MobEffectList.java index 40fbb35b8..5d63cd510 100644 --- a/net/minecraft/server/MobEffectList.java +++ b/net/minecraft/server/MobEffectList.java @@ -89,8 +89,8 @@ public void tick(EntityLiving entityliving, int i) { if (!entityliving.world.isStatic) { ((EntityHuman) entityliving).getFoodData().eat(i + 1, 1.0F); } - } else if ((this.id != HEAL.id || entityliving.aL()) && (this.id != HARM.id || !entityliving.aL())) { - if (this.id == HARM.id && !entityliving.aL() || this.id == HEAL.id && entityliving.aL()) { + } else if ((this.id != HEAL.id || entityliving.aM()) && (this.id != HARM.id || !entityliving.aM())) { + if (this.id == HARM.id && !entityliving.aM() || this.id == HEAL.id && entityliving.aM()) { entityliving.damageEntity(DamageSource.MAGIC, (float) (6 << i)); } } else { @@ -101,8 +101,8 @@ public void tick(EntityLiving entityliving, int i) { public void applyInstantEffect(EntityLiving entityliving, EntityLiving entityliving1, int i, double d0) { int j; - if ((this.id != HEAL.id || entityliving1.aL()) && (this.id != HARM.id || !entityliving1.aL())) { - if (this.id == HARM.id && !entityliving1.aL() || this.id == HEAL.id && entityliving1.aL()) { + if ((this.id != HEAL.id || entityliving1.aM()) && (this.id != HARM.id || !entityliving1.aM())) { + if (this.id == HARM.id && !entityliving1.aM() || this.id == HEAL.id && entityliving1.aM()) { j = (int) (d0 * (double) (6 << i) + 0.5D); if (entityliving == null) { entityliving1.damageEntity(DamageSource.MAGIC, (float) j); diff --git a/net/minecraft/server/MojangStatisticsGenerator.java b/net/minecraft/server/MojangStatisticsGenerator.java index d5bf32820..9ff7e0faf 100644 --- a/net/minecraft/server/MojangStatisticsGenerator.java +++ b/net/minecraft/server/MojangStatisticsGenerator.java @@ -49,7 +49,7 @@ private void h() { this.a("os_version", System.getProperty("os.version")); this.a("os_architecture", System.getProperty("os.arch")); this.a("java_version", System.getProperty("java.version")); - this.a("version", "1.6.2"); + this.a("version", "1.6.4"); this.d.b(this); } diff --git a/net/minecraft/server/Navigation.java b/net/minecraft/server/Navigation.java index 9ab17bc39..2c0dc4de1 100644 --- a/net/minecraft/server/Navigation.java +++ b/net/minecraft/server/Navigation.java @@ -184,7 +184,7 @@ private Vec3D j() { } private int k() { - if (this.a.G() && this.m) { + if (this.a.H() && this.m) { int i = (int) this.a.boundingBox.b; int j = this.b.getTypeId(MathHelper.floor(this.a.locX), i, MathHelper.floor(this.a.locZ)); int k = 0; @@ -210,7 +210,7 @@ private boolean l() { } private boolean m() { - return this.a.G() || this.a.I(); + return this.a.H() || this.a.J(); } private void n() { @@ -311,7 +311,7 @@ private boolean a(int i, int j, int k, int l, int i1, int j1, Vec3D vec3d, doubl Material material = Block.byId[k2].material; - if (material == Material.WATER && !this.a.G()) { + if (material == Material.WATER && !this.a.H()) { return false; } diff --git a/net/minecraft/server/Pathfinder.java b/net/minecraft/server/Pathfinder.java index 79b684663..ca16bb1f7 100644 --- a/net/minecraft/server/Pathfinder.java +++ b/net/minecraft/server/Pathfinder.java @@ -33,7 +33,7 @@ private PathEntity a(Entity entity, double d0, double d1, double d2, float f) { boolean flag = this.g; int i = MathHelper.floor(entity.boundingBox.b + 0.5D); - if (this.h && entity.G()) { + if (this.h && entity.H()) { i = (int) entity.boundingBox.b; for (int j = this.a.getTypeId(MathHelper.floor(entity.locX), i, MathHelper.floor(entity.locZ)); j == Block.WATER.id || j == Block.STATIONARY_WATER.id; j = this.a.getTypeId(MathHelper.floor(entity.locX), i, MathHelper.floor(entity.locZ))) { @@ -164,7 +164,7 @@ private PathPoint a(Entity entity, int i, int j, int k, PathPoint pathpoint, int break; } - if (j1++ >= entity.ar()) { + if (j1++ >= entity.as()) { return null; } @@ -248,7 +248,7 @@ public static int a(Entity entity, int i, int j, int k, PathPoint pathpoint, boo return 0; } - if (!entity.I()) { + if (!entity.J()) { return -2; } } diff --git a/net/minecraft/server/PathfinderGoalBeg.java b/net/minecraft/server/PathfinderGoalBeg.java index 6a0efb453..b7fb6eabe 100644 --- a/net/minecraft/server/PathfinderGoalBeg.java +++ b/net/minecraft/server/PathfinderGoalBeg.java @@ -26,7 +26,7 @@ public boolean b() { public void c() { this.a.m(true); - this.e = 40 + this.a.aC().nextInt(40); + this.e = 40 + this.a.aD().nextInt(40); } public void d() { diff --git a/net/minecraft/server/PathfinderGoalBreakDoor.java b/net/minecraft/server/PathfinderGoalBreakDoor.java index c65d048a2..ad78f5936 100644 --- a/net/minecraft/server/PathfinderGoalBreakDoor.java +++ b/net/minecraft/server/PathfinderGoalBreakDoor.java @@ -31,7 +31,7 @@ public void d() { public void e() { super.e(); - if (this.a.aC().nextInt(20) == 0) { + if (this.a.aD().nextInt(20) == 0) { this.a.world.triggerEffect(1010, this.b, this.c, this.d, 0); } diff --git a/net/minecraft/server/PathfinderGoalBreed.java b/net/minecraft/server/PathfinderGoalBreed.java index e084c6b34..2f1d487da 100644 --- a/net/minecraft/server/PathfinderGoalBreed.java +++ b/net/minecraft/server/PathfinderGoalBreed.java @@ -76,7 +76,7 @@ private void g() { entityageable.setAge(-24000); entityageable.setPositionRotation(this.d.locX, this.d.locY, this.d.locZ, 0.0F, 0.0F); this.a.addEntity(entityageable); - Random random = this.d.aC(); + Random random = this.d.aD(); for (int i = 0; i < 7; ++i) { double d0 = random.nextGaussian() * 0.02D; diff --git a/net/minecraft/server/PathfinderGoalDefendVillage.java b/net/minecraft/server/PathfinderGoalDefendVillage.java index c17cf1648..39ad00843 100644 --- a/net/minecraft/server/PathfinderGoalDefendVillage.java +++ b/net/minecraft/server/PathfinderGoalDefendVillage.java @@ -19,7 +19,7 @@ public boolean a() { } else { this.b = village.b((EntityLiving) this.a); if (!this.a(this.b, false)) { - if (this.c.aC().nextInt(20) == 0) { + if (this.c.aD().nextInt(20) == 0) { this.b = village.c(this.a); return this.a(this.b, false); } else { diff --git a/net/minecraft/server/PathfinderGoalEatTile.java b/net/minecraft/server/PathfinderGoalEatTile.java index 8224abf63..3961be3fb 100644 --- a/net/minecraft/server/PathfinderGoalEatTile.java +++ b/net/minecraft/server/PathfinderGoalEatTile.java @@ -13,7 +13,7 @@ public PathfinderGoalEatTile(EntityInsentient entityinsentient) { } public boolean a() { - if (this.b.aC().nextInt(this.b.isBaby() ? 50 : 1000) != 0) { + if (this.b.aD().nextInt(this.b.isBaby() ? 50 : 1000) != 0) { return false; } else { int i = MathHelper.floor(this.b.locX); diff --git a/net/minecraft/server/PathfinderGoalFleeSun.java b/net/minecraft/server/PathfinderGoalFleeSun.java index 5d0111e25..cd4366c0d 100644 --- a/net/minecraft/server/PathfinderGoalFleeSun.java +++ b/net/minecraft/server/PathfinderGoalFleeSun.java @@ -48,7 +48,7 @@ public void c() { } private Vec3D f() { - Random random = this.a.aC(); + Random random = this.a.aD(); for (int i = 0; i < 10; ++i) { int j = MathHelper.floor(this.a.locX + (double) random.nextInt(20) - 10.0D); diff --git a/net/minecraft/server/PathfinderGoalFloat.java b/net/minecraft/server/PathfinderGoalFloat.java index db02c4c49..95cbc6f8a 100644 --- a/net/minecraft/server/PathfinderGoalFloat.java +++ b/net/minecraft/server/PathfinderGoalFloat.java @@ -11,11 +11,11 @@ public PathfinderGoalFloat(EntityInsentient entityinsentient) { } public boolean a() { - return this.a.G() || this.a.I(); + return this.a.H() || this.a.J(); } public void e() { - if (this.a.aC().nextFloat() < 0.8F) { + if (this.a.aD().nextFloat() < 0.8F) { this.a.getControllerJump().a(); } } diff --git a/net/minecraft/server/PathfinderGoalHurtByTarget.java b/net/minecraft/server/PathfinderGoalHurtByTarget.java index 692b882c1..679c96192 100644 --- a/net/minecraft/server/PathfinderGoalHurtByTarget.java +++ b/net/minecraft/server/PathfinderGoalHurtByTarget.java @@ -15,14 +15,14 @@ public PathfinderGoalHurtByTarget(EntityCreature entitycreature, boolean flag) { } public boolean a() { - int i = this.c.aE(); + int i = this.c.aF(); return i != this.b && this.a(this.c.getLastDamager(), false); } public void c() { this.c.setGoalTarget(this.c.getLastDamager()); - this.b = this.c.aE(); + this.b = this.c.aF(); if (this.a) { double d0 = this.f(); List list = this.c.world.a(this.c.getClass(), AxisAlignedBB.a().a(this.c.locX, this.c.locY, this.c.locZ, this.c.locX + 1.0D, this.c.locY + 1.0D, this.c.locZ + 1.0D).grow(d0, 10.0D, d0)); diff --git a/net/minecraft/server/PathfinderGoalJumpOnBlock.java b/net/minecraft/server/PathfinderGoalJumpOnBlock.java index 2e76d6859..916076563 100644 --- a/net/minecraft/server/PathfinderGoalJumpOnBlock.java +++ b/net/minecraft/server/PathfinderGoalJumpOnBlock.java @@ -18,7 +18,7 @@ public PathfinderGoalJumpOnBlock(EntityOcelot entityocelot, double d0) { } public boolean a() { - return this.a.isTamed() && !this.a.isSitting() && this.a.aC().nextDouble() <= 0.006500000134110451D && this.f(); + return this.a.isTamed() && !this.a.isSitting() && this.a.aD().nextDouble() <= 0.006500000134110451D && this.f(); } public boolean b() { @@ -29,7 +29,7 @@ public void c() { this.a.getNavigation().a((double) ((float) this.f) + 0.5D, (double) (this.g + 1), (double) ((float) this.h) + 0.5D, this.b); this.c = 0; this.d = 0; - this.e = this.a.aC().nextInt(this.a.aC().nextInt(1200) + 1200) + 1200; + this.e = this.a.aD().nextInt(this.a.aD().nextInt(1200) + 1200) + 1200; this.a.getGoalSit().setSitting(false); } diff --git a/net/minecraft/server/PathfinderGoalLeapAtTarget.java b/net/minecraft/server/PathfinderGoalLeapAtTarget.java index 08f689c4c..a0b639f1f 100644 --- a/net/minecraft/server/PathfinderGoalLeapAtTarget.java +++ b/net/minecraft/server/PathfinderGoalLeapAtTarget.java @@ -19,7 +19,7 @@ public boolean a() { } else { double d0 = this.a.e(this.b); - return d0 >= 4.0D && d0 <= 16.0D ? (!this.a.onGround ? false : this.a.aC().nextInt(5) == 0) : false; + return d0 >= 4.0D && d0 <= 16.0D ? (!this.a.onGround ? false : this.a.aD().nextInt(5) == 0) : false; } } diff --git a/net/minecraft/server/PathfinderGoalLookAtPlayer.java b/net/minecraft/server/PathfinderGoalLookAtPlayer.java index 6852c845c..d5557dbac 100644 --- a/net/minecraft/server/PathfinderGoalLookAtPlayer.java +++ b/net/minecraft/server/PathfinderGoalLookAtPlayer.java @@ -26,7 +26,7 @@ public PathfinderGoalLookAtPlayer(EntityInsentient entityinsentient, Class oclas } public boolean a() { - if (this.b.aC().nextFloat() >= this.e) { + if (this.b.aD().nextFloat() >= this.e) { return false; } else { if (this.b.getGoalTarget() != null) { @@ -48,7 +48,7 @@ public boolean b() { } public void c() { - this.d = 40 + this.b.aC().nextInt(40); + this.d = 40 + this.b.aD().nextInt(40); } public void d() { diff --git a/net/minecraft/server/PathfinderGoalMakeLove.java b/net/minecraft/server/PathfinderGoalMakeLove.java index ffad05a57..5b8e2127f 100644 --- a/net/minecraft/server/PathfinderGoalMakeLove.java +++ b/net/minecraft/server/PathfinderGoalMakeLove.java @@ -17,7 +17,7 @@ public PathfinderGoalMakeLove(EntityVillager entityvillager) { public boolean a() { if (this.b.getAge() != 0) { return false; - } else if (this.b.aC().nextInt(500) != 0) { + } else if (this.b.aD().nextInt(500) != 0) { return false; } else { this.a = this.d.villages.getClosestVillage(MathHelper.floor(this.b.locX), MathHelper.floor(this.b.locY), MathHelper.floor(this.b.locZ), 0); @@ -62,7 +62,7 @@ public void e() { this.g(); } - if (this.b.aC().nextInt(35) == 0) { + if (this.b.aD().nextInt(35) == 0) { this.d.broadcastEntityEffect(this.b, (byte) 12); } } diff --git a/net/minecraft/server/PathfinderGoalMeleeAttack.java b/net/minecraft/server/PathfinderGoalMeleeAttack.java index 602774f1a..fca956745 100644 --- a/net/minecraft/server/PathfinderGoalMeleeAttack.java +++ b/net/minecraft/server/PathfinderGoalMeleeAttack.java @@ -59,7 +59,7 @@ public void e() { this.b.getControllerLook().a(entityliving, 30.0F, 30.0F); if ((this.e || this.b.getEntitySenses().canSee(entityliving)) && --this.h <= 0) { - this.h = 4 + this.b.aC().nextInt(7); + this.h = 4 + this.b.aD().nextInt(7); this.b.getNavigation().a((Entity) entityliving, this.d); } @@ -69,8 +69,8 @@ public void e() { if (this.b.e(entityliving.locX, entityliving.boundingBox.b, entityliving.locZ) <= d0) { if (this.c <= 0) { this.c = 20; - if (this.b.aY() != null) { - this.b.aU(); + if (this.b.aZ() != null) { + this.b.aV(); } this.b.m(entityliving); diff --git a/net/minecraft/server/PathfinderGoalMoveIndoors.java b/net/minecraft/server/PathfinderGoalMoveIndoors.java index 69050c9be..828ae7233 100644 --- a/net/minecraft/server/PathfinderGoalMoveIndoors.java +++ b/net/minecraft/server/PathfinderGoalMoveIndoors.java @@ -14,7 +14,7 @@ public PathfinderGoalMoveIndoors(EntityCreature entitycreature) { public boolean a() { if ((!this.a.world.v() || this.a.world.Q()) && !this.a.world.worldProvider.g) { - if (this.a.aC().nextInt(50) != 0) { + if (this.a.aD().nextInt(50) != 0) { return false; } else if (this.c != -1 && this.a.e((double) this.c, this.a.locY, (double) this.d) < 4.0D) { return false; diff --git a/net/minecraft/server/PathfinderGoalNearestAttackableTarget.java b/net/minecraft/server/PathfinderGoalNearestAttackableTarget.java index 21dcbe971..a32d6a18b 100644 --- a/net/minecraft/server/PathfinderGoalNearestAttackableTarget.java +++ b/net/minecraft/server/PathfinderGoalNearestAttackableTarget.java @@ -29,7 +29,7 @@ public PathfinderGoalNearestAttackableTarget(EntityCreature entitycreature, Clas } public boolean a() { - if (this.b > 0 && this.c.aC().nextInt(this.b) != 0) { + if (this.b > 0 && this.c.aD().nextInt(this.b) != 0) { return false; } else { double d0 = this.f(); diff --git a/net/minecraft/server/PathfinderGoalOfferFlower.java b/net/minecraft/server/PathfinderGoalOfferFlower.java index d923c6329..34190c9a7 100644 --- a/net/minecraft/server/PathfinderGoalOfferFlower.java +++ b/net/minecraft/server/PathfinderGoalOfferFlower.java @@ -14,7 +14,7 @@ public PathfinderGoalOfferFlower(EntityIronGolem entityirongolem) { public boolean a() { if (!this.a.world.v()) { return false; - } else if (this.a.aC().nextInt(8000) != 0) { + } else if (this.a.aD().nextInt(8000) != 0) { return false; } else { this.b = (EntityVillager) this.a.world.a(EntityVillager.class, this.a.boundingBox.grow(6.0D, 2.0D, 6.0D), (Entity) this.a); diff --git a/net/minecraft/server/PathfinderGoalOwnerHurtByTarget.java b/net/minecraft/server/PathfinderGoalOwnerHurtByTarget.java index a7ac8d8aa..22e335dc0 100644 --- a/net/minecraft/server/PathfinderGoalOwnerHurtByTarget.java +++ b/net/minecraft/server/PathfinderGoalOwnerHurtByTarget.java @@ -22,7 +22,7 @@ public boolean a() { return false; } else { this.b = entityliving.getLastDamager(); - int i = entityliving.aE(); + int i = entityliving.aF(); return i != this.e && this.a(this.b, false) && this.a.a(this.b, entityliving); } @@ -34,7 +34,7 @@ public void c() { EntityLiving entityliving = this.a.getOwner(); if (entityliving != null) { - this.e = entityliving.aE(); + this.e = entityliving.aF(); } super.c(); diff --git a/net/minecraft/server/PathfinderGoalOwnerHurtTarget.java b/net/minecraft/server/PathfinderGoalOwnerHurtTarget.java index 58bd9ce86..41349ac92 100644 --- a/net/minecraft/server/PathfinderGoalOwnerHurtTarget.java +++ b/net/minecraft/server/PathfinderGoalOwnerHurtTarget.java @@ -21,8 +21,8 @@ public boolean a() { if (entityliving == null) { return false; } else { - this.b = entityliving.aF(); - int i = entityliving.aG(); + this.b = entityliving.aG(); + int i = entityliving.aH(); return i != this.e && this.a(this.b, false) && this.a.a(this.b, entityliving); } @@ -34,7 +34,7 @@ public void c() { EntityLiving entityliving = this.a.getOwner(); if (entityliving != null) { - this.e = entityliving.aG(); + this.e = entityliving.aH(); } super.c(); diff --git a/net/minecraft/server/PathfinderGoalPassengerCarrotStick.java b/net/minecraft/server/PathfinderGoalPassengerCarrotStick.java index 53a4bd781..9d4c99427 100644 --- a/net/minecraft/server/PathfinderGoalPassengerCarrotStick.java +++ b/net/minecraft/server/PathfinderGoalPassengerCarrotStick.java @@ -77,7 +77,7 @@ public void e() { float f3 = 0.16277136F / (f2 * f2 * f2); float f4 = MathHelper.sin(entitycreature.yaw * 3.1415927F / 180.0F); float f5 = MathHelper.cos(entitycreature.yaw * 3.1415927F / 180.0F); - float f6 = entitycreature.bf() * f3; + float f6 = entitycreature.bg() * f3; float f7 = Math.max(f1, 1.0F); f7 = f6 / f7; @@ -120,8 +120,8 @@ public void e() { } } - if (!entityhuman.abilities.canInstantlyBuild && this.c >= this.b * 0.5F && this.a.aC().nextFloat() < 0.006F && !this.d) { - ItemStack itemstack = entityhuman.aY(); + if (!entityhuman.abilities.canInstantlyBuild && this.c >= this.b * 0.5F && this.a.aD().nextFloat() < 0.006F && !this.d) { + ItemStack itemstack = entityhuman.aZ(); if (itemstack != null && itemstack.id == Item.CARROT_STICK.id) { itemstack.damage(1, entityhuman); @@ -148,7 +148,7 @@ public boolean f() { public void g() { this.d = true; this.e = 0; - this.f = this.a.aC().nextInt(841) + 140; + this.f = this.a.aD().nextInt(841) + 140; } public boolean h() { diff --git a/net/minecraft/server/PathfinderGoalPlay.java b/net/minecraft/server/PathfinderGoalPlay.java index ab4336512..d3baa8b02 100644 --- a/net/minecraft/server/PathfinderGoalPlay.java +++ b/net/minecraft/server/PathfinderGoalPlay.java @@ -19,7 +19,7 @@ public PathfinderGoalPlay(EntityVillager entityvillager, double d0) { public boolean a() { if (this.a.getAge() >= 0) { return false; - } else if (this.a.aC().nextInt(400) != 0) { + } else if (this.a.aD().nextInt(400) != 0) { return false; } else { List list = this.a.world.a(EntityVillager.class, this.a.boundingBox.grow(6.0D, 3.0D, 6.0D)); diff --git a/net/minecraft/server/PathfinderGoalRandomLookaround.java b/net/minecraft/server/PathfinderGoalRandomLookaround.java index 50721ea32..5c7f4b70d 100644 --- a/net/minecraft/server/PathfinderGoalRandomLookaround.java +++ b/net/minecraft/server/PathfinderGoalRandomLookaround.java @@ -13,7 +13,7 @@ public PathfinderGoalRandomLookaround(EntityInsentient entityinsentient) { } public boolean a() { - return this.a.aC().nextFloat() < 0.02F; + return this.a.aD().nextFloat() < 0.02F; } public boolean b() { @@ -21,11 +21,11 @@ public boolean b() { } public void c() { - double d0 = 6.283185307179586D * this.a.aC().nextDouble(); + double d0 = 6.283185307179586D * this.a.aD().nextDouble(); this.b = Math.cos(d0); this.c = Math.sin(d0); - this.d = 20 + this.a.aC().nextInt(20); + this.d = 20 + this.a.aD().nextInt(20); } public void e() { diff --git a/net/minecraft/server/PathfinderGoalRandomStroll.java b/net/minecraft/server/PathfinderGoalRandomStroll.java index 86267d5c6..106c1c8bf 100644 --- a/net/minecraft/server/PathfinderGoalRandomStroll.java +++ b/net/minecraft/server/PathfinderGoalRandomStroll.java @@ -15,9 +15,9 @@ public PathfinderGoalRandomStroll(EntityCreature entitycreature, double d0) { } public boolean a() { - if (this.a.aH() >= 100) { + if (this.a.aI() >= 100) { return false; - } else if (this.a.aC().nextInt(120) != 0) { + } else if (this.a.aD().nextInt(120) != 0) { return false; } else { Vec3D vec3d = RandomPositionGenerator.a(this.a, 10, 7); diff --git a/net/minecraft/server/PathfinderGoalSit.java b/net/minecraft/server/PathfinderGoalSit.java index 3590d03b3..89fafaea9 100644 --- a/net/minecraft/server/PathfinderGoalSit.java +++ b/net/minecraft/server/PathfinderGoalSit.java @@ -13,7 +13,7 @@ public PathfinderGoalSit(EntityTameableAnimal entitytameableanimal) { public boolean a() { if (!this.entity.isTamed()) { return false; - } else if (this.entity.G()) { + } else if (this.entity.H()) { return false; } else if (!this.entity.onGround) { return false; diff --git a/net/minecraft/server/PathfinderGoalTakeFlower.java b/net/minecraft/server/PathfinderGoalTakeFlower.java index 34873e2d0..d1a747f81 100644 --- a/net/minecraft/server/PathfinderGoalTakeFlower.java +++ b/net/minecraft/server/PathfinderGoalTakeFlower.java @@ -47,7 +47,7 @@ public boolean b() { } public void c() { - this.c = this.a.aC().nextInt(320); + this.c = this.a.aD().nextInt(320); this.d = false; this.b.getNavigation().h(); } diff --git a/net/minecraft/server/PathfinderGoalTame.java b/net/minecraft/server/PathfinderGoalTame.java index 889dc719c..11ccc9323 100644 --- a/net/minecraft/server/PathfinderGoalTame.java +++ b/net/minecraft/server/PathfinderGoalTame.java @@ -40,12 +40,12 @@ public boolean b() { } public void e() { - if (this.entity.aC().nextInt(50) == 0) { + if (this.entity.aD().nextInt(50) == 0) { if (this.entity.passenger instanceof EntityHuman) { int i = this.entity.getTemper(); - int j = this.entity.cq(); + int j = this.entity.getMaxDomestication(); - if (j > 0 && this.entity.aC().nextInt(j) < i) { + if (j > 0 && this.entity.aD().nextInt(j) < i) { this.entity.g((EntityHuman) this.entity.passenger); this.entity.world.broadcastEntityEffect(this.entity, (byte) 7); return; diff --git a/net/minecraft/server/PathfinderGoalTarget.java b/net/minecraft/server/PathfinderGoalTarget.java index a44243848..969110a87 100644 --- a/net/minecraft/server/PathfinderGoalTarget.java +++ b/net/minecraft/server/PathfinderGoalTarget.java @@ -110,7 +110,7 @@ protected boolean a(EntityLiving entityliving, boolean flag) { } private boolean a(EntityLiving entityliving) { - this.e = 10 + this.c.aC().nextInt(5); + this.e = 10 + this.c.aD().nextInt(5); PathEntity pathentity = this.c.getNavigation().a(entityliving); if (pathentity == null) { diff --git a/net/minecraft/server/PathfinderGoalTempt.java b/net/minecraft/server/PathfinderGoalTempt.java index 9b3541056..d69386e9c 100644 --- a/net/minecraft/server/PathfinderGoalTempt.java +++ b/net/minecraft/server/PathfinderGoalTempt.java @@ -33,7 +33,7 @@ public boolean a() { if (this.h == null) { return false; } else { - ItemStack itemstack = this.h.bx(); + ItemStack itemstack = this.h.by(); return itemstack == null ? false : itemstack.id == this.k; } diff --git a/net/minecraft/server/PathfinderGoalTradeWithPlayer.java b/net/minecraft/server/PathfinderGoalTradeWithPlayer.java index 33d817212..71a983f19 100644 --- a/net/minecraft/server/PathfinderGoalTradeWithPlayer.java +++ b/net/minecraft/server/PathfinderGoalTradeWithPlayer.java @@ -12,7 +12,7 @@ public PathfinderGoalTradeWithPlayer(EntityVillager entityvillager) { public boolean a() { if (!this.a.isAlive()) { return false; - } else if (this.a.G()) { + } else if (this.a.H()) { return false; } else if (!this.a.onGround) { return false; diff --git a/net/minecraft/server/PendingConnection.java b/net/minecraft/server/PendingConnection.java index b2175b696..b701766e3 100644 --- a/net/minecraft/server/PendingConnection.java +++ b/net/minecraft/server/PendingConnection.java @@ -55,23 +55,27 @@ public void disconnect(String s) { } public void a(Packet2Handshake packet2handshake) { - this.g = packet2handshake.f(); - if (!this.g.equals(StripColor.a(this.g))) { - this.disconnect("Invalid username!"); + if (this.g != null) { + this.disconnect("Quit repeating yourself!"); } else { - PublicKey publickey = this.server.H().getPublic(); + this.g = packet2handshake.f(); + if (!this.g.equals(StripColor.a(this.g))) { + this.disconnect("Invalid username!"); + } else { + PublicKey publickey = this.server.H().getPublic(); - if (packet2handshake.d() != 74) { - if (packet2handshake.d() > 74) { - this.disconnect("Outdated server!"); + if (packet2handshake.d() != 78) { + if (packet2handshake.d() > 78) { + this.disconnect("Outdated server!"); + } else { + this.disconnect("Outdated client!"); + } } else { - this.disconnect("Outdated client!"); + this.loginKey = this.server.getOnlineMode() ? Long.toString(random.nextLong(), 16) : "-"; + this.d = new byte[4]; + random.nextBytes(this.d); + this.networkManager.queue(new Packet253KeyRequest(this.loginKey, publickey, this.d)); } - } else { - this.loginKey = this.server.getOnlineMode() ? Long.toString(random.nextLong(), 16) : "-"; - this.d = new byte[4]; - random.nextBytes(this.d); - this.networkManager.queue(new Packet253KeyRequest(this.loginKey, publickey, this.d)); } } } @@ -134,7 +138,7 @@ public void a(Packet254GetInfo packet254getinfo) { if (packet254getinfo.d()) { s = this.server.getMotd() + "\u00A7" + playerlist.getPlayerCount() + "\u00A7" + playerlist.getMaxPlayers(); } else { - List list = Arrays.asList(new Serializable[] { Integer.valueOf(1), Integer.valueOf(74), this.server.getVersion(), this.server.getMotd(), Integer.valueOf(playerlist.getPlayerCount()), Integer.valueOf(playerlist.getMaxPlayers())}); + List list = Arrays.asList(new Serializable[] { Integer.valueOf(1), Integer.valueOf(78), this.server.getVersion(), this.server.getMotd(), Integer.valueOf(playerlist.getPlayerCount()), Integer.valueOf(playerlist.getMaxPlayers())}); Object object; diff --git a/net/minecraft/server/PlayerConnection.java b/net/minecraft/server/PlayerConnection.java index eb0615d99..069691bf2 100644 --- a/net/minecraft/server/PlayerConnection.java +++ b/net/minecraft/server/PlayerConnection.java @@ -103,7 +103,7 @@ public void a(Packet10Flying packet10flying) { float f = this.player.yaw; float f1 = this.player.pitch; - this.player.vehicle.V(); + this.player.vehicle.W(); d1 = this.player.locX; d2 = this.player.locY; d3 = this.player.locZ; @@ -117,7 +117,7 @@ public void a(Packet10Flying packet10flying) { this.player.X = 0.0F; this.player.setLocation(d1, d2, d3, f, f1); if (this.player.vehicle != null) { - this.player.vehicle.V(); + this.player.vehicle.W(); } this.minecraftServer.getPlayerList().d(this.player); @@ -268,12 +268,13 @@ public void a(double d0, double d1, double d2, float f, float f1) { public void a(Packet14BlockDig packet14blockdig) { WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension); + this.player.u(); if (packet14blockdig.e == 4) { this.player.a(false); } else if (packet14blockdig.e == 3) { this.player.a(true); } else if (packet14blockdig.e == 5) { - this.player.bs(); + this.player.bt(); } else { boolean flag = false; @@ -337,6 +338,7 @@ public void a(Packet15Place packet15place) { int k = packet15place.g(); int l = packet15place.getFace(); + this.player.u(); if (packet15place.getFace() == 255) { if (itemstack == null) { return; @@ -447,6 +449,7 @@ public void sendPacket(Packet packet) { public void a(Packet16BlockItemSwitch packet16blockitemswitch) { if (packet16blockitemswitch.itemInHandIndex >= 0 && packet16blockitemswitch.itemInHandIndex < PlayerInventory.getHotbarSize()) { this.player.inventory.itemInHandIndex = packet16blockitemswitch.itemInHandIndex; + this.player.u(); } else { this.minecraftServer.getLogger().warning(this.player.getName() + " tried to set an invalid carried item"); } @@ -456,6 +459,7 @@ public void a(Packet3Chat packet3chat) { if (this.player.getChatFlags() == 2) { this.sendPacket(new Packet3Chat(ChatMessage.e("chat.cannotSend").a(EnumChatFormat.RED))); } else { + this.player.u(); String s = packet3chat.message; if (s.length() > 100) { @@ -496,12 +500,14 @@ private void handleCommand(String s) { } public void a(Packet18ArmAnimation packet18armanimation) { + this.player.u(); if (packet18armanimation.b == 1) { - this.player.aU(); + this.player.aV(); } } public void a(Packet19EntityAction packet19entityaction) { + this.player.u(); if (packet19entityaction.animation == 1) { this.player.setSneaking(true); } else if (packet19entityaction.animation == 2) { @@ -534,6 +540,7 @@ public void a(Packet7UseEntity packet7useentity) { WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension); Entity entity = worldserver.getEntity(packet7useentity.target); + this.player.u(); if (entity != null) { boolean flag = this.player.o(entity); double d0 = 36.0D; @@ -559,6 +566,7 @@ public void a(Packet7UseEntity packet7useentity) { } public void a(Packet205ClientCommand packet205clientcommand) { + this.player.u(); if (packet205clientcommand.a == 1) { if (this.player.viewingCredits) { this.player = this.minecraftServer.getPlayerList().moveToWorld(this.player, 0, true); @@ -594,6 +602,7 @@ public void handleContainerClose(Packet101CloseWindow packet101closewindow) { } public void a(Packet102WindowClick packet102windowclick) { + this.player.u(); if (this.player.activeContainer.windowId == packet102windowclick.a && this.player.activeContainer.c(this.player)) { ItemStack itemstack = this.player.activeContainer.clickItem(packet102windowclick.slot, packet102windowclick.button, packet102windowclick.shift, this.player); @@ -619,6 +628,7 @@ public void a(Packet102WindowClick packet102windowclick) { } public void a(Packet108ButtonClick packet108buttonclick) { + this.player.u(); if (this.player.activeContainer.windowId == packet108buttonclick.a && this.player.activeContainer.c(this.player)) { this.player.activeContainer.a((EntityHuman) this.player, packet108buttonclick.b); this.player.activeContainer.b(); @@ -661,6 +671,7 @@ public void a(Packet106Transaction packet106transaction) { } public void a(Packet130UpdateSign packet130updatesign) { + this.player.u(); WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension); if (worldserver.isLoaded(packet130updatesign.x, packet130updatesign.y, packet130updatesign.z)) { diff --git a/net/minecraft/server/PlayerInteractManager.java b/net/minecraft/server/PlayerInteractManager.java index 42eb6b9d4..5117d0115 100644 --- a/net/minecraft/server/PlayerInteractManager.java +++ b/net/minecraft/server/PlayerInteractManager.java @@ -177,7 +177,7 @@ private boolean d(int i, int j, int k) { public boolean breakBlock(int i, int j, int k) { if (this.gamemode.isAdventure() && !this.player.d(i, j, k)) { return false; - } else if (this.gamemode.d() && this.player.aY() != null && this.player.aY().getItem() instanceof ItemSword) { + } else if (this.gamemode.d() && this.player.aZ() != null && this.player.aZ().getItem() instanceof ItemSword) { return false; } else { int l = this.world.getTypeId(i, j, k); @@ -189,13 +189,13 @@ public boolean breakBlock(int i, int j, int k) { if (this.isCreative()) { this.player.playerConnection.sendPacket(new Packet53BlockChange(i, j, k, this.world)); } else { - ItemStack itemstack = this.player.bx(); + ItemStack itemstack = this.player.by(); boolean flag1 = this.player.a(Block.byId[l]); if (itemstack != null) { itemstack.a(this.world, l, i, j, k, this.player); if (itemstack.count == 0) { - this.player.by(); + this.player.bz(); } } @@ -228,7 +228,7 @@ public boolean useItem(EntityHuman entityhuman, World world, ItemStack itemstack entityhuman.inventory.items[entityhuman.inventory.itemInHandIndex] = null; } - if (!entityhuman.bq()) { + if (!entityhuman.br()) { ((EntityPlayer) entityhuman).updateInventory(entityhuman.defaultContainer); } @@ -239,7 +239,7 @@ public boolean useItem(EntityHuman entityhuman, World world, ItemStack itemstack public boolean interact(EntityHuman entityhuman, World world, ItemStack itemstack, int i, int j, int k, int l, float f, float f1, float f2) { int i1; - if (!entityhuman.isSneaking() || entityhuman.aY() == null) { + if (!entityhuman.isSneaking() || entityhuman.aZ() == null) { i1 = world.getTypeId(i, j, k); if (i1 > 0 && Block.byId[i1].interact(world, i, j, k, entityhuman, l, f, f1, f2)) { return true; diff --git a/net/minecraft/server/PortalTravelAgent.java b/net/minecraft/server/PortalTravelAgent.java index 5cb89653f..8e815a7fd 100644 --- a/net/minecraft/server/PortalTravelAgent.java +++ b/net/minecraft/server/PortalTravelAgent.java @@ -126,7 +126,7 @@ public boolean b(Entity entity, double d0, double d1, double d2, float f) { j2 = 1; } - int k2 = entity.as(); + int k2 = entity.at(); if (j2 > -1) { int l2 = Direction.h[j2]; diff --git a/net/minecraft/server/RandomPositionGenerator.java b/net/minecraft/server/RandomPositionGenerator.java index 33f5dabb0..58b431edc 100644 --- a/net/minecraft/server/RandomPositionGenerator.java +++ b/net/minecraft/server/RandomPositionGenerator.java @@ -25,7 +25,7 @@ public static Vec3D b(EntityCreature entitycreature, int i, int j, Vec3D vec3d) } private static Vec3D c(EntityCreature entitycreature, int i, int j, Vec3D vec3d) { - Random random = entitycreature.aC(); + Random random = entitycreature.aD(); boolean flag = false; int k = 0; int l = 0; diff --git a/net/minecraft/server/ScoreboardHealthCriteria.java b/net/minecraft/server/ScoreboardHealthCriteria.java index 5766c16b8..39e9bff3b 100644 --- a/net/minecraft/server/ScoreboardHealthCriteria.java +++ b/net/minecraft/server/ScoreboardHealthCriteria.java @@ -14,7 +14,7 @@ public int getScoreModifier(List list) { EntityHuman entityhuman; - for (Iterator iterator = list.iterator(); iterator.hasNext(); f += entityhuman.getHealth() + entityhuman.bm()) { + for (Iterator iterator = list.iterator(); iterator.hasNext(); f += entityhuman.getHealth() + entityhuman.bn()) { entityhuman = (EntityHuman) iterator.next(); } diff --git a/net/minecraft/server/SlotAnvilResult.java b/net/minecraft/server/SlotAnvilResult.java index 6e77d203a..1cb92628c 100644 --- a/net/minecraft/server/SlotAnvilResult.java +++ b/net/minecraft/server/SlotAnvilResult.java @@ -49,7 +49,7 @@ public void a(EntityHuman entityhuman, ItemStack itemstack) { } this.e.a = 0; - if (!entityhuman.abilities.canInstantlyBuild && !this.a.isStatic && this.a.getTypeId(this.b, this.c, this.d) == Block.ANVIL.id && entityhuman.aC().nextFloat() < 0.12F) { + if (!entityhuman.abilities.canInstantlyBuild && !this.a.isStatic && this.a.getTypeId(this.b, this.c, this.d) == Block.ANVIL.id && entityhuman.aD().nextFloat() < 0.12F) { int i = this.a.getData(this.b, this.c, this.d); int j = i & 3; int k = i >> 2; diff --git a/net/minecraft/server/StructureBoundingBox.java b/net/minecraft/server/StructureBoundingBox.java index 8765224c9..865506df4 100644 --- a/net/minecraft/server/StructureBoundingBox.java +++ b/net/minecraft/server/StructureBoundingBox.java @@ -11,6 +11,17 @@ public class StructureBoundingBox { public StructureBoundingBox() {} + public StructureBoundingBox(int[] aint) { + if (aint.length == 6) { + this.a = aint[0]; + this.b = aint[1]; + this.c = aint[2]; + this.d = aint[3]; + this.e = aint[4]; + this.f = aint[5]; + } + } + public static StructureBoundingBox a() { return new StructureBoundingBox(Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MIN_VALUE, Integer.MIN_VALUE, Integer.MIN_VALUE); } @@ -118,4 +129,8 @@ public int g() { public String toString() { return "(" + this.a + ", " + this.b + ", " + this.c + "; " + this.d + ", " + this.e + ", " + this.f + ")"; } + + public NBTTagIntArray a(String s) { + return new NBTTagIntArray(s, new int[] { this.a, this.b, this.c, this.d, this.e, this.f}); + } } diff --git a/net/minecraft/server/StructureGenerator.java b/net/minecraft/server/StructureGenerator.java index fd5100094..ab4dc194a 100644 --- a/net/minecraft/server/StructureGenerator.java +++ b/net/minecraft/server/StructureGenerator.java @@ -9,11 +9,15 @@ public abstract class StructureGenerator extends WorldGenBase { + private WorldGenFeature e; protected Map d = new HashMap(); public StructureGenerator() {} - protected void a(World world, int i, int j, int k, int l, byte[] abyte) { + public abstract String a(); + + protected final void a(World world, int i, int j, int k, int l, byte[] abyte) { + this.a(world); if (!this.d.containsKey(Long.valueOf(ChunkCoordIntPair.a(i, j)))) { this.b.nextInt(); @@ -22,6 +26,7 @@ protected void a(World world, int i, int j, int k, int l, byte[] abyte) { StructureStart structurestart = this.b(i, j); this.d.put(Long.valueOf(ChunkCoordIntPair.a(i, j)), structurestart); + this.a(i, j, structurestart); } } catch (Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Exception preparing structure feature"); @@ -37,6 +42,7 @@ protected void a(World world, int i, int j, int k, int l, byte[] abyte) { } public boolean a(World world, Random random, int i, int j) { + this.a(world); int k = (i << 4) + 8; int l = (j << 4) + 8; boolean flag = false; @@ -48,13 +54,19 @@ public boolean a(World world, Random random, int i, int j) { if (structurestart.d() && structurestart.a().a(k, l, k + 15, l + 15)) { structurestart.a(world, random, new StructureBoundingBox(k, l, k + 15, l + 15)); flag = true; + this.a(structurestart.e(), structurestart.f(), structurestart); } } return flag; } - public boolean a(int i, int j, int k) { + public boolean b(int i, int j, int k) { + this.a(this.c); + return this.c(i, j, k) != null; + } + + protected StructureStart c(int i, int j, int k) { Iterator iterator = this.d.values().iterator(); while (iterator.hasNext()) { @@ -66,17 +78,18 @@ public boolean a(int i, int j, int k) { while (iterator1.hasNext()) { StructurePiece structurepiece = (StructurePiece) iterator1.next(); - if (structurepiece.b().b(i, j, k)) { - return true; + if (structurepiece.c().b(i, j, k)) { + return structurestart; } } } } - return false; + return null; } - public boolean b(int i, int j, int k) { + public boolean d(int i, int j, int k) { + this.a(this.c); Iterator iterator = this.d.values().iterator(); StructureStart structurestart; @@ -94,6 +107,7 @@ public boolean b(int i, int j, int k) { public ChunkPosition getNearestGeneratedFeature(World world, int i, int j, int k) { this.c = world; + this.a(world); this.b.setSeed(world.getSeed()); long l = this.b.nextLong(); long i1 = this.b.nextLong(); @@ -162,6 +176,40 @@ protected List p_() { return null; } + private void a(World world) { + if (this.e == null) { + this.e = (WorldGenFeature) world.a(WorldGenFeature.class, this.a()); + if (this.e == null) { + this.e = new WorldGenFeature(this.a()); + world.a(this.a(), (WorldMapBase) this.e); + } else { + NBTTagCompound nbttagcompound = this.e.a(); + Iterator iterator = nbttagcompound.c().iterator(); + + while (iterator.hasNext()) { + NBTBase nbtbase = (NBTBase) iterator.next(); + + if (nbtbase.getTypeId() == 10) { + NBTTagCompound nbttagcompound1 = (NBTTagCompound) nbtbase; + + if (nbttagcompound1.hasKey("ChunkX") && nbttagcompound1.hasKey("ChunkZ")) { + int i = nbttagcompound1.getInt("ChunkX"); + int j = nbttagcompound1.getInt("ChunkZ"); + StructureStart structurestart = WorldGenFactory.a(nbttagcompound1, world); + + this.d.put(Long.valueOf(ChunkCoordIntPair.a(i, j)), structurestart); + } + } + } + } + } + } + + private void a(int i, int j, StructureStart structurestart) { + this.e.a(structurestart.a(i, j), i, j); + this.e.c(); + } + protected abstract boolean a(int i, int j); protected abstract StructureStart b(int i, int j); diff --git a/net/minecraft/server/StructurePiece.java b/net/minecraft/server/StructurePiece.java index 3a300a08b..b3625e62e 100644 --- a/net/minecraft/server/StructurePiece.java +++ b/net/minecraft/server/StructurePiece.java @@ -10,20 +10,47 @@ public abstract class StructurePiece { protected int g; protected int h; + public StructurePiece() {} + protected StructurePiece(int i) { this.h = i; this.g = -1; } + public NBTTagCompound b() { + NBTTagCompound nbttagcompound = new NBTTagCompound(); + + nbttagcompound.setString("id", WorldGenFactory.a(this)); + nbttagcompound.set("BB", this.f.a("BB")); + nbttagcompound.setInt("O", this.g); + nbttagcompound.setInt("GD", this.h); + this.a(nbttagcompound); + return nbttagcompound; + } + + protected abstract void a(NBTTagCompound nbttagcompound); + + public void a(World world, NBTTagCompound nbttagcompound) { + if (nbttagcompound.hasKey("BB")) { + this.f = new StructureBoundingBox(nbttagcompound.getIntArray("BB")); + } + + this.g = nbttagcompound.getInt("O"); + this.h = nbttagcompound.getInt("GD"); + this.b(nbttagcompound); + } + + protected abstract void b(NBTTagCompound nbttagcompound); + public void a(StructurePiece structurepiece, List list, Random random) {} public abstract boolean a(World world, Random random, StructureBoundingBox structureboundingbox); - public StructureBoundingBox b() { + public StructureBoundingBox c() { return this.f; } - public int c() { + public int d() { return this.h; } @@ -38,7 +65,7 @@ public static StructurePiece a(List list, StructureBoundingBox structurebounding } structurepiece = (StructurePiece) iterator.next(); - } while (structurepiece.b() == null || !structurepiece.b().a(structureboundingbox)); + } while (structurepiece.c() == null || !structurepiece.c().a(structureboundingbox)); return structurepiece; } diff --git a/net/minecraft/server/StructureStart.java b/net/minecraft/server/StructureStart.java index 577dae469..92213c31c 100644 --- a/net/minecraft/server/StructureStart.java +++ b/net/minecraft/server/StructureStart.java @@ -8,8 +8,15 @@ public abstract class StructureStart { protected LinkedList a = new LinkedList(); protected StructureBoundingBox b; + private int c; + private int d; - protected StructureStart() {} + public StructureStart() {} + + public StructureStart(int i, int j) { + this.c = i; + this.d = j; + } public StructureBoundingBox a() { return this.b; @@ -25,7 +32,7 @@ public void a(World world, Random random, StructureBoundingBox structurebounding while (iterator.hasNext()) { StructurePiece structurepiece = (StructurePiece) iterator.next(); - if (structurepiece.b().a(structureboundingbox) && !structurepiece.a(world, random, structureboundingbox)) { + if (structurepiece.c().a(structureboundingbox) && !structurepiece.a(world, random, structureboundingbox)) { iterator.remove(); } } @@ -38,10 +45,51 @@ protected void c() { while (iterator.hasNext()) { StructurePiece structurepiece = (StructurePiece) iterator.next(); - this.b.b(structurepiece.b()); + this.b.b(structurepiece.c()); } } + public NBTTagCompound a(int i, int j) { + NBTTagCompound nbttagcompound = new NBTTagCompound(); + + nbttagcompound.setString("id", WorldGenFactory.a(this)); + nbttagcompound.setInt("ChunkX", i); + nbttagcompound.setInt("ChunkZ", j); + nbttagcompound.set("BB", this.b.a("BB")); + NBTTagList nbttaglist = new NBTTagList("Children"); + Iterator iterator = this.a.iterator(); + + while (iterator.hasNext()) { + StructurePiece structurepiece = (StructurePiece) iterator.next(); + + nbttaglist.add(structurepiece.b()); + } + + nbttagcompound.set("Children", nbttaglist); + this.a(nbttagcompound); + return nbttagcompound; + } + + public void a(NBTTagCompound nbttagcompound) {} + + public void a(World world, NBTTagCompound nbttagcompound) { + this.c = nbttagcompound.getInt("ChunkX"); + this.d = nbttagcompound.getInt("ChunkZ"); + if (nbttagcompound.hasKey("BB")) { + this.b = new StructureBoundingBox(nbttagcompound.getIntArray("BB")); + } + + NBTTagList nbttaglist = nbttagcompound.getList("Children"); + + for (int i = 0; i < nbttaglist.size(); ++i) { + this.a.add(WorldGenFactory.b((NBTTagCompound) nbttaglist.get(i), world)); + } + + this.b(nbttagcompound); + } + + public void b(NBTTagCompound nbttagcompound) {} + protected void a(World world, Random random, int i) { int j = 63 - i; int k = this.b.c() + 1; @@ -58,7 +106,7 @@ protected void a(World world, Random random, int i) { while (iterator.hasNext()) { StructurePiece structurepiece = (StructurePiece) iterator.next(); - structurepiece.b().a(0, l, 0); + structurepiece.c().a(0, l, 0); } } @@ -81,11 +129,19 @@ protected void a(World world, Random random, int i, int j) { while (iterator.hasNext()) { StructurePiece structurepiece = (StructurePiece) iterator.next(); - structurepiece.b().a(0, i1, 0); + structurepiece.c().a(0, i1, 0); } } public boolean d() { return true; } + + public int e() { + return this.c; + } + + public int f() { + return this.d; + } } diff --git a/net/minecraft/server/World.java b/net/minecraft/server/World.java index d1323bddd..6f6b70329 100644 --- a/net/minecraft/server/World.java +++ b/net/minecraft/server/World.java @@ -920,7 +920,7 @@ public List getCubes(Entity entity, AxisAlignedBB axisalignedbb) { List list = this.getEntities(entity, axisalignedbb.grow(d0, d0, d0)); for (int j2 = 0; j2 < list.size(); ++j2) { - AxisAlignedBB axisalignedbb1 = ((Entity) list.get(j2)).D(); + AxisAlignedBB axisalignedbb1 = ((Entity) list.get(j2)).E(); if (axisalignedbb1 != null && axisalignedbb1.b(axisalignedbb)) { this.M.add(axisalignedbb1); @@ -1205,7 +1205,7 @@ public void entityJoinedWorld(Entity entity, boolean flag) { if (flag && entity.ai) { ++entity.ticksLived; if (entity.vehicle != null) { - entity.U(); + entity.V(); } else { entity.l_(); } @@ -1405,7 +1405,7 @@ public boolean a(AxisAlignedBB axisalignedbb, Material material, Entity entity) } } - if (vec3d.b() > 0.0D && entity.aw()) { + if (vec3d.b() > 0.0D && entity.ax()) { vec3d = vec3d.a(); double d1 = 0.014D; @@ -2363,7 +2363,7 @@ public EntityHuman findNearbyVulnerablePlayer(double d0, double d1, double d2, d } if (entityhuman1.isInvisible()) { - float f = entityhuman1.bw(); + float f = entityhuman1.bx(); if (f < 0.1F) { f = 0.1F; @@ -2462,7 +2462,7 @@ public boolean Q() { return (double) this.i(1.0F) > 0.2D; } - public boolean F(int i, int j, int k) { + public boolean isRainingAt(int i, int j, int k) { if (!this.Q()) { return false; } else if (!this.l(i, j, k)) { diff --git a/net/minecraft/server/WorldGenFactory.java b/net/minecraft/server/WorldGenFactory.java new file mode 100644 index 000000000..aa171ad0d --- /dev/null +++ b/net/minecraft/server/WorldGenFactory.java @@ -0,0 +1,89 @@ +package net.minecraft.server; + +import java.util.HashMap; +import java.util.Map; + +public class WorldGenFactory { + + private static Map a = new HashMap(); + private static Map b = new HashMap(); + private static Map c = new HashMap(); + private static Map d = new HashMap(); + + private static void b(Class oclass, String s) { + a.put(s, oclass); + b.put(oclass, s); + } + + static void a(Class oclass, String s) { + c.put(s, oclass); + d.put(oclass, s); + } + + public static String a(StructureStart structurestart) { + return (String) b.get(structurestart.getClass()); + } + + public static String a(StructurePiece structurepiece) { + return (String) d.get(structurepiece.getClass()); + } + + public static StructureStart a(NBTTagCompound nbttagcompound, World world) { + StructureStart structurestart = null; + + try { + Class oclass = (Class) a.get(nbttagcompound.getString("id")); + + if (oclass != null) { + structurestart = (StructureStart) oclass.newInstance(); + } + } catch (Exception exception) { + world.getLogger().warning("Failed Start with id " + nbttagcompound.getString("id")); + exception.printStackTrace(); + } + + if (structurestart != null) { + structurestart.a(world, nbttagcompound); + } else { + world.getLogger().warning("Skipping Structure with id " + nbttagcompound.getString("id")); + } + + return structurestart; + } + + public static StructurePiece b(NBTTagCompound nbttagcompound, World world) { + StructurePiece structurepiece = null; + + try { + Class oclass = (Class) c.get(nbttagcompound.getString("id")); + + if (oclass != null) { + structurepiece = (StructurePiece) oclass.newInstance(); + } + } catch (Exception exception) { + world.getLogger().warning("Failed Piece with id " + nbttagcompound.getString("id")); + exception.printStackTrace(); + } + + if (structurepiece != null) { + structurepiece.a(world, nbttagcompound); + } else { + world.getLogger().warning("Skipping Piece with id " + nbttagcompound.getString("id")); + } + + return structurepiece; + } + + static { + b(WorldGenMineshaftStart.class, "Mineshaft"); + b(WorldGenVillageStart.class, "Village"); + b(WorldGenNetherStart.class, "Fortress"); + b(WorldGenStronghold2Start.class, "Stronghold"); + b(WorldGenLargeFeatureStart.class, "Temple"); + WorldGenMineshaftPieces.a(); + WorldGenVillagePieces.a(); + WorldGenNetherPieces.a(); + WorldGenStrongholdPieces.a(); + WorldGenRegistration.a(); + } +} diff --git a/net/minecraft/server/WorldGenFeature.java b/net/minecraft/server/WorldGenFeature.java new file mode 100644 index 000000000..244b153cf --- /dev/null +++ b/net/minecraft/server/WorldGenFeature.java @@ -0,0 +1,33 @@ +package net.minecraft.server; + +public class WorldGenFeature extends WorldMapBase { + + private NBTTagCompound a = new NBTTagCompound("Features"); + + public WorldGenFeature(String s) { + super(s); + } + + public void a(NBTTagCompound nbttagcompound) { + this.a = nbttagcompound.getCompound("Features"); + } + + public void b(NBTTagCompound nbttagcompound) { + nbttagcompound.set("Features", this.a); + } + + public void a(NBTTagCompound nbttagcompound, int i, int j) { + String s = this.b(i, j); + + nbttagcompound.setName(s); + this.a.set(s, nbttagcompound); + } + + public String b(int i, int j) { + return "[" + i + "," + j + "]"; + } + + public NBTTagCompound a() { + return this.a; + } +} diff --git a/net/minecraft/server/WorldGenJungleTemple.java b/net/minecraft/server/WorldGenJungleTemple.java index fd777b2a9..229b2f4ae 100644 --- a/net/minecraft/server/WorldGenJungleTemple.java +++ b/net/minecraft/server/WorldGenJungleTemple.java @@ -12,10 +12,28 @@ public class WorldGenJungleTemple extends WorldGenScatteredPiece { private static final StructurePieceTreasure[] m = new StructurePieceTreasure[] { new StructurePieceTreasure(Item.ARROW.id, 0, 2, 7, 30)}; private static WorldGenJungleTemplePiece n = new WorldGenJungleTemplePiece((WorldGenJungleTempleUnknown) null); + public WorldGenJungleTemple() {} + public WorldGenJungleTemple(Random random, int i, int j) { super(random, i, 64, j, 12, 10, 15); } + protected void a(NBTTagCompound nbttagcompound) { + super.a(nbttagcompound); + nbttagcompound.setBoolean("placedMainChest", this.e); + nbttagcompound.setBoolean("placedHiddenChest", this.i); + nbttagcompound.setBoolean("placedTrap1", this.j); + nbttagcompound.setBoolean("placedTrap2", this.k); + } + + protected void b(NBTTagCompound nbttagcompound) { + super.b(nbttagcompound); + this.e = nbttagcompound.getBoolean("placedMainChest"); + this.i = nbttagcompound.getBoolean("placedHiddenChest"); + this.j = nbttagcompound.getBoolean("placedTrap1"); + this.k = nbttagcompound.getBoolean("placedTrap2"); + } + public boolean a(World world, Random random, StructureBoundingBox structureboundingbox) { if (!this.a(world, structureboundingbox, 0)) { return false; diff --git a/net/minecraft/server/WorldGenLargeFeature.java b/net/minecraft/server/WorldGenLargeFeature.java index 8f9036325..61ff3137a 100644 --- a/net/minecraft/server/WorldGenLargeFeature.java +++ b/net/minecraft/server/WorldGenLargeFeature.java @@ -35,6 +35,10 @@ public WorldGenLargeFeature(Map map) { } } + public String a() { + return "Temple"; + } + protected boolean a(int i, int j) { int k = i; int l = j; @@ -75,7 +79,19 @@ protected StructureStart b(int i, int j) { return new WorldGenLargeFeatureStart(this.c, this.b, i, j); } - public List a() { + public boolean a(int i, int j, int k) { + StructureStart structurestart = this.c(i, j, k); + + if (structurestart != null && structurestart instanceof WorldGenLargeFeatureStart && !structurestart.a.isEmpty()) { + StructurePiece structurepiece = (StructurePiece) structurestart.a.getFirst(); + + return structurepiece instanceof WorldGenWitchHut; + } else { + return false; + } + } + + public List b() { return this.f; } } diff --git a/net/minecraft/server/WorldGenLargeFeatureStart.java b/net/minecraft/server/WorldGenLargeFeatureStart.java index 56a69b5b9..dd4730f88 100644 --- a/net/minecraft/server/WorldGenLargeFeatureStart.java +++ b/net/minecraft/server/WorldGenLargeFeatureStart.java @@ -4,7 +4,10 @@ public class WorldGenLargeFeatureStart extends StructureStart { + public WorldGenLargeFeatureStart() {} + public WorldGenLargeFeatureStart(World world, Random random, int i, int j) { + super(i, j); BiomeBase biomebase = world.getBiome(i * 16 + 8, j * 16 + 8); if (biomebase != BiomeBase.JUNGLE && biomebase != BiomeBase.JUNGLE_HILLS) { diff --git a/net/minecraft/server/WorldGenMineshaft.java b/net/minecraft/server/WorldGenMineshaft.java index 7eafd82d3..4fcefe3a2 100644 --- a/net/minecraft/server/WorldGenMineshaft.java +++ b/net/minecraft/server/WorldGenMineshaft.java @@ -10,6 +10,10 @@ public class WorldGenMineshaft extends StructureGenerator { public WorldGenMineshaft() {} + public String a() { + return "Mineshaft"; + } + public WorldGenMineshaft(Map map) { Iterator iterator = map.entrySet().iterator(); diff --git a/net/minecraft/server/WorldGenMineshaftCorridor.java b/net/minecraft/server/WorldGenMineshaftCorridor.java index 80f2710a1..6a1f26d6d 100644 --- a/net/minecraft/server/WorldGenMineshaftCorridor.java +++ b/net/minecraft/server/WorldGenMineshaftCorridor.java @@ -5,11 +5,27 @@ public class WorldGenMineshaftCorridor extends StructurePiece { - private final boolean a; - private final boolean b; + private boolean a; + private boolean b; private boolean c; private int d; + public WorldGenMineshaftCorridor() {} + + protected void a(NBTTagCompound nbttagcompound) { + nbttagcompound.setBoolean("hr", this.a); + nbttagcompound.setBoolean("sc", this.b); + nbttagcompound.setBoolean("hps", this.c); + nbttagcompound.setInt("Num", this.d); + } + + protected void b(NBTTagCompound nbttagcompound) { + this.a = nbttagcompound.getBoolean("hr"); + this.b = nbttagcompound.getBoolean("sc"); + this.c = nbttagcompound.getBoolean("hps"); + this.d = nbttagcompound.getInt("Num"); + } + public WorldGenMineshaftCorridor(int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(i); this.g = j; @@ -61,7 +77,7 @@ public static StructureBoundingBox a(List list, Random random, int i, int j, int } public void a(StructurePiece structurepiece, List list, Random random) { - int i = this.c(); + int i = this.d(); int j = random.nextInt(4); switch (this.g) { @@ -190,11 +206,11 @@ public boolean a(World world, Random random, StructureBoundingBox structurebound this.a(world, structureboundingbox, random, 0.05F, 1, 2, k - 1, Block.TORCH.id, 0); this.a(world, structureboundingbox, random, 0.05F, 1, 2, k + 1, Block.TORCH.id, 0); if (random.nextInt(100) == 0) { - this.a(world, structureboundingbox, random, 2, 0, k - 1, StructurePieceTreasure.a(WorldGenMineshaftPieces.a(), new StructurePieceTreasure[] { Item.ENCHANTED_BOOK.b(random)}), 3 + random.nextInt(4)); + this.a(world, structureboundingbox, random, 2, 0, k - 1, StructurePieceTreasure.a(WorldGenMineshaftPieces.b(), new StructurePieceTreasure[] { Item.ENCHANTED_BOOK.b(random)}), 3 + random.nextInt(4)); } if (random.nextInt(100) == 0) { - this.a(world, structureboundingbox, random, 0, 0, k + 1, StructurePieceTreasure.a(WorldGenMineshaftPieces.a(), new StructurePieceTreasure[] { Item.ENCHANTED_BOOK.b(random)}), 3 + random.nextInt(4)); + this.a(world, structureboundingbox, random, 0, 0, k + 1, StructurePieceTreasure.a(WorldGenMineshaftPieces.b(), new StructurePieceTreasure[] { Item.ENCHANTED_BOOK.b(random)}), 3 + random.nextInt(4)); } if (this.b && !this.c) { diff --git a/net/minecraft/server/WorldGenMineshaftCross.java b/net/minecraft/server/WorldGenMineshaftCross.java index 2252a12ce..bb4c9b0be 100644 --- a/net/minecraft/server/WorldGenMineshaftCross.java +++ b/net/minecraft/server/WorldGenMineshaftCross.java @@ -5,8 +5,20 @@ public class WorldGenMineshaftCross extends StructurePiece { - private final int a; - private final boolean b; + private int a; + private boolean b; + + public WorldGenMineshaftCross() {} + + protected void a(NBTTagCompound nbttagcompound) { + nbttagcompound.setBoolean("tf", this.b); + nbttagcompound.setInt("D", this.a); + } + + protected void b(NBTTagCompound nbttagcompound) { + this.b = nbttagcompound.getBoolean("tf"); + this.a = nbttagcompound.getInt("D"); + } public WorldGenMineshaftCross(int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(i); @@ -51,7 +63,7 @@ public static StructureBoundingBox a(List list, Random random, int i, int j, int } public void a(StructurePiece structurepiece, List list, Random random) { - int i = this.c(); + int i = this.d(); switch (this.a) { case 0: diff --git a/net/minecraft/server/WorldGenMineshaftPieces.java b/net/minecraft/server/WorldGenMineshaftPieces.java index 0e0ddf0ea..36ccd84e2 100644 --- a/net/minecraft/server/WorldGenMineshaftPieces.java +++ b/net/minecraft/server/WorldGenMineshaftPieces.java @@ -7,6 +7,13 @@ public class WorldGenMineshaftPieces { private static final StructurePieceTreasure[] a = new StructurePieceTreasure[] { new StructurePieceTreasure(Item.IRON_INGOT.id, 0, 1, 5, 10), new StructurePieceTreasure(Item.GOLD_INGOT.id, 0, 1, 3, 5), new StructurePieceTreasure(Item.REDSTONE.id, 0, 4, 9, 5), new StructurePieceTreasure(Item.INK_SACK.id, 4, 4, 9, 5), new StructurePieceTreasure(Item.DIAMOND.id, 0, 1, 2, 3), new StructurePieceTreasure(Item.COAL.id, 0, 3, 8, 10), new StructurePieceTreasure(Item.BREAD.id, 0, 1, 3, 15), new StructurePieceTreasure(Item.IRON_PICKAXE.id, 0, 1, 1, 1), new StructurePieceTreasure(Block.RAILS.id, 0, 4, 8, 1), new StructurePieceTreasure(Item.MELON_SEEDS.id, 0, 2, 4, 10), new StructurePieceTreasure(Item.PUMPKIN_SEEDS.id, 0, 2, 4, 10), new StructurePieceTreasure(Item.SADDLE.id, 0, 1, 1, 3), new StructurePieceTreasure(Item.HORSE_ARMOR_IRON.id, 0, 1, 1, 1)}; + public static void a() { + WorldGenFactory.a(WorldGenMineshaftCorridor.class, "MSCorridor"); + WorldGenFactory.a(WorldGenMineshaftCross.class, "MSCrossing"); + WorldGenFactory.a(WorldGenMineshaftRoom.class, "MSRoom"); + WorldGenFactory.a(WorldGenMineshaftStairs.class, "MSStairs"); + } + private static StructurePiece a(List list, Random random, int i, int j, int k, int l, int i1) { int j1 = random.nextInt(100); StructureBoundingBox structureboundingbox; @@ -34,7 +41,7 @@ private static StructurePiece a(List list, Random random, int i, int j, int k, i private static StructurePiece b(StructurePiece structurepiece, List list, Random random, int i, int j, int k, int l, int i1) { if (i1 > 8) { return null; - } else if (Math.abs(i - structurepiece.b().a) <= 80 && Math.abs(k - structurepiece.b().c) <= 80) { + } else if (Math.abs(i - structurepiece.c().a) <= 80 && Math.abs(k - structurepiece.c().c) <= 80) { StructurePiece structurepiece1 = a(list, random, i, j, k, l, i1 + 1); if (structurepiece1 != null) { @@ -52,7 +59,7 @@ static StructurePiece a(StructurePiece structurepiece, List list, Random random, return b(structurepiece, list, random, i, j, k, l, i1); } - static StructurePieceTreasure[] a() { + static StructurePieceTreasure[] b() { return a; } } diff --git a/net/minecraft/server/WorldGenMineshaftRoom.java b/net/minecraft/server/WorldGenMineshaftRoom.java index 605f155a2..568905f69 100644 --- a/net/minecraft/server/WorldGenMineshaftRoom.java +++ b/net/minecraft/server/WorldGenMineshaftRoom.java @@ -9,13 +9,15 @@ public class WorldGenMineshaftRoom extends StructurePiece { private List a = new LinkedList(); + public WorldGenMineshaftRoom() {} + public WorldGenMineshaftRoom(int i, Random random, int j, int k) { super(i); this.f = new StructureBoundingBox(j, 50, k, j + 7 + random.nextInt(6), 54 + random.nextInt(6), k + 7 + random.nextInt(6)); } public void a(StructurePiece structurepiece, List list, Random random) { - int i = this.c(); + int i = this.d(); int j = this.f.c() - 3 - 1; if (j <= 0) { @@ -34,7 +36,7 @@ public void a(StructurePiece structurepiece, List list, Random random) { structurepiece1 = WorldGenMineshaftPieces.a(structurepiece, list, random, this.f.a + k, this.f.b + random.nextInt(j) + 1, this.f.c - 1, 2, i); if (structurepiece1 != null) { - structureboundingbox = structurepiece1.b(); + structureboundingbox = structurepiece1.c(); this.a.add(new StructureBoundingBox(structureboundingbox.a, structureboundingbox.b, this.f.c, structureboundingbox.d, structureboundingbox.e, this.f.c + 1)); } } @@ -47,7 +49,7 @@ public void a(StructurePiece structurepiece, List list, Random random) { structurepiece1 = WorldGenMineshaftPieces.a(structurepiece, list, random, this.f.a + k, this.f.b + random.nextInt(j) + 1, this.f.f + 1, 0, i); if (structurepiece1 != null) { - structureboundingbox = structurepiece1.b(); + structureboundingbox = structurepiece1.c(); this.a.add(new StructureBoundingBox(structureboundingbox.a, structureboundingbox.b, this.f.f - 1, structureboundingbox.d, structureboundingbox.e, this.f.f)); } } @@ -60,7 +62,7 @@ public void a(StructurePiece structurepiece, List list, Random random) { structurepiece1 = WorldGenMineshaftPieces.a(structurepiece, list, random, this.f.a - 1, this.f.b + random.nextInt(j) + 1, this.f.c + k, 1, i); if (structurepiece1 != null) { - structureboundingbox = structurepiece1.b(); + structureboundingbox = structurepiece1.c(); this.a.add(new StructureBoundingBox(this.f.a, structureboundingbox.b, structureboundingbox.c, this.f.a + 1, structureboundingbox.e, structureboundingbox.f)); } } @@ -73,7 +75,7 @@ public void a(StructurePiece structurepiece, List list, Random random) { structurepiece1 = WorldGenMineshaftPieces.a(structurepiece, list, random, this.f.d + 1, this.f.b + random.nextInt(j) + 1, this.f.c + k, 3, i); if (structurepiece1 != null) { - structureboundingbox = structurepiece1.b(); + structureboundingbox = structurepiece1.c(); this.a.add(new StructureBoundingBox(this.f.d - 1, structureboundingbox.b, structureboundingbox.c, this.f.d, structureboundingbox.e, structureboundingbox.f)); } } @@ -97,4 +99,25 @@ public boolean a(World world, Random random, StructureBoundingBox structurebound return true; } } + + protected void a(NBTTagCompound nbttagcompound) { + NBTTagList nbttaglist = new NBTTagList("Entrances"); + Iterator iterator = this.a.iterator(); + + while (iterator.hasNext()) { + StructureBoundingBox structureboundingbox = (StructureBoundingBox) iterator.next(); + + nbttaglist.add(structureboundingbox.a("")); + } + + nbttagcompound.set("Entrances", nbttaglist); + } + + protected void b(NBTTagCompound nbttagcompound) { + NBTTagList nbttaglist = nbttagcompound.getList("Entrances"); + + for (int i = 0; i < nbttaglist.size(); ++i) { + this.a.add(new StructureBoundingBox(((NBTTagIntArray) nbttaglist.get(i)).data)); + } + } } diff --git a/net/minecraft/server/WorldGenMineshaftStairs.java b/net/minecraft/server/WorldGenMineshaftStairs.java index 1887e880b..c88bbd212 100644 --- a/net/minecraft/server/WorldGenMineshaftStairs.java +++ b/net/minecraft/server/WorldGenMineshaftStairs.java @@ -5,12 +5,18 @@ public class WorldGenMineshaftStairs extends StructurePiece { + public WorldGenMineshaftStairs() {} + public WorldGenMineshaftStairs(int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(i); this.g = j; this.f = structureboundingbox; } + protected void a(NBTTagCompound nbttagcompound) {} + + protected void b(NBTTagCompound nbttagcompound) {} + public static StructureBoundingBox a(List list, Random random, int i, int j, int k, int l) { StructureBoundingBox structureboundingbox = new StructureBoundingBox(i, j - 5, k, i, j + 2, k); @@ -39,7 +45,7 @@ public static StructureBoundingBox a(List list, Random random, int i, int j, int } public void a(StructurePiece structurepiece, List list, Random random) { - int i = this.c(); + int i = this.d(); switch (this.g) { case 0: diff --git a/net/minecraft/server/WorldGenMineshaftStart.java b/net/minecraft/server/WorldGenMineshaftStart.java index ce004663a..72066788d 100644 --- a/net/minecraft/server/WorldGenMineshaftStart.java +++ b/net/minecraft/server/WorldGenMineshaftStart.java @@ -5,7 +5,10 @@ public class WorldGenMineshaftStart extends StructureStart { + public WorldGenMineshaftStart() {} + public WorldGenMineshaftStart(World world, Random random, int i, int j) { + super(i, j); WorldGenMineshaftRoom worldgenmineshaftroom = new WorldGenMineshaftRoom(0, random, (i << 4) + 2, (j << 4) + 2); this.a.add(worldgenmineshaftroom); diff --git a/net/minecraft/server/WorldGenNether.java b/net/minecraft/server/WorldGenNether.java index 53975a567..5e7cd2d38 100644 --- a/net/minecraft/server/WorldGenNether.java +++ b/net/minecraft/server/WorldGenNether.java @@ -14,7 +14,11 @@ public WorldGenNether() { this.e.add(new BiomeMeta(EntityMagmaCube.class, 3, 4, 4)); } - public List a() { + public String a() { + return "Fortress"; + } + + public List b() { return this.e; } diff --git a/net/minecraft/server/WorldGenNetherPiece.java b/net/minecraft/server/WorldGenNetherPiece.java index 9dd7d91cf..88b33f2c3 100644 --- a/net/minecraft/server/WorldGenNetherPiece.java +++ b/net/minecraft/server/WorldGenNetherPiece.java @@ -8,10 +8,16 @@ abstract class WorldGenNetherPiece extends StructurePiece { protected static final StructurePieceTreasure[] a = new StructurePieceTreasure[] { new StructurePieceTreasure(Item.DIAMOND.id, 0, 1, 3, 5), new StructurePieceTreasure(Item.IRON_INGOT.id, 0, 1, 5, 5), new StructurePieceTreasure(Item.GOLD_INGOT.id, 0, 1, 3, 15), new StructurePieceTreasure(Item.GOLD_SWORD.id, 0, 1, 1, 5), new StructurePieceTreasure(Item.GOLD_CHESTPLATE.id, 0, 1, 1, 5), new StructurePieceTreasure(Item.FLINT_AND_STEEL.id, 0, 1, 1, 5), new StructurePieceTreasure(Item.NETHER_STALK.id, 0, 3, 7, 5), new StructurePieceTreasure(Item.SADDLE.id, 0, 1, 1, 10), new StructurePieceTreasure(Item.HORSE_ARMOR_GOLD.id, 0, 1, 1, 8), new StructurePieceTreasure(Item.HORSE_ARMOR_IRON.id, 0, 1, 1, 5), new StructurePieceTreasure(Item.HORSE_ARMOR_DIAMOND.id, 0, 1, 1, 3)}; + public WorldGenNetherPiece() {} + protected WorldGenNetherPiece(int i) { super(i); } + protected void b(NBTTagCompound nbttagcompound) {} + + protected void a(NBTTagCompound nbttagcompound) {} + private int a(List list) { boolean flag = false; int i = 0; @@ -66,7 +72,7 @@ private WorldGenNetherPiece a(WorldGenNetherPiece15 worldgennetherpiece15, List } private StructurePiece a(WorldGenNetherPiece15 worldgennetherpiece15, List list, Random random, int i, int j, int k, int l, int i1, boolean flag) { - if (Math.abs(i - worldgennetherpiece15.b().a) <= 112 && Math.abs(k - worldgennetherpiece15.b().c) <= 112) { + if (Math.abs(i - worldgennetherpiece15.c().a) <= 112 && Math.abs(k - worldgennetherpiece15.c().c) <= 112) { List list1 = worldgennetherpiece15.c; if (flag) { @@ -89,16 +95,16 @@ private StructurePiece a(WorldGenNetherPiece15 worldgennetherpiece15, List list, protected StructurePiece a(WorldGenNetherPiece15 worldgennetherpiece15, List list, Random random, int i, int j, boolean flag) { switch (this.g) { case 0: - return this.a(worldgennetherpiece15, list, random, this.f.a + i, this.f.b + j, this.f.f + 1, this.g, this.c(), flag); + return this.a(worldgennetherpiece15, list, random, this.f.a + i, this.f.b + j, this.f.f + 1, this.g, this.d(), flag); case 1: - return this.a(worldgennetherpiece15, list, random, this.f.a - 1, this.f.b + j, this.f.c + i, this.g, this.c(), flag); + return this.a(worldgennetherpiece15, list, random, this.f.a - 1, this.f.b + j, this.f.c + i, this.g, this.d(), flag); case 2: - return this.a(worldgennetherpiece15, list, random, this.f.a + i, this.f.b + j, this.f.c - 1, this.g, this.c(), flag); + return this.a(worldgennetherpiece15, list, random, this.f.a + i, this.f.b + j, this.f.c - 1, this.g, this.d(), flag); case 3: - return this.a(worldgennetherpiece15, list, random, this.f.d + 1, this.f.b + j, this.f.c + i, this.g, this.c(), flag); + return this.a(worldgennetherpiece15, list, random, this.f.d + 1, this.f.b + j, this.f.c + i, this.g, this.d(), flag); default: return null; @@ -108,16 +114,16 @@ protected StructurePiece a(WorldGenNetherPiece15 worldgennetherpiece15, List lis protected StructurePiece b(WorldGenNetherPiece15 worldgennetherpiece15, List list, Random random, int i, int j, boolean flag) { switch (this.g) { case 0: - return this.a(worldgennetherpiece15, list, random, this.f.a - 1, this.f.b + i, this.f.c + j, 1, this.c(), flag); + return this.a(worldgennetherpiece15, list, random, this.f.a - 1, this.f.b + i, this.f.c + j, 1, this.d(), flag); case 1: - return this.a(worldgennetherpiece15, list, random, this.f.a + j, this.f.b + i, this.f.c - 1, 2, this.c(), flag); + return this.a(worldgennetherpiece15, list, random, this.f.a + j, this.f.b + i, this.f.c - 1, 2, this.d(), flag); case 2: - return this.a(worldgennetherpiece15, list, random, this.f.a - 1, this.f.b + i, this.f.c + j, 1, this.c(), flag); + return this.a(worldgennetherpiece15, list, random, this.f.a - 1, this.f.b + i, this.f.c + j, 1, this.d(), flag); case 3: - return this.a(worldgennetherpiece15, list, random, this.f.a + j, this.f.b + i, this.f.c - 1, 2, this.c(), flag); + return this.a(worldgennetherpiece15, list, random, this.f.a + j, this.f.b + i, this.f.c - 1, 2, this.d(), flag); default: return null; @@ -127,16 +133,16 @@ protected StructurePiece b(WorldGenNetherPiece15 worldgennetherpiece15, List lis protected StructurePiece c(WorldGenNetherPiece15 worldgennetherpiece15, List list, Random random, int i, int j, boolean flag) { switch (this.g) { case 0: - return this.a(worldgennetherpiece15, list, random, this.f.d + 1, this.f.b + i, this.f.c + j, 3, this.c(), flag); + return this.a(worldgennetherpiece15, list, random, this.f.d + 1, this.f.b + i, this.f.c + j, 3, this.d(), flag); case 1: - return this.a(worldgennetherpiece15, list, random, this.f.a + j, this.f.b + i, this.f.f + 1, 0, this.c(), flag); + return this.a(worldgennetherpiece15, list, random, this.f.a + j, this.f.b + i, this.f.f + 1, 0, this.d(), flag); case 2: - return this.a(worldgennetherpiece15, list, random, this.f.d + 1, this.f.b + i, this.f.c + j, 3, this.c(), flag); + return this.a(worldgennetherpiece15, list, random, this.f.d + 1, this.f.b + i, this.f.c + j, 3, this.d(), flag); case 3: - return this.a(worldgennetherpiece15, list, random, this.f.a + j, this.f.b + i, this.f.f + 1, 0, this.c(), flag); + return this.a(worldgennetherpiece15, list, random, this.f.a + j, this.f.b + i, this.f.f + 1, 0, this.d(), flag); default: return null; diff --git a/net/minecraft/server/WorldGenNetherPiece1.java b/net/minecraft/server/WorldGenNetherPiece1.java index 1fe173ae4..76372b256 100644 --- a/net/minecraft/server/WorldGenNetherPiece1.java +++ b/net/minecraft/server/WorldGenNetherPiece1.java @@ -5,6 +5,8 @@ public class WorldGenNetherPiece1 extends WorldGenNetherPiece { + public WorldGenNetherPiece1() {} + public WorldGenNetherPiece1(int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(i); this.g = j; diff --git a/net/minecraft/server/WorldGenNetherPiece10.java b/net/minecraft/server/WorldGenNetherPiece10.java index abbc8519a..51fec8711 100644 --- a/net/minecraft/server/WorldGenNetherPiece10.java +++ b/net/minecraft/server/WorldGenNetherPiece10.java @@ -7,6 +7,8 @@ public class WorldGenNetherPiece10 extends WorldGenNetherPiece { private boolean b; + public WorldGenNetherPiece10() {} + public WorldGenNetherPiece10(int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(i); this.g = j; @@ -14,6 +16,16 @@ public WorldGenNetherPiece10(int i, Random random, StructureBoundingBox structur this.b = random.nextInt(3) == 0; } + protected void b(NBTTagCompound nbttagcompound) { + super.b(nbttagcompound); + this.b = nbttagcompound.getBoolean("Chest"); + } + + protected void a(NBTTagCompound nbttagcompound) { + super.a(nbttagcompound); + nbttagcompound.setBoolean("Chest", this.b); + } + public void a(StructurePiece structurepiece, List list, Random random) { this.c((WorldGenNetherPiece15) structurepiece, list, random, 0, 1, true); } diff --git a/net/minecraft/server/WorldGenNetherPiece11.java b/net/minecraft/server/WorldGenNetherPiece11.java index 0b6becdc9..be55c0239 100644 --- a/net/minecraft/server/WorldGenNetherPiece11.java +++ b/net/minecraft/server/WorldGenNetherPiece11.java @@ -5,6 +5,8 @@ public class WorldGenNetherPiece11 extends WorldGenNetherPiece { + public WorldGenNetherPiece11() {} + public WorldGenNetherPiece11(int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(i); this.g = j; diff --git a/net/minecraft/server/WorldGenNetherPiece12.java b/net/minecraft/server/WorldGenNetherPiece12.java index 02d76566a..7eb9838e5 100644 --- a/net/minecraft/server/WorldGenNetherPiece12.java +++ b/net/minecraft/server/WorldGenNetherPiece12.java @@ -7,12 +7,24 @@ public class WorldGenNetherPiece12 extends WorldGenNetherPiece { private boolean b; + public WorldGenNetherPiece12() {} + public WorldGenNetherPiece12(int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(i); this.g = j; this.f = structureboundingbox; } + protected void b(NBTTagCompound nbttagcompound) { + super.b(nbttagcompound); + this.b = nbttagcompound.getBoolean("Mob"); + } + + protected void a(NBTTagCompound nbttagcompound) { + super.a(nbttagcompound); + nbttagcompound.setBoolean("Mob", this.b); + } + public static WorldGenNetherPiece12 a(List list, Random random, int i, int j, int k, int l, int i1) { StructureBoundingBox structureboundingbox = StructureBoundingBox.a(i, j, k, -2, 0, 0, 7, 8, 9, l); diff --git a/net/minecraft/server/WorldGenNetherPiece13.java b/net/minecraft/server/WorldGenNetherPiece13.java index 63e638e1d..a52390433 100644 --- a/net/minecraft/server/WorldGenNetherPiece13.java +++ b/net/minecraft/server/WorldGenNetherPiece13.java @@ -5,6 +5,8 @@ public class WorldGenNetherPiece13 extends WorldGenNetherPiece { + public WorldGenNetherPiece13() {} + public WorldGenNetherPiece13(int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(i); this.g = j; diff --git a/net/minecraft/server/WorldGenNetherPiece15.java b/net/minecraft/server/WorldGenNetherPiece15.java index 8161a3d19..8babd2374 100644 --- a/net/minecraft/server/WorldGenNetherPiece15.java +++ b/net/minecraft/server/WorldGenNetherPiece15.java @@ -7,13 +7,16 @@ public class WorldGenNetherPiece15 extends WorldGenNetherPiece1 { public WorldGenNetherPieceWeight b; - public List c = new ArrayList(); + public List c; public List d; public ArrayList e = new ArrayList(); + public WorldGenNetherPiece15() {} + public WorldGenNetherPiece15(Random random, int i, int j) { super(random, i, j); - WorldGenNetherPieceWeight[] aworldgennetherpieceweight = WorldGenNetherPieces.a(); + this.c = new ArrayList(); + WorldGenNetherPieceWeight[] aworldgennetherpieceweight = WorldGenNetherPieces.b(); int k = aworldgennetherpieceweight.length; int l; @@ -26,7 +29,7 @@ public WorldGenNetherPiece15(Random random, int i, int j) { } this.d = new ArrayList(); - aworldgennetherpieceweight = WorldGenNetherPieces.b(); + aworldgennetherpieceweight = WorldGenNetherPieces.c(); k = aworldgennetherpieceweight.length; for (l = 0; l < k; ++l) { @@ -35,4 +38,12 @@ public WorldGenNetherPiece15(Random random, int i, int j) { this.d.add(worldgennetherpieceweight); } } + + protected void b(NBTTagCompound nbttagcompound) { + super.b(nbttagcompound); + } + + protected void a(NBTTagCompound nbttagcompound) { + super.a(nbttagcompound); + } } diff --git a/net/minecraft/server/WorldGenNetherPiece16.java b/net/minecraft/server/WorldGenNetherPiece16.java index ede2529d2..c942b865b 100644 --- a/net/minecraft/server/WorldGenNetherPiece16.java +++ b/net/minecraft/server/WorldGenNetherPiece16.java @@ -5,6 +5,8 @@ public class WorldGenNetherPiece16 extends WorldGenNetherPiece { + public WorldGenNetherPiece16() {} + public WorldGenNetherPiece16(int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(i); this.g = j; diff --git a/net/minecraft/server/WorldGenNetherPiece2.java b/net/minecraft/server/WorldGenNetherPiece2.java index be2b33061..ff627a9fd 100644 --- a/net/minecraft/server/WorldGenNetherPiece2.java +++ b/net/minecraft/server/WorldGenNetherPiece2.java @@ -7,6 +7,8 @@ public class WorldGenNetherPiece2 extends WorldGenNetherPiece { private int b; + public WorldGenNetherPiece2() {} + public WorldGenNetherPiece2(int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(i); this.g = j; @@ -20,6 +22,16 @@ public static WorldGenNetherPiece2 a(List list, Random random, int i, int j, int return a(structureboundingbox) && StructurePiece.a(list, structureboundingbox) == null ? new WorldGenNetherPiece2(i1, random, structureboundingbox, l) : null; } + protected void b(NBTTagCompound nbttagcompound) { + super.b(nbttagcompound); + this.b = nbttagcompound.getInt("Seed"); + } + + protected void a(NBTTagCompound nbttagcompound) { + super.a(nbttagcompound); + nbttagcompound.setInt("Seed", this.b); + } + public boolean a(World world, Random random, StructureBoundingBox structureboundingbox) { Random random1 = new Random((long) this.b); diff --git a/net/minecraft/server/WorldGenNetherPiece3.java b/net/minecraft/server/WorldGenNetherPiece3.java index b5692f382..0ee772eb0 100644 --- a/net/minecraft/server/WorldGenNetherPiece3.java +++ b/net/minecraft/server/WorldGenNetherPiece3.java @@ -5,6 +5,8 @@ public class WorldGenNetherPiece3 extends WorldGenNetherPiece { + public WorldGenNetherPiece3() {} + public WorldGenNetherPiece3(int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(i); this.g = j; diff --git a/net/minecraft/server/WorldGenNetherPiece4.java b/net/minecraft/server/WorldGenNetherPiece4.java index 28b2a3467..a4daeb9dd 100644 --- a/net/minecraft/server/WorldGenNetherPiece4.java +++ b/net/minecraft/server/WorldGenNetherPiece4.java @@ -5,6 +5,8 @@ public class WorldGenNetherPiece4 extends WorldGenNetherPiece { + public WorldGenNetherPiece4() {} + public WorldGenNetherPiece4(int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(i); this.g = j; diff --git a/net/minecraft/server/WorldGenNetherPiece5.java b/net/minecraft/server/WorldGenNetherPiece5.java index 383e2b200..f3906157e 100644 --- a/net/minecraft/server/WorldGenNetherPiece5.java +++ b/net/minecraft/server/WorldGenNetherPiece5.java @@ -5,6 +5,8 @@ public class WorldGenNetherPiece5 extends WorldGenNetherPiece { + public WorldGenNetherPiece5() {} + public WorldGenNetherPiece5(int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(i); this.g = j; diff --git a/net/minecraft/server/WorldGenNetherPiece6.java b/net/minecraft/server/WorldGenNetherPiece6.java index f8dae03d5..72dac904d 100644 --- a/net/minecraft/server/WorldGenNetherPiece6.java +++ b/net/minecraft/server/WorldGenNetherPiece6.java @@ -5,6 +5,8 @@ public class WorldGenNetherPiece6 extends WorldGenNetherPiece { + public WorldGenNetherPiece6() {} + public WorldGenNetherPiece6(int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(i); this.g = j; diff --git a/net/minecraft/server/WorldGenNetherPiece7.java b/net/minecraft/server/WorldGenNetherPiece7.java index 94e73a09c..510b954d6 100644 --- a/net/minecraft/server/WorldGenNetherPiece7.java +++ b/net/minecraft/server/WorldGenNetherPiece7.java @@ -5,6 +5,8 @@ public class WorldGenNetherPiece7 extends WorldGenNetherPiece { + public WorldGenNetherPiece7() {} + public WorldGenNetherPiece7(int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(i); this.g = j; diff --git a/net/minecraft/server/WorldGenNetherPiece8.java b/net/minecraft/server/WorldGenNetherPiece8.java index fd12b45e9..0d27ff109 100644 --- a/net/minecraft/server/WorldGenNetherPiece8.java +++ b/net/minecraft/server/WorldGenNetherPiece8.java @@ -7,6 +7,8 @@ public class WorldGenNetherPiece8 extends WorldGenNetherPiece { private boolean b; + public WorldGenNetherPiece8() {} + public WorldGenNetherPiece8(int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(i); this.g = j; @@ -14,6 +16,16 @@ public WorldGenNetherPiece8(int i, Random random, StructureBoundingBox structure this.b = random.nextInt(3) == 0; } + protected void b(NBTTagCompound nbttagcompound) { + super.b(nbttagcompound); + this.b = nbttagcompound.getBoolean("Chest"); + } + + protected void a(NBTTagCompound nbttagcompound) { + super.a(nbttagcompound); + nbttagcompound.setBoolean("Chest", this.b); + } + public void a(StructurePiece structurepiece, List list, Random random) { this.b((WorldGenNetherPiece15) structurepiece, list, random, 0, 1, true); } diff --git a/net/minecraft/server/WorldGenNetherPiece9.java b/net/minecraft/server/WorldGenNetherPiece9.java index 2b52f7cde..dbe5f03e0 100644 --- a/net/minecraft/server/WorldGenNetherPiece9.java +++ b/net/minecraft/server/WorldGenNetherPiece9.java @@ -5,6 +5,8 @@ public class WorldGenNetherPiece9 extends WorldGenNetherPiece { + public WorldGenNetherPiece9() {} + public WorldGenNetherPiece9(int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(i); this.g = j; diff --git a/net/minecraft/server/WorldGenNetherPieces.java b/net/minecraft/server/WorldGenNetherPieces.java index 6e91fa115..e9f33e065 100644 --- a/net/minecraft/server/WorldGenNetherPieces.java +++ b/net/minecraft/server/WorldGenNetherPieces.java @@ -8,6 +8,24 @@ public class WorldGenNetherPieces { private static final WorldGenNetherPieceWeight[] a = new WorldGenNetherPieceWeight[] { new WorldGenNetherPieceWeight(WorldGenNetherPiece3.class, 30, 0, true), new WorldGenNetherPieceWeight(WorldGenNetherPiece1.class, 10, 4), new WorldGenNetherPieceWeight(WorldGenNetherPiece13.class, 10, 4), new WorldGenNetherPieceWeight(WorldGenNetherPiece16.class, 10, 3), new WorldGenNetherPieceWeight(WorldGenNetherPiece12.class, 5, 2), new WorldGenNetherPieceWeight(WorldGenNetherPiece6.class, 5, 1)}; private static final WorldGenNetherPieceWeight[] b = new WorldGenNetherPieceWeight[] { new WorldGenNetherPieceWeight(WorldGenNetherPiece9.class, 25, 0, true), new WorldGenNetherPieceWeight(WorldGenNetherPiece7.class, 15, 5), new WorldGenNetherPieceWeight(WorldGenNetherPiece10.class, 5, 10), new WorldGenNetherPieceWeight(WorldGenNetherPiece8.class, 5, 10), new WorldGenNetherPieceWeight(WorldGenNetherPiece4.class, 10, 3, true), new WorldGenNetherPieceWeight(WorldGenNetherPiece5.class, 7, 2), new WorldGenNetherPieceWeight(WorldGenNetherPiece11.class, 5, 2)}; + public static void a() { + WorldGenFactory.a(WorldGenNetherPiece1.class, "NeBCr"); + WorldGenFactory.a(WorldGenNetherPiece2.class, "NeBEF"); + WorldGenFactory.a(WorldGenNetherPiece3.class, "NeBS"); + WorldGenFactory.a(WorldGenNetherPiece4.class, "NeCCS"); + WorldGenFactory.a(WorldGenNetherPiece5.class, "NeCTB"); + WorldGenFactory.a(WorldGenNetherPiece6.class, "NeCE"); + WorldGenFactory.a(WorldGenNetherPiece7.class, "NeSCSC"); + WorldGenFactory.a(WorldGenNetherPiece8.class, "NeSCLT"); + WorldGenFactory.a(WorldGenNetherPiece9.class, "NeSC"); + WorldGenFactory.a(WorldGenNetherPiece10.class, "NeSCRT"); + WorldGenFactory.a(WorldGenNetherPiece11.class, "NeCSR"); + WorldGenFactory.a(WorldGenNetherPiece12.class, "NeMT"); + WorldGenFactory.a(WorldGenNetherPiece13.class, "NeRC"); + WorldGenFactory.a(WorldGenNetherPiece16.class, "NeSR"); + WorldGenFactory.a(WorldGenNetherPiece15.class, "NeStart"); + } + private static WorldGenNetherPiece b(WorldGenNetherPieceWeight worldgennetherpieceweight, List list, Random random, int i, int j, int k, int l, int i1) { Class oclass = worldgennetherpieceweight.a; Object object = null; @@ -47,11 +65,11 @@ static WorldGenNetherPiece a(WorldGenNetherPieceWeight worldgennetherpieceweight return b(worldgennetherpieceweight, list, random, i, j, k, l, i1); } - static WorldGenNetherPieceWeight[] a() { + static WorldGenNetherPieceWeight[] b() { return a; } - static WorldGenNetherPieceWeight[] b() { + static WorldGenNetherPieceWeight[] c() { return b; } } diff --git a/net/minecraft/server/WorldGenNetherStart.java b/net/minecraft/server/WorldGenNetherStart.java index 9e0258a28..ea8790248 100644 --- a/net/minecraft/server/WorldGenNetherStart.java +++ b/net/minecraft/server/WorldGenNetherStart.java @@ -4,9 +4,12 @@ import java.util.List; import java.util.Random; -class WorldGenNetherStart extends StructureStart { +public class WorldGenNetherStart extends StructureStart { + + public WorldGenNetherStart() {} public WorldGenNetherStart(World world, Random random, int i, int j) { + super(i, j); WorldGenNetherPiece15 worldgennetherpiece15 = new WorldGenNetherPiece15(random, (i << 4) + 2, (j << 4) + 2); this.a.add(worldgennetherpiece15); diff --git a/net/minecraft/server/WorldGenPyramidPiece.java b/net/minecraft/server/WorldGenPyramidPiece.java index cf70712a2..b0ed6dc91 100644 --- a/net/minecraft/server/WorldGenPyramidPiece.java +++ b/net/minecraft/server/WorldGenPyramidPiece.java @@ -7,10 +7,28 @@ public class WorldGenPyramidPiece extends WorldGenScatteredPiece { private boolean[] e = new boolean[4]; private static final StructurePieceTreasure[] i = new StructurePieceTreasure[] { new StructurePieceTreasure(Item.DIAMOND.id, 0, 1, 3, 3), new StructurePieceTreasure(Item.IRON_INGOT.id, 0, 1, 5, 10), new StructurePieceTreasure(Item.GOLD_INGOT.id, 0, 2, 7, 15), new StructurePieceTreasure(Item.EMERALD.id, 0, 1, 3, 2), new StructurePieceTreasure(Item.BONE.id, 0, 4, 6, 20), new StructurePieceTreasure(Item.ROTTEN_FLESH.id, 0, 3, 7, 16), new StructurePieceTreasure(Item.SADDLE.id, 0, 1, 1, 3), new StructurePieceTreasure(Item.HORSE_ARMOR_IRON.id, 0, 1, 1, 1), new StructurePieceTreasure(Item.HORSE_ARMOR_GOLD.id, 0, 1, 1, 1), new StructurePieceTreasure(Item.HORSE_ARMOR_DIAMOND.id, 0, 1, 1, 1)}; + public WorldGenPyramidPiece() {} + public WorldGenPyramidPiece(Random random, int i, int j) { super(random, i, 64, j, 21, 15, 21); } + protected void a(NBTTagCompound nbttagcompound) { + super.a(nbttagcompound); + nbttagcompound.setBoolean("hasPlacedChest0", this.e[0]); + nbttagcompound.setBoolean("hasPlacedChest1", this.e[1]); + nbttagcompound.setBoolean("hasPlacedChest2", this.e[2]); + nbttagcompound.setBoolean("hasPlacedChest3", this.e[3]); + } + + protected void b(NBTTagCompound nbttagcompound) { + super.b(nbttagcompound); + this.e[0] = nbttagcompound.getBoolean("hasPlacedChest0"); + this.e[1] = nbttagcompound.getBoolean("hasPlacedChest1"); + this.e[2] = nbttagcompound.getBoolean("hasPlacedChest2"); + this.e[3] = nbttagcompound.getBoolean("hasPlacedChest3"); + } + public boolean a(World world, Random random, StructureBoundingBox structureboundingbox) { this.a(world, structureboundingbox, 0, -4, 0, this.a - 1, 0, this.c - 1, Block.SANDSTONE.id, Block.SANDSTONE.id, false); diff --git a/net/minecraft/server/WorldGenRegistration.java b/net/minecraft/server/WorldGenRegistration.java new file mode 100644 index 000000000..186695d08 --- /dev/null +++ b/net/minecraft/server/WorldGenRegistration.java @@ -0,0 +1,10 @@ +package net.minecraft.server; + +public class WorldGenRegistration { + + public static void a() { + WorldGenFactory.a(WorldGenPyramidPiece.class, "TeDP"); + WorldGenFactory.a(WorldGenJungleTemple.class, "TeJP"); + WorldGenFactory.a(WorldGenWitchHut.class, "TeSH"); + } +} diff --git a/net/minecraft/server/WorldGenScatteredPiece.java b/net/minecraft/server/WorldGenScatteredPiece.java index 2246d2482..755948c86 100644 --- a/net/minecraft/server/WorldGenScatteredPiece.java +++ b/net/minecraft/server/WorldGenScatteredPiece.java @@ -4,11 +4,13 @@ abstract class WorldGenScatteredPiece extends StructurePiece { - protected final int a; - protected final int b; - protected final int c; + protected int a; + protected int b; + protected int c; protected int d = -1; + public WorldGenScatteredPiece() {} + protected WorldGenScatteredPiece(Random random, int i, int j, int k, int l, int i1, int j1) { super(0); this.a = l; @@ -26,6 +28,20 @@ protected WorldGenScatteredPiece(Random random, int i, int j, int k, int l, int } } + protected void a(NBTTagCompound nbttagcompound) { + nbttagcompound.setInt("Width", this.a); + nbttagcompound.setInt("Height", this.b); + nbttagcompound.setInt("Depth", this.c); + nbttagcompound.setInt("HPos", this.d); + } + + protected void b(NBTTagCompound nbttagcompound) { + this.a = nbttagcompound.getInt("Width"); + this.b = nbttagcompound.getInt("Height"); + this.c = nbttagcompound.getInt("Depth"); + this.d = nbttagcompound.getInt("HPos"); + } + protected boolean a(World world, StructureBoundingBox structureboundingbox, int i) { if (this.d >= 0) { return true; diff --git a/net/minecraft/server/WorldGenStronghold.java b/net/minecraft/server/WorldGenStronghold.java index 458380cbe..8bdd5b21f 100644 --- a/net/minecraft/server/WorldGenStronghold.java +++ b/net/minecraft/server/WorldGenStronghold.java @@ -43,6 +43,10 @@ public WorldGenStronghold(Map map) { } } + public String a() { + return "Stronghold"; + } + protected boolean a(int i, int j) { if (!this.f) { Random random = new Random(); diff --git a/net/minecraft/server/WorldGenStronghold2Start.java b/net/minecraft/server/WorldGenStronghold2Start.java index 170901ad5..ac2f34dcb 100644 --- a/net/minecraft/server/WorldGenStronghold2Start.java +++ b/net/minecraft/server/WorldGenStronghold2Start.java @@ -3,10 +3,13 @@ import java.util.List; import java.util.Random; -class WorldGenStronghold2Start extends StructureStart { +public class WorldGenStronghold2Start extends StructureStart { + + public WorldGenStronghold2Start() {} public WorldGenStronghold2Start(World world, Random random, int i, int j) { - WorldGenStrongholdPieces.a(); + super(i, j); + WorldGenStrongholdPieces.b(); WorldGenStrongholdStart worldgenstrongholdstart = new WorldGenStrongholdStart(0, random, (i << 4) + 2, (j << 4) + 2); this.a.add(worldgenstrongholdstart); diff --git a/net/minecraft/server/WorldGenStrongholdChestCorridor.java b/net/minecraft/server/WorldGenStrongholdChestCorridor.java index 54368e2e8..ba84675e2 100644 --- a/net/minecraft/server/WorldGenStrongholdChestCorridor.java +++ b/net/minecraft/server/WorldGenStrongholdChestCorridor.java @@ -6,16 +6,27 @@ public class WorldGenStrongholdChestCorridor extends WorldGenStrongholdPiece { private static final StructurePieceTreasure[] a = new StructurePieceTreasure[] { new StructurePieceTreasure(Item.ENDER_PEARL.id, 0, 1, 1, 10), new StructurePieceTreasure(Item.DIAMOND.id, 0, 1, 3, 3), new StructurePieceTreasure(Item.IRON_INGOT.id, 0, 1, 5, 10), new StructurePieceTreasure(Item.GOLD_INGOT.id, 0, 1, 3, 5), new StructurePieceTreasure(Item.REDSTONE.id, 0, 4, 9, 5), new StructurePieceTreasure(Item.BREAD.id, 0, 1, 3, 15), new StructurePieceTreasure(Item.APPLE.id, 0, 1, 3, 15), new StructurePieceTreasure(Item.IRON_PICKAXE.id, 0, 1, 1, 5), new StructurePieceTreasure(Item.IRON_SWORD.id, 0, 1, 1, 5), new StructurePieceTreasure(Item.IRON_CHESTPLATE.id, 0, 1, 1, 5), new StructurePieceTreasure(Item.IRON_HELMET.id, 0, 1, 1, 5), new StructurePieceTreasure(Item.IRON_LEGGINGS.id, 0, 1, 1, 5), new StructurePieceTreasure(Item.IRON_BOOTS.id, 0, 1, 1, 5), new StructurePieceTreasure(Item.GOLDEN_APPLE.id, 0, 1, 1, 1), new StructurePieceTreasure(Item.SADDLE.id, 0, 1, 1, 1), new StructurePieceTreasure(Item.HORSE_ARMOR_IRON.id, 0, 1, 1, 1), new StructurePieceTreasure(Item.HORSE_ARMOR_GOLD.id, 0, 1, 1, 1), new StructurePieceTreasure(Item.HORSE_ARMOR_DIAMOND.id, 0, 1, 1, 1)}; - private final WorldGenStrongholdDoorType b; - private boolean c; + private boolean b; + + public WorldGenStrongholdChestCorridor() {} public WorldGenStrongholdChestCorridor(int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(i); this.g = j; - this.b = this.a(random); + this.d = this.a(random); this.f = structureboundingbox; } + protected void a(NBTTagCompound nbttagcompound) { + super.a(nbttagcompound); + nbttagcompound.setBoolean("Chest", this.b); + } + + protected void b(NBTTagCompound nbttagcompound) { + super.b(nbttagcompound); + this.b = nbttagcompound.getBoolean("Chest"); + } + public void a(StructurePiece structurepiece, List list, Random random) { this.a((WorldGenStrongholdStart) structurepiece, list, random, 1, 1); } @@ -30,8 +41,8 @@ public boolean a(World world, Random random, StructureBoundingBox structurebound if (this.a(world, structureboundingbox)) { return false; } else { - this.a(world, structureboundingbox, 0, 0, 0, 4, 4, 6, true, random, WorldGenStrongholdPieces.b()); - this.a(world, random, structureboundingbox, this.b, 1, 1, 0); + this.a(world, structureboundingbox, 0, 0, 0, 4, 4, 6, true, random, WorldGenStrongholdPieces.c()); + this.a(world, random, structureboundingbox, this.d, 1, 1, 0); this.a(world, random, structureboundingbox, WorldGenStrongholdDoorType.a, 1, 1, 6); this.a(world, structureboundingbox, 3, 1, 2, 3, 1, 4, Block.SMOOTH_BRICK.id, Block.SMOOTH_BRICK.id, false); this.a(world, Block.STEP.id, 5, 3, 1, 1, structureboundingbox); @@ -45,13 +56,13 @@ public boolean a(World world, Random random, StructureBoundingBox structurebound this.a(world, Block.STEP.id, 5, 2, 1, i, structureboundingbox); } - if (!this.c) { + if (!this.b) { i = this.a(2); int j = this.a(3, 3); int k = this.b(3, 3); if (structureboundingbox.b(j, i, k)) { - this.c = true; + this.b = true; this.a(world, structureboundingbox, random, 3, 2, 3, StructurePieceTreasure.a(a, new StructurePieceTreasure[] { Item.ENCHANTED_BOOK.b(random)}), 2 + random.nextInt(2)); } } diff --git a/net/minecraft/server/WorldGenStrongholdCorridor.java b/net/minecraft/server/WorldGenStrongholdCorridor.java index b804f98eb..c5cbea072 100644 --- a/net/minecraft/server/WorldGenStrongholdCorridor.java +++ b/net/minecraft/server/WorldGenStrongholdCorridor.java @@ -5,7 +5,9 @@ public class WorldGenStrongholdCorridor extends WorldGenStrongholdPiece { - private final int a; + private int a; + + public WorldGenStrongholdCorridor() {} public WorldGenStrongholdCorridor(int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(i); @@ -14,6 +16,16 @@ public WorldGenStrongholdCorridor(int i, Random random, StructureBoundingBox str this.a = j != 2 && j != 0 ? structureboundingbox.b() : structureboundingbox.d(); } + protected void a(NBTTagCompound nbttagcompound) { + super.a(nbttagcompound); + nbttagcompound.setInt("Steps", this.a); + } + + protected void b(NBTTagCompound nbttagcompound) { + super.b(nbttagcompound); + this.a = nbttagcompound.getInt("Steps"); + } + public static StructureBoundingBox a(List list, Random random, int i, int j, int k, int l) { boolean flag = true; StructureBoundingBox structureboundingbox = StructureBoundingBox.a(i, j, k, -1, -1, 0, 5, 5, 4, l); @@ -22,10 +34,10 @@ public static StructureBoundingBox a(List list, Random random, int i, int j, int if (structurepiece == null) { return null; } else { - if (structurepiece.b().b == structureboundingbox.b) { + if (structurepiece.c().b == structureboundingbox.b) { for (int i1 = 3; i1 >= 1; --i1) { structureboundingbox = StructureBoundingBox.a(i, j, k, -1, -1, 0, 5, 5, i1 - 1, l); - if (!structurepiece.b().a(structureboundingbox)) { + if (!structurepiece.c().a(structureboundingbox)) { return StructureBoundingBox.a(i, j, k, -1, -1, 0, 5, 5, i1, l); } } diff --git a/net/minecraft/server/WorldGenStrongholdCrossing.java b/net/minecraft/server/WorldGenStrongholdCrossing.java index c9e604ed3..821b6db40 100644 --- a/net/minecraft/server/WorldGenStrongholdCrossing.java +++ b/net/minecraft/server/WorldGenStrongholdCrossing.java @@ -5,23 +5,40 @@ public class WorldGenStrongholdCrossing extends WorldGenStrongholdPiece { - protected final WorldGenStrongholdDoorType a; + private boolean a; private boolean b; private boolean c; - private boolean d; private boolean e; + public WorldGenStrongholdCrossing() {} + public WorldGenStrongholdCrossing(int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(i); this.g = j; - this.a = this.a(random); + this.d = this.a(random); this.f = structureboundingbox; + this.a = random.nextBoolean(); this.b = random.nextBoolean(); this.c = random.nextBoolean(); - this.d = random.nextBoolean(); this.e = random.nextInt(3) > 0; } + protected void a(NBTTagCompound nbttagcompound) { + super.a(nbttagcompound); + nbttagcompound.setBoolean("leftLow", this.a); + nbttagcompound.setBoolean("leftHigh", this.b); + nbttagcompound.setBoolean("rightLow", this.c); + nbttagcompound.setBoolean("rightHigh", this.e); + } + + protected void b(NBTTagCompound nbttagcompound) { + super.b(nbttagcompound); + this.a = nbttagcompound.getBoolean("leftLow"); + this.b = nbttagcompound.getBoolean("leftHigh"); + this.c = nbttagcompound.getBoolean("rightLow"); + this.e = nbttagcompound.getBoolean("rightHigh"); + } + public void a(StructurePiece structurepiece, List list, Random random) { int i = 3; int j = 5; @@ -32,15 +49,15 @@ public void a(StructurePiece structurepiece, List list, Random random) { } this.a((WorldGenStrongholdStart) structurepiece, list, random, 5, 1); - if (this.b) { + if (this.a) { this.b((WorldGenStrongholdStart) structurepiece, list, random, i, 1); } - if (this.c) { + if (this.b) { this.b((WorldGenStrongholdStart) structurepiece, list, random, j, 7); } - if (this.d) { + if (this.c) { this.c((WorldGenStrongholdStart) structurepiece, list, random, i, 1); } @@ -59,17 +76,17 @@ public boolean a(World world, Random random, StructureBoundingBox structurebound if (this.a(world, structureboundingbox)) { return false; } else { - this.a(world, structureboundingbox, 0, 0, 0, 9, 8, 10, true, random, WorldGenStrongholdPieces.b()); - this.a(world, random, structureboundingbox, this.a, 4, 3, 0); - if (this.b) { + this.a(world, structureboundingbox, 0, 0, 0, 9, 8, 10, true, random, WorldGenStrongholdPieces.c()); + this.a(world, random, structureboundingbox, this.d, 4, 3, 0); + if (this.a) { this.a(world, structureboundingbox, 0, 3, 1, 0, 5, 3, 0, 0, false); } - if (this.d) { + if (this.c) { this.a(world, structureboundingbox, 9, 3, 1, 9, 5, 3, 0, 0, false); } - if (this.c) { + if (this.b) { this.a(world, structureboundingbox, 0, 5, 7, 0, 7, 9, 0, 0, false); } @@ -78,14 +95,14 @@ public boolean a(World world, Random random, StructureBoundingBox structurebound } this.a(world, structureboundingbox, 5, 1, 10, 7, 3, 10, 0, 0, false); - this.a(world, structureboundingbox, 1, 2, 1, 8, 2, 6, false, random, WorldGenStrongholdPieces.b()); - this.a(world, structureboundingbox, 4, 1, 5, 4, 4, 9, false, random, WorldGenStrongholdPieces.b()); - this.a(world, structureboundingbox, 8, 1, 5, 8, 4, 9, false, random, WorldGenStrongholdPieces.b()); - this.a(world, structureboundingbox, 1, 4, 7, 3, 4, 9, false, random, WorldGenStrongholdPieces.b()); - this.a(world, structureboundingbox, 1, 3, 5, 3, 3, 6, false, random, WorldGenStrongholdPieces.b()); + this.a(world, structureboundingbox, 1, 2, 1, 8, 2, 6, false, random, WorldGenStrongholdPieces.c()); + this.a(world, structureboundingbox, 4, 1, 5, 4, 4, 9, false, random, WorldGenStrongholdPieces.c()); + this.a(world, structureboundingbox, 8, 1, 5, 8, 4, 9, false, random, WorldGenStrongholdPieces.c()); + this.a(world, structureboundingbox, 1, 4, 7, 3, 4, 9, false, random, WorldGenStrongholdPieces.c()); + this.a(world, structureboundingbox, 1, 3, 5, 3, 3, 6, false, random, WorldGenStrongholdPieces.c()); this.a(world, structureboundingbox, 1, 3, 4, 3, 3, 4, Block.STEP.id, Block.STEP.id, false); this.a(world, structureboundingbox, 1, 4, 6, 3, 4, 6, Block.STEP.id, Block.STEP.id, false); - this.a(world, structureboundingbox, 5, 1, 7, 7, 1, 8, false, random, WorldGenStrongholdPieces.b()); + this.a(world, structureboundingbox, 5, 1, 7, 7, 1, 8, false, random, WorldGenStrongholdPieces.c()); this.a(world, structureboundingbox, 5, 1, 9, 7, 1, 9, Block.STEP.id, Block.STEP.id, false); this.a(world, structureboundingbox, 5, 2, 7, 7, 2, 7, Block.STEP.id, Block.STEP.id, false); this.a(world, structureboundingbox, 4, 5, 7, 4, 5, 9, Block.STEP.id, Block.STEP.id, false); diff --git a/net/minecraft/server/WorldGenStrongholdLeftTurn.java b/net/minecraft/server/WorldGenStrongholdLeftTurn.java index da9d96353..c833104d4 100644 --- a/net/minecraft/server/WorldGenStrongholdLeftTurn.java +++ b/net/minecraft/server/WorldGenStrongholdLeftTurn.java @@ -5,12 +5,12 @@ public class WorldGenStrongholdLeftTurn extends WorldGenStrongholdPiece { - protected final WorldGenStrongholdDoorType a; + public WorldGenStrongholdLeftTurn() {} public WorldGenStrongholdLeftTurn(int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(i); this.g = j; - this.a = this.a(random); + this.d = this.a(random); this.f = structureboundingbox; } @@ -32,8 +32,8 @@ public boolean a(World world, Random random, StructureBoundingBox structurebound if (this.a(world, structureboundingbox)) { return false; } else { - this.a(world, structureboundingbox, 0, 0, 0, 4, 4, 4, true, random, WorldGenStrongholdPieces.b()); - this.a(world, random, structureboundingbox, this.a, 1, 1, 0); + this.a(world, structureboundingbox, 0, 0, 0, 4, 4, 4, true, random, WorldGenStrongholdPieces.c()); + this.a(world, random, structureboundingbox, this.d, 1, 1, 0); if (this.g != 2 && this.g != 3) { this.a(world, structureboundingbox, 4, 1, 1, 4, 3, 3, 0, 0, false); } else { diff --git a/net/minecraft/server/WorldGenStrongholdLibrary.java b/net/minecraft/server/WorldGenStrongholdLibrary.java index 8ef55bb4c..436f1e952 100644 --- a/net/minecraft/server/WorldGenStrongholdLibrary.java +++ b/net/minecraft/server/WorldGenStrongholdLibrary.java @@ -5,16 +5,27 @@ public class WorldGenStrongholdLibrary extends WorldGenStrongholdPiece { - private static final StructurePieceTreasure[] b = new StructurePieceTreasure[] { new StructurePieceTreasure(Item.BOOK.id, 0, 1, 3, 20), new StructurePieceTreasure(Item.PAPER.id, 0, 2, 7, 20), new StructurePieceTreasure(Item.MAP_EMPTY.id, 0, 1, 1, 1), new StructurePieceTreasure(Item.COMPASS.id, 0, 1, 1, 1)}; - protected final WorldGenStrongholdDoorType a; - private final boolean c; + private static final StructurePieceTreasure[] a = new StructurePieceTreasure[] { new StructurePieceTreasure(Item.BOOK.id, 0, 1, 3, 20), new StructurePieceTreasure(Item.PAPER.id, 0, 2, 7, 20), new StructurePieceTreasure(Item.MAP_EMPTY.id, 0, 1, 1, 1), new StructurePieceTreasure(Item.COMPASS.id, 0, 1, 1, 1)}; + private boolean b; + + public WorldGenStrongholdLibrary() {} public WorldGenStrongholdLibrary(int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(i); this.g = j; - this.a = this.a(random); + this.d = this.a(random); this.f = structureboundingbox; - this.c = structureboundingbox.c() > 6; + this.b = structureboundingbox.c() > 6; + } + + protected void a(NBTTagCompound nbttagcompound) { + super.a(nbttagcompound); + nbttagcompound.setBoolean("Tall", this.b); + } + + protected void b(NBTTagCompound nbttagcompound) { + super.b(nbttagcompound); + this.b = nbttagcompound.getBoolean("Tall"); } public static WorldGenStrongholdLibrary a(List list, Random random, int i, int j, int k, int l, int i1) { @@ -36,12 +47,12 @@ public boolean a(World world, Random random, StructureBoundingBox structurebound } else { byte b0 = 11; - if (!this.c) { + if (!this.b) { b0 = 6; } - this.a(world, structureboundingbox, 0, 0, 0, 13, b0 - 1, 14, true, random, WorldGenStrongholdPieces.b()); - this.a(world, random, structureboundingbox, this.a, 4, 1, 0); + this.a(world, structureboundingbox, 0, 0, 0, 13, b0 - 1, 14, true, random, WorldGenStrongholdPieces.c()); + this.a(world, random, structureboundingbox, this.d, 4, 1, 0); this.a(world, structureboundingbox, random, 0.07F, 2, 1, 1, 11, 4, 13, Block.WEB.id, Block.WEB.id, false); boolean flag = true; boolean flag1 = true; @@ -54,14 +65,14 @@ public boolean a(World world, Random random, StructureBoundingBox structurebound this.a(world, structureboundingbox, 12, 1, i, 12, 4, i, Block.WOOD.id, Block.WOOD.id, false); this.a(world, Block.TORCH.id, 0, 2, 3, i, structureboundingbox); this.a(world, Block.TORCH.id, 0, 11, 3, i, structureboundingbox); - if (this.c) { + if (this.b) { this.a(world, structureboundingbox, 1, 6, i, 1, 9, i, Block.WOOD.id, Block.WOOD.id, false); this.a(world, structureboundingbox, 12, 6, i, 12, 9, i, Block.WOOD.id, Block.WOOD.id, false); } } else { this.a(world, structureboundingbox, 1, 1, i, 1, 4, i, Block.BOOKSHELF.id, Block.BOOKSHELF.id, false); this.a(world, structureboundingbox, 12, 1, i, 12, 4, i, Block.BOOKSHELF.id, Block.BOOKSHELF.id, false); - if (this.c) { + if (this.b) { this.a(world, structureboundingbox, 1, 6, i, 1, 9, i, Block.BOOKSHELF.id, Block.BOOKSHELF.id, false); this.a(world, structureboundingbox, 12, 6, i, 12, 9, i, Block.BOOKSHELF.id, Block.BOOKSHELF.id, false); } @@ -74,7 +85,7 @@ public boolean a(World world, Random random, StructureBoundingBox structurebound this.a(world, structureboundingbox, 9, 1, i, 10, 3, i, Block.BOOKSHELF.id, Block.BOOKSHELF.id, false); } - if (this.c) { + if (this.b) { this.a(world, structureboundingbox, 1, 5, 1, 3, 5, 13, Block.WOOD.id, Block.WOOD.id, false); this.a(world, structureboundingbox, 10, 5, 1, 12, 5, 13, Block.WOOD.id, Block.WOOD.id, false); this.a(world, structureboundingbox, 4, 5, 1, 9, 5, 2, Block.WOOD.id, Block.WOOD.id, false); @@ -120,10 +131,10 @@ public boolean a(World world, Random random, StructureBoundingBox structurebound this.a(world, Block.TORCH.id, 0, b1, 8, b2 + 1, structureboundingbox); } - this.a(world, structureboundingbox, random, 3, 3, 5, StructurePieceTreasure.a(b, new StructurePieceTreasure[] { Item.ENCHANTED_BOOK.a(random, 1, 5, 2)}), 1 + random.nextInt(4)); - if (this.c) { + this.a(world, structureboundingbox, random, 3, 3, 5, StructurePieceTreasure.a(a, new StructurePieceTreasure[] { Item.ENCHANTED_BOOK.a(random, 1, 5, 2)}), 1 + random.nextInt(4)); + if (this.b) { this.a(world, 0, 0, 12, 9, 1, structureboundingbox); - this.a(world, structureboundingbox, random, 12, 8, 1, StructurePieceTreasure.a(b, new StructurePieceTreasure[] { Item.ENCHANTED_BOOK.a(random, 1, 5, 2)}), 1 + random.nextInt(4)); + this.a(world, structureboundingbox, random, 12, 8, 1, StructurePieceTreasure.a(a, new StructurePieceTreasure[] { Item.ENCHANTED_BOOK.a(random, 1, 5, 2)}), 1 + random.nextInt(4)); } return true; diff --git a/net/minecraft/server/WorldGenStrongholdPiece.java b/net/minecraft/server/WorldGenStrongholdPiece.java index 94228ae88..bca2b71be 100644 --- a/net/minecraft/server/WorldGenStrongholdPiece.java +++ b/net/minecraft/server/WorldGenStrongholdPiece.java @@ -5,8 +5,23 @@ abstract class WorldGenStrongholdPiece extends StructurePiece { + protected WorldGenStrongholdDoorType d; + + public WorldGenStrongholdPiece() { + this.d = WorldGenStrongholdDoorType.a; + } + protected WorldGenStrongholdPiece(int i) { super(i); + this.d = WorldGenStrongholdDoorType.a; + } + + protected void a(NBTTagCompound nbttagcompound) { + nbttagcompound.setString("EntryDoor", this.d.name()); + } + + protected void b(NBTTagCompound nbttagcompound) { + this.d = WorldGenStrongholdDoorType.valueOf(nbttagcompound.getString("EntryDoor")); } protected void a(World world, Random random, StructureBoundingBox structureboundingbox, WorldGenStrongholdDoorType worldgenstrongholddoortype, int i, int j, int k) { @@ -78,16 +93,16 @@ protected WorldGenStrongholdDoorType a(Random random) { protected StructurePiece a(WorldGenStrongholdStart worldgenstrongholdstart, List list, Random random, int i, int j) { switch (this.g) { case 0: - return WorldGenStrongholdPieces.a(worldgenstrongholdstart, list, random, this.f.a + i, this.f.b + j, this.f.f + 1, this.g, this.c()); + return WorldGenStrongholdPieces.a(worldgenstrongholdstart, list, random, this.f.a + i, this.f.b + j, this.f.f + 1, this.g, this.d()); case 1: - return WorldGenStrongholdPieces.a(worldgenstrongholdstart, list, random, this.f.a - 1, this.f.b + j, this.f.c + i, this.g, this.c()); + return WorldGenStrongholdPieces.a(worldgenstrongholdstart, list, random, this.f.a - 1, this.f.b + j, this.f.c + i, this.g, this.d()); case 2: - return WorldGenStrongholdPieces.a(worldgenstrongholdstart, list, random, this.f.a + i, this.f.b + j, this.f.c - 1, this.g, this.c()); + return WorldGenStrongholdPieces.a(worldgenstrongholdstart, list, random, this.f.a + i, this.f.b + j, this.f.c - 1, this.g, this.d()); case 3: - return WorldGenStrongholdPieces.a(worldgenstrongholdstart, list, random, this.f.d + 1, this.f.b + j, this.f.c + i, this.g, this.c()); + return WorldGenStrongholdPieces.a(worldgenstrongholdstart, list, random, this.f.d + 1, this.f.b + j, this.f.c + i, this.g, this.d()); default: return null; @@ -97,16 +112,16 @@ protected StructurePiece a(WorldGenStrongholdStart worldgenstrongholdstart, List protected StructurePiece b(WorldGenStrongholdStart worldgenstrongholdstart, List list, Random random, int i, int j) { switch (this.g) { case 0: - return WorldGenStrongholdPieces.a(worldgenstrongholdstart, list, random, this.f.a - 1, this.f.b + i, this.f.c + j, 1, this.c()); + return WorldGenStrongholdPieces.a(worldgenstrongholdstart, list, random, this.f.a - 1, this.f.b + i, this.f.c + j, 1, this.d()); case 1: - return WorldGenStrongholdPieces.a(worldgenstrongholdstart, list, random, this.f.a + j, this.f.b + i, this.f.c - 1, 2, this.c()); + return WorldGenStrongholdPieces.a(worldgenstrongholdstart, list, random, this.f.a + j, this.f.b + i, this.f.c - 1, 2, this.d()); case 2: - return WorldGenStrongholdPieces.a(worldgenstrongholdstart, list, random, this.f.a - 1, this.f.b + i, this.f.c + j, 1, this.c()); + return WorldGenStrongholdPieces.a(worldgenstrongholdstart, list, random, this.f.a - 1, this.f.b + i, this.f.c + j, 1, this.d()); case 3: - return WorldGenStrongholdPieces.a(worldgenstrongholdstart, list, random, this.f.a + j, this.f.b + i, this.f.c - 1, 2, this.c()); + return WorldGenStrongholdPieces.a(worldgenstrongholdstart, list, random, this.f.a + j, this.f.b + i, this.f.c - 1, 2, this.d()); default: return null; @@ -116,16 +131,16 @@ protected StructurePiece b(WorldGenStrongholdStart worldgenstrongholdstart, List protected StructurePiece c(WorldGenStrongholdStart worldgenstrongholdstart, List list, Random random, int i, int j) { switch (this.g) { case 0: - return WorldGenStrongholdPieces.a(worldgenstrongholdstart, list, random, this.f.d + 1, this.f.b + i, this.f.c + j, 3, this.c()); + return WorldGenStrongholdPieces.a(worldgenstrongholdstart, list, random, this.f.d + 1, this.f.b + i, this.f.c + j, 3, this.d()); case 1: - return WorldGenStrongholdPieces.a(worldgenstrongholdstart, list, random, this.f.a + j, this.f.b + i, this.f.f + 1, 0, this.c()); + return WorldGenStrongholdPieces.a(worldgenstrongholdstart, list, random, this.f.a + j, this.f.b + i, this.f.f + 1, 0, this.d()); case 2: - return WorldGenStrongholdPieces.a(worldgenstrongholdstart, list, random, this.f.d + 1, this.f.b + i, this.f.c + j, 3, this.c()); + return WorldGenStrongholdPieces.a(worldgenstrongholdstart, list, random, this.f.d + 1, this.f.b + i, this.f.c + j, 3, this.d()); case 3: - return WorldGenStrongholdPieces.a(worldgenstrongholdstart, list, random, this.f.a + j, this.f.b + i, this.f.f + 1, 0, this.c()); + return WorldGenStrongholdPieces.a(worldgenstrongholdstart, list, random, this.f.a + j, this.f.b + i, this.f.f + 1, 0, this.d()); default: return null; diff --git a/net/minecraft/server/WorldGenStrongholdPieces.java b/net/minecraft/server/WorldGenStrongholdPieces.java index c3617e554..6eb7e209b 100644 --- a/net/minecraft/server/WorldGenStrongholdPieces.java +++ b/net/minecraft/server/WorldGenStrongholdPieces.java @@ -14,6 +14,22 @@ public class WorldGenStrongholdPieces { private static final WorldGenStrongholdStones e = new WorldGenStrongholdStones((WorldGenStrongholdUnknown) null); public static void a() { + WorldGenFactory.a(WorldGenStrongholdChestCorridor.class, "SHCC"); + WorldGenFactory.a(WorldGenStrongholdCorridor.class, "SHFC"); + WorldGenFactory.a(WorldGenStrongholdCrossing.class, "SH5C"); + WorldGenFactory.a(WorldGenStrongholdLeftTurn.class, "SHLT"); + WorldGenFactory.a(WorldGenStrongholdLibrary.class, "SHLi"); + WorldGenFactory.a(WorldGenStrongholdPortalRoom.class, "SHPR"); + WorldGenFactory.a(WorldGenStrongholdPrison.class, "SHPH"); + WorldGenFactory.a(WorldGenStrongholdRightTurn.class, "SHRT"); + WorldGenFactory.a(WorldGenStrongholdRoomCrossing.class, "SHRC"); + WorldGenFactory.a(WorldGenStrongholdStairs2.class, "SHSD"); + WorldGenFactory.a(WorldGenStrongholdStart.class, "SHStart"); + WorldGenFactory.a(WorldGenStrongholdStairs.class, "SHS"); + WorldGenFactory.a(WorldGenStrongholdStairsStraight.class, "SHSSD"); + } + + public static void b() { c = new ArrayList(); WorldGenStrongholdPieceWeight[] aworldgenstrongholdpieceweight = b; int i = aworldgenstrongholdpieceweight.length; @@ -28,7 +44,7 @@ public static void a() { d = null; } - private static boolean c() { + private static boolean d() { boolean flag = false; a = 0; @@ -76,7 +92,7 @@ private static WorldGenStrongholdPiece a(Class oclass, List list, Random random, } private static WorldGenStrongholdPiece b(WorldGenStrongholdStart worldgenstrongholdstart, List list, Random random, int i, int j, int k, int l, int i1) { - if (!c()) { + if (!d()) { return null; } else { if (d != null) { @@ -132,7 +148,7 @@ private static WorldGenStrongholdPiece b(WorldGenStrongholdStart worldgenstrongh private static StructurePiece c(WorldGenStrongholdStart worldgenstrongholdstart, List list, Random random, int i, int j, int k, int l, int i1) { if (i1 > 50) { return null; - } else if (Math.abs(i - worldgenstrongholdstart.b().a) <= 112 && Math.abs(k - worldgenstrongholdstart.b().c) <= 112) { + } else if (Math.abs(i - worldgenstrongholdstart.c().a) <= 112 && Math.abs(k - worldgenstrongholdstart.c().c) <= 112) { WorldGenStrongholdPiece worldgenstrongholdpiece = b(worldgenstrongholdstart, list, random, i, j, k, l, i1 + 1); if (worldgenstrongholdpiece != null) { @@ -155,7 +171,7 @@ static Class a(Class oclass) { return oclass; } - static WorldGenStrongholdStones b() { + static WorldGenStrongholdStones c() { return e; } } diff --git a/net/minecraft/server/WorldGenStrongholdPortalRoom.java b/net/minecraft/server/WorldGenStrongholdPortalRoom.java index d663b38c6..2574665ca 100644 --- a/net/minecraft/server/WorldGenStrongholdPortalRoom.java +++ b/net/minecraft/server/WorldGenStrongholdPortalRoom.java @@ -7,12 +7,24 @@ public class WorldGenStrongholdPortalRoom extends WorldGenStrongholdPiece { private boolean a; + public WorldGenStrongholdPortalRoom() {} + public WorldGenStrongholdPortalRoom(int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(i); this.g = j; this.f = structureboundingbox; } + protected void a(NBTTagCompound nbttagcompound) { + super.a(nbttagcompound); + nbttagcompound.setBoolean("Mob", this.a); + } + + protected void b(NBTTagCompound nbttagcompound) { + super.b(nbttagcompound); + this.a = nbttagcompound.getBoolean("Mob"); + } + public void a(StructurePiece structurepiece, List list, Random random) { if (structurepiece != null) { ((WorldGenStrongholdStart) structurepiece).b = this; @@ -26,19 +38,19 @@ public static WorldGenStrongholdPortalRoom a(List list, Random random, int i, in } public boolean a(World world, Random random, StructureBoundingBox structureboundingbox) { - this.a(world, structureboundingbox, 0, 0, 0, 10, 7, 15, false, random, WorldGenStrongholdPieces.b()); + this.a(world, structureboundingbox, 0, 0, 0, 10, 7, 15, false, random, WorldGenStrongholdPieces.c()); this.a(world, random, structureboundingbox, WorldGenStrongholdDoorType.c, 4, 1, 0); byte b0 = 6; - this.a(world, structureboundingbox, 1, b0, 1, 1, b0, 14, false, random, WorldGenStrongholdPieces.b()); - this.a(world, structureboundingbox, 9, b0, 1, 9, b0, 14, false, random, WorldGenStrongholdPieces.b()); - this.a(world, structureboundingbox, 2, b0, 1, 8, b0, 2, false, random, WorldGenStrongholdPieces.b()); - this.a(world, structureboundingbox, 2, b0, 14, 8, b0, 14, false, random, WorldGenStrongholdPieces.b()); - this.a(world, structureboundingbox, 1, 1, 1, 2, 1, 4, false, random, WorldGenStrongholdPieces.b()); - this.a(world, structureboundingbox, 8, 1, 1, 9, 1, 4, false, random, WorldGenStrongholdPieces.b()); + this.a(world, structureboundingbox, 1, b0, 1, 1, b0, 14, false, random, WorldGenStrongholdPieces.c()); + this.a(world, structureboundingbox, 9, b0, 1, 9, b0, 14, false, random, WorldGenStrongholdPieces.c()); + this.a(world, structureboundingbox, 2, b0, 1, 8, b0, 2, false, random, WorldGenStrongholdPieces.c()); + this.a(world, structureboundingbox, 2, b0, 14, 8, b0, 14, false, random, WorldGenStrongholdPieces.c()); + this.a(world, structureboundingbox, 1, 1, 1, 2, 1, 4, false, random, WorldGenStrongholdPieces.c()); + this.a(world, structureboundingbox, 8, 1, 1, 9, 1, 4, false, random, WorldGenStrongholdPieces.c()); this.a(world, structureboundingbox, 1, 1, 1, 1, 1, 3, Block.LAVA.id, Block.LAVA.id, false); this.a(world, structureboundingbox, 9, 1, 1, 9, 1, 3, Block.LAVA.id, Block.LAVA.id, false); - this.a(world, structureboundingbox, 3, 1, 8, 7, 1, 12, false, random, WorldGenStrongholdPieces.b()); + this.a(world, structureboundingbox, 3, 1, 8, 7, 1, 12, false, random, WorldGenStrongholdPieces.c()); this.a(world, structureboundingbox, 4, 1, 9, 6, 1, 11, Block.LAVA.id, Block.LAVA.id, false); int i; @@ -53,9 +65,9 @@ public boolean a(World world, Random random, StructureBoundingBox structurebound } i = this.c(Block.STONE_STAIRS.id, 3); - this.a(world, structureboundingbox, 4, 1, 5, 6, 1, 7, false, random, WorldGenStrongholdPieces.b()); - this.a(world, structureboundingbox, 4, 2, 6, 6, 2, 7, false, random, WorldGenStrongholdPieces.b()); - this.a(world, structureboundingbox, 4, 3, 7, 6, 3, 7, false, random, WorldGenStrongholdPieces.b()); + this.a(world, structureboundingbox, 4, 1, 5, 6, 1, 7, false, random, WorldGenStrongholdPieces.c()); + this.a(world, structureboundingbox, 4, 2, 6, 6, 2, 7, false, random, WorldGenStrongholdPieces.c()); + this.a(world, structureboundingbox, 4, 3, 7, 6, 3, 7, false, random, WorldGenStrongholdPieces.c()); for (int j = 4; j <= 6; ++j) { this.a(world, Block.STONE_STAIRS.id, i, j, 1, 4, structureboundingbox); diff --git a/net/minecraft/server/WorldGenStrongholdPrison.java b/net/minecraft/server/WorldGenStrongholdPrison.java index 53cb0517c..9ad025b69 100644 --- a/net/minecraft/server/WorldGenStrongholdPrison.java +++ b/net/minecraft/server/WorldGenStrongholdPrison.java @@ -5,12 +5,12 @@ public class WorldGenStrongholdPrison extends WorldGenStrongholdPiece { - protected final WorldGenStrongholdDoorType a; + public WorldGenStrongholdPrison() {} public WorldGenStrongholdPrison(int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(i); this.g = j; - this.a = this.a(random); + this.d = this.a(random); this.f = structureboundingbox; } @@ -28,13 +28,13 @@ public boolean a(World world, Random random, StructureBoundingBox structurebound if (this.a(world, structureboundingbox)) { return false; } else { - this.a(world, structureboundingbox, 0, 0, 0, 8, 4, 10, true, random, WorldGenStrongholdPieces.b()); - this.a(world, random, structureboundingbox, this.a, 1, 1, 0); + this.a(world, structureboundingbox, 0, 0, 0, 8, 4, 10, true, random, WorldGenStrongholdPieces.c()); + this.a(world, random, structureboundingbox, this.d, 1, 1, 0); this.a(world, structureboundingbox, 1, 1, 10, 3, 3, 10, 0, 0, false); - this.a(world, structureboundingbox, 4, 1, 1, 4, 3, 1, false, random, WorldGenStrongholdPieces.b()); - this.a(world, structureboundingbox, 4, 1, 3, 4, 3, 3, false, random, WorldGenStrongholdPieces.b()); - this.a(world, structureboundingbox, 4, 1, 7, 4, 3, 7, false, random, WorldGenStrongholdPieces.b()); - this.a(world, structureboundingbox, 4, 1, 9, 4, 3, 9, false, random, WorldGenStrongholdPieces.b()); + this.a(world, structureboundingbox, 4, 1, 1, 4, 3, 1, false, random, WorldGenStrongholdPieces.c()); + this.a(world, structureboundingbox, 4, 1, 3, 4, 3, 3, false, random, WorldGenStrongholdPieces.c()); + this.a(world, structureboundingbox, 4, 1, 7, 4, 3, 7, false, random, WorldGenStrongholdPieces.c()); + this.a(world, structureboundingbox, 4, 1, 9, 4, 3, 9, false, random, WorldGenStrongholdPieces.c()); this.a(world, structureboundingbox, 4, 1, 4, 4, 3, 6, Block.IRON_FENCE.id, Block.IRON_FENCE.id, false); this.a(world, structureboundingbox, 5, 1, 5, 7, 3, 5, Block.IRON_FENCE.id, Block.IRON_FENCE.id, false); this.a(world, Block.IRON_FENCE.id, 0, 4, 3, 2, structureboundingbox); diff --git a/net/minecraft/server/WorldGenStrongholdRightTurn.java b/net/minecraft/server/WorldGenStrongholdRightTurn.java index 754bebea0..111897f91 100644 --- a/net/minecraft/server/WorldGenStrongholdRightTurn.java +++ b/net/minecraft/server/WorldGenStrongholdRightTurn.java @@ -5,6 +5,8 @@ public class WorldGenStrongholdRightTurn extends WorldGenStrongholdLeftTurn { + public WorldGenStrongholdRightTurn() {} + public void a(StructurePiece structurepiece, List list, Random random) { if (this.g != 2 && this.g != 3) { this.b((WorldGenStrongholdStart) structurepiece, list, random, 1, 1); @@ -17,8 +19,8 @@ public boolean a(World world, Random random, StructureBoundingBox structurebound if (this.a(world, structureboundingbox)) { return false; } else { - this.a(world, structureboundingbox, 0, 0, 0, 4, 4, 4, true, random, WorldGenStrongholdPieces.b()); - this.a(world, random, structureboundingbox, this.a, 1, 1, 0); + this.a(world, structureboundingbox, 0, 0, 0, 4, 4, 4, true, random, WorldGenStrongholdPieces.c()); + this.a(world, random, structureboundingbox, this.d, 1, 1, 0); if (this.g != 2 && this.g != 3) { this.a(world, structureboundingbox, 0, 1, 1, 0, 3, 3, 0, 0, false); } else { diff --git a/net/minecraft/server/WorldGenStrongholdRoomCrossing.java b/net/minecraft/server/WorldGenStrongholdRoomCrossing.java index 85dd429dc..3bbaf84ac 100644 --- a/net/minecraft/server/WorldGenStrongholdRoomCrossing.java +++ b/net/minecraft/server/WorldGenStrongholdRoomCrossing.java @@ -5,16 +5,27 @@ public class WorldGenStrongholdRoomCrossing extends WorldGenStrongholdPiece { - private static final StructurePieceTreasure[] c = new StructurePieceTreasure[] { new StructurePieceTreasure(Item.IRON_INGOT.id, 0, 1, 5, 10), new StructurePieceTreasure(Item.GOLD_INGOT.id, 0, 1, 3, 5), new StructurePieceTreasure(Item.REDSTONE.id, 0, 4, 9, 5), new StructurePieceTreasure(Item.COAL.id, 0, 3, 8, 10), new StructurePieceTreasure(Item.BREAD.id, 0, 1, 3, 15), new StructurePieceTreasure(Item.APPLE.id, 0, 1, 3, 15), new StructurePieceTreasure(Item.IRON_PICKAXE.id, 0, 1, 1, 1)}; - protected final WorldGenStrongholdDoorType a; - protected final int b; + private static final StructurePieceTreasure[] b = new StructurePieceTreasure[] { new StructurePieceTreasure(Item.IRON_INGOT.id, 0, 1, 5, 10), new StructurePieceTreasure(Item.GOLD_INGOT.id, 0, 1, 3, 5), new StructurePieceTreasure(Item.REDSTONE.id, 0, 4, 9, 5), new StructurePieceTreasure(Item.COAL.id, 0, 3, 8, 10), new StructurePieceTreasure(Item.BREAD.id, 0, 1, 3, 15), new StructurePieceTreasure(Item.APPLE.id, 0, 1, 3, 15), new StructurePieceTreasure(Item.IRON_PICKAXE.id, 0, 1, 1, 1)}; + protected int a; + + public WorldGenStrongholdRoomCrossing() {} public WorldGenStrongholdRoomCrossing(int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(i); this.g = j; - this.a = this.a(random); + this.d = this.a(random); this.f = structureboundingbox; - this.b = random.nextInt(5); + this.a = random.nextInt(5); + } + + protected void a(NBTTagCompound nbttagcompound) { + super.a(nbttagcompound); + nbttagcompound.setInt("Type", this.a); + } + + protected void b(NBTTagCompound nbttagcompound) { + super.b(nbttagcompound); + this.a = nbttagcompound.getInt("Type"); } public void a(StructurePiece structurepiece, List list, Random random) { @@ -33,14 +44,14 @@ public boolean a(World world, Random random, StructureBoundingBox structurebound if (this.a(world, structureboundingbox)) { return false; } else { - this.a(world, structureboundingbox, 0, 0, 0, 10, 6, 10, true, random, WorldGenStrongholdPieces.b()); - this.a(world, random, structureboundingbox, this.a, 4, 1, 0); + this.a(world, structureboundingbox, 0, 0, 0, 10, 6, 10, true, random, WorldGenStrongholdPieces.c()); + this.a(world, random, structureboundingbox, this.d, 4, 1, 0); this.a(world, structureboundingbox, 4, 1, 10, 6, 3, 10, 0, 0, false); this.a(world, structureboundingbox, 0, 1, 4, 0, 3, 6, 0, 0, false); this.a(world, structureboundingbox, 10, 1, 4, 10, 3, 6, 0, 0, false); int i; - switch (this.b) { + switch (this.a) { case 0: this.a(world, Block.SMOOTH_BRICK.id, 0, 5, 1, 5, structureboundingbox); this.a(world, Block.SMOOTH_BRICK.id, 0, 5, 2, 5, structureboundingbox); @@ -118,7 +129,7 @@ public boolean a(World world, Random random, StructureBoundingBox structurebound this.a(world, Block.LADDER.id, this.c(Block.LADDER.id, 4), 9, 1, 3, structureboundingbox); this.a(world, Block.LADDER.id, this.c(Block.LADDER.id, 4), 9, 2, 3, structureboundingbox); this.a(world, Block.LADDER.id, this.c(Block.LADDER.id, 4), 9, 3, 3, structureboundingbox); - this.a(world, structureboundingbox, random, 3, 4, 8, StructurePieceTreasure.a(c, new StructurePieceTreasure[] { Item.ENCHANTED_BOOK.b(random)}), 1 + random.nextInt(4)); + this.a(world, structureboundingbox, random, 3, 4, 8, StructurePieceTreasure.a(b, new StructurePieceTreasure[] { Item.ENCHANTED_BOOK.b(random)}), 1 + random.nextInt(4)); } return true; diff --git a/net/minecraft/server/WorldGenStrongholdStairs.java b/net/minecraft/server/WorldGenStrongholdStairs.java index 533547cd0..0a044abf5 100644 --- a/net/minecraft/server/WorldGenStrongholdStairs.java +++ b/net/minecraft/server/WorldGenStrongholdStairs.java @@ -5,26 +5,39 @@ public class WorldGenStrongholdStairs extends WorldGenStrongholdPiece { - private final WorldGenStrongholdDoorType a; - private final boolean b; - private final boolean c; + private boolean a; + private boolean b; + + public WorldGenStrongholdStairs() {} public WorldGenStrongholdStairs(int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(i); this.g = j; - this.a = this.a(random); + this.d = this.a(random); this.f = structureboundingbox; + this.a = random.nextInt(2) == 0; this.b = random.nextInt(2) == 0; - this.c = random.nextInt(2) == 0; + } + + protected void a(NBTTagCompound nbttagcompound) { + super.a(nbttagcompound); + nbttagcompound.setBoolean("Left", this.a); + nbttagcompound.setBoolean("Right", this.b); + } + + protected void b(NBTTagCompound nbttagcompound) { + super.b(nbttagcompound); + this.a = nbttagcompound.getBoolean("Left"); + this.b = nbttagcompound.getBoolean("Right"); } public void a(StructurePiece structurepiece, List list, Random random) { this.a((WorldGenStrongholdStart) structurepiece, list, random, 1, 1); - if (this.b) { + if (this.a) { this.b((WorldGenStrongholdStart) structurepiece, list, random, 1, 2); } - if (this.c) { + if (this.b) { this.c((WorldGenStrongholdStart) structurepiece, list, random, 1, 2); } } @@ -39,18 +52,18 @@ public boolean a(World world, Random random, StructureBoundingBox structurebound if (this.a(world, structureboundingbox)) { return false; } else { - this.a(world, structureboundingbox, 0, 0, 0, 4, 4, 6, true, random, WorldGenStrongholdPieces.b()); - this.a(world, random, structureboundingbox, this.a, 1, 1, 0); + this.a(world, structureboundingbox, 0, 0, 0, 4, 4, 6, true, random, WorldGenStrongholdPieces.c()); + this.a(world, random, structureboundingbox, this.d, 1, 1, 0); this.a(world, random, structureboundingbox, WorldGenStrongholdDoorType.a, 1, 1, 6); this.a(world, structureboundingbox, random, 0.1F, 1, 2, 1, Block.TORCH.id, 0); this.a(world, structureboundingbox, random, 0.1F, 3, 2, 1, Block.TORCH.id, 0); this.a(world, structureboundingbox, random, 0.1F, 1, 2, 5, Block.TORCH.id, 0); this.a(world, structureboundingbox, random, 0.1F, 3, 2, 5, Block.TORCH.id, 0); - if (this.b) { + if (this.a) { this.a(world, structureboundingbox, 0, 1, 2, 0, 3, 4, 0, 0, false); } - if (this.c) { + if (this.b) { this.a(world, structureboundingbox, 4, 1, 2, 4, 3, 4, 0, 0, false); } diff --git a/net/minecraft/server/WorldGenStrongholdStairs2.java b/net/minecraft/server/WorldGenStrongholdStairs2.java index a6348e0ba..05edefafd 100644 --- a/net/minecraft/server/WorldGenStrongholdStairs2.java +++ b/net/minecraft/server/WorldGenStrongholdStairs2.java @@ -5,14 +5,15 @@ public class WorldGenStrongholdStairs2 extends WorldGenStrongholdPiece { - private final boolean a; - private final WorldGenStrongholdDoorType b; + private boolean a; + + public WorldGenStrongholdStairs2() {} public WorldGenStrongholdStairs2(int i, Random random, int j, int k) { super(i); this.a = true; this.g = random.nextInt(4); - this.b = WorldGenStrongholdDoorType.a; + this.d = WorldGenStrongholdDoorType.a; switch (this.g) { case 0: case 2: @@ -28,10 +29,20 @@ public WorldGenStrongholdStairs2(int i, Random random, StructureBoundingBox stru super(i); this.a = false; this.g = j; - this.b = this.a(random); + this.d = this.a(random); this.f = structureboundingbox; } + protected void a(NBTTagCompound nbttagcompound) { + super.a(nbttagcompound); + nbttagcompound.setBoolean("Source", this.a); + } + + protected void b(NBTTagCompound nbttagcompound) { + super.b(nbttagcompound); + this.a = nbttagcompound.getBoolean("Source"); + } + public void a(StructurePiece structurepiece, List list, Random random) { if (this.a) { WorldGenStrongholdPieces.a(WorldGenStrongholdCrossing.class); @@ -50,8 +61,8 @@ public boolean a(World world, Random random, StructureBoundingBox structurebound if (this.a(world, structureboundingbox)) { return false; } else { - this.a(world, structureboundingbox, 0, 0, 0, 4, 10, 4, true, random, WorldGenStrongholdPieces.b()); - this.a(world, random, structureboundingbox, this.b, 1, 7, 0); + this.a(world, structureboundingbox, 0, 0, 0, 4, 10, 4, true, random, WorldGenStrongholdPieces.c()); + this.a(world, random, structureboundingbox, this.d, 1, 7, 0); this.a(world, random, structureboundingbox, WorldGenStrongholdDoorType.a, 1, 1, 4); this.a(world, Block.SMOOTH_BRICK.id, 0, 2, 6, 1, structureboundingbox); this.a(world, Block.SMOOTH_BRICK.id, 0, 1, 5, 1, structureboundingbox); diff --git a/net/minecraft/server/WorldGenStrongholdStairsStraight.java b/net/minecraft/server/WorldGenStrongholdStairsStraight.java index cc1f673fb..910d63c04 100644 --- a/net/minecraft/server/WorldGenStrongholdStairsStraight.java +++ b/net/minecraft/server/WorldGenStrongholdStairsStraight.java @@ -5,12 +5,12 @@ public class WorldGenStrongholdStairsStraight extends WorldGenStrongholdPiece { - private final WorldGenStrongholdDoorType a; + public WorldGenStrongholdStairsStraight() {} public WorldGenStrongholdStairsStraight(int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(i); this.g = j; - this.a = this.a(random); + this.d = this.a(random); this.f = structureboundingbox; } @@ -28,8 +28,8 @@ public boolean a(World world, Random random, StructureBoundingBox structurebound if (this.a(world, structureboundingbox)) { return false; } else { - this.a(world, structureboundingbox, 0, 0, 0, 4, 10, 7, true, random, WorldGenStrongholdPieces.b()); - this.a(world, random, structureboundingbox, this.a, 1, 7, 0); + this.a(world, structureboundingbox, 0, 0, 0, 4, 10, 7, true, random, WorldGenStrongholdPieces.c()); + this.a(world, random, structureboundingbox, this.d, 1, 7, 0); this.a(world, random, structureboundingbox, WorldGenStrongholdDoorType.a, 1, 1, 7); int i = this.c(Block.COBBLESTONE_STAIRS.id, 2); diff --git a/net/minecraft/server/WorldGenStrongholdStart.java b/net/minecraft/server/WorldGenStrongholdStart.java index a7d7f5cb3..9798fabb0 100644 --- a/net/minecraft/server/WorldGenStrongholdStart.java +++ b/net/minecraft/server/WorldGenStrongholdStart.java @@ -10,6 +10,8 @@ public class WorldGenStrongholdStart extends WorldGenStrongholdStairs2 { public WorldGenStrongholdPortalRoom b; public List c = new ArrayList(); + public WorldGenStrongholdStart() {} + public WorldGenStrongholdStart(int i, Random random, int j, int k) { super(0, random, j, k); } diff --git a/net/minecraft/server/WorldGenVillage.java b/net/minecraft/server/WorldGenVillage.java index eba8290b2..d211a8c78 100644 --- a/net/minecraft/server/WorldGenVillage.java +++ b/net/minecraft/server/WorldGenVillage.java @@ -34,6 +34,10 @@ public WorldGenVillage(Map map) { } } + public String a() { + return "Village"; + } + protected boolean a(int i, int j) { int k = i; int l = j; diff --git a/net/minecraft/server/WorldGenVillageBlacksmith.java b/net/minecraft/server/WorldGenVillageBlacksmith.java index 65cc011d1..04cdeef43 100644 --- a/net/minecraft/server/WorldGenVillageBlacksmith.java +++ b/net/minecraft/server/WorldGenVillageBlacksmith.java @@ -6,8 +6,9 @@ public class WorldGenVillageBlacksmith extends WorldGenVillagePiece { private static final StructurePieceTreasure[] a = new StructurePieceTreasure[] { new StructurePieceTreasure(Item.DIAMOND.id, 0, 1, 3, 3), new StructurePieceTreasure(Item.IRON_INGOT.id, 0, 1, 5, 10), new StructurePieceTreasure(Item.GOLD_INGOT.id, 0, 1, 3, 5), new StructurePieceTreasure(Item.BREAD.id, 0, 1, 3, 15), new StructurePieceTreasure(Item.APPLE.id, 0, 1, 3, 15), new StructurePieceTreasure(Item.IRON_PICKAXE.id, 0, 1, 1, 5), new StructurePieceTreasure(Item.IRON_SWORD.id, 0, 1, 1, 5), new StructurePieceTreasure(Item.IRON_CHESTPLATE.id, 0, 1, 1, 5), new StructurePieceTreasure(Item.IRON_HELMET.id, 0, 1, 1, 5), new StructurePieceTreasure(Item.IRON_LEGGINGS.id, 0, 1, 1, 5), new StructurePieceTreasure(Item.IRON_BOOTS.id, 0, 1, 1, 5), new StructurePieceTreasure(Block.OBSIDIAN.id, 0, 3, 7, 5), new StructurePieceTreasure(Block.SAPLING.id, 0, 3, 7, 5), new StructurePieceTreasure(Item.SADDLE.id, 0, 1, 1, 3), new StructurePieceTreasure(Item.HORSE_ARMOR_IRON.id, 0, 1, 1, 1), new StructurePieceTreasure(Item.HORSE_ARMOR_GOLD.id, 0, 1, 1, 1), new StructurePieceTreasure(Item.HORSE_ARMOR_DIAMOND.id, 0, 1, 1, 1)}; - private int b = -1; - private boolean c; + private boolean b; + + public WorldGenVillageBlacksmith() {} public WorldGenVillageBlacksmith(WorldGenVillageStartPiece worldgenvillagestartpiece, int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(worldgenvillagestartpiece, i); @@ -21,14 +22,24 @@ public static WorldGenVillageBlacksmith a(WorldGenVillageStartPiece worldgenvill return a(structureboundingbox) && StructurePiece.a(list, structureboundingbox) == null ? new WorldGenVillageBlacksmith(worldgenvillagestartpiece, i1, random, structureboundingbox, l) : null; } + protected void a(NBTTagCompound nbttagcompound) { + super.a(nbttagcompound); + nbttagcompound.setBoolean("Chest", this.b); + } + + protected void b(NBTTagCompound nbttagcompound) { + super.b(nbttagcompound); + this.b = nbttagcompound.getBoolean("Chest"); + } + public boolean a(World world, Random random, StructureBoundingBox structureboundingbox) { - if (this.b < 0) { - this.b = this.b(world, structureboundingbox); - if (this.b < 0) { + if (this.k < 0) { + this.k = this.b(world, structureboundingbox); + if (this.k < 0) { return true; } - this.f.a(0, this.b - this.f.e + 6 - 1, 0); + this.f.a(0, this.k - this.f.e + 6 - 1, 0); } this.a(world, structureboundingbox, 0, 1, 0, 9, 4, 6, 0, 0, false); @@ -69,13 +80,13 @@ public boolean a(World world, Random random, StructureBoundingBox structurebound int i; int j; - if (!this.c) { + if (!this.b) { i = this.a(1); j = this.a(5, 5); int k = this.b(5, 5); if (structureboundingbox.b(j, i, k)) { - this.c = true; + this.b = true; this.a(world, structureboundingbox, random, 5, 1, 5, a, 3 + random.nextInt(6)); } } diff --git a/net/minecraft/server/WorldGenVillageButcher.java b/net/minecraft/server/WorldGenVillageButcher.java index 2dd9f7568..469385079 100644 --- a/net/minecraft/server/WorldGenVillageButcher.java +++ b/net/minecraft/server/WorldGenVillageButcher.java @@ -5,7 +5,7 @@ public class WorldGenVillageButcher extends WorldGenVillagePiece { - private int a = -1; + public WorldGenVillageButcher() {} public WorldGenVillageButcher(WorldGenVillageStartPiece worldgenvillagestartpiece, int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(worldgenvillagestartpiece, i); @@ -20,13 +20,13 @@ public static WorldGenVillageButcher a(WorldGenVillageStartPiece worldgenvillage } public boolean a(World world, Random random, StructureBoundingBox structureboundingbox) { - if (this.a < 0) { - this.a = this.b(world, structureboundingbox); - if (this.a < 0) { + if (this.k < 0) { + this.k = this.b(world, structureboundingbox); + if (this.k < 0) { return true; } - this.f.a(0, this.a - this.f.e + 7 - 1, 0); + this.f.a(0, this.k - this.f.e + 7 - 1, 0); } this.a(world, structureboundingbox, 1, 1, 1, 7, 4, 4, 0, 0, false); diff --git a/net/minecraft/server/WorldGenVillageFarm.java b/net/minecraft/server/WorldGenVillageFarm.java index 6e29212b5..f594fb0c1 100644 --- a/net/minecraft/server/WorldGenVillageFarm.java +++ b/net/minecraft/server/WorldGenVillageFarm.java @@ -5,16 +5,29 @@ public class WorldGenVillageFarm extends WorldGenVillagePiece { - private int a = -1; + private int a; private int b; - private int c; + + public WorldGenVillageFarm() {} public WorldGenVillageFarm(WorldGenVillageStartPiece worldgenvillagestartpiece, int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(worldgenvillagestartpiece, i); this.g = j; this.f = structureboundingbox; + this.a = this.a(random); this.b = this.a(random); - this.c = this.a(random); + } + + protected void a(NBTTagCompound nbttagcompound) { + super.a(nbttagcompound); + nbttagcompound.setInt("CA", this.a); + nbttagcompound.setInt("CB", this.b); + } + + protected void b(NBTTagCompound nbttagcompound) { + super.b(nbttagcompound); + this.a = nbttagcompound.getInt("CA"); + this.b = nbttagcompound.getInt("CB"); } private int a(Random random) { @@ -37,13 +50,13 @@ public static WorldGenVillageFarm a(WorldGenVillageStartPiece worldgenvillagesta } public boolean a(World world, Random random, StructureBoundingBox structureboundingbox) { - if (this.a < 0) { - this.a = this.b(world, structureboundingbox); - if (this.a < 0) { + if (this.k < 0) { + this.k = this.b(world, structureboundingbox); + if (this.k < 0) { return true; } - this.f.a(0, this.a - this.f.e + 4 - 1, 0); + this.f.a(0, this.k - this.f.e + 4 - 1, 0); } this.a(world, structureboundingbox, 0, 1, 0, 6, 4, 8, 0, 0, false); @@ -58,10 +71,10 @@ public boolean a(World world, Random random, StructureBoundingBox structurebound int i; for (i = 1; i <= 7; ++i) { - this.a(world, this.b, MathHelper.nextInt(random, 2, 7), 1, 1, i, structureboundingbox); - this.a(world, this.b, MathHelper.nextInt(random, 2, 7), 2, 1, i, structureboundingbox); - this.a(world, this.c, MathHelper.nextInt(random, 2, 7), 4, 1, i, structureboundingbox); - this.a(world, this.c, MathHelper.nextInt(random, 2, 7), 5, 1, i, structureboundingbox); + this.a(world, this.a, MathHelper.nextInt(random, 2, 7), 1, 1, i, structureboundingbox); + this.a(world, this.a, MathHelper.nextInt(random, 2, 7), 2, 1, i, structureboundingbox); + this.a(world, this.b, MathHelper.nextInt(random, 2, 7), 4, 1, i, structureboundingbox); + this.a(world, this.b, MathHelper.nextInt(random, 2, 7), 5, 1, i, structureboundingbox); } for (i = 0; i < 9; ++i) { diff --git a/net/minecraft/server/WorldGenVillageFarm2.java b/net/minecraft/server/WorldGenVillageFarm2.java index 8df40d26a..ce8c14e98 100644 --- a/net/minecraft/server/WorldGenVillageFarm2.java +++ b/net/minecraft/server/WorldGenVillageFarm2.java @@ -5,20 +5,37 @@ public class WorldGenVillageFarm2 extends WorldGenVillagePiece { - private int a = -1; + private int a; private int b; private int c; private int d; - private int e; + + public WorldGenVillageFarm2() {} public WorldGenVillageFarm2(WorldGenVillageStartPiece worldgenvillagestartpiece, int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(worldgenvillagestartpiece, i); this.g = j; this.f = structureboundingbox; + this.a = this.a(random); this.b = this.a(random); this.c = this.a(random); this.d = this.a(random); - this.e = this.a(random); + } + + protected void a(NBTTagCompound nbttagcompound) { + super.a(nbttagcompound); + nbttagcompound.setInt("CA", this.a); + nbttagcompound.setInt("CB", this.b); + nbttagcompound.setInt("CC", this.c); + nbttagcompound.setInt("CD", this.d); + } + + protected void b(NBTTagCompound nbttagcompound) { + super.b(nbttagcompound); + this.a = nbttagcompound.getInt("CA"); + this.b = nbttagcompound.getInt("CB"); + this.c = nbttagcompound.getInt("CC"); + this.d = nbttagcompound.getInt("CD"); } private int a(Random random) { @@ -41,13 +58,13 @@ public static WorldGenVillageFarm2 a(WorldGenVillageStartPiece worldgenvillagest } public boolean a(World world, Random random, StructureBoundingBox structureboundingbox) { - if (this.a < 0) { - this.a = this.b(world, structureboundingbox); - if (this.a < 0) { + if (this.k < 0) { + this.k = this.b(world, structureboundingbox); + if (this.k < 0) { return true; } - this.f.a(0, this.a - this.f.e + 4 - 1, 0); + this.f.a(0, this.k - this.f.e + 4 - 1, 0); } this.a(world, structureboundingbox, 0, 1, 0, 12, 4, 8, 0, 0, false); @@ -66,14 +83,14 @@ public boolean a(World world, Random random, StructureBoundingBox structurebound int i; for (i = 1; i <= 7; ++i) { - this.a(world, this.b, MathHelper.nextInt(random, 2, 7), 1, 1, i, structureboundingbox); - this.a(world, this.b, MathHelper.nextInt(random, 2, 7), 2, 1, i, structureboundingbox); - this.a(world, this.c, MathHelper.nextInt(random, 2, 7), 4, 1, i, structureboundingbox); - this.a(world, this.c, MathHelper.nextInt(random, 2, 7), 5, 1, i, structureboundingbox); - this.a(world, this.d, MathHelper.nextInt(random, 2, 7), 7, 1, i, structureboundingbox); - this.a(world, this.d, MathHelper.nextInt(random, 2, 7), 8, 1, i, structureboundingbox); - this.a(world, this.e, MathHelper.nextInt(random, 2, 7), 10, 1, i, structureboundingbox); - this.a(world, this.e, MathHelper.nextInt(random, 2, 7), 11, 1, i, structureboundingbox); + this.a(world, this.a, MathHelper.nextInt(random, 2, 7), 1, 1, i, structureboundingbox); + this.a(world, this.a, MathHelper.nextInt(random, 2, 7), 2, 1, i, structureboundingbox); + this.a(world, this.b, MathHelper.nextInt(random, 2, 7), 4, 1, i, structureboundingbox); + this.a(world, this.b, MathHelper.nextInt(random, 2, 7), 5, 1, i, structureboundingbox); + this.a(world, this.c, MathHelper.nextInt(random, 2, 7), 7, 1, i, structureboundingbox); + this.a(world, this.c, MathHelper.nextInt(random, 2, 7), 8, 1, i, structureboundingbox); + this.a(world, this.d, MathHelper.nextInt(random, 2, 7), 10, 1, i, structureboundingbox); + this.a(world, this.d, MathHelper.nextInt(random, 2, 7), 11, 1, i, structureboundingbox); } for (i = 0; i < 9; ++i) { diff --git a/net/minecraft/server/WorldGenVillageHouse.java b/net/minecraft/server/WorldGenVillageHouse.java index 1d9c0a543..c76ffccbd 100644 --- a/net/minecraft/server/WorldGenVillageHouse.java +++ b/net/minecraft/server/WorldGenVillageHouse.java @@ -5,14 +5,25 @@ public class WorldGenVillageHouse extends WorldGenVillagePiece { - private int a = -1; - private final boolean b; + private boolean a; + + public WorldGenVillageHouse() {} public WorldGenVillageHouse(WorldGenVillageStartPiece worldgenvillagestartpiece, int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(worldgenvillagestartpiece, i); this.g = j; this.f = structureboundingbox; - this.b = random.nextBoolean(); + this.a = random.nextBoolean(); + } + + protected void a(NBTTagCompound nbttagcompound) { + super.a(nbttagcompound); + nbttagcompound.setBoolean("Terrace", this.a); + } + + protected void b(NBTTagCompound nbttagcompound) { + super.b(nbttagcompound); + this.a = nbttagcompound.getBoolean("Terrace"); } public static WorldGenVillageHouse a(WorldGenVillageStartPiece worldgenvillagestartpiece, List list, Random random, int i, int j, int k, int l, int i1) { @@ -22,13 +33,13 @@ public static WorldGenVillageHouse a(WorldGenVillageStartPiece worldgenvillagest } public boolean a(World world, Random random, StructureBoundingBox structureboundingbox) { - if (this.a < 0) { - this.a = this.b(world, structureboundingbox); - if (this.a < 0) { + if (this.k < 0) { + this.k = this.b(world, structureboundingbox); + if (this.k < 0) { return true; } - this.f.a(0, this.a - this.f.e + 6 - 1, 0); + this.f.a(0, this.k - this.f.e + 6 - 1, 0); } this.a(world, structureboundingbox, 0, 0, 0, 4, 0, 4, Block.COBBLESTONE.id, Block.COBBLESTONE.id, false); @@ -64,7 +75,7 @@ public boolean a(World world, Random random, StructureBoundingBox structurebound } this.a(world, structureboundingbox, 1, 1, 1, 3, 3, 3, 0, 0, false); - if (this.b) { + if (this.a) { this.a(world, Block.FENCE.id, 0, 0, 5, 0, structureboundingbox); this.a(world, Block.FENCE.id, 0, 1, 5, 0, structureboundingbox); this.a(world, Block.FENCE.id, 0, 2, 5, 0, structureboundingbox); @@ -85,7 +96,7 @@ public boolean a(World world, Random random, StructureBoundingBox structurebound int i; - if (this.b) { + if (this.a) { i = this.c(Block.LADDER.id, 3); this.a(world, Block.LADDER.id, i, 3, 1, 3, structureboundingbox); this.a(world, Block.LADDER.id, i, 3, 2, 3, structureboundingbox); diff --git a/net/minecraft/server/WorldGenVillageHouse2.java b/net/minecraft/server/WorldGenVillageHouse2.java index 66b4fe79b..542272f00 100644 --- a/net/minecraft/server/WorldGenVillageHouse2.java +++ b/net/minecraft/server/WorldGenVillageHouse2.java @@ -5,7 +5,7 @@ public class WorldGenVillageHouse2 extends WorldGenVillagePiece { - private int a = -1; + public WorldGenVillageHouse2() {} public WorldGenVillageHouse2(WorldGenVillageStartPiece worldgenvillagestartpiece, int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(worldgenvillagestartpiece, i); @@ -20,13 +20,13 @@ public static WorldGenVillageHouse2 a(WorldGenVillageStartPiece worldgenvillages } public boolean a(World world, Random random, StructureBoundingBox structureboundingbox) { - if (this.a < 0) { - this.a = this.b(world, structureboundingbox); - if (this.a < 0) { + if (this.k < 0) { + this.k = this.b(world, structureboundingbox); + if (this.k < 0) { return true; } - this.f.a(0, this.a - this.f.e + 7 - 1, 0); + this.f.a(0, this.k - this.f.e + 7 - 1, 0); } this.a(world, structureboundingbox, 1, 1, 1, 7, 4, 4, 0, 0, false); diff --git a/net/minecraft/server/WorldGenVillageHut.java b/net/minecraft/server/WorldGenVillageHut.java index 0b548dbe3..6148eed16 100644 --- a/net/minecraft/server/WorldGenVillageHut.java +++ b/net/minecraft/server/WorldGenVillageHut.java @@ -5,16 +5,29 @@ public class WorldGenVillageHut extends WorldGenVillagePiece { - private int a = -1; - private final boolean b; - private final int c; + private boolean a; + private int b; + + public WorldGenVillageHut() {} public WorldGenVillageHut(WorldGenVillageStartPiece worldgenvillagestartpiece, int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(worldgenvillagestartpiece, i); this.g = j; this.f = structureboundingbox; - this.b = random.nextBoolean(); - this.c = random.nextInt(3); + this.a = random.nextBoolean(); + this.b = random.nextInt(3); + } + + protected void a(NBTTagCompound nbttagcompound) { + super.a(nbttagcompound); + nbttagcompound.setInt("T", this.b); + nbttagcompound.setBoolean("C", this.a); + } + + protected void b(NBTTagCompound nbttagcompound) { + super.b(nbttagcompound); + this.b = nbttagcompound.getInt("T"); + this.a = nbttagcompound.getBoolean("C"); } public static WorldGenVillageHut a(WorldGenVillageStartPiece worldgenvillagestartpiece, List list, Random random, int i, int j, int k, int l, int i1) { @@ -24,19 +37,19 @@ public static WorldGenVillageHut a(WorldGenVillageStartPiece worldgenvillagestar } public boolean a(World world, Random random, StructureBoundingBox structureboundingbox) { - if (this.a < 0) { - this.a = this.b(world, structureboundingbox); - if (this.a < 0) { + if (this.k < 0) { + this.k = this.b(world, structureboundingbox); + if (this.k < 0) { return true; } - this.f.a(0, this.a - this.f.e + 6 - 1, 0); + this.f.a(0, this.k - this.f.e + 6 - 1, 0); } this.a(world, structureboundingbox, 1, 1, 1, 3, 5, 4, 0, 0, false); this.a(world, structureboundingbox, 0, 0, 0, 3, 0, 4, Block.COBBLESTONE.id, Block.COBBLESTONE.id, false); this.a(world, structureboundingbox, 1, 0, 1, 2, 0, 3, Block.DIRT.id, Block.DIRT.id, false); - if (this.b) { + if (this.a) { this.a(world, structureboundingbox, 1, 4, 1, 2, 4, 3, Block.LOG.id, Block.LOG.id, false); } else { this.a(world, structureboundingbox, 1, 5, 1, 2, 5, 3, Block.LOG.id, Block.LOG.id, false); @@ -62,9 +75,9 @@ public boolean a(World world, Random random, StructureBoundingBox structurebound this.a(world, structureboundingbox, 1, 1, 4, 2, 3, 4, Block.WOOD.id, Block.WOOD.id, false); this.a(world, Block.THIN_GLASS.id, 0, 0, 2, 2, structureboundingbox); this.a(world, Block.THIN_GLASS.id, 0, 3, 2, 2, structureboundingbox); - if (this.c > 0) { - this.a(world, Block.FENCE.id, 0, this.c, 1, 3, structureboundingbox); - this.a(world, Block.WOOD_PLATE.id, 0, this.c, 2, 3, structureboundingbox); + if (this.b > 0) { + this.a(world, Block.FENCE.id, 0, this.b, 1, 3, structureboundingbox); + this.a(world, Block.WOOD_PLATE.id, 0, this.b, 2, 3, structureboundingbox); } this.a(world, 0, 0, 1, 1, 0, structureboundingbox); diff --git a/net/minecraft/server/WorldGenVillageLibrary.java b/net/minecraft/server/WorldGenVillageLibrary.java index 958bada39..f050b3fec 100644 --- a/net/minecraft/server/WorldGenVillageLibrary.java +++ b/net/minecraft/server/WorldGenVillageLibrary.java @@ -5,7 +5,7 @@ public class WorldGenVillageLibrary extends WorldGenVillagePiece { - private int a = -1; + public WorldGenVillageLibrary() {} public WorldGenVillageLibrary(WorldGenVillageStartPiece worldgenvillagestartpiece, int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(worldgenvillagestartpiece, i); @@ -20,13 +20,13 @@ public static WorldGenVillageLibrary a(WorldGenVillageStartPiece worldgenvillage } public boolean a(World world, Random random, StructureBoundingBox structureboundingbox) { - if (this.a < 0) { - this.a = this.b(world, structureboundingbox); - if (this.a < 0) { + if (this.k < 0) { + this.k = this.b(world, structureboundingbox); + if (this.k < 0) { return true; } - this.f.a(0, this.a - this.f.e + 9 - 1, 0); + this.f.a(0, this.k - this.f.e + 9 - 1, 0); } this.a(world, structureboundingbox, 1, 1, 1, 7, 5, 4, 0, 0, false); diff --git a/net/minecraft/server/WorldGenVillageLight.java b/net/minecraft/server/WorldGenVillageLight.java index 0a0ea75ac..a7393ab0a 100644 --- a/net/minecraft/server/WorldGenVillageLight.java +++ b/net/minecraft/server/WorldGenVillageLight.java @@ -5,7 +5,7 @@ public class WorldGenVillageLight extends WorldGenVillagePiece { - private int a = -1; + public WorldGenVillageLight() {} public WorldGenVillageLight(WorldGenVillageStartPiece worldgenvillagestartpiece, int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(worldgenvillagestartpiece, i); @@ -20,13 +20,13 @@ public static StructureBoundingBox a(WorldGenVillageStartPiece worldgenvillagest } public boolean a(World world, Random random, StructureBoundingBox structureboundingbox) { - if (this.a < 0) { - this.a = this.b(world, structureboundingbox); - if (this.a < 0) { + if (this.k < 0) { + this.k = this.b(world, structureboundingbox); + if (this.k < 0) { return true; } - this.f.a(0, this.a - this.f.e + 4 - 1, 0); + this.f.a(0, this.k - this.f.e + 4 - 1, 0); } this.a(world, structureboundingbox, 0, 0, 0, 2, 3, 1, 0, 0, false); diff --git a/net/minecraft/server/WorldGenVillagePiece.java b/net/minecraft/server/WorldGenVillagePiece.java index 6ad5c8acc..a86110bd9 100644 --- a/net/minecraft/server/WorldGenVillagePiece.java +++ b/net/minecraft/server/WorldGenVillagePiece.java @@ -5,27 +5,44 @@ abstract class WorldGenVillagePiece extends StructurePiece { + protected int k = -1; private int a; - protected WorldGenVillageStartPiece k; + private boolean b; + + public WorldGenVillagePiece() {} protected WorldGenVillagePiece(WorldGenVillageStartPiece worldgenvillagestartpiece, int i) { super(i); - this.k = worldgenvillagestartpiece; + if (worldgenvillagestartpiece != null) { + this.b = worldgenvillagestartpiece.b; + } + } + + protected void a(NBTTagCompound nbttagcompound) { + nbttagcompound.setInt("HPos", this.k); + nbttagcompound.setInt("VCount", this.a); + nbttagcompound.setBoolean("Desert", this.b); + } + + protected void b(NBTTagCompound nbttagcompound) { + this.k = nbttagcompound.getInt("HPos"); + this.a = nbttagcompound.getInt("VCount"); + this.b = nbttagcompound.getBoolean("Desert"); } protected StructurePiece a(WorldGenVillageStartPiece worldgenvillagestartpiece, List list, Random random, int i, int j) { switch (this.g) { case 0: - return WorldGenVillagePieces.a(worldgenvillagestartpiece, list, random, this.f.a - 1, this.f.b + i, this.f.c + j, 1, this.c()); + return WorldGenVillagePieces.a(worldgenvillagestartpiece, list, random, this.f.a - 1, this.f.b + i, this.f.c + j, 1, this.d()); case 1: - return WorldGenVillagePieces.a(worldgenvillagestartpiece, list, random, this.f.a + j, this.f.b + i, this.f.c - 1, 2, this.c()); + return WorldGenVillagePieces.a(worldgenvillagestartpiece, list, random, this.f.a + j, this.f.b + i, this.f.c - 1, 2, this.d()); case 2: - return WorldGenVillagePieces.a(worldgenvillagestartpiece, list, random, this.f.a - 1, this.f.b + i, this.f.c + j, 1, this.c()); + return WorldGenVillagePieces.a(worldgenvillagestartpiece, list, random, this.f.a - 1, this.f.b + i, this.f.c + j, 1, this.d()); case 3: - return WorldGenVillagePieces.a(worldgenvillagestartpiece, list, random, this.f.a + j, this.f.b + i, this.f.c - 1, 2, this.c()); + return WorldGenVillagePieces.a(worldgenvillagestartpiece, list, random, this.f.a + j, this.f.b + i, this.f.c - 1, 2, this.d()); default: return null; @@ -35,16 +52,16 @@ protected StructurePiece a(WorldGenVillageStartPiece worldgenvillagestartpiece, protected StructurePiece b(WorldGenVillageStartPiece worldgenvillagestartpiece, List list, Random random, int i, int j) { switch (this.g) { case 0: - return WorldGenVillagePieces.a(worldgenvillagestartpiece, list, random, this.f.d + 1, this.f.b + i, this.f.c + j, 3, this.c()); + return WorldGenVillagePieces.a(worldgenvillagestartpiece, list, random, this.f.d + 1, this.f.b + i, this.f.c + j, 3, this.d()); case 1: - return WorldGenVillagePieces.a(worldgenvillagestartpiece, list, random, this.f.a + j, this.f.b + i, this.f.f + 1, 0, this.c()); + return WorldGenVillagePieces.a(worldgenvillagestartpiece, list, random, this.f.a + j, this.f.b + i, this.f.f + 1, 0, this.d()); case 2: - return WorldGenVillagePieces.a(worldgenvillagestartpiece, list, random, this.f.d + 1, this.f.b + i, this.f.c + j, 3, this.c()); + return WorldGenVillagePieces.a(worldgenvillagestartpiece, list, random, this.f.d + 1, this.f.b + i, this.f.c + j, 3, this.d()); case 3: - return WorldGenVillagePieces.a(worldgenvillagestartpiece, list, random, this.f.a + j, this.f.b + i, this.f.f + 1, 0, this.c()); + return WorldGenVillagePieces.a(worldgenvillagestartpiece, list, random, this.f.a + j, this.f.b + i, this.f.f + 1, 0, this.d()); default: return null; @@ -100,7 +117,7 @@ protected int b(int i) { } protected int d(int i, int j) { - if (this.k.b) { + if (this.b) { if (i == Block.LOG.id) { return Block.SANDSTONE.id; } @@ -130,7 +147,7 @@ protected int d(int i, int j) { } protected int e(int i, int j) { - if (this.k.b) { + if (this.b) { if (i == Block.LOG.id) { return 0; } diff --git a/net/minecraft/server/WorldGenVillagePieces.java b/net/minecraft/server/WorldGenVillagePieces.java index 9c12216cd..e08c6fe2a 100644 --- a/net/minecraft/server/WorldGenVillagePieces.java +++ b/net/minecraft/server/WorldGenVillagePieces.java @@ -7,6 +7,22 @@ public class WorldGenVillagePieces { + public static void a() { + WorldGenFactory.a(WorldGenVillageLibrary.class, "ViBH"); + WorldGenFactory.a(WorldGenVillageFarm2.class, "ViDF"); + WorldGenFactory.a(WorldGenVillageFarm.class, "ViF"); + WorldGenFactory.a(WorldGenVillageLight.class, "ViL"); + WorldGenFactory.a(WorldGenVillageButcher.class, "ViPH"); + WorldGenFactory.a(WorldGenVillageHouse.class, "ViSH"); + WorldGenFactory.a(WorldGenVillageHut.class, "ViSmH"); + WorldGenFactory.a(WorldGenVillageTemple.class, "ViST"); + WorldGenFactory.a(WorldGenVillageBlacksmith.class, "ViS"); + WorldGenFactory.a(WorldGenVillageStartPiece.class, "ViStart"); + WorldGenFactory.a(WorldGenVillageRoad.class, "ViSR"); + WorldGenFactory.a(WorldGenVillageHouse2.class, "ViTRH"); + WorldGenFactory.a(WorldGenVillageWell.class, "ViW"); + } + public static List a(Random random, int i) { ArrayList arraylist = new ArrayList(); @@ -123,7 +139,7 @@ private static WorldGenVillagePiece c(WorldGenVillageStartPiece worldgenvillages private static StructurePiece d(WorldGenVillageStartPiece worldgenvillagestartpiece, List list, Random random, int i, int j, int k, int l, int i1) { if (i1 > 50) { return null; - } else if (Math.abs(i - worldgenvillagestartpiece.b().a) <= 112 && Math.abs(k - worldgenvillagestartpiece.b().c) <= 112) { + } else if (Math.abs(i - worldgenvillagestartpiece.c().a) <= 112 && Math.abs(k - worldgenvillagestartpiece.c().c) <= 112) { WorldGenVillagePiece worldgenvillagepiece = c(worldgenvillagestartpiece, list, random, i, j, k, l, i1 + 1); if (worldgenvillagepiece != null) { @@ -133,7 +149,7 @@ private static StructurePiece d(WorldGenVillageStartPiece worldgenvillagestartpi int i2 = worldgenvillagepiece.f.f - worldgenvillagepiece.f.c; int j2 = l1 > i2 ? l1 : i2; - if (worldgenvillagestartpiece.d().a(j1, k1, j2 / 2 + 4, WorldGenVillage.e)) { + if (worldgenvillagestartpiece.e().a(j1, k1, j2 / 2 + 4, WorldGenVillage.e)) { list.add(worldgenvillagepiece); worldgenvillagestartpiece.i.add(worldgenvillagepiece); return worldgenvillagepiece; @@ -149,7 +165,7 @@ private static StructurePiece d(WorldGenVillageStartPiece worldgenvillagestartpi private static StructurePiece e(WorldGenVillageStartPiece worldgenvillagestartpiece, List list, Random random, int i, int j, int k, int l, int i1) { if (i1 > 3 + worldgenvillagestartpiece.c) { return null; - } else if (Math.abs(i - worldgenvillagestartpiece.b().a) <= 112 && Math.abs(k - worldgenvillagestartpiece.b().c) <= 112) { + } else if (Math.abs(i - worldgenvillagestartpiece.c().a) <= 112 && Math.abs(k - worldgenvillagestartpiece.c().c) <= 112) { StructureBoundingBox structureboundingbox = WorldGenVillageRoad.a(worldgenvillagestartpiece, list, random, i, j, k, l); if (structureboundingbox != null && structureboundingbox.b > 10) { @@ -160,7 +176,7 @@ private static StructurePiece e(WorldGenVillageStartPiece worldgenvillagestartpi int i2 = worldgenvillageroad.f.f - worldgenvillageroad.f.c; int j2 = l1 > i2 ? l1 : i2; - if (worldgenvillagestartpiece.d().a(j1, k1, j2 / 2 + 4, WorldGenVillage.e)) { + if (worldgenvillagestartpiece.e().a(j1, k1, j2 / 2 + 4, WorldGenVillage.e)) { list.add(worldgenvillageroad); worldgenvillagestartpiece.j.add(worldgenvillageroad); return worldgenvillageroad; diff --git a/net/minecraft/server/WorldGenVillageRoad.java b/net/minecraft/server/WorldGenVillageRoad.java index 1b6a00d2d..4154b90be 100644 --- a/net/minecraft/server/WorldGenVillageRoad.java +++ b/net/minecraft/server/WorldGenVillageRoad.java @@ -7,6 +7,8 @@ public class WorldGenVillageRoad extends WorldGenVillageRoadPiece { private int a; + public WorldGenVillageRoad() {} + public WorldGenVillageRoad(WorldGenVillageStartPiece worldgenvillagestartpiece, int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(worldgenvillagestartpiece, i); this.g = j; @@ -14,6 +16,16 @@ public WorldGenVillageRoad(WorldGenVillageStartPiece worldgenvillagestartpiece, this.a = Math.max(structureboundingbox.b(), structureboundingbox.d()); } + protected void a(NBTTagCompound nbttagcompound) { + super.a(nbttagcompound); + nbttagcompound.setInt("Length", this.a); + } + + protected void b(NBTTagCompound nbttagcompound) { + super.b(nbttagcompound); + this.a = nbttagcompound.getInt("Length"); + } + public void a(StructurePiece structurepiece, List list, Random random) { boolean flag = false; @@ -39,38 +51,38 @@ public void a(StructurePiece structurepiece, List list, Random random) { if (flag && random.nextInt(3) > 0) { switch (this.g) { case 0: - WorldGenVillagePieces.b((WorldGenVillageStartPiece) structurepiece, list, random, this.f.a - 1, this.f.b, this.f.f - 2, 1, this.c()); + WorldGenVillagePieces.b((WorldGenVillageStartPiece) structurepiece, list, random, this.f.a - 1, this.f.b, this.f.f - 2, 1, this.d()); break; case 1: - WorldGenVillagePieces.b((WorldGenVillageStartPiece) structurepiece, list, random, this.f.a, this.f.b, this.f.c - 1, 2, this.c()); + WorldGenVillagePieces.b((WorldGenVillageStartPiece) structurepiece, list, random, this.f.a, this.f.b, this.f.c - 1, 2, this.d()); break; case 2: - WorldGenVillagePieces.b((WorldGenVillageStartPiece) structurepiece, list, random, this.f.a - 1, this.f.b, this.f.c, 1, this.c()); + WorldGenVillagePieces.b((WorldGenVillageStartPiece) structurepiece, list, random, this.f.a - 1, this.f.b, this.f.c, 1, this.d()); break; case 3: - WorldGenVillagePieces.b((WorldGenVillageStartPiece) structurepiece, list, random, this.f.d - 2, this.f.b, this.f.c - 1, 2, this.c()); + WorldGenVillagePieces.b((WorldGenVillageStartPiece) structurepiece, list, random, this.f.d - 2, this.f.b, this.f.c - 1, 2, this.d()); } } if (flag && random.nextInt(3) > 0) { switch (this.g) { case 0: - WorldGenVillagePieces.b((WorldGenVillageStartPiece) structurepiece, list, random, this.f.d + 1, this.f.b, this.f.f - 2, 3, this.c()); + WorldGenVillagePieces.b((WorldGenVillageStartPiece) structurepiece, list, random, this.f.d + 1, this.f.b, this.f.f - 2, 3, this.d()); break; case 1: - WorldGenVillagePieces.b((WorldGenVillageStartPiece) structurepiece, list, random, this.f.a, this.f.b, this.f.f + 1, 0, this.c()); + WorldGenVillagePieces.b((WorldGenVillageStartPiece) structurepiece, list, random, this.f.a, this.f.b, this.f.f + 1, 0, this.d()); break; case 2: - WorldGenVillagePieces.b((WorldGenVillageStartPiece) structurepiece, list, random, this.f.d + 1, this.f.b, this.f.c, 3, this.c()); + WorldGenVillagePieces.b((WorldGenVillageStartPiece) structurepiece, list, random, this.f.d + 1, this.f.b, this.f.c, 3, this.d()); break; case 3: - WorldGenVillagePieces.b((WorldGenVillageStartPiece) structurepiece, list, random, this.f.d - 2, this.f.b, this.f.f + 1, 0, this.c()); + WorldGenVillagePieces.b((WorldGenVillageStartPiece) structurepiece, list, random, this.f.d - 2, this.f.b, this.f.f + 1, 0, this.d()); } } } diff --git a/net/minecraft/server/WorldGenVillageRoadPiece.java b/net/minecraft/server/WorldGenVillageRoadPiece.java index 7fd52fce6..a9b9c1294 100644 --- a/net/minecraft/server/WorldGenVillageRoadPiece.java +++ b/net/minecraft/server/WorldGenVillageRoadPiece.java @@ -2,6 +2,8 @@ public abstract class WorldGenVillageRoadPiece extends WorldGenVillagePiece { + public WorldGenVillageRoadPiece() {} + protected WorldGenVillageRoadPiece(WorldGenVillageStartPiece worldgenvillagestartpiece, int i) { super(worldgenvillagestartpiece, i); } diff --git a/net/minecraft/server/WorldGenVillageStart.java b/net/minecraft/server/WorldGenVillageStart.java index b0c677bdd..111fedfe9 100644 --- a/net/minecraft/server/WorldGenVillageStart.java +++ b/net/minecraft/server/WorldGenVillageStart.java @@ -4,11 +4,14 @@ import java.util.List; import java.util.Random; -class WorldGenVillageStart extends StructureStart { +public class WorldGenVillageStart extends StructureStart { private boolean c; + public WorldGenVillageStart() {} + public WorldGenVillageStart(World world, Random random, int i, int j, int k) { + super(i, j); List list = WorldGenVillagePieces.a(random, k); WorldGenVillageStartPiece worldgenvillagestartpiece = new WorldGenVillageStartPiece(world.getWorldChunkManager(), 0, random, (i << 4) + 2, (j << 4) + 2, list, k); @@ -51,4 +54,14 @@ public WorldGenVillageStart(World world, Random random, int i, int j, int k) { public boolean d() { return this.c; } + + public void a(NBTTagCompound nbttagcompound) { + super.a(nbttagcompound); + nbttagcompound.setBoolean("Valid", this.c); + } + + public void b(NBTTagCompound nbttagcompound) { + super.b(nbttagcompound); + this.c = nbttagcompound.getBoolean("Valid"); + } } diff --git a/net/minecraft/server/WorldGenVillageStartPiece.java b/net/minecraft/server/WorldGenVillageStartPiece.java index d955b3bef..5eff9bbaa 100644 --- a/net/minecraft/server/WorldGenVillageStartPiece.java +++ b/net/minecraft/server/WorldGenVillageStartPiece.java @@ -6,14 +6,16 @@ public class WorldGenVillageStartPiece extends WorldGenVillageWell { - public final WorldChunkManager a; - public final boolean b; - public final int c; + public WorldChunkManager a; + public boolean b; + public int c; public WorldGenVillagePieceWeight d; public List e; public List i = new ArrayList(); public List j = new ArrayList(); + public WorldGenVillageStartPiece() {} + public WorldGenVillageStartPiece(WorldChunkManager worldchunkmanager, int i, Random random, int j, int k, List list, int l) { super((WorldGenVillageStartPiece) null, 0, random, j, k); this.a = worldchunkmanager; @@ -22,10 +24,9 @@ public WorldGenVillageStartPiece(WorldChunkManager worldchunkmanager, int i, Ran BiomeBase biomebase = worldchunkmanager.getBiome(j, k); this.b = biomebase == BiomeBase.DESERT || biomebase == BiomeBase.DESERT_HILLS; - this.k = this; } - public WorldChunkManager d() { + public WorldChunkManager e() { return this.a; } } diff --git a/net/minecraft/server/WorldGenVillageTemple.java b/net/minecraft/server/WorldGenVillageTemple.java index 96a9a49aa..251979b76 100644 --- a/net/minecraft/server/WorldGenVillageTemple.java +++ b/net/minecraft/server/WorldGenVillageTemple.java @@ -5,7 +5,7 @@ public class WorldGenVillageTemple extends WorldGenVillagePiece { - private int a = -1; + public WorldGenVillageTemple() {} public WorldGenVillageTemple(WorldGenVillageStartPiece worldgenvillagestartpiece, int i, Random random, StructureBoundingBox structureboundingbox, int j) { super(worldgenvillagestartpiece, i); @@ -20,13 +20,13 @@ public static WorldGenVillageTemple a(WorldGenVillageStartPiece worldgenvillages } public boolean a(World world, Random random, StructureBoundingBox structureboundingbox) { - if (this.a < 0) { - this.a = this.b(world, structureboundingbox); - if (this.a < 0) { + if (this.k < 0) { + this.k = this.b(world, structureboundingbox); + if (this.k < 0) { return true; } - this.f.a(0, this.a - this.f.e + 12 - 1, 0); + this.f.a(0, this.k - this.f.e + 12 - 1, 0); } this.a(world, structureboundingbox, 1, 1, 1, 3, 3, 7, 0, 0, false); diff --git a/net/minecraft/server/WorldGenVillageWell.java b/net/minecraft/server/WorldGenVillageWell.java index f7b3936b9..89e1faff0 100644 --- a/net/minecraft/server/WorldGenVillageWell.java +++ b/net/minecraft/server/WorldGenVillageWell.java @@ -5,8 +5,7 @@ public class WorldGenVillageWell extends WorldGenVillagePiece { - private final boolean a = true; - private int b = -1; + public WorldGenVillageWell() {} public WorldGenVillageWell(WorldGenVillageStartPiece worldgenvillagestartpiece, int i, Random random, int j, int k) { super(worldgenvillagestartpiece, i); @@ -23,20 +22,20 @@ public WorldGenVillageWell(WorldGenVillageStartPiece worldgenvillagestartpiece, } public void a(StructurePiece structurepiece, List list, Random random) { - WorldGenVillagePieces.b((WorldGenVillageStartPiece) structurepiece, list, random, this.f.a - 1, this.f.e - 4, this.f.c + 1, 1, this.c()); - WorldGenVillagePieces.b((WorldGenVillageStartPiece) structurepiece, list, random, this.f.d + 1, this.f.e - 4, this.f.c + 1, 3, this.c()); - WorldGenVillagePieces.b((WorldGenVillageStartPiece) structurepiece, list, random, this.f.a + 1, this.f.e - 4, this.f.c - 1, 2, this.c()); - WorldGenVillagePieces.b((WorldGenVillageStartPiece) structurepiece, list, random, this.f.a + 1, this.f.e - 4, this.f.f + 1, 0, this.c()); + WorldGenVillagePieces.b((WorldGenVillageStartPiece) structurepiece, list, random, this.f.a - 1, this.f.e - 4, this.f.c + 1, 1, this.d()); + WorldGenVillagePieces.b((WorldGenVillageStartPiece) structurepiece, list, random, this.f.d + 1, this.f.e - 4, this.f.c + 1, 3, this.d()); + WorldGenVillagePieces.b((WorldGenVillageStartPiece) structurepiece, list, random, this.f.a + 1, this.f.e - 4, this.f.c - 1, 2, this.d()); + WorldGenVillagePieces.b((WorldGenVillageStartPiece) structurepiece, list, random, this.f.a + 1, this.f.e - 4, this.f.f + 1, 0, this.d()); } public boolean a(World world, Random random, StructureBoundingBox structureboundingbox) { - if (this.b < 0) { - this.b = this.b(world, structureboundingbox); - if (this.b < 0) { + if (this.k < 0) { + this.k = this.b(world, structureboundingbox); + if (this.k < 0) { return true; } - this.f.a(0, this.b - this.f.e + 3, 0); + this.f.a(0, this.k - this.f.e + 3, 0); } this.a(world, structureboundingbox, 1, 0, 1, 4, 12, 4, Block.COBBLESTONE.id, Block.WATER.id, false); diff --git a/net/minecraft/server/WorldGenWitchHut.java b/net/minecraft/server/WorldGenWitchHut.java index 464cfb3a5..6a2bca80e 100644 --- a/net/minecraft/server/WorldGenWitchHut.java +++ b/net/minecraft/server/WorldGenWitchHut.java @@ -6,10 +6,22 @@ public class WorldGenWitchHut extends WorldGenScatteredPiece { private boolean e; + public WorldGenWitchHut() {} + public WorldGenWitchHut(Random random, int i, int j) { super(random, i, 64, j, 7, 5, 9); } + protected void a(NBTTagCompound nbttagcompound) { + super.a(nbttagcompound); + nbttagcompound.setBoolean("Witch", this.e); + } + + protected void b(NBTTagCompound nbttagcompound) { + super.b(nbttagcompound); + this.e = nbttagcompound.getBoolean("Witch"); + } + public boolean a(World world, Random random, StructureBoundingBox structureboundingbox) { if (!this.a(world, structureboundingbox, 0)) { return false; diff --git a/net/minecraft/server/WorldServer.java b/net/minecraft/server/WorldServer.java index 93f4cd838..d86c55c11 100644 --- a/net/minecraft/server/WorldServer.java +++ b/net/minecraft/server/WorldServer.java @@ -199,7 +199,7 @@ protected void g() { j1 = k + (i1 & 15); k1 = l + (i1 >> 8 & 15); l1 = this.h(j1, k1); - if (this.F(j1, l1, k1)) { + if (this.isRainingAt(j1, l1, k1)) { this.strikeLightning(new EntityLightning(this, (double) j1, (double) l1, (double) k1)); } } @@ -588,7 +588,7 @@ protected void a() { protected void a(Entity entity) { super.a(entity); this.entitiesById.a(entity.id, entity); - Entity[] aentity = entity.an(); + Entity[] aentity = entity.ao(); if (aentity != null) { for (int i = 0; i < aentity.length; ++i) { @@ -600,7 +600,7 @@ protected void a(Entity entity) { protected void b(Entity entity) { super.b(entity); this.entitiesById.d(entity.id); - Entity[] aentity = entity.an(); + Entity[] aentity = entity.ao(); if (aentity != null) { for (int i = 0; i < aentity.length; ++i) {