summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTravis Watkins <amaranth@ubuntu.com>2014-06-26 13:05:08 -0500
committerTravis Watkins <amaranth@ubuntu.com>2014-07-08 14:31:10 -0500
commitdbb5e6e3cd35ca82efb39a44fcf6542733d2bc00 (patch)
tree062b1b273d0e0f337fde6b79f9377519d85c48c5 /src
parenta8628fd645e12ec22bc525f49dd25f68d094f3ef (diff)
downloadcraftbukkit-dbb5e6e3cd35ca82efb39a44fcf6542733d2bc00.tar
craftbukkit-dbb5e6e3cd35ca82efb39a44fcf6542733d2bc00.tar.gz
craftbukkit-dbb5e6e3cd35ca82efb39a44fcf6542733d2bc00.tar.lz
craftbukkit-dbb5e6e3cd35ca82efb39a44fcf6542733d2bc00.tar.xz
craftbukkit-dbb5e6e3cd35ca82efb39a44fcf6542733d2bc00.zip
Update CraftBukkit to Minecraft 1.7.10
Diffstat (limited to 'src')
-rw-r--r--src/main/java/net/minecraft/server/BiomeTheEndDecorator.java2
-rw-r--r--src/main/java/net/minecraft/server/Block.java14
-rw-r--r--src/main/java/net/minecraft/server/BlockActionDataList.java (renamed from src/main/java/net/minecraft/server/NoteDataList.java)6
-rw-r--r--src/main/java/net/minecraft/server/BlockBloodStone.java2
-rw-r--r--src/main/java/net/minecraft/server/BlockCocoa.java4
-rw-r--r--src/main/java/net/minecraft/server/BlockCommand.java10
-rw-r--r--src/main/java/net/minecraft/server/BlockDispenser.java4
-rw-r--r--src/main/java/net/minecraft/server/BlockFire.java56
-rw-r--r--src/main/java/net/minecraft/server/BlockFlowing.java2
-rw-r--r--src/main/java/net/minecraft/server/BlockHopper.java4
-rw-r--r--src/main/java/net/minecraft/server/BlockIce.java4
-rw-r--r--src/main/java/net/minecraft/server/BlockLeaves.java4
-rw-r--r--src/main/java/net/minecraft/server/BlockMinecartDetector.java6
-rw-r--r--src/main/java/net/minecraft/server/BlockMushroom.java2
-rw-r--r--src/main/java/net/minecraft/server/BlockPiston.java4
-rw-r--r--src/main/java/net/minecraft/server/BlockPistonExtension.java2
-rw-r--r--src/main/java/net/minecraft/server/BlockPortal.java4
-rw-r--r--src/main/java/net/minecraft/server/BlockPressurePlateBinary.java2
-rw-r--r--src/main/java/net/minecraft/server/BlockSapling.java2
-rw-r--r--src/main/java/net/minecraft/server/BlockSkull.java32
-rw-r--r--src/main/java/net/minecraft/server/BlockSnow.java2
-rw-r--r--src/main/java/net/minecraft/server/BlockStationary.java4
-rw-r--r--src/main/java/net/minecraft/server/BlockTallPlant.java6
-rw-r--r--src/main/java/net/minecraft/server/BlockTripwire.java4
-rw-r--r--src/main/java/net/minecraft/server/BlockVine.java4
-rw-r--r--src/main/java/net/minecraft/server/Chunk.java18
-rw-r--r--src/main/java/net/minecraft/server/ChunkProviderServer.java6
-rw-r--r--src/main/java/net/minecraft/server/ChunkRegionLoader.java6
-rw-r--r--src/main/java/net/minecraft/server/ChunkSection.java24
-rw-r--r--src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java8
-rw-r--r--src/main/java/net/minecraft/server/Container.java2
-rw-r--r--src/main/java/net/minecraft/server/ContainerChest.java2
-rw-r--r--src/main/java/net/minecraft/server/ContainerHopper.java2
-rw-r--r--src/main/java/net/minecraft/server/ContainerHorse.java2
-rw-r--r--src/main/java/net/minecraft/server/DedicatedServer.java260
-rw-r--r--src/main/java/net/minecraft/server/Entity.java114
-rw-r--r--src/main/java/net/minecraft/server/EntityArrow.java16
-rw-r--r--src/main/java/net/minecraft/server/EntityBoat.java16
-rw-r--r--src/main/java/net/minecraft/server/EntityChicken.java28
-rw-r--r--src/main/java/net/minecraft/server/EntityCow.java14
-rw-r--r--src/main/java/net/minecraft/server/EntityCreature.java10
-rw-r--r--src/main/java/net/minecraft/server/EntityCreeper.java22
-rw-r--r--src/main/java/net/minecraft/server/EntityDamageSourceIndirect.java2
-rw-r--r--src/main/java/net/minecraft/server/EntityEnderCrystal.java2
-rw-r--r--src/main/java/net/minecraft/server/EntityEnderDragon.java16
-rw-r--r--src/main/java/net/minecraft/server/EntityEnderPearl.java4
-rw-r--r--src/main/java/net/minecraft/server/EntityEnderman.java54
-rw-r--r--src/main/java/net/minecraft/server/EntityExperienceOrb.java6
-rw-r--r--src/main/java/net/minecraft/server/EntityFallingBlock.java26
-rw-r--r--src/main/java/net/minecraft/server/EntityFireball.java16
-rw-r--r--src/main/java/net/minecraft/server/EntityFireworks.java2
-rw-r--r--src/main/java/net/minecraft/server/EntityFishingHook.java8
-rw-r--r--src/main/java/net/minecraft/server/EntityGhast.java16
-rw-r--r--src/main/java/net/minecraft/server/EntityHanging.java6
-rw-r--r--src/main/java/net/minecraft/server/EntityHorse.java56
-rw-r--r--src/main/java/net/minecraft/server/EntityHuman.java134
-rw-r--r--src/main/java/net/minecraft/server/EntityInsentient.java44
-rw-r--r--src/main/java/net/minecraft/server/EntityIronGolem.java20
-rw-r--r--src/main/java/net/minecraft/server/EntityItem.java10
-rw-r--r--src/main/java/net/minecraft/server/EntityItemFrame.java8
-rw-r--r--src/main/java/net/minecraft/server/EntityLeash.java4
-rw-r--r--src/main/java/net/minecraft/server/EntityLiving.java226
-rw-r--r--src/main/java/net/minecraft/server/EntityMinecartAbstract.java28
-rw-r--r--src/main/java/net/minecraft/server/EntityMinecartCommandBlockListener.java2
-rw-r--r--src/main/java/net/minecraft/server/EntityMinecartContainer.java2
-rw-r--r--src/main/java/net/minecraft/server/EntityMonster.java20
-rw-r--r--src/main/java/net/minecraft/server/EntityOcelot.java20
-rw-r--r--src/main/java/net/minecraft/server/EntityPig.java18
-rw-r--r--src/main/java/net/minecraft/server/EntityPigZombie.java16
-rw-r--r--src/main/java/net/minecraft/server/EntityPlayer.java57
-rw-r--r--src/main/java/net/minecraft/server/EntityProjectile.java10
-rw-r--r--src/main/java/net/minecraft/server/EntitySheep.java20
-rw-r--r--src/main/java/net/minecraft/server/EntitySilverfish.java18
-rw-r--r--src/main/java/net/minecraft/server/EntitySkeleton.java36
-rw-r--r--src/main/java/net/minecraft/server/EntitySlime.java20
-rw-r--r--src/main/java/net/minecraft/server/EntitySmallFireball.java2
-rw-r--r--src/main/java/net/minecraft/server/EntitySnowman.java12
-rw-r--r--src/main/java/net/minecraft/server/EntitySpider.java18
-rw-r--r--src/main/java/net/minecraft/server/EntitySquid.java20
-rw-r--r--src/main/java/net/minecraft/server/EntityTNTPrimed.java2
-rw-r--r--src/main/java/net/minecraft/server/EntityTrackerEntry.java10
-rw-r--r--src/main/java/net/minecraft/server/EntityWither.java26
-rw-r--r--src/main/java/net/minecraft/server/EntityWitherSkull.java10
-rw-r--r--src/main/java/net/minecraft/server/EntityWolf.java32
-rw-r--r--src/main/java/net/minecraft/server/EntityZombie.java36
-rw-r--r--src/main/java/net/minecraft/server/ExpirableListEntry.java2
-rw-r--r--src/main/java/net/minecraft/server/FoodMetaData.java6
-rw-r--r--src/main/java/net/minecraft/server/HandshakeListener.java4
-rw-r--r--src/main/java/net/minecraft/server/IInventory.java2
-rw-r--r--src/main/java/net/minecraft/server/InventoryCraftResult.java2
-rw-r--r--src/main/java/net/minecraft/server/InventoryCrafting.java2
-rw-r--r--src/main/java/net/minecraft/server/InventoryEnderChest.java4
-rw-r--r--src/main/java/net/minecraft/server/InventoryLargeChest.java6
-rw-r--r--src/main/java/net/minecraft/server/InventoryMerchant.java2
-rw-r--r--src/main/java/net/minecraft/server/InventorySubcontainer.java2
-rw-r--r--src/main/java/net/minecraft/server/Item.java10
-rw-r--r--src/main/java/net/minecraft/server/ItemBoat.java4
-rw-r--r--src/main/java/net/minecraft/server/ItemFishingRod.java4
-rw-r--r--src/main/java/net/minecraft/server/ItemMonsterEgg.java2
-rw-r--r--src/main/java/net/minecraft/server/ItemStack.java18
-rw-r--r--src/main/java/net/minecraft/server/JsonList.java12
-rw-r--r--src/main/java/net/minecraft/server/JsonListEntry.java4
-rw-r--r--src/main/java/net/minecraft/server/MinecraftServer.java6
-rw-r--r--src/main/java/net/minecraft/server/MobEffectList.java12
-rw-r--r--src/main/java/net/minecraft/server/MobSpawnerAbstract.java4
-rw-r--r--src/main/java/net/minecraft/server/NameReferencingFileConverter.java2
-rw-r--r--src/main/java/net/minecraft/server/PacketDataSerializer.java4
-rw-r--r--src/main/java/net/minecraft/server/PacketPlayOutBlockChange.java6
-rw-r--r--src/main/java/net/minecraft/server/PacketPlayOutNamedEntitySpawn.java2
-rw-r--r--src/main/java/net/minecraft/server/PathfinderGoalBreakDoor.java4
-rw-r--r--src/main/java/net/minecraft/server/PathfinderGoalBreed.java4
-rw-r--r--src/main/java/net/minecraft/server/PathfinderGoalEatTile.java4
-rw-r--r--src/main/java/net/minecraft/server/PathfinderGoalHurtByTarget.java4
-rw-r--r--src/main/java/net/minecraft/server/PathfinderGoalMakeLove.java4
-rw-r--r--src/main/java/net/minecraft/server/PathfinderGoalMeleeAttack.java8
-rw-r--r--src/main/java/net/minecraft/server/PathfinderGoalPanic.java2
-rw-r--r--src/main/java/net/minecraft/server/PathfinderGoalSit.java2
-rw-r--r--src/main/java/net/minecraft/server/PathfinderGoalTame.java4
-rw-r--r--src/main/java/net/minecraft/server/PathfinderGoalTarget.java2
-rw-r--r--src/main/java/net/minecraft/server/PlayerChunk.java2
-rw-r--r--src/main/java/net/minecraft/server/PlayerConnection.java49
-rw-r--r--src/main/java/net/minecraft/server/PlayerInteractManager.java14
-rw-r--r--src/main/java/net/minecraft/server/PlayerInventory.java4
-rw-r--r--src/main/java/net/minecraft/server/PlayerList.java14
-rw-r--r--src/main/java/net/minecraft/server/PlayerSelector.java2
-rw-r--r--src/main/java/net/minecraft/server/PortalTravelAgent.java2
-rw-r--r--src/main/java/net/minecraft/server/PropertyManager.java2
-rw-r--r--src/main/java/net/minecraft/server/SpawnerCreature.java4
-rw-r--r--src/main/java/net/minecraft/server/StatisticManager.java4
-rw-r--r--src/main/java/net/minecraft/server/TileEntity.java2
-rw-r--r--src/main/java/net/minecraft/server/TileEntityBeacon.java2
-rw-r--r--src/main/java/net/minecraft/server/TileEntityBrewingStand.java2
-rw-r--r--src/main/java/net/minecraft/server/TileEntityChest.java6
-rw-r--r--src/main/java/net/minecraft/server/TileEntityCommandListener.java4
-rw-r--r--src/main/java/net/minecraft/server/TileEntityDispenser.java2
-rw-r--r--src/main/java/net/minecraft/server/TileEntityFurnace.java2
-rw-r--r--src/main/java/net/minecraft/server/TileEntityHopper.java16
-rw-r--r--src/main/java/net/minecraft/server/TileEntityNote.java2
-rw-r--r--src/main/java/net/minecraft/server/TileEntityPiston.java4
-rw-r--r--src/main/java/net/minecraft/server/TileEntityRecordPlayer.java4
-rw-r--r--src/main/java/net/minecraft/server/TileEntitySkull.java6
-rw-r--r--src/main/java/net/minecraft/server/VillageSiege.java2
-rw-r--r--src/main/java/net/minecraft/server/World.java31
-rw-r--r--src/main/java/net/minecraft/server/WorldGenBigTree.java2
-rw-r--r--src/main/java/net/minecraft/server/WorldGenWitchHut.java2
-rw-r--r--src/main/java/net/minecraft/server/WorldMap.java8
-rw-r--r--src/main/java/net/minecraft/server/WorldServer.java42
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftChunk.java4
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftProfileBanList.java10
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftServer.java18
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftWorld.java18
-rw-r--r--src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java6
-rw-r--r--src/main/java/org/bukkit/craftbukkit/block/CraftCommandBlock.java8
-rw-r--r--src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java16
-rw-r--r--src/main/java/org/bukkit/craftbukkit/block/CraftNoteBlock.java4
-rw-r--r--src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java4
-rw-r--r--src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java12
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftBat.java4
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java4
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java4
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartCommand.java8
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java19
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftWitherSkull.java4
-rw-r--r--src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java10
-rw-r--r--src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java6
-rw-r--r--src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java4
-rw-r--r--src/main/java/org/bukkit/craftbukkit/map/CraftMapRenderer.java4
-rw-r--r--src/main/java/org/bukkit/craftbukkit/scoreboard/CraftCriteria.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java4
-rw-r--r--src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/util/CraftDamageSource.java8
-rw-r--r--src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java18
-rw-r--r--src/main/java/org/bukkit/craftbukkit/util/StructureGrowDelegate.java2
-rw-r--r--src/test/java/org/bukkit/StatisticsAndAchievementsTest.java2
-rw-r--r--src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java2
181 files changed, 1225 insertions, 1221 deletions
diff --git a/src/main/java/net/minecraft/server/BiomeTheEndDecorator.java b/src/main/java/net/minecraft/server/BiomeTheEndDecorator.java
index 0ba653ce..2f4e7495 100644
--- a/src/main/java/net/minecraft/server/BiomeTheEndDecorator.java
+++ b/src/main/java/net/minecraft/server/BiomeTheEndDecorator.java
@@ -15,7 +15,7 @@ public class BiomeTheEndDecorator extends BiomeDecorator {
int j = this.d + this.b.nextInt(16) + 8;
int k = this.a.i(i, j);
- this.J.a(this.a, this.b, i, k, j);
+ this.J.generate(this.a, this.b, i, k, j);
}
if (this.c == 0 && this.d == 0) {
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index 14c00c5a..9876ebfa 100644
--- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java
@@ -44,21 +44,21 @@ public class Block {
public float frictionFactor;
private String name;
- public static int b(Block block) {
+ public static int getId(Block block) {
return REGISTRY.b(block);
}
- public static Block e(int i) {
+ public static Block getById(int i) {
return (Block) REGISTRY.a(i);
}
public static Block a(Item item) {
- return e(Item.b(item));
+ return getById(Item.getId(item));
}
public static Block b(String s) {
if (REGISTRY.b(s)) {
- return (Block) REGISTRY.a(s);
+ return (Block) REGISTRY.get(s);
} else {
try {
return (Block) REGISTRY.a(Integer.parseInt(s));
@@ -681,8 +681,8 @@ public class Block {
public void g() {}
public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) {
- entityhuman.a(StatisticList.MINE_BLOCK_COUNT[b(this)], 1);
- entityhuman.a(0.025F);
+ entityhuman.a(StatisticList.MINE_BLOCK_COUNT[getId(this)], 1);
+ entityhuman.applyExhaustion(0.025F);
if (this.E() && EnchantmentManager.hasSilkTouchEnchantment(entityhuman)) {
ItemStack itemstack = this.j(l);
@@ -786,7 +786,7 @@ public class Block {
return block != null && block1 != null ? (block == block1 ? true : block.c(block1)) : false;
}
- public boolean M() {
+ public boolean isComplexRedstone() {
return false;
}
diff --git a/src/main/java/net/minecraft/server/NoteDataList.java b/src/main/java/net/minecraft/server/BlockActionDataList.java
index 75e26bf4..30109ecc 100644
--- a/src/main/java/net/minecraft/server/NoteDataList.java
+++ b/src/main/java/net/minecraft/server/BlockActionDataList.java
@@ -3,11 +3,11 @@ package net.minecraft.server;
import java.util.ArrayList;
// CraftBukkit - imported class because the constructor is package private
-class NoteDataList extends ArrayList {
+class BlockActionDataList extends ArrayList {
- private NoteDataList() {}
+ private BlockActionDataList() {}
- NoteDataList(EmptyClass2 emptyclass2) {
+ BlockActionDataList(BananaAPI bananaapi) {
this();
}
}
diff --git a/src/main/java/net/minecraft/server/BlockBloodStone.java b/src/main/java/net/minecraft/server/BlockBloodStone.java
index f10f9dda..ca46ea62 100644
--- a/src/main/java/net/minecraft/server/BlockBloodStone.java
+++ b/src/main/java/net/minecraft/server/BlockBloodStone.java
@@ -15,7 +15,7 @@ public class BlockBloodStone extends Block {
// CraftBukkit start
public void doPhysics(World world, int i, int j, int k, int l) {
- if (net.minecraft.server.Block.e(l) != null && net.minecraft.server.Block.e(l).isPowerSource()) {
+ if (net.minecraft.server.Block.getById(l) != null && net.minecraft.server.Block.getById(l).isPowerSource()) {
org.bukkit.block.Block block = world.getWorld().getBlockAt(i, j, k);
int power = block.getBlockPower();
diff --git a/src/main/java/net/minecraft/server/BlockCocoa.java b/src/main/java/net/minecraft/server/BlockCocoa.java
index 88efe0b3..5584fbd9 100644
--- a/src/main/java/net/minecraft/server/BlockCocoa.java
+++ b/src/main/java/net/minecraft/server/BlockCocoa.java
@@ -14,7 +14,7 @@ public class BlockCocoa extends BlockDirectional implements IBlockFragilePlantEl
public void a(World world, int i, int j, int k, Random random) {
if (!this.j(world, i, j, k)) {
this.b(world, i, j, k, world.getData(i, j, k), 0);
- world.setTypeAndData(i, j, k, e(0), 0, 2);
+ world.setTypeAndData(i, j, k, getById(0), 0, 2);
} else if (world.random.nextInt(5) == 0) {
int l = world.getData(i, j, k);
int i1 = c(l);
@@ -97,7 +97,7 @@ public class BlockCocoa extends BlockDirectional implements IBlockFragilePlantEl
public void doPhysics(World world, int i, int j, int k, Block block) {
if (!this.j(world, i, j, k)) {
this.b(world, i, j, k, world.getData(i, j, k), 0);
- world.setTypeAndData(i, j, k, e(0), 0, 2);
+ world.setTypeAndData(i, j, k, getById(0), 0, 2);
}
}
diff --git a/src/main/java/net/minecraft/server/BlockCommand.java b/src/main/java/net/minecraft/server/BlockCommand.java
index b09f23b7..c60f0a94 100644
--- a/src/main/java/net/minecraft/server/BlockCommand.java
+++ b/src/main/java/net/minecraft/server/BlockCommand.java
@@ -42,10 +42,10 @@ public class BlockCommand extends BlockContainer {
TileEntity tileentity = world.getTileEntity(i, j, k);
if (tileentity != null && tileentity instanceof TileEntityCommand) {
- CommandBlockListenerAbstract commandblocklistenerabstract = ((TileEntityCommand) tileentity).a();
+ CommandBlockListenerAbstract commandblocklistenerabstract = ((TileEntityCommand) tileentity).getCommandBlock();
commandblocklistenerabstract.a(world);
- world.f(i, j, k, this);
+ world.updateAdjacentComparators(i, j, k, this);
}
}
@@ -63,21 +63,21 @@ public class BlockCommand extends BlockContainer {
return true;
}
- public boolean M() {
+ public boolean isComplexRedstone() {
return true;
}
public int g(World world, int i, int j, int k, int l) {
TileEntity tileentity = world.getTileEntity(i, j, k);
- return tileentity != null && tileentity instanceof TileEntityCommand ? ((TileEntityCommand) tileentity).a().g() : 0;
+ return tileentity != null && tileentity instanceof TileEntityCommand ? ((TileEntityCommand) tileentity).getCommandBlock().g() : 0;
}
public void postPlace(World world, int i, int j, int k, EntityLiving entityliving, ItemStack itemstack) {
TileEntityCommand tileentitycommand = (TileEntityCommand) world.getTileEntity(i, j, k);
if (itemstack.hasName()) {
- tileentitycommand.a().b(itemstack.getName());
+ tileentitycommand.getCommandBlock().setName(itemstack.getName());
}
}
diff --git a/src/main/java/net/minecraft/server/BlockDispenser.java b/src/main/java/net/minecraft/server/BlockDispenser.java
index a419ef38..9450df9b 100644
--- a/src/main/java/net/minecraft/server/BlockDispenser.java
+++ b/src/main/java/net/minecraft/server/BlockDispenser.java
@@ -160,7 +160,7 @@ public class BlockDispenser extends BlockContainer {
}
}
- world.f(i, j, k, block);
+ world.updateAdjacentComparators(i, j, k, block);
}
super.remove(world, i, j, k, block, l);
@@ -179,7 +179,7 @@ public class BlockDispenser extends BlockContainer {
return EnumFacing.a(i & 7);
}
- public boolean M() {
+ public boolean isComplexRedstone() {
return true;
}
diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java
index ba5e77fc..44994a14 100644
--- a/src/main/java/net/minecraft/server/BlockFire.java
+++ b/src/main/java/net/minecraft/server/BlockFire.java
@@ -19,29 +19,29 @@ public class BlockFire extends Block {
}
public static void e() {
- Blocks.FIRE.a(b(Blocks.WOOD), 5, 20);
- Blocks.FIRE.a(b(Blocks.WOOD_DOUBLE_STEP), 5, 20);
- Blocks.FIRE.a(b(Blocks.WOOD_STEP), 5, 20);
- Blocks.FIRE.a(b(Blocks.FENCE), 5, 20);
- Blocks.FIRE.a(b(Blocks.WOOD_STAIRS), 5, 20);
- Blocks.FIRE.a(b(Blocks.BIRCH_WOOD_STAIRS), 5, 20);
- Blocks.FIRE.a(b(Blocks.SPRUCE_WOOD_STAIRS), 5, 20);
- Blocks.FIRE.a(b(Blocks.JUNGLE_WOOD_STAIRS), 5, 20);
- Blocks.FIRE.a(b(Blocks.LOG), 5, 5);
- Blocks.FIRE.a(b(Blocks.LOG2), 5, 5);
- Blocks.FIRE.a(b(Blocks.LEAVES), 30, 60);
- Blocks.FIRE.a(b(Blocks.LEAVES2), 30, 60);
- Blocks.FIRE.a(b(Blocks.BOOKSHELF), 30, 20);
- Blocks.FIRE.a(b(Blocks.TNT), 15, 100);
- Blocks.FIRE.a(b(Blocks.LONG_GRASS), 60, 100);
- Blocks.FIRE.a(b(Blocks.DOUBLE_PLANT), 60, 100);
- Blocks.FIRE.a(b(Blocks.YELLOW_FLOWER), 60, 100);
- Blocks.FIRE.a(b(Blocks.RED_ROSE), 60, 100);
- Blocks.FIRE.a(b(Blocks.WOOL), 30, 60);
- Blocks.FIRE.a(b(Blocks.VINE), 15, 100);
- Blocks.FIRE.a(b(Blocks.COAL_BLOCK), 5, 5);
- Blocks.FIRE.a(b(Blocks.HAY_BLOCK), 60, 20);
- Blocks.FIRE.a(b(Blocks.WOOL_CARPET), 60, 20);
+ Blocks.FIRE.a(getId(Blocks.WOOD), 5, 20);
+ Blocks.FIRE.a(getId(Blocks.WOOD_DOUBLE_STEP), 5, 20);
+ Blocks.FIRE.a(getId(Blocks.WOOD_STEP), 5, 20);
+ Blocks.FIRE.a(getId(Blocks.FENCE), 5, 20);
+ Blocks.FIRE.a(getId(Blocks.WOOD_STAIRS), 5, 20);
+ Blocks.FIRE.a(getId(Blocks.BIRCH_WOOD_STAIRS), 5, 20);
+ Blocks.FIRE.a(getId(Blocks.SPRUCE_WOOD_STAIRS), 5, 20);
+ Blocks.FIRE.a(getId(Blocks.JUNGLE_WOOD_STAIRS), 5, 20);
+ Blocks.FIRE.a(getId(Blocks.LOG), 5, 5);
+ Blocks.FIRE.a(getId(Blocks.LOG2), 5, 5);
+ Blocks.FIRE.a(getId(Blocks.LEAVES), 30, 60);
+ Blocks.FIRE.a(getId(Blocks.LEAVES2), 30, 60);
+ Blocks.FIRE.a(getId(Blocks.BOOKSHELF), 30, 20);
+ Blocks.FIRE.a(getId(Blocks.TNT), 15, 100);
+ Blocks.FIRE.a(getId(Blocks.LONG_GRASS), 60, 100);
+ Blocks.FIRE.a(getId(Blocks.DOUBLE_PLANT), 60, 100);
+ Blocks.FIRE.a(getId(Blocks.YELLOW_FLOWER), 60, 100);
+ Blocks.FIRE.a(getId(Blocks.RED_ROSE), 60, 100);
+ Blocks.FIRE.a(getId(Blocks.WOOL), 30, 60);
+ Blocks.FIRE.a(getId(Blocks.VINE), 15, 100);
+ Blocks.FIRE.a(getId(Blocks.COAL_BLOCK), 5, 5);
+ Blocks.FIRE.a(getId(Blocks.HAY_BLOCK), 60, 20);
+ Blocks.FIRE.a(getId(Blocks.WOOL_CARPET), 60, 20);
}
public void a(int i, int j, int k) {
@@ -151,8 +151,8 @@ public class BlockFire extends Block {
org.bukkit.Server server = world.getServer();
org.bukkit.World bworld = world.getWorld();
org.bukkit.block.BlockState blockState = bworld.getBlockAt(i1, k1, j1).getState();
- blockState.setTypeId(Block.b(this));
- blockState.setData(new org.bukkit.material.MaterialData(Block.b(this), (byte) k2));
+ blockState.setTypeId(Block.getId(this));
+ blockState.setData(new org.bukkit.material.MaterialData(Block.getId(this), (byte) k2));
BlockSpreadEvent spreadEvent = new BlockSpreadEvent(blockState.getBlock(), bworld.getBlockAt(i, j, k), blockState);
server.getPluginManager().callEvent(spreadEvent);
@@ -178,7 +178,7 @@ public class BlockFire extends Block {
}
private void a(World world, int i, int j, int k, int l, Random random, int i1) {
- int j1 = this.b[Block.b(world.getType(i, j, k))];
+ int j1 = this.b[Block.getId(world.getType(i, j, k))];
if (random.nextInt(l) < j1) {
boolean flag = world.getType(i, j, k) == Blocks.TNT;
@@ -238,11 +238,11 @@ public class BlockFire extends Block {
}
public boolean e(IBlockAccess iblockaccess, int i, int j, int k) {
- return this.a[Block.b(iblockaccess.getType(i, j, k))] > 0;
+ return this.a[Block.getId(iblockaccess.getType(i, j, k))] > 0;
}
public int a(World world, int i, int j, int k, int l) {
- int i1 = this.a[Block.b(world.getType(i, j, k))];
+ int i1 = this.a[Block.getId(world.getType(i, j, k))];
return i1 > l ? i1 : l;
}
diff --git a/src/main/java/net/minecraft/server/BlockFlowing.java b/src/main/java/net/minecraft/server/BlockFlowing.java
index 5ebba1e3..cdce3ff1 100644
--- a/src/main/java/net/minecraft/server/BlockFlowing.java
+++ b/src/main/java/net/minecraft/server/BlockFlowing.java
@@ -20,7 +20,7 @@ public class BlockFlowing extends BlockFluids {
private void n(World world, int i, int j, int k) {
int l = world.getData(i, j, k);
- world.setTypeAndData(i, j, k, Block.e(Block.b((Block) this) + 1), l, 2);
+ world.setTypeAndData(i, j, k, Block.getById(Block.getId(this) + 1), l, 2);
}
public void a(World world, int i, int j, int k, Random random) {
diff --git a/src/main/java/net/minecraft/server/BlockHopper.java b/src/main/java/net/minecraft/server/BlockHopper.java
index 9e64702b..b85b72f3 100644
--- a/src/main/java/net/minecraft/server/BlockHopper.java
+++ b/src/main/java/net/minecraft/server/BlockHopper.java
@@ -126,7 +126,7 @@ public class BlockHopper extends BlockContainer {
}
}
- world.f(i, j, k, block);
+ world.updateAdjacentComparators(i, j, k, block);
}
super.remove(world, i, j, k, block, l);
@@ -152,7 +152,7 @@ public class BlockHopper extends BlockContainer {
return (i & 8) != 8;
}
- public boolean M() {
+ public boolean isComplexRedstone() {
return true;
}
diff --git a/src/main/java/net/minecraft/server/BlockIce.java b/src/main/java/net/minecraft/server/BlockIce.java
index f55aa64f..25cb3271 100644
--- a/src/main/java/net/minecraft/server/BlockIce.java
+++ b/src/main/java/net/minecraft/server/BlockIce.java
@@ -12,8 +12,8 @@ public class BlockIce extends BlockHalfTransparent {
}
public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) {
- entityhuman.a(StatisticList.MINE_BLOCK_COUNT[Block.b((Block) this)], 1);
- entityhuman.a(0.025F);
+ entityhuman.a(StatisticList.MINE_BLOCK_COUNT[Block.getId(this)], 1);
+ entityhuman.applyExhaustion(0.025F);
if (this.E() && EnchantmentManager.hasSilkTouchEnchantment(entityhuman)) {
ItemStack itemstack = this.j(l);
diff --git a/src/main/java/net/minecraft/server/BlockLeaves.java b/src/main/java/net/minecraft/server/BlockLeaves.java
index 56014324..d6afe5b0 100644
--- a/src/main/java/net/minecraft/server/BlockLeaves.java
+++ b/src/main/java/net/minecraft/server/BlockLeaves.java
@@ -179,8 +179,8 @@ public abstract class BlockLeaves extends BlockTransparent {
}
public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) {
- if (!world.isStatic && entityhuman.bE() != null && entityhuman.bE().getItem() == Items.SHEARS) {
- entityhuman.a(StatisticList.MINE_BLOCK_COUNT[Block.b((Block) this)], 1);
+ if (!world.isStatic && entityhuman.bF() != null && entityhuman.bF().getItem() == Items.SHEARS) {
+ entityhuman.a(StatisticList.MINE_BLOCK_COUNT[Block.getId(this)], 1);
this.a(world, i, j, k, new ItemStack(Item.getItemOf(this), 1, l & 3));
} else {
super.a(world, entityhuman, i, j, k, l);
diff --git a/src/main/java/net/minecraft/server/BlockMinecartDetector.java b/src/main/java/net/minecraft/server/BlockMinecartDetector.java
index 418c92b8..207da243 100644
--- a/src/main/java/net/minecraft/server/BlockMinecartDetector.java
+++ b/src/main/java/net/minecraft/server/BlockMinecartDetector.java
@@ -87,7 +87,7 @@ public class BlockMinecartDetector extends BlockMinecartTrackAbstract {
world.a(i, j, k, this, this.a(world));
}
- world.f(i, j, k, this);
+ world.updateAdjacentComparators(i, j, k, this);
}
public void onPlace(World world, int i, int j, int k) {
@@ -95,7 +95,7 @@ public class BlockMinecartDetector extends BlockMinecartTrackAbstract {
this.a(world, i, j, k, world.getData(i, j, k));
}
- public boolean M() {
+ public boolean isComplexRedstone() {
return true;
}
@@ -105,7 +105,7 @@ public class BlockMinecartDetector extends BlockMinecartTrackAbstract {
List list = world.a(EntityMinecartCommandBlock.class, AxisAlignedBB.a((double) ((float) i + f), (double) j, (double) ((float) k + f), (double) ((float) (i + 1) - f), (double) ((float) (j + 1) - f), (double) ((float) (k + 1) - f)));
if (list.size() > 0) {
- return ((EntityMinecartCommandBlock) list.get(0)).e().g();
+ return ((EntityMinecartCommandBlock) list.get(0)).getCommandBlock().g();
}
List list1 = world.a(EntityMinecartAbstract.class, AxisAlignedBB.a((double) ((float) i + f), (double) j, (double) ((float) k + f), (double) ((float) (i + 1) - f), (double) ((float) (j + 1) - f), (double) ((float) (k + 1) - f)), IEntitySelector.c);
diff --git a/src/main/java/net/minecraft/server/BlockMushroom.java b/src/main/java/net/minecraft/server/BlockMushroom.java
index 5b90eb9c..6671a84b 100644
--- a/src/main/java/net/minecraft/server/BlockMushroom.java
+++ b/src/main/java/net/minecraft/server/BlockMushroom.java
@@ -104,7 +104,7 @@ public class BlockMushroom extends BlockPlant implements IBlockFragilePlantEleme
worldgenhugemushroom = new WorldGenHugeMushroom(1);
}
- if (worldgenhugemushroom != null && worldgenhugemushroom.a(world, random, i, j, k)) {
+ if (worldgenhugemushroom != null && worldgenhugemushroom.generate(world, random, i, j, k)) {
return true;
} else {
world.setTypeAndData(i, j, k, this, l, 3);
diff --git a/src/main/java/net/minecraft/server/BlockPiston.java b/src/main/java/net/minecraft/server/BlockPiston.java
index 7822de7d..8d8963cc 100644
--- a/src/main/java/net/minecraft/server/BlockPiston.java
+++ b/src/main/java/net/minecraft/server/BlockPiston.java
@@ -73,7 +73,7 @@ public class BlockPiston extends Block {
}
// CraftBukkit end
- world.playNote(i, j, k, this, 0, i1);
+ world.playBlockAction(i, j, k, this, 0, i1);
}
} else if (!flag && c(l)) {
// CraftBukkit start
@@ -87,7 +87,7 @@ public class BlockPiston extends Block {
// CraftBukkit end
world.setData(i, j, k, i1, 2);
- world.playNote(i, j, k, this, 1, i1);
+ world.playBlockAction(i, j, k, this, 1, i1);
}
}
}
diff --git a/src/main/java/net/minecraft/server/BlockPistonExtension.java b/src/main/java/net/minecraft/server/BlockPistonExtension.java
index c432640b..cb7455da 100644
--- a/src/main/java/net/minecraft/server/BlockPistonExtension.java
+++ b/src/main/java/net/minecraft/server/BlockPistonExtension.java
@@ -164,6 +164,6 @@ public class BlockPistonExtension extends Block {
}
public static int b(int i) {
- return i & 7;
+ return MathHelper.a(i & 7, 0, Facing.b.length - 1);
}
}
diff --git a/src/main/java/net/minecraft/server/BlockPortal.java b/src/main/java/net/minecraft/server/BlockPortal.java
index 1356f132..bec5aa8a 100644
--- a/src/main/java/net/minecraft/server/BlockPortal.java
+++ b/src/main/java/net/minecraft/server/BlockPortal.java
@@ -27,7 +27,7 @@ public class BlockPortal extends BlockHalfTransparent {
Entity entity = ItemMonsterEgg.spawnCreature(world, 57, (double) i + 0.5D, (double) l + 1.1D, (double) k + 0.5D, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NETHER_PORTAL);
if (entity != null) {
- entity.portalCooldown = entity.ah();
+ entity.portalCooldown = entity.ai();
}
}
}
@@ -112,7 +112,7 @@ public class BlockPortal extends BlockHalfTransparent {
world.getServer().getPluginManager().callEvent(event);
// CraftBukkit end
- entity.ag();
+ entity.ah();
}
}
diff --git a/src/main/java/net/minecraft/server/BlockPressurePlateBinary.java b/src/main/java/net/minecraft/server/BlockPressurePlateBinary.java
index ce8b9dc7..25ef883d 100644
--- a/src/main/java/net/minecraft/server/BlockPressurePlateBinary.java
+++ b/src/main/java/net/minecraft/server/BlockPressurePlateBinary.java
@@ -63,7 +63,7 @@ public class BlockPressurePlateBinary extends BlockPressurePlateAbstract {
}
// CraftBukkit end
- if (!entity.ay()) {
+ if (!entity.az()) {
return 15;
}
}
diff --git a/src/main/java/net/minecraft/server/BlockSapling.java b/src/main/java/net/minecraft/server/BlockSapling.java
index 4152bd70..89e60a88 100644
--- a/src/main/java/net/minecraft/server/BlockSapling.java
+++ b/src/main/java/net/minecraft/server/BlockSapling.java
@@ -169,7 +169,7 @@ public class BlockSapling extends BlockPlant implements IBlockFragilePlantElemen
world.setTypeAndData(i, j, k, block, 0, 4);
}
- if (!((WorldGenerator) object).a(world, random, i + i1, j, k + j1)) {
+ if (!((WorldGenerator) object).generate(world, random, i + i1, j, k + j1)) {
if (flag) {
world.setTypeAndData(i + i1, j, k + j1, this, l, 4);
world.setTypeAndData(i + i1 + 1, j, k + j1, this, l, 4);
diff --git a/src/main/java/net/minecraft/server/BlockSkull.java b/src/main/java/net/minecraft/server/BlockSkull.java
index b05f4639..3075dbc8 100644
--- a/src/main/java/net/minecraft/server/BlockSkull.java
+++ b/src/main/java/net/minecraft/server/BlockSkull.java
@@ -88,7 +88,7 @@ public class BlockSkull extends BlockContainer {
itemstack.setTag(new NBTTagCompound());
NBTTagCompound nbttagcompound = new NBTTagCompound();
- GameProfileSerializer.a(nbttagcompound, tileentityskull.getGameProfile());
+ GameProfileSerializer.serialize(nbttagcompound, tileentityskull.getGameProfile());
itemstack.getTag().set("SkullOwner", nbttagcompound);
}
@@ -119,7 +119,7 @@ public class BlockSkull extends BlockContainer {
itemstack.setTag(new NBTTagCompound());
NBTTagCompound nbttagcompound = new NBTTagCompound();
- GameProfileSerializer.a(nbttagcompound, tileentityskull.getGameProfile());
+ GameProfileSerializer.serialize(nbttagcompound, tileentityskull.getGameProfile());
itemstack.getTag().set("SkullOwner", nbttagcompound);
}
@@ -151,13 +151,13 @@ public class BlockSkull extends BlockContainer {
world.setData(i, j, k + l + 1, 8, 2);
world.setData(i, j, k + l + 2, 8, 2);
- blockList.setTypeAndData(i, j, k + l, e(0), 0, 2);
- blockList.setTypeAndData(i, j, k + l + 1, e(0), 0, 2);
- blockList.setTypeAndData(i, j, k + l + 2, e(0), 0, 2);
- blockList.setTypeAndData(i, j - 1, k + l, e(0), 0, 2);
- blockList.setTypeAndData(i, j - 1, k + l + 1, e(0), 0, 2);
- blockList.setTypeAndData(i, j - 1, k + l + 2, e(0), 0, 2);
- blockList.setTypeAndData(i, j - 2, k + l + 1, e(0), 0, 2);
+ blockList.setTypeAndData(i, j, k + l, getById(0), 0, 2);
+ blockList.setTypeAndData(i, j, k + l + 1, getById(0), 0, 2);
+ blockList.setTypeAndData(i, j, k + l + 2, getById(0), 0, 2);
+ blockList.setTypeAndData(i, j - 1, k + l, getById(0), 0, 2);
+ blockList.setTypeAndData(i, j - 1, k + l + 1, getById(0), 0, 2);
+ blockList.setTypeAndData(i, j - 1, k + l + 2, getById(0), 0, 2);
+ blockList.setTypeAndData(i, j - 2, k + l + 1, getById(0), 0, 2);
if (!world.isStatic) {
entitywither = new EntityWither(world);
@@ -196,13 +196,13 @@ public class BlockSkull extends BlockContainer {
world.setData(i + l + 1, j, k, 8, 2);
world.setData(i + l + 2, j, k, 8, 2);
- blockList.setTypeAndData(i + l, j, k, e(0), 0, 2);
- blockList.setTypeAndData(i + l + 1, j, k, e(0), 0, 2);
- blockList.setTypeAndData(i + l + 2, j, k, e(0), 0, 2);
- blockList.setTypeAndData(i + l, j - 1, k, e(0), 0, 2);
- blockList.setTypeAndData(i + l + 1, j - 1, k, e(0), 0, 2);
- blockList.setTypeAndData(i + l + 2, j - 1, k, e(0), 0, 2);
- blockList.setTypeAndData(i + l + 1, j - 2, k, e(0), 0, 2);
+ blockList.setTypeAndData(i + l, j, k, getById(0), 0, 2);
+ blockList.setTypeAndData(i + l + 1, j, k, getById(0), 0, 2);
+ blockList.setTypeAndData(i + l + 2, j, k, getById(0), 0, 2);
+ blockList.setTypeAndData(i + l, j - 1, k, getById(0), 0, 2);
+ blockList.setTypeAndData(i + l + 1, j - 1, k, getById(0), 0, 2);
+ blockList.setTypeAndData(i + l + 2, j - 1, k, getById(0), 0, 2);
+ blockList.setTypeAndData(i + l + 1, j - 2, k, getById(0), 0, 2);
if (!world.isStatic) {
entitywither = new EntityWither(world);
entitywither.setPositionRotation((double) (i + l) + 1.5D, (double) j - 1.45D, (double) k + 0.5D, 0.0F, 0.0F);
diff --git a/src/main/java/net/minecraft/server/BlockSnow.java b/src/main/java/net/minecraft/server/BlockSnow.java
index 201cb2a6..02f428e5 100644
--- a/src/main/java/net/minecraft/server/BlockSnow.java
+++ b/src/main/java/net/minecraft/server/BlockSnow.java
@@ -67,7 +67,7 @@ public class BlockSnow extends Block {
this.a(world, i, j, k, new ItemStack(Items.SNOW_BALL, i1 + 1, 0));
world.setAir(i, j, k);
- entityhuman.a(StatisticList.MINE_BLOCK_COUNT[Block.b((Block) this)], 1);
+ entityhuman.a(StatisticList.MINE_BLOCK_COUNT[Block.getId(this)], 1);
}
public Item getDropType(int i, Random random, int j) {
diff --git a/src/main/java/net/minecraft/server/BlockStationary.java b/src/main/java/net/minecraft/server/BlockStationary.java
index 0de0c5b8..51b9604a 100644
--- a/src/main/java/net/minecraft/server/BlockStationary.java
+++ b/src/main/java/net/minecraft/server/BlockStationary.java
@@ -24,8 +24,8 @@ public class BlockStationary extends BlockFluids {
private void n(World world, int i, int j, int k) {
int l = world.getData(i, j, k);
- world.setTypeAndData(i, j, k, Block.e(Block.b((Block) this) - 1), l, 2);
- world.a(i, j, k, Block.e(Block.b((Block) this) - 1), this.a(world));
+ world.setTypeAndData(i, j, k, Block.getById(Block.getId(this) - 1), l, 2);
+ world.a(i, j, k, Block.getById(Block.getId(this) - 1), this.a(world));
}
public void a(World world, int i, int j, int k, Random random) {
diff --git a/src/main/java/net/minecraft/server/BlockTallPlant.java b/src/main/java/net/minecraft/server/BlockTallPlant.java
index 4a0e9889..f8adc614 100644
--- a/src/main/java/net/minecraft/server/BlockTallPlant.java
+++ b/src/main/java/net/minecraft/server/BlockTallPlant.java
@@ -86,7 +86,7 @@ public class BlockTallPlant extends BlockPlant implements IBlockFragilePlantElem
}
public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) {
- if (world.isStatic || entityhuman.bE() == null || entityhuman.bE().getItem() != Items.SHEARS || c(l) || !this.b(world, i, j, k, l, entityhuman)) {
+ if (world.isStatic || entityhuman.bF() == null || entityhuman.bF().getItem() != Items.SHEARS || c(l) || !this.b(world, i, j, k, l, entityhuman)) {
super.a(world, entityhuman, i, j, k, l);
}
}
@@ -101,7 +101,7 @@ public class BlockTallPlant extends BlockPlant implements IBlockFragilePlantElem
if (j1 != 3 && j1 != 2) {
world.setAir(i, j - 1, k, true);
} else {
- if (!world.isStatic && entityhuman.bE() != null && entityhuman.bE().getItem() == Items.SHEARS) {
+ if (!world.isStatic && entityhuman.bF() != null && entityhuman.bF().getItem() == Items.SHEARS) {
this.b(world, i, j, k, i1, entityhuman);
}
@@ -124,7 +124,7 @@ public class BlockTallPlant extends BlockPlant implements IBlockFragilePlantElem
if (i1 != 3 && i1 != 2) {
return false;
} else {
- entityhuman.a(StatisticList.MINE_BLOCK_COUNT[Block.b((Block) this)], 1);
+ entityhuman.a(StatisticList.MINE_BLOCK_COUNT[Block.getId(this)], 1);
byte b0 = 1;
if (i1 == 3) {
diff --git a/src/main/java/net/minecraft/server/BlockTripwire.java b/src/main/java/net/minecraft/server/BlockTripwire.java
index 8c184e9f..cf84d794 100644
--- a/src/main/java/net/minecraft/server/BlockTripwire.java
+++ b/src/main/java/net/minecraft/server/BlockTripwire.java
@@ -76,7 +76,7 @@ public class BlockTripwire extends Block {
public void a(World world, int i, int j, int k, int l, EntityHuman entityhuman) {
if (!world.isStatic) {
- if (entityhuman.bE() != null && entityhuman.bE().getItem() == Items.SHEARS) {
+ if (entityhuman.bF() != null && entityhuman.bF().getItem() == Items.SHEARS) {
world.setData(i, j, k, l | 8, 4);
}
}
@@ -140,7 +140,7 @@ public class BlockTripwire extends Block {
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
- if (!entity.ay()) {
+ if (!entity.az()) {
flag1 = true;
break;
}
diff --git a/src/main/java/net/minecraft/server/BlockVine.java b/src/main/java/net/minecraft/server/BlockVine.java
index 3860ee55..ed007140 100644
--- a/src/main/java/net/minecraft/server/BlockVine.java
+++ b/src/main/java/net/minecraft/server/BlockVine.java
@@ -294,8 +294,8 @@ public class BlockVine extends Block {
}
public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) {
- if (!world.isStatic && entityhuman.bE() != null && entityhuman.bE().getItem() == Items.SHEARS) {
- entityhuman.a(StatisticList.MINE_BLOCK_COUNT[Block.b((Block) this)], 1);
+ if (!world.isStatic && entityhuman.bF() != null && entityhuman.bF().getItem() == Items.SHEARS) {
+ entityhuman.a(StatisticList.MINE_BLOCK_COUNT[Block.getId(this)], 1);
this.a(world, i, j, k, new ItemStack(Blocks.VINE, 1, 0));
} else {
super.a(world, entityhuman, i, j, k, l);
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index d770e4e6..3ac0ae47 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -35,7 +35,7 @@ public class Chunk {
public boolean m;
public boolean n;
public boolean o;
- public long p;
+ public long lastSaved;
public boolean q;
public int r;
public long s;
@@ -167,7 +167,7 @@ public class Chunk {
return 0;
}
- public ChunkSection[] i() {
+ public ChunkSection[] getSections() {
return this.sections;
}
@@ -737,7 +737,7 @@ public class Chunk {
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
- entity.W();
+ entity.X();
}
this.world.a(this.entitySlices[i]);
@@ -791,7 +791,7 @@ public class Chunk {
if (entity1 != entity && entity1.boundingBox.b(axisalignedbb) && (ientityselector == null || ientityselector.a(entity1))) {
list.add(entity1);
- Entity[] aentity = entity1.as();
+ Entity[] aentity = entity1.at();
if (aentity != null) {
for (int i1 = 0; i1 < aentity.length; ++i1) {
@@ -828,10 +828,10 @@ public class Chunk {
public boolean a(boolean flag) {
if (flag) {
- if (this.o && this.world.getTime() != this.p || this.n) {
+ if (this.o && this.world.getTime() != this.lastSaved || this.n) {
return true;
}
- } else if (this.o && this.world.getTime() >= this.p + 600L) {
+ } else if (this.o && this.world.getTime() >= this.lastSaved + 600L) {
return true;
}
@@ -846,7 +846,7 @@ public class Chunk {
return false;
}
- public void a(IChunkProvider ichunkprovider, IChunkProvider ichunkprovider1, int i, int j) {
+ public void loadNearby(IChunkProvider ichunkprovider, IChunkProvider ichunkprovider1, int i, int j) {
if (!this.done && ichunkprovider.isChunkLoaded(i + 1, j + 1) && ichunkprovider.isChunkLoaded(i, j + 1) && ichunkprovider.isChunkLoaded(i + 1, j)) {
ichunkprovider.getChunkAt(ichunkprovider1, i, j);
}
@@ -901,7 +901,7 @@ public class Chunk {
}
}
- public boolean k() {
+ public boolean isReady() {
return this.m && this.done && this.lit;
}
@@ -933,7 +933,7 @@ public class Chunk {
this.sections = achunksection;
}
- public BiomeBase a(int i, int j, WorldChunkManager worldchunkmanager) {
+ public BiomeBase getBiome(int i, int j, WorldChunkManager worldchunkmanager) {
int k = this.v[j << 4 | i] & 255;
if (k == 255) {
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 8cc2efd4..c88d5d4d 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -186,7 +186,7 @@ public class ChunkProviderServer implements IChunkProvider {
}
}
// CraftBukkit end
- chunk.a(this, this, i, j);
+ chunk.loadNearby(this, this, i, j);
}
return chunk;
@@ -217,7 +217,7 @@ public class ChunkProviderServer implements IChunkProvider {
Chunk chunk = this.f.a(this.world, i, j);
if (chunk != null) {
- chunk.p = this.world.getTime();
+ chunk.lastSaved = this.world.getTime();
if (this.chunkProvider != null) {
this.chunkProvider.recreateStructures(i, j);
}
@@ -244,7 +244,7 @@ public class ChunkProviderServer implements IChunkProvider {
public void saveChunk(Chunk chunk) { // CraftBukkit - private -> public
if (this.f != null) {
try {
- chunk.p = this.world.getTime();
+ chunk.lastSaved = this.world.getTime();
this.f.a(this.world, chunk);
// CraftBukkit start - IOException to Exception
} catch (Exception ioexception) {
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 26bafe0a..9402f0fd 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -215,7 +215,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
nbttagcompound.setBoolean("TerrainPopulated", chunk.done);
nbttagcompound.setBoolean("LightPopulated", chunk.lit);
nbttagcompound.setLong("InhabitedTime", chunk.s);
- ChunkSection[] achunksection = chunk.i();
+ ChunkSection[] achunksection = chunk.getSections();
NBTTagList nbttaglist = new NBTTagList();
boolean flag = !world.worldProvider.g;
ChunkSection[] achunksection1 = achunksection;
@@ -292,7 +292,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
NextTickListEntry nextticklistentry = (NextTickListEntry) iterator1.next();
NBTTagCompound nbttagcompound2 = new NBTTagCompound();
- nbttagcompound2.setInt("i", Block.b(nextticklistentry.a()));
+ nbttagcompound2.setInt("i", Block.getId(nextticklistentry.a()));
nbttagcompound2.setInt("x", nextticklistentry.a);
nbttagcompound2.setInt("y", nextticklistentry.b);
nbttagcompound2.setInt("z", nextticklistentry.c);
@@ -396,7 +396,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
for (int j1 = 0; j1 < nbttaglist3.size(); ++j1) {
NBTTagCompound nbttagcompound5 = nbttaglist3.get(j1);
- world.b(nbttagcompound5.getInt("x"), nbttagcompound5.getInt("y"), nbttagcompound5.getInt("z"), Block.e(nbttagcompound5.getInt("i")), nbttagcompound5.getInt("t"), nbttagcompound5.getInt("p"));
+ world.b(nbttagcompound5.getInt("x"), nbttagcompound5.getInt("y"), nbttagcompound5.getInt("z"), Block.getById(nbttagcompound5.getInt("i")), nbttagcompound5.getInt("t"), nbttagcompound5.getInt("p"));
}
}
}
diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java
index 787077dc..e33712a4 100644
--- a/src/main/java/net/minecraft/server/ChunkSection.java
+++ b/src/main/java/net/minecraft/server/ChunkSection.java
@@ -85,7 +85,7 @@ public class ChunkSection {
id |= this.extBlockIds.a(i, j, k) << 8;
}
- return Block.e(id); // Should be getBlockForId
+ return Block.getById(id);
}
// CraftBukkit end
@@ -95,7 +95,7 @@ public class ChunkSection {
l |= this.extBlockIds.a(i, j, k) << 8;
}
- return Block.e(l);
+ return Block.getById(l);
}
public void setTypeId(int i, int j, int k, Block block) {
@@ -120,7 +120,7 @@ public class ChunkSection {
}
}
- int i1 = Block.b(block);
+ int i1 = Block.getId(block);
// CraftBukkit start - Compact storage
if (this.blockIds == null) {
@@ -226,7 +226,7 @@ public class ChunkSection {
if (this.extBlockIds == null) {
id |= this.compactExtId << 8;
if (id > 0) {
- Block block = Block.e(id); // Should be getBlockForId
+ Block block = Block.getById(id);
if (block == null) {
this.compactId = 0;
this.compactExtId = 0;
@@ -243,7 +243,7 @@ public class ChunkSection {
byte extid = ext[off2];
int l = (id & 0xFF) | ((extid & 0xF) << 8); // Even data
if (l > 0) {
- Block block = Block.e(l); // Should be getBlockForId
+ Block block = Block.getById(l);
if (block == null) {
this.compactId = 0;
ext[off2] &= 0xF0;
@@ -257,7 +257,7 @@ public class ChunkSection {
off++;
l = (id & 0xFF) | ((extid & 0xF0) << 4); // Odd data
if (l > 0) {
- Block block = Block.e(l); // Should be getBlockForId
+ Block block = Block.getById(l);
if (block == null) {
this.compactId = 0;
ext[off2] &= 0x0F;
@@ -278,11 +278,11 @@ public class ChunkSection {
for (int off = 0; off < blkIds.length; off++) {
int l = blkIds[off] & 0xFF;
if (l > 0) {
- if (Block.e(l) == null) {
+ if (Block.getById(l) == null) {
blkIds[off] = 0;
} else {
++cntNonEmpty;
- if (Block.e(l).isTicking()) {
+ if (Block.getById(l).isTicking()) {
++cntTicking;
}
}
@@ -294,12 +294,12 @@ public class ChunkSection {
byte extid = ext[off2];
int l = (blkIds[off] & 0xFF) | ((extid & 0xF) << 8); // Even data
if (l > 0) {
- if (Block.e(l) == null) {
+ if (Block.getById(l) == null) {
blkIds[off] = 0;
ext[off2] &= 0xF0;
} else {
++cntNonEmpty;
- if (Block.e(l).isTicking()) {
+ if (Block.getById(l).isTicking()) {
++cntTicking;
}
}
@@ -307,12 +307,12 @@ public class ChunkSection {
off++;
l = (blkIds[off] & 0xFF) | ((extid & 0xF0) << 4); // Odd data
if (l > 0) {
- if (Block.e(l) == null) {
+ if (Block.getById(l) == null) {
blkIds[off] = 0;
ext[off2] &= 0x0F;
} else {
++cntNonEmpty;
- if (Block.e(l).isTicking()) {
+ if (Block.getById(l).isTicking()) {
++cntTicking;
}
}
diff --git a/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java b/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java
index da235e5e..0cd512d5 100644
--- a/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java
+++ b/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java
@@ -61,11 +61,11 @@ public abstract class CommandBlockListenerAbstract implements ICommandListener {
return i <= 2;
}
- public void a(String s) {
+ public void setCommand(String s) {
this.e = s;
}
- public String i() {
+ public String getCommand() {
return this.e;
}
@@ -211,13 +211,13 @@ public abstract class CommandBlockListenerAbstract implements ICommandListener {
return new ChatComponentText(this.getName());
}
- public void b(String s) {
+ public void setName(String s) {
this.f = s;
}
public void sendMessage(IChatBaseComponent ichatbasecomponent) {
if (this.c && this.getWorld() != null && !this.getWorld().isStatic) {
- this.d = (new ChatComponentText("[" + a.format(new Date()) + "] ")).a(ichatbasecomponent);
+ this.d = (new ChatComponentText("[" + a.format(new Date()) + "] ")).addSibling(ichatbasecomponent);
this.e();
}
}
diff --git a/src/main/java/net/minecraft/server/Container.java b/src/main/java/net/minecraft/server/Container.java
index a2524f63..a10108b9 100644
--- a/src/main/java/net/minecraft/server/Container.java
+++ b/src/main/java/net/minecraft/server/Container.java
@@ -89,7 +89,7 @@ public abstract class Container {
return false;
}
- public Slot a(IInventory iinventory, int i) {
+ public Slot getSlot(IInventory iinventory, int i) {
for (int j = 0; j < this.c.size(); ++j) {
Slot slot = (Slot) this.c.get(j);
diff --git a/src/main/java/net/minecraft/server/ContainerChest.java b/src/main/java/net/minecraft/server/ContainerChest.java
index 4e1fcdc3..c2c4fb53 100644
--- a/src/main/java/net/minecraft/server/ContainerChest.java
+++ b/src/main/java/net/minecraft/server/ContainerChest.java
@@ -95,7 +95,7 @@ public class ContainerChest extends Container {
public void b(EntityHuman entityhuman) {
super.b(entityhuman);
- this.container.l_();
+ this.container.closeContainer();
}
public IInventory e() {
diff --git a/src/main/java/net/minecraft/server/ContainerHopper.java b/src/main/java/net/minecraft/server/ContainerHopper.java
index dca97a4e..e2c789b4 100644
--- a/src/main/java/net/minecraft/server/ContainerHopper.java
+++ b/src/main/java/net/minecraft/server/ContainerHopper.java
@@ -80,6 +80,6 @@ public class ContainerHopper extends Container {
public void b(EntityHuman entityhuman) {
super.b(entityhuman);
- this.hopper.l_();
+ this.hopper.closeContainer();
}
}
diff --git a/src/main/java/net/minecraft/server/ContainerHorse.java b/src/main/java/net/minecraft/server/ContainerHorse.java
index 4a0cbefa..79aa1826 100644
--- a/src/main/java/net/minecraft/server/ContainerHorse.java
+++ b/src/main/java/net/minecraft/server/ContainerHorse.java
@@ -99,6 +99,6 @@ public class ContainerHorse extends Container {
public void b(EntityHuman entityhuman) {
super.b(entityhuman);
- this.a.l_();
+ this.a.closeContainer();
}
}
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index f1caa385..83f2dad5 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -28,9 +28,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
private RemoteStatusListener k;
private RemoteControlListener l;
public PropertyManager propertyManager; // CraftBukkit - private -> public
+ private EULA n;
private boolean generateStructures;
- private EnumGamemode o;
- private boolean p;
+ private EnumGamemode p;
+ private boolean q;
// CraftBukkit start - Signature changed
public DedicatedServer(joptsimple.OptionSet options) {
@@ -67,147 +68,154 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
System.setErr(new PrintStream(new LoggerOutputStream(logger, Level.WARN), true));
// CraftBukkit end
- i.info("Starting minecraft server version 1.7.9");
+ i.info("Starting minecraft server version 1.7.10");
if (Runtime.getRuntime().maxMemory() / 1024L / 1024L < 512L) {
i.warn("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\"");
}
i.info("Loading properties");
this.propertyManager = new PropertyManager(this.options); // CraftBukkit - CLI argument support
- if (this.N()) {
- this.c("127.0.0.1");
+ this.n = new EULA(new File("eula.txt"));
+ if (!this.n.a()) {
+ i.info("You need to agree to the EULA in order to run the server. Go to eula.txt for more info.");
+ this.n.b();
+ return false;
} else {
- this.setOnlineMode(this.propertyManager.getBoolean("online-mode", true));
- this.c(this.propertyManager.getString("server-ip", ""));
- }
+ if (this.N()) {
+ this.c("127.0.0.1");
+ } else {
+ this.setOnlineMode(this.propertyManager.getBoolean("online-mode", true));
+ this.c(this.propertyManager.getString("server-ip", ""));
+ }
- this.setSpawnAnimals(this.propertyManager.getBoolean("spawn-animals", true));
- this.setSpawnNPCs(this.propertyManager.getBoolean("spawn-npcs", true));
- this.setPvP(this.propertyManager.getBoolean("pvp", true));
- this.setAllowFlight(this.propertyManager.getBoolean("allow-flight", false));
- this.setTexturePack(this.propertyManager.getString("resource-pack", ""));
- this.setMotd(this.propertyManager.getString("motd", "A Minecraft Server"));
- this.setForceGamemode(this.propertyManager.getBoolean("force-gamemode", false));
- this.setIdleTimeout(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) {
- this.propertyManager.a("difficulty", Integer.valueOf(3));
- }
+ this.setSpawnAnimals(this.propertyManager.getBoolean("spawn-animals", true));
+ this.setSpawnNPCs(this.propertyManager.getBoolean("spawn-npcs", true));
+ this.setPvP(this.propertyManager.getBoolean("pvp", true));
+ this.setAllowFlight(this.propertyManager.getBoolean("allow-flight", false));
+ this.setTexturePack(this.propertyManager.getString("resource-pack", ""));
+ this.setMotd(this.propertyManager.getString("motd", "A Minecraft Server"));
+ this.setForceGamemode(this.propertyManager.getBoolean("force-gamemode", false));
+ this.setIdleTimeout(this.propertyManager.getInt("player-idle-timeout", 0));
+ if (this.propertyManager.getInt("difficulty", 1) < 0) {
+ this.propertyManager.setProperty("difficulty", Integer.valueOf(0));
+ } else if (this.propertyManager.getInt("difficulty", 1) > 3) {
+ this.propertyManager.setProperty("difficulty", Integer.valueOf(3));
+ }
- this.generateStructures = this.propertyManager.getBoolean("generate-structures", true);
- int gamemode = this.propertyManager.getInt("gamemode", EnumGamemode.SURVIVAL.a()); // CraftBukkit - Unique name to avoid stomping on logger
+ this.generateStructures = this.propertyManager.getBoolean("generate-structures", true);
+ int gamemode = this.propertyManager.getInt("gamemode", EnumGamemode.SURVIVAL.getId()); // CraftBukkit - Unique name to avoid stomping on logger
- this.o = WorldSettings.a(gamemode); // CraftBukkit - Use new name
- i.info("Default game type: " + this.o);
- InetAddress inetaddress = null;
+ this.p = WorldSettings.a(gamemode); // CraftBukkit - Use new name
+ i.info("Default game type: " + this.p);
+ InetAddress inetaddress = null;
- if (this.getServerIp().length() > 0) {
- inetaddress = InetAddress.getByName(this.getServerIp());
- }
+ if (this.getServerIp().length() > 0) {
+ inetaddress = InetAddress.getByName(this.getServerIp());
+ }
- if (this.L() < 0) {
- this.setPort(this.propertyManager.getInt("server-port", 25565));
- }
+ if (this.L() < 0) {
+ this.setPort(this.propertyManager.getInt("server-port", 25565));
+ }
- i.info("Generating keypair");
- this.a(MinecraftEncryption.b());
- i.info("Starting Minecraft server on " + (this.getServerIp().length() == 0 ? "*" : this.getServerIp()) + ":" + this.L());
+ i.info("Generating keypair");
+ this.a(MinecraftEncryption.b());
+ i.info("Starting Minecraft server on " + (this.getServerIp().length() == 0 ? "*" : this.getServerIp()) + ":" + this.L());
- try {
- this.ai().a(inetaddress, this.L());
- } catch (Throwable ioexception) { // CraftBukkit - IOException -> Throwable
- i.warn("**** FAILED TO BIND TO PORT!");
- i.warn("The exception was: {}", new Object[] { ioexception.toString()});
- i.warn("Perhaps a server is already running on that port?");
- return false;
- }
+ try {
+ this.ai().a(inetaddress, this.L());
+ } catch (Throwable ioexception) { // CraftBukkit - IOException -> Throwable
+ i.warn("**** FAILED TO BIND TO PORT!");
+ i.warn("The exception was: {}", new Object[] { ioexception.toString()});
+ i.warn("Perhaps a server is already running on that port?");
+ return false;
+ }
- this.a((PlayerList) (new DedicatedPlayerList(this))); // CraftBukkit
+ this.a((PlayerList) (new DedicatedPlayerList(this))); // CraftBukkit
- if (!this.getOnlineMode()) {
- i.warn("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!");
- i.warn("The server will make no attempt to authenticate usernames. Beware.");
- i.warn("While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.");
- i.warn("To change this, set \"online-mode\" to \"true\" in the server.properties file.");
- }
+ if (!this.getOnlineMode()) {
+ i.warn("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!");
+ i.warn("The server will make no attempt to authenticate usernames. Beware.");
+ i.warn("While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.");
+ i.warn("To change this, set \"online-mode\" to \"true\" in the server.properties file.");
+ }
- if (this.aE()) {
- this.getUserCache().c();
- }
+ if (this.aE()) {
+ this.getUserCache().c();
+ }
- if (!NameReferencingFileConverter.a(this.propertyManager)) {
- return false;
- } else {
- // this.a((PlayerList) (new DedicatedPlayerList(this))); // CraftBukkit - moved up
- this.convertable = new WorldLoaderServer(server.getWorldContainer()); // CraftBukkit - moved from MinecraftServer constructor
- long j = System.nanoTime();
+ if (!NameReferencingFileConverter.a(this.propertyManager)) {
+ return false;
+ } else {
+ // this.a((PlayerList) (new DedicatedPlayerList(this))); // CraftBukkit - moved up
+ this.convertable = new WorldLoaderServer(server.getWorldContainer()); // CraftBukkit - moved from MinecraftServer constructor
+ long j = System.nanoTime();
- if (this.O() == null) {
- this.k(this.propertyManager.getString("level-name", "world"));
- }
+ if (this.O() == null) {
+ this.k(this.propertyManager.getString("level-name", "world"));
+ }
- String s = this.propertyManager.getString("level-seed", "");
- String s1 = this.propertyManager.getString("level-type", "DEFAULT");
- String s2 = this.propertyManager.getString("generator-settings", "");
- long k = (new Random()).nextLong();
+ String s = this.propertyManager.getString("level-seed", "");
+ String s1 = this.propertyManager.getString("level-type", "DEFAULT");
+ String s2 = this.propertyManager.getString("generator-settings", "");
+ long k = (new Random()).nextLong();
- if (s.length() > 0) {
- try {
- long l = Long.parseLong(s);
+ if (s.length() > 0) {
+ try {
+ long l = Long.parseLong(s);
- if (l != 0L) {
- k = l;
+ if (l != 0L) {
+ k = l;
+ }
+ } catch (NumberFormatException numberformatexception) {
+ k = (long) s.hashCode();
}
- } catch (NumberFormatException numberformatexception) {
- k = (long) s.hashCode();
}
- }
- WorldType worldtype = WorldType.getType(s1);
+ WorldType worldtype = WorldType.getType(s1);
- if (worldtype == null) {
- worldtype = WorldType.NORMAL;
- }
+ if (worldtype == null) {
+ worldtype = WorldType.NORMAL;
+ }
- this.at();
- this.getEnableCommandBlock();
- this.l();
- this.getSnooperEnabled();
- this.c(this.propertyManager.getInt("max-build-height", 256));
- this.c((this.getMaxBuildHeight() + 8) / 16 * 16);
- this.c(MathHelper.a(this.getMaxBuildHeight(), 64, 256));
- this.propertyManager.a("max-build-height", Integer.valueOf(this.getMaxBuildHeight()));
- i.info("Preparing level \"" + this.O() + "\"");
- this.a(this.O(), this.O(), k, worldtype, s2);
- long i1 = System.nanoTime() - j;
- String s3 = String.format("%.3fs", new Object[] { Double.valueOf((double) i1 / 1.0E9D)});
-
- i.info("Done (" + s3 + ")! For help, type \"help\" or \"?\"");
- if (this.propertyManager.getBoolean("enable-query", false)) {
- i.info("Starting GS4 status listener");
- this.k = new RemoteStatusListener(this);
- this.k.a();
- }
+ this.at();
+ this.getEnableCommandBlock();
+ this.l();
+ this.getSnooperEnabled();
+ this.c(this.propertyManager.getInt("max-build-height", 256));
+ this.c((this.getMaxBuildHeight() + 8) / 16 * 16);
+ this.c(MathHelper.a(this.getMaxBuildHeight(), 64, 256));
+ this.propertyManager.setProperty("max-build-height", Integer.valueOf(this.getMaxBuildHeight()));
+ i.info("Preparing level \"" + this.O() + "\"");
+ this.a(this.O(), this.O(), k, worldtype, s2);
+ long i1 = System.nanoTime() - j;
+ String s3 = String.format("%.3fs", new Object[] { Double.valueOf((double) i1 / 1.0E9D)});
+
+ i.info("Done (" + s3 + ")! For help, type \"help\" or \"?\"");
+ if (this.propertyManager.getBoolean("enable-query", false)) {
+ i.info("Starting GS4 status listener");
+ this.k = new RemoteStatusListener(this);
+ this.k.a();
+ }
- if (this.propertyManager.getBoolean("enable-rcon", false)) {
- i.info("Starting remote control listener");
- this.l = new RemoteControlListener(this);
- this.l.a();
- this.remoteConsole = new org.bukkit.craftbukkit.command.CraftRemoteConsoleCommandSender(); // CraftBukkit
- }
+ if (this.propertyManager.getBoolean("enable-rcon", false)) {
+ i.info("Starting remote control listener");
+ this.l = new RemoteControlListener(this);
+ this.l.a();
+ this.remoteConsole = new org.bukkit.craftbukkit.command.CraftRemoteConsoleCommandSender(); // CraftBukkit
+ }
- // CraftBukkit start
- if (this.server.getBukkitSpawnRadius() > -1) {
- i.info("'settings.spawn-radius' in bukkit.yml has been moved to 'spawn-protection' in server.properties. I will move your config for you.");
- this.propertyManager.properties.remove("spawn-protection");
- this.propertyManager.getInt("spawn-protection", this.server.getBukkitSpawnRadius());
- this.server.removeBukkitSpawnRadius();
- this.propertyManager.savePropertiesFile();
- }
- // CraftBukkit end
+ // CraftBukkit start
+ if (this.server.getBukkitSpawnRadius() > -1) {
+ i.info("'settings.spawn-radius' in bukkit.yml has been moved to 'spawn-protection' in server.properties. I will move your config for you.");
+ this.propertyManager.properties.remove("spawn-protection");
+ this.propertyManager.getInt("spawn-protection", this.server.getBukkitSpawnRadius());
+ this.server.removeBukkitSpawnRadius();
+ this.propertyManager.savePropertiesFile();
+ }
+ // CraftBukkit end
- return true;
+ return true;
+ }
}
}
@@ -222,28 +230,18 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
}
public EnumGamemode getGamemode() {
- return this.o;
+ return this.p;
}
public EnumDifficulty getDifficulty() {
- return EnumDifficulty.a(this.propertyManager.getInt("difficulty", 1));
+ return EnumDifficulty.getById(this.propertyManager.getInt("difficulty", 1));
}
public boolean isHardcore() {
return this.propertyManager.getBoolean("hardcore", false);
}
- protected void a(CrashReport crashreport) {
- while (this.isRunning()) {
- this.aB();
-
- try {
- Thread.sleep(10L);
- } catch (InterruptedException interruptedexception) {
- ;
- }
- }
- }
+ protected void a(CrashReport crashreport) {}
public CrashReport b(CrashReport crashreport) {
crashreport = super.b(crashreport);
@@ -319,7 +317,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
}
public void a(String s, Object object) {
- this.propertyManager.a(s, object);
+ this.propertyManager.setProperty(s, object);
}
public void a() {
@@ -334,11 +332,11 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
public void aD() {
ServerGUI.a(this);
- this.p = true;
+ this.q = true;
}
public boolean ak() {
- return this.p;
+ return this.q;
}
public String a(EnumGamemode enumgamemode, boolean flag) {
@@ -356,7 +354,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
public boolean a(World world, int i, int j, int k, EntityHuman entityhuman) {
if (world.worldProvider.dimension != 0) {
return false;
- } else if (this.aC().getOPs().d()) {
+ } else if (this.aC().getOPs().isEmpty()) {
return false;
} else if (this.aC().isOp(entityhuman.getProfile())) {
return false;
@@ -378,7 +376,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
public void setIdleTimeout(int i) {
super.setIdleTimeout(i);
- this.propertyManager.a("player-idle-timeout", Integer.valueOf(i));
+ this.propertyManager.setProperty("player-idle-timeout", Integer.valueOf(i));
this.a();
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 7b975767..09c9c8ee 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -45,7 +45,7 @@ public abstract class Entity {
public boolean k;
public Entity passenger;
public Entity vehicle;
- public boolean n;
+ public boolean attachedToPlayer;
public World world;
public double lastX;
public double lastY;
@@ -238,10 +238,10 @@ public abstract class Entity {
}
public void h() {
- this.B();
+ this.C();
}
- public void B() {
+ public void C() {
this.world.methodProfiler.a("entityBaseTick");
if (this.vehicle != null && this.vehicle.dead) {
this.vehicle = null;
@@ -259,12 +259,12 @@ public abstract class Entity {
this.world.methodProfiler.a("portal");
MinecraftServer minecraftserver = ((WorldServer) this.world).getMinecraftServer();
- i = this.C();
+ i = this.D();
if (this.an) {
if (true || minecraftserver.getAllowNether()) { // CraftBukkit
if (this.vehicle == null && this.ao++ >= i) {
this.ao = i;
- this.portalCooldown = this.ah();
+ this.portalCooldown = this.ai();
byte b0;
if (this.world.worldProvider.dimension == -1) {
@@ -295,7 +295,7 @@ public abstract class Entity {
this.world.methodProfiler.b();
}
- if (this.isSprinting() && !this.L()) {
+ if (this.isSprinting() && !this.M()) {
int j = MathHelper.floor(this.locX);
i = MathHelper.floor(this.locY - 0.20000000298023224D - (double) this.height);
@@ -303,11 +303,11 @@ public abstract class Entity {
Block block = this.world.getType(j, i, k);
if (block.getMaterial() != Material.AIR) {
- this.world.addParticle("blockcrack_" + Block.b(block) + "_" + this.world.getData(j, i, k), this.locX + ((double) this.random.nextFloat() - 0.5D) * (double) this.width, this.boundingBox.b + 0.1D, this.locZ + ((double) this.random.nextFloat() - 0.5D) * (double) this.width, -this.motX * 4.0D, 1.5D, -this.motZ * 4.0D);
+ this.world.addParticle("blockcrack_" + Block.getId(block) + "_" + this.world.getData(j, i, k), this.locX + ((double) this.random.nextFloat() - 0.5D) * (double) this.width, this.boundingBox.b + 0.1D, this.locZ + ((double) this.random.nextFloat() - 0.5D) * (double) this.width, -this.motX * 4.0D, 1.5D, -this.motZ * 4.0D);
}
}
- this.M();
+ this.N();
if (this.world.isStatic) {
this.fireTicks = 0;
} else if (this.fireTicks > 0) {
@@ -325,13 +325,13 @@ public abstract class Entity {
}
}
- if (this.O()) {
- this.D();
+ if (this.P()) {
+ this.E();
this.fallDistance *= 0.5F;
}
if (this.locY < -64.0D) {
- this.F();
+ this.G();
}
if (!this.world.isStatic) {
@@ -342,11 +342,11 @@ public abstract class Entity {
this.world.methodProfiler.b();
}
- public int C() {
+ public int D() {
return 0;
}
- protected void D() {
+ protected void E() {
if (!this.fireProof) {
this.damageEntity(DamageSource.LAVA, 4);
@@ -388,7 +388,7 @@ public abstract class Entity {
this.fireTicks = 0;
}
- protected void F() {
+ protected void G() {
this.die();
}
@@ -403,7 +403,7 @@ public abstract class Entity {
// CraftBukkit start - Don't do anything if we aren't moving
// We need to do this regardless of whether or not we are moving thanks to portals
try {
- this.H();
+ this.I();
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Checking entity block collision");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being checked for collision");
@@ -666,14 +666,14 @@ public abstract class Entity {
this.Q = (float) ((double) this.Q + (double) MathHelper.sqrt(d10 * d10 + d11 * d11 + d12 * d12) * 0.6D);
if (this.Q > (float) this.d && block.getMaterial() != Material.AIR) {
this.d = (int) this.Q + 1;
- if (this.L()) {
+ if (this.M()) {
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) {
f = 1.0F;
}
- this.makeSound(this.G(), f, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.4F);
+ this.makeSound(this.H(), f, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.4F);
}
this.a(l, k, i1, block);
@@ -684,7 +684,7 @@ public abstract class Entity {
// CraftBukkit start - Move to the top of the method
/*
try {
- this.H();
+ this.I();
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Checking entity block collision");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being checked for collision");
@@ -694,7 +694,7 @@ public abstract class Entity {
}
*/
// CraftBukkit end
- boolean flag2 = this.K();
+ boolean flag2 = this.L();
if (this.world.e(this.boundingBox.shrink(0.001D, 0.001D, 0.001D))) {
this.burn(1);
@@ -726,11 +726,11 @@ public abstract class Entity {
}
}
- protected String G() {
+ protected String H() {
return "game.neutral.swim";
}
- protected void H() {
+ protected void I() {
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);
@@ -789,7 +789,7 @@ public abstract class Entity {
}
}
- public AxisAlignedBB I() {
+ public AxisAlignedBB J() {
return null;
}
@@ -809,15 +809,15 @@ public abstract class Entity {
}
}
- public boolean K() {
+ public boolean L() {
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 L() {
+ public boolean M() {
return this.inWater;
}
- public boolean M() {
+ public boolean N() {
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;
@@ -826,7 +826,7 @@ public abstract class Entity {
f = 1.0F;
}
- this.makeSound(this.N(), f, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.4F);
+ this.makeSound(this.O(), f, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.4F);
float f1 = (float) MathHelper.floor(this.boundingBox.b);
int i;
@@ -856,7 +856,7 @@ public abstract class Entity {
return this.inWater;
}
- protected String N() {
+ protected String O() {
return "game.neutral.swim.splash";
}
@@ -881,7 +881,7 @@ public abstract class Entity {
return 0.0F;
}
- public boolean O() {
+ public boolean P() {
return this.world.a(this.boundingBox.grow(-0.10000000149011612D, -0.4000000059604645D, -0.10000000149011612D), Material.LAVA);
}
@@ -1030,7 +1030,7 @@ public abstract class Entity {
this.al = true;
}
- protected void P() {
+ protected void Q() {
this.velocityChanged = true;
}
@@ -1038,23 +1038,23 @@ public abstract class Entity {
if (this.isInvulnerable()) {
return false;
} else {
- this.P();
+ this.Q();
return false;
}
}
- public boolean Q() {
+ public boolean R() {
return false;
}
- public boolean R() {
+ public boolean S() {
return false;
}
public void b(Entity entity, int i) {}
public boolean c(NBTTagCompound nbttagcompound) {
- String s = this.V();
+ String s = this.W();
if (!this.dead && s != null) {
nbttagcompound.setString("id", s);
@@ -1066,7 +1066,7 @@ public abstract class Entity {
}
public boolean d(NBTTagCompound nbttagcompound) {
- String s = this.V();
+ String s = this.W();
if (!this.dead && s != null && this.passenger == null) {
nbttagcompound.setString("id", s);
@@ -1167,7 +1167,7 @@ public abstract class Entity {
this.setPosition(this.locX, this.locY, this.locZ);
this.b(this.yaw, this.pitch);
this.a(nbttagcompound);
- if (this.U()) {
+ if (this.V()) {
this.setPosition(this.locX, this.locY, this.locZ);
}
@@ -1231,11 +1231,11 @@ public abstract class Entity {
}
}
- protected boolean U() {
+ protected boolean V() {
return true;
}
- protected final String V() {
+ protected final String W() {
return EntityTypes.b(this);
}
@@ -1243,7 +1243,7 @@ public abstract class Entity {
protected abstract void b(NBTTagCompound nbttagcompound);
- public void W() {}
+ public void X() {}
protected NBTTagList a(double... adouble) {
NBTTagList nbttaglist = new NBTTagList();
@@ -1329,7 +1329,7 @@ public abstract class Entity {
return null;
}
- public void aa() {
+ public void ab() {
if (this.vehicle.dead) {
this.vehicle = null;
} else {
@@ -1338,7 +1338,7 @@ public abstract class Entity {
this.motZ = 0.0D;
this.h();
if (this.vehicle != null) {
- this.vehicle.ab();
+ this.vehicle.ac();
this.h += (double) (this.vehicle.yaw - this.vehicle.lastYaw);
for (this.g += (double) (this.vehicle.pitch - this.vehicle.lastPitch); this.h >= 180.0D; this.h -= 360.0D) {
@@ -1383,17 +1383,17 @@ public abstract class Entity {
}
}
- public void ab() {
+ public void ac() {
if (this.passenger != null) {
- this.passenger.setPosition(this.locX, this.locY + this.ad() + this.passenger.ac(), this.locZ);
+ this.passenger.setPosition(this.locX, this.locY + this.ad() + this.passenger.ad(), this.locZ);
}
}
- public double ac() {
+ public double ad() {
return (double) this.height;
}
- public double ad() {
+ public double ae() {
return (double) this.length * 0.75D;
}
@@ -1487,17 +1487,17 @@ public abstract class Entity {
}
}
- public float ae() {
+ public float af() {
return 0.1F;
}
- public Vec3D af() {
+ public Vec3D ag() {
return null;
}
- public void ag() {
+ public void ah() {
if (this.portalCooldown > 0) {
- this.portalCooldown = this.ah();
+ this.portalCooldown = this.ai();
} else {
double d0 = this.lastX - this.locX;
double d1 = this.lastZ - this.locZ;
@@ -1510,7 +1510,7 @@ public abstract class Entity {
}
}
- public int ah() {
+ public int ai() {
return 300;
}
@@ -1526,7 +1526,7 @@ public abstract class Entity {
return !this.fireProof && (this.fireTicks > 0 || flag && this.g(0));
}
- public boolean al() {
+ public boolean am() {
return this.vehicle != null;
}
@@ -1706,7 +1706,7 @@ public abstract class Entity {
}
}
- public void ar() {
+ public void as() {
this.I = true;
this.fallDistance = 0.0F;
}
@@ -1721,7 +1721,7 @@ public abstract class Entity {
return LocaleI18n.get("entity." + s + ".name");
}
- public Entity[] as() {
+ public Entity[] at() {
return null;
}
@@ -1733,7 +1733,7 @@ public abstract class Entity {
return 0.0F;
}
- public boolean au() {
+ public boolean av() {
return true;
}
@@ -1855,15 +1855,15 @@ public abstract class Entity {
return true;
}
- public int aw() {
+ public int ax() {
return 3;
}
- public int ax() {
+ public int ay() {
return this.aq;
}
- public boolean ay() {
+ public boolean az() {
return false;
}
@@ -1880,7 +1880,7 @@ public abstract class Entity {
return this.uniqueID;
}
- public boolean aB() {
+ public boolean aC() {
return true;
}
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
index 3628774f..88b07510 100644
--- a/src/main/java/net/minecraft/server/EntityArrow.java
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
@@ -177,7 +177,7 @@ public class EntityArrow extends Entity implements IProjectile {
for (j = 0; j < list.size(); ++j) {
Entity entity1 = (Entity) list.get(j);
- if (entity1.Q() && (entity1 != this.shooter || this.au >= 5)) {
+ if (entity1.R() && (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);
@@ -244,7 +244,7 @@ public class EntityArrow extends Entity implements IProjectile {
EntityLiving entityliving = (EntityLiving) movingobjectposition.entity;
if (!this.world.isStatic) {
- entityliving.p(entityliving.aY() + 1);
+ entityliving.p(entityliving.aZ() + 1);
}
if (this.knockbackStrength > 0) {
@@ -332,7 +332,7 @@ public class EntityArrow extends Entity implements IProjectile {
float f4 = 0.99F;
f1 = 0.05F;
- if (this.L()) {
+ if (this.M()) {
for (int l = 0; l < 4; ++l) {
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);
@@ -341,7 +341,7 @@ public class EntityArrow extends Entity implements IProjectile {
f4 = 0.8F;
}
- if (this.K()) {
+ if (this.L()) {
this.extinguish();
}
@@ -350,7 +350,7 @@ public class EntityArrow extends Entity implements IProjectile {
this.motZ *= (double) f4;
this.motY -= (double) f1;
this.setPosition(this.locX, this.locY, this.locZ);
- this.H();
+ this.I();
}
}
@@ -359,7 +359,7 @@ public class EntityArrow extends Entity implements IProjectile {
nbttagcompound.setShort("yTile", (short) this.e);
nbttagcompound.setShort("zTile", (short) this.f);
nbttagcompound.setShort("life", (short) this.at);
- nbttagcompound.setByte("inTile", (byte) Block.b(this.g));
+ nbttagcompound.setByte("inTile", (byte) Block.getId(this.g));
nbttagcompound.setByte("inData", (byte) this.h);
nbttagcompound.setByte("shake", (byte) this.shake);
nbttagcompound.setByte("inGround", (byte) (this.inGround ? 1 : 0));
@@ -372,7 +372,7 @@ public class EntityArrow extends Entity implements IProjectile {
this.e = nbttagcompound.getShort("yTile");
this.f = nbttagcompound.getShort("zTile");
this.at = nbttagcompound.getShort("life");
- this.g = Block.e(nbttagcompound.getByte("inTile") & 255);
+ this.g = Block.getById(nbttagcompound.getByte("inTile") & 255);
this.h = nbttagcompound.getByte("inData") & 255;
this.shake = nbttagcompound.getByte("shake") & 255;
this.inGround = nbttagcompound.getByte("inGround") == 1;
@@ -434,7 +434,7 @@ public class EntityArrow extends Entity implements IProjectile {
this.knockbackStrength = i;
}
- public boolean au() {
+ public boolean av() {
return false;
}
diff --git a/src/main/java/net/minecraft/server/EntityBoat.java b/src/main/java/net/minecraft/server/EntityBoat.java
index 82503958..8a3ea635 100644
--- a/src/main/java/net/minecraft/server/EntityBoat.java
+++ b/src/main/java/net/minecraft/server/EntityBoat.java
@@ -67,11 +67,11 @@ public class EntityBoat extends Entity {
return entity.boundingBox;
}
- public AxisAlignedBB I() {
+ public AxisAlignedBB J() {
return this.boundingBox;
}
- public boolean R() {
+ public boolean S() {
return true;
}
@@ -88,7 +88,7 @@ public class EntityBoat extends Entity {
this.world.getServer().getPluginManager().callEvent(new org.bukkit.event.vehicle.VehicleCreateEvent((Vehicle) this.getBukkitEntity())); // CraftBukkit
}
- public double ad() {
+ public double ae() {
return (double) this.length * 0.0D - 0.30000001192092896D;
}
@@ -112,7 +112,7 @@ public class EntityBoat extends Entity {
this.c(-this.i());
this.a(10);
this.setDamage(this.getDamage() + f * 10.0F);
- this.P();
+ this.Q();
boolean flag = damagesource.getEntity() instanceof EntityHuman && ((EntityHuman) damagesource.getEntity()).abilities.canInstantlyBuild;
if (flag || this.getDamage() > 40.0F) {
@@ -143,7 +143,7 @@ public class EntityBoat extends Entity {
}
}
- public boolean Q() {
+ public boolean R() {
return !this.dead;
}
@@ -397,7 +397,7 @@ public class EntityBoat extends Entity {
for (int k1 = 0; k1 < list.size(); ++k1) {
Entity entity = (Entity) list.get(k1);
- if (entity != this.passenger && entity.R() && entity instanceof EntityBoat) {
+ if (entity != this.passenger && entity.S() && entity instanceof EntityBoat) {
entity.collide(this);
}
}
@@ -411,12 +411,12 @@ public class EntityBoat extends Entity {
}
}
- public void ab() {
+ public void ac() {
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.ad() + this.passenger.ac(), this.locZ + d1);
+ this.passenger.setPosition(this.locX + d0, this.locY + this.ae() + this.passenger.ad(), this.locZ + d1);
}
}
diff --git a/src/main/java/net/minecraft/server/EntityChicken.java b/src/main/java/net/minecraft/server/EntityChicken.java
index a73f8f89..a5a5ab5e 100644
--- a/src/main/java/net/minecraft/server/EntityChicken.java
+++ b/src/main/java/net/minecraft/server/EntityChicken.java
@@ -24,19 +24,19 @@ public class EntityChicken extends EntityAnimal {
this.goalSelector.a(7, new PathfinderGoalRandomLookaround(this));
}
- public boolean bj() {
+ public boolean bk() {
return true;
}
- protected void aC() {
- super.aC();
- this.getAttributeInstance(GenericAttributes.a).setValue(4.0D);
+ protected void aD() {
+ super.aD();
+ this.getAttributeInstance(GenericAttributes.maxHealth).setValue(4.0D);
this.getAttributeInstance(GenericAttributes.d).setValue(0.25D);
}
public void e() {
// CraftBukkit start
- if (this.bZ()) { // should be isChickenJockey
+ if (this.isChickenJockey()) {
this.persistent = !this.isTypeNotPersistent();
}
// CraftBukkit end
@@ -62,7 +62,7 @@ public class EntityChicken extends EntityAnimal {
}
this.bp += this.bt * 2.0F;
- if (!this.world.isStatic && !this.isBaby() && !this.bZ() && --this.bu <= 0) {
+ if (!this.world.isStatic && !this.isBaby() && !this.isChickenJockey() && --this.bu <= 0) {
this.makeSound("mob.chicken.plop", 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
this.a(Items.EGG, 1);
this.bu = this.random.nextInt(6000) + 6000;
@@ -75,11 +75,11 @@ public class EntityChicken extends EntityAnimal {
return "mob.chicken.say";
}
- protected String aS() {
+ protected String aT() {
return "mob.chicken.hurt";
}
- protected String aT() {
+ protected String aU() {
return "mob.chicken.hurt";
}
@@ -119,7 +119,7 @@ public class EntityChicken extends EntityAnimal {
}
protected int getExpValue(EntityHuman entityhuman) {
- return this.bZ() ? 10 : super.getExpValue(entityhuman);
+ return this.isChickenJockey() ? 10 : super.getExpValue(entityhuman);
}
public void b(NBTTagCompound nbttagcompound) {
@@ -128,23 +128,23 @@ public class EntityChicken extends EntityAnimal {
}
protected boolean isTypeNotPersistent() {
- return this.bZ() && this.passenger == null;
+ return this.isChickenJockey() && this.passenger == null;
}
- public void ab() {
- super.ab();
+ public void ac() {
+ super.ac();
float f = MathHelper.sin(this.aM * 3.1415927F / 180.0F);
float f1 = MathHelper.cos(this.aM * 3.1415927F / 180.0F);
float f2 = 0.1F;
float f3 = 0.0F;
- this.passenger.setPosition(this.locX + (double) (f2 * f), this.locY + (double) (this.length * 0.5F) + this.passenger.ac() + (double) f3, this.locZ - (double) (f2 * f1));
+ this.passenger.setPosition(this.locX + (double) (f2 * f), this.locY + (double) (this.length * 0.5F) + this.passenger.ad() + (double) f3, this.locZ - (double) (f2 * f1));
if (this.passenger instanceof EntityLiving) {
((EntityLiving) this.passenger).aM = this.aM;
}
}
- public boolean bZ() {
+ public boolean isChickenJockey() {
return this.bv;
}
diff --git a/src/main/java/net/minecraft/server/EntityCow.java b/src/main/java/net/minecraft/server/EntityCow.java
index 4a955d09..df21fde2 100644
--- a/src/main/java/net/minecraft/server/EntityCow.java
+++ b/src/main/java/net/minecraft/server/EntityCow.java
@@ -21,13 +21,13 @@ public class EntityCow extends EntityAnimal {
this.goalSelector.a(7, new PathfinderGoalRandomLookaround(this));
}
- public boolean bj() {
+ public boolean bk() {
return true;
}
- protected void aC() {
- super.aC();
- this.getAttributeInstance(GenericAttributes.a).setValue(10.0D);
+ protected void aD() {
+ super.aD();
+ this.getAttributeInstance(GenericAttributes.maxHealth).setValue(10.0D);
this.getAttributeInstance(GenericAttributes.d).setValue(0.20000000298023224D);
}
@@ -35,11 +35,11 @@ public class EntityCow extends EntityAnimal {
return "mob.cow.say";
}
- protected String aS() {
+ protected String aT() {
return "mob.cow.hurt";
}
- protected String aT() {
+ protected String aU() {
return "mob.cow.hurt";
}
@@ -47,7 +47,7 @@ public class EntityCow extends EntityAnimal {
this.makeSound("mob.cow.step", 0.15F, 1.0F);
}
- protected float be() {
+ protected float bf() {
return 0.4F;
}
diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java
index ef10d164..6960b058 100644
--- a/src/main/java/net/minecraft/server/EntityCreature.java
+++ b/src/main/java/net/minecraft/server/EntityCreature.java
@@ -29,7 +29,7 @@ public abstract class EntityCreature extends EntityInsentient {
return false;
}
- protected void bp() {
+ protected void bq() {
this.world.methodProfiler.a("ai");
if (this.bo > 0 && --this.bo == 0) {
AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.d);
@@ -63,7 +63,7 @@ public abstract class EntityCreature extends EntityInsentient {
} else if (this.target.isAlive()) {
float f1 = this.target.e((Entity) this);
- if (this.p(this.target)) {
+ if (this.hasLineOfSight(this.target)) {
this.a(this.target, f1);
}
} else {
@@ -93,8 +93,8 @@ public abstract class EntityCreature extends EntityInsentient {
}
int i = MathHelper.floor(this.boundingBox.b + 0.5D);
- boolean flag = this.L();
- boolean flag1 = this.O();
+ boolean flag = this.M();
+ boolean flag1 = this.P();
this.pitch = 0.0F;
if (this.pathEntity != null && this.random.nextInt(100) != 0) {
@@ -161,7 +161,7 @@ public abstract class EntityCreature extends EntityInsentient {
this.world.methodProfiler.b();
} else {
- super.bp();
+ super.bq();
this.pathEntity = null;
}
}
diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java
index 24302a6b..a8162c75 100644
--- a/src/main/java/net/minecraft/server/EntityCreeper.java
+++ b/src/main/java/net/minecraft/server/EntityCreeper.java
@@ -26,16 +26,16 @@ public class EntityCreeper extends EntityMonster {
this.targetSelector.a(2, new PathfinderGoalHurtByTarget(this, false));
}
- protected void aC() {
- super.aC();
+ protected void aD() {
+ super.aD();
this.getAttributeInstance(GenericAttributes.d).setValue(0.25D);
}
- public boolean bj() {
+ public boolean bk() {
return true;
}
- public int aw() {
+ public int ax() {
return this.getGoalTarget() == null ? 3 : 3 + (int) (this.getHealth() - 1.0F);
}
@@ -108,23 +108,23 @@ public class EntityCreeper extends EntityMonster {
super.h();
}
- protected String aS() {
+ protected String aT() {
return "mob.creeper.say";
}
- protected String aT() {
+ protected String aU() {
return "mob.creeper.death";
}
public void die(DamageSource damagesource) {
// super.die(damagesource); // CraftBukkit - Moved to end
if (damagesource.getEntity() instanceof EntitySkeleton) {
- int i = Item.b(Items.RECORD_1);
- int j = Item.b(Items.RECORD_12);
+ int i = Item.getId(Items.RECORD_1);
+ int j = Item.getId(Items.RECORD_12);
int k = i + this.random.nextInt(j - i + 1);
// CraftBukkit start - Store record for now, drop in dropDeathLoot
- // this.a(Item.d(k), 1);
+ // this.a(Item.getById(k), 1);
this.record = k;
// CraftBukkit end
}
@@ -138,7 +138,7 @@ public class EntityCreeper extends EntityMonster {
// Drop a music disc?
if (this.record != -1) {
- this.a(Item.d(this.record), 1);
+ this.a(Item.getById(this.record), 1);
this.record = -1;
}
}
@@ -188,7 +188,7 @@ public class EntityCreeper extends EntityMonster {
if (itemstack != null && itemstack.getItem() == Items.FLINT_AND_STEEL) {
this.world.makeSound(this.locX + 0.5D, this.locY + 0.5D, this.locZ + 0.5D, "fire.ignite", 1.0F, this.random.nextFloat() * 0.4F + 0.8F);
- entityhuman.aZ();
+ entityhuman.ba();
if (!this.world.isStatic) {
this.cd();
itemstack.damage(1, entityhuman);
diff --git a/src/main/java/net/minecraft/server/EntityDamageSourceIndirect.java b/src/main/java/net/minecraft/server/EntityDamageSourceIndirect.java
index 552ccd22..8c4670ba 100644
--- a/src/main/java/net/minecraft/server/EntityDamageSourceIndirect.java
+++ b/src/main/java/net/minecraft/server/EntityDamageSourceIndirect.java
@@ -19,7 +19,7 @@ public class EntityDamageSourceIndirect extends EntityDamageSource {
public IChatBaseComponent getLocalizedDeathMessage(EntityLiving entityliving) {
IChatBaseComponent ichatbasecomponent = this.owner == null ? this.p.getScoreboardDisplayName() : this.owner.getScoreboardDisplayName();
- ItemStack itemstack = this.owner instanceof EntityLiving ? ((EntityLiving) this.owner).bd() : null;
+ ItemStack itemstack = this.owner instanceof EntityLiving ? ((EntityLiving) this.owner).be() : null;
String s = "death.attack." + this.translationIndex;
String s1 = s + ".item";
diff --git a/src/main/java/net/minecraft/server/EntityEnderCrystal.java b/src/main/java/net/minecraft/server/EntityEnderCrystal.java
index aad400aa..cb023e2e 100644
--- a/src/main/java/net/minecraft/server/EntityEnderCrystal.java
+++ b/src/main/java/net/minecraft/server/EntityEnderCrystal.java
@@ -50,7 +50,7 @@ public class EntityEnderCrystal extends Entity {
protected void a(NBTTagCompound nbttagcompound) {}
- public boolean Q() {
+ public boolean R() {
return true;
}
diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java
index f50d8f68..51c4e6ec 100644
--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
@@ -49,9 +49,9 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
this.ak = true;
}
- protected void aC() {
- super.aC();
- this.getAttributeInstance(GenericAttributes.a).setValue(200.0D);
+ protected void aD() {
+ super.aD();
+ this.getAttributeInstance(GenericAttributes.maxHealth).setValue(200.0D);
}
protected void c() {
@@ -518,7 +518,7 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
return super.damageEntity(damagesource, f);
}
- protected void aE() {
+ protected void aF() {
if (this.dead) return; // CraftBukkit - can't kill what's already dead
++this.bB;
if (this.bB >= 180 && this.bB <= 200) {
@@ -632,11 +632,11 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
protected void w() {}
- public Entity[] as() {
+ public Entity[] at() {
return this.children;
}
- public boolean Q() {
+ public boolean R() {
return false;
}
@@ -648,11 +648,11 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
return "mob.enderdragon.growl";
}
- protected String aS() {
+ protected String aT() {
return "mob.enderdragon.hit";
}
- protected float be() {
+ protected float bf() {
return 5.0F;
}
diff --git a/src/main/java/net/minecraft/server/EntityEnderPearl.java b/src/main/java/net/minecraft/server/EntityEnderPearl.java
index 63906678..336b6b07 100644
--- a/src/main/java/net/minecraft/server/EntityEnderPearl.java
+++ b/src/main/java/net/minecraft/server/EntityEnderPearl.java
@@ -40,6 +40,10 @@ public class EntityEnderPearl extends EntityProjectile {
Bukkit.getPluginManager().callEvent(teleEvent);
if (!teleEvent.isCancelled() && !entityplayer.playerConnection.isDisconnected()) {
+ if (this.getShooter().am()) {
+ this.getShooter().mount((Entity) null);
+ }
+
entityplayer.playerConnection.teleport(teleEvent.getTo());
this.getShooter().fallDistance = 0.0F;
CraftEventFactory.entityDamage = this;
diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java
index 172228bc..fa6670bc 100644
--- a/src/main/java/net/minecraft/server/EntityEnderman.java
+++ b/src/main/java/net/minecraft/server/EntityEnderman.java
@@ -24,9 +24,9 @@ public class EntityEnderman extends EntityMonster {
this.W = 1.0F;
}
- protected void aC() {
- super.aC();
- this.getAttributeInstance(GenericAttributes.a).setValue(40.0D);
+ protected void aD() {
+ super.aD();
+ this.getAttributeInstance(GenericAttributes.maxHealth).setValue(40.0D);
this.getAttributeInstance(GenericAttributes.d).setValue(0.30000001192092896D);
this.getAttributeInstance(GenericAttributes.e).setValue(7.0D);
}
@@ -40,13 +40,13 @@ public class EntityEnderman extends EntityMonster {
public void b(NBTTagCompound nbttagcompound) {
super.b(nbttagcompound);
- nbttagcompound.setShort("carried", (short) Block.b(this.getCarried()));
+ nbttagcompound.setShort("carried", (short) Block.getId(this.getCarried()));
nbttagcompound.setShort("carriedData", (short) this.getCarriedData());
}
public void a(NBTTagCompound nbttagcompound) {
super.a(nbttagcompound);
- this.setCarried(Block.e(nbttagcompound.getShort("carried")));
+ this.setCarried(Block.getById(nbttagcompound.getShort("carried")));
this.setCarriedData(nbttagcompound.getShort("carriedData"));
}
@@ -86,12 +86,12 @@ public class EntityEnderman extends EntityMonster {
vec3d1 = vec3d1.a();
double d1 = vec3d.b(vec3d1);
- return d1 > 1.0D - 0.025D / d0 && entityhuman.p(this);
+ return d1 > 1.0D - 0.025D / d0 && entityhuman.hasLineOfSight(this);
}
}
public void e() {
- if (this.K()) {
+ if (this.L()) {
this.damageEntity(DamageSource.DROWN, 1.0F);
}
@@ -118,7 +118,7 @@ public class EntityEnderman extends EntityMonster {
j = MathHelper.floor(this.locY + this.random.nextDouble() * 3.0D);
k = MathHelper.floor(this.locZ - 2.0D + this.random.nextDouble() * 4.0D);
block = this.world.getType(i, j, k);
- if (br[Block.b(block)]) {
+ if (br[Block.getId(block)]) {
// CraftBukkit start - Pickup event
if (!CraftEventFactory.callEntityChangeBlockEvent(this, this.world.getWorld().getBlockAt(i, j, k), org.bukkit.Material.AIR).isCancelled()) {
this.setCarried(block);
@@ -161,7 +161,7 @@ public class EntityEnderman extends EntityMonster {
}
}
- if (this.K() || this.isBurning()) {
+ if (this.L() || this.isBurning()) {
this.target = null;
this.a(false);
this.bv = false;
@@ -290,11 +290,11 @@ public class EntityEnderman extends EntityMonster {
return this.cd() ? "mob.endermen.scream" : "mob.endermen.idle";
}
- protected String aS() {
+ protected String aT() {
return "mob.endermen.hit";
}
- protected String aT() {
+ protected String aU() {
return "mob.endermen.death";
}
@@ -315,11 +315,11 @@ public class EntityEnderman extends EntityMonster {
}
public void setCarried(Block block) {
- this.datawatcher.watch(16, Byte.valueOf((byte) (Block.b(block) & 255)));
+ this.datawatcher.watch(16, Byte.valueOf((byte) (Block.getId(block) & 255)));
}
public Block getCarried() {
- return Block.e(this.datawatcher.getByte(16));
+ return Block.getById(this.datawatcher.getByte(16));
}
public void setCarriedData(int i) {
@@ -364,19 +364,19 @@ public class EntityEnderman extends EntityMonster {
}
static {
- br[Block.b((Block) Blocks.GRASS)] = true;
- br[Block.b(Blocks.DIRT)] = true;
- br[Block.b((Block) Blocks.SAND)] = true;
- br[Block.b(Blocks.GRAVEL)] = true;
- br[Block.b((Block) Blocks.YELLOW_FLOWER)] = true;
- br[Block.b((Block) Blocks.RED_ROSE)] = true;
- br[Block.b((Block) Blocks.BROWN_MUSHROOM)] = true;
- br[Block.b((Block) Blocks.RED_MUSHROOM)] = true;
- br[Block.b(Blocks.TNT)] = true;
- br[Block.b(Blocks.CACTUS)] = true;
- br[Block.b(Blocks.CLAY)] = true;
- br[Block.b(Blocks.PUMPKIN)] = true;
- br[Block.b(Blocks.MELON)] = true;
- br[Block.b((Block) Blocks.MYCEL)] = true;
+ br[Block.getId(Blocks.GRASS)] = true;
+ br[Block.getId(Blocks.DIRT)] = true;
+ br[Block.getId(Blocks.SAND)] = true;
+ br[Block.getId(Blocks.GRAVEL)] = true;
+ br[Block.getId(Blocks.YELLOW_FLOWER)] = true;
+ br[Block.getId(Blocks.RED_ROSE)] = true;
+ br[Block.getId(Blocks.BROWN_MUSHROOM)] = true;
+ br[Block.getId(Blocks.RED_MUSHROOM)] = true;
+ br[Block.getId(Blocks.TNT)] = true;
+ br[Block.getId(Blocks.CACTUS)] = true;
+ br[Block.getId(Blocks.CLAY)] = true;
+ br[Block.getId(Blocks.PUMPKIN)] = true;
+ br[Block.getId(Blocks.MELON)] = true;
+ br[Block.getId(Blocks.MYCEL)] = true;
}
}
diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
index 8ed492b9..57507603 100644
--- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java
+++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
@@ -109,7 +109,7 @@ public class EntityExperienceOrb extends Entity {
}
}
- public boolean M() {
+ public boolean N() {
return this.world.a(this.boundingBox, Material.WATER, (Entity) this);
}
@@ -121,7 +121,7 @@ public class EntityExperienceOrb extends Entity {
if (this.isInvulnerable()) {
return false;
} else {
- this.P();
+ this.Q();
this.d = (int) ((float) this.d - f);
if (this.d <= 0) {
this.die();
@@ -182,7 +182,7 @@ public class EntityExperienceOrb extends Entity {
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 au() {
+ public boolean av() {
return false;
}
}
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
index e0b99367..5576f151 100644
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
@@ -9,7 +9,7 @@ public class EntityFallingBlock extends Entity {
public Block id; // CraftBukkit - private -> public
public int data;
- public int b;
+ public int ticksLived;
public boolean dropItem;
private boolean f;
private boolean hurtEntities;
@@ -53,7 +53,7 @@ public class EntityFallingBlock extends Entity {
protected void c() {}
- public boolean Q() {
+ public boolean R() {
return !this.dead;
}
@@ -64,7 +64,7 @@ public class EntityFallingBlock extends Entity {
this.lastX = this.locX;
this.lastY = this.locY;
this.lastZ = this.locZ;
- ++this.b;
+ ++this.ticksLived;
this.motY -= 0.03999999910593033D;
this.move(this.motX, this.motY, this.motZ);
this.motX *= 0.9800000190734863D;
@@ -75,9 +75,9 @@ public class EntityFallingBlock extends Entity {
int j = MathHelper.floor(this.locY);
int k = MathHelper.floor(this.locZ);
- if (this.b == 1) {
+ if (this.ticksLived == 1) {
// CraftBukkit - compare data and call event
- if (this.b != 1 || this.world.getType(i, j, k) != this.id || this.world.getData(i, j, k) != this.data || CraftEventFactory.callEntityChangeBlockEvent(this, i, j, k, Blocks.AIR, 0).isCancelled()) {
+ if (this.ticksLived != 1 || this.world.getType(i, j, k) != this.id || this.world.getData(i, j, k) != this.data || CraftEventFactory.callEntityChangeBlockEvent(this, i, j, k, Blocks.AIR, 0).isCancelled()) {
this.die();
return;
}
@@ -129,7 +129,7 @@ public class EntityFallingBlock extends Entity {
this.a(new ItemStack(this.id, 1, this.id.getDropData(this.data)), 0.0F);
}
}
- } else if (this.b > 100 && !this.world.isStatic && (j < 1 || j > 256) || this.b > 600) {
+ } else if (this.ticksLived > 100 && !this.world.isStatic && (j < 1 || j > 256) || this.ticksLived > 600) {
if (this.dropItem) {
this.a(new ItemStack(this.id, 1, this.id.getDropData(this.data)), 0.0F);
}
@@ -174,10 +174,10 @@ public class EntityFallingBlock extends Entity {
}
protected void b(NBTTagCompound nbttagcompound) {
- nbttagcompound.setByte("Tile", (byte) Block.b(this.id));
- nbttagcompound.setInt("TileID", Block.b(this.id));
+ nbttagcompound.setByte("Tile", (byte) Block.getId(this.id));
+ nbttagcompound.setInt("TileID", Block.getId(this.id));
nbttagcompound.setByte("Data", (byte) this.data);
- nbttagcompound.setByte("Time", (byte) this.b);
+ nbttagcompound.setByte("Time", (byte) this.ticksLived);
nbttagcompound.setBoolean("DropItem", this.dropItem);
nbttagcompound.setBoolean("HurtEntities", this.hurtEntities);
nbttagcompound.setFloat("FallHurtAmount", this.fallHurtAmount);
@@ -189,13 +189,13 @@ public class EntityFallingBlock extends Entity {
protected void a(NBTTagCompound nbttagcompound) {
if (nbttagcompound.hasKeyOfType("TileID", 99)) {
- this.id = Block.e(nbttagcompound.getInt("TileID"));
+ this.id = Block.getById(nbttagcompound.getInt("TileID"));
} else {
- this.id = Block.e(nbttagcompound.getByte("Tile") & 255);
+ this.id = Block.getById(nbttagcompound.getByte("Tile") & 255);
}
this.data = nbttagcompound.getByte("Data") & 255;
- this.b = nbttagcompound.getByte("Time") & 255;
+ this.ticksLived = nbttagcompound.getByte("Time") & 255;
if (nbttagcompound.hasKeyOfType("HurtEntities", 99)) {
this.hurtEntities = nbttagcompound.getBoolean("HurtEntities");
this.fallHurtAmount = nbttagcompound.getFloat("FallHurtAmount");
@@ -223,7 +223,7 @@ public class EntityFallingBlock extends Entity {
public void a(CrashReportSystemDetails crashreportsystemdetails) {
super.a(crashreportsystemdetails);
- crashreportsystemdetails.a("Immitating block ID", Integer.valueOf(Block.b(this.id)));
+ crashreportsystemdetails.a("Immitating block ID", Integer.valueOf(Block.getId(this.id)));
crashreportsystemdetails.a("Immitating block data", Integer.valueOf(this.data));
}
diff --git a/src/main/java/net/minecraft/server/EntityFireball.java b/src/main/java/net/minecraft/server/EntityFireball.java
index 9cbcfc9b..02d90aa2 100644
--- a/src/main/java/net/minecraft/server/EntityFireball.java
+++ b/src/main/java/net/minecraft/server/EntityFireball.java
@@ -107,7 +107,7 @@ public abstract class EntityFireball extends Entity {
for (int i = 0; i < list.size(); ++i) {
Entity entity1 = (Entity) list.get(i);
- if (entity1.Q() && (!entity1.i(this.shooter) || this.au >= 25)) {
+ if (entity1.R() && (!entity1.i(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);
@@ -164,7 +164,7 @@ public abstract class EntityFireball extends Entity {
this.yaw = this.lastYaw + (this.yaw - this.lastYaw) * 0.2F;
float f2 = this.e();
- if (this.L()) {
+ if (this.M()) {
for (int j = 0; j < 4; ++j) {
float f3 = 0.25F;
@@ -195,7 +195,7 @@ public abstract class EntityFireball extends Entity {
nbttagcompound.setShort("xTile", (short) this.e);
nbttagcompound.setShort("yTile", (short) this.f);
nbttagcompound.setShort("zTile", (short) this.g);
- nbttagcompound.setByte("inTile", (byte) Block.b(this.h));
+ nbttagcompound.setByte("inTile", (byte) Block.getId(this.h));
nbttagcompound.setByte("inGround", (byte) (this.i ? 1 : 0));
// CraftBukkit - Fix direction being mismapped to invalid variables
nbttagcompound.set("power", this.a(new double[] { this.dirX, this.dirY, this.dirZ}));
@@ -205,7 +205,7 @@ public abstract class EntityFireball extends Entity {
this.e = nbttagcompound.getShort("xTile");
this.f = nbttagcompound.getShort("yTile");
this.g = nbttagcompound.getShort("zTile");
- this.h = Block.e(nbttagcompound.getByte("inTile") & 255);
+ this.h = Block.getById(nbttagcompound.getByte("inTile") & 255);
this.i = nbttagcompound.getByte("inGround") == 1;
// CraftBukkit start - direction -> power
if (nbttagcompound.hasKeyOfType("power", 9)) {
@@ -220,11 +220,11 @@ public abstract class EntityFireball extends Entity {
}
}
- public boolean Q() {
+ public boolean R() {
return true;
}
- public float ae() {
+ public float af() {
return 1.0F;
}
@@ -232,7 +232,7 @@ public abstract class EntityFireball extends Entity {
if (this.isInvulnerable()) {
return false;
} else {
- this.P();
+ this.Q();
if (damagesource.getEntity() != null) {
// CraftBukkit start
if (CraftEventFactory.handleNonLivingEntityDamageEvent(this, damagesource, f)) {
@@ -240,7 +240,7 @@ public abstract class EntityFireball extends Entity {
}
// CraftBukkit end
- Vec3D vec3d = damagesource.getEntity().af();
+ Vec3D vec3d = damagesource.getEntity().ag();
if (vec3d != null) {
this.motX = vec3d.a;
diff --git a/src/main/java/net/minecraft/server/EntityFireworks.java b/src/main/java/net/minecraft/server/EntityFireworks.java
index a228a2ce..759d46c4 100644
--- a/src/main/java/net/minecraft/server/EntityFireworks.java
+++ b/src/main/java/net/minecraft/server/EntityFireworks.java
@@ -11,7 +11,7 @@ public class EntityFireworks extends Entity {
}
protected void c() {
- this.datawatcher.a(8, 5);
+ this.datawatcher.add(8, 5);
}
public EntityFireworks(World world, double d0, double d1, double d2, ItemStack itemstack) {
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
index 2a73b6c4..2ee3f301 100644
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
@@ -101,7 +101,7 @@ public class EntityFishingHook extends Entity {
this.b(this.yaw, this.pitch);
} else {
if (!this.world.isStatic) {
- ItemStack itemstack = this.owner.bE();
+ ItemStack itemstack = this.owner.bF();
if (this.owner.dead || !this.owner.isAlive() || itemstack == null || itemstack.getItem() != Items.FISHING_ROD || this.f(this.owner) > 1024.0D) {
this.die();
@@ -164,7 +164,7 @@ public class EntityFishingHook extends Entity {
for (int i = 0; i < list.size(); ++i) {
Entity entity1 = (Entity) list.get(i);
- if (entity1.Q() && (entity1 != this.owner || this.aw >= 5)) {
+ if (entity1.R() && (entity1 != this.owner || this.aw >= 5)) {
float f = 0.3F;
AxisAlignedBB axisalignedbb = entity1.boundingBox.grow((double) f, (double) f, (double) f);
MovingObjectPosition movingobjectposition1 = axisalignedbb.a(vec3d, vec3d1);
@@ -344,7 +344,7 @@ public class EntityFishingHook extends Entity {
nbttagcompound.setShort("xTile", (short) this.g);
nbttagcompound.setShort("yTile", (short) this.h);
nbttagcompound.setShort("zTile", (short) this.i);
- nbttagcompound.setByte("inTile", (byte) Block.b(this.at));
+ nbttagcompound.setByte("inTile", (byte) Block.getId(this.at));
nbttagcompound.setByte("shake", (byte) this.a);
nbttagcompound.setByte("inGround", (byte) (this.au ? 1 : 0));
}
@@ -353,7 +353,7 @@ public class EntityFishingHook extends Entity {
this.g = nbttagcompound.getShort("xTile");
this.h = nbttagcompound.getShort("yTile");
this.i = nbttagcompound.getShort("zTile");
- this.at = Block.e(nbttagcompound.getByte("inTile") & 255);
+ this.at = Block.getById(nbttagcompound.getByte("inTile") & 255);
this.a = nbttagcompound.getByte("shake") & 255;
this.au = nbttagcompound.getByte("inGround") == 1;
}
diff --git a/src/main/java/net/minecraft/server/EntityGhast.java b/src/main/java/net/minecraft/server/EntityGhast.java
index cd1fd3b6..d543fcae 100644
--- a/src/main/java/net/minecraft/server/EntityGhast.java
+++ b/src/main/java/net/minecraft/server/EntityGhast.java
@@ -41,12 +41,12 @@ public class EntityGhast extends EntityFlying implements IMonster {
this.datawatcher.a(16, Byte.valueOf((byte) 0));
}
- protected void aC() {
- super.aC();
- this.getAttributeInstance(GenericAttributes.a).setValue(10.0D);
+ protected void aD() {
+ super.aD();
+ this.getAttributeInstance(GenericAttributes.maxHealth).setValue(10.0D);
}
- protected void bp() {
+ protected void bq() {
if (!this.world.isStatic && this.world.difficulty == EnumDifficulty.PEACEFUL) {
this.die();
}
@@ -123,7 +123,7 @@ public class EntityGhast extends EntityFlying implements IMonster {
double d7 = this.target.locZ - this.locZ;
this.aM = this.yaw = -((float) Math.atan2(d5, d7)) * 180.0F / 3.1415927F;
- if (this.p(this.target)) {
+ if (this.hasLineOfSight(this.target)) {
if (this.bp == 10) {
this.world.a((EntityHuman) null, 1007, (int) this.locX, (int) this.locY, (int) this.locZ, 0);
}
@@ -184,11 +184,11 @@ public class EntityGhast extends EntityFlying implements IMonster {
return "mob.ghast.moan";
}
- protected String aS() {
+ protected String aT() {
return "mob.ghast.scream";
}
- protected String aT() {
+ protected String aU() {
return "mob.ghast.death";
}
@@ -212,7 +212,7 @@ public class EntityGhast extends EntityFlying implements IMonster {
}
}
- protected float be() {
+ protected float bf() {
return 10.0F;
}
diff --git a/src/main/java/net/minecraft/server/EntityHanging.java b/src/main/java/net/minecraft/server/EntityHanging.java
index 56071ff1..eec465b4 100644
--- a/src/main/java/net/minecraft/server/EntityHanging.java
+++ b/src/main/java/net/minecraft/server/EntityHanging.java
@@ -199,7 +199,7 @@ public abstract class EntityHanging extends Entity {
}
}
- public boolean Q() {
+ public boolean R() {
return true;
}
@@ -243,7 +243,7 @@ public abstract class EntityHanging extends Entity {
// CraftBukkit end
this.die();
- this.P();
+ this.Q();
this.b(damagesource.getEntity());
}
@@ -334,7 +334,7 @@ public abstract class EntityHanging extends Entity {
public abstract void b(Entity entity);
- protected boolean U() {
+ protected boolean V() {
return false;
}
}
diff --git a/src/main/java/net/minecraft/server/EntityHorse.java b/src/main/java/net/minecraft/server/EntityHorse.java
index 71388622..d167c001 100644
--- a/src/main/java/net/minecraft/server/EntityHorse.java
+++ b/src/main/java/net/minecraft/server/EntityHorse.java
@@ -254,11 +254,11 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
return this.passenger != null && this.passenger.equals(entity) ? false : super.damageEntity(damagesource, f);
}
- public int aU() {
+ public int aV() {
return by[this.cl()];
}
- public boolean R() {
+ public boolean S() {
return this.passenger == null;
}
@@ -390,7 +390,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
return this.getAttributeInstance(attributeJumpStrength).getValue();
}
- protected String aT() {
+ protected String aU() {
this.cS();
int i = this.getType();
@@ -401,10 +401,10 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
boolean flag = this.random.nextInt(4) == 0;
int i = this.getType();
- return i == 4 ? Items.BONE : (i == 3 ? (flag ? Item.d(0) : Items.ROTTEN_FLESH) : Items.LEATHER);
+ return i == 4 ? Items.BONE : (i == 3 ? (flag ? Item.getById(0) : Items.ROTTEN_FLESH) : Items.LEATHER);
}
- protected String aS() {
+ protected String aT() {
this.cS();
if (this.random.nextInt(3) == 0) {
this.cU();
@@ -421,7 +421,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
protected String t() {
this.cS();
- if (this.random.nextInt(10) == 0 && !this.bg()) {
+ if (this.random.nextInt(10) == 0 && !this.bh()) {
this.cU();
}
@@ -466,10 +466,10 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
}
}
- protected void aC() {
- super.aC();
- this.bb().b(attributeJumpStrength);
- this.getAttributeInstance(GenericAttributes.a).setValue(53.0D);
+ protected void aD() {
+ super.aD();
+ this.getAttributeMap().b(attributeJumpStrength);
+ this.getAttributeInstance(GenericAttributes.maxHealth).setValue(53.0D);
this.getAttributeInstance(GenericAttributes.d).setValue(0.22499999403953552D);
}
@@ -481,7 +481,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
return this.maxDomestication; // CraftBukkit - return stored max domestication instead of 100
}
- protected float be() {
+ protected float bf() {
return 0.8F;
}
@@ -663,7 +663,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
return i == 2 || i == 1;
}
- protected boolean bg() {
+ protected boolean bh() {
return this.passenger != null && this.cu() ? true : this.cm() || this.cn();
}
@@ -689,7 +689,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
super.die(damagesource);
/* CraftBukkit start - Handle chest dropping in dropDeathLoot below
if (!this.world.isStatic) {
- this.cK();
+ this.dropChest();
}
// CraftBukkit end */
}
@@ -700,7 +700,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
// Moved from die method above
if (!this.world.isStatic) {
- this.cK(); // Should be dropChest
+ this.dropChest();
}
}
// CraftBukkit end
@@ -846,11 +846,11 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
String s = this.cv();
if (s != null) {
- this.makeSound(s, this.be(), this.bf());
+ this.makeSound(s, this.bf(), this.bg());
}
}
- public void cK() {
+ public void dropChest() {
this.a(this, this.inventoryChest);
this.cs();
}
@@ -912,7 +912,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
}
this.W = 1.0F;
- this.aQ = this.bk() * 0.1F;
+ this.aQ = this.bl() * 0.1F;
if (!this.world.isStatic) {
this.i((float) this.getAttributeInstance(GenericAttributes.d).getValue());
super.e(f, f1);
@@ -998,7 +998,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
this.maxDomestication = nbttagcompound.getInt("Bukkit.MaxDomestication");
}
// CraftBukkit end
- AttributeInstance attributeinstance = this.bb().a("Speed");
+ AttributeInstance attributeinstance = this.getAttributeMap().a("Speed");
if (attributeinstance != null) {
this.getAttributeInstance(GenericAttributes.d).setValue(attributeinstance.b() * 0.25D);
@@ -1098,9 +1098,9 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
}
entityhorse1.setType(k);
- double d0 = this.getAttributeInstance(GenericAttributes.a).b() + entityageable.getAttributeInstance(GenericAttributes.a).b() + (double) this.cV();
+ double d0 = this.getAttributeInstance(GenericAttributes.maxHealth).b() + entityageable.getAttributeInstance(GenericAttributes.maxHealth).b() + (double) this.cV();
- entityhorse1.getAttributeInstance(GenericAttributes.a).setValue(d0 / 3.0D);
+ entityhorse1.getAttributeInstance(GenericAttributes.maxHealth).setValue(d0 / 3.0D);
double d1 = this.getAttributeInstance(attributeJumpStrength).b() + entityageable.getAttributeInstance(attributeJumpStrength).b() + this.cW();
entityhorse1.getAttributeInstance(attributeJumpStrength).setValue(d1 / 3.0D);
@@ -1110,8 +1110,8 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
return entityhorse1;
}
- public GroupDataEntity a(GroupDataEntity groupdataentity) {
- Object object = super.a(groupdataentity);
+ public GroupDataEntity prepare(GroupDataEntity groupdataentity) {
+ Object object = super.prepare(groupdataentity);
boolean flag = false;
int i = 0;
int j;
@@ -1140,14 +1140,14 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
}
if (j != 4 && j != 3) {
- this.getAttributeInstance(GenericAttributes.a).setValue((double) this.cV());
+ this.getAttributeInstance(GenericAttributes.maxHealth).setValue((double) this.cV());
if (j == 0) {
this.getAttributeInstance(GenericAttributes.d).setValue(this.cX());
} else {
this.getAttributeInstance(GenericAttributes.d).setValue(0.17499999701976776D);
}
} else {
- this.getAttributeInstance(GenericAttributes.a).setValue(15.0D);
+ this.getAttributeInstance(GenericAttributes.maxHealth).setValue(15.0D);
this.getAttributeInstance(GenericAttributes.d).setValue(0.20000000298023224D);
}
@@ -1161,7 +1161,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
return (GroupDataEntity) object;
}
- protected boolean bj() {
+ protected boolean bk() {
return true;
}
@@ -1189,15 +1189,15 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
}
}
- public void ab() {
- super.ab();
+ public void ac() {
+ super.ac();
if (this.bM > 0.0F) {
float f = MathHelper.sin(this.aM * 3.1415927F / 180.0F);
float f1 = MathHelper.cos(this.aM * 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.ad() + this.passenger.ac() + (double) f3, this.locZ - (double) (f2 * f1));
+ this.passenger.setPosition(this.locX + (double) (f2 * f), this.locY + this.ad() + this.passenger.ad() + (double) f3, this.locZ - (double) (f2 * f1));
if (this.passenger instanceof EntityLiving) {
((EntityLiving) this.passenger).aM = this.aM;
}
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index a5dfcf4b..03485fea 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -82,9 +82,9 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
this.maxFireTicks = 20;
}
- protected void aC() {
- super.aC();
- this.bb().b(GenericAttributes.e).setValue(1.0D);
+ protected void aD() {
+ super.aD();
+ this.getAttributeMap().b(GenericAttributes.e).setValue(1.0D);
}
protected void c() {
@@ -94,19 +94,19 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
this.datawatcher.a(18, Integer.valueOf(0));
}
- public boolean bx() {
+ public boolean by() {
return this.f != null;
}
- public void bz() {
+ public void bA() {
if (this.f != null) {
this.f.b(this.world, this, this.g);
}
- this.bA();
+ this.bB();
}
- public void bA() {
+ public void bB() {
this.f = null;
this.g = 0;
if (!this.world.isStatic) {
@@ -115,7 +115,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
}
public boolean isBlocking() {
- return this.bx() && this.f.getItem().d(this.f) == EnumAnimation.BLOCK;
+ return this.by() && this.f.getItem().d(this.f) == EnumAnimation.BLOCK;
}
public void h() {
@@ -131,7 +131,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
this.p();
}
} else {
- this.bA();
+ this.bB();
}
}
@@ -214,19 +214,19 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
}
}
- public int C() {
+ public int D() {
return this.abilities.isInvulnerable ? 0 : 80;
}
- protected String G() {
+ protected String H() {
return "game.player.swim";
}
- protected String N() {
+ protected String O() {
return "game.player.swim.splash";
}
- public int ah() {
+ public int ai() {
return 10;
}
@@ -250,7 +250,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
vec3d1.a(-this.pitch * 3.1415927F / 180.0F);
vec3d1.b(-this.yaw * 3.1415927F / 180.0F);
vec3d1 = vec3d1.add(this.locX, this.locY + (double) this.getHeadHeight(), this.locZ);
- String s = "iconcrack_" + Item.b(itemstack.getItem());
+ String s = "iconcrack_" + Item.getId(itemstack.getItem());
if (itemstack.usesData()) {
s = s + "_" + itemstack.getData();
@@ -276,7 +276,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
if (event.isCancelled()) {
// Update client
if (this instanceof EntityPlayer) {
- ((EntityPlayer) this).playerConnection.sendPacket(new PacketPlayOutSetSlot((byte) 0, activeContainer.a((IInventory) this.inventory, this.inventory.itemInHandIndex).index, this.f));
+ ((EntityPlayer) this).playerConnection.sendPacket(new PacketPlayOutSetSlot((byte) 0, activeContainer.getSlot((IInventory) this.inventory, this.inventory.itemInHandIndex).index, this.f));
}
return;
}
@@ -287,7 +287,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
// Update client
if (this instanceof EntityPlayer) {
- ((EntityPlayer) this).playerConnection.sendPacket(new PacketPlayOutSetSlot((byte) 0, activeContainer.a((IInventory) this.inventory, this.inventory.itemInHandIndex).index, this.f));
+ ((EntityPlayer) this).playerConnection.sendPacket(new PacketPlayOutSetSlot((byte) 0, activeContainer.getSlot((IInventory) this.inventory, this.inventory.itemInHandIndex).index, this.f));
}
return;
}
@@ -302,11 +302,11 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
}
}
- this.bA();
+ this.bB();
}
}
- protected boolean bg() {
+ protected boolean bh() {
return this.getHealth() <= 0.0F || this.isSleeping();
}
@@ -347,7 +347,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
}
}
- public void aa() {
+ public void ab() {
if (!this.world.isStatic && this.isSneaking()) {
this.mount((Entity) null);
this.setSneaking(false);
@@ -358,7 +358,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
float f = this.yaw;
float f1 = this.pitch;
- super.aa();
+ super.ab();
this.br = this.bs;
this.bs = 0.0F;
this.l(this.locX - d0, this.locY - d1, this.locZ - d2);
@@ -370,9 +370,9 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
}
}
- protected void bp() {
- super.bp();
- this.ba();
+ protected void bq() {
+ super.bq();
+ this.bb();
}
public void e() {
@@ -483,11 +483,11 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
this.a(StatisticList.v, 1);
}
- protected String aS() {
+ protected String aT() {
return "game.player.hurt";
}
- protected String aT() {
+ protected String aU() {
return "game.player.die";
}
@@ -775,15 +775,15 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
// CraftBukkit end
}
- protected void h(float f) {
+ protected void damageArmor(float f) {
this.inventory.a(f);
}
- public int aU() {
+ public int aV() {
return this.inventory.l();
}
- public float bD() {
+ public float bE() {
int i = 0;
ItemStack[] aitemstack = this.inventory.armor;
int j = aitemstack.length;
@@ -810,18 +810,18 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
f = (1.0F + f) * 0.5F;
}
- f = this.b(damagesource, f);
- f = this.c(damagesource, f);
+ f = this.applyArmorModifier(damagesource, f);
+ f = this.applyMagicModifier(damagesource, f);
float f1 = f;
- f = Math.max(f - this.br(), 0.0F);
- this.m(this.br() - (f1 - f));
+ f = Math.max(f - this.getAbsorptionHearts(), 0.0F);
+ this.setAbsorptionHearts(this.getAbsorptionHearts() - (f1 - f));
if (f != 0.0F) {
- this.a(damagesource.f());
+ this.applyExhaustion(damagesource.getExhaustionCost());
float f2 = this.getHealth();
this.setHealth(this.getHealth() - f);
- this.aV().a(damagesource, f2, f);
+ this.aW().a(damagesource, f2, f);
}
}
return false; // CraftBukkit
@@ -844,7 +844,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
public void b(ItemStack itemstack) {}
public boolean q(Entity entity) {
- ItemStack itemstack = this.bE();
+ ItemStack itemstack = this.bF();
ItemStack itemstack1 = itemstack != null ? itemstack.cloneItemStack() : null;
if (!entity.c(this)) {
@@ -856,7 +856,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
if (itemstack.a(this, (EntityLiving) entity)) {
// CraftBukkit - bypass infinite items; <= 0 -> == 0
if (itemstack.count == 0 && !this.abilities.canInstantlyBuild) {
- this.bF();
+ this.bG();
}
return true;
@@ -865,9 +865,9 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
return false;
} else {
- if (itemstack != null && itemstack == this.bE()) {
+ if (itemstack != null && itemstack == this.bF()) {
if (itemstack.count <= 0 && !this.abilities.canInstantlyBuild) {
- this.bF();
+ this.bG();
} else if (itemstack.count < itemstack1.count && this.abilities.canInstantlyBuild) {
itemstack.count = itemstack1.count;
}
@@ -877,20 +877,20 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
}
}
- public ItemStack bE() {
+ public ItemStack bF() {
return this.inventory.getItemInHand();
}
- public void bF() {
+ public void bG() {
this.inventory.setItem(this.inventory.itemInHandIndex, (ItemStack) null);
}
- public double ac() {
+ public double ad() {
return (double) (this.height - 0.5F);
}
public void attack(Entity entity) {
- if (entity.au()) {
+ if (entity.av()) {
if (!entity.j(this)) {
float f = (float) this.getAttributeInstance(GenericAttributes.e).getValue();
int i = 0;
@@ -906,7 +906,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
}
if (f > 0.0F || f1 > 0.0F) {
- boolean flag = this.fallDistance > 0.0F && !this.onGround && !this.h_() && !this.L() && !this.hasEffect(MobEffectList.BLINDNESS) && this.vehicle == null && entity instanceof EntityLiving;
+ boolean flag = this.fallDistance > 0.0F && !this.onGround && !this.h_() && !this.M() && !this.hasEffect(MobEffectList.BLINDNESS) && this.vehicle == null && entity instanceof EntityLiving;
if (flag && f > 0.0F) {
f *= 1.5F;
@@ -956,7 +956,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
}
EnchantmentManager.b(this, entity);
- ItemStack itemstack = this.bE();
+ ItemStack itemstack = this.bF();
Object object = entity;
if (entity instanceof EntityComplexPart) {
@@ -971,7 +971,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
itemstack.a((EntityLiving) object, this);
// CraftBukkit - bypass infinite items; <= 0 -> == 0
if (itemstack.count == 0) {
- this.bF();
+ this.bG();
}
}
@@ -989,7 +989,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
}
}
- this.a(0.3F);
+ this.applyExhaustion(0.3F);
} else if (flag1) {
entity.extinguish();
}
@@ -1045,7 +1045,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
}
}
- if (this.al()) {
+ if (this.am()) {
this.mount((Entity) null);
}
@@ -1245,13 +1245,13 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
public void a(Statistic statistic, int i) {}
- public void bi() {
- super.bi();
+ public void bj() {
+ super.bj();
this.a(StatisticList.r, 1);
if (this.isSprinting()) {
- this.a(0.8F);
+ this.applyExhaustion(0.8F);
} else {
- this.a(0.2F);
+ this.applyExhaustion(0.2F);
}
}
@@ -1275,7 +1275,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
this.checkMovement(this.locX - d0, this.locY - d1, this.locZ - d2);
}
- public float bk() {
+ public float bl() {
return (float) this.getAttributeInstance(GenericAttributes.d).getValue();
}
@@ -1287,13 +1287,13 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
i = Math.round(MathHelper.sqrt(d0 * d0 + d1 * d1 + d2 * d2) * 100.0F);
if (i > 0) {
this.a(StatisticList.m, i);
- this.a(0.015F * (float) i * 0.01F);
+ this.applyExhaustion(0.015F * (float) i * 0.01F);
}
- } else if (this.L()) {
+ } else if (this.M()) {
i = Math.round(MathHelper.sqrt(d0 * d0 + d2 * d2) * 100.0F);
if (i > 0) {
this.a(StatisticList.i, i);
- this.a(0.015F * (float) i * 0.01F);
+ this.applyExhaustion(0.015F * (float) i * 0.01F);
}
} else if (this.h_()) {
if (d1 > 0.0D) {
@@ -1304,9 +1304,9 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
if (i > 0) {
this.a(StatisticList.h, i);
if (this.isSprinting()) {
- this.a(0.099999994F * (float) i * 0.01F);
+ this.applyExhaustion(0.099999994F * (float) i * 0.01F);
} else {
- this.a(0.01F * (float) i * 0.01F);
+ this.applyExhaustion(0.01F * (float) i * 0.01F);
}
}
} else {
@@ -1368,9 +1368,9 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
}
}
- public void ar() {
+ public void as() {
if (!this.abilities.isFlying) {
- super.ar();
+ super.as();
}
}
@@ -1414,7 +1414,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
return this.expLevel >= 30 ? 62 + (this.expLevel - 30) * 7 : (this.expLevel >= 15 ? 17 + (this.expLevel - 15) * 3 : 17);
}
- public void a(float f) {
+ public void applyExhaustion(float f) {
if (!this.abilities.isInvulnerable) {
if (!this.world.isStatic) {
this.foodData.a(f);
@@ -1430,7 +1430,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
return (flag || this.foodData.c()) && !this.abilities.isInvulnerable;
}
- public boolean bQ() {
+ public boolean bR() {
return this.getHealth() > 0.0F && this.getHealth() < this.getMaxHealth();
}
@@ -1455,8 +1455,8 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
return true;
}
- if (this.bE() != null) {
- ItemStack itemstack = this.bE();
+ if (this.bF() != null) {
+ ItemStack itemstack = this.bF();
if (itemstack.b(block) || itemstack.a(block) > 1.0F) {
return true;
@@ -1531,7 +1531,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
return i == 0 ? this.inventory.getItemInHand() : this.inventory.armor[i - 1];
}
- public ItemStack bd() {
+ public ItemStack be() {
return this.inventory.getItemInHand();
}
@@ -1543,7 +1543,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
return this.inventory.armor;
}
- public boolean aB() {
+ public boolean aC() {
return !this.abilities.isFlying;
}
@@ -1563,7 +1563,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
return chatcomponenttext;
}
- public void m(float f) {
+ public void setAbsorptionHearts(float f) {
if (f < 0.0F) {
f = 0.0F;
}
@@ -1571,7 +1571,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
this.getDataWatcher().watch(17, Float.valueOf(f));
}
- public float br() {
+ public float getAbsorptionHearts() {
return this.getDataWatcher().getFloat(17);
}
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 12e10366..a812656f 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -50,9 +50,9 @@ public abstract class EntityInsentient extends EntityLiving {
}
}
- protected void aC() {
- super.aC();
- this.bb().b(GenericAttributes.b).setValue(16.0D);
+ protected void aD() {
+ super.aD();
+ this.getAttributeMap().b(GenericAttributes.b).setValue(16.0D);
}
public ControllerLook getControllerLook() {
@@ -103,12 +103,12 @@ public abstract class EntityInsentient extends EntityLiving {
String s = this.t();
if (s != null) {
- this.makeSound(s, this.be(), this.bf());
+ this.makeSound(s, this.bf(), this.bg());
}
}
- public void B() {
- super.B();
+ public void C() {
+ super.C();
this.world.methodProfiler.a("mobBaseTick");
if (this.isAlive() && this.random.nextInt(1000) < this.a_++) {
this.a_ = -this.q();
@@ -154,7 +154,7 @@ public abstract class EntityInsentient extends EntityLiving {
}
protected float f(float f, float f1) {
- if (this.bj()) {
+ if (this.bk()) {
this.bn.a();
return f1;
} else {
@@ -167,7 +167,7 @@ public abstract class EntityInsentient extends EntityLiving {
}
protected Item getLoot() {
- return Item.d(0);
+ return Item.getById(0);
}
protected void dropDeathLoot(boolean flag, int i) {
@@ -362,7 +362,7 @@ public abstract class EntityInsentient extends EntityLiving {
this.world.methodProfiler.b();
}
- protected boolean bj() {
+ protected boolean bk() {
return false;
}
@@ -395,7 +395,7 @@ public abstract class EntityInsentient extends EntityLiving {
}
}
- protected void bm() {
+ protected void bn() {
++this.aU;
this.world.methodProfiler.a("checkDespawn");
this.w();
@@ -413,7 +413,7 @@ public abstract class EntityInsentient extends EntityLiving {
this.navigation.f();
this.world.methodProfiler.b();
this.world.methodProfiler.a("mob tick");
- this.bo();
+ this.bp();
this.world.methodProfiler.b();
this.world.methodProfiler.a("controls");
this.world.methodProfiler.a("move");
@@ -426,8 +426,8 @@ public abstract class EntityInsentient extends EntityLiving {
this.world.methodProfiler.b();
}
- protected void bp() {
- super.bp();
+ protected void bq() {
+ super.bq();
this.bd = 0.0F;
this.be = 0.0F;
this.w();
@@ -445,7 +445,7 @@ public abstract class EntityInsentient extends EntityLiving {
}
if (this.bu != null) {
- this.a(this.bu, 10.0F, (float) this.bv());
+ this.a(this.bu, 10.0F, (float) this.x());
if (this.g-- <= 0 || this.bu.dead || this.bu.f((Entity) this) > (double) (f * f)) {
this.bu = null;
}
@@ -458,15 +458,15 @@ public abstract class EntityInsentient extends EntityLiving {
this.pitch = this.f;
}
- boolean flag = this.L();
- boolean flag1 = this.O();
+ boolean flag = this.M();
+ boolean flag1 = this.P();
if (flag || flag1) {
this.bc = this.random.nextFloat() < 0.8F;
}
}
- public int bv() {
+ public int x() {
return 40;
}
@@ -513,7 +513,7 @@ public abstract class EntityInsentient extends EntityLiving {
return 4;
}
- public int aw() {
+ public int ax() {
if (this.getGoalTarget() == null) {
return 3;
} else {
@@ -528,7 +528,7 @@ public abstract class EntityInsentient extends EntityLiving {
}
}
- public ItemStack bd() {
+ public ItemStack be() {
return this.equipment[0];
}
@@ -695,8 +695,8 @@ public abstract class EntityInsentient extends EntityLiving {
protected void bD() {
float f = this.world.b(this.locX, this.locY, this.locZ);
- if (this.bd() != null && this.random.nextFloat() < 0.25F * f) {
- EnchantmentManager.a(this.random, this.bd(), (int) (5.0F + f * (float) this.random.nextInt(18)));
+ if (this.be() != null && this.random.nextFloat() < 0.25F * f) {
+ EnchantmentManager.a(this.random, this.be(), (int) (5.0F + f * (float) this.random.nextInt(18)));
}
for (int i = 0; i < 4; ++i) {
@@ -708,7 +708,7 @@ public abstract class EntityInsentient extends EntityLiving {
}
}
- public GroupDataEntity a(GroupDataEntity groupdataentity) {
+ public GroupDataEntity prepare(GroupDataEntity groupdataentity) {
this.getAttributeInstance(GenericAttributes.b).a(new AttributeModifier("Random spawn bonus", this.random.nextGaussian() * 0.05D, 1));
return groupdataentity;
}
diff --git a/src/main/java/net/minecraft/server/EntityIronGolem.java b/src/main/java/net/minecraft/server/EntityIronGolem.java
index c357110f..a274d03c 100644
--- a/src/main/java/net/minecraft/server/EntityIronGolem.java
+++ b/src/main/java/net/minecraft/server/EntityIronGolem.java
@@ -29,11 +29,11 @@ public class EntityIronGolem extends EntityGolem {
this.datawatcher.a(16, Byte.valueOf((byte) 0));
}
- public boolean bj() {
+ public boolean bk() {
return true;
}
- protected void bo() {
+ protected void bp() {
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,12 +46,12 @@ public class EntityIronGolem extends EntityGolem {
}
}
- super.bo();
+ super.bp();
}
- protected void aC() {
- super.aC();
- this.getAttributeInstance(GenericAttributes.a).setValue(100.0D);
+ protected void aD() {
+ super.aD();
+ this.getAttributeInstance(GenericAttributes.maxHealth).setValue(100.0D);
this.getAttributeInstance(GenericAttributes.d).setValue(0.25D);
}
@@ -60,7 +60,7 @@ public class EntityIronGolem extends EntityGolem {
}
protected void o(Entity entity) {
- if (entity instanceof IMonster && this.aH().nextInt(20) == 0) {
+ if (entity instanceof IMonster && this.aI().nextInt(20) == 0) {
// CraftBukkit start
org.bukkit.event.entity.EntityTargetLivingEntityEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTargetLivingEvent(this, (EntityLiving) entity, org.bukkit.event.entity.EntityTargetEvent.TargetReason.COLLISION);
if (!event.isCancelled()) {
@@ -93,7 +93,7 @@ public class EntityIronGolem extends EntityGolem {
Block block = this.world.getType(i, j, k);
if (block.getMaterial() != Material.AIR) {
- this.world.addParticle("blockcrack_" + Block.b(block) + "_" + this.world.getData(i, j, k), this.locX + ((double) this.random.nextFloat() - 0.5D) * (double) this.width, this.boundingBox.b + 0.1D, this.locZ + ((double) this.random.nextFloat() - 0.5D) * (double) this.width, 4.0D * ((double) this.random.nextFloat() - 0.5D), 0.5D, ((double) this.random.nextFloat() - 0.5D) * 4.0D);
+ this.world.addParticle("blockcrack_" + Block.getId(block) + "_" + this.world.getData(i, j, k), this.locX + ((double) this.random.nextFloat() - 0.5D) * (double) this.width, this.boundingBox.b + 0.1D, this.locZ + ((double) this.random.nextFloat() - 0.5D) * (double) this.width, 4.0D * ((double) this.random.nextFloat() - 0.5D), 0.5D, ((double) this.random.nextFloat() - 0.5D) * 4.0D);
}
}
}
@@ -134,11 +134,11 @@ public class EntityIronGolem extends EntityGolem {
this.world.broadcastEntityEffect(this, (byte) 11);
}
- protected String aS() {
+ protected String aT() {
return "mob.irongolem.hit";
}
- protected String aT() {
+ protected String aU() {
return "mob.irongolem.death";
}
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
index 8343ac9f..394bfbf6 100644
--- a/src/main/java/net/minecraft/server/EntityItem.java
+++ b/src/main/java/net/minecraft/server/EntityItem.java
@@ -54,7 +54,7 @@ public class EntityItem extends Entity {
}
protected void c() {
- this.getDataWatcher().a(10, 5);
+ this.getDataWatcher().add(10, 5);
}
public void h() {
@@ -164,7 +164,7 @@ public class EntityItem extends Entity {
this.age = 4800;
}
- public boolean M() {
+ public boolean N() {
return this.world.a(this.boundingBox, Material.WATER, (Entity) this);
}
@@ -178,7 +178,7 @@ public class EntityItem extends Entity {
} else if (this.getItemStack() != null && this.getItemStack().getItem() == Items.NETHER_STAR && damagesource.isExplosion()) {
return false;
} else {
- this.P();
+ this.Q();
this.e = (int) ((float) this.e - f);
if (this.e <= 0) {
this.die();
@@ -301,7 +301,7 @@ public class EntityItem extends Entity {
return LocaleI18n.get("item." + this.getItemStack().a());
}
- public boolean au() {
+ public boolean av() {
return false;
}
@@ -320,7 +320,7 @@ public class EntityItem extends Entity {
public void setItemStack(ItemStack itemstack) {
this.getDataWatcher().watch(10, itemstack);
- this.getDataWatcher().h(10);
+ this.getDataWatcher().update(10);
}
public String i() {
diff --git a/src/main/java/net/minecraft/server/EntityItemFrame.java b/src/main/java/net/minecraft/server/EntityItemFrame.java
index 6951c1d9..1edb6d31 100644
--- a/src/main/java/net/minecraft/server/EntityItemFrame.java
+++ b/src/main/java/net/minecraft/server/EntityItemFrame.java
@@ -14,7 +14,7 @@ public class EntityItemFrame extends EntityHanging {
}
protected void c() {
- this.getDataWatcher().a(2, 5);
+ this.getDataWatcher().add(2, 5);
this.getDataWatcher().a(3, Byte.valueOf((byte) 0));
}
@@ -79,7 +79,7 @@ public class EntityItemFrame extends EntityHanging {
if (itemstack.getItem() == Items.MAP) {
WorldMap worldmap = ((ItemWorldMap) itemstack.getItem()).getSavedMap(itemstack, this.world);
- worldmap.g.remove("frame-" + this.getId());
+ worldmap.decorations.remove("frame-" + this.getId());
}
itemstack.a((EntityItemFrame) null);
@@ -98,7 +98,7 @@ public class EntityItemFrame extends EntityHanging {
}
this.getDataWatcher().watch(2, itemstack);
- this.getDataWatcher().h(2);
+ this.getDataWatcher().update(2);
}
public int getRotation() {
@@ -135,7 +135,7 @@ public class EntityItemFrame extends EntityHanging {
public boolean c(EntityHuman entityhuman) {
if (this.getItem() == null) {
- ItemStack itemstack = entityhuman.bd();
+ ItemStack itemstack = entityhuman.be();
if (itemstack != null && !this.world.isStatic) {
this.setItem(itemstack);
diff --git a/src/main/java/net/minecraft/server/EntityLeash.java b/src/main/java/net/minecraft/server/EntityLeash.java
index ea590d48..9b2ac823 100644
--- a/src/main/java/net/minecraft/server/EntityLeash.java
+++ b/src/main/java/net/minecraft/server/EntityLeash.java
@@ -41,7 +41,7 @@ public class EntityLeash extends EntityHanging {
public void a(NBTTagCompound nbttagcompound) {}
public boolean c(EntityHuman entityhuman) {
- ItemStack itemstack = entityhuman.bd();
+ ItemStack itemstack = entityhuman.be();
boolean flag = false;
double d0;
List list;
@@ -112,7 +112,7 @@ public class EntityLeash extends EntityHanging {
public static EntityLeash a(World world, int i, int j, int k) {
EntityLeash entityleash = new EntityLeash(world, i, j, k);
- entityleash.n = true;
+ entityleash.attachedToPlayer = true;
world.addEntity(entityleash);
return entityleash;
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 095a97f8..f86d698a 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -84,9 +84,9 @@ public abstract class EntityLiving extends Entity {
public EntityLiving(World world) {
super(world);
- this.aC();
+ this.aD();
// CraftBukkit - setHealth(getMaxHealth()) inlined and simplified to skip the instanceof check for EntityPlayer, as getBukkitEntity() is not initialized in constructor
- this.datawatcher.watch(6, (float) this.getAttributeInstance(GenericAttributes.a).getValue());
+ this.datawatcher.watch(6, (float) this.getAttributeInstance(GenericAttributes.maxHealth).getValue());
this.k = true;
this.aL = (float) (Math.random() + 1.0D) * 0.01F;
this.setPosition(this.locX, this.locY, this.locZ);
@@ -103,18 +103,18 @@ public abstract class EntityLiving extends Entity {
this.datawatcher.a(6, Float.valueOf(1.0F));
}
- protected void aC() {
- this.bb().b(GenericAttributes.a);
- this.bb().b(GenericAttributes.c);
- this.bb().b(GenericAttributes.d);
- if (!this.bj()) {
+ protected void aD() {
+ this.getAttributeMap().b(GenericAttributes.maxHealth);
+ this.getAttributeMap().b(GenericAttributes.c);
+ this.getAttributeMap().b(GenericAttributes.d);
+ if (!this.bk()) {
this.getAttributeInstance(GenericAttributes.d).setValue(0.10000000149011612D);
}
}
protected void a(double d0, boolean flag) {
- if (!this.L()) {
- this.M();
+ if (!this.M()) {
+ this.N();
}
if (flag && this.fallDistance > 0.0F) {
@@ -146,13 +146,13 @@ public abstract class EntityLiving extends Entity {
super.a(d0, flag);
}
- public boolean aD() {
+ public boolean aE() {
return false;
}
- public void B() {
+ public void C() {
this.aC = this.aD;
- super.B();
+ super.C();
this.world.methodProfiler.a("livingEntityBaseTick");
if (this.isAlive() && this.inBlock()) {
this.damageEntity(DamageSource.STUCK, 1.0F);
@@ -165,7 +165,7 @@ public abstract class EntityLiving extends Entity {
boolean flag = this instanceof EntityHuman && ((EntityHuman) this).abilities.isInvulnerable;
if (this.isAlive() && this.a(Material.WATER)) {
- if (!this.aD() && !this.hasEffect(MobEffectList.WATER_BREATHING.id) && !flag) {
+ if (!this.aE() && !this.hasEffect(MobEffectList.WATER_BREATHING.id) && !flag) {
this.setAirTicks(this.j(this.getAirTicks()));
if (this.getAirTicks() == -20) {
this.setAirTicks(0);
@@ -182,7 +182,7 @@ public abstract class EntityLiving extends Entity {
}
}
- if (!this.world.isStatic && this.al() && this.vehicle instanceof EntityLiving) {
+ if (!this.world.isStatic && this.am() && this.vehicle instanceof EntityLiving) {
this.mount((Entity) null);
}
} else {
@@ -193,7 +193,7 @@ public abstract class EntityLiving extends Entity {
// CraftBukkit end
}
- if (this.isAlive() && this.K()) {
+ if (this.isAlive() && this.L()) {
this.extinguish();
}
@@ -211,7 +211,7 @@ public abstract class EntityLiving extends Entity {
}
if (this.getHealth() <= 0.0F) {
- this.aE();
+ this.aF();
}
if (this.lastDamageByPlayerTime > 0) {
@@ -232,7 +232,7 @@ public abstract class EntityLiving extends Entity {
}
}
- this.aN();
+ this.aO();
this.aY = this.aX;
this.aN = this.aM;
this.aP = this.aO;
@@ -245,7 +245,7 @@ public abstract class EntityLiving extends Entity {
public int getExpReward() {
int exp = this.getExpValue(this.killer);
- if (!this.world.isStatic && (this.lastDamageByPlayerTime > 0 || this.alwaysGivesExp()) && this.aF() && this.world.getGameRules().getBoolean("doMobLoot")) {
+ if (!this.world.isStatic && (this.lastDamageByPlayerTime > 0 || this.alwaysGivesExp()) && this.aG() && this.world.getGameRules().getBoolean("doMobLoot")) {
return exp;
} else {
return 0;
@@ -257,7 +257,7 @@ public abstract class EntityLiving extends Entity {
return false;
}
- protected void aE() {
+ protected void aF() {
++this.deathTicks;
if (this.deathTicks >= 20 && !this.dead) { // CraftBukkit - (this.deathTicks == 20) -> (this.deathTicks >= 20 && !this.dead)
int i;
@@ -285,7 +285,7 @@ public abstract class EntityLiving extends Entity {
}
}
- protected boolean aF() {
+ protected boolean aG() {
return !this.isBaby();
}
@@ -303,7 +303,7 @@ public abstract class EntityLiving extends Entity {
return false;
}
- public Random aH() {
+ public Random aI() {
return this.random;
}
@@ -311,7 +311,7 @@ public abstract class EntityLiving extends Entity {
return this.lastDamager;
}
- public int aJ() {
+ public int aK() {
return this.bm;
}
@@ -320,11 +320,11 @@ public abstract class EntityLiving extends Entity {
this.bm = this.ticksLived;
}
- public EntityLiving aK() {
+ public EntityLiving aL() {
return this.bn;
}
- public int aL() {
+ public int aM() {
return this.bo;
}
@@ -338,7 +338,7 @@ public abstract class EntityLiving extends Entity {
this.bo = this.ticksLived;
}
- public int aM() {
+ public int aN() {
return this.aU;
}
@@ -348,7 +348,7 @@ public abstract class EntityLiving extends Entity {
nbttagcompound.setShort("HurtTime", (short) this.hurtTicks);
nbttagcompound.setShort("DeathTime", (short) this.deathTicks);
nbttagcompound.setShort("AttackTime", (short) this.attackTicks);
- nbttagcompound.setFloat("AbsorptionAmount", this.br());
+ nbttagcompound.setFloat("AbsorptionAmount", this.getAbsorptionHearts());
ItemStack[] aitemstack = this.getEquipment();
int i = aitemstack.length;
@@ -362,7 +362,7 @@ public abstract class EntityLiving extends Entity {
}
}
- nbttagcompound.set("Attributes", GenericAttributes.a(this.bb()));
+ nbttagcompound.set("Attributes", GenericAttributes.a(this.getAttributeMap()));
aitemstack = this.getEquipment();
i = aitemstack.length;
@@ -388,9 +388,9 @@ public abstract class EntityLiving extends Entity {
}
public void a(NBTTagCompound nbttagcompound) {
- this.m(nbttagcompound.getFloat("AbsorptionAmount"));
+ this.setAbsorptionHearts(nbttagcompound.getFloat("AbsorptionAmount"));
if (nbttagcompound.hasKeyOfType("Attributes", 9) && this.world != null && !this.world.isStatic) {
- GenericAttributes.a(this.bb(), nbttagcompound.getList("Attributes", 10));
+ GenericAttributes.a(this.getAttributeMap(), nbttagcompound.getList("Attributes", 10));
}
if (nbttagcompound.hasKeyOfType("ActiveEffects", 9)) {
@@ -410,9 +410,9 @@ public abstract class EntityLiving extends Entity {
if (nbttagcompound.hasKey("Bukkit.MaxHealth")) {
NBTBase nbtbase = nbttagcompound.get("Bukkit.MaxHealth");
if (nbtbase.getTypeId() == 5) {
- this.getAttributeInstance(GenericAttributes.a).setValue((double) ((NBTTagFloat) nbtbase).c());
+ this.getAttributeInstance(GenericAttributes.maxHealth).setValue((double) ((NBTTagFloat) nbtbase).c());
} else if (nbtbase.getTypeId() == 3) {
- this.getAttributeInstance(GenericAttributes.a).setValue((double) ((NBTTagInt) nbtbase).d());
+ this.getAttributeInstance(GenericAttributes.maxHealth).setValue((double) ((NBTTagInt) nbtbase).d());
}
}
// CraftBukkit end
@@ -436,7 +436,7 @@ public abstract class EntityLiving extends Entity {
this.attackTicks = nbttagcompound.getShort("AttackTime");
}
- protected void aN() {
+ protected void aO() {
Iterator iterator = this.effects.keySet().iterator();
while (iterator.hasNext()) {
@@ -554,7 +554,7 @@ public abstract class EntityLiving extends Entity {
return true;
}
- public boolean aQ() {
+ public boolean aR() {
return this.getMonsterType() == EnumMonsterType.UNDEAD;
}
@@ -569,22 +569,22 @@ public abstract class EntityLiving extends Entity {
protected void a(MobEffect mobeffect) {
this.updateEffects = true;
if (!this.world.isStatic) {
- MobEffectList.byId[mobeffect.getEffectId()].b(this, this.bb(), mobeffect.getAmplifier());
+ MobEffectList.byId[mobeffect.getEffectId()].b(this, this.getAttributeMap(), mobeffect.getAmplifier());
}
}
protected void a(MobEffect mobeffect, boolean flag) {
this.updateEffects = true;
if (flag && !this.world.isStatic) {
- MobEffectList.byId[mobeffect.getEffectId()].a(this, this.bb(), mobeffect.getAmplifier());
- MobEffectList.byId[mobeffect.getEffectId()].b(this, this.bb(), mobeffect.getAmplifier());
+ MobEffectList.byId[mobeffect.getEffectId()].a(this, this.getAttributeMap(), mobeffect.getAmplifier());
+ MobEffectList.byId[mobeffect.getEffectId()].b(this, this.getAttributeMap(), mobeffect.getAmplifier());
}
}
protected void b(MobEffect mobeffect) {
this.updateEffects = true;
if (!this.world.isStatic) {
- MobEffectList.byId[mobeffect.getEffectId()].a(this, this.bb(), mobeffect.getAmplifier());
+ MobEffectList.byId[mobeffect.getEffectId()].a(this, this.getAttributeMap(), mobeffect.getAmplifier());
}
}
@@ -705,7 +705,7 @@ public abstract class EntityLiving extends Entity {
if (flag) {
this.world.broadcastEntityEffect(this, (byte) 2);
if (damagesource != DamageSource.DROWN) {
- this.P();
+ this.Q();
}
if (entity != null) {
@@ -727,16 +727,16 @@ public abstract class EntityLiving extends Entity {
String s;
if (this.getHealth() <= 0.0F) {
- s = this.aT();
+ s = this.aU();
if (flag && s != null) {
- this.makeSound(s, this.be(), this.bf());
+ this.makeSound(s, this.bf(), this.bg());
}
this.die(damagesource);
} else {
- s = this.aS();
+ s = this.aT();
if (flag && s != null) {
- this.makeSound(s, this.be(), this.bf());
+ this.makeSound(s, this.bf(), this.bg());
}
}
@@ -758,13 +758,13 @@ public abstract class EntityLiving extends Entity {
vec3d1.a(-this.pitch * 3.1415927F / 180.0F);
vec3d1.b(-this.yaw * 3.1415927F / 180.0F);
vec3d1 = vec3d1.add(this.locX, this.locY + (double) this.getHeadHeight(), this.locZ);
- this.world.addParticle("iconcrack_" + Item.b(itemstack.getItem()), vec3d1.a, vec3d1.b, vec3d1.c, vec3d.a, vec3d.b + 0.05D, vec3d.c);
+ this.world.addParticle("iconcrack_" + Item.getId(itemstack.getItem()), vec3d1.a, vec3d1.b, vec3d1.c, vec3d.a, vec3d.b + 0.05D, vec3d.c);
}
}
public void die(DamageSource damagesource) {
Entity entity = damagesource.getEntity();
- EntityLiving entityliving = this.aW();
+ EntityLiving entityliving = this.aX();
if (this.ba >= 0 && entityliving != null) {
entityliving.b(this, this.ba);
@@ -775,7 +775,7 @@ public abstract class EntityLiving extends Entity {
}
this.aT = true;
- this.aV().g();
+ this.aW().g();
if (!this.world.isStatic) {
int i = 0;
@@ -783,7 +783,7 @@ public abstract class EntityLiving extends Entity {
i = EnchantmentManager.getBonusMonsterLootEnchantmentLevel((EntityLiving) entity);
}
- if (this.aF() && this.world.getGameRules().getBoolean("doMobLoot")) {
+ if (this.aG() && this.world.getGameRules().getBoolean("doMobLoot")) {
this.drops = new ArrayList<org.bukkit.inventory.ItemStack>(); // CraftBukkit - Setup drop capture
this.dropDeathLoot(this.lastDamageByPlayerTime > 0, i);
@@ -828,11 +828,11 @@ public abstract class EntityLiving extends Entity {
}
}
- protected String aS() {
+ protected String aT() {
return "game.neutral.hurt";
}
- protected String aT() {
+ protected String aU() {
return "game.neutral.die";
}
@@ -884,7 +884,7 @@ public abstract class EntityLiving extends Entity {
return i > 4 ? "game.neutral.hurt.fall.big" : "game.neutral.hurt.fall.small";
}
- public int aU() {
+ public int aV() {
int i = 0;
ItemStack[] aitemstack = this.getEquipment();
int j = aitemstack.length;
@@ -902,22 +902,22 @@ public abstract class EntityLiving extends Entity {
return i;
}
- protected void h(float f) {}
+ protected void damageArmor(float f) {}
- protected float b(DamageSource damagesource, float f) {
+ protected float applyArmorModifier(DamageSource damagesource, float f) {
if (!damagesource.ignoresArmor()) {
- int i = 25 - this.aU();
+ int i = 25 - this.aV();
float f1 = f * (float) i;
- // this.h(f); // CraftBukkit - Moved into d(DamageSource, float)
+ // this.damageArmor(f); // CraftBukkit - Moved into d(DamageSource, float)
f = f1 / 25.0F;
}
return f;
}
- protected float c(DamageSource damagesource, float f) {
- if (damagesource.h()) {
+ protected float applyMagicModifier(DamageSource damagesource, float f) {
+ if (damagesource.isStarvation()) {
return f;
} else {
if (this instanceof EntityZombie) {
@@ -976,11 +976,11 @@ public abstract class EntityLiving extends Entity {
}
}
// Armor modifier
- f = this.b(damagesource, f);
+ f = this.applyArmorModifier(damagesource, f);
float armorModifier = preDamage - f;
preDamage = f;
// Resistance Potion Effect
- if (!damagesource.h() && this.hasEffect(MobEffectList.RESISTANCE) && damagesource != DamageSource.OUT_OF_WORLD) {
+ if (!damagesource.isStarvation() && this.hasEffect(MobEffectList.RESISTANCE) && damagesource != DamageSource.OUT_OF_WORLD) {
int i = (this.getEffect(MobEffectList.RESISTANCE).getAmplifier() + 1) * 5;
int j = 25 - i;
float f1 = f * (float) j;
@@ -989,12 +989,12 @@ public abstract class EntityLiving extends Entity {
float resistanceModifier = preDamage - f;
preDamage = f;
// Magic modifier
- f = this.c(damagesource, f);
+ f = this.applyMagicModifier(damagesource, f);
float magicModifier = preDamage - f;
float f1 = f;
// Absorption modifier
- f = Math.max(f - this.br(), 0.0F);
+ f = Math.max(f - this.getAbsorptionHearts(), 0.0F);
float absorptionModifier = Math.max(f1 - f, 0.0F);
EntityDamageEvent event = CraftEventFactory.handleLivingEntityDamageEvent(this, damagesource, originalDamage, -hardHatModifier, -blockingModifier, -armorModifier, -resistanceModifier, -magicModifier, -absorptionModifier);
@@ -1013,45 +1013,45 @@ public abstract class EntityLiving extends Entity {
// Apply damage to armor
if (!damagesource.ignoresArmor()) {
float armorDamage = (float) (event.getDamage() + event.getDamage(DamageModifier.BLOCKING) + event.getDamage(DamageModifier.HARD_HAT));
- this.h(armorDamage);
+ this.damageArmor(armorDamage);
}
absorptionModifier = (float) -event.getDamage(DamageModifier.ABSORPTION);
- this.m(Math.max(this.br() - absorptionModifier, 0.0F));
+ this.setAbsorptionHearts(Math.max(this.getAbsorptionHearts() - absorptionModifier, 0.0F));
if (f != 0.0F) {
if (human) {
- ((EntityHuman) this).a(damagesource.f());
+ ((EntityHuman) this).applyExhaustion(damagesource.getExhaustionCost());
}
// CraftBukkit end
float f2 = this.getHealth();
this.setHealth(f2 - f);
- this.aV().a(damagesource, f2, f);
+ this.aW().a(damagesource, f2, f);
// CraftBukkit start
if (human) {
return true;
}
// CraftBukkit end
- this.m(this.br() - f);
+ this.setAbsorptionHearts(this.getAbsorptionHearts() - f);
}
return true; // CraftBukkit
}
return false; // CraftBukkit
}
- public CombatTracker aV() {
+ public CombatTracker aW() {
return this.combatTracker;
}
- public EntityLiving aW() {
+ public EntityLiving aX() {
return (EntityLiving) (this.combatTracker.c() != null ? this.combatTracker.c() : (this.killer != null ? this.killer : (this.lastDamager != null ? this.lastDamager : null)));
}
public final float getMaxHealth() {
- return (float) this.getAttributeInstance(GenericAttributes.a).getValue();
+ return (float) this.getAttributeInstance(GenericAttributes.maxHealth).getValue();
}
- public final int aY() {
+ public final int aZ() {
return this.datawatcher.getByte(9);
}
@@ -1063,7 +1063,7 @@ public abstract class EntityLiving extends Entity {
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 aZ() {
+ public void ba() {
if (!this.at || this.au >= this.j() / 2 || this.au < 0) {
this.au = -1;
this.at = true;
@@ -1073,11 +1073,11 @@ public abstract class EntityLiving extends Entity {
}
}
- protected void F() {
+ protected void G() {
this.damageEntity(DamageSource.OUT_OF_WORLD, 4.0F);
}
- protected void ba() {
+ protected void bb() {
int i = this.j();
if (this.at) {
@@ -1094,10 +1094,10 @@ public abstract class EntityLiving extends Entity {
}
public AttributeInstance getAttributeInstance(IAttribute iattribute) {
- return this.bb().a(iattribute);
+ return this.getAttributeMap().a(iattribute);
}
- public AttributeMapBase bb() {
+ public AttributeMapBase getAttributeMap() {
if (this.d == null) {
this.d = new AttributeMapServer();
}
@@ -1109,7 +1109,7 @@ public abstract class EntityLiving extends Entity {
return EnumMonsterType.UNDEFINED;
}
- public abstract ItemStack bd();
+ public abstract ItemStack be();
public abstract ItemStack getEquipment(int i);
@@ -1130,15 +1130,15 @@ public abstract class EntityLiving extends Entity {
public abstract ItemStack[] getEquipment();
- protected float be() {
+ protected float bf() {
return 1.0F;
}
- protected float bf() {
+ protected float bg() {
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 bg() {
+ protected boolean bh() {
return this.getHealth() <= 0.0F;
}
@@ -1178,7 +1178,7 @@ public abstract class EntityLiving extends Entity {
this.enderTeleportTo(d0, d1, d2);
}
- protected void bi() {
+ protected void bj() {
this.motY = 0.41999998688697815D;
if (this.hasEffect(MobEffectList.JUMP)) {
this.motY += (double) ((float) (this.getEffect(MobEffectList.JUMP).getAmplifier() + 1) * 0.1F);
@@ -1197,9 +1197,9 @@ public abstract class EntityLiving extends Entity {
public void e(float f, float f1) {
double d0;
- if (this.L() && (!(this instanceof EntityHuman) || !((EntityHuman) this).abilities.isFlying)) {
+ if (this.M() && (!(this instanceof EntityHuman) || !((EntityHuman) this).abilities.isFlying)) {
d0 = this.locY;
- this.a(f, f1, this.bj() ? 0.04F : 0.02F);
+ this.a(f, f1, this.bk() ? 0.04F : 0.02F);
this.move(this.motX, this.motY, this.motZ);
this.motX *= 0.800000011920929D;
this.motY *= 0.800000011920929D;
@@ -1208,7 +1208,7 @@ public abstract class EntityLiving extends Entity {
if (this.positionChanged && this.c(this.motX, this.motY + 0.6000000238418579D - this.locY + d0, this.motZ)) {
this.motY = 0.30000001192092896D;
}
- } else if (this.O() && (!(this instanceof EntityHuman) || !((EntityHuman) this).abilities.isFlying)) {
+ } else if (this.P() && (!(this instanceof EntityHuman) || !((EntityHuman) this).abilities.isFlying)) {
d0 = this.locY;
this.a(f, f1, 0.02F);
this.move(this.motX, this.motY, this.motZ);
@@ -1230,7 +1230,7 @@ public abstract class EntityLiving extends Entity {
float f4;
if (this.onGround) {
- f4 = this.bk() * f3;
+ f4 = this.bl() * f3;
} else {
f4 = this.aQ;
}
@@ -1305,12 +1305,12 @@ public abstract class EntityLiving extends Entity {
this.aG += this.aF;
}
- protected boolean bj() {
+ protected boolean bk() {
return false;
}
- public float bk() {
- return this.bj() ? this.bp : 0.1F;
+ public float bl() {
+ return this.bk() ? this.bp : 0.1F;
}
public void i(float f) {
@@ -1329,7 +1329,7 @@ public abstract class EntityLiving extends Entity {
public void h() {
super.h();
if (!this.world.isStatic) {
- int i = this.aY();
+ int i = this.aZ();
if (i > 0) {
if (this.av <= 0) {
@@ -1361,7 +1361,7 @@ public abstract class EntityLiving extends Entity {
}
if (this.ticksLived % 20 == 0) {
- this.aV().g();
+ this.aW().g();
}
}
@@ -1475,7 +1475,7 @@ public abstract class EntityLiving extends Entity {
--this.bg;
this.setPosition(d0, d1, d2);
this.b(this.yaw, this.pitch);
- } else if (!this.bq()) {
+ } else if (!this.br()) {
this.motX *= 0.98D;
this.motY *= 0.98D;
this.motZ *= 0.98D;
@@ -1494,19 +1494,19 @@ public abstract class EntityLiving extends Entity {
}
this.world.methodProfiler.a("ai");
- if (this.bg()) {
+ if (this.bh()) {
this.bc = false;
this.bd = 0.0F;
this.be = 0.0F;
this.bf = 0.0F;
- } else if (this.bq()) {
- if (this.bj()) {
+ } else if (this.br()) {
+ if (this.bk()) {
this.world.methodProfiler.a("newAi");
- this.bm();
+ this.bn();
this.world.methodProfiler.b();
} else {
this.world.methodProfiler.a("oldAi");
- this.bp();
+ this.bq();
this.world.methodProfiler.b();
this.aO = this.yaw;
}
@@ -1515,9 +1515,9 @@ public abstract class EntityLiving extends Entity {
this.world.methodProfiler.b();
this.world.methodProfiler.a("jump");
if (this.bc) {
- if (!this.L() && !this.O()) {
+ if (!this.M() && !this.P()) {
if (this.onGround && this.bq == 0) {
- this.bi();
+ this.bj();
this.bq = 10;
}
} else {
@@ -1536,15 +1536,15 @@ public abstract class EntityLiving extends Entity {
this.world.methodProfiler.b();
this.world.methodProfiler.a("push");
if (!this.world.isStatic) {
- this.bn();
+ this.bo();
}
this.world.methodProfiler.b();
}
- protected void bm() {}
+ protected void bn() {}
- protected void bn() {
+ protected void bo() {
List list = this.world.getEntities(this, this.boundingBox.grow(0.20000000298023224D, 0.0D, 0.20000000298023224D));
if (list != null && !list.isEmpty()) {
@@ -1558,7 +1558,7 @@ public abstract class EntityLiving extends Entity {
}
// CraftBukkit end
- if (entity.R()) {
+ if (entity.S()) {
this.o(entity);
}
}
@@ -1569,16 +1569,16 @@ public abstract class EntityLiving extends Entity {
entity.collide(this);
}
- public void aa() {
- super.aa();
+ public void ab() {
+ super.ab();
this.aV = this.aW;
this.aW = 0.0F;
this.fallDistance = 0.0F;
}
- protected void bo() {}
+ protected void bp() {}
- protected void bp() {
+ protected void bq() {
++this.aU;
}
@@ -1604,11 +1604,11 @@ public abstract class EntityLiving extends Entity {
}
}
- public boolean p(Entity entity) {
+ public boolean hasLineOfSight(Entity entity) {
return this.world.a(Vec3D.a(this.locX, this.locY + (double) this.getHeadHeight(), this.locZ), Vec3D.a(entity.locX, entity.locY + (double) entity.getHeadHeight(), entity.locZ)) == null;
}
- public Vec3D af() {
+ public Vec3D ag() {
return this.j(1.0F);
}
@@ -1636,15 +1636,15 @@ public abstract class EntityLiving extends Entity {
}
}
- public boolean bq() {
+ public boolean br() {
return !this.world.isStatic;
}
- public boolean Q() {
+ public boolean R() {
return !this.dead;
}
- public boolean R() {
+ public boolean S() {
return !this.dead;
}
@@ -1652,7 +1652,7 @@ public abstract class EntityLiving extends Entity {
return this.length * 0.85F;
}
- protected void P() {
+ protected void Q() {
this.velocityChanged = this.random.nextDouble() >= this.getAttributeInstance(GenericAttributes.c).getValue();
}
@@ -1660,11 +1660,11 @@ public abstract class EntityLiving extends Entity {
return this.aO;
}
- public float br() {
+ public float getAbsorptionHearts() {
return this.br;
}
- public void m(float f) {
+ public void setAbsorptionHearts(float f) {
if (f < 0.0F) {
f = 0.0F;
}
@@ -1684,7 +1684,7 @@ public abstract class EntityLiving extends Entity {
return this.getScoreboardTeam() != null ? this.getScoreboardTeam().isAlly(scoreboardteambase) : false;
}
- public void bt() {}
-
public void bu() {}
+
+ public void bv() {}
}
diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
index 166206cb..f1ccd3a9 100644
--- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
+++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
@@ -80,14 +80,14 @@ public abstract class EntityMinecartAbstract extends Entity {
}
public AxisAlignedBB h(Entity entity) {
- return entity.R() ? entity.boundingBox : null;
+ return entity.S() ? entity.boundingBox : null;
}
- public AxisAlignedBB I() {
+ public AxisAlignedBB J() {
return null;
}
- public boolean R() {
+ public boolean S() {
return true;
}
@@ -104,7 +104,7 @@ public abstract class EntityMinecartAbstract extends Entity {
this.world.getServer().getPluginManager().callEvent(new org.bukkit.event.vehicle.VehicleCreateEvent((Vehicle) this.getBukkitEntity())); // CraftBukkit
}
- public double ad() {
+ public double ae() {
return (double) this.length * 0.0D - 0.30000001192092896D;
}
@@ -129,7 +129,7 @@ public abstract class EntityMinecartAbstract extends Entity {
this.j(-this.l());
this.c(10);
- this.P();
+ this.Q();
this.setDamage(this.getDamage() + f * 10.0F);
boolean flag = damagesource.getEntity() instanceof EntityHuman && ((EntityHuman) damagesource.getEntity()).abilities.canInstantlyBuild;
@@ -173,7 +173,7 @@ public abstract class EntityMinecartAbstract extends Entity {
this.a(itemstack, 0.0F);
}
- public boolean Q() {
+ public boolean R() {
return !this.dead;
}
@@ -199,7 +199,7 @@ public abstract class EntityMinecartAbstract extends Entity {
}
if (this.locY < -64.0D) {
- this.F();
+ this.G();
}
int i;
@@ -208,12 +208,12 @@ public abstract class EntityMinecartAbstract extends Entity {
this.world.methodProfiler.a("portal");
MinecraftServer minecraftserver = ((WorldServer) this.world).getMinecraftServer();
- i = this.C();
+ i = this.D();
if (this.an) {
if (true || minecraftserver.getAllowNether()) { // CraftBukkit - multi-world should still allow teleport even if default vanilla nether disabled
if (this.vehicle == null && this.ao++ >= i) {
this.ao = i;
- this.portalCooldown = this.ah();
+ this.portalCooldown = this.ai();
byte b0;
if (this.world.worldProvider.dimension == -1) {
@@ -289,7 +289,7 @@ public abstract class EntityMinecartAbstract extends Entity {
this.b(d4);
}
- this.H();
+ this.I();
this.pitch = 0.0F;
double d6 = this.lastX - this.locX;
double d7 = this.lastZ - this.locZ;
@@ -329,7 +329,7 @@ public abstract class EntityMinecartAbstract extends Entity {
for (int i1 = 0; i1 < list.size(); ++i1) {
Entity entity = (Entity) list.get(i1);
- if (entity != this.passenger && entity.R() && entity instanceof EntityMinecartAbstract) {
+ if (entity != this.passenger && entity.S() && entity instanceof EntityMinecartAbstract) {
entity.collide(this);
}
}
@@ -666,7 +666,7 @@ public abstract class EntityMinecartAbstract extends Entity {
protected void b(NBTTagCompound nbttagcompound) {
if (this.t()) {
nbttagcompound.setBoolean("CustomDisplayTile", true);
- nbttagcompound.setInt("DisplayTile", this.n().getMaterial() == Material.AIR ? 0 : Block.b(this.n()));
+ nbttagcompound.setInt("DisplayTile", this.n().getMaterial() == Material.AIR ? 0 : Block.getId(this.n()));
nbttagcompound.setInt("DisplayData", this.p());
nbttagcompound.setInt("DisplayOffset", this.r());
}
@@ -795,7 +795,7 @@ public abstract class EntityMinecartAbstract extends Entity {
} else {
int i = this.getDataWatcher().getInt(20) & '\uffff';
- return Block.e(i);
+ return Block.getById(i);
}
}
@@ -825,7 +825,7 @@ public abstract class EntityMinecartAbstract extends Entity {
}
public void l(int i) {
- this.getDataWatcher().watch(20, Integer.valueOf(Block.b(this.n()) & '\uffff' | i << 16));
+ this.getDataWatcher().watch(20, Integer.valueOf(Block.getId(this.n()) & '\uffff' | i << 16));
this.a(true);
}
diff --git a/src/main/java/net/minecraft/server/EntityMinecartCommandBlockListener.java b/src/main/java/net/minecraft/server/EntityMinecartCommandBlockListener.java
index 3139e57d..5b452856 100644
--- a/src/main/java/net/minecraft/server/EntityMinecartCommandBlockListener.java
+++ b/src/main/java/net/minecraft/server/EntityMinecartCommandBlockListener.java
@@ -11,7 +11,7 @@ public class EntityMinecartCommandBlockListener extends CommandBlockListenerAbst
}
public void e() {
- this.a.getDataWatcher().watch(23, this.i());
+ this.a.getDataWatcher().watch(23, this.getCommand());
this.a.getDataWatcher().watch(24, ChatSerializer.a(this.h()));
}
diff --git a/src/main/java/net/minecraft/server/EntityMinecartContainer.java b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
index b599eeba..13b75ff8 100644
--- a/src/main/java/net/minecraft/server/EntityMinecartContainer.java
+++ b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
@@ -134,7 +134,7 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
public void startOpen() {}
- public void l_() {}
+ public void closeContainer() {}
public boolean b(int i, ItemStack itemstack) {
return true;
diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java
index d13a91e4..49aef649 100644
--- a/src/main/java/net/minecraft/server/EntityMonster.java
+++ b/src/main/java/net/minecraft/server/EntityMonster.java
@@ -11,7 +11,7 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
}
public void e() {
- this.ba();
+ this.bb();
float f = this.d(1.0F);
if (f > 0.5F) {
@@ -28,18 +28,18 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
}
}
- protected String G() {
+ protected String H() {
return "game.hostile.swim";
}
- protected String N() {
+ protected String O() {
return "game.hostile.swim.splash";
}
protected Entity findTarget() {
EntityHuman entityhuman = this.world.findNearbyVulnerablePlayer(this, 16.0D);
- return entityhuman != null && this.p(entityhuman) ? entityhuman : null;
+ return entityhuman != null && this.hasLineOfSight(entityhuman) ? entityhuman : null;
}
public boolean damageEntity(DamageSource damagesource, float f) {
@@ -76,11 +76,11 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
}
}
- protected String aS() {
+ protected String aT() {
return "game.hostile.hurt";
}
- protected String aT() {
+ protected String aU() {
return "game.hostile.die";
}
@@ -166,12 +166,12 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
return this.world.difficulty != EnumDifficulty.PEACEFUL && this.j_() && super.canSpawn();
}
- protected void aC() {
- super.aC();
- this.bb().b(GenericAttributes.e);
+ protected void aD() {
+ super.aD();
+ this.getAttributeMap().b(GenericAttributes.e);
}
- protected boolean aF() {
+ protected boolean aG() {
return true;
}
}
diff --git a/src/main/java/net/minecraft/server/EntityOcelot.java b/src/main/java/net/minecraft/server/EntityOcelot.java
index 1ce9fb88..aba37489 100644
--- a/src/main/java/net/minecraft/server/EntityOcelot.java
+++ b/src/main/java/net/minecraft/server/EntityOcelot.java
@@ -27,7 +27,7 @@ public class EntityOcelot extends EntityTameableAnimal {
this.datawatcher.a(18, Byte.valueOf((byte) 0));
}
- public void bo() {
+ public void bp() {
if (this.getControllerMove().a()) {
double d0 = this.getControllerMove().b();
@@ -51,13 +51,13 @@ public class EntityOcelot extends EntityTameableAnimal {
return !this.isTamed() /*&& this.ticksLived > 2400*/; // CraftBukkit
}
- public boolean bj() {
+ public boolean bk() {
return true;
}
- protected void aC() {
- super.aC();
- this.getAttributeInstance(GenericAttributes.a).setValue(10.0D);
+ protected void aD() {
+ super.aD();
+ this.getAttributeInstance(GenericAttributes.maxHealth).setValue(10.0D);
this.getAttributeInstance(GenericAttributes.d).setValue(0.30000001192092896D);
}
@@ -77,15 +77,15 @@ public class EntityOcelot extends EntityTameableAnimal {
return this.isTamed() ? (this.ce() ? "mob.cat.purr" : (this.random.nextInt(4) == 0 ? "mob.cat.purreow" : "mob.cat.meow")) : "";
}
- protected String aS() {
+ protected String aT() {
return "mob.cat.hitt";
}
- protected String aT() {
+ protected String aU() {
return "mob.cat.hitt";
}
- protected float be() {
+ protected float bf() {
return 0.4F;
}
@@ -211,8 +211,8 @@ public class EntityOcelot extends EntityTameableAnimal {
return this.hasCustomName() ? this.getCustomName() : (this.isTamed() ? LocaleI18n.get("entity.Cat.name") : super.getName());
}
- public GroupDataEntity a(GroupDataEntity groupdataentity) {
- groupdataentity = super.a(groupdataentity);
+ public GroupDataEntity prepare(GroupDataEntity groupdataentity) {
+ groupdataentity = super.prepare(groupdataentity);
if (this.world.random.nextInt(7) == 0) {
for (int i = 0; i < 2; ++i) {
EntityOcelot entityocelot = new EntityOcelot(this.world);
diff --git a/src/main/java/net/minecraft/server/EntityPig.java b/src/main/java/net/minecraft/server/EntityPig.java
index c14bbf6c..98bfd08f 100644
--- a/src/main/java/net/minecraft/server/EntityPig.java
+++ b/src/main/java/net/minecraft/server/EntityPig.java
@@ -22,22 +22,22 @@ public class EntityPig extends EntityAnimal {
this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this));
}
- public boolean bj() {
+ public boolean bk() {
return true;
}
- protected void aC() {
- super.aC();
- this.getAttributeInstance(GenericAttributes.a).setValue(10.0D);
+ protected void aD() {
+ super.aD();
+ this.getAttributeInstance(GenericAttributes.maxHealth).setValue(10.0D);
this.getAttributeInstance(GenericAttributes.d).setValue(0.25D);
}
- protected void bm() {
- super.bm();
+ protected void bn() {
+ super.bn();
}
public boolean bE() {
- ItemStack itemstack = ((EntityHuman) this.passenger).bd();
+ ItemStack itemstack = ((EntityHuman) this.passenger).be();
return itemstack != null && itemstack.getItem() == Items.CARROT_STICK;
}
@@ -61,11 +61,11 @@ public class EntityPig extends EntityAnimal {
return "mob.pig.say";
}
- protected String aS() {
+ protected String aT() {
return "mob.pig.say";
}
- protected String aT() {
+ protected String aU() {
return "mob.pig.death";
}
diff --git a/src/main/java/net/minecraft/server/EntityPigZombie.java b/src/main/java/net/minecraft/server/EntityPigZombie.java
index 26fb4b94..f2e895e8 100644
--- a/src/main/java/net/minecraft/server/EntityPigZombie.java
+++ b/src/main/java/net/minecraft/server/EntityPigZombie.java
@@ -18,14 +18,14 @@ public class EntityPigZombie extends EntityZombie {
this.fireProof = true;
}
- protected void aC() {
- super.aC();
+ protected void aD() {
+ super.aD();
this.getAttributeInstance(bp).setValue(0.0D);
this.getAttributeInstance(GenericAttributes.d).setValue(0.5D);
this.getAttributeInstance(GenericAttributes.e).setValue(5.0D);
}
- protected boolean bj() {
+ protected boolean bk() {
return false;
}
@@ -41,7 +41,7 @@ public class EntityPigZombie extends EntityZombie {
this.bu = this.target;
if (this.soundDelay > 0 && --this.soundDelay == 0) {
- this.makeSound("mob.zombiepig.zpigangry", this.be() * 2.0F, ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) * 1.8F);
+ this.makeSound("mob.zombiepig.zpigangry", this.bf() * 2.0F, ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) * 1.8F);
}
super.h();
@@ -116,11 +116,11 @@ public class EntityPigZombie extends EntityZombie {
return "mob.zombiepig.zpig";
}
- protected String aS() {
+ protected String aT() {
return "mob.zombiepig.zpighurt";
}
- protected String aT() {
+ protected String aU() {
return "mob.zombiepig.zpigdeath";
}
@@ -152,8 +152,8 @@ public class EntityPigZombie extends EntityZombie {
this.setEquipment(0, new ItemStack(Items.GOLD_SWORD));
}
- public GroupDataEntity a(GroupDataEntity groupdataentity) {
- super.a(groupdataentity);
+ public GroupDataEntity prepare(GroupDataEntity groupdataentity) {
+ super.prepare(groupdataentity);
this.setVillager(false);
return groupdataentity;
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 3a0d679b..adfaddf3 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -47,7 +47,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public int invulnerableTicks = 60; // CraftBukkit - private -> public
private EnumChatVisibility bV;
private boolean bW = true;
- private long bX = 0L;
+ private long bX = System.currentTimeMillis();
private int containerCounter;
public boolean g;
public int ping;
@@ -105,7 +105,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
if (MinecraftServer.getServer().getForceGamemode()) {
this.playerInteractManager.setGameMode(MinecraftServer.getServer().getGamemode());
} else {
- this.playerInteractManager.setGameMode(EnumGamemode.a(nbttagcompound.getInt("playerGameType")));
+ this.playerInteractManager.setGameMode(EnumGamemode.getById(nbttagcompound.getInt("playerGameType")));
}
}
this.getBukkitEntity().readExtraData(nbttagcompound); // CraftBukkit
@@ -113,7 +113,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public void b(NBTTagCompound nbttagcompound) {
super.b(nbttagcompound);
- nbttagcompound.setInt("playerGameType", this.playerInteractManager.getGameMode().a());
+ nbttagcompound.setInt("playerGameType", this.playerInteractManager.getGameMode().getId());
this.getBukkitEntity().setExtraData(nbttagcompound); // CraftBukkit
}
@@ -205,7 +205,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
if (chunkcoordintpair != null) {
if (this.world.isLoaded(chunkcoordintpair.x << 4, 0, chunkcoordintpair.z << 4)) {
chunk = this.world.getChunkAt(chunkcoordintpair.x, chunkcoordintpair.z);
- if (chunk.k()) {
+ if (chunk.isReady()) {
arraylist.add(chunk);
arraylist1.addAll(chunk.tileEntities.values()); // CraftBukkit - Get tile entities directly from the chunk instead of the world
iterator1.remove();
@@ -234,10 +234,6 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
}
}
-
- if (this.bX > 0L && this.server.getIdleTimeout() > 0 && MinecraftServer.ar() - this.bX > (long) (this.server.getIdleTimeout() * 1000 * 60)) {
- this.playerConnection.disconnect("You have been idle for too long!");
- }
}
public void i() {
@@ -257,15 +253,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
// CraftBukkit - Optionally scale health
- if (this.getHealth() != this.bQ || this.bR != this.foodData.a() || this.foodData.e() == 0.0F != this.bS) {
- this.playerConnection.sendPacket(new PacketPlayOutUpdateHealth(this.getBukkitEntity().getScaledHealth(), this.foodData.a(), this.foodData.e()));
+ if (this.getHealth() != this.bQ || this.bR != this.foodData.getFoodLevel() || this.foodData.getSaturationLevel() == 0.0F != this.bS) {
+ this.playerConnection.sendPacket(new PacketPlayOutUpdateHealth(this.getBukkitEntity().getScaledHealth(), this.foodData.getFoodLevel(), this.foodData.getSaturationLevel()));
this.bQ = this.getHealth();
- this.bR = this.foodData.a();
- this.bS = this.foodData.e() == 0.0F;
+ this.bR = this.foodData.getFoodLevel();
+ this.bS = this.foodData.getSaturationLevel() == 0.0F;
}
- if (this.getHealth() + this.br() != this.bP) {
- this.bP = this.getHealth() + this.br();
+ if (this.getHealth() + this.getAbsorptionHearts() != this.bP) {
+ this.bP = this.getHealth() + this.getAbsorptionHearts();
// CraftBukkit - Update ALL the scores!
this.world.getServer().getScoreboardManager().updateAllScoresForList(IScoreboardCriteria.f, this.getName(), com.google.common.collect.ImmutableList.of(this));
}
@@ -281,7 +277,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.playerConnection.sendPacket(new PacketPlayOutExperience(this.exp, this.expTotal, this.expLevel));
}
- if (this.ticksLived % 20 * 5 == 0 && !this.getStatisticManager().a(AchievementList.L)) {
+ if (this.ticksLived % 20 * 5 == 0 && !this.getStatisticManager().hasAchievement(AchievementList.L)) {
this.j();
}
@@ -367,7 +363,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
}
- IChatBaseComponent chatmessage = this.aV().b();
+ IChatBaseComponent chatmessage = this.aW().b();
String deathmessage = chatmessage.c();
org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, deathmessage);
@@ -406,7 +402,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
scoreboardscore.incrementScore();
}
- EntityLiving entityliving = this.aW();
+ EntityLiving entityliving = this.aX();
if (entityliving != null) {
int i = EntityTypes.a(entityliving);
@@ -420,7 +416,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
this.a(StatisticList.v, 1);
- this.aV().g();
+ this.aW().g();
}
public boolean damageEntity(DamageSource damagesource, float f) {
@@ -626,7 +622,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
// CraftBukkit start - Inventory open hook
Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerChest(this.inventory, iinventory));
if (container == null) {
- iinventory.l_(); // Should be closeContainer
+ iinventory.closeContainer();
return;
}
// CraftBukkit end
@@ -642,7 +638,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
// CraftBukkit start - Inventory open hook
Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerHopper(this.inventory, tileentityhopper));
if (container == null) {
- tileentityhopper.l_(); // Should be closeContainer
+ tileentityhopper.closeContainer();
return;
}
// CraftBukkit end
@@ -658,7 +654,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
// CraftBukkit start - Inventory open hook
Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerHopper(this.inventory, entityminecarthopper));
if (container == null) {
- entityminecarthopper.l_(); // Should be closeContainer
+ entityminecarthopper.closeContainer();
return;
}
// CraftBukkit end
@@ -674,7 +670,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
// CraftBukkit start - Inventory open hook
Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerFurnace(this.inventory, tileentityfurnace));
if (container == null) {
- tileentityfurnace.l_(); // Should be closeContainer
+ tileentityfurnace.closeContainer();
return;
}
// CraftBukkit end
@@ -690,7 +686,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
// CraftBukkit start - Inventory open hook
Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerDispenser(this.inventory, tileentitydispenser));
if (container == null) {
- tileentitydispenser.l_(); // Should be closeContainer
+ tileentitydispenser.closeContainer();
return;
}
// CraftBukkit end
@@ -706,7 +702,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
// CraftBukkit start - Inventory open hook
Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerBrewingStand(this.inventory, tileentitybrewingstand));
if (container == null) {
- tileentitybrewingstand.l_(); // Should be closeContainer
+ tileentitybrewingstand.closeContainer();
return;
}
// CraftBukkit end
@@ -722,7 +718,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
// CraftBukkit start - Inventory open hook
Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerBeacon(this.inventory, tileentitybeacon));
if (container == null) {
- tileentitybeacon.l_(); // Should be closeContainer
+ tileentitybeacon.closeContainer();
return;
}
// CraftBukkit end
@@ -770,7 +766,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
// CraftBukkit start - Inventory open hook
Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerHorse(this.inventory, iinventory, entityhorse));
if (container == null) {
- iinventory.l_(); // Should be closeContainer
+ iinventory.closeContainer();
return;
}
// CraftBukkit end
@@ -809,7 +805,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
public void setContainerData(Container container, int i, int j) {
- this.playerConnection.sendPacket(new PacketPlayOutCraftProgressBar(container.windowId, i, j));
+ this.playerConnection.sendPacket(new PacketPlayOutWindowData(container.windowId, i, j));
}
public void closeInventory() {
@@ -939,7 +935,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public void a(EnumGamemode enumgamemode) {
this.playerInteractManager.setGameMode(enumgamemode);
- this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(3, (float) enumgamemode.a()));
+ this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(3, (float) enumgamemode.getId()));
}
// CraftBukkit start - Support multi-line messages
@@ -1022,6 +1018,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.removeQueue.add(Integer.valueOf(entity.getId()));
}
}
+
+ public long x() {
+ return this.bX;
+ }
+
// CraftBukkit start - Add per-player time and weather.
public long timeOffset = 0;
public boolean relativeTime = true;
diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java
index 31492f5c..7f8a33bc 100644
--- a/src/main/java/net/minecraft/server/EntityProjectile.java
+++ b/src/main/java/net/minecraft/server/EntityProjectile.java
@@ -127,7 +127,7 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
for (int i = 0; i < list.size(); ++i) {
Entity entity1 = (Entity) list.get(i);
- if (entity1.Q() && (entity1 != entityliving || this.at >= 5)) {
+ if (entity1.R() && (entity1 != entityliving || this.at >= 5)) {
float f = 0.3F;
AxisAlignedBB axisalignedbb = entity1.boundingBox.grow((double) f, (double) f, (double) f);
MovingObjectPosition movingobjectposition1 = axisalignedbb.a(vec3d, vec3d1);
@@ -150,7 +150,7 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
if (movingobjectposition != null) {
if (movingobjectposition.type == EnumMovingObjectType.BLOCK && this.world.getType(movingobjectposition.b, movingobjectposition.c, movingobjectposition.d) == Blocks.PORTAL) {
- this.ag();
+ this.ah();
} else {
this.a(movingobjectposition);
// CraftBukkit start
@@ -189,7 +189,7 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
float f2 = 0.99F;
float f3 = this.i();
- if (this.L()) {
+ if (this.M()) {
for (int j = 0; j < 4; ++j) {
float f4 = 0.25F;
@@ -216,7 +216,7 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
nbttagcompound.setShort("xTile", (short) this.blockX);
nbttagcompound.setShort("yTile", (short) this.blockY);
nbttagcompound.setShort("zTile", (short) this.blockZ);
- nbttagcompound.setByte("inTile", (byte) Block.b(this.inBlockId));
+ nbttagcompound.setByte("inTile", (byte) Block.getId(this.inBlockId));
nbttagcompound.setByte("shake", (byte) this.shake);
nbttagcompound.setByte("inGround", (byte) (this.inGround ? 1 : 0));
if ((this.shooterName == null || this.shooterName.length() == 0) && this.shooter != null && this.shooter instanceof EntityHuman) {
@@ -230,7 +230,7 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
this.blockX = nbttagcompound.getShort("xTile");
this.blockY = nbttagcompound.getShort("yTile");
this.blockZ = nbttagcompound.getShort("zTile");
- this.inBlockId = Block.e(nbttagcompound.getByte("inTile") & 255);
+ this.inBlockId = Block.getById(nbttagcompound.getByte("inTile") & 255);
this.shake = nbttagcompound.getByte("shake") & 255;
this.inGround = nbttagcompound.getByte("inGround") == 1;
this.shooterName = nbttagcompound.getString("ownerName");
diff --git a/src/main/java/net/minecraft/server/EntitySheep.java b/src/main/java/net/minecraft/server/EntitySheep.java
index 4d96d53a..381ae787 100644
--- a/src/main/java/net/minecraft/server/EntitySheep.java
+++ b/src/main/java/net/minecraft/server/EntitySheep.java
@@ -32,13 +32,13 @@ public class EntitySheep extends EntityAnimal {
this.bq.resultInventory = new InventoryCraftResult(); // CraftBukkit - add result slot for event
}
- protected boolean bj() {
+ protected boolean bk() {
return true;
}
- protected void bm() {
+ protected void bn() {
this.br = this.bs.f();
- super.bm();
+ super.bn();
}
public void e() {
@@ -49,9 +49,9 @@ public class EntitySheep extends EntityAnimal {
super.e();
}
- protected void aC() {
- super.aC();
- this.getAttributeInstance(GenericAttributes.a).setValue(8.0D);
+ protected void aD() {
+ super.aD();
+ this.getAttributeInstance(GenericAttributes.maxHealth).setValue(8.0D);
this.getAttributeInstance(GenericAttributes.d).setValue(0.23000000417232513D);
}
@@ -119,11 +119,11 @@ public class EntitySheep extends EntityAnimal {
return "mob.sheep.say";
}
- protected String aS() {
+ protected String aT() {
return "mob.sheep.say";
}
- protected String aT() {
+ protected String aU() {
return "mob.sheep.say";
}
@@ -185,8 +185,8 @@ public class EntitySheep extends EntityAnimal {
}
}
- public GroupDataEntity a(GroupDataEntity groupdataentity) {
- groupdataentity = super.a(groupdataentity);
+ public GroupDataEntity prepare(GroupDataEntity groupdataentity) {
+ groupdataentity = super.prepare(groupdataentity);
this.setColor(a(this.world.random));
return groupdataentity;
}
diff --git a/src/main/java/net/minecraft/server/EntitySilverfish.java b/src/main/java/net/minecraft/server/EntitySilverfish.java
index 821e7a35..ac5714f0 100644
--- a/src/main/java/net/minecraft/server/EntitySilverfish.java
+++ b/src/main/java/net/minecraft/server/EntitySilverfish.java
@@ -13,9 +13,9 @@ public class EntitySilverfish extends EntityMonster {
this.a(0.3F, 0.7F);
}
- protected void aC() {
- super.aC();
- this.getAttributeInstance(GenericAttributes.a).setValue(8.0D);
+ protected void aD() {
+ super.aD();
+ this.getAttributeInstance(GenericAttributes.maxHealth).setValue(8.0D);
this.getAttributeInstance(GenericAttributes.d).setValue(0.6000000238418579D);
this.getAttributeInstance(GenericAttributes.e).setValue(1.0D);
}
@@ -34,11 +34,11 @@ public class EntitySilverfish extends EntityMonster {
return "mob.silverfish.say";
}
- protected String aS() {
+ protected String aT() {
return "mob.silverfish.hit";
}
- protected String aT() {
+ protected String aU() {
return "mob.silverfish.kill";
}
@@ -66,7 +66,7 @@ public class EntitySilverfish extends EntityMonster {
}
protected Item getLoot() {
- return Item.d(0);
+ return Item.getById(0);
}
public void h() {
@@ -74,8 +74,8 @@ public class EntitySilverfish extends EntityMonster {
super.h();
}
- protected void bp() {
- super.bp();
+ protected void bq() {
+ super.bq();
if (!this.world.isStatic) {
int i;
int j;
@@ -130,7 +130,7 @@ public class EntitySilverfish extends EntityMonster {
l = this.world.getData(i + Facing.b[l1], j + Facing.c[l1], k + Facing.d[l1]);
if (BlockMonsterEggs.a(block)) {
// CraftBukkit start
- if (CraftEventFactory.callEntityChangeBlockEvent(this, i + Facing.b[l1], j + Facing.c[l1], k + Facing.d[l1], Blocks.MONSTER_EGGS, Block.b(BlockMonsterEggs.e(l))).isCancelled()) {
+ if (CraftEventFactory.callEntityChangeBlockEvent(this, i + Facing.b[l1], j + Facing.c[l1], k + Facing.d[l1], Blocks.MONSTER_EGGS, Block.getId(BlockMonsterEggs.getById(l))).isCancelled()) {
return;
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/EntitySkeleton.java b/src/main/java/net/minecraft/server/EntitySkeleton.java
index 47bbff12..479936f3 100644
--- a/src/main/java/net/minecraft/server/EntitySkeleton.java
+++ b/src/main/java/net/minecraft/server/EntitySkeleton.java
@@ -24,8 +24,8 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
}
}
- protected void aC() {
- super.aC();
+ protected void aD() {
+ super.aD();
this.getAttributeInstance(GenericAttributes.d).setValue(0.25D);
}
@@ -34,7 +34,7 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
this.datawatcher.a(13, new Byte((byte) 0));
}
- public boolean bj() {
+ public boolean bk() {
return true;
}
@@ -42,11 +42,11 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
return "mob.skeleton.say";
}
- protected String aS() {
+ protected String aT() {
return "mob.skeleton.hurt";
}
- protected String aT() {
+ protected String aU() {
return "mob.skeleton.death";
}
@@ -110,8 +110,8 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
super.e();
}
- public void aa() {
- super.aa();
+ public void ab() {
+ super.ab();
if (this.vehicle instanceof EntityCreature) {
EntityCreature entitycreature = (EntityCreature) this.vehicle;
@@ -172,9 +172,9 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
this.setEquipment(0, new ItemStack(Items.BOW));
}
- public GroupDataEntity a(GroupDataEntity groupdataentity) {
- groupdataentity = super.a(groupdataentity);
- if (this.world.worldProvider instanceof WorldProviderHell && this.aH().nextInt(5) > 0) {
+ public GroupDataEntity prepare(GroupDataEntity groupdataentity) {
+ groupdataentity = super.prepare(groupdataentity);
+ if (this.world.worldProvider instanceof WorldProviderHell && this.aI().nextInt(5) > 0) {
this.goalSelector.a(4, this.bq);
this.setSkeletonType(1);
this.setEquipment(0, new ItemStack(Items.STONE_SWORD));
@@ -201,7 +201,7 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
public void bZ() {
this.goalSelector.a((PathfinderGoal) this.bq);
this.goalSelector.a((PathfinderGoal) this.bp);
- ItemStack itemstack = this.bd();
+ ItemStack itemstack = this.be();
if (itemstack != null && itemstack.getItem() == Items.BOW) {
this.goalSelector.a(4, this.bp);
@@ -212,8 +212,8 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
public void a(EntityLiving entityliving, float f) {
EntityArrow entityarrow = new EntityArrow(this.world, this, entityliving, 1.6F, (float) (14 - this.world.difficulty.a() * 4));
- int i = EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_DAMAGE.id, this.bd());
- int j = EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_KNOCKBACK.id, this.bd());
+ int i = EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_DAMAGE.id, this.be());
+ int j = EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_KNOCKBACK.id, this.be());
entityarrow.b((double) (f * 2.0F) + this.random.nextGaussian() * 0.25D + (double) ((float) this.world.difficulty.a() * 0.11F));
if (i > 0) {
@@ -224,7 +224,7 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
entityarrow.setKnockbackStrength(j);
}
- if (EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_FIRE.id, this.bd()) > 0 || this.getSkeletonType() == 1) {
+ if (EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_FIRE.id, this.be()) > 0 || this.getSkeletonType() == 1) {
// CraftBukkit start - call EntityCombustEvent
EntityCombustEvent event = new EntityCombustEvent(entityarrow.getBukkitEntity(), 100);
this.world.getServer().getPluginManager().callEvent(event);
@@ -236,7 +236,7 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
}
// CraftBukkit start
- org.bukkit.event.entity.EntityShootBowEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityShootBowEvent(this, this.bd(), entityarrow, 0.8F);
+ org.bukkit.event.entity.EntityShootBowEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityShootBowEvent(this, this.be(), entityarrow, 0.8F);
if (event.isCancelled()) {
event.getProjectile().remove();
return;
@@ -247,7 +247,7 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
}
// CraftBukkit end
- this.makeSound("random.bow", 1.0F, 1.0F / (this.aH().nextFloat() * 0.4F + 0.8F));
+ this.makeSound("random.bow", 1.0F, 1.0F / (this.aI().nextFloat() * 0.4F + 0.8F));
// this.world.addEntity(entityarrow); // CraftBukkit - moved up
}
@@ -288,7 +288,7 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
}
}
- public double ac() {
- return super.ac() - 0.5D;
+ public double ad() {
+ return super.ad() - 0.5D;
}
}
diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java
index f737dd84..65cd24dd 100644
--- a/src/main/java/net/minecraft/server/EntitySlime.java
+++ b/src/main/java/net/minecraft/server/EntitySlime.java
@@ -34,7 +34,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
this.datawatcher.watch(16, new Byte((byte) i));
this.a(0.6F * (float) i, 0.6F * (float) i);
this.setPosition(this.locX, this.locY, this.locZ);
- this.getAttributeInstance(GenericAttributes.a).setValue((double) (i * i));
+ this.getAttributeInstance(GenericAttributes.maxHealth).setValue((double) (i * i));
this.setHealth(this.getMaxHealth());
this.b = i;
}
@@ -92,7 +92,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
}
if (this.bW()) {
- this.makeSound(this.bV(), this.be(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) / 0.8F);
+ this.makeSound(this.bV(), this.bf(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) / 0.8F);
}
this.h = -0.5F;
@@ -107,7 +107,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
}
}
- protected void bp() {
+ protected void bq() {
this.w();
// CraftBukkit start
Entity entityhuman = this.world.findNearbyVulnerablePlayer(this, 16.0D); // EntityHuman -> Entity
@@ -138,7 +138,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
this.bc = true;
if (this.bY()) {
- this.makeSound(this.bV(), this.be(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) * 0.8F);
+ this.makeSound(this.bV(), this.bf(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) * 0.8F);
}
this.bd = 1.0F - this.random.nextFloat() * 2.0F;
@@ -199,7 +199,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
if (this.bT()) {
int i = this.getSize();
- if (this.p(entityhuman) && this.f(entityhuman) < 0.6D * (double) i * 0.6D * (double) i && entityhuman.damageEntity(DamageSource.mobAttack(this), (float) this.bU())) {
+ if (this.hasLineOfSight(entityhuman) && this.f(entityhuman) < 0.6D * (double) i * 0.6D * (double) i && entityhuman.damageEntity(DamageSource.mobAttack(this), (float) this.bU())) {
this.makeSound("mob.attack", 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
}
}
@@ -213,16 +213,16 @@ public class EntitySlime extends EntityInsentient implements IMonster {
return this.getSize();
}
- protected String aS() {
+ protected String aT() {
return "mob.slime." + (this.getSize() > 1 ? "big" : "small");
}
- protected String aT() {
+ protected String aU() {
return "mob.slime." + (this.getSize() > 1 ? "big" : "small");
}
protected Item getLoot() {
- return this.getSize() == 1 ? Items.SLIME_BALL : Item.d(0);
+ return this.getSize() == 1 ? Items.SLIME_BALL : Item.getById(0);
}
public boolean canSpawn() {
@@ -247,11 +247,11 @@ public class EntitySlime extends EntityInsentient implements IMonster {
}
}
- protected float be() {
+ protected float bf() {
return 0.4F * (float) this.getSize();
}
- public int bv() {
+ public int x() {
return 0;
}
diff --git a/src/main/java/net/minecraft/server/EntitySmallFireball.java b/src/main/java/net/minecraft/server/EntitySmallFireball.java
index 800b095f..4d61eec2 100644
--- a/src/main/java/net/minecraft/server/EntitySmallFireball.java
+++ b/src/main/java/net/minecraft/server/EntitySmallFireball.java
@@ -75,7 +75,7 @@ public class EntitySmallFireball extends EntityFireball {
}
}
- public boolean Q() {
+ public boolean R() {
return false;
}
diff --git a/src/main/java/net/minecraft/server/EntitySnowman.java b/src/main/java/net/minecraft/server/EntitySnowman.java
index 603bb70e..2811fb46 100644
--- a/src/main/java/net/minecraft/server/EntitySnowman.java
+++ b/src/main/java/net/minecraft/server/EntitySnowman.java
@@ -19,13 +19,13 @@ public class EntitySnowman extends EntityGolem implements IRangedEntity {
this.targetSelector.a(1, new PathfinderGoalNearestAttackableTarget(this, EntityInsentient.class, 0, true, false, IMonster.a));
}
- public boolean bj() {
+ public boolean bk() {
return true;
}
- protected void aC() {
- super.aC();
- this.getAttributeInstance(GenericAttributes.a).setValue(4.0D);
+ protected void aD() {
+ super.aD();
+ this.getAttributeInstance(GenericAttributes.maxHealth).setValue(4.0D);
this.getAttributeInstance(GenericAttributes.d).setValue(0.20000000298023224D);
}
@@ -35,7 +35,7 @@ public class EntitySnowman extends EntityGolem implements IRangedEntity {
int j = MathHelper.floor(this.locY);
int k = MathHelper.floor(this.locZ);
- if (this.K()) {
+ if (this.L()) {
this.damageEntity(DamageSource.DROWN, 1.0F);
}
@@ -83,7 +83,7 @@ public class EntitySnowman extends EntityGolem implements IRangedEntity {
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.aH().nextFloat() * 0.4F + 0.8F));
+ this.makeSound("random.bow", 1.0F, 1.0F / (this.aI().nextFloat() * 0.4F + 0.8F));
this.world.addEntity(entitysnowball);
}
}
diff --git a/src/main/java/net/minecraft/server/EntitySpider.java b/src/main/java/net/minecraft/server/EntitySpider.java
index 8d5bff2c..99704478 100644
--- a/src/main/java/net/minecraft/server/EntitySpider.java
+++ b/src/main/java/net/minecraft/server/EntitySpider.java
@@ -21,9 +21,9 @@ public class EntitySpider extends EntityMonster {
}
}
- protected void aC() {
- super.aC();
- this.getAttributeInstance(GenericAttributes.a).setValue(16.0D);
+ protected void aD() {
+ super.aD();
+ this.getAttributeInstance(GenericAttributes.maxHealth).setValue(16.0D);
this.getAttributeInstance(GenericAttributes.d).setValue(0.800000011920929D);
}
@@ -43,11 +43,11 @@ public class EntitySpider extends EntityMonster {
return "mob.spider.say";
}
- protected String aS() {
+ protected String aT() {
return "mob.spider.say";
}
- protected String aT() {
+ protected String aU() {
return "mob.spider.death";
}
@@ -104,7 +104,7 @@ public class EntitySpider extends EntityMonster {
return this.bZ();
}
- public void ar() {}
+ public void as() {}
public EnumMonsterType getMonsterType() {
return EnumMonsterType.ARTHROPOD;
@@ -130,14 +130,14 @@ public class EntitySpider extends EntityMonster {
this.datawatcher.watch(16, Byte.valueOf(b0));
}
- public GroupDataEntity a(GroupDataEntity groupdataentity) {
- Object object = super.a(groupdataentity);
+ public GroupDataEntity prepare(GroupDataEntity groupdataentity) {
+ Object object = super.prepare(groupdataentity);
if (this.world.random.nextInt(100) == 0) {
EntitySkeleton entityskeleton = new EntitySkeleton(this.world);
entityskeleton.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, 0.0F);
- entityskeleton.a((GroupDataEntity) null);
+ entityskeleton.prepare((GroupDataEntity) null);
this.world.addEntity(entityskeleton, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.JOCKEY); // CraftBukkit - add SpawnReason
entityskeleton.mount(this);
}
diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java
index 493b3d8b..6e6d612b 100644
--- a/src/main/java/net/minecraft/server/EntitySquid.java
+++ b/src/main/java/net/minecraft/server/EntitySquid.java
@@ -25,29 +25,29 @@ public class EntitySquid extends EntityWaterAnimal {
this.by = 1.0F / (this.random.nextFloat() + 1.0F) * 0.2F;
}
- protected void aC() {
- super.aC();
- this.getAttributeInstance(GenericAttributes.a).setValue(10.0D);
+ protected void aD() {
+ super.aD();
+ this.getAttributeInstance(GenericAttributes.maxHealth).setValue(10.0D);
}
protected String t() {
return null;
}
- protected String aS() {
+ protected String aT() {
return null;
}
- protected String aT() {
+ protected String aU() {
return null;
}
- protected float be() {
+ protected float bf() {
return 0.4F;
}
protected Item getLoot() {
- return Item.d(0);
+ return Item.getById(0);
}
protected boolean g_() {
@@ -63,7 +63,7 @@ public class EntitySquid extends EntityWaterAnimal {
}
/* CraftBukkit start - Delegate to Entity to use existing inWater value
- public boolean L() {
+ public boolean M() {
return this.world.a(this.boundingBox.grow(0.0D, -0.6000000238418579D, 0.0D), Material.WATER, (Entity) this);
}
// CraftBukkit end */
@@ -82,7 +82,7 @@ public class EntitySquid extends EntityWaterAnimal {
}
}
- if (this.L()) {
+ if (this.M()) {
float f;
if (this.bt < 3.1415927F) {
@@ -130,7 +130,7 @@ public class EntitySquid extends EntityWaterAnimal {
this.move(this.motX, this.motY, this.motZ);
}
- protected void bp() {
+ protected void bq() {
++this.aU;
if (this.aU > 100) {
this.bA = this.bB = this.bC = 0.0F;
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index a442cb10..13cbc79b 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -37,7 +37,7 @@ public class EntityTNTPrimed extends Entity {
return false;
}
- public boolean Q() {
+ public boolean R() {
return !this.dead;
}
diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
index c148c4da..0cf9ad5b 100644
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
@@ -248,8 +248,8 @@ public class EntityTrackerEntry {
}
if (this.tracker instanceof EntityLiving) {
- AttributeMapServer attributemapserver = (AttributeMapServer) ((EntityLiving) this.tracker).bb();
- Set set = attributemapserver.b();
+ AttributeMapServer attributemapserver = (AttributeMapServer) ((EntityLiving) this.tracker).getAttributeMap();
+ Set set = attributemapserver.getAttributes();
if (!set.isEmpty()) {
// CraftBukkit start - Send scaled max health
@@ -304,7 +304,7 @@ public class EntityTrackerEntry {
double d1 = entityplayer.locZ - (double) (this.zLoc / 32);
if (d0 >= (double) (-this.b) && d0 <= (double) this.b && d1 >= (double) (-this.b) && d1 <= (double) this.b) {
- if (!this.trackedPlayers.contains(entityplayer) && (this.d(entityplayer) || this.tracker.n)) {
+ if (!this.trackedPlayers.contains(entityplayer) && (this.d(entityplayer) || this.tracker.attachedToPlayer)) {
// CraftBukkit start - respect vanish API
if (this.tracker instanceof EntityPlayer) {
Player player = ((EntityPlayer) this.tracker).getBukkitEntity();
@@ -325,7 +325,7 @@ public class EntityTrackerEntry {
}
if (this.tracker instanceof EntityLiving) {
- AttributeMapServer attributemapserver = (AttributeMapServer) ((EntityLiving) this.tracker).bb();
+ AttributeMapServer attributemapserver = (AttributeMapServer) ((EntityLiving) this.tracker).getAttributeMap();
Collection collection = attributemapserver.c();
// CraftBukkit start - If sending own attributes send scaled health instead of current maximum health
@@ -483,7 +483,7 @@ public class EntityTrackerEntry {
} else if (this.tracker instanceof EntityFallingBlock) {
EntityFallingBlock entityfallingblock = (EntityFallingBlock) this.tracker;
- return new PacketPlayOutSpawnEntity(this.tracker, 70, Block.b(entityfallingblock.f()) | entityfallingblock.data << 16);
+ return new PacketPlayOutSpawnEntity(this.tracker, 70, Block.getId(entityfallingblock.f()) | entityfallingblock.data << 16);
} else if (this.tracker instanceof EntityPainting) {
return new PacketPlayOutSpawnEntityPainting((EntityPainting) this.tracker);
} else if (this.tracker instanceof EntityItemFrame) {
diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java
index 906428dc..4161bb1d 100644
--- a/src/main/java/net/minecraft/server/EntityWither.java
+++ b/src/main/java/net/minecraft/server/EntityWither.java
@@ -58,11 +58,11 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
return "mob.wither.idle";
}
- protected String aS() {
+ protected String aT() {
return "mob.wither.hurt";
}
- protected String aT() {
+ protected String aU() {
return "mob.wither.death";
}
@@ -157,7 +157,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
}
}
- protected void bm() {
+ protected void bn() {
int i;
if (this.ca() > 0) {
@@ -181,7 +181,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
this.heal(10.0F, EntityRegainHealthEvent.RegainReason.WITHER_SPAWN); // CraftBukkit
}
} else {
- super.bm();
+ super.bn();
int j;
@@ -209,7 +209,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
if (j > 0) {
Entity entity = this.world.getEntity(j);
- if (entity != null && entity.isAlive() && this.f(entity) <= 900.0D && this.p(entity)) {
+ if (entity != null && entity.isAlive() && this.f(entity) <= 900.0D && this.hasLineOfSight(entity)) {
this.a(i + 1, (EntityLiving) entity);
this.bt[i - 1] = this.ticksLived + 40 + this.random.nextInt(20);
this.bu[i - 1] = 0;
@@ -222,7 +222,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
for (int i1 = 0; i1 < 10 && !list.isEmpty(); ++i1) {
EntityLiving entityliving = (EntityLiving) list.get(this.random.nextInt(list.size()));
- if (entityliving != this && entityliving.isAlive() && this.p(entityliving)) {
+ if (entityliving != this && entityliving.isAlive() && this.hasLineOfSight(entityliving)) {
if (entityliving instanceof EntityHuman) {
if (!((EntityHuman) entityliving).abilities.isInvulnerable) {
this.b(i, entityliving.getId());
@@ -291,9 +291,9 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
this.setHealth(this.getMaxHealth() / 3.0F);
}
- public void ar() {}
+ public void as() {}
- public int aU() {
+ public int aV() {
return 4;
}
@@ -352,7 +352,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
EntityWitherSkull entitywitherskull = new EntityWitherSkull(this.world, this, d6, d7, d8);
if (flag) {
- entitywitherskull.a(true);
+ entitywitherskull.setCharged(true);
}
entitywitherskull.locY = d4;
@@ -420,13 +420,13 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
public void addEffect(MobEffect mobeffect) {}
- protected boolean bj() {
+ protected boolean bk() {
return true;
}
- protected void aC() {
- super.aC();
- this.getAttributeInstance(GenericAttributes.a).setValue(300.0D);
+ protected void aD() {
+ super.aD();
+ this.getAttributeInstance(GenericAttributes.maxHealth).setValue(300.0D);
this.getAttributeInstance(GenericAttributes.d).setValue(0.6000000238418579D);
this.getAttributeInstance(GenericAttributes.b).setValue(40.0D);
}
diff --git a/src/main/java/net/minecraft/server/EntityWitherSkull.java b/src/main/java/net/minecraft/server/EntityWitherSkull.java
index d749175f..b797f8a4 100644
--- a/src/main/java/net/minecraft/server/EntityWitherSkull.java
+++ b/src/main/java/net/minecraft/server/EntityWitherSkull.java
@@ -15,7 +15,7 @@ public class EntityWitherSkull extends EntityFireball {
}
protected float e() {
- return this.f() ? 0.73F : super.e();
+ return this.isCharged() ? 0.73F : super.e();
}
public boolean isBurning() {
@@ -25,7 +25,7 @@ public class EntityWitherSkull extends EntityFireball {
public float a(Explosion explosion, World world, int i, int j, int k, Block block) {
float f = super.a(explosion, world, i, j, k, block);
- if (this.f() && block != Blocks.BEDROCK && block != Blocks.ENDER_PORTAL && block != Blocks.ENDER_PORTAL_FRAME && block != Blocks.COMMAND) {
+ if (this.isCharged() && block != Blocks.BEDROCK && block != Blocks.ENDER_PORTAL && block != Blocks.ENDER_PORTAL_FRAME && block != Blocks.COMMAND) {
f = Math.min(0.8F, f);
}
@@ -71,7 +71,7 @@ public class EntityWitherSkull extends EntityFireball {
}
}
- public boolean Q() {
+ public boolean R() {
return false;
}
@@ -83,11 +83,11 @@ public class EntityWitherSkull extends EntityFireball {
this.datawatcher.a(10, Byte.valueOf((byte) 0));
}
- public boolean f() {
+ public boolean isCharged() {
return this.datawatcher.getByte(10) == 1;
}
- public void a(boolean flag) {
+ public void setCharged(boolean flag) {
this.datawatcher.watch(10, Byte.valueOf((byte) (flag ? 1 : 0)));
}
}
diff --git a/src/main/java/net/minecraft/server/EntityWolf.java b/src/main/java/net/minecraft/server/EntityWolf.java
index b992d084..8f1ebf2e 100644
--- a/src/main/java/net/minecraft/server/EntityWolf.java
+++ b/src/main/java/net/minecraft/server/EntityWolf.java
@@ -35,17 +35,17 @@ public class EntityWolf extends EntityTameableAnimal {
this.setTamed(false);
}
- protected void aC() {
- super.aC();
+ protected void aD() {
+ super.aD();
this.getAttributeInstance(GenericAttributes.d).setValue(0.30000001192092896D);
if (this.isTamed()) {
- this.getAttributeInstance(GenericAttributes.a).setValue(20.0D);
+ this.getAttributeInstance(GenericAttributes.maxHealth).setValue(20.0D);
} else {
- this.getAttributeInstance(GenericAttributes.a).setValue(8.0D);
+ this.getAttributeInstance(GenericAttributes.maxHealth).setValue(8.0D);
}
}
- public boolean bj() {
+ public boolean bk() {
return true;
}
@@ -58,7 +58,7 @@ public class EntityWolf extends EntityTameableAnimal {
}
}
- protected void bo() {
+ protected void bp() {
this.datawatcher.watch(18, Float.valueOf(this.getHealth()));
}
@@ -92,20 +92,20 @@ public class EntityWolf extends EntityTameableAnimal {
return this.isAngry() ? "mob.wolf.growl" : (this.random.nextInt(3) == 0 ? (this.isTamed() && this.datawatcher.getFloat(18) < (this.getMaxHealth() / 2) ? "mob.wolf.whine" : "mob.wolf.panting") : "mob.wolf.bark");
}
- protected String aS() {
+ protected String aT() {
return "mob.wolf.hurt";
}
- protected String aT() {
+ protected String aU() {
return "mob.wolf.death";
}
- protected float be() {
+ protected float bf() {
return 0.4F;
}
protected Item getLoot() {
- return Item.d(-1);
+ return Item.getById(-1);
}
public void e() {
@@ -131,14 +131,14 @@ public class EntityWolf extends EntityTameableAnimal {
this.g = 10;
}
- if (this.K()) {
+ if (this.L()) {
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.be(), (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
+ this.makeSound("mob.wolf.shake", this.bf(), (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
}
this.bv = this.bu;
@@ -168,8 +168,8 @@ public class EntityWolf extends EntityTameableAnimal {
return this.length * 0.8F;
}
- public int bv() {
- return this.isSitting() ? 20 : super.bv();
+ public int x() {
+ return this.isSitting() ? 20 : super.x();
}
public boolean damageEntity(DamageSource damagesource, float f) {
@@ -196,9 +196,9 @@ public class EntityWolf extends EntityTameableAnimal {
public void setTamed(boolean flag) {
super.setTamed(flag);
if (flag) {
- this.getAttributeInstance(GenericAttributes.a).setValue(20.0D);
+ this.getAttributeInstance(GenericAttributes.maxHealth).setValue(20.0D);
} else {
- this.getAttributeInstance(GenericAttributes.a).setValue(8.0D);
+ this.getAttributeInstance(GenericAttributes.maxHealth).setValue(8.0D);
}
}
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
index 89fc4c5d..7d8cb937 100644
--- a/src/main/java/net/minecraft/server/EntityZombie.java
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
@@ -42,12 +42,12 @@ public class EntityZombie extends EntityMonster {
this.a(0.6F, 1.8F);
}
- protected void aC() {
- super.aC();
+ protected void aD() {
+ super.aD();
this.getAttributeInstance(GenericAttributes.b).setValue(40.0D);
this.getAttributeInstance(GenericAttributes.d).setValue(0.23000000417232513D);
this.getAttributeInstance(GenericAttributes.e).setValue(3.0D);
- this.bb().b(bp).setValue(this.random.nextDouble() * 0.10000000149011612D);
+ this.getAttributeMap().b(bp).setValue(this.random.nextDouble() * 0.10000000149011612D);
}
protected void c() {
@@ -57,8 +57,8 @@ public class EntityZombie extends EntityMonster {
this.getDataWatcher().a(14, Byte.valueOf((byte) 0));
}
- public int aU() {
- int i = super.aU() + 2;
+ public int aV() {
+ int i = super.aV() + 2;
if (i > 20) {
i = 20;
@@ -67,7 +67,7 @@ public class EntityZombie extends EntityMonster {
return i;
}
- protected boolean bj() {
+ protected boolean bk() {
return true;
}
@@ -153,7 +153,7 @@ public class EntityZombie extends EntityMonster {
}
}
- if (this.al() && this.getGoalTarget() != null && this.vehicle instanceof EntityChicken) {
+ if (this.am() && this.getGoalTarget() != null && this.vehicle instanceof EntityChicken) {
((EntityInsentient) this.vehicle).getNavigation().a(this.getNavigation().e(), 1.5D);
}
@@ -199,7 +199,7 @@ public class EntityZombie extends EntityMonster {
}
}
// CraftBukkit end
- entityzombie.a((GroupDataEntity) null);
+ entityzombie.prepare((GroupDataEntity) null);
this.getAttributeInstance(bp).a(new AttributeModifier("Zombie reinforcement caller charge", -0.05000000074505806D, 0));
entityzombie.getAttributeInstance(bp).a(new AttributeModifier("Zombie reinforcement callee charge", -0.05000000074505806D, 0));
break;
@@ -237,7 +237,7 @@ public class EntityZombie extends EntityMonster {
if (flag) {
int i = this.world.difficulty.a();
- if (this.bd() == null && this.isBurning() && this.random.nextFloat() < (float) i * 0.3F) {
+ if (this.be() == null && this.isBurning() && this.random.nextFloat() < (float) i * 0.3F) {
// CraftBukkit start
EntityCombustByEntityEvent event = new EntityCombustByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), 2 * i);
this.world.getServer().getPluginManager().callEvent(event);
@@ -256,11 +256,11 @@ public class EntityZombie extends EntityMonster {
return "mob.zombie.say";
}
- protected String aS() {
+ protected String aT() {
return "mob.zombie.hurt";
}
- protected String aT() {
+ protected String aU() {
return "mob.zombie.death";
}
@@ -346,7 +346,7 @@ public class EntityZombie extends EntityMonster {
entityzombie.k(entityliving);
this.world.kill(entityliving);
- entityzombie.a((GroupDataEntity) null);
+ entityzombie.prepare((GroupDataEntity) null);
entityzombie.setVillager(true);
if (entityliving.isBaby()) {
entityzombie.setBaby(true);
@@ -357,8 +357,8 @@ public class EntityZombie extends EntityMonster {
}
}
- public GroupDataEntity a(GroupDataEntity groupdataentity) {
- Object object = super.a(groupdataentity);
+ public GroupDataEntity prepare(GroupDataEntity groupdataentity) {
+ Object object = super.prepare(groupdataentity);
float f = this.world.b(this.locX, this.locY, this.locZ);
this.h(this.random.nextFloat() < 0.55F * f);
@@ -388,7 +388,7 @@ public class EntityZombie extends EntityMonster {
EntityChicken entitychicken1 = new EntityChicken(this.world);
entitychicken1.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, 0.0F);
- entitychicken1.a((GroupDataEntity) null);
+ entitychicken1.prepare((GroupDataEntity) null);
entitychicken1.i(true);
this.world.addEntity(entitychicken1, CreatureSpawnEvent.SpawnReason.MOUNT);
this.mount(entitychicken1);
@@ -417,7 +417,7 @@ public class EntityZombie extends EntityMonster {
if (this.random.nextFloat() < f * 0.05F) {
this.getAttributeInstance(bp).a(new AttributeModifier("Leader zombie bonus", this.random.nextDouble() * 0.25D + 0.5D, 0));
- this.getAttributeInstance(GenericAttributes.a).a(new AttributeModifier("Leader zombie bonus", this.random.nextDouble() * 3.0D + 1.0D, 2));
+ this.getAttributeInstance(GenericAttributes.maxHealth).a(new AttributeModifier("Leader zombie bonus", this.random.nextDouble() * 3.0D + 1.0D, 2));
this.a(true);
}
@@ -425,7 +425,7 @@ public class EntityZombie extends EntityMonster {
}
public boolean a(EntityHuman entityhuman) {
- ItemStack itemstack = entityhuman.bE();
+ ItemStack itemstack = entityhuman.bF();
if (itemstack != null && itemstack.getItem() == Items.GOLDEN_APPLE && itemstack.getData() == 0 && this.isVillager() && this.hasEffect(MobEffectList.WEAKNESS)) {
if (!entityhuman.abilities.canInstantlyBuild) {
@@ -466,7 +466,7 @@ public class EntityZombie extends EntityMonster {
EntityVillager entityvillager = new EntityVillager(this.world);
entityvillager.k(this);
- entityvillager.a((GroupDataEntity) null);
+ entityvillager.prepare((GroupDataEntity) null);
entityvillager.cd();
if (this.isBaby()) {
entityvillager.setAge(-24000);
diff --git a/src/main/java/net/minecraft/server/ExpirableListEntry.java b/src/main/java/net/minecraft/server/ExpirableListEntry.java
index 85819148..2cf6e232 100644
--- a/src/main/java/net/minecraft/server/ExpirableListEntry.java
+++ b/src/main/java/net/minecraft/server/ExpirableListEntry.java
@@ -56,7 +56,7 @@ public abstract class ExpirableListEntry extends JsonListEntry {
return this.e;
}
- boolean e() {
+ boolean hasExpired() {
return this.d == null ? false : this.d.before(new Date());
}
diff --git a/src/main/java/net/minecraft/server/FoodMetaData.java b/src/main/java/net/minecraft/server/FoodMetaData.java
index 4e91fe91..41692318 100644
--- a/src/main/java/net/minecraft/server/FoodMetaData.java
+++ b/src/main/java/net/minecraft/server/FoodMetaData.java
@@ -60,7 +60,7 @@ public class FoodMetaData {
}
}
- if (entityhuman.world.getGameRules().getBoolean("naturalRegeneration") && this.foodLevel >= 18 && entityhuman.bQ()) {
+ if (entityhuman.world.getGameRules().getBoolean("naturalRegeneration") && this.foodLevel >= 18 && entityhuman.bR()) {
++this.foodTickTimer;
if (this.foodTickTimer >= 80) {
// CraftBukkit - added RegainReason
@@ -98,7 +98,7 @@ public class FoodMetaData {
nbttagcompound.setFloat("foodExhaustionLevel", this.exhaustionLevel);
}
- public int a() {
+ public int getFoodLevel() {
return this.foodLevel;
}
@@ -110,7 +110,7 @@ public class FoodMetaData {
this.exhaustionLevel = Math.min(this.exhaustionLevel + f, 40.0F);
}
- public float e() {
+ public float getSaturationLevel() {
return this.saturationLevel;
}
}
diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java
index 9cc95812..52bc69b6 100644
--- a/src/main/java/net/minecraft/server/HandshakeListener.java
+++ b/src/main/java/net/minecraft/server/HandshakeListener.java
@@ -64,11 +64,11 @@ public class HandshakeListener implements PacketHandshakingInListener {
// CraftBukkit end
if (packethandshakinginsetprotocol.d() > 5) {
- chatcomponenttext = new ChatComponentText("Outdated server! I\'m still on 1.7.9");
+ chatcomponenttext = new ChatComponentText("Outdated server! I\'m still on 1.7.10");
this.b.handle(new PacketLoginOutDisconnect(chatcomponenttext), new GenericFutureListener[0]);
this.b.close(chatcomponenttext);
} else if (packethandshakinginsetprotocol.d() < 5) {
- chatcomponenttext = new ChatComponentText("Outdated client! Please use 1.7.9");
+ chatcomponenttext = new ChatComponentText("Outdated client! Please use 1.7.10");
this.b.handle(new PacketLoginOutDisconnect(chatcomponenttext), new GenericFutureListener[0]);
this.b.close(chatcomponenttext);
} else {
diff --git a/src/main/java/net/minecraft/server/IInventory.java b/src/main/java/net/minecraft/server/IInventory.java
index 56dc14b6..bfc5c869 100644
--- a/src/main/java/net/minecraft/server/IInventory.java
+++ b/src/main/java/net/minecraft/server/IInventory.java
@@ -26,7 +26,7 @@ public interface IInventory {
void startOpen();
- void l_();
+ void closeContainer();
boolean b(int i, ItemStack itemstack);
diff --git a/src/main/java/net/minecraft/server/InventoryCraftResult.java b/src/main/java/net/minecraft/server/InventoryCraftResult.java
index 1c8f328e..7db82900 100644
--- a/src/main/java/net/minecraft/server/InventoryCraftResult.java
+++ b/src/main/java/net/minecraft/server/InventoryCraftResult.java
@@ -88,7 +88,7 @@ public class InventoryCraftResult implements IInventory {
public void startOpen() {}
- public void l_() {}
+ public void closeContainer() {}
public boolean b(int i, ItemStack itemstack) {
return true;
diff --git a/src/main/java/net/minecraft/server/InventoryCrafting.java b/src/main/java/net/minecraft/server/InventoryCrafting.java
index f1c891e3..5b46597d 100644
--- a/src/main/java/net/minecraft/server/InventoryCrafting.java
+++ b/src/main/java/net/minecraft/server/InventoryCrafting.java
@@ -141,7 +141,7 @@ public class InventoryCrafting implements IInventory {
public void startOpen() {}
- public void l_() {}
+ public void closeContainer() {}
public boolean b(int i, ItemStack itemstack) {
return true;
diff --git a/src/main/java/net/minecraft/server/InventoryEnderChest.java b/src/main/java/net/minecraft/server/InventoryEnderChest.java
index 0d9b2891..ed23f787 100644
--- a/src/main/java/net/minecraft/server/InventoryEnderChest.java
+++ b/src/main/java/net/minecraft/server/InventoryEnderChest.java
@@ -99,12 +99,12 @@ public class InventoryEnderChest extends InventorySubcontainer {
super.startOpen();
}
- public void l_() {
+ public void closeContainer() {
if (this.a != null) {
this.a.b();
}
- super.l_();
+ super.closeContainer();
this.a = null;
}
}
diff --git a/src/main/java/net/minecraft/server/InventoryLargeChest.java b/src/main/java/net/minecraft/server/InventoryLargeChest.java
index d117358f..263de7c5 100644
--- a/src/main/java/net/minecraft/server/InventoryLargeChest.java
+++ b/src/main/java/net/minecraft/server/InventoryLargeChest.java
@@ -118,9 +118,9 @@ public class InventoryLargeChest implements IInventory {
this.right.startOpen();
}
- public void l_() {
- this.left.l_();
- this.right.l_();
+ public void closeContainer() {
+ this.left.closeContainer();
+ this.right.closeContainer();
}
public boolean b(int i, ItemStack itemstack) {
diff --git a/src/main/java/net/minecraft/server/InventoryMerchant.java b/src/main/java/net/minecraft/server/InventoryMerchant.java
index a04e9be9..b5617b32 100644
--- a/src/main/java/net/minecraft/server/InventoryMerchant.java
+++ b/src/main/java/net/minecraft/server/InventoryMerchant.java
@@ -133,7 +133,7 @@ public class InventoryMerchant implements IInventory {
public void startOpen() {}
- public void l_() {}
+ public void closeContainer() {}
public boolean b(int i, ItemStack itemstack) {
return true;
diff --git a/src/main/java/net/minecraft/server/InventorySubcontainer.java b/src/main/java/net/minecraft/server/InventorySubcontainer.java
index e7c8aa81..9a775e4c 100644
--- a/src/main/java/net/minecraft/server/InventorySubcontainer.java
+++ b/src/main/java/net/minecraft/server/InventorySubcontainer.java
@@ -112,7 +112,7 @@ public abstract class InventorySubcontainer implements IInventory { // CraftBukk
public void startOpen() {}
- public void l_() {}
+ public void closeContainer() {}
public boolean b(int i, ItemStack itemstack) {
return true;
diff --git a/src/main/java/net/minecraft/server/Item.java b/src/main/java/net/minecraft/server/Item.java
index 8d56cc30..4382f1ab 100644
--- a/src/main/java/net/minecraft/server/Item.java
+++ b/src/main/java/net/minecraft/server/Item.java
@@ -26,16 +26,16 @@ public class Item {
public Item() {}
- public static int b(Item item) {
+ public static int getId(Item item) {
return item == null ? 0 : REGISTRY.b(item);
}
- public static Item d(int i) {
+ public static Item getById(int i) {
return (Item) REGISTRY.a(i);
}
public static Item getItemOf(Block block) {
- return d(Block.b(block));
+ return getById(Block.getId(block));
}
public static void l() {
@@ -217,7 +217,7 @@ public class Item {
while (iterator.hasNext()) {
String s = (String) iterator.next();
- Block block = (Block) Block.REGISTRY.a(s);
+ Block block = (Block) Block.REGISTRY.get(s);
Object object;
if (block == Blocks.WOOL) {
@@ -296,7 +296,7 @@ public class Item {
object = new ItemBlock(block);
}
- REGISTRY.a(Block.b(block), s, object);
+ REGISTRY.a(Block.getId(block), s, object);
}
}
diff --git a/src/main/java/net/minecraft/server/ItemBoat.java b/src/main/java/net/minecraft/server/ItemBoat.java
index 29c97e21..e044b03d 100644
--- a/src/main/java/net/minecraft/server/ItemBoat.java
+++ b/src/main/java/net/minecraft/server/ItemBoat.java
@@ -40,8 +40,8 @@ public class ItemBoat extends Item {
for (i = 0; i < list.size(); ++i) {
Entity entity = (Entity) list.get(i);
- if (entity.Q()) {
- float f10 = entity.ae();
+ if (entity.R()) {
+ float f10 = entity.af();
AxisAlignedBB axisalignedbb = entity.boundingBox.grow((double) f10, (double) f10, (double) f10);
if (axisalignedbb.a(vec3d)) {
diff --git a/src/main/java/net/minecraft/server/ItemFishingRod.java b/src/main/java/net/minecraft/server/ItemFishingRod.java
index 4451a9f6..2f34151b 100644
--- a/src/main/java/net/minecraft/server/ItemFishingRod.java
+++ b/src/main/java/net/minecraft/server/ItemFishingRod.java
@@ -15,7 +15,7 @@ public class ItemFishingRod extends Item {
int i = entityhuman.hookedFish.e();
itemstack.damage(i, entityhuman);
- entityhuman.aZ();
+ entityhuman.ba();
} else {
// CraftBukkit start
EntityFishingHook hook = new EntityFishingHook(world, entityhuman);
@@ -31,7 +31,7 @@ public class ItemFishingRod extends Item {
world.addEntity(hook); // CraftBukkit - moved creation up
}
- entityhuman.aZ();
+ entityhuman.ba();
}
return itemstack;
diff --git a/src/main/java/net/minecraft/server/ItemMonsterEgg.java b/src/main/java/net/minecraft/server/ItemMonsterEgg.java
index 0adb4e47..639ddf56 100644
--- a/src/main/java/net/minecraft/server/ItemMonsterEgg.java
+++ b/src/main/java/net/minecraft/server/ItemMonsterEgg.java
@@ -112,7 +112,7 @@ public class ItemMonsterEgg extends Item {
entity.setPositionRotation(d0, d1, d2, MathHelper.g(world.random.nextFloat() * 360.0F), 0.0F);
entityinsentient.aO = entityinsentient.yaw;
entityinsentient.aM = entityinsentient.yaw;
- entityinsentient.a((GroupDataEntity) null);
+ entityinsentient.prepare((GroupDataEntity) null);
world.addEntity(entity, spawnReason); // CraftBukkit
entityinsentient.r();
}
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index f9aaf4ab..c9d74d37 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -169,7 +169,7 @@ public final class ItemStack {
world.notifyAndUpdatePhysics(x, y, z, null, oldBlock, block, updateFlag); // send null chunk as chunk.k() returns false by this point
}
- entityhuman.a(StatisticList.USE_ITEM_COUNT[Item.b(this.item)], 1);
+ entityhuman.a(StatisticList.USE_ITEM_COUNT[Item.getId(this.item)], 1);
}
}
world.capturedBlockStates.clear();
@@ -191,7 +191,7 @@ public final class ItemStack {
}
public NBTTagCompound save(NBTTagCompound nbttagcompound) {
- nbttagcompound.setShort("id", (short) Item.b(this.item));
+ nbttagcompound.setShort("id", (short) Item.getId(this.item));
nbttagcompound.setByte("Count", (byte) this.count);
nbttagcompound.setShort("Damage", (short) this.damage);
if (this.tag != null) {
@@ -202,7 +202,7 @@ public final class ItemStack {
}
public void c(NBTTagCompound nbttagcompound) {
- this.item = Item.d(nbttagcompound.getShort("id"));
+ this.item = Item.getById(nbttagcompound.getShort("id"));
this.count = nbttagcompound.getByte("Count");
/* CraftBukkit start - Route through setData for filtering
this.damage = nbttagcompound.getShort("Damage");
@@ -307,15 +307,15 @@ public final class ItemStack {
public void damage(int i, EntityLiving entityliving) {
if (!(entityliving instanceof EntityHuman) || !((EntityHuman) entityliving).abilities.canInstantlyBuild) {
if (this.g()) {
- if (this.isDamaged(i, entityliving.aH())) {
+ if (this.isDamaged(i, entityliving.aI())) {
entityliving.a(this);
--this.count;
if (entityliving instanceof EntityHuman) {
EntityHuman entityhuman = (EntityHuman) entityliving;
- entityhuman.a(StatisticList.BREAK_ITEM_COUNT[Item.b(this.item)], 1);
+ entityhuman.a(StatisticList.BREAK_ITEM_COUNT[Item.getId(this.item)], 1);
if (this.count == 0 && this.getItem() instanceof ItemBow) {
- entityhuman.bF();
+ entityhuman.bG();
}
}
@@ -339,7 +339,7 @@ public final class ItemStack {
boolean flag = this.item.a(this, entityliving, (EntityLiving) entityhuman);
if (flag) {
- entityhuman.a(StatisticList.USE_ITEM_COUNT[Item.b(this.item)], 1);
+ entityhuman.a(StatisticList.USE_ITEM_COUNT[Item.getId(this.item)], 1);
}
}
@@ -347,7 +347,7 @@ public final class ItemStack {
boolean flag = this.item.a(this, world, block, i, j, k, entityhuman);
if (flag) {
- entityhuman.a(StatisticList.USE_ITEM_COUNT[Item.b(this.item)], 1);
+ entityhuman.a(StatisticList.USE_ITEM_COUNT[Item.getId(this.item)], 1);
}
}
@@ -406,7 +406,7 @@ public final class ItemStack {
}
public void a(World world, EntityHuman entityhuman, int i) {
- entityhuman.a(StatisticList.CRAFT_BLOCK_COUNT[Item.b(this.item)], i);
+ entityhuman.a(StatisticList.CRAFT_BLOCK_COUNT[Item.getId(this.item)], i);
this.item.d(this, world, entityhuman);
}
diff --git a/src/main/java/net/minecraft/server/JsonList.java b/src/main/java/net/minecraft/server/JsonList.java
index 36dbcf62..9d1cb336 100644
--- a/src/main/java/net/minecraft/server/JsonList.java
+++ b/src/main/java/net/minecraft/server/JsonList.java
@@ -51,7 +51,7 @@ public class JsonList {
}
public void add(JsonListEntry jsonlistentry) {
- this.d.put(this.a(jsonlistentry.f()), jsonlistentry);
+ this.d.put(this.a(jsonlistentry.getKey()), jsonlistentry);
try {
this.save();
@@ -85,7 +85,7 @@ public class JsonList {
}
// CraftBukkit end
- public boolean d() {
+ public boolean isEmpty() {
return this.d.size() < 1;
}
@@ -104,8 +104,8 @@ public class JsonList {
while (iterator.hasNext()) {
JsonListEntry jsonlistentry = (JsonListEntry) iterator.next();
- if (jsonlistentry.e()) {
- arraylist.add(jsonlistentry.f());
+ if (jsonlistentry.hasExpired()) {
+ arraylist.add(jsonlistentry.getKey());
}
}
@@ -157,8 +157,8 @@ public class JsonList {
while (iterator.hasNext()) {
JsonListEntry jsonlistentry = (JsonListEntry) iterator.next();
- if (jsonlistentry.f() != null) {
- this.d.put(this.a(jsonlistentry.f()), jsonlistentry);
+ if (jsonlistentry.getKey() != null) {
+ this.d.put(this.a(jsonlistentry.getKey()), jsonlistentry);
}
}
}
diff --git a/src/main/java/net/minecraft/server/JsonListEntry.java b/src/main/java/net/minecraft/server/JsonListEntry.java
index e853c564..1cd5104b 100644
--- a/src/main/java/net/minecraft/server/JsonListEntry.java
+++ b/src/main/java/net/minecraft/server/JsonListEntry.java
@@ -14,11 +14,11 @@ public class JsonListEntry {
this.a = object;
}
- public Object f() { // CraftBukkit -> package private -> public
+ public Object getKey() { // CraftBukkit -> package private -> public
return this.a;
}
- boolean e() {
+ boolean hasExpired() {
return false;
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index f673d64f..e65cbfae 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -438,7 +438,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
long j = 0L;
this.q.setMOTD(new ChatComponentText(this.motd));
- this.q.setServerInfo(new ServerPingServerData("1.7.9", 5));
+ this.q.setServerInfo(new ServerPingServerData("1.7.10", 5));
this.a(this.q);
while (this.isRunning) {
@@ -689,7 +689,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
try {
/* CraftBukkit start - Replace everything
- boolean flag = !GraphicsEnvironment.isHeadless();
+ boolean flag = true;
String s = null;
String s1 = ".";
String s2 = null;
@@ -827,7 +827,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
}
public String getVersion() {
- return "1.7.9";
+ return "1.7.10";
}
public int C() {
diff --git a/src/main/java/net/minecraft/server/MobEffectList.java b/src/main/java/net/minecraft/server/MobEffectList.java
index a66e66cb..6ec03bbe 100644
--- a/src/main/java/net/minecraft/server/MobEffectList.java
+++ b/src/main/java/net/minecraft/server/MobEffectList.java
@@ -36,7 +36,7 @@ public class MobEffectList {
public static final MobEffectList WEAKNESS = (new MobEffectAttackDamage(18, true, 4738376)).b("potion.weakness").b(5, 0).a(GenericAttributes.e, "22653B89-116E-49DC-9B6B-9971489B5BE5", 2.0D, 0);
public static final MobEffectList POISON = (new MobEffectList(19, true, 5149489)).b("potion.poison").b(6, 0).a(0.25D);
public static final MobEffectList WITHER = (new MobEffectList(20, true, 3484199)).b("potion.wither").b(1, 2).a(0.25D);
- public static final MobEffectList HEALTH_BOOST = (new MobEffectHealthBoost(21, false, 16284963)).b("potion.healthBoost").b(2, 2).a(GenericAttributes.a, "5D6F0BA2-1186-46AC-B896-C61C5CEE99CC", 4.0D, 0);
+ public static final MobEffectList HEALTH_BOOST = (new MobEffectHealthBoost(21, false, 16284963)).b("potion.healthBoost").b(2, 2).a(GenericAttributes.maxHealth, "5D6F0BA2-1186-46AC-B896-C61C5CEE99CC", 4.0D, 0);
public static final MobEffectList ABSORPTION = (new MobEffectAbsorption(22, false, 2445989)).b("potion.absorption").b(2, 2);
public static final MobEffectList SATURATION = (new InstantMobEffect(23, false, 16262179)).b("potion.saturation");
public static final MobEffectList z = null;
@@ -92,7 +92,7 @@ public class MobEffectList {
} else if (this.id == WITHER.id) {
entityliving.damageEntity(DamageSource.WITHER, 1.0F);
} else if (this.id == HUNGER.id && entityliving instanceof EntityHuman) {
- ((EntityHuman) entityliving).a(0.025F * (float) (i + 1));
+ ((EntityHuman) entityliving).applyExhaustion(0.025F * (float) (i + 1));
} else if (this.id == SATURATION.id && entityliving instanceof EntityHuman) {
if (!entityliving.world.isStatic) {
// CraftBukkit start
@@ -108,8 +108,8 @@ public class MobEffectList {
((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutUpdateHealth(((EntityPlayer) entityhuman).getBukkitEntity().getScaledHealth(), entityhuman.getFoodData().foodLevel, entityhuman.getFoodData().saturationLevel));
// CraftBukkit end
}
- } else if ((this.id != HEAL.id || entityliving.aQ()) && (this.id != HARM.id || !entityliving.aQ())) {
- if (this.id == HARM.id && !entityliving.aQ() || this.id == HEAL.id && entityliving.aQ()) {
+ } else if ((this.id != HEAL.id || entityliving.aR()) && (this.id != HARM.id || !entityliving.aR())) {
+ if (this.id == HARM.id && !entityliving.aR() || this.id == HEAL.id && entityliving.aR()) {
entityliving.damageEntity(DamageSource.MAGIC, (float) (6 << i));
}
} else {
@@ -126,8 +126,8 @@ public class MobEffectList {
// CraftBukkit end
int j;
- if ((this.id != HEAL.id || entityliving1.aQ()) && (this.id != HARM.id || !entityliving1.aQ())) {
- if (this.id == HARM.id && !entityliving1.aQ() || this.id == HEAL.id && entityliving1.aQ()) {
+ if ((this.id != HEAL.id || entityliving1.aR()) && (this.id != HARM.id || !entityliving1.aR())) {
+ if (this.id == HARM.id && !entityliving1.aR() || this.id == HEAL.id && entityliving1.aR()) {
j = (int) (d0 * (double) (6 << i) + 0.5D);
if (entityliving == null) {
entityliving1.damageEntity(DamageSource.MAGIC, (float) j);
diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
index 06f9b1f2..93bb1adc 100644
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
@@ -37,7 +37,7 @@ public abstract class MobSpawnerAbstract {
}
}
- public void a(String s) {
+ public void setMobName(String s) {
this.mobName = s;
}
@@ -162,7 +162,7 @@ public abstract class MobSpawnerAbstract {
entity1 = entity2;
}
} else if (entity instanceof EntityLiving && entity.world != null) {
- ((EntityInsentient) entity).a((GroupDataEntity) null);
+ ((EntityInsentient) entity).prepare((GroupDataEntity) null);
this.a().addEntity(entity, CreatureSpawnEvent.SpawnReason.SPAWNER); // CraftBukkit
}
diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
index a4724312..ce66cca1 100644
--- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
+++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
@@ -222,7 +222,7 @@ public class NameReferencingFileConverter {
public static String a(String s) {
if (!UtilColor.b(s) && s.length() <= 16) {
MinecraftServer minecraftserver = MinecraftServer.getServer();
- GameProfile gameprofile = minecraftserver.getUserCache().a(s);
+ GameProfile gameprofile = minecraftserver.getUserCache().getProfile(s);
if (gameprofile != null && gameprofile.getId() != null) {
return gameprofile.getId().toString();
diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java
index f6f870fd..8d3cf1f9 100644
--- a/src/main/java/net/minecraft/server/PacketDataSerializer.java
+++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java
@@ -82,7 +82,7 @@ public class PacketDataSerializer extends ByteBuf {
if (itemstack == null || itemstack.getItem() == null) { // CraftBukkit - NPE fix itemstack.getItem()
this.writeShort(-1);
} else {
- this.writeShort(Item.b(itemstack.getItem()));
+ this.writeShort(Item.getId(itemstack.getItem()));
this.writeByte(itemstack.count);
this.writeShort(itemstack.getData());
NBTTagCompound nbttagcompound = null;
@@ -103,7 +103,7 @@ public class PacketDataSerializer extends ByteBuf {
byte b0 = this.readByte();
short short2 = this.readShort();
- itemstack = new ItemStack(Item.d(short1), b0, short2);
+ itemstack = new ItemStack(Item.getById(short1), b0, short2);
itemstack.tag = this.b();
// CraftBukkit start
if (itemstack.tag != null) {
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutBlockChange.java b/src/main/java/net/minecraft/server/PacketPlayOutBlockChange.java
index a7a7adce..4c622e26 100644
--- a/src/main/java/net/minecraft/server/PacketPlayOutBlockChange.java
+++ b/src/main/java/net/minecraft/server/PacketPlayOutBlockChange.java
@@ -22,7 +22,7 @@ public class PacketPlayOutBlockChange extends Packet {
this.a = packetdataserializer.readInt();
this.b = packetdataserializer.readUnsignedByte();
this.c = packetdataserializer.readInt();
- this.block = Block.e(packetdataserializer.a());
+ this.block = Block.getById(packetdataserializer.a());
this.data = packetdataserializer.readUnsignedByte();
}
@@ -30,7 +30,7 @@ public class PacketPlayOutBlockChange extends Packet {
packetdataserializer.writeInt(this.a);
packetdataserializer.writeByte(this.b);
packetdataserializer.writeInt(this.c);
- packetdataserializer.b(Block.b(this.block));
+ packetdataserializer.b(Block.getId(this.block));
packetdataserializer.writeByte(this.data);
}
@@ -39,7 +39,7 @@ public class PacketPlayOutBlockChange extends Packet {
}
public String b() {
- return String.format("type=%d, data=%d, x=%d, y=%d, z=%d", new Object[] { Integer.valueOf(Block.b(this.block)), Integer.valueOf(this.data), Integer.valueOf(this.a), Integer.valueOf(this.b), Integer.valueOf(this.c)});
+ return String.format("type=%d, data=%d, x=%d, y=%d, z=%d", new Object[] { Integer.valueOf(Block.getId(this.block)), Integer.valueOf(this.data), Integer.valueOf(this.a), Integer.valueOf(this.b), Integer.valueOf(this.c)});
}
public void handle(PacketListener packetlistener) {
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutNamedEntitySpawn.java b/src/main/java/net/minecraft/server/PacketPlayOutNamedEntitySpawn.java
index 7bae4054..0023f18d 100644
--- a/src/main/java/net/minecraft/server/PacketPlayOutNamedEntitySpawn.java
+++ b/src/main/java/net/minecraft/server/PacketPlayOutNamedEntitySpawn.java
@@ -34,7 +34,7 @@ public class PacketPlayOutNamedEntitySpawn extends Packet {
this.g = (byte) ((int) (entityhuman.pitch * 256.0F / 360.0F));
ItemStack itemstack = entityhuman.inventory.getItemInHand();
- this.h = itemstack == null ? 0 : Item.b(itemstack.getItem());
+ this.h = itemstack == null ? 0 : Item.getId(itemstack.getItem());
this.i = entityhuman.getDataWatcher();
}
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalBreakDoor.java b/src/main/java/net/minecraft/server/PathfinderGoalBreakDoor.java
index 35d54982..727f5f0c 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalBreakDoor.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalBreakDoor.java
@@ -31,7 +31,7 @@ public class PathfinderGoalBreakDoor extends PathfinderGoalDoorInteract {
public void e() {
super.e();
- if (this.a.aH().nextInt(20) == 0) {
+ if (this.a.aI().nextInt(20) == 0) {
this.a.world.triggerEffect(1010, this.b, this.c, this.d, 0);
}
@@ -53,7 +53,7 @@ public class PathfinderGoalBreakDoor extends PathfinderGoalDoorInteract {
this.a.world.setAir(this.b, this.c, this.d);
this.a.world.triggerEffect(1012, this.b, this.c, this.d, 0);
- this.a.world.triggerEffect(2001, this.b, this.c, this.d, Block.b((Block) this.e));
+ this.a.world.triggerEffect(2001, this.b, this.c, this.d, Block.getId(this.e));
}
}
}
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java
index eb48c70c..65f86908 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java
@@ -38,7 +38,7 @@ public class PathfinderGoalBreed extends PathfinderGoal {
}
public void e() {
- this.d.getControllerLook().a(this.e, 10.0F, (float) this.d.bv());
+ this.d.getControllerLook().a(this.e, 10.0F, (float) this.d.x());
this.d.getNavigation().a((Entity) this.e, this.c);
++this.b;
if (this.b >= 60 && this.d.f(this.e) < 9.0D) {
@@ -94,7 +94,7 @@ public class PathfinderGoalBreed extends PathfinderGoal {
entityageable.setAge(-24000);
entityageable.setPositionRotation(this.d.locX, this.d.locY, this.d.locZ, 0.0F, 0.0F);
this.a.addEntity(entityageable, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BREEDING); // CraftBukkit - added SpawnReason
- Random random = this.d.aH();
+ Random random = this.d.aI();
for (int i = 0; i < 7; ++i) {
double d0 = random.nextGaussian() * 0.02D;
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalEatTile.java b/src/main/java/net/minecraft/server/PathfinderGoalEatTile.java
index 54813cd3..a38f2a26 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalEatTile.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalEatTile.java
@@ -18,7 +18,7 @@ public class PathfinderGoalEatTile extends PathfinderGoal {
}
public boolean a() {
- if (this.b.aH().nextInt(this.b.isBaby() ? 50 : 1000) != 0) {
+ if (this.b.aI().nextInt(this.b.isBaby() ? 50 : 1000) != 0) {
return false;
} else {
int i = MathHelper.floor(this.b.locX);
@@ -64,7 +64,7 @@ public class PathfinderGoalEatTile extends PathfinderGoal {
} else if (this.c.getType(i, j - 1, k) == Blocks.GRASS) {
// CraftBukkit
if (!CraftEventFactory.callEntityChangeBlockEvent(this.b, this.b.world.getWorld().getBlockAt(i, j - 1, k), Material.DIRT, !this.c.getGameRules().getBoolean("mobGriefing")).isCancelled()) {
- this.c.triggerEffect(2001, i, j - 1, k, Block.b((Block) Blocks.GRASS));
+ this.c.triggerEffect(2001, i, j - 1, k, Block.getId(Blocks.GRASS));
this.c.setTypeAndData(i, j - 1, k, Blocks.DIRT, 0, 2);
}
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalHurtByTarget.java b/src/main/java/net/minecraft/server/PathfinderGoalHurtByTarget.java
index 2a0404ee..4f476e6f 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalHurtByTarget.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalHurtByTarget.java
@@ -15,14 +15,14 @@ public class PathfinderGoalHurtByTarget extends PathfinderGoalTarget {
}
public boolean a() {
- int i = this.c.aJ();
+ int i = this.c.aK();
return i != this.b && this.a(this.c.getLastDamager(), false);
}
public void c() {
this.c.setGoalTarget(this.c.getLastDamager());
- this.b = this.c.aJ();
+ this.b = this.c.aK();
if (this.a) {
double d0 = this.f();
List list = this.c.world.a(this.c.getClass(), AxisAlignedBB.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/src/main/java/net/minecraft/server/PathfinderGoalMakeLove.java b/src/main/java/net/minecraft/server/PathfinderGoalMakeLove.java
index e4e08175..f7bd8e82 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalMakeLove.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalMakeLove.java
@@ -17,7 +17,7 @@ public class PathfinderGoalMakeLove extends PathfinderGoal {
public boolean a() {
if (this.b.getAge() != 0) {
return false;
- } else if (this.b.aH().nextInt(500) != 0) {
+ } else if (this.b.aI().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 class PathfinderGoalMakeLove extends PathfinderGoal {
this.g();
}
- if (this.b.aH().nextInt(35) == 0) {
+ if (this.b.aI().nextInt(35) == 0) {
this.d.broadcastEntityEffect(this.b, (byte) 12);
}
}
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalMeleeAttack.java b/src/main/java/net/minecraft/server/PathfinderGoalMeleeAttack.java
index 6dd1cd50..be541f81 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalMeleeAttack.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalMeleeAttack.java
@@ -74,11 +74,11 @@ public class PathfinderGoalMeleeAttack extends PathfinderGoal {
double d1 = (double) (this.b.width * 2.0F * this.b.width * 2.0F + entityliving.width);
--this.h;
- if ((this.e || this.b.getEntitySenses().canSee(entityliving)) && this.h <= 0 && (this.i == 0.0D && this.j == 0.0D && this.k == 0.0D || entityliving.e(this.i, this.j, this.k) >= 1.0D || this.b.aH().nextFloat() < 0.05F)) {
+ if ((this.e || this.b.getEntitySenses().canSee(entityliving)) && this.h <= 0 && (this.i == 0.0D && this.j == 0.0D && this.k == 0.0D || entityliving.e(this.i, this.j, this.k) >= 1.0D || this.b.aI().nextFloat() < 0.05F)) {
this.i = entityliving.locX;
this.j = entityliving.boundingBox.b;
this.k = entityliving.locZ;
- this.h = 4 + this.b.aH().nextInt(7);
+ this.h = 4 + this.b.aI().nextInt(7);
if (d0 > 1024.0D) {
this.h += 10;
} else if (d0 > 256.0D) {
@@ -93,8 +93,8 @@ public class PathfinderGoalMeleeAttack extends PathfinderGoal {
this.c = Math.max(this.c - 1, 0);
if (d0 <= d1 && this.c <= 20) {
this.c = 20;
- if (this.b.bd() != null) {
- this.b.aZ();
+ if (this.b.be() != null) {
+ this.b.ba();
}
this.b.n(entityliving);
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalPanic.java b/src/main/java/net/minecraft/server/PathfinderGoalPanic.java
index 90574649..1b8608d0 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalPanic.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalPanic.java
@@ -37,7 +37,7 @@ public class PathfinderGoalPanic extends PathfinderGoal {
public boolean b() {
// CraftBukkit start - introduce a temporary timeout hack until this is fixed properly
- if ((this.a.ticksLived - this.a.aJ()) > 100) {
+ if ((this.a.ticksLived - this.a.aK()) > 100) {
this.a.b((EntityLiving) null);
return false;
}
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalSit.java b/src/main/java/net/minecraft/server/PathfinderGoalSit.java
index ca88feaf..60371bed 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalSit.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalSit.java
@@ -13,7 +13,7 @@ public class PathfinderGoalSit extends PathfinderGoal {
public boolean a() {
if (!this.entity.isTamed()) {
return this.willSit && this.entity.getGoalTarget() == null; // CraftBukkit - Allow sitting for wild animals
- } else if (this.entity.L()) {
+ } else if (this.entity.M()) {
return false;
} else if (!this.entity.onGround) {
return false;
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalTame.java b/src/main/java/net/minecraft/server/PathfinderGoalTame.java
index bf5c2d97..a13c6382 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalTame.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalTame.java
@@ -40,13 +40,13 @@ public class PathfinderGoalTame extends PathfinderGoal {
}
public void e() {
- if (this.entity.aH().nextInt(50) == 0) {
+ if (this.entity.aI().nextInt(50) == 0) {
if (this.entity.passenger instanceof EntityHuman) {
int i = this.entity.getTemper();
int j = this.entity.getMaxDomestication();
// CraftBukkit - fire EntityTameEvent
- if (j > 0 && this.entity.aH().nextInt(j) < i && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTameEvent(this.entity, (EntityHuman) this.entity.passenger).isCancelled() && this.entity.passenger instanceof EntityHuman) {
+ if (j > 0 && this.entity.aI().nextInt(j) < i && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTameEvent(this.entity, (EntityHuman) this.entity.passenger).isCancelled() && this.entity.passenger instanceof EntityHuman) {
this.entity.h((EntityHuman) this.entity.passenger);
this.entity.world.broadcastEntityEffect(this.entity, (byte) 7);
return;
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalTarget.java b/src/main/java/net/minecraft/server/PathfinderGoalTarget.java
index ebc19407..761fe6da 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalTarget.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalTarget.java
@@ -144,7 +144,7 @@ public abstract class PathfinderGoalTarget extends PathfinderGoal {
}
private boolean a(EntityLiving entityliving) {
- this.e = 10 + this.c.aH().nextInt(5);
+ this.e = 10 + this.c.aI().nextInt(5);
PathEntity pathentity = this.c.getNavigation().a(entityliving);
if (pathentity == null) {
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
index 3cd80660..f5afcb7e 100644
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
@@ -84,7 +84,7 @@ class PlayerChunk {
Chunk chunk = PlayerChunkMap.a(this.playerChunkMap).getChunkAt(this.location.x, this.location.z);
- if (chunk.k()) {
+ if (chunk.isReady()) {
entityplayer.playerConnection.sendPacket(new PacketPlayOutMapChunk(chunk, true, 0));
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index ec45c30a..c2400201 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -143,8 +143,9 @@ public class PlayerConnection implements PacketPlayInListener {
--this.x;
}
- this.minecraftServer.methodProfiler.c("playerTick");
- this.minecraftServer.methodProfiler.b();
+ if (this.player.x() > 0L && this.minecraftServer.getIdleTimeout() > 0 && MinecraftServer.ar() - this.player.x() > (long) (this.minecraftServer.getIdleTimeout() * 1000 * 60)) {
+ this.disconnect("You have been idle for too long!");
+ }
}
public NetworkManager b() {
@@ -267,7 +268,7 @@ public class PlayerConnection implements PacketPlayInListener {
float f = this.player.yaw;
float f1 = this.player.pitch;
- this.player.vehicle.ab();
+ this.player.vehicle.ac();
d1 = this.player.locX;
d2 = this.player.locY;
d3 = this.player.locZ;
@@ -281,7 +282,7 @@ public class PlayerConnection implements PacketPlayInListener {
this.player.V = 0.0F;
this.player.setLocation(d1, d2, d3, f, f1);
if (this.player.vehicle != null) {
- this.player.vehicle.ab();
+ this.player.vehicle.ac();
}
this.minecraftServer.getPlayerList().d(this.player);
@@ -367,7 +368,7 @@ public class PlayerConnection implements PacketPlayInListener {
boolean flag = worldserver.getCubes(this.player, this.player.boundingBox.clone().shrink((double) f4, (double) f4, (double) f4)).isEmpty();
if (this.player.onGround && !packetplayinflying.i() && d5 > 0.0D) {
- this.player.bi();
+ this.player.bj();
}
this.player.move(d4, d5, d6);
@@ -496,7 +497,7 @@ public class PlayerConnection implements PacketPlayInListener {
} else if (packetplayinblockdig.g() == 3) {
this.player.a(true);
} else if (packetplayinblockdig.g() == 5) {
- this.player.bz();
+ this.player.bA();
} else {
boolean flag = false;
@@ -672,7 +673,7 @@ public class PlayerConnection implements PacketPlayInListener {
if (itemstack == null || itemstack.n() == 0) {
this.player.g = true;
this.player.inventory.items[this.player.inventory.itemInHandIndex] = ItemStack.b(this.player.inventory.items[this.player.inventory.itemInHandIndex]);
- Slot slot = this.player.activeContainer.a((IInventory) this.player.inventory, this.player.inventory.itemInHandIndex);
+ Slot slot = this.player.activeContainer.getSlot((IInventory) this.player.inventory, this.player.inventory.itemInHandIndex);
this.player.activeContainer.b();
this.player.g = false;
@@ -999,7 +1000,7 @@ public class PlayerConnection implements PacketPlayInListener {
if (event.isCancelled()) return;
// CraftBukkit end
- this.player.aZ();
+ this.player.ba();
}
}
@@ -1054,7 +1055,7 @@ public class PlayerConnection implements PacketPlayInListener {
this.player.v();
if (entity != null) {
- boolean flag = this.player.p(entity);
+ boolean flag = this.player.hasLineOfSight(entity);
double d0 = 36.0D;
if (!flag) {
@@ -1335,7 +1336,7 @@ public class PlayerConnection implements PacketPlayInListener {
ItemStack cursor = this.player.inventory.getCarried();
action = InventoryAction.NOTHING;
// Quick check for if we have any of the item
- if (inventory.getTopInventory().contains(org.bukkit.Material.getMaterial(Item.b(cursor.getItem()))) || inventory.getBottomInventory().contains(org.bukkit.Material.getMaterial(Item.b(cursor.getItem())))) {
+ if (inventory.getTopInventory().contains(org.bukkit.Material.getMaterial(Item.getId(cursor.getItem()))) || inventory.getBottomInventory().contains(org.bukkit.Material.getMaterial(Item.getId(cursor.getItem())))) {
action = InventoryAction.COLLECT_TO_CURSOR;
}
}
@@ -1451,7 +1452,7 @@ public class PlayerConnection implements PacketPlayInListener {
public void a(PacketPlayInEnchantItem packetplayinenchantitem) {
this.player.v();
if (this.player.activeContainer.windowId == packetplayinenchantitem.c() && this.player.activeContainer.c(this.player)) {
- this.player.activeContainer.a((EntityHuman) this.player, packetplayinenchantitem.d());
+ this.player.activeContainer.a(this.player, packetplayinenchantitem.d());
this.player.activeContainer.b();
}
}
@@ -1462,7 +1463,7 @@ public class PlayerConnection implements PacketPlayInListener {
ItemStack itemstack = packetplayinsetcreativeslot.getItemStack();
boolean flag1 = packetplayinsetcreativeslot.c() >= 1 && packetplayinsetcreativeslot.c() < 36 + PlayerInventory.getHotbarSize();
// CraftBukkit - Add invalidItems check
- boolean flag2 = itemstack == null || itemstack.getItem() != null && !invalidItems.contains(Item.b(itemstack.getItem()));
+ boolean flag2 = itemstack == null || itemstack.getItem() != null && !invalidItems.contains(Item.getId(itemstack.getItem()));
boolean flag3 = itemstack == null || itemstack.getData() >= 0 && itemstack.count <= 64 && itemstack.count > 0;
// CraftBukkit start - Call click event
@@ -1657,18 +1658,18 @@ public class PlayerConnection implements PacketPlayInListener {
try {
itemstack = packetdataserializer.c();
- if (itemstack == null) {
- return;
- }
+ if (itemstack != null) {
+ if (!ItemBookAndQuill.a(itemstack.getTag())) {
+ throw new IOException("Invalid book tag!");
+ }
- if (!ItemBookAndQuill.a(itemstack.getTag())) {
- throw new IOException("Invalid book tag!");
- }
+ itemstack1 = this.player.inventory.getItemInHand();
+ if (itemstack1 == null) {
+ return;
+ }
- itemstack1 = this.player.inventory.getItemInHand();
- if (itemstack1 != null) {
if (itemstack.getItem() == Items.BOOK_AND_QUILL && itemstack.getItem() == itemstack1.getItem()) {
- CraftEventFactory.handleEditBookEvent(player, itemstack); // CraftBukkit
+ CraftEventFactory.handleEditBookEvent(player, itemstack); // CraftBukkit
}
return;
@@ -1749,20 +1750,20 @@ public class PlayerConnection implements PacketPlayInListener {
TileEntity tileentity = this.player.world.getTileEntity(packetdataserializer.readInt(), packetdataserializer.readInt(), packetdataserializer.readInt());
if (tileentity instanceof TileEntityCommand) {
- commandblocklistenerabstract = ((TileEntityCommand) tileentity).a();
+ commandblocklistenerabstract = ((TileEntityCommand) tileentity).getCommandBlock();
}
} else if (b0 == 1) {
Entity entity = this.player.world.getEntity(packetdataserializer.readInt());
if (entity instanceof EntityMinecartCommandBlock) {
- commandblocklistenerabstract = ((EntityMinecartCommandBlock) entity).e();
+ commandblocklistenerabstract = ((EntityMinecartCommandBlock) entity).getCommandBlock();
}
}
String s = packetdataserializer.c(packetdataserializer.readableBytes());
if (commandblocklistenerabstract != null) {
- commandblocklistenerabstract.a(s);
+ commandblocklistenerabstract.setCommand(s);
commandblocklistenerabstract.e();
this.player.sendMessage(new ChatMessage("advMode.setCommand.success", new Object[] { s}));
}
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
index 2db45ad4..7607155f 100644
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
@@ -245,7 +245,7 @@ public class PlayerInteractManager {
event.setCancelled(this.gamemode.isAdventure() && !this.player.d(i, j, k));
// Sword + Creative mode pre-cancel
- event.setCancelled(event.isCancelled() || (this.gamemode.d() && this.player.bd() != null && this.player.bd().getItem() instanceof ItemSword));
+ event.setCancelled(event.isCancelled() || (this.gamemode.d() && this.player.be() != null && this.player.be().getItem() instanceof ItemSword));
// Calculate default block experience
Block nmsBlock = this.world.getType(i, j, k);
@@ -277,7 +277,7 @@ public class PlayerInteractManager {
if (false && this.gamemode.isAdventure() && !this.player.d(i, j, k)) { // Never trigger
// CraftBukkit end
return false;
- } else if (false && this.gamemode.d() && this.player.bd() != null && this.player.bd().getItem() instanceof ItemSword) { // CraftBukkit - never trigger
+ } else if (false && this.gamemode.d() && this.player.be() != null && this.player.be().getItem() instanceof ItemSword) { // CraftBukkit - never trigger
return false;
} else {
Block block = this.world.getType(i, j, k);
@@ -291,19 +291,19 @@ public class PlayerInteractManager {
}
// CraftBukkit end
- this.world.a(this.player, 2001, i, j, k, Block.b(block) + (this.world.getData(i, j, k) << 12));
+ this.world.a(this.player, 2001, i, j, k, Block.getId(block) + (this.world.getData(i, j, k) << 12));
boolean flag = this.d(i, j, k);
if (this.isCreative()) {
this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(i, j, k, this.world));
} else {
- ItemStack itemstack = this.player.bE();
+ ItemStack itemstack = this.player.bF();
boolean flag1 = this.player.a(block);
if (itemstack != null) {
itemstack.a(this.world, block, i, j, k, this.player);
if (itemstack.count == 0) {
- this.player.bF();
+ this.player.bG();
}
}
@@ -342,7 +342,7 @@ public class PlayerInteractManager {
entityhuman.inventory.items[entityhuman.inventory.itemInHandIndex] = null;
}
- if (!entityhuman.bx()) {
+ if (!entityhuman.by()) {
((EntityPlayer) entityhuman).updateInventory(entityhuman.defaultContainer);
}
@@ -352,7 +352,7 @@ public class PlayerInteractManager {
public boolean interact(EntityHuman entityhuman, World world, ItemStack itemstack, int i, int j, int k, int l, float f, float f1, float f2) {
/* CraftBukkit start - whole method
- if ((!entityhuman.isSneaking() || entityhuman.bd() == null) && world.getType(i, j, k).interact(world, i, j, k, entityhuman, l, f, f1, f2)) {
+ if ((!entityhuman.isSneaking() || entityhuman.be() == null) && world.getType(i, j, k).interact(world, i, j, k, entityhuman, l, f, f1, f2)) {
return true;
} else if (itemstack == null) {
return false;
diff --git a/src/main/java/net/minecraft/server/PlayerInventory.java b/src/main/java/net/minecraft/server/PlayerInventory.java
index e9b49d1e..5cd6e14f 100644
--- a/src/main/java/net/minecraft/server/PlayerInventory.java
+++ b/src/main/java/net/minecraft/server/PlayerInventory.java
@@ -264,7 +264,7 @@ public class PlayerInventory implements IInventory {
CrashReport crashreport = CrashReport.a(throwable, "Adding item to inventory");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Item being added");
- crashreportsystemdetails.a("Item ID", Integer.valueOf(Item.b(itemstack.getItem())));
+ crashreportsystemdetails.a("Item ID", Integer.valueOf(Item.getId(itemstack.getItem())));
crashreportsystemdetails.a("Item data", Integer.valueOf(itemstack.getData()));
crashreportsystemdetails.a("Item name", (Callable) (new CrashReportItemName(this, itemstack)));
throw new ReportedException(crashreport);
@@ -517,7 +517,7 @@ public class PlayerInventory implements IInventory {
public void startOpen() {}
- public void l_() {}
+ public void closeContainer() {}
public boolean b(int i, ItemStack itemstack) {
return true;
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 1dbce5c5..e6012fba 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -121,7 +121,7 @@ public abstract class PlayerList {
playerconnection.sendPacket(new PacketPlayOutHeldItemSlot(entityplayer.inventory.itemInHandIndex));
entityplayer.getStatisticManager().d();
entityplayer.getStatisticManager().updateStatistics(entityplayer);
- this.a((ScoreboardServer) worldserver.getScoreboard(), entityplayer);
+ this.sendScoreboard((ScoreboardServer) worldserver.getScoreboard(), entityplayer);
this.server.az();
/* CraftBukkit start - login message is handled in the event
ChatMessage chatmessage;
@@ -156,10 +156,10 @@ public abstract class PlayerList {
Entity entity = EntityTypes.a(nbttagcompound.getCompound("Riding"), worldserver);
if (entity != null) {
- entity.n = true;
+ entity.attachedToPlayer = true;
worldserver.addEntity(entity);
entityplayer.mount(entity);
- entity.n = false;
+ entity.attachedToPlayer = false;
}
}
@@ -167,7 +167,7 @@ public abstract class PlayerList {
g.info(entityplayer.getName() + "[" + s1 + "] logged in with entity id " + entityplayer.getId() + " at ([" + entityplayer.world.worldData.getName() + "] " + entityplayer.locX + ", " + entityplayer.locY + ", " + entityplayer.locZ + ")");
}
- public void a(ScoreboardServer scoreboardserver, EntityPlayer entityplayer) { // CraftBukkit - protected -> public
+ public void sendScoreboard(ScoreboardServer scoreboardserver, EntityPlayer entityplayer) { // CraftBukkit - protected -> public
HashSet hashset = new HashSet();
Iterator iterator = scoreboardserver.getTeams().iterator();
@@ -353,7 +353,7 @@ public abstract class PlayerList {
PlayerLoginEvent event = new PlayerLoginEvent(player, hostname, ((java.net.InetSocketAddress) socketaddress).getAddress());
String s;
- if (this.j.isBanned(gameprofile) && !this.j.get(gameprofile).e()) { // Should be hasExpired
+ if (this.j.isBanned(gameprofile) && !this.j.get(gameprofile).hasExpired()) {
GameProfileBanEntry gameprofilebanentry = (GameProfileBanEntry) this.j.get(gameprofile);
s = "You are banned from this server!\nReason: " + gameprofilebanentry.getReason();
@@ -366,7 +366,7 @@ public abstract class PlayerList {
} else if (!this.isWhitelisted(gameprofile)) {
// return "You are not white-listed on this server!";
event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, "You are not white-listed on this server!");
- } else if (this.k.isBanned(socketaddress) && !this.j.get(gameprofile).e()) { // Should be hasExpired
+ } else if (this.k.isBanned(socketaddress) && !this.k.get(gameprofile).hasExpired()) {
IpBanEntry ipbanentry = this.k.get(socketaddress);
s = "Your IP address is banned from this server!\nReason: " + ipbanentry.getReason();
@@ -952,7 +952,7 @@ public abstract class PlayerList {
}
}
- if (this.a((EntityHuman) entityplayer, map) && (l == EnumGamemode.NONE.a() || l == entityplayer.playerInteractManager.getGameMode().a()) && (i1 <= 0 || entityplayer.expLevel >= i1) && entityplayer.expLevel <= j1) {
+ if (this.a((EntityHuman) entityplayer, map) && (l == EnumGamemode.NONE.getId() || l == entityplayer.playerInteractManager.getGameMode().getId()) && (i1 <= 0 || entityplayer.expLevel >= i1) && entityplayer.expLevel <= j1) {
((List) object).add(entityplayer);
}
}
diff --git a/src/main/java/net/minecraft/server/PlayerSelector.java b/src/main/java/net/minecraft/server/PlayerSelector.java
index e7615d3d..819a1333 100644
--- a/src/main/java/net/minecraft/server/PlayerSelector.java
+++ b/src/main/java/net/minecraft/server/PlayerSelector.java
@@ -49,7 +49,7 @@ public class PlayerSelector {
int k = f(s1);
int l = e(s1);
int i1 = g(s1);
- int j1 = EnumGamemode.NONE.a();
+ int j1 = EnumGamemode.NONE.getId();
ChunkCoordinates chunkcoordinates = icommandlistener.getChunkCoordinates();
Map map1 = a(map);
String s2 = null;
diff --git a/src/main/java/net/minecraft/server/PortalTravelAgent.java b/src/main/java/net/minecraft/server/PortalTravelAgent.java
index 140d1faa..70e6e81d 100644
--- a/src/main/java/net/minecraft/server/PortalTravelAgent.java
+++ b/src/main/java/net/minecraft/server/PortalTravelAgent.java
@@ -215,7 +215,7 @@ public class PortalTravelAgent {
j2 = 1;
}
- int k2 = entity.ax();
+ int k2 = entity.ay();
if (j2 > -1) {
int l2 = Direction.h[j2];
diff --git a/src/main/java/net/minecraft/server/PropertyManager.java b/src/main/java/net/minecraft/server/PropertyManager.java
index bb535c2f..c6cd6fb6 100644
--- a/src/main/java/net/minecraft/server/PropertyManager.java
+++ b/src/main/java/net/minecraft/server/PropertyManager.java
@@ -124,7 +124,7 @@ public class PropertyManager {
}
}
- public void a(String s, Object object) {
+ public void setProperty(String s, Object object) {
this.properties.setProperty(s, "" + object);
}
}
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index 2ef15d2a..1dfc3460 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -157,7 +157,7 @@ public final class SpawnerCreature {
if (entityinsentient.canSpawn()) {
++j2;
// CraftBukkit start - Added a reason for spawning this creature, moved entityinsentient.a(groupdataentity) up
- groupdataentity = entityinsentient.a(groupdataentity);
+ groupdataentity = entityinsentient.prepare(groupdataentity);
worldserver.addEntity(entityinsentient, SpawnReason.NATURAL);
// CraftBukkit end
if (j2 >= entityinsentient.bB()) {
@@ -236,7 +236,7 @@ public final class SpawnerCreature {
entityinsentient.setPositionRotation((double) f, (double) f1, (double) f2, random.nextFloat() * 360.0F, 0.0F);
// CraftBukkit start - Added a reason for spawning this creature, moved entityinsentient.a(groupdataentity) up
- groupdataentity = entityinsentient.a(groupdataentity);
+ groupdataentity = entityinsentient.prepare(groupdataentity);
world.addEntity(entityinsentient, SpawnReason.CHUNK_GEN);
// CraftBukkit end
flag = true;
diff --git a/src/main/java/net/minecraft/server/StatisticManager.java b/src/main/java/net/minecraft/server/StatisticManager.java
index e86e21b1..d41dc4dd 100644
--- a/src/main/java/net/minecraft/server/StatisticManager.java
+++ b/src/main/java/net/minecraft/server/StatisticManager.java
@@ -11,12 +11,12 @@ public class StatisticManager {
public StatisticManager() {
}
- public boolean a(Achievement achievement) {
+ public boolean hasAchievement(Achievement achievement) {
return this.getStatisticValue((Statistic) achievement) > 0;
}
public boolean b(Achievement achievement) {
- return achievement.c == null || this.a(achievement.c);
+ return achievement.c == null || this.hasAchievement(achievement.c);
}
public void b(EntityHuman entityhuman, Statistic statistic, int i) {
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 2a3d647c..b2de58b5 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -101,7 +101,7 @@ public class TileEntity {
this.g = this.world.getData(this.x, this.y, this.z);
this.world.b(this.x, this.y, this.z, this);
if (this.q() != Blocks.AIR) {
- this.world.f(this.x, this.y, this.z, this.q());
+ this.world.updateAdjacentComparators(this.x, this.y, this.z, this.q());
}
}
}
diff --git a/src/main/java/net/minecraft/server/TileEntityBeacon.java b/src/main/java/net/minecraft/server/TileEntityBeacon.java
index fbc7874f..09313eae 100644
--- a/src/main/java/net/minecraft/server/TileEntityBeacon.java
+++ b/src/main/java/net/minecraft/server/TileEntityBeacon.java
@@ -268,7 +268,7 @@ public class TileEntityBeacon extends TileEntity implements IInventory {
public void startOpen() {}
- public void l_() {}
+ public void closeContainer() {}
public boolean b(int i, ItemStack itemstack) {
return itemstack.getItem() == Items.EMERALD || itemstack.getItem() == Items.DIAMOND || itemstack.getItem() == Items.GOLD_INGOT || itemstack.getItem() == Items.IRON_INGOT;
diff --git a/src/main/java/net/minecraft/server/TileEntityBrewingStand.java b/src/main/java/net/minecraft/server/TileEntityBrewingStand.java
index 73869f37..c0ca4a49 100644
--- a/src/main/java/net/minecraft/server/TileEntityBrewingStand.java
+++ b/src/main/java/net/minecraft/server/TileEntityBrewingStand.java
@@ -265,7 +265,7 @@ public class TileEntityBrewingStand extends TileEntity implements IWorldInventor
public void startOpen() {}
- public void l_() {}
+ public void closeContainer() {}
public boolean b(int i, ItemStack itemstack) {
return i == 3 ? itemstack.getItem().m(itemstack) : itemstack.getItem() == Items.POTION || itemstack.getItem() == Items.GLASS_BOTTLE;
diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java
index 4f45dba3..c900cafb 100644
--- a/src/main/java/net/minecraft/server/TileEntityChest.java
+++ b/src/main/java/net/minecraft/server/TileEntityChest.java
@@ -347,7 +347,7 @@ public class TileEntityChest extends TileEntity implements IInventory {
++this.o;
if (this.world == null) return; // CraftBukkit
- this.world.playNote(this.x, this.y, this.z, this.q(), 1, this.o);
+ this.world.playBlockAction(this.x, this.y, this.z, this.q(), 1, this.o);
// CraftBukkit start - Call redstone event
if (this.q() == Blocks.TRAPPED_CHEST) {
@@ -363,13 +363,13 @@ public class TileEntityChest extends TileEntity implements IInventory {
this.world.applyPhysics(this.x, this.y - 1, this.z, this.q());
}
- public void l_() {
+ public void closeContainer() {
if (this.q() instanceof BlockChest) {
int oldPower = Math.max(0, Math.min(15, this.o)); // CraftBukkit - Get power before new viewer is added
--this.o;
if (this.world == null) return; // CraftBukkit
- this.world.playNote(this.x, this.y, this.z, this.q(), 1, this.o);
+ this.world.playBlockAction(this.x, this.y, this.z, this.q(), 1, this.o);
// CraftBukkit start - Call redstone event
if (this.q() == Blocks.TRAPPED_CHEST) {
diff --git a/src/main/java/net/minecraft/server/TileEntityCommandListener.java b/src/main/java/net/minecraft/server/TileEntityCommandListener.java
index 8a5f92e3..45cefdac 100644
--- a/src/main/java/net/minecraft/server/TileEntityCommandListener.java
+++ b/src/main/java/net/minecraft/server/TileEntityCommandListener.java
@@ -18,8 +18,8 @@ public class TileEntityCommandListener extends CommandBlockListenerAbstract {
return this.a.getWorld();
}
- public void a(String s) {
- super.a(s);
+ public void setCommand(String s) {
+ super.setCommand(s);
this.a.update();
}
diff --git a/src/main/java/net/minecraft/server/TileEntityDispenser.java b/src/main/java/net/minecraft/server/TileEntityDispenser.java
index 81204b66..7900b37e 100644
--- a/src/main/java/net/minecraft/server/TileEntityDispenser.java
+++ b/src/main/java/net/minecraft/server/TileEntityDispenser.java
@@ -180,7 +180,7 @@ public class TileEntityDispenser extends TileEntity implements IInventory {
public void startOpen() {}
- public void l_() {}
+ public void closeContainer() {}
public boolean b(int i, ItemStack itemstack) {
return true;
diff --git a/src/main/java/net/minecraft/server/TileEntityFurnace.java b/src/main/java/net/minecraft/server/TileEntityFurnace.java
index 8f8771cc..430fc69c 100644
--- a/src/main/java/net/minecraft/server/TileEntityFurnace.java
+++ b/src/main/java/net/minecraft/server/TileEntityFurnace.java
@@ -323,7 +323,7 @@ public class TileEntityFurnace extends TileEntity implements IWorldInventory {
public void startOpen() {}
- public void l_() {}
+ public void closeContainer() {}
public boolean b(int i, ItemStack itemstack) {
return i == 2 ? false : (i == 1 ? isFuel(itemstack) : true);
diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java
index 48a882ac..ebdf08e7 100644
--- a/src/main/java/net/minecraft/server/TileEntityHopper.java
+++ b/src/main/java/net/minecraft/server/TileEntityHopper.java
@@ -159,7 +159,7 @@ public class TileEntityHopper extends TileEntity implements IHopper {
public void startOpen() {}
- public void l_() {}
+ public void closeContainer() {}
public boolean b(int i, ItemStack itemstack) {
return true;
@@ -181,7 +181,7 @@ public class TileEntityHopper extends TileEntity implements IHopper {
boolean flag = false;
if (!this.k()) {
- flag = this.x();
+ flag = this.y();
}
if (!this.l()) {
@@ -231,8 +231,8 @@ public class TileEntityHopper extends TileEntity implements IHopper {
return true;
}
- private boolean x() {
- IInventory iinventory = this.y();
+ private boolean y() {
+ IInventory iinventory = this.z();
if (iinventory == null) {
return false;
@@ -363,7 +363,7 @@ public class TileEntityHopper extends TileEntity implements IHopper {
}
}
} else {
- EntityItem entityitem = getEntityItemAt(ihopper.getWorld(), ihopper.aC(), ihopper.aD() + 1.0D, ihopper.aE());
+ EntityItem entityitem = getEntityItemAt(ihopper.getWorld(), ihopper.x(), ihopper.aD() + 1.0D, ihopper.aE());
if (entityitem != null) {
return addEntityItem(ihopper, entityitem);
@@ -513,14 +513,14 @@ public class TileEntityHopper extends TileEntity implements IHopper {
return itemstack;
}
- private IInventory y() {
+ private IInventory z() {
int i = BlockHopper.b(this.p());
return getInventoryAt(this.getWorld(), (double) (this.x + Facing.b[i]), (double) (this.y + Facing.c[i]), (double) (this.z + Facing.d[i]));
}
public static IInventory getSourceInventory(IHopper ihopper) {
- return getInventoryAt(ihopper.getWorld(), ihopper.aC(), ihopper.aD() + 1.0D, ihopper.aE());
+ return getInventoryAt(ihopper.getWorld(), ihopper.x(), ihopper.aD() + 1.0D, ihopper.aE());
}
public static EntityItem getEntityItemAt(World world, double d0, double d1, double d2) {
@@ -562,7 +562,7 @@ public class TileEntityHopper extends TileEntity implements IHopper {
return itemstack.getItem() != itemstack1.getItem() ? false : (itemstack.getData() != itemstack1.getData() ? false : (itemstack.count > itemstack.getMaxStackSize() ? false : ItemStack.equals(itemstack, itemstack1)));
}
- public double aC() {
+ public double x() {
return (double) this.x;
}
diff --git a/src/main/java/net/minecraft/server/TileEntityNote.java b/src/main/java/net/minecraft/server/TileEntityNote.java
index b4292862..aa020389 100644
--- a/src/main/java/net/minecraft/server/TileEntityNote.java
+++ b/src/main/java/net/minecraft/server/TileEntityNote.java
@@ -53,7 +53,7 @@ public class TileEntityNote extends TileEntity {
// CraftBukkit start
org.bukkit.event.block.NotePlayEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callNotePlayEvent(this.world, i, j, k, b0, this.note);
if (!event.isCancelled()) {
- this.world.playNote(i, j, k, Blocks.NOTE_BLOCK, event.getInstrument().getType(), event.getNote().getId());
+ this.world.playBlockAction(i, j, k, Blocks.NOTE_BLOCK, event.getInstrument().getType(), event.getNote().getId());
}
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/server/TileEntityPiston.java b/src/main/java/net/minecraft/server/TileEntityPiston.java
index 3e5e8f08..69fe247b 100644
--- a/src/main/java/net/minecraft/server/TileEntityPiston.java
+++ b/src/main/java/net/minecraft/server/TileEntityPiston.java
@@ -114,7 +114,7 @@ public class TileEntityPiston extends TileEntity {
public void a(NBTTagCompound nbttagcompound) {
super.a(nbttagcompound);
- this.a = Block.e(nbttagcompound.getInt("blockId"));
+ this.a = Block.getById(nbttagcompound.getInt("blockId"));
this.i = nbttagcompound.getInt("blockData");
this.j = nbttagcompound.getInt("facing");
this.n = this.m = nbttagcompound.getFloat("progress");
@@ -123,7 +123,7 @@ public class TileEntityPiston extends TileEntity {
public void b(NBTTagCompound nbttagcompound) {
super.b(nbttagcompound);
- nbttagcompound.setInt("blockId", Block.b(this.a));
+ nbttagcompound.setInt("blockId", Block.getId(this.a));
nbttagcompound.setInt("blockData", this.i);
nbttagcompound.setInt("facing", this.j);
nbttagcompound.setFloat("progress", this.n);
diff --git a/src/main/java/net/minecraft/server/TileEntityRecordPlayer.java b/src/main/java/net/minecraft/server/TileEntityRecordPlayer.java
index d668b1c0..8abeac49 100644
--- a/src/main/java/net/minecraft/server/TileEntityRecordPlayer.java
+++ b/src/main/java/net/minecraft/server/TileEntityRecordPlayer.java
@@ -11,7 +11,7 @@ public class TileEntityRecordPlayer extends TileEntity {
if (nbttagcompound.hasKeyOfType("RecordItem", 10)) {
this.setRecord(ItemStack.createStack(nbttagcompound.getCompound("RecordItem")));
} else if (nbttagcompound.getInt("Record") > 0) {
- this.setRecord(new ItemStack(Item.d(nbttagcompound.getInt("Record")), 1, 0));
+ this.setRecord(new ItemStack(Item.getById(nbttagcompound.getInt("Record")), 1, 0));
}
}
@@ -19,7 +19,7 @@ public class TileEntityRecordPlayer extends TileEntity {
super.b(nbttagcompound);
if (this.getRecord() != null) {
nbttagcompound.set("RecordItem", this.getRecord().save(new NBTTagCompound()));
- nbttagcompound.setInt("Record", Item.b(this.getRecord().getItem()));
+ nbttagcompound.setInt("Record", Item.getId(this.getRecord().getItem()));
}
}
diff --git a/src/main/java/net/minecraft/server/TileEntitySkull.java b/src/main/java/net/minecraft/server/TileEntitySkull.java
index 748f00a6..7c3757fb 100644
--- a/src/main/java/net/minecraft/server/TileEntitySkull.java
+++ b/src/main/java/net/minecraft/server/TileEntitySkull.java
@@ -21,7 +21,7 @@ public class TileEntitySkull extends TileEntity {
if (this.j != null) {
NBTTagCompound nbttagcompound1 = new NBTTagCompound();
- GameProfileSerializer.a(nbttagcompound1, this.j);
+ GameProfileSerializer.serialize(nbttagcompound1, this.j);
nbttagcompound.set("Owner", nbttagcompound1);
}
}
@@ -32,7 +32,7 @@ public class TileEntitySkull extends TileEntity {
this.i = nbttagcompound.getByte("Rot");
if (this.a == 3) {
if (nbttagcompound.hasKeyOfType("Owner", 10)) {
- this.j = GameProfileSerializer.a(nbttagcompound.getCompound("Owner"));
+ this.j = GameProfileSerializer.deserialize(nbttagcompound.getCompound("Owner"));
} else if (nbttagcompound.hasKeyOfType("ExtraType", 8) && !UtilColor.b(nbttagcompound.getString("ExtraType"))) {
this.j = new GameProfile((UUID) null, nbttagcompound.getString("ExtraType"));
this.d();
@@ -65,7 +65,7 @@ public class TileEntitySkull extends TileEntity {
private void d() {
if (this.j != null && !UtilColor.b(this.j.getName())) {
if (!this.j.isComplete() || !this.j.getProperties().containsKey("textures")) {
- GameProfile gameprofile = MinecraftServer.getServer().getUserCache().a(this.j.getName());
+ GameProfile gameprofile = MinecraftServer.getServer().getUserCache().getProfile(this.j.getName());
if (gameprofile != null) {
Property property = (Property) Iterables.getFirst(gameprofile.getProperties().get("textures"), null);
diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java
index fc83932b..93e1a1ed 100644
--- a/src/main/java/net/minecraft/server/VillageSiege.java
+++ b/src/main/java/net/minecraft/server/VillageSiege.java
@@ -139,7 +139,7 @@ public class VillageSiege {
try {
entityzombie = new EntityZombie(this.world);
- entityzombie.a((GroupDataEntity) null);
+ entityzombie.prepare((GroupDataEntity) null);
entityzombie.setVillager(false);
} catch (Exception exception) {
exception.printStackTrace();
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index eb5da2af..08c506ce 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -84,7 +84,7 @@ public abstract class World implements IBlockAccess {
Chunk chunk = this.getChunkAtWorldCoords(i, j);
try {
- return chunk.a(i & 15, j & 15, this.worldProvider.e);
+ return chunk.getBiome(i & 15, j & 15, this.worldProvider.e);
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Getting biome");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Coordinates of biome request");
@@ -349,14 +349,14 @@ public abstract class World implements IBlockAccess {
public void notifyAndUpdatePhysics(int i, int j, int k, Chunk chunk, Block oldBlock, Block newBlock, int flag)
{
// should be isReady()
- if ((flag & 2) != 0 && (chunk == null || chunk.k())) { // allow chunk to be null here as chunk.k() is false when we send our notification during block placement
+ if ((flag & 2) != 0 && (chunk == null || chunk.isReady())) { // allow chunk to be null here as chunk.isReady() is false when we send our notification during block placement
this.notify(i, j, k);
}
if ((flag & 1) != 0) {
this.update(i, j, k, oldBlock);
- if (newBlock.M()) { // should be isComplexRedstone()
- this.f(i, j, k, newBlock); // should be updateAdjacentComparators
+ if (newBlock.isComplexRedstone()) {
+ this.updateAdjacentComparators(i, j, k, newBlock);
}
}
}
@@ -426,14 +426,14 @@ public abstract class World implements IBlockAccess {
if (flag) {
Block block = chunk.getType(j1, j, k1);
- if ((i1 & 2) != 0 && (!this.isStatic || (i1 & 4) == 0) && chunk.k()) {
+ if ((i1 & 2) != 0 && (!this.isStatic || (i1 & 4) == 0) && chunk.isReady()) {
this.notify(i, j, k);
}
if (!this.isStatic && (i1 & 1) != 0) {
this.update(i, j, k, block);
- if (block.M()) {
- this.f(i, j, k, block);
+ if (block.isComplexRedstone()) {
+ this.updateAdjacentComparators(i, j, k, block);
}
}
}
@@ -457,7 +457,7 @@ public abstract class World implements IBlockAccess {
} else {
int l = this.getData(i, j, k);
- this.triggerEffect(2001, i, j, k, Block.b(block) + (l << 12));
+ this.triggerEffect(2001, i, j, k, Block.getId(block) + (l << 12));
if (flag) {
block.b(this, i, j, k, l, 0);
}
@@ -953,7 +953,7 @@ public abstract class World implements IBlockAccess {
int i = MathHelper.floor(entity.locX / 16.0D);
int j = MathHelper.floor(entity.locZ / 16.0D);
- boolean flag = entity.n;
+ boolean flag = entity.attachedToPlayer;
if (entity instanceof EntityHuman) {
flag = true;
@@ -995,6 +995,7 @@ public abstract class World implements IBlockAccess {
this.players.add(entityhuman);
this.everyoneSleeping();
+ this.b(entity);
}
this.getChunkAt(i, j).a(entity);
@@ -1098,7 +1099,7 @@ public abstract class World implements IBlockAccess {
List list = this.getEntities(entity, axisalignedbb.grow(d0, d0, d0));
for (int j2 = 0; j2 < list.size(); ++j2) {
- AxisAlignedBB axisalignedbb1 = ((Entity) list.get(j2)).I();
+ AxisAlignedBB axisalignedbb1 = ((Entity) list.get(j2)).J();
if (axisalignedbb1 != null && axisalignedbb1.b(axisalignedbb)) {
this.L.add(axisalignedbb1);
@@ -1412,7 +1413,7 @@ public abstract class World implements IBlockAccess {
if (flag && entity.ag) {
++entity.ticksLived;
if (entity.vehicle != null) {
- entity.aa();
+ entity.ab();
} else {
entity.h();
}
@@ -1612,7 +1613,7 @@ public abstract class World implements IBlockAccess {
}
}
- if (vec3d.b() > 0.0D && entity.aB()) {
+ if (vec3d.b() > 0.0D && entity.aC()) {
vec3d = vec3d.a();
double d1 = 0.014D;
@@ -2579,7 +2580,7 @@ public abstract class World implements IBlockAccess {
}
if (entityhuman1.isInvisible()) {
- float f = entityhuman1.bD();
+ float f = entityhuman1.bE();
if (f < 0.1F) {
f = 0.1F;
@@ -2660,7 +2661,7 @@ public abstract class World implements IBlockAccess {
return this.chunkProvider;
}
- public void playNote(int i, int j, int k, Block block, int l, int i1) {
+ public void playBlockAction(int i, int j, int k, Block block, int l, int i1) {
block.a(this, i, j, k, l, i1);
}
@@ -2818,7 +2819,7 @@ public abstract class World implements IBlockAccess {
return this.scoreboard;
}
- public void f(int i, int j, int k, Block block) {
+ public void updateAdjacentComparators(int i, int j, int k, Block block) {
for (int l = 0; l < 4; ++l) {
int i1 = i + Direction.a[l];
int j1 = k + Direction.b[l];
diff --git a/src/main/java/net/minecraft/server/WorldGenBigTree.java b/src/main/java/net/minecraft/server/WorldGenBigTree.java
index d81845dd..1f8f1a98 100644
--- a/src/main/java/net/minecraft/server/WorldGenBigTree.java
+++ b/src/main/java/net/minecraft/server/WorldGenBigTree.java
@@ -347,7 +347,7 @@ public class WorldGenBigTree extends WorldGenTreeAbstract {
this.k = d2;
}
- public boolean a(World world, Random random, int i, int j, int k) {
+ public boolean generate(World world, Random random, int i, int j, int k) {
this.world = world;
long l = random.nextLong();
diff --git a/src/main/java/net/minecraft/server/WorldGenWitchHut.java b/src/main/java/net/minecraft/server/WorldGenWitchHut.java
index a49a91a8..ae60aeb8 100644
--- a/src/main/java/net/minecraft/server/WorldGenWitchHut.java
+++ b/src/main/java/net/minecraft/server/WorldGenWitchHut.java
@@ -76,7 +76,7 @@ public class WorldGenWitchHut extends WorldGenScatteredPiece {
EntityWitch entitywitch = new EntityWitch(world);
entitywitch.setPositionRotation((double) i1 + 0.5D, (double) j1, (double) k1 + 0.5D, 0.0F, 0.0F);
- entitywitch.a((GroupDataEntity) null);
+ entitywitch.prepare((GroupDataEntity) null);
world.addEntity(entitywitch, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CHUNK_GEN); // CraftBukkit - add SpawnReason
}
}
diff --git a/src/main/java/net/minecraft/server/WorldMap.java b/src/main/java/net/minecraft/server/WorldMap.java
index d21b4a5c..bd5cfca8 100644
--- a/src/main/java/net/minecraft/server/WorldMap.java
+++ b/src/main/java/net/minecraft/server/WorldMap.java
@@ -23,7 +23,7 @@ public class WorldMap extends PersistentBase {
public byte[] colors = new byte[16384];
public List f = new ArrayList();
private Map i = new HashMap();
- public Map g = new LinkedHashMap();
+ public Map decorations = new LinkedHashMap();
// CraftBukkit start
public final CraftMapView mapView;
@@ -141,7 +141,7 @@ public class WorldMap extends PersistentBase {
}
if (!entityhuman.inventory.c(itemstack)) {
- this.g.remove(entityhuman.getName());
+ this.decorations.remove(entityhuman.getName());
}
for (int i = 0; i < this.f.size(); ++i) {
@@ -181,7 +181,7 @@ public class WorldMap extends PersistentBase {
}
} else {
if (Math.abs(f) >= 320.0F || Math.abs(f1) >= 320.0F) {
- this.g.remove(s);
+ this.decorations.remove(s);
return;
}
@@ -204,7 +204,7 @@ public class WorldMap extends PersistentBase {
}
}
- this.g.put(s, new WorldMapDecoration(this, (byte) i, b0, b1, b3));
+ this.decorations.put(s, new WorldMapDecoration(this, (byte) i, b0, b1, b3));
}
public byte[] getUpdatePacket(ItemStack itemstack, World world, EntityHuman entityhuman) {
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 3fa3a819..ba7965db 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -38,7 +38,7 @@ public class WorldServer extends World {
private int emptyTime;
private final PortalTravelAgent Q;
private final SpawnerCreature R = new SpawnerCreature();
- private NoteDataList[] S = new NoteDataList[] { new NoteDataList((EmptyClass2) null), new NoteDataList((EmptyClass2) null)};
+ private BlockActionDataList[] S = new BlockActionDataList[] { new BlockActionDataList((BananaAPI) null), new BlockActionDataList((BananaAPI) null)};
private int T;
private static final StructurePieceTreasure[] U = new StructurePieceTreasure[] { new StructurePieceTreasure(Items.STICK, 0, 1, 3, 10), new StructurePieceTreasure(Item.getItemOf(Blocks.WOOD), 0, 1, 3, 10), new StructurePieceTreasure(Item.getItemOf(Blocks.LOG), 0, 1, 3, 10), new StructurePieceTreasure(Items.STONE_AXE, 0, 1, 1, 3), new StructurePieceTreasure(Items.WOOD_AXE, 0, 1, 1, 5), new StructurePieceTreasure(Items.STONE_PICKAXE, 0, 1, 1, 3), new StructurePieceTreasure(Items.WOOD_PICKAXE, 0, 1, 1, 5), new StructurePieceTreasure(Items.APPLE, 0, 2, 3, 5), new StructurePieceTreasure(Items.BREAD, 0, 2, 3, 3), new StructurePieceTreasure(Item.getItemOf(Blocks.LOG2), 0, 1, 3, 10)};
private List V = new ArrayList();
@@ -141,7 +141,7 @@ public class WorldServer extends World {
}
private TileEntity fixTileEntity(int x, int y, int z, Block type, TileEntity found) {
- this.getServer().getLogger().severe("Block at " + x + "," + y + "," + z + " is " + org.bukkit.Material.getMaterial(Block.b(type)).toString() + " but has " + found + ". "
+ this.getServer().getLogger().severe("Block at " + x + "," + y + "," + z + " is " + org.bukkit.Material.getMaterial(Block.getId(type)).toString() + " but has " + found + ". "
+ "Bukkit will attempt to fix this, but there may be additional damage that we cannot recover.");
if (type instanceof IContainer) {
@@ -348,7 +348,7 @@ public class WorldServer extends World {
if (this.s(j1 + k, l1 - 1, k1 + l)) {
// CraftBukkit start
BlockState blockState = this.getWorld().getBlockAt(j1 + k, l1 - 1, k1 + l).getState();
- blockState.setTypeId(Block.b(Blocks.ICE));
+ blockState.setTypeId(Block.getId(Blocks.ICE));
BlockFormEvent iceBlockForm = new BlockFormEvent(blockState.getBlock(), blockState);
this.getServer().getPluginManager().callEvent(iceBlockForm);
@@ -361,7 +361,7 @@ public class WorldServer extends World {
if (this.Q() && this.e(j1 + k, l1, k1 + l, true)) {
// CraftBukkit start
BlockState blockState = this.getWorld().getBlockAt(j1 + k, l1, k1 + l).getState();
- blockState.setTypeId(Block.b(Blocks.SNOW));
+ blockState.setTypeId(Block.getId(Blocks.SNOW));
BlockFormEvent snow = new BlockFormEvent(blockState.getBlock(), blockState);
this.getServer().getPluginManager().callEvent(snow);
@@ -381,7 +381,7 @@ public class WorldServer extends World {
}
this.methodProfiler.c("tickBlocks");
- ChunkSection[] achunksection = chunk.i();
+ ChunkSection[] achunksection = chunk.getSections();
j1 = achunksection.length;
@@ -744,7 +744,7 @@ public class WorldServer extends World {
int k = this.worldData.e() + this.random.nextInt(6) - this.random.nextInt(6);
int l = this.i(j, k) + 1;
- if (worldgenbonuschest.a(this, this.random, j, l, k)) {
+ if (worldgenbonuschest.generate(this, this.random, j, l, k)) {
break;
}
}
@@ -799,7 +799,7 @@ public class WorldServer extends World {
protected void a(Entity entity) {
super.a(entity);
this.entitiesById.a(entity.getId(), entity);
- Entity[] aentity = entity.as();
+ Entity[] aentity = entity.at();
if (aentity != null) {
for (int i = 0; i < aentity.length; ++i) {
@@ -811,7 +811,7 @@ public class WorldServer extends World {
protected void b(Entity entity) {
super.b(entity);
this.entitiesById.d(entity.getId());
- Entity[] aentity = entity.as();
+ Entity[] aentity = entity.at();
if (aentity != null) {
for (int i = 0; i < aentity.length; ++i) {
@@ -879,20 +879,20 @@ public class WorldServer extends World {
return explosion;
}
- public void playNote(int i, int j, int k, Block block, int l, int i1) {
- NoteBlockData noteblockdata = new NoteBlockData(i, j, k, block, l, i1);
+ public void playBlockAction(int i, int j, int k, Block block, int l, int i1) {
+ BlockActionData blockactiondata = new BlockActionData(i, j, k, block, l, i1);
Iterator iterator = this.S[this.T].iterator();
- NoteBlockData noteblockdata1;
+ BlockActionData blockactiondata1;
do {
if (!iterator.hasNext()) {
- this.S[this.T].add(noteblockdata);
+ this.S[this.T].add(blockactiondata);
return;
}
- noteblockdata1 = (NoteBlockData) iterator.next();
- } while (!noteblockdata1.equals(noteblockdata));
+ blockactiondata1 = (BlockActionData) iterator.next();
+ } while (!blockactiondata1.equals(blockactiondata));
}
@@ -904,11 +904,11 @@ public class WorldServer extends World {
Iterator iterator = this.S[i].iterator();
while (iterator.hasNext()) {
- NoteBlockData noteblockdata = (NoteBlockData) iterator.next();
+ BlockActionData blockactiondata = (BlockActionData) iterator.next();
- if (this.a(noteblockdata)) {
+ if (this.a(blockactiondata)) {
// CraftBukkit - this.worldProvider.dimension -> this.dimension
- this.server.getPlayerList().sendPacketNearby((double) noteblockdata.a(), (double) noteblockdata.b(), (double) noteblockdata.c(), 64.0D, this.dimension, new PacketPlayOutBlockAction(noteblockdata.a(), noteblockdata.b(), noteblockdata.c(), noteblockdata.f(), noteblockdata.d(), noteblockdata.e()));
+ this.server.getPlayerList().sendPacketNearby((double) blockactiondata.a(), (double) blockactiondata.b(), (double) blockactiondata.c(), 64.0D, this.dimension, new PacketPlayOutBlockAction(blockactiondata.a(), blockactiondata.b(), blockactiondata.c(), blockactiondata.f(), blockactiondata.d(), blockactiondata.e()));
}
}
@@ -916,10 +916,10 @@ public class WorldServer extends World {
}
}
- private boolean a(NoteBlockData noteblockdata) {
- Block block = this.getType(noteblockdata.a(), noteblockdata.b(), noteblockdata.c());
+ private boolean a(BlockActionData blockactiondata) {
+ Block block = this.getType(blockactiondata.a(), blockactiondata.b(), blockactiondata.c());
- return block == noteblockdata.f() ? block.a(this, noteblockdata.a(), noteblockdata.b(), noteblockdata.c(), noteblockdata.d(), noteblockdata.e()) : false;
+ return block == blockactiondata.f() ? block.a(this, blockactiondata.a(), blockactiondata.b(), blockactiondata.c(), blockactiondata.d(), blockactiondata.e()) : false;
}
public void saveLevel() {
@@ -1000,7 +1000,7 @@ public class WorldServer extends World {
// CraftBukkit start - Helper method
public int getTypeId(int x, int y, int z) {
- return Block.b(getType(x, y, z));
+ return Block.getId(getType(x, y, z));
}
// CraftBukkit end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
index b2c6ef45..99d3d40f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
@@ -150,7 +150,7 @@ public class CraftChunk implements Chunk {
public ChunkSnapshot getChunkSnapshot(boolean includeMaxBlockY, boolean includeBiome, boolean includeBiomeTempRain) {
net.minecraft.server.Chunk chunk = getHandle();
- ChunkSection[] cs = chunk.i(); /* Get sections */
+ ChunkSection[] cs = chunk.getSections();
short[][] sectionBlockIDs = new short[cs.length][];
byte[][] sectionBlockData = new byte[cs.length][];
byte[][] sectionSkyLights = new byte[cs.length][];
@@ -221,7 +221,7 @@ public class CraftChunk implements Chunk {
if (includeBiome) {
biome = new BiomeBase[256];
for (int i = 0; i < 256; i++) {
- biome[i] = chunk.a(i & 0xF, i >> 4, wcm);
+ biome[i] = chunk.getBiome(i & 0xF, i >> 4, wcm);
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftProfileBanList.java b/src/main/java/org/bukkit/craftbukkit/CraftProfileBanList.java
index 20433590..fad6a965 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftProfileBanList.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftProfileBanList.java
@@ -26,7 +26,7 @@ public class CraftProfileBanList implements org.bukkit.BanList {
public org.bukkit.BanEntry getBanEntry(String target) {
Validate.notNull(target, "Target cannot be null");
- GameProfile profile = MinecraftServer.getServer().getUserCache().a(target);
+ GameProfile profile = MinecraftServer.getServer().getUserCache().getProfile(target);
if (profile == null) {
return null;
}
@@ -43,7 +43,7 @@ public class CraftProfileBanList implements org.bukkit.BanList {
public org.bukkit.BanEntry addBan(String target, String reason, Date expires, String source) {
Validate.notNull(target, "Ban target cannot be null");
- GameProfile profile = MinecraftServer.getServer().getUserCache().a(target);
+ GameProfile profile = MinecraftServer.getServer().getUserCache().getProfile(target);
if (profile == null) {
return null;
}
@@ -67,7 +67,7 @@ public class CraftProfileBanList implements org.bukkit.BanList {
public Set<org.bukkit.BanEntry> getBanEntries() {
ImmutableSet.Builder<org.bukkit.BanEntry> builder = ImmutableSet.builder();
for (JsonListEntry entry : list.getValues()) {
- GameProfile profile = (GameProfile) entry.f(); // Should be getKey
+ GameProfile profile = (GameProfile) entry.getKey();
builder.add(new CraftProfileBanEntry(profile, (GameProfileBanEntry) entry, list));
}
@@ -78,7 +78,7 @@ public class CraftProfileBanList implements org.bukkit.BanList {
public boolean isBanned(String target) {
Validate.notNull(target, "Target cannot be null");
- GameProfile profile = MinecraftServer.getServer().getUserCache().a(target);
+ GameProfile profile = MinecraftServer.getServer().getUserCache().getProfile(target);
if (profile == null) {
return false;
}
@@ -90,7 +90,7 @@ public class CraftProfileBanList implements org.bukkit.BanList {
public void pardon(String target) {
Validate.notNull(target, "Target cannot be null");
- GameProfile profile = MinecraftServer.getServer().getUserCache().a(target);
+ GameProfile profile = MinecraftServer.getServer().getUserCache().getProfile(target);
list.remove(profile);
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 883f8099..a666131f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -760,7 +760,7 @@ public final class CraftServer implements Server {
boolean animals = config.getBoolean("spawn-animals", console.getSpawnAnimals());
boolean monsters = config.getBoolean("spawn-monsters", console.worlds.get(0).difficulty != EnumDifficulty.PEACEFUL);
- EnumDifficulty difficulty = EnumDifficulty.a(config.getInt("difficulty", console.worlds.get(0).difficulty.ordinal()));
+ EnumDifficulty difficulty = EnumDifficulty.getById(config.getInt("difficulty", console.worlds.get(0).difficulty.ordinal()));
online.value = config.getBoolean("online-mode", console.getOnlineMode());
console.setSpawnAnimals(config.getBoolean("spawn-animals", console.getSpawnAnimals()));
@@ -961,7 +961,7 @@ public final class CraftServer implements Server {
} while(used);
boolean hardcore = false;
- WorldServer internal = new WorldServer(console, new ServerNBTManager(getWorldContainer(), name, true), name, dimension, new WorldSettings(creator.seed(), EnumGamemode.a(getDefaultGameMode().getValue()), generateStructures, hardcore, type), console.methodProfiler, creator.environment(), generator);
+ WorldServer internal = new WorldServer(console, new ServerNBTManager(getWorldContainer(), name, true), name, dimension, new WorldSettings(creator.seed(), EnumGamemode.getById(getDefaultGameMode().getValue()), generateStructures, hardcore, type), console.methodProfiler, creator.environment(), generator);
if (!(worlds.containsKey(name.toLowerCase()))) {
return null;
@@ -1350,7 +1350,7 @@ public final class CraftServer implements Server {
OfflinePlayer result = getPlayerExact(name);
if (result == null) {
// This is potentially blocking :(
- GameProfile profile = MinecraftServer.getServer().getUserCache().a(name);
+ GameProfile profile = MinecraftServer.getServer().getUserCache().getProfile(name);
if (profile == null) {
// Make an OfflinePlayer using an offline mode UUID since the name has no profile
result = getOfflinePlayer(new GameProfile(UUID.nameUUIDFromBytes(("OfflinePlayer:" + name).getBytes(Charsets.UTF_8)), name));
@@ -1414,7 +1414,7 @@ public final class CraftServer implements Server {
Set<OfflinePlayer> result = new HashSet<OfflinePlayer>();
for (JsonListEntry entry : playerList.getProfileBans().getValues()) {
- result.add(getOfflinePlayer((GameProfile) entry.f())); // Should be getKey
+ result.add(getOfflinePlayer((GameProfile) entry.getKey()));
}
return result;
@@ -1436,7 +1436,7 @@ public final class CraftServer implements Server {
@Override
public void setWhitelist(boolean value) {
playerList.setHasWhitelist(value);
- console.getPropertyManager().a("white-list", value);
+ console.getPropertyManager().setProperty("white-list", value);
}
@Override
@@ -1444,7 +1444,7 @@ public final class CraftServer implements Server {
Set<OfflinePlayer> result = new LinkedHashSet<OfflinePlayer>();
for (JsonListEntry entry : playerList.getWhitelist().getValues()) {
- result.add(getOfflinePlayer((GameProfile) entry.f())); // Should be getKey
+ result.add(getOfflinePlayer((GameProfile) entry.getKey()));
}
return result;
@@ -1455,7 +1455,7 @@ public final class CraftServer implements Server {
Set<OfflinePlayer> result = new HashSet<OfflinePlayer>();
for (JsonListEntry entry : playerList.getOPs().getValues()) {
- result.add(getOfflinePlayer((GameProfile) entry.f())); // Should be getKey
+ result.add(getOfflinePlayer((GameProfile) entry.getKey()));
}
return result;
@@ -1468,7 +1468,7 @@ public final class CraftServer implements Server {
@Override
public GameMode getDefaultGameMode() {
- return GameMode.getByValue(console.worlds.get(0).getWorldData().getGameType().a());
+ return GameMode.getByValue(console.worlds.get(0).getWorldData().getGameType().getId());
}
@Override
@@ -1476,7 +1476,7 @@ public final class CraftServer implements Server {
Validate.notNull(mode, "Mode cannot be null");
for (World world : getWorlds()) {
- ((CraftWorld) world).getHandle().worldData.setGameType(EnumGamemode.a(mode.getValue()));
+ ((CraftWorld) world).getHandle().worldData.setGameType(EnumGamemode.getById(mode.getValue()));
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 9bc72aa8..f4dec5bf 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -407,7 +407,7 @@ public class CraftWorld implements World {
break;
}
- return gen.a(world, rand, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
+ return gen.generate(world, rand, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
}
public boolean generateTree(Location loc, TreeType type, BlockChangeDelegate delegate) {
@@ -704,7 +704,7 @@ public class CraftWorld implements World {
}
public void setDifficulty(Difficulty difficulty) {
- this.getHandle().difficulty = EnumDifficulty.a(difficulty.getValue());
+ this.getHandle().difficulty = EnumDifficulty.getById(difficulty.getValue());
}
public Difficulty getDifficulty() {
@@ -842,8 +842,8 @@ public class CraftWorld implements World {
double y = location.getBlockY() + 0.5;
double z = location.getBlockZ() + 0.5;
- EntityFallingBlock entity = new EntityFallingBlock(world, x, y, z, net.minecraft.server.Block.e(material.getId()), data);
- entity.b = 1; // ticksLived
+ EntityFallingBlock entity = new EntityFallingBlock(world, x, y, z, net.minecraft.server.Block.getById(material.getId()), data);
+ entity.ticksLived = 1;
world.addEntity(entity, SpawnReason.CUSTOM);
return (FallingBlock) entity.getBukkitEntity();
@@ -877,7 +877,7 @@ public class CraftWorld implements World {
int type = world.getTypeId((int) x, (int) y, (int) z);
int data = world.getData((int) x, (int) y, (int) z);
- entity = new EntityFallingBlock(world, x + 0.5, y + 0.5, z + 0.5, net.minecraft.server.Block.e(type), data);
+ entity = new EntityFallingBlock(world, x + 0.5, y + 0.5, z + 0.5, net.minecraft.server.Block.getById(type), data);
} else if (Projectile.class.isAssignableFrom(clazz)) {
if (Snowball.class.isAssignableFrom(clazz)) {
entity = new EntitySnowball(world, x, y, z);
@@ -1040,7 +1040,7 @@ public class CraftWorld implements World {
entity = new EntityItemFrame(world, (int) x, (int) y, (int) z, dir);
} else if (LeashHitch.class.isAssignableFrom(clazz)) {
entity = new EntityLeash(world, (int) x, (int) y, (int) z);
- entity.n = true;
+ entity.attachedToPlayer = true;
}
if (entity != null && !((EntityHanging) entity).survives()) {
@@ -1062,7 +1062,7 @@ public class CraftWorld implements World {
if (entity != null) {
if (entity instanceof EntityInsentient) {
- ((EntityInsentient) entity).a((GroupDataEntity) null); // Should be prepare?
+ ((EntityInsentient) entity).prepare((GroupDataEntity) null);
}
world.addEntity(entity, reason);
@@ -1279,11 +1279,11 @@ public class CraftWorld implements World {
}
public String[] getGameRules() {
- return getHandle().getGameRules().b();
+ return getHandle().getGameRules().getGameRules();
}
public boolean isGameRule(String rule) {
- return getHandle().getGameRules().e(rule);
+ return getHandle().getGameRules().contains(rule);
}
public void processChunkGC() {
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index 7dded2b4..87d79aec 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -381,7 +381,7 @@ public class CraftBlock implements Block {
private boolean itemCausesDrops(ItemStack item) {
net.minecraft.server.Block block = this.getNMSBlock();
- net.minecraft.server.Item itemType = item != null ? net.minecraft.server.Item.d(item.getTypeId()) : null;
+ net.minecraft.server.Item itemType = item != null ? net.minecraft.server.Item.getById(item.getTypeId()) : null;
return block != null && (block.getMaterial().isAlwaysDestroyable() || (itemType != null && itemType.canDestroySpecialBlock(block)));
}
@@ -428,7 +428,7 @@ public class CraftBlock implements Block {
nmsStack.setTag(new NBTTagCompound());
NBTTagCompound nbttagcompound = new NBTTagCompound();
- GameProfileSerializer.a(nbttagcompound, tileentityskull.getGameProfile());
+ GameProfileSerializer.serialize(nbttagcompound, tileentityskull.getGameProfile());
nmsStack.getTag().set("SkullOwner", nbttagcompound);
}
@@ -458,7 +458,7 @@ public class CraftBlock implements Block {
/* Build biome index based lookup table for BiomeBase to Biome mapping */
static {
- BIOME_MAPPING = new Biome[BiomeBase.n().length];
+ BIOME_MAPPING = new Biome[BiomeBase.getBiomes().length];
BIOMEBASE_MAPPING = new BiomeBase[Biome.values().length];
BIOME_MAPPING[BiomeBase.OCEAN.id] = Biome.OCEAN;
BIOME_MAPPING[BiomeBase.PLAINS.id] = Biome.PLAINS;
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftCommandBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftCommandBlock.java
index e23c1cec..57af2bc5 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftCommandBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftCommandBlock.java
@@ -15,8 +15,8 @@ public class CraftCommandBlock extends CraftBlockState implements CommandBlock {
CraftWorld world = (CraftWorld) block.getWorld();
commandBlock = (TileEntityCommand) world.getTileEntityAt(getX(), getY(), getZ());
- command = commandBlock.a().e;
- name = commandBlock.a().getName();
+ command = commandBlock.getCommandBlock().getCommand();
+ name = commandBlock.getCommandBlock().getName();
}
public String getCommand() {
@@ -39,8 +39,8 @@ public class CraftCommandBlock extends CraftBlockState implements CommandBlock {
boolean result = super.update(force, applyPhysics);
if (result) {
- commandBlock.a().a(command);
- commandBlock.a().b(name);
+ commandBlock.getCommandBlock().setCommand(command);
+ commandBlock.getCommandBlock().setName(name);
}
return result;
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java b/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java
index 86839ad9..fa4c0a96 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java
@@ -19,16 +19,16 @@ public class CraftCreatureSpawner extends CraftBlockState implements CreatureSpa
@Deprecated
public CreatureType getCreatureType() {
- return CreatureType.fromName(spawner.a().getMobName());
+ return CreatureType.fromName(spawner.getSpawner().getMobName());
}
public EntityType getSpawnedType() {
- return EntityType.fromName(spawner.a().getMobName());
+ return EntityType.fromName(spawner.getSpawner().getMobName());
}
@Deprecated
public void setCreatureType(CreatureType creatureType) {
- spawner.a().a(creatureType.getName());
+ spawner.getSpawner().setMobName(creatureType.getName());
}
public void setSpawnedType(EntityType entityType) {
@@ -36,12 +36,12 @@ public class CraftCreatureSpawner extends CraftBlockState implements CreatureSpa
throw new IllegalArgumentException("Can't spawn EntityType " + entityType + " from mobspawners!");
}
- spawner.a().a(entityType.getName());
+ spawner.getSpawner().setMobName(entityType.getName());
}
@Deprecated
public String getCreatureTypeId() {
- return spawner.a().getMobName();
+ return spawner.getSpawner().getMobName();
}
@Deprecated
@@ -50,7 +50,7 @@ public class CraftCreatureSpawner extends CraftBlockState implements CreatureSpa
}
public String getCreatureTypeName() {
- return spawner.a().getMobName();
+ return spawner.getSpawner().getMobName();
}
public void setCreatureTypeByName(String creatureType) {
@@ -63,11 +63,11 @@ public class CraftCreatureSpawner extends CraftBlockState implements CreatureSpa
}
public int getDelay() {
- return spawner.a().spawnDelay;
+ return spawner.getSpawner().spawnDelay;
}
public void setDelay(int delay) {
- spawner.a().spawnDelay = delay;
+ spawner.getSpawner().spawnDelay = delay;
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftNoteBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftNoteBlock.java
index 53173a17..b83e3351 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftNoteBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftNoteBlock.java
@@ -53,7 +53,7 @@ public class CraftNoteBlock extends CraftBlockState implements NoteBlock {
Block block = getBlock();
if (block.getType() == Material.NOTE_BLOCK) {
- world.getHandle().playNote(getX(), getY(), getZ(), CraftMagicNumbers.getBlock(block), instrument, note);
+ world.getHandle().playBlockAction(getX(), getY(), getZ(), CraftMagicNumbers.getBlock(block), instrument, note);
return true;
} else {
return false;
@@ -65,7 +65,7 @@ public class CraftNoteBlock extends CraftBlockState implements NoteBlock {
Block block = getBlock();
if (block.getType() == Material.NOTE_BLOCK) {
- world.getHandle().playNote(getX(), getY(), getZ(), CraftMagicNumbers.getBlock(block), instrument.getType(), note.getId());
+ world.getHandle().playBlockAction(getX(), getY(), getZ(), CraftMagicNumbers.getBlock(block), instrument.getType(), note.getId());
return true;
} else {
return false;
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java
index 8ebb22cf..dc9a587e 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java
@@ -152,7 +152,7 @@ public class CraftSkull extends CraftBlockState implements Skull {
return false;
}
- GameProfile profile = MinecraftServer.getServer().getUserCache().a(name);
+ GameProfile profile = MinecraftServer.getServer().getUserCache().getProfile(name);
if (profile == null) {
return false;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
index 1440349b..9cf1b493 100644
--- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
+++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
@@ -35,7 +35,7 @@ class ChunkIOProvider implements AsynchronousExecutor.CallBackProvider<QueuedChu
}
queuedChunk.loader.loadEntities(chunk, queuedChunk.compound.getCompound("Level"), queuedChunk.world);
- chunk.p = queuedChunk.provider.world.getTime();
+ chunk.lastSaved = queuedChunk.provider.world.getTime();
queuedChunk.provider.chunks.put(LongHash.toLong(queuedChunk.x, queuedChunk.z), chunk);
chunk.addEntities();
@@ -63,7 +63,7 @@ class ChunkIOProvider implements AsynchronousExecutor.CallBackProvider<QueuedChu
}
}
- chunk.a(queuedChunk.provider, queuedChunk.provider, queuedChunk.x, queuedChunk.z);
+ chunk.loadNearby(queuedChunk.provider, queuedChunk.provider, queuedChunk.x, queuedChunk.z);
}
public void callStage3(QueuedChunk queuedChunk, Chunk chunk, Runnable runnable) throws RuntimeException {
diff --git a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java b/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
index 76fea00d..5909613c 100644
--- a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
+++ b/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
@@ -59,11 +59,11 @@ public final class VanillaCommandWrapper extends VanillaCommand {
try {
vanillaCommand.execute(icommandlistener, args);
} catch (ExceptionUsage exceptionusage) {
- ChatMessage chatmessage = new ChatMessage("commands.generic.usage", new Object[] {new ChatMessage(exceptionusage.getMessage(), exceptionusage.a())});
+ ChatMessage chatmessage = new ChatMessage("commands.generic.usage", new Object[] {new ChatMessage(exceptionusage.getMessage(), exceptionusage.getArgs())});
chatmessage.getChatModifier().setColor(EnumChatFormat.RED);
icommandlistener.sendMessage(chatmessage);
} catch (CommandException commandexception) {
- ChatMessage chatmessage = new ChatMessage(commandexception.getMessage(), commandexception.a());
+ ChatMessage chatmessage = new ChatMessage(commandexception.getMessage(), commandexception.getArgs());
chatmessage.getChatModifier().setColor(EnumChatFormat.RED);
icommandlistener.sendMessage(chatmessage);
} finally {
@@ -109,7 +109,7 @@ public final class VanillaCommandWrapper extends VanillaCommand {
j++;
continue;
} catch (CommandException commandexception1) {
- ChatMessage chatmessage4 = new ChatMessage(commandexception1.getMessage(), commandexception1.a());
+ ChatMessage chatmessage4 = new ChatMessage(commandexception1.getMessage(), commandexception1.getArgs());
chatmessage4.getChatModifier().setColor(EnumChatFormat.RED);
icommandlistener.sendMessage(chatmessage4);
}
@@ -126,11 +126,11 @@ public final class VanillaCommandWrapper extends VanillaCommand {
icommandlistener.sendMessage(chatmessage);
}
} catch (ExceptionUsage exceptionusage) {
- ChatMessage chatmessage1 = new ChatMessage("commands.generic.usage", new Object[] { new ChatMessage(exceptionusage.getMessage(), exceptionusage.a()) });
+ ChatMessage chatmessage1 = new ChatMessage("commands.generic.usage", new Object[] { new ChatMessage(exceptionusage.getMessage(), exceptionusage.getArgs()) });
chatmessage1.getChatModifier().setColor(EnumChatFormat.RED);
icommandlistener.sendMessage(chatmessage1);
} catch (CommandException commandexception) {
- ChatMessage chatmessage2 = new ChatMessage(commandexception.getMessage(), commandexception.a());
+ ChatMessage chatmessage2 = new ChatMessage(commandexception.getMessage(), commandexception.getArgs());
chatmessage2.getChatModifier().setColor(EnumChatFormat.RED);
icommandlistener.sendMessage(chatmessage2);
} catch (Throwable throwable) {
@@ -160,7 +160,7 @@ public final class VanillaCommandWrapper extends VanillaCommand {
return ((CraftBlockCommandSender) sender).getTileEntity();
}
if (sender instanceof CommandMinecart) {
- return ((EntityMinecartCommandBlock) ((CraftMinecartCommand) sender).getHandle()).e();
+ return ((EntityMinecartCommandBlock) ((CraftMinecartCommand) sender).getHandle()).getCommandBlock();
}
if (sender instanceof RemoteConsoleCommandSender) {
return RemoteControlCommandListener.instance;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftBat.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftBat.java
index bf3a872b..76ada1c3 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftBat.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftBat.java
@@ -26,11 +26,11 @@ public class CraftBat extends CraftAmbient implements Bat {
@Override
public boolean isAwake() {
- return !getHandle().isStartled();
+ return !getHandle().isAsleep();
}
@Override
public void setAwake(boolean state) {
- getHandle().setStartled(!state);
+ getHandle().setAsleep(!state);
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
index 5437d859..76a9bdba 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
@@ -64,7 +64,7 @@ public class CraftFirework extends CraftEntity implements Firework {
// Copied from EntityFireworks constructor, update firework lifetime/power
getHandle().expectedLifespan = 10 * (1 + meta.getPower()) + random.nextInt(6) + random.nextInt(7);
- getHandle().getDataWatcher().h(FIREWORK_ITEM_INDEX); // Update
+ getHandle().getDataWatcher().update(FIREWORK_ITEM_INDEX);
}
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java
index 5823da3f..3f4e1ae6 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java
@@ -31,8 +31,8 @@ public class CraftItemFrame extends CraftHanging implements ItemFrame {
public void setItem(org.bukkit.inventory.ItemStack item) {
if (item == null || item.getTypeId() == 0) {
- getHandle().getDataWatcher().a(2, 5);
- getHandle().getDataWatcher().h(2);
+ getHandle().getDataWatcher().add(2, 5);
+ getHandle().getDataWatcher().update(2);
} else {
getHandle().setItem(CraftItemStack.asNMSCopy(item));
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 03a56270..add554e9 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -95,7 +95,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public void setMaxHealth(double amount) {
Validate.isTrue(amount > 0, "Max health must be greater than 0");
- getHandle().getAttributeInstance(GenericAttributes.a).setValue(amount);
+ getHandle().getAttributeInstance(GenericAttributes.maxHealth).setValue(amount);
if (getHealth() > amount) {
setHealth(amount);
@@ -348,7 +348,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
}
public boolean hasLineOfSight(Entity other) {
- return getHandle().p(((CraftEntity) other).getHandle());
+ return getHandle().hasLineOfSight(((CraftEntity) other).getHandle());
}
public boolean getRemoveWhenFarAway() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartCommand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartCommand.java
index 4c237270..813b080a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartCommand.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartCommand.java
@@ -24,17 +24,17 @@ public class CraftMinecartCommand extends CraftMinecart implements CommandMineca
@Override
public String getCommand() {
- return ((EntityMinecartCommandBlock) getHandle()).e().e;
+ return ((EntityMinecartCommandBlock) getHandle()).getCommandBlock().getCommand();
}
@Override
public void setCommand(String command) {
- ((EntityMinecartCommandBlock) getHandle()).e().a(command != null ? command : "");
+ ((EntityMinecartCommandBlock) getHandle()).getCommandBlock().setCommand(command != null ? command : "");
}
@Override
public void setName(String name) {
- ((EntityMinecartCommandBlock) getHandle()).e().b(name != null ? name : "@");
+ ((EntityMinecartCommandBlock) getHandle()).getCommandBlock().setName(name != null ? name : "@");
}
@Override
@@ -52,7 +52,7 @@ public class CraftMinecartCommand extends CraftMinecart implements CommandMineca
@Override
public String getName() {
- return ((EntityMinecartCommandBlock) getHandle()).e().getName();
+ return ((EntityMinecartCommandBlock) getHandle()).getCommandBlock().getName();
}
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index a0e27bc3..9760f8f9 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -568,7 +568,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public boolean hasAchievement(Achievement achievement) {
Validate.notNull(achievement, "Achievement cannot be null");
- return getHandle().getStatisticManager().a(CraftStatistic.getNMSAchievement(achievement));
+ return getHandle().getStatisticManager().hasAchievement(CraftStatistic.getNMSAchievement(achievement));
}
@Override
@@ -779,7 +779,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return;
}
- getHandle().playerInteractManager.setGameMode(EnumGamemode.a(mode.getValue()));
+ getHandle().playerInteractManager.setGameMode(EnumGamemode.getById(mode.getValue()));
getHandle().fallDistance = 0;
getHandle().playerConnection.sendPacket(new PacketPlayOutGameStateChange(3, mode.getValue()));
}
@@ -787,7 +787,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public GameMode getGameMode() {
- return GameMode.getByValue(getHandle().playerInteractManager.getGameMode().a());
+ return GameMode.getByValue(getHandle().playerInteractManager.getGameMode().getId());
}
public void giveExp(int exp) {
@@ -1258,13 +1258,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
public void updateScaledHealth() {
- AttributeMapServer attributemapserver = (AttributeMapServer) getHandle().bb();
- Set set = attributemapserver.b();
+ AttributeMapServer attributemapserver = (AttributeMapServer) getHandle().getAttributeMap();
+ Set set = attributemapserver.getAttributes();
injectScaledMaxHealth(set, true);
getHandle().getDataWatcher().watch(6, (float) getScaledHealth());
- getHandle().playerConnection.sendPacket(new PacketPlayOutUpdateHealth(getScaledHealth(), getHandle().getFoodData().a(), getHandle().getFoodData().e()));
+ getHandle().playerConnection.sendPacket(new PacketPlayOutUpdateHealth(getScaledHealth(), getHandle().getFoodData().getFoodLevel(), getHandle().getFoodData().getSaturationLevel()));
getHandle().playerConnection.sendPacket(new PacketPlayOutUpdateAttributes(getHandle().getId(), set));
set.clear();
@@ -1276,13 +1276,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return;
}
for (Object genericInstance : collection) {
- IAttribute attribute = ((AttributeInstance) genericInstance).a();
- if (attribute.a().equals("generic.maxHealth")) {
+ IAttribute attribute = ((AttributeInstance) genericInstance).getAttribute();
+ if (attribute.getName().equals("generic.maxHealth")) {
collection.remove(genericInstance);
break;
}
- continue;
}
- collection.add(new AttributeModifiable(getHandle().bb(), (new AttributeRanged("generic.maxHealth", scaledHealth ? healthScale : getMaxHealth(), 0.0D, Float.MAX_VALUE)).a("Max Health").a(true)));
+ collection.add(new AttributeModifiable(getHandle().getAttributeMap(), (new AttributeRanged("generic.maxHealth", scaledHealth ? healthScale : getMaxHealth(), 0.0D, Float.MAX_VALUE)).a("Max Health").a(true)));
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWitherSkull.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWitherSkull.java
index 2e276166..563177e9 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWitherSkull.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWitherSkull.java
@@ -12,12 +12,12 @@ public class CraftWitherSkull extends CraftFireball implements WitherSkull {
@Override
public void setCharged(boolean charged) {
- getHandle().a(charged);
+ getHandle().setCharged(charged);
}
@Override
public boolean isCharged() {
- return getHandle().f();
+ return getHandle().isCharged();
}
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 8d2c80fb..2d5182a6 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -95,7 +95,7 @@ public class CraftEventFactory {
if (world.getHandle().dimension != 0) return true;
if (spawnSize <= 0) return true;
- if (((CraftServer) Bukkit.getServer()).getHandle().getOPs().d()) return true; // Should be isEmpty
+ if (((CraftServer) Bukkit.getServer()).getHandle().getOPs().isEmpty()) return true;
if (player.isOp()) return true;
ChunkCoordinates chunkcoordinates = worldServer.getSpawn();
@@ -332,7 +332,7 @@ public class CraftEventFactory {
*/
public static BlockFadeEvent callBlockFadeEvent(Block block, net.minecraft.server.Block type) {
BlockState state = block.getState();
- state.setTypeId(net.minecraft.server.Block.b(type));
+ state.setTypeId(net.minecraft.server.Block.getId(type));
BlockFadeEvent event = new BlockFadeEvent(block, state);
Bukkit.getPluginManager().callEvent(event);
@@ -341,7 +341,7 @@ public class CraftEventFactory {
public static void handleBlockSpreadEvent(Block block, Block source, net.minecraft.server.Block type, int data) {
BlockState state = block.getState();
- state.setTypeId(net.minecraft.server.Block.b(type));
+ state.setTypeId(net.minecraft.server.Block.getId(type));
state.setRawData((byte) data);
BlockSpreadEvent event = new BlockSpreadEvent(block, source, state);
@@ -583,7 +583,7 @@ public class CraftEventFactory {
public static void handleBlockGrowEvent(World world, int x, int y, int z, net.minecraft.server.Block type, int data) {
Block block = world.getWorld().getBlockAt(x, y, z);
CraftBlockState state = (CraftBlockState) block.getState();
- state.setTypeId(net.minecraft.server.Block.b(type));
+ state.setTypeId(net.minecraft.server.Block.getId(type));
state.setRawData((byte) data);
BlockGrowEvent event = new BlockGrowEvent(block, state);
@@ -824,7 +824,7 @@ public class CraftEventFactory {
}
// Client will have updated its idea of the book item; we need to overwrite that
- Slot slot = player.activeContainer.a((IInventory) player.inventory, itemInHandIndex);
+ Slot slot = player.activeContainer.getSlot(player.inventory, itemInHandIndex);
player.playerConnection.sendPacket(new PacketPlayOutSetSlot(player.activeContainer.windowId, slot.rawSlotIndex, itemInHand));
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
index dc509dfa..9a46d0c7 100644
--- a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
+++ b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
@@ -63,7 +63,7 @@ public class CustomChunkGenerator extends InternalChunkGenerator {
if (xbtypes != null) {
chunk = new Chunk(this.world, x, z);
- ChunkSection[] csect = chunk.i();
+ ChunkSection[] csect = chunk.getSections();
int scnt = Math.min(csect.length, xbtypes.length);
// Loop through returned sections
@@ -100,7 +100,7 @@ public class CustomChunkGenerator extends InternalChunkGenerator {
if (btypes != null) {
chunk = new Chunk(this.world, x, z);
- ChunkSection[] csect = chunk.i();
+ ChunkSection[] csect = chunk.getSections();
int scnt = Math.min(csect.length, btypes.length);
for (int sec = 0; sec < scnt; sec++) {
@@ -118,7 +118,7 @@ public class CustomChunkGenerator extends InternalChunkGenerator {
chunk = new Chunk(this.world, x, z); // Create empty chunk
- ChunkSection[] csect = chunk.i();
+ ChunkSection[] csect = chunk.getSections();
scnt = Math.min(scnt, csect.length);
// Loop through sections
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java
index 533d62ad..8b8a317c 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java
@@ -144,7 +144,7 @@ public class CraftInventoryCustom extends CraftInventory {
return type;
}
- public void l_() {}
+ public void closeContainer() {}
public InventoryHolder getOwner() {
return owner;
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
index 67935f3a..1cf8fce4 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
@@ -57,7 +57,7 @@ class CraftMetaBook extends CraftMetaItem implements BookMeta {
String[] pageArray = new String[pages.size()];
for (int i = 0; i < pages.size(); i++) {
- String page = pages.f(i);
+ String page = pages.getString(i);
pageArray[i] = page;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 7d4114c2..c9738c4f 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -235,7 +235,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
lore = new ArrayList<String>(list.size());
for (int index = 0; index < list.size(); index++) {
- String line = list.f(index);
+ String line = list.getString(index);
lore.add(line);
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
index 2fe10005..d648d052 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
@@ -34,7 +34,7 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
super(tag);
if (tag.hasKeyOfType(SKULL_OWNER.NBT, 10)) {
- profile = GameProfileSerializer.a(tag.getCompound(SKULL_OWNER.NBT));
+ profile = GameProfileSerializer.deserialize(tag.getCompound(SKULL_OWNER.NBT));
} else if (tag.hasKeyOfType(SKULL_OWNER.NBT, 8)) {
profile = new GameProfile(null, tag.getString(SKULL_OWNER.NBT));
}
@@ -51,7 +51,7 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
if (hasOwner()) {
NBTTagCompound owner = new NBTTagCompound();
- GameProfileSerializer.a(owner, profile);
+ GameProfileSerializer.serialize(owner, profile);
tag.set(SKULL_OWNER.NBT, owner);
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/map/CraftMapRenderer.java b/src/main/java/org/bukkit/craftbukkit/map/CraftMapRenderer.java
index 22e00535..392dba4a 100644
--- a/src/main/java/org/bukkit/craftbukkit/map/CraftMapRenderer.java
+++ b/src/main/java/org/bukkit/craftbukkit/map/CraftMapRenderer.java
@@ -34,14 +34,14 @@ public class CraftMapRenderer extends MapRenderer {
cursors.removeCursor(cursors.getCursor(0));
}
- for (Object key : worldMap.g.keySet()) {
+ for (Object key : worldMap.decorations.keySet()) {
// If this cursor is for a player check visibility with vanish system
Player other = Bukkit.getPlayerExact((String) key);
if (other != null && !player.canSee(other)) {
continue;
}
- WorldMapDecoration decoration = (WorldMapDecoration) worldMap.g.get(key);
+ WorldMapDecoration decoration = (WorldMapDecoration) worldMap.decorations.get(key);
cursors.addCursor(decoration.locX, decoration.locY, (byte) (decoration.rotation & 15), decoration.type);
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftCriteria.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftCriteria.java
index d2e30967..612a5243 100644
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftCriteria.java
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftCriteria.java
@@ -14,7 +14,7 @@ final class CraftCriteria {
static {
ImmutableMap.Builder<String, CraftCriteria> defaults = ImmutableMap.builder();
- for (Map.Entry<?, ?> entry : ((Map<?,?> ) IScoreboardCriteria.a).entrySet()) {
+ for (Map.Entry<?, ?> entry : ((Map<?,?> ) IScoreboardCriteria.criteria).entrySet()) {
String name = entry.getKey().toString();
IScoreboardCriteria criteria = (IScoreboardCriteria) entry.getValue();
if (!criteria.getName().equals(name)) {
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
index 84091a4f..87259f12 100644
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
@@ -90,7 +90,7 @@ public final class CraftScoreboardManager implements ScoreboardManager {
}
// The above is the reverse of the below method.
- server.getPlayerList().a((ScoreboardServer) newboard, player.getHandle());
+ server.getPlayerList().sendScoreboard((ScoreboardServer) newboard, player.getHandle());
}
// CraftBukkit method
diff --git a/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java b/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java
index 124aa6e4..30f2622d 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java
@@ -23,7 +23,7 @@ public class BlockStateListPopulator {
public void setTypeAndData(int x, int y, int z, Block block, int data, int light) {
BlockState state = world.getBlockAt(x, y, z).getState();
- state.setTypeId(Block.b(block));
+ state.setTypeId(Block.getId(block));
state.setRawData((byte) data);
list.add(state);
}
@@ -39,7 +39,7 @@ public class BlockStateListPopulator {
public void setType(int x, int y, int z, Block block) {
BlockState state = world.getBlockAt(x, y, z).getState();
- state.setTypeId(Block.b(block));
+ state.setTypeId(Block.getId(block));
list.add(state);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
index 2b57bf88..256f0531 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
@@ -110,7 +110,7 @@ public final class CraftChatMessage {
currentChatComponent = new ChatComponentText("");
list.add(currentChatComponent);
}
- currentChatComponent.a(addition);
+ currentChatComponent.addSibling(addition);
}
private IChatBaseComponent[] getOutput() {
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftDamageSource.java b/src/main/java/org/bukkit/craftbukkit/util/CraftDamageSource.java
index 0a72a953..a8e2b5e2 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftDamageSource.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftDamageSource.java
@@ -9,17 +9,17 @@ public final class CraftDamageSource extends DamageSource {
// Check ignoresArmor
if (original.ignoresArmor()) {
- newSource.k();
+ newSource.setIgnoreArmor();
}
// Check magic
- if (original.s()) {
- newSource.t();
+ if (original.isMagic()) {
+ newSource.setMagic();
}
// Check fire
if (original.isExplosion()) {
- newSource.n();
+ newSource.setExplosion();
}
return newSource;
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 54e2f5d6..52aa5d18 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -39,34 +39,34 @@ public final class CraftMagicNumbers implements UnsafeValues {
@Deprecated
// A bad method for bad magic.
public static int getId(Block block) {
- return Block.b(block);
+ return Block.getId(block);
}
public static Material getMaterial(Block block) {
- return Material.getMaterial(Block.b(block));
+ return Material.getMaterial(Block.getId(block));
}
public static Item getItem(Material material) {
// TODO: Don't use ID
- Item item = Item.d(material.getId());
+ Item item = Item.getById(material.getId());
return item;
}
@Deprecated
// A bad method for bad magic.
public static Item getItem(int id) {
- return Item.d(id);
+ return Item.getById(id);
}
@Deprecated
// A bad method for bad magic.
public static int getId(Item item) {
- return Item.b(item);
+ return Item.getId(item);
}
public static Material getMaterial(Item item) {
// TODO: Don't use ID
- Material material = Material.getMaterial(Item.b(item));
+ Material material = Material.getMaterial(Item.getId(item));
if (material == null) {
return Material.AIR;
@@ -77,7 +77,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
public static Block getBlock(Material material) {
// TODO: Don't use ID
- Block block = Block.e(material.getId());
+ Block block = Block.getById(material.getId());
if (block == null) {
return Blocks.AIR;
@@ -88,7 +88,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
@Override
public Material getMaterialFromInternalName(String name) {
- return getMaterial((Item) Item.REGISTRY.a(name));
+ return getMaterial((Item) Item.REGISTRY.get(name));
}
@Override
@@ -120,7 +120,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
@Override
public List<String> tabCompleteInternalStatisticOrAchievementName(String token, List<String> completions) {
List<String> matches = new ArrayList<String>();
- Iterator iterator = StatisticList.b.iterator();
+ Iterator iterator = StatisticList.stats.iterator();
while (iterator.hasNext()) {
String statistic = ((net.minecraft.server.Statistic) iterator.next()).name;
if (statistic.startsWith(token)) {
diff --git a/src/main/java/org/bukkit/craftbukkit/util/StructureGrowDelegate.java b/src/main/java/org/bukkit/craftbukkit/util/StructureGrowDelegate.java
index bb6a5796..f9cc7d6f 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/StructureGrowDelegate.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/StructureGrowDelegate.java
@@ -61,7 +61,7 @@ public class StructureGrowDelegate implements BlockChangeDelegate {
public boolean isEmpty(int x, int y, int z) {
for (BlockState state : blocks) {
if (state.getX() == x && state.getY() == y && state.getZ() == z) {
- return Block.e(state.getTypeId()) == Blocks.AIR;
+ return Block.getById(state.getTypeId()) == Blocks.AIR;
}
}
diff --git a/src/test/java/org/bukkit/StatisticsAndAchievementsTest.java b/src/test/java/org/bukkit/StatisticsAndAchievementsTest.java
index 41e6a89a..0a6c277a 100644
--- a/src/test/java/org/bukkit/StatisticsAndAchievementsTest.java
+++ b/src/test/java/org/bukkit/StatisticsAndAchievementsTest.java
@@ -39,7 +39,7 @@ public class StatisticsAndAchievementsTest extends AbstractTestingBase {
@SuppressWarnings("unchecked")
public void verifyStatisticMapping() throws Throwable {
HashMultiset<Statistic> statistics = HashMultiset.create();
- for (net.minecraft.server.Statistic statistic : (List<net.minecraft.server.Statistic>) StatisticList.b) {
+ for (net.minecraft.server.Statistic statistic : (List<net.minecraft.server.Statistic>) StatisticList.stats) {
if (statistic instanceof net.minecraft.server.Achievement) {
continue;
}
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java
index 610293f1..f5bcbdbe 100644
--- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java
@@ -33,7 +33,7 @@ public class ItemFactoryTest extends AbstractTestingBase {
for (final Field field : clazz.getDeclaredFields()) {
if (IAttribute.class.isAssignableFrom(field.getType()) && Modifier.isStatic(field.getModifiers())) {
field.setAccessible(true);
- final String attributeName = ((IAttribute) field.get(null)).a();
+ final String attributeName = ((IAttribute) field.get(null)).getName();
assertThat("Logical error: duplicate name `" + attributeName + "' in " + clazz.getName(), names.add(attributeName), is(true));
assertThat(clazz.getName(), CraftItemFactory.KNOWN_NBT_ATTRIBUTE_NAMES, hasItem(attributeName));
}