Update CraftBukkit to Minecraft 1.5

This commit is contained in:
Travis Watkins
2013-03-13 17:33:27 -05:00
parent ba6e4c38cf
commit 83d29e461c
246 changed files with 8499 additions and 6759 deletions

View File

@@ -14,15 +14,18 @@ import org.bukkit.event.world.StructureGrowEvent;
public class BlockMushroom extends BlockFlower {
protected BlockMushroom(int i, int j) {
super(i, j);
private final String a;
protected BlockMushroom(int i, String s) {
super(i);
this.a = s;
float f = 0.2F;
this.a(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f * 2.0F, 0.5F + f);
this.b(true);
}
public void b(World world, int i, int j, int k, Random random) {
public void a(World world, int i, int j, int k, Random random) {
final int sourceX = i, sourceY = j, sourceZ = k; // CraftBukkit
if (random.nextInt(25) == 0) {
byte b0 = 4;
@@ -50,7 +53,7 @@ public class BlockMushroom extends BlockFlower {
k1 = k + random.nextInt(3) - 1;
for (int l1 = 0; l1 < 4; ++l1) {
if (world.isEmpty(i1, j1, k1) && this.d(world, i1, j1, k1)) {
if (world.isEmpty(i1, j1, k1) && this.f(world, i1, j1, k1)) {
i = i1;
j = j1;
k = k1;
@@ -61,7 +64,7 @@ public class BlockMushroom extends BlockFlower {
k1 = k + random.nextInt(3) - 1;
}
if (world.isEmpty(i1, j1, k1) && this.d(world, i1, j1, k1)) {
if (world.isEmpty(i1, j1, k1) && this.f(world, i1, j1, k1)) {
// CraftBukkit start
org.bukkit.World bworld = world.getWorld();
BlockState blockState = bworld.getBlockAt(i1, j1, k1).getState();
@@ -79,18 +82,18 @@ public class BlockMushroom extends BlockFlower {
}
public boolean canPlace(World world, int i, int j, int k) {
return super.canPlace(world, i, j, k) && this.d(world, i, j, k);
return super.canPlace(world, i, j, k) && this.f(world, i, j, k);
}
protected boolean d_(int i) {
return Block.q[i];
protected boolean f_(int i) {
return Block.s[i];
}
public boolean d(World world, int i, int j, int k) {
public boolean f(World world, int i, int j, int k) {
if (j >= 0 && j < 256) {
int l = world.getTypeId(i, j - 1, k);
return l == Block.MYCEL.id || world.l(i, j, k) < 13 && this.d_(l);
return l == Block.MYCEL.id || world.m(i, j, k) < 13 && this.f_(l);
} else {
return false;
}
@@ -100,7 +103,7 @@ public class BlockMushroom extends BlockFlower {
public boolean grow(World world, int i, int j, int k, Random random, boolean bonemeal, org.bukkit.entity.Player player, ItemStack itemstack) {
int l = world.getData(i, j, k);
world.setRawTypeId(i, j, k, 0);
world.setAir(i, j, k);
// CraftBukkit start
boolean grown = false;
StructureGrowEvent event = null;
@@ -122,7 +125,7 @@ public class BlockMushroom extends BlockFlower {
}
}
if (!grown || event.isCancelled()) {
world.setRawTypeIdAndData(i, j, k, this.id, l);
world.setTypeIdAndData(i, j, k, this.id, l, 3);
return false;
}
return true;