[Bleeding] Added BlockGrowEvent. Addresses BUKKIT-104

This commit is contained in:
Feildmaster
2012-02-11 23:32:24 -06:00
committed by EvilSeph
parent 847e1c62c5
commit 7792156fb2
7 changed files with 29 additions and 15 deletions

View File

@@ -80,9 +80,11 @@ public class CraftBlockState implements BlockState {
}
public boolean setTypeId(final int type) {
this.type = type;
if (this.type != type) {
this.type = type;
createData((byte) 0);
createData((byte) 0);
}
return true;
}
@@ -126,7 +128,7 @@ public class CraftBlockState implements BlockState {
}
private void createData(final byte data) {
Material mat = Material.getMaterial(type);
Material mat = getType();
if (mat == null || mat.getData() == null) {
this.data = new MaterialData(type, data);
} else {
@@ -142,8 +144,8 @@ public class CraftBlockState implements BlockState {
return new Location(world, x, y, z);
}
public void setData(byte data) {
createData(data);
public void setRawData(byte data) {
this.data.setData(data);
}
@Override