summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/BlockMushroom.java
diff options
context:
space:
mode:
authorTravis Watkins <amaranth@ubuntu.com>2013-03-13 17:33:27 -0500
committerTravis Watkins <amaranth@ubuntu.com>2013-03-15 13:28:59 -0500
commit83d29e461c85733f0113b6eb19db6e3b42da2949 (patch)
treeb3063a1c28f478ab368d5ba3413a842def68c28f /src/main/java/net/minecraft/server/BlockMushroom.java
parentba6e4c38cfa98ad291974195cc46d70a4f138ac1 (diff)
downloadcraftbukkit-83d29e461c85733f0113b6eb19db6e3b42da2949.tar
craftbukkit-83d29e461c85733f0113b6eb19db6e3b42da2949.tar.gz
craftbukkit-83d29e461c85733f0113b6eb19db6e3b42da2949.tar.lz
craftbukkit-83d29e461c85733f0113b6eb19db6e3b42da2949.tar.xz
craftbukkit-83d29e461c85733f0113b6eb19db6e3b42da2949.zip
Update CraftBukkit to Minecraft 1.5
Diffstat (limited to 'src/main/java/net/minecraft/server/BlockMushroom.java')
-rw-r--r--src/main/java/net/minecraft/server/BlockMushroom.java27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/main/java/net/minecraft/server/BlockMushroom.java b/src/main/java/net/minecraft/server/BlockMushroom.java
index db908749..872ad003 100644
--- a/src/main/java/net/minecraft/server/BlockMushroom.java
+++ b/src/main/java/net/minecraft/server/BlockMushroom.java
@@ -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;