summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/net/minecraft/server/NetServerHandler.java4
-rw-r--r--src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java7
-rw-r--r--src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java2
3 files changed, 4 insertions, 9 deletions
diff --git a/src/main/java/net/minecraft/server/NetServerHandler.java b/src/main/java/net/minecraft/server/NetServerHandler.java
index 56335ac6..8486188b 100644
--- a/src/main/java/net/minecraft/server/NetServerHandler.java
+++ b/src/main/java/net/minecraft/server/NetServerHandler.java
@@ -347,8 +347,8 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
// if we are destroying either a redstone wire with a current greater than 0 or
// a redstone torch that is on, then we should notify plugins that this block has
// returned to a current value of 0 (since it will once the redstone is destroyed)
- if ((blockId == Block.REDSTONE_WIRE.id && block.getRawData() > 0) || blockId == Block.REDSTONE_TORCH_ON.id) {
- server.getPluginManager().callEvent( new BlockRedstoneEvent(block, (blockId == Block.REDSTONE_WIRE.id ? block.getRawData() : 15), 0));
+ if ((blockId == Block.REDSTONE_WIRE.id && block.getData() > 0) || blockId == Block.REDSTONE_TORCH_ON.id) {
+ server.getPluginManager().callEvent( new BlockRedstoneEvent(block, (blockId == Block.REDSTONE_WIRE.id ? block.getData() : 15), 0));
}
event = new BlockDamageEvent(Type.BLOCK_DAMAGED, block, BlockDamageLevel.BROKEN, player);
} else {
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index 638d7ef0..0c080495 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -95,7 +95,7 @@ public class CraftBlock implements Block {
*
* @return block specific metadata
*/
- public byte getRawData() {
+ public byte getData() {
return (byte) chunk.getHandle().b(this.x & 0xF, this.y & 0x7F, this.z & 0xF);
}
@@ -354,9 +354,4 @@ public class CraftBlock implements Block {
public boolean isBlockFaceIndirectlyPowered(BlockFace face) {
return chunk.getHandle().d.j(x, y, z, blockFaceToNotch(face));
}
-
- @Deprecated
- public byte getData() {
- return getRawData();
- }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
index a30288d9..9475b146 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
@@ -30,7 +30,7 @@ public class CraftBlockState implements BlockState {
this.light = block.getLightLevel();
this.chunk = (CraftChunk)block.getChunk();
- createData(block.getRawData());
+ createData(block.getData());
}
/**