diff --git a/pom.xml b/pom.xml
index aaadb7f6da..079e5a0e9f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -39,7 +39,7 @@
org.bukkit
minecraft-server
- 1.6.6
+ 1.6.6_01
jar
compile
diff --git a/src/main/java/net/minecraft/server/BlockBloodStone.java b/src/main/java/net/minecraft/server/BlockBloodStone.java
index 86db2c5cd0..b69fbf5802 100644
--- a/src/main/java/net/minecraft/server/BlockBloodStone.java
+++ b/src/main/java/net/minecraft/server/BlockBloodStone.java
@@ -1,10 +1,6 @@
package net.minecraft.server;
-// CraftBukkit start
-import org.bukkit.craftbukkit.CraftServer;
-import org.bukkit.craftbukkit.CraftWorld;
-import org.bukkit.event.block.BlockRedstoneEvent;
-// CraftBukkit end
+import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
public class BlockBloodStone extends Block {
@@ -15,13 +11,11 @@ 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.byId[l] != null && net.minecraft.server.Block.byId[l].isPowerSource()) {
- CraftWorld craftWorld = ((WorldServer) world).getWorld();
- CraftServer server = ((WorldServer) world).getServer();
- org.bukkit.block.Block block = craftWorld.getBlockAt(i, j, k);
+ org.bukkit.block.Block block = world.getWorld().getBlockAt(i, j, k);
int power = block.getBlockPower();
- BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, power, power);
- server.getPluginManager().callEvent(eventRedstone);
+ BlockRedstoneEvent event = new BlockRedstoneEvent(block, power, power);
+ world.getServer().getPluginManager().callEvent(event);
}
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/BlockButton.java b/src/main/java/net/minecraft/server/BlockButton.java
index 883e340a55..e961f7931c 100644
--- a/src/main/java/net/minecraft/server/BlockButton.java
+++ b/src/main/java/net/minecraft/server/BlockButton.java
@@ -2,12 +2,7 @@ package net.minecraft.server;
import java.util.Random;
-// CraftBukkit start
-import org.bukkit.craftbukkit.CraftServer;
-import org.bukkit.craftbukkit.CraftWorld;
-import org.bukkit.craftbukkit.block.CraftBlock;
-import org.bukkit.event.block.BlockRedstoneEvent;
-// CraftBukkit end
+import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
public class BlockButton extends Block {
@@ -139,14 +134,13 @@ public class BlockButton extends Block {
return true;
} else {
// CraftBukkit start
- CraftWorld craftWorld = ((WorldServer) world).getWorld();
- CraftServer server = ((WorldServer) world).getServer();
- CraftBlock block = (CraftBlock) craftWorld.getBlockAt(i, j, k);
-
+ org.bukkit.block.Block block = world.getWorld().getBlockAt(i, j, k);
int old = (j1 != 8) ? 1 : 0;
int current = (j1 == 8) ? 1 : 0;
+
BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, old, current);
- server.getPluginManager().callEvent(eventRedstone);
+ world.getServer().getPluginManager().callEvent(eventRedstone);
+
if ((eventRedstone.getNewCurrent() > 0) != (j1 == 8)) {
return true;
}
@@ -222,12 +216,10 @@ public class BlockButton extends Block {
if ((l & 8) != 0) {
// CraftBukkit start
- CraftWorld craftWorld = ((WorldServer) world).getWorld();
- CraftServer server = ((WorldServer) world).getServer();
- CraftBlock block = (CraftBlock) craftWorld.getBlockAt(i, j, k);
+ org.bukkit.block.Block block = world.getWorld().getBlockAt(i, j, k);
BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, 1, 0);
- server.getPluginManager().callEvent(eventRedstone);
+ world.getServer().getPluginManager().callEvent(eventRedstone);
if (eventRedstone.getNewCurrent() > 0) return;
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java
index 4475234769..905962996f 100644
--- a/src/main/java/net/minecraft/server/BlockCactus.java
+++ b/src/main/java/net/minecraft/server/BlockCactus.java
@@ -1,10 +1,8 @@
package net.minecraft.server;
// CraftBukkit start
-import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.event.entity.EntityDamageByBlockEvent;
import org.bukkit.event.entity.EntityDamageEvent;
-import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
// CraftBukkit end
import java.util.Random;
@@ -85,14 +83,11 @@ public class BlockCactus extends Block {
public void a(World world, int i, int j, int k, Entity entity) {
// CraftBukkit start - ENTITY_DAMAGEBY_BLOCK event
if (entity instanceof EntityLiving) {
- CraftServer server = ((WorldServer) world).getServer();
- org.bukkit.block.Block damager = ((WorldServer) world).getWorld().getBlockAt(i, j, k);
+ org.bukkit.block.Block damager = world.getWorld().getBlockAt(i, j, k);
org.bukkit.entity.Entity damagee = (entity == null) ? null : entity.getBukkitEntity();
- DamageCause damageType = EntityDamageEvent.DamageCause.CONTACT;
- int damageDone = 1;
- EntityDamageByBlockEvent event = new EntityDamageByBlockEvent(damager, damagee, damageType, damageDone);
- server.getPluginManager().callEvent(event);
+ EntityDamageByBlockEvent event = new EntityDamageByBlockEvent(damager, damagee, EntityDamageEvent.DamageCause.CONTACT, 1);
+ world.getServer().getPluginManager().callEvent(event);
if (!event.isCancelled()) {
entity.damageEntity((Entity) null, event.getDamage());
@@ -100,6 +95,7 @@ public class BlockCactus extends Block {
return;
}
// CraftBukkit end
+
entity.damageEntity((Entity) null, 1);
}
}
diff --git a/src/main/java/net/minecraft/server/BlockDispenser.java b/src/main/java/net/minecraft/server/BlockDispenser.java
index 04fbed78c4..f5d1fa0e85 100644
--- a/src/main/java/net/minecraft/server/BlockDispenser.java
+++ b/src/main/java/net/minecraft/server/BlockDispenser.java
@@ -3,13 +3,7 @@ package net.minecraft.server;
import java.util.Random;
// CraftBukkit start
-import org.bukkit.block.BlockState;
-import org.bukkit.block.Dispenser;
-import org.bukkit.craftbukkit.CraftServer;
-import org.bukkit.craftbukkit.CraftWorld;
-import org.bukkit.craftbukkit.block.CraftBlock;
import org.bukkit.craftbukkit.inventory.CraftItemStack;
-import org.bukkit.event.block.BlockDamageEvent;
import org.bukkit.event.block.BlockDispenseEvent;
import org.bukkit.util.Vector;
// CraftBukkit end
@@ -123,19 +117,18 @@ public class BlockDispenser extends BlockContainer {
motY += random.nextGaussian() * 0.007499999832361937D * 6.0D;
motZ += random.nextGaussian() * 0.007499999832361937D * 6.0D;
- CraftWorld craftWorld = ((WorldServer) world).getWorld();
- CraftServer server = ((WorldServer) world).getServer();
- CraftBlock block = (CraftBlock) craftWorld.getBlockAt(i, j, k);
- org.bukkit.inventory.ItemStack bukkitItem = (new CraftItemStack(itemstack)).clone();
+ org.bukkit.block.Block block = world.getWorld().getBlockAt(i, j, k);
+ org.bukkit.inventory.ItemStack bukkitItem = new CraftItemStack(itemstack).clone();
+
BlockDispenseEvent event = new BlockDispenseEvent(block, bukkitItem, new Vector(motX, motY, motZ));
- server.getPluginManager().callEvent(event);
+ world.getServer().getPluginManager().callEvent(event);
if (event.isCancelled()) {
return;
}
// Actually remove the item
- tileentitydispenser.a(dispenseSlot, 1);
+ tileentitydispenser.splitStack(dispenseSlot, 1);
motX = event.getVelocity().getX();
motY = event.getVelocity().getY();
@@ -148,7 +141,7 @@ public class BlockDispenser extends BlockContainer {
EntityArrow entityarrow = new EntityArrow(world, d0, d1, d2);
entityarrow.a((double) b0, 0.10000000149011612D, (double) b1, 1.1F, 6.0F);
- entityarrow.a = true;
+ entityarrow.fromPlayer = true;
world.addEntity(entityarrow);
world.e(1002, i, j, k, 0);
} else if (itemstack.id == Item.EGG.id) {
@@ -167,7 +160,6 @@ public class BlockDispenser extends BlockContainer {
EntityItem entityitem = new EntityItem(world, d0, d1 - 0.3D, d2, itemstack);
// CraftBukkit start
// double d3 = random.nextDouble() * 0.1D + 0.2D; // Moved up
-
entityitem.motX = motX;
entityitem.motY = motY;
entityitem.motZ = motZ;
diff --git a/src/main/java/net/minecraft/server/BlockDoor.java b/src/main/java/net/minecraft/server/BlockDoor.java
index 914a80c303..4b2162a57a 100644
--- a/src/main/java/net/minecraft/server/BlockDoor.java
+++ b/src/main/java/net/minecraft/server/BlockDoor.java
@@ -2,11 +2,7 @@ package net.minecraft.server;
import java.util.Random;
-// CraftBukkit start
-import org.bukkit.craftbukkit.CraftServer;
-import org.bukkit.craftbukkit.CraftWorld;
-import org.bukkit.event.block.BlockRedstoneEvent;
-// CraftBukkit end
+import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
public class BlockDoor extends Block {
@@ -170,16 +166,16 @@ public class BlockDoor extends Block {
boolean flag1 = world.isBlockIndirectlyPowered(i, j, k) || world.isBlockIndirectlyPowered(i, j + 1, k);
// CraftBukkit start
- CraftWorld craftWorld = ((WorldServer) world).getWorld();
- CraftServer server = ((WorldServer) world).getServer();
- org.bukkit.block.Block block = craftWorld.getBlockAt(i, j, k);
- org.bukkit.block.Block blockTop = craftWorld.getBlockAt(i, j + 1, k);
+ org.bukkit.World bworld = world.getWorld();
+ org.bukkit.block.Block block = bworld.getBlockAt(i, j, k);
+ org.bukkit.block.Block blockTop = bworld.getBlockAt(i, j + 1, k);
+
int power = block.getBlockPower();
int powerTop = blockTop.getBlockPower();
if (powerTop > power) power = powerTop;
- BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, (world.getData(i, j, k) & 4) > 0 ? 15 : 0, power);
- server.getPluginManager().callEvent(eventRedstone);
+ BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, (world.getData(i, j, k) & 4) > 0 ? 15 : 0, power);
+ world.getServer().getPluginManager().callEvent(eventRedstone);
flag1 = eventRedstone.getNewCurrent() > 0;
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java
index 56b1518f4e..600f25289c 100644
--- a/src/main/java/net/minecraft/server/BlockFire.java
+++ b/src/main/java/net/minecraft/server/BlockFire.java
@@ -3,11 +3,8 @@ package net.minecraft.server;
import java.util.Random;
// CraftBukkit start
-import org.bukkit.Server;
-import org.bukkit.entity.Player;
import org.bukkit.event.block.BlockIgniteEvent;
import org.bukkit.event.block.BlockIgniteEvent.IgniteCause;
-import org.bukkit.craftbukkit.CraftWorld;
import org.bukkit.event.block.BlockBurnEvent;
// CraftBukkit end
@@ -90,11 +87,10 @@ public class BlockFire extends Block {
this.a(world, i, j, k + 1, 300, random, l);
// CraftBukkit start - Call to stop spread of fire.
- Server server = ((WorldServer) world).getServer();
- CraftWorld cworld = ((WorldServer) world).getWorld();
+ org.bukkit.Server server = world.getServer();
+ org.bukkit.World bworld = world.getWorld();
IgniteCause igniteCause = BlockIgniteEvent.IgniteCause.SPREAD;
- Player thePlayer = null;
// CraftBukkit
for (int i1 = i - 1; i1 <= i + 1; ++i1) {
@@ -119,11 +115,12 @@ public class BlockFire extends Block {
k2 = 15;
}
// CraftBukkit start - Call to stop spread of fire.
- org.bukkit.block.Block theBlock = cworld.getBlockAt(i1, k1, j1);
+ org.bukkit.block.Block block = bworld.getBlockAt(i1, k1, j1);
- if (theBlock.getTypeId() != Block.FIRE.id) {
- BlockIgniteEvent event = new BlockIgniteEvent(theBlock, igniteCause, thePlayer);
+ if (block.getTypeId() != Block.FIRE.id) {
+ BlockIgniteEvent event = new BlockIgniteEvent(block, igniteCause, null);
server.getPluginManager().callEvent(event);
+
if (event.isCancelled()) {
continue;
}
@@ -147,11 +144,11 @@ public class BlockFire extends Block {
if (random.nextInt(l) < j1) {
boolean flag = world.getTypeId(i, j, k) == Block.TNT.id;
// CraftBukkit start
- Server server = ((WorldServer) world).getServer();
- CraftWorld cworld = ((WorldServer) world).getWorld();
- org.bukkit.block.Block theBlock = cworld.getBlockAt(i, j, k);
+ org.bukkit.block.Block theBlock = world.getWorld().getBlockAt(i, j, k);
+
BlockBurnEvent event = new BlockBurnEvent(theBlock);
- server.getPluginManager().callEvent(event);
+ world.getServer().getPluginManager().callEvent(event);
+
if (event.isCancelled()) {
return;
}
diff --git a/src/main/java/net/minecraft/server/BlockFlowing.java b/src/main/java/net/minecraft/server/BlockFlowing.java
index e803535991..3a30fc46cb 100644
--- a/src/main/java/net/minecraft/server/BlockFlowing.java
+++ b/src/main/java/net/minecraft/server/BlockFlowing.java
@@ -4,9 +4,6 @@ import java.util.Random;
// CraftBukkit start
import org.bukkit.block.BlockFace;
-import org.bukkit.craftbukkit.CraftServer;
-import org.bukkit.craftbukkit.CraftWorld;
-import org.bukkit.craftbukkit.block.CraftBlock;
import org.bukkit.event.block.BlockFromToEvent;
// CraftBukkit end
@@ -30,9 +27,9 @@ public class BlockFlowing extends BlockFluids {
public void a(World world, int i, int j, int k, Random random) {
// CraftBukkit start
- CraftWorld cworld = ((WorldServer) world).getWorld();
- CraftServer server = ((WorldServer) world).getServer();
- CraftBlock source = cworld == null ? null : (CraftBlock) cworld.getBlockAt(i, j, k);
+ org.bukkit.World bworld = world.getWorld();
+ org.bukkit.Server server = world.getServer();
+ org.bukkit.block.Block source = bworld == null ? null : bworld.getBlockAt(i, j, k);
// CraftBukkit end
int l = this.g(world, i, j, k);
diff --git a/src/main/java/net/minecraft/server/BlockIce.java b/src/main/java/net/minecraft/server/BlockIce.java
index bdd7d66053..7fef5bb020 100644
--- a/src/main/java/net/minecraft/server/BlockIce.java
+++ b/src/main/java/net/minecraft/server/BlockIce.java
@@ -2,12 +2,7 @@ package net.minecraft.server;
import java.util.Random;
-// CraftBukkit start
-import org.bukkit.block.BlockState;
-import org.bukkit.craftbukkit.CraftServer;
-import org.bukkit.craftbukkit.CraftWorld;
-import org.bukkit.event.block.BlockFadeEvent;
-// CraftBukkit end
+import org.bukkit.event.block.BlockFadeEvent; // CraftBukkit
public class BlockIce extends BlockBreakable {
@@ -32,13 +27,12 @@ public class BlockIce extends BlockBreakable {
public void a(World world, int i, int j, int k, Random random) {
if (world.a(EnumSkyBlock.BLOCK, i, j, k) > 11 - Block.q[this.id]) {
// CraftBukkit start
- CraftServer server = world.getServer();
- CraftWorld cworld = world.getWorld();
- BlockState blockState = cworld.getBlockAt(i, j, k).getState();
+ org.bukkit.block.BlockState blockState = world.getWorld().getBlockAt(i, j, k).getState();
blockState.setTypeId(this.id);
- BlockFadeEvent event = new BlockFadeEvent(cworld.getBlockAt(i, j, k), blockState);
- server.getPluginManager().callEvent(event);
+ BlockFadeEvent event = new BlockFadeEvent(blockState.getBlock(), blockState);
+ world.getServer().getPluginManager().callEvent(event);
+
if (event.isCancelled()) {
return;
}
diff --git a/src/main/java/net/minecraft/server/BlockLeaves.java b/src/main/java/net/minecraft/server/BlockLeaves.java
index 037881ef4b..7e1f258c77 100644
--- a/src/main/java/net/minecraft/server/BlockLeaves.java
+++ b/src/main/java/net/minecraft/server/BlockLeaves.java
@@ -2,11 +2,7 @@ package net.minecraft.server;
import java.util.Random;
-// CraftBukkit start
-import org.bukkit.craftbukkit.CraftServer;
-import org.bukkit.craftbukkit.CraftWorld;
-import org.bukkit.event.block.LeavesDecayEvent;
-// CraftBukkit end
+import org.bukkit.event.block.LeavesDecayEvent; // CraftBukkit
public class BlockLeaves extends BlockLeavesBase {
@@ -124,10 +120,8 @@ public class BlockLeaves extends BlockLeavesBase {
private void g(World world, int i, int j, int k) {
// CraftBukkit start
- CraftServer server = ((WorldServer) world).getServer();
- CraftWorld cworld = ((WorldServer) world).getWorld();
- LeavesDecayEvent event = new LeavesDecayEvent(cworld.getBlockAt(i, j, k));
- server.getPluginManager().callEvent(event);
+ LeavesDecayEvent event = new LeavesDecayEvent(world.getWorld().getBlockAt(i, j, k));
+ world.getServer().getPluginManager().callEvent(event);
if (event.isCancelled()) return;
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/BlockLever.java b/src/main/java/net/minecraft/server/BlockLever.java
index ba408119bd..031ef09fde 100644
--- a/src/main/java/net/minecraft/server/BlockLever.java
+++ b/src/main/java/net/minecraft/server/BlockLever.java
@@ -1,11 +1,6 @@
package net.minecraft.server;
-// CraftBukkit start
-import org.bukkit.craftbukkit.CraftServer;
-import org.bukkit.craftbukkit.CraftWorld;
-import org.bukkit.craftbukkit.block.CraftBlock;
-import org.bukkit.event.block.BlockRedstoneEvent;
-// CraftBukkit end
+import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
public class BlockLever extends Block {
@@ -144,14 +139,12 @@ public class BlockLever extends Block {
int j1 = 8 - (l & 8);
// CraftBukkit start - Interact Lever
- CraftWorld craftWorld = ((WorldServer) world).getWorld();
- CraftServer server = ((WorldServer) world).getServer();
- CraftBlock block = (CraftBlock) craftWorld.getBlockAt(i, j, k);
-
+ org.bukkit.block.Block block = world.getWorld().getBlockAt(i, j, k);
int old = (j1 != 8) ? 1 : 0;
int current = (j1 == 8) ? 1 : 0;
+
BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, old, current);
- server.getPluginManager().callEvent(eventRedstone);
+ world.getServer().getPluginManager().callEvent(eventRedstone);
if ((eventRedstone.getNewCurrent() > 0) != (j1 == 8)) {
return true;
diff --git a/src/main/java/net/minecraft/server/BlockMinecartDetector.java b/src/main/java/net/minecraft/server/BlockMinecartDetector.java
index 2df1f3883d..c2d629f9a2 100644
--- a/src/main/java/net/minecraft/server/BlockMinecartDetector.java
+++ b/src/main/java/net/minecraft/server/BlockMinecartDetector.java
@@ -3,16 +3,7 @@ package net.minecraft.server;
import java.util.List;
import java.util.Random;
-// CraftBukkit start
-import org.bukkit.Bukkit;
-import org.bukkit.craftbukkit.CraftServer;
-import org.bukkit.craftbukkit.CraftWorld;
-import org.bukkit.craftbukkit.block.CraftBlock;
-import org.bukkit.craftbukkit.event.CraftEventFactory;
-import org.bukkit.event.Cancellable;
-import org.bukkit.event.block.Action;
-import org.bukkit.event.block.BlockRedstoneEvent;
-// CraftBukkit end
+import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
public class BlockMinecartDetector extends BlockMinecartTrack {
@@ -69,12 +60,10 @@ public class BlockMinecartDetector extends BlockMinecartTrack {
// CraftBukkit start
if (flag != flag1) {
- CraftServer server = world.getServer();
- CraftWorld craftWorld = world.getWorld();
- CraftBlock block = (CraftBlock) craftWorld.getBlockAt(i, j, k);
+ org.bukkit.block.Block block = world.getWorld().getBlockAt(i, j, k);
BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, flag ? 1 : 0, flag1 ? 1 : 0);
- server.getPluginManager().callEvent(eventRedstone);
+ world.getServer().getPluginManager().callEvent(eventRedstone);
flag1 = eventRedstone.getNewCurrent() > 0;
}
diff --git a/src/main/java/net/minecraft/server/BlockMushroom.java b/src/main/java/net/minecraft/server/BlockMushroom.java
index b33814253f..658b37074b 100644
--- a/src/main/java/net/minecraft/server/BlockMushroom.java
+++ b/src/main/java/net/minecraft/server/BlockMushroom.java
@@ -2,13 +2,7 @@ package net.minecraft.server;
import java.util.Random;
-// CraftBukkit start
-import org.bukkit.Location;
-import org.bukkit.Server;
-import org.bukkit.block.BlockState;
-import org.bukkit.craftbukkit.CraftWorld;
-import org.bukkit.event.block.BlockSpreadEvent;
-// CraftBukkit end
+import org.bukkit.event.block.BlockSpreadEvent; // CraftBukkit
public class BlockMushroom extends BlockFlower {
@@ -32,14 +26,12 @@ public class BlockMushroom extends BlockFlower {
k1 = k + (random.nextInt(3) - 1);
if (world.isEmpty(l, i1, j1) && this.f(world, l, i1, j1)) {
// CraftBukkit start
- Server server = world.getServer();
- CraftWorld craftworld = world.getWorld();
- BlockState blockState = craftworld.getBlockAt(l, i1, j1).getState();
+ org.bukkit.World bworld = world.getWorld();
+ org.bukkit.block.BlockState blockState = bworld.getBlockAt(l, i1, j1).getState();
blockState.setTypeId(this.id);
- BlockSpreadEvent event = new BlockSpreadEvent(craftworld.getBlockAt(l, i1, j1), craftworld.getBlockAt(i, j, k), blockState);
-
- server.getPluginManager().callEvent(event);
+ BlockSpreadEvent event = new BlockSpreadEvent(blockState.getBlock(), bworld.getBlockAt(i, j, k), blockState);
+ world.getServer().getPluginManager().callEvent(event);
if (!event.isCancelled()) {
blockState.update(true);
diff --git a/src/main/java/net/minecraft/server/BlockPortal.java b/src/main/java/net/minecraft/server/BlockPortal.java
index 4bc78f449c..fe52619841 100644
--- a/src/main/java/net/minecraft/server/BlockPortal.java
+++ b/src/main/java/net/minecraft/server/BlockPortal.java
@@ -3,10 +3,6 @@ package net.minecraft.server;
import java.util.Random;
// CraftBukkit start
-import java.util.ArrayList;
-
-import org.bukkit.Bukkit;
-import org.bukkit.craftbukkit.CraftWorld;
import org.bukkit.event.entity.EntityPortalEnterEvent;
import org.bukkit.event.world.PortalCreateEvent;
// CraftBukkit end
@@ -60,8 +56,8 @@ public class BlockPortal extends BlockBreakable {
return false;
} else {
// CraftBukkit start
- java.util.ArrayList blocks = new ArrayList();
- CraftWorld craftWorld = world.getWorld();
+ java.util.Collection blocks = new java.util.HashSet();
+ org.bukkit.World bworld = world.getWorld();
// CraftBukkit end
if (world.getTypeId(i - b0, j, k - b1) == 0) {
@@ -83,12 +79,7 @@ public class BlockPortal extends BlockBreakable {
if (j1 != Block.OBSIDIAN.id) {
return false;
} else {
- // CraftBukkit start
- org.bukkit.block.Block b = craftWorld.getBlockAt(i + b0 * l, j + i1, k + b1 * l);
- if (!blocks.contains(b)) {
- blocks.add(b);
- }
- // CraftBukkit end
+ blocks.add(bworld.getBlockAt(i + b0 * l, j + i1, k + b1 * l)); // CraftBukkit
}
} else if (j1 != 0 && j1 != Block.FIRE.id) {
return false;
@@ -100,21 +91,19 @@ public class BlockPortal extends BlockBreakable {
// CraftBukkit start
for (l = 0; l < 2; ++l) {
for (i1 = 0; i1 < 3; ++i1) {
- org.bukkit.block.Block b = craftWorld.getBlockAt(i + b0 * l, j + i1, k + b1 * l);
- if (!blocks.contains(b)) {
- blocks.add(b);
- }
+ blocks.add(bworld.getBlockAt(i + b0 * l, j + i1, k + b1 * l));
}
}
- PortalCreateEvent event = new PortalCreateEvent(blocks, (org.bukkit.World) craftWorld);
- Bukkit.getServer().getPluginManager().callEvent(event);
+ PortalCreateEvent event = new PortalCreateEvent(blocks, bworld);
+ world.getServer().getPluginManager().callEvent(event);
+
if (event.isCancelled()) {
return false;
}
// CraftBukkit end
- world.o = true;
+ world.suppressPhysics = true;
for (l = 0; l < 2; ++l) {
for (i1 = 0; i1 < 3; ++i1) {
@@ -122,7 +111,7 @@ public class BlockPortal extends BlockBreakable {
}
}
- world.o = false;
+ world.suppressPhysics = false;
return true;
}
}
@@ -173,9 +162,8 @@ public class BlockPortal extends BlockBreakable {
public void a(World world, int i, int j, int k, Entity entity) {
if (entity.vehicle == null && entity.passenger == null) {
// CraftBukkit start - Entity in portal
- CraftWorld craftWorld = ((WorldServer) world).getWorld();
- EntityPortalEnterEvent event = new EntityPortalEnterEvent(entity.getBukkitEntity(), new org.bukkit.Location(craftWorld, i, j, k));
- Bukkit.getServer().getPluginManager().callEvent(event);
+ EntityPortalEnterEvent event = new EntityPortalEnterEvent(entity.getBukkitEntity(), new org.bukkit.Location(world.getWorld(), i, j, k));
+ world.getServer().getPluginManager().callEvent(event);
// CraftBukkit end
entity.O();
diff --git a/src/main/java/net/minecraft/server/BlockPressurePlate.java b/src/main/java/net/minecraft/server/BlockPressurePlate.java
index 98a4a6556e..4b0f49c4d4 100644
--- a/src/main/java/net/minecraft/server/BlockPressurePlate.java
+++ b/src/main/java/net/minecraft/server/BlockPressurePlate.java
@@ -4,16 +4,9 @@ import java.util.List;
import java.util.Random;
// CraftBukkit start
-import org.bukkit.Bukkit;
-import org.bukkit.craftbukkit.CraftServer;
-import org.bukkit.craftbukkit.CraftWorld;
-import org.bukkit.craftbukkit.block.CraftBlock;
import org.bukkit.craftbukkit.event.CraftEventFactory;
-import org.bukkit.event.Cancellable;
-import org.bukkit.event.block.Action;
import org.bukkit.event.block.BlockRedstoneEvent;
import org.bukkit.event.entity.EntityInteractEvent;
-import org.bukkit.event.player.PlayerInteractEvent;
// CraftBukkit end
public class BlockPressurePlate extends Block {
@@ -103,17 +96,20 @@ public class BlockPressurePlate extends Block {
}
// CraftBukkit start - Interact Pressure Plate
+ org.bukkit.World bworld = world.getWorld();
+ org.bukkit.plugin.PluginManager manager = world.getServer().getPluginManager();
+
if (flag != flag1) {
if (flag1) {
for (Object object: list) {
if (object != null) {
- Cancellable cancellable;
+ org.bukkit.event.Cancellable cancellable;
if (object instanceof EntityHuman) {
- cancellable = CraftEventFactory.callPlayerInteractEvent((EntityHuman) object, Action.PHYSICAL, i, j, k, -1, null);
+ cancellable = CraftEventFactory.callPlayerInteractEvent((EntityHuman) object, org.bukkit.event.block.Action.PHYSICAL, i, j, k, -1, null);
} else if (object instanceof Entity) {
- cancellable = new EntityInteractEvent(((Entity) object).getBukkitEntity(), ((WorldServer) world).getWorld().getBlockAt(i, j, k));
- ((CraftServer) Bukkit.getServer()).getPluginManager().callEvent((EntityInteractEvent) cancellable);
+ cancellable = new EntityInteractEvent(((Entity) object).getBukkitEntity(), bworld.getBlockAt(i, j, k));
+ manager.callEvent((EntityInteractEvent) cancellable);
} else {
continue;
}
@@ -124,12 +120,8 @@ public class BlockPressurePlate extends Block {
}
}
- CraftServer server = ((WorldServer) world).getServer();
- CraftWorld craftWorld = ((WorldServer) world).getWorld();
- CraftBlock block = (CraftBlock) craftWorld.getBlockAt(i, j, k);
-
- BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, flag ? 1 : 0, flag1 ? 1 : 0);
- server.getPluginManager().callEvent(eventRedstone);
+ BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(bworld.getBlockAt(i, j, k), flag ? 1 : 0, flag1 ? 1 : 0);
+ manager.callEvent(eventRedstone);
flag1 = eventRedstone.getNewCurrent() > 0;
}
diff --git a/src/main/java/net/minecraft/server/BlockPumpkin.java b/src/main/java/net/minecraft/server/BlockPumpkin.java
index 3837aaa119..1a20c4b98b 100644
--- a/src/main/java/net/minecraft/server/BlockPumpkin.java
+++ b/src/main/java/net/minecraft/server/BlockPumpkin.java
@@ -1,10 +1,6 @@
package net.minecraft.server;
-// CraftBukkit start
-import org.bukkit.craftbukkit.CraftServer;
-import org.bukkit.craftbukkit.CraftWorld;
-import org.bukkit.event.block.BlockRedstoneEvent;
-// CraftBukkit end
+import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
public class BlockPumpkin extends Block {
@@ -56,13 +52,11 @@ public class BlockPumpkin extends Block {
// CraftBukkit start
public void doPhysics(World world, int i, int j, int k, int l) {
if (net.minecraft.server.Block.byId[l] != null && net.minecraft.server.Block.byId[l].isPowerSource()) {
- CraftWorld craftWorld = ((WorldServer) world).getWorld();
- CraftServer server = ((WorldServer) world).getServer();
- org.bukkit.block.Block block = craftWorld.getBlockAt(i, j, k);
+ org.bukkit.block.Block block = world.getWorld().getBlockAt(i, j, k);
int power = block.getBlockPower();
BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, power, power);
- server.getPluginManager().callEvent(eventRedstone);
+ world.getServer().getPluginManager().callEvent(eventRedstone);
}
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java
index 5608983c6a..a5d8d2cc00 100644
--- a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java
+++ b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java
@@ -4,11 +4,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Random;
-// CraftBukkit start
-import org.bukkit.craftbukkit.block.CraftBlock;
-import org.bukkit.event.block.BlockRedstoneEvent;
-import org.bukkit.plugin.PluginManager;
-// CraftBukkit end
+import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
public class BlockRedstoneTorch extends BlockTorch {
@@ -100,9 +96,10 @@ public class BlockRedstoneTorch extends BlockTorch {
}
// CraftBukkit start
- CraftBlock block = (CraftBlock) ((WorldServer) world).getWorld().getBlockAt(i, j, k);
- PluginManager man = ((WorldServer) world).getServer().getPluginManager();
+ org.bukkit.plugin.PluginManager manager = world.getServer().getPluginManager();
+ org.bukkit.block.Block block = world.getWorld().getBlockAt(i, j, k);
int oldCurrent = this.isOn ? 15 : 0;
+
BlockRedstoneEvent event = new BlockRedstoneEvent(block, oldCurrent, oldCurrent);
// CraftBukkit end
@@ -111,7 +108,7 @@ public class BlockRedstoneTorch extends BlockTorch {
// CraftBukkit start
if (oldCurrent != 0) {
event.setNewCurrent(0);
- man.callEvent(event);
+ manager.callEvent(event);
if (event.getNewCurrent() != 0) {
return;
}
@@ -135,7 +132,7 @@ public class BlockRedstoneTorch extends BlockTorch {
// CraftBukkit start
if (oldCurrent != 15) {
event.setNewCurrent(15);
- man.callEvent(event);
+ manager.callEvent(event);
if (event.getNewCurrent() != 15) {
return;
}
diff --git a/src/main/java/net/minecraft/server/BlockRedstoneWire.java b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
index 82e74257ae..907d847f5a 100644
--- a/src/main/java/net/minecraft/server/BlockRedstoneWire.java
+++ b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
@@ -5,10 +5,7 @@ import java.util.HashSet;
import java.util.Random;
import java.util.Set;
-// CraftBukkit start
-import org.bukkit.craftbukkit.block.CraftBlock;
-import org.bukkit.event.block.BlockRedstoneEvent;
-// CraftBukkit end
+import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
public class BlockRedstoneWire extends Block {
@@ -109,18 +106,18 @@ public class BlockRedstoneWire extends Block {
// CraftBukkit start
if (k1 != l1) {
- CraftBlock block = (CraftBlock) ((WorldServer) world).getWorld().getBlockAt(i, j, k);
- BlockRedstoneEvent event = new BlockRedstoneEvent(block, k1, l1);
- ((WorldServer) world).getServer().getPluginManager().callEvent(event);
+ BlockRedstoneEvent event = new BlockRedstoneEvent(world.getWorld().getBlockAt(i, j, k), k1, l1);
+ world.getServer().getPluginManager().callEvent(event);
+
l1 = event.getNewCurrent();
}
// CraftBukkit end
if (k1 != l1) {
- world.o = true;
+ world.suppressPhysics = true;
world.setData(i, j, k, l1);
world.b(i, j, k, i, j, k);
- world.o = false;
+ world.suppressPhysics = false;
for (i2 = 0; i2 < 4; ++i2) {
j2 = i;
diff --git a/src/main/java/net/minecraft/server/BlockSapling.java b/src/main/java/net/minecraft/server/BlockSapling.java
index 58e6bf58d9..0106d612a2 100644
--- a/src/main/java/net/minecraft/server/BlockSapling.java
+++ b/src/main/java/net/minecraft/server/BlockSapling.java
@@ -71,15 +71,15 @@ public class BlockSapling extends BlockFlower {
BlockChangeWithNotify(World world) { this.world = world; }
public boolean setRawTypeId(int x, int y, int z, int type) {
- return world.setTypeId(x, y, z, type);
+ return this.world.setTypeId(x, y, z, type);
}
public boolean setRawTypeIdAndData(int x, int y, int z, int type, int data) {
- return world.setTypeIdAndData(x, y, z, type, data);
+ return this.world.setTypeIdAndData(x, y, z, type, data);
}
public int getTypeId(int x, int y, int z) {
- return world.getTypeId(x, y, z);
+ return this.world.getTypeId(x, y, z);
}
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/BlockSign.java b/src/main/java/net/minecraft/server/BlockSign.java
index 545718432a..cfb9cdeed6 100644
--- a/src/main/java/net/minecraft/server/BlockSign.java
+++ b/src/main/java/net/minecraft/server/BlockSign.java
@@ -2,12 +2,7 @@ package net.minecraft.server;
import java.util.Random;
-// CraftBukkit start
-import org.bukkit.craftbukkit.CraftServer;
-import org.bukkit.craftbukkit.CraftWorld;
-import org.bukkit.block.Block;
-import org.bukkit.event.block.BlockRedstoneEvent;
-// CraftBukkit end
+import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
public class BlockSign extends BlockContainer {
@@ -114,13 +109,11 @@ public class BlockSign extends BlockContainer {
// CraftBukkit start
if (net.minecraft.server.Block.byId[l] != null && net.minecraft.server.Block.byId[l].isPowerSource()) {
- CraftWorld craftWorld = ((WorldServer) world).getWorld();
- CraftServer server = ((WorldServer) world).getServer();
- Block block = craftWorld.getBlockAt(i, j, k);
+ org.bukkit.block.Block block = world.getWorld().getBlockAt(i, j, k);
int power = block.getBlockPower();
BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, power, power);
- server.getPluginManager().callEvent(eventRedstone);
+ world.getServer().getPluginManager().callEvent(eventRedstone);
}
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/server/BlockSnow.java b/src/main/java/net/minecraft/server/BlockSnow.java
index bd5aad77b2..8f9dc0d944 100644
--- a/src/main/java/net/minecraft/server/BlockSnow.java
+++ b/src/main/java/net/minecraft/server/BlockSnow.java
@@ -2,12 +2,7 @@ package net.minecraft.server;
import java.util.Random;
-// CraftBukkit start
-import org.bukkit.block.BlockState;
-import org.bukkit.craftbukkit.CraftServer;
-import org.bukkit.craftbukkit.CraftWorld;
-import org.bukkit.event.block.BlockFadeEvent;
-// CraftBukkit end
+import org.bukkit.event.block.BlockFadeEvent; // CraftBukkit
public class BlockSnow extends Block {
@@ -83,13 +78,12 @@ public class BlockSnow extends Block {
public void a(World world, int i, int j, int k, Random random) {
if (world.a(EnumSkyBlock.BLOCK, i, j, k) > 11) {
// CraftBukkit start
- CraftServer server = world.getServer();
- CraftWorld cworld = world.getWorld();
- BlockState blockState = cworld.getBlockAt(i, j, k).getState();
+ org.bukkit.block.BlockState blockState = world.getWorld().getBlockAt(i, j, k).getState();
blockState.setTypeId(this.id);
- BlockFadeEvent event = new BlockFadeEvent(cworld.getBlockAt(i, j, k), blockState);
- server.getPluginManager().callEvent(event);
+ BlockFadeEvent event = new BlockFadeEvent(blockState.getBlock(), blockState);
+ world.getServer().getPluginManager().callEvent(event);
+
if (event.isCancelled()) {
return;
}
diff --git a/src/main/java/net/minecraft/server/BlockSoil.java b/src/main/java/net/minecraft/server/BlockSoil.java
index 43f0e432f0..0ff91b0a29 100644
--- a/src/main/java/net/minecraft/server/BlockSoil.java
+++ b/src/main/java/net/minecraft/server/BlockSoil.java
@@ -3,11 +3,7 @@ package net.minecraft.server;
import java.util.Random;
// CraftBukkit start
-import org.bukkit.Bukkit;
-import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.event.CraftEventFactory;
-import org.bukkit.event.Cancellable;
-import org.bukkit.event.block.Action;
import org.bukkit.event.entity.EntityInteractEvent;
// CraftBukkit end
@@ -56,12 +52,12 @@ public class BlockSoil extends Block {
public void b(World world, int i, int j, int k, Entity entity) {
if (world.random.nextInt(4) == 0) {
// CraftBukkit start - Interact Soil
- Cancellable cancellable;
+ org.bukkit.event.Cancellable cancellable;
if (entity instanceof EntityHuman) {
- cancellable = CraftEventFactory.callPlayerInteractEvent((EntityHuman) entity, Action.PHYSICAL, i, j, k, -1, null);
+ cancellable = CraftEventFactory.callPlayerInteractEvent((EntityHuman) entity, org.bukkit.event.block.Action.PHYSICAL, i, j, k, -1, null);
} else {
- cancellable = new EntityInteractEvent(entity.getBukkitEntity(), ((WorldServer) world).getWorld().getBlockAt(i, j, k));
- ((CraftServer) Bukkit.getServer()).getPluginManager().callEvent((EntityInteractEvent) cancellable);
+ cancellable = new EntityInteractEvent(entity.getBukkitEntity(), world.getWorld().getBlockAt(i, j, k));
+ world.getServer().getPluginManager().callEvent((EntityInteractEvent) cancellable);
}
if (cancellable.isCancelled()) {
diff --git a/src/main/java/net/minecraft/server/BlockStationary.java b/src/main/java/net/minecraft/server/BlockStationary.java
index 09cd512911..fd45ee70e1 100644
--- a/src/main/java/net/minecraft/server/BlockStationary.java
+++ b/src/main/java/net/minecraft/server/BlockStationary.java
@@ -2,13 +2,7 @@ package net.minecraft.server;
import java.util.Random;
-// CraftBukkit start
-import org.bukkit.Server;
-import org.bukkit.entity.Player;
-import org.bukkit.event.block.BlockIgniteEvent;
-import org.bukkit.event.block.BlockIgniteEvent.IgniteCause;
-import org.bukkit.craftbukkit.CraftWorld;
-// CraftBukkit end
+import org.bukkit.event.block.BlockIgniteEvent; // CraftBukkit
public class BlockStationary extends BlockFluids {
@@ -30,11 +24,11 @@ public class BlockStationary extends BlockFluids {
private void i(World world, int i, int j, int k) {
int l = world.getData(i, j, k);
- world.o = true;
+ world.suppressPhysics = true;
world.setRawTypeIdAndData(i, j, k, this.id - 1, l);
world.b(i, j, k, i, j, k);
world.c(i, j, k, this.id - 1, this.c());
- world.o = false;
+ world.suppressPhysics = false;
}
public void a(World world, int i, int j, int k, Random random) {
@@ -42,11 +36,8 @@ public class BlockStationary extends BlockFluids {
int l = random.nextInt(3);
// CraftBukkit start - prevent lava putting something on fire.
- Server server = ((WorldServer) world).getServer();
- CraftWorld cworld = ((WorldServer) world).getWorld();
-
- IgniteCause igniteCause = BlockIgniteEvent.IgniteCause.LAVA;
- Player thePlayer = null;
+ org.bukkit.World bworld = world.getWorld();
+ BlockIgniteEvent.IgniteCause igniteCause = BlockIgniteEvent.IgniteCause.LAVA;
// CraftBukkit end
for (int i1 = 0; i1 < l; ++i1) {
@@ -58,11 +49,12 @@ public class BlockStationary extends BlockFluids {
if (j1 == 0) {
if (this.j(world, i - 1, j, k) || this.j(world, i + 1, j, k) || this.j(world, i, j, k - 1) || this.j(world, i, j, k + 1) || this.j(world, i, j - 1, k) || this.j(world, i, j + 1, k)) {
// CraftBukkit start - prevent lava putting something on fire.
- org.bukkit.block.Block theBlock = cworld.getBlockAt(i, j, k);
+ org.bukkit.block.Block block = bworld.getBlockAt(i, j, k);
+
+ if (block.getTypeId() != Block.FIRE.id) {
+ BlockIgniteEvent event = new BlockIgniteEvent(block, igniteCause, null);
+ world.getServer().getPluginManager().callEvent(event);
- if (theBlock.getTypeId() != Block.FIRE.id) {
- BlockIgniteEvent event = new BlockIgniteEvent(theBlock, igniteCause, thePlayer);
- server.getPluginManager().callEvent(event);
if (event.isCancelled()) {
continue;
}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index a3ed445236..23735b6ad2 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -6,12 +6,6 @@ import java.util.List;
import java.util.Map;
import java.util.Random;
-// CraftBukkit start
-import java.util.Iterator;
-import org.bukkit.Location;
-import org.bukkit.craftbukkit.CraftWorld;
-// CraftBukkit end
-
public class Chunk {
public static boolean a;
@@ -21,7 +15,7 @@ public class Chunk {
public NibbleArray e;
public NibbleArray f;
public NibbleArray g;
- public byte[] h;
+ public byte[] heightMap;
public int i;
public final int x;
public final int z;
@@ -43,17 +37,17 @@ public class Chunk {
this.world = world;
this.x = i;
this.z = j;
- this.h = new byte[256];
+ this.heightMap = new byte[256];
for (int k = 0; k < this.entitySlices.length; ++k) {
this.entitySlices[k] = new ArrayList();
}
// CraftBukkit start
- CraftWorld cw = ((WorldServer) world).getWorld();
- bukkitChunk = (cw == null) ? null : cw.popPreservedChunk(i, j);
- if (bukkitChunk == null) {
- bukkitChunk = new org.bukkit.craftbukkit.CraftChunk(this);
+ org.bukkit.craftbukkit.CraftWorld cworld = this.world.getWorld();
+ this.bukkitChunk = (cworld == null) ? null : cworld.popPreservedChunk(i, j);
+ if (this.bukkitChunk == null) {
+ this.bukkitChunk = new org.bukkit.craftbukkit.CraftChunk(this);
}
}
@@ -73,12 +67,12 @@ public class Chunk {
}
public int b(int i, int j) {
- return this.h[j << 4 | i] & 255;
+ return this.heightMap[j << 4 | i] & 255;
}
public void a() {}
- public void b() {
+ public void initLighting() {
int i = 127;
int j;
@@ -94,7 +88,7 @@ public class Chunk {
;
}
- this.h[k << 4 | j] = (byte) l;
+ this.heightMap[k << 4 | j] = (byte) l;
if (l < i) {
i = l;
}
@@ -152,7 +146,7 @@ public class Chunk {
}
private void g(int i, int j, int k) {
- int l = this.h[k << 4 | i] & 255;
+ int l = this.heightMap[k << 4 | i] & 255;
int i1 = l;
if (j > l) {
@@ -165,7 +159,7 @@ public class Chunk {
if (i1 != l) {
this.world.g(i, k, i1, l);
- this.h[k << 4 | i] = (byte) i1;
+ this.heightMap[k << 4 | i] = (byte) i1;
int k1;
int l1;
int i2;
@@ -177,8 +171,8 @@ public class Chunk {
for (l1 = 0; l1 < 16; ++l1) {
for (i2 = 0; i2 < 16; ++i2) {
- if ((this.h[i2 << 4 | l1] & 255) < k1) {
- k1 = this.h[i2 << 4 | l1] & 255;
+ if ((this.heightMap[i2 << 4 | l1] & 255) < k1) {
+ k1 = this.heightMap[i2 << 4 | l1] & 255;
}
}
}
@@ -236,7 +230,7 @@ public class Chunk {
public boolean a(int i, int j, int k, int l, int i1) {
byte b0 = (byte) l;
- int j1 = this.h[k << 4 | i] & 255;
+ int j1 = this.heightMap[k << 4 | i] & 255;
int k1 = this.b[i << 11 | k << 7 | j] & 255;
if (k1 == l && this.e.a(i, j, k) == i1) {
@@ -277,7 +271,7 @@ public class Chunk {
public boolean a(int i, int j, int k, int l) {
byte b0 = (byte) l;
- int i1 = this.h[k << 4 | i] & 255;
+ int i1 = this.heightMap[k << 4 | i] & 255;
int j1 = this.b[i << 11 | k << 7 | j] & 255;
if (j1 == l) {
@@ -401,7 +395,7 @@ public class Chunk {
}
public boolean c(int i, int j, int k) {
- return j >= (this.h[k << 4 | i] & 255);
+ return j >= (this.heightMap[k << 4 | i] & 255);
}
public TileEntity d(int i, int j, int k) {
@@ -425,9 +419,9 @@ public class Chunk {
}
public void a(TileEntity tileentity) {
- int i = tileentity.e - this.x * 16;
- int j = tileentity.f;
- int k = tileentity.g - this.z * 16;
+ int i = tileentity.x - this.x * 16;
+ int j = tileentity.y;
+ int k = tileentity.z - this.z * 16;
this.a(i, j, k, tileentity);
}
@@ -436,9 +430,9 @@ public class Chunk {
ChunkPosition chunkposition = new ChunkPosition(i, j, k);
tileentity.world = this.world;
- tileentity.e = this.x * 16 + i;
- tileentity.f = j;
- tileentity.g = this.z * 16 + k;
+ tileentity.x = this.x * 16 + i;
+ tileentity.y = j;
+ tileentity.z = this.z * 16 + k;
if (this.getTypeId(i, j, k) != 0 && Block.byId[this.getTypeId(i, j, k)] instanceof BlockContainer) {
if (this.c) {
if (this.tileEntities.get(chunkposition) != null) {
@@ -477,11 +471,11 @@ public class Chunk {
for (int i = 0; i < this.entitySlices.length; ++i) {
// CraftBukkit start
- Iterator