diff --git a/pom.xml b/pom.xml
index d1be24723c..d171c7b8d8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
org.bukkit
craftbukkit
jar
- 1.4.2-R0.3-SNAPSHOT
+ 1.4.4-R0.1-SNAPSHOT
CraftBukkit
http://www.bukkit.org
@@ -51,14 +51,14 @@
org.bukkit
bukkit
- 1.4.2-R0.3-SNAPSHOT
+ 1.4.4-R0.1-SNAPSHOT
jar
compile
org.bukkit
minecraft-server
- 1.4.2
+ 1.4.4
jar
compile
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index 6893134ec4..f29eace661 100644
--- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java
@@ -377,14 +377,14 @@ public class Block {
int l1 = this.getDropType(l, world.random, i1);
if (l1 > 0) {
- this.a(world, i, j, k, new ItemStack(l1, 1, this.getDropData(l)));
+ this.b(world, i, j, k, new ItemStack(l1, 1, this.getDropData(l)));
}
}
}
}
}
- protected void a(World world, int i, int j, int k, ItemStack itemstack) {
+ protected void b(World world, int i, int j, int k, ItemStack itemstack) {
if (!world.isStatic && world.getGameRules().getBoolean("doTileDrops")) {
float f = 0.7F;
double d0 = (double) (world.random.nextFloat() * f) + (double) (1.0F - f) * 0.5D;
@@ -540,7 +540,9 @@ public class Block {
public void b(World world, int i, int j, int k, Entity entity) {}
- public void postPlace(World world, int i, int j, int k, int l, float f, float f1, float f2) {}
+ public int getPlacedData(World world, int i, int j, int k, int l, float f, float f1, float f2, int i1) {
+ return i1;
+ }
public void attack(World world, int i, int j, int k, EntityHuman entityhuman) {}
@@ -595,7 +597,7 @@ public class Block {
ItemStack itemstack = this.f_(l);
if (itemstack != null) {
- this.a(world, i, j, k, itemstack);
+ this.b(world, i, j, k, itemstack);
}
} else {
int i1 = EnchantmentManager.getBonusBlockLootEnchantmentLevel(entityhuman);
@@ -628,6 +630,8 @@ public class Block {
public void postPlace(World world, int i, int j, int k, EntityLiving entityliving) {}
+ public void postPlace(World world, int i, int j, int k, int l) {}
+
public Block b(String s) {
this.name = "tile." + s;
return this;
@@ -669,7 +673,7 @@ public class Block {
public void a(World world, int i, int j, int k, int l, EntityHuman entityhuman) {}
- public void g(World world, int i, int j, int k, int l) {}
+ public void h(World world, int i, int j, int k, int l) {}
public void f(World world, int i, int j, int k) {}
@@ -677,6 +681,10 @@ public class Block {
return true;
}
+ public boolean a(Explosion explosion) {
+ return true;
+ }
+
static {
Item.byId[WOOL.id] = (new ItemCloth(WOOL.id - 256)).b("cloth");
Item.byId[LOG.id] = (new ItemMultiTexture(LOG.id - 256, LOG, BlockLog.a)).b("log");
diff --git a/src/main/java/net/minecraft/server/BlockButton.java b/src/main/java/net/minecraft/server/BlockButton.java
index 59fa1b514a..908b1ede86 100644
--- a/src/main/java/net/minecraft/server/BlockButton.java
+++ b/src/main/java/net/minecraft/server/BlockButton.java
@@ -33,35 +33,35 @@ public class BlockButton extends Block {
}
public boolean canPlace(World world, int i, int j, int k, int l) {
- return l == 2 && world.s(i, j, k + 1) ? true : (l == 3 && world.s(i, j, k - 1) ? true : (l == 4 && world.s(i + 1, j, k) ? true : l == 5 && world.s(i - 1, j, k)));
+ return l == 2 && world.t(i, j, k + 1) ? true : (l == 3 && world.t(i, j, k - 1) ? true : (l == 4 && world.t(i + 1, j, k) ? true : l == 5 && world.t(i - 1, j, k)));
}
public boolean canPlace(World world, int i, int j, int k) {
- return world.s(i - 1, j, k) ? true : (world.s(i + 1, j, k) ? true : (world.s(i, j, k - 1) ? true : world.s(i, j, k + 1)));
+ return world.t(i - 1, j, k) ? true : (world.t(i + 1, j, k) ? true : (world.t(i, j, k - 1) ? true : world.t(i, j, k + 1)));
}
- public void postPlace(World world, int i, int j, int k, int l, float f, float f1, float f2) {
- int i1 = world.getData(i, j, k);
- int j1 = i1 & 8;
+ public int getPlacedData(World world, int i, int j, int k, int l, float f, float f1, float f2, int i1) {
+ int j1 = world.getData(i, j, k);
+ int k1 = j1 & 8;
- i1 &= 7;
- if (l == 2 && world.s(i, j, k + 1)) {
- i1 = 4;
- } else if (l == 3 && world.s(i, j, k - 1)) {
- i1 = 3;
- } else if (l == 4 && world.s(i + 1, j, k)) {
- i1 = 2;
- } else if (l == 5 && world.s(i - 1, j, k)) {
- i1 = 1;
+ j1 &= 7;
+ if (l == 2 && world.t(i, j, k + 1)) {
+ j1 = 4;
+ } else if (l == 3 && world.t(i, j, k - 1)) {
+ j1 = 3;
+ } else if (l == 4 && world.t(i + 1, j, k)) {
+ j1 = 2;
+ } else if (l == 5 && world.t(i - 1, j, k)) {
+ j1 = 1;
} else {
- i1 = this.l(world, i, j, k);
+ j1 = this.l(world, i, j, k);
}
- world.setData(i, j, k, i1 + j1);
+ return j1 + k1;
}
private int l(World world, int i, int j, int k) {
- return world.s(i - 1, j, k) ? 1 : (world.s(i + 1, j, k) ? 2 : (world.s(i, j, k - 1) ? 3 : (world.s(i, j, k + 1) ? 4 : 1)));
+ return world.t(i - 1, j, k) ? 1 : (world.t(i + 1, j, k) ? 2 : (world.t(i, j, k - 1) ? 3 : (world.t(i, j, k + 1) ? 4 : 1)));
}
public void doPhysics(World world, int i, int j, int k, int l) {
@@ -69,19 +69,19 @@ public class BlockButton extends Block {
int i1 = world.getData(i, j, k) & 7;
boolean flag = false;
- if (!world.s(i - 1, j, k) && i1 == 1) {
+ if (!world.t(i - 1, j, k) && i1 == 1) {
flag = true;
}
- if (!world.s(i + 1, j, k) && i1 == 2) {
+ if (!world.t(i + 1, j, k) && i1 == 2) {
flag = true;
}
- if (!world.s(i, j, k - 1) && i1 == 3) {
+ if (!world.t(i, j, k - 1) && i1 == 3) {
flag = true;
}
- if (!world.s(i, j, k + 1) && i1 == 4) {
+ if (!world.t(i, j, k + 1) && i1 == 4) {
flag = true;
}
diff --git a/src/main/java/net/minecraft/server/BlockCommand.java b/src/main/java/net/minecraft/server/BlockCommand.java
index c43ba94472..34f50ca433 100644
--- a/src/main/java/net/minecraft/server/BlockCommand.java
+++ b/src/main/java/net/minecraft/server/BlockCommand.java
@@ -1,5 +1,7 @@
package net.minecraft.server;
+import java.util.Random;
+
import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
public class BlockCommand extends BlockContainer {
@@ -28,19 +30,26 @@ public class BlockCommand extends BlockContainer {
// CraftBukkit end
if (eventRedstone.getNewCurrent() > 0 && !(eventRedstone.getOldCurrent() > 0)) { // CraftBukkit
- TileEntity tileentity = world.getTileEntity(i, j, k);
-
- if (tileentity != null && tileentity instanceof TileEntityCommand) {
- ((TileEntityCommand) tileentity).a(world);
- }
-
world.setRawData(i, j, k, i1 | 1);
+ world.a(i, j, k, this.id, this.r_());
} else if (!(eventRedstone.getNewCurrent() > 0) && eventRedstone.getOldCurrent() > 0) { // CraftBukkit
world.setRawData(i, j, k, i1 & -2);
}
}
}
+ public void b(World world, int i, int j, int k, Random random) {
+ TileEntity tileentity = world.getTileEntity(i, j, k);
+
+ if (tileentity != null && tileentity instanceof TileEntityCommand) {
+ ((TileEntityCommand) tileentity).a(world);
+ }
+ }
+
+ public int r_() {
+ return 1;
+ }
+
public boolean interact(World world, int i, int j, int k, EntityHuman entityhuman, int l, float f, float f1, float f2) {
TileEntityCommand tileentitycommand = (TileEntityCommand) world.getTileEntity(i, j, k);
diff --git a/src/main/java/net/minecraft/server/BlockCrops.java b/src/main/java/net/minecraft/server/BlockCrops.java
index ca45aded2c..a2ce8f94a9 100644
--- a/src/main/java/net/minecraft/server/BlockCrops.java
+++ b/src/main/java/net/minecraft/server/BlockCrops.java
@@ -110,7 +110,7 @@ public class BlockCrops extends BlockFlower {
for (int k1 = 0; k1 < j1; ++k1) {
if (world.random.nextInt(15) <= l) {
- this.a(world, i, j, k, new ItemStack(this.h(), 1, 0));
+ this.b(world, i, j, k, new ItemStack(this.h(), 1, 0));
}
}
}
diff --git a/src/main/java/net/minecraft/server/BlockDoor.java b/src/main/java/net/minecraft/server/BlockDoor.java
index d87582d6c4..946fa36ae5 100644
--- a/src/main/java/net/minecraft/server/BlockDoor.java
+++ b/src/main/java/net/minecraft/server/BlockDoor.java
@@ -159,7 +159,7 @@ public class BlockDoor extends Block {
flag = true;
}
- if (!world.t(i, j - 1, k)) {
+ if (!world.v(i, j - 1, k)) {
world.setTypeId(i, j, k, 0);
flag = true;
if (world.getTypeId(i, j + 1, k) == this.id) {
@@ -210,7 +210,7 @@ public class BlockDoor extends Block {
}
public boolean canPlace(World world, int i, int j, int k) {
- return j >= 255 ? false : world.t(i, j - 1, k) && super.canPlace(world, i, j, k) && super.canPlace(world, i, j + 1, k);
+ return j >= 255 ? false : world.v(i, j - 1, k) && super.canPlace(world, i, j, k) && super.canPlace(world, i, j + 1, k);
}
public int q_() {
@@ -235,4 +235,10 @@ public class BlockDoor extends Block {
return i1 & 7 | (flag ? 8 : 0) | (flag1 ? 16 : 0);
}
+
+ public void a(World world, int i, int j, int k, int l, EntityHuman entityhuman) {
+ if (entityhuman.abilities.canInstantlyBuild && (l & 8) != 0 && world.getTypeId(i, j - 1, k) == this.id) {
+ world.setTypeId(i, j - 1, k, 0);
+ }
+ }
}
diff --git a/src/main/java/net/minecraft/server/BlockDragonEgg.java b/src/main/java/net/minecraft/server/BlockDragonEgg.java
index 2b4257c951..5deafecd9c 100644
--- a/src/main/java/net/minecraft/server/BlockDragonEgg.java
+++ b/src/main/java/net/minecraft/server/BlockDragonEgg.java
@@ -56,30 +56,31 @@ public class BlockDragonEgg extends Block {
private void n(World world, int i, int j, int k) {
if (world.getTypeId(i, j, k) == this.id) {
- if (!world.isStatic) {
- for (int l = 0; l < 1000; ++l) {
- int i1 = i + world.random.nextInt(16) - world.random.nextInt(16);
- int j1 = j + world.random.nextInt(8) - world.random.nextInt(8);
- int k1 = k + world.random.nextInt(16) - world.random.nextInt(16);
+ for (int l = 0; l < 1000; ++l) {
+ int i1 = i + world.random.nextInt(16) - world.random.nextInt(16);
+ int j1 = j + world.random.nextInt(8) - world.random.nextInt(8);
+ int k1 = k + world.random.nextInt(16) - world.random.nextInt(16);
- if (world.getTypeId(i1, j1, k1) == 0) {
- // CraftBukkit start
- org.bukkit.block.Block from = world.getWorld().getBlockAt(i, j, k);
- org.bukkit.block.Block to = world.getWorld().getBlockAt(i1, j1, k1);
- BlockFromToEvent event = new BlockFromToEvent(from, to);
- org.bukkit.Bukkit.getPluginManager().callEvent(event);
+ if (world.getTypeId(i1, j1, k1) == 0) {
+ // CraftBukkit start
+ org.bukkit.block.Block from = world.getWorld().getBlockAt(i, j, k);
+ org.bukkit.block.Block to = world.getWorld().getBlockAt(i1, j1, k1);
+ BlockFromToEvent event = new BlockFromToEvent(from, to);
+ org.bukkit.Bukkit.getPluginManager().callEvent(event);
- if (event.isCancelled()) {
- return;
- }
+ if (event.isCancelled()) {
+ return;
+ }
- i1 = event.getToBlock().getX();
- j1 = event.getToBlock().getY();
- k1 = event.getToBlock().getZ();
- // CraftBukkit end
+ i1 = event.getToBlock().getX();
+ j1 = event.getToBlock().getY();
+ k1 = event.getToBlock().getZ();
+ // CraftBukkit end
+ if (!world.isStatic) {
world.setTypeIdAndData(i1, j1, k1, this.id, world.getData(i, j, k));
world.setTypeId(i, j, k, 0);
+ } else {
short short1 = 128;
for (int l1 = 0; l1 < short1; ++l1) {
@@ -93,16 +94,16 @@ public class BlockDragonEgg extends Block {
world.addParticle("portal", d1, d2, d3, (double) f, (double) f1, (double) f2);
}
-
- return;
}
+
+ return;
}
}
}
}
public int r_() {
- return 3;
+ return 5;
}
public boolean c() {
diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java
index 419547997a..6d249f133a 100644
--- a/src/main/java/net/minecraft/server/BlockFire.java
+++ b/src/main/java/net/minecraft/server/BlockFire.java
@@ -77,7 +77,7 @@ public class BlockFire extends Block {
fireExtinguished(world, i, j, k); // CraftBukkit - invalid place location
}
- if (!flag && world.M() && (world.B(i, j, k) || world.B(i - 1, j, k) || world.B(i + 1, j, k) || world.B(i, j, k - 1) || world.B(i, j, k + 1))) {
+ if (!flag && world.N() && (world.D(i, j, k) || world.D(i - 1, j, k) || world.D(i + 1, j, k) || world.D(i, j, k - 1) || world.D(i, j, k + 1))) {
fireExtinguished(world, i, j, k); // CraftBukkit - extinguished by rain
} else {
int l = world.getData(i, j, k);
@@ -88,13 +88,13 @@ public class BlockFire extends Block {
world.a(i, j, k, this.id, this.r_() + random.nextInt(10));
if (!flag && !this.l(world, i, j, k)) {
- if (!world.t(i, j - 1, k) || l > 3) {
+ if (!world.v(i, j - 1, k) || l > 3) {
world.setTypeId(i, j, k, 0);
}
} else if (!flag && !this.d((IBlockAccess) world, i, j - 1, k) && l == 15 && random.nextInt(4) == 0) {
fireExtinguished(world, i, j, k); // CraftBukkit - burn out
} else {
- boolean flag1 = world.C(i, j, k);
+ boolean flag1 = world.E(i, j, k);
byte b0 = 0;
if (flag1) {
@@ -135,7 +135,7 @@ public class BlockFire extends Block {
j2 /= 2;
}
- if (j2 > 0 && random.nextInt(l1) <= j2 && (!world.M() || !world.B(i1, k1, j1)) && !world.B(i1 - 1, k1, k) && !world.B(i1 + 1, k1, j1) && !world.B(i1, k1, j1 - 1) && !world.B(i1, k1, j1 + 1)) {
+ if (j2 > 0 && random.nextInt(l1) <= j2 && (!world.N() || !world.D(i1, k1, j1)) && !world.D(i1 - 1, k1, k) && !world.D(i1 + 1, k1, j1) && !world.D(i1, k1, j1 - 1) && !world.D(i1, k1, j1 + 1)) {
int k2 = l + random.nextInt(5) / 4;
if (k2 > 15) {
@@ -197,7 +197,7 @@ public class BlockFire extends Block {
}
// CraftBukkit end
- if (random.nextInt(i1 + 10) < 5 && !world.B(i, j, k)) {
+ if (random.nextInt(i1 + 10) < 5 && !world.D(i, j, k)) {
int k1 = i1 + random.nextInt(5) / 4;
if (k1 > 15) {
@@ -251,18 +251,18 @@ public class BlockFire extends Block {
}
public boolean canPlace(World world, int i, int j, int k) {
- return world.t(i, j - 1, k) || this.l(world, i, j, k);
+ return world.v(i, j - 1, k) || this.l(world, i, j, k);
}
public void doPhysics(World world, int i, int j, int k, int l) {
- if (!world.t(i, j - 1, k) && !this.l(world, i, j, k)) {
+ if (!world.v(i, j - 1, k) && !this.l(world, i, j, k)) {
fireExtinguished(world, i, j, k); // CraftBukkit - fuel block gone
}
}
public void onPlace(World world, int i, int j, int k) {
if (world.worldProvider.dimension > 0 || world.getTypeId(i, j - 1, k) != Block.OBSIDIAN.id || !Block.PORTAL.i_(world, i, j, k)) {
- if (!world.t(i, j - 1, k) && !this.l(world, i, j, k)) {
+ if (!world.v(i, j - 1, k) && !this.l(world, i, j, k)) {
fireExtinguished(world, i, j, k); // CraftBukkit - fuel block broke
} else {
world.a(i, j, k, this.id, this.r_() + world.random.nextInt(10));
diff --git a/src/main/java/net/minecraft/server/BlockIce.java b/src/main/java/net/minecraft/server/BlockIce.java
index b609793856..b7215376f0 100644
--- a/src/main/java/net/minecraft/server/BlockIce.java
+++ b/src/main/java/net/minecraft/server/BlockIce.java
@@ -18,7 +18,7 @@ public class BlockIce extends BlockHalfTransparant {
ItemStack itemstack = this.f_(l);
if (itemstack != null) {
- this.a(world, i, j, k, itemstack);
+ this.b(world, i, j, k, itemstack);
}
} else {
if (world.worldProvider.e) {
diff --git a/src/main/java/net/minecraft/server/BlockLeaves.java b/src/main/java/net/minecraft/server/BlockLeaves.java
index a2bd362f29..cea559f34c 100644
--- a/src/main/java/net/minecraft/server/BlockLeaves.java
+++ b/src/main/java/net/minecraft/server/BlockLeaves.java
@@ -153,19 +153,19 @@ public class BlockLeaves extends BlockTransparant {
if (world.random.nextInt(b0) == 0) {
int j1 = this.getDropType(l, world.random, i1);
- this.a(world, i, j, k, new ItemStack(j1, 1, this.getDropData(l)));
+ this.b(world, i, j, k, new ItemStack(j1, 1, this.getDropData(l)));
}
if ((l & 3) == 0 && world.random.nextInt(200) == 0) {
- this.a(world, i, j, k, new ItemStack(Item.APPLE, 1, 0));
+ this.b(world, i, j, k, new ItemStack(Item.APPLE, 1, 0));
}
}
}
public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) {
- if (!world.isStatic && entityhuman.bP() != null && entityhuman.bP().id == Item.SHEARS.id) {
+ if (!world.isStatic && entityhuman.bT() != null && entityhuman.bT().id == Item.SHEARS.id) {
entityhuman.a(StatisticList.C[this.id], 1);
- this.a(world, i, j, k, new ItemStack(Block.LEAVES.id, 1, l & 3));
+ this.b(world, i, j, k, new ItemStack(Block.LEAVES.id, 1, l & 3));
} else {
super.a(world, entityhuman, i, j, k, l);
}
diff --git a/src/main/java/net/minecraft/server/BlockLever.java b/src/main/java/net/minecraft/server/BlockLever.java
index 13a61688db..5b290f6080 100644
--- a/src/main/java/net/minecraft/server/BlockLever.java
+++ b/src/main/java/net/minecraft/server/BlockLever.java
@@ -26,49 +26,43 @@ public class BlockLever extends Block {
}
public boolean canPlace(World world, int i, int j, int k, int l) {
- return l == 0 && world.s(i, j + 1, k) ? true : (l == 1 && world.t(i, j - 1, k) ? true : (l == 2 && world.s(i, j, k + 1) ? true : (l == 3 && world.s(i, j, k - 1) ? true : (l == 4 && world.s(i + 1, j, k) ? true : l == 5 && world.s(i - 1, j, k)))));
+ return l == 0 && world.t(i, j + 1, k) ? true : (l == 1 && world.v(i, j - 1, k) ? true : (l == 2 && world.t(i, j, k + 1) ? true : (l == 3 && world.t(i, j, k - 1) ? true : (l == 4 && world.t(i + 1, j, k) ? true : l == 5 && world.t(i - 1, j, k)))));
}
public boolean canPlace(World world, int i, int j, int k) {
- return world.s(i - 1, j, k) ? true : (world.s(i + 1, j, k) ? true : (world.s(i, j, k - 1) ? true : (world.s(i, j, k + 1) ? true : (world.t(i, j - 1, k) ? true : world.s(i, j + 1, k)))));
+ return world.t(i - 1, j, k) ? true : (world.t(i + 1, j, k) ? true : (world.t(i, j, k - 1) ? true : (world.t(i, j, k + 1) ? true : (world.v(i, j - 1, k) ? true : world.t(i, j + 1, k)))));
}
- public void postPlace(World world, int i, int j, int k, int l, float f, float f1, float f2) {
- int i1 = world.getData(i, j, k);
+ public int getPlacedData(World world, int i, int j, int k, int l, float f, float f1, float f2, int i1) {
int j1 = i1 & 8;
+ int k1 = i1 & 7;
- i1 &= 7;
- i1 = -1;
- if (l == 0 && world.s(i, j + 1, k)) {
- i1 = world.random.nextBoolean() ? 0 : 7;
+ k1 = -1;
+ if (l == 0 && world.t(i, j + 1, k)) {
+ k1 = world.random.nextBoolean() ? 0 : 7;
}
- if (l == 1 && world.t(i, j - 1, k)) {
- i1 = 5 + world.random.nextInt(2);
+ if (l == 1 && world.v(i, j - 1, k)) {
+ k1 = 5 + world.random.nextInt(2);
}
- if (l == 2 && world.s(i, j, k + 1)) {
- i1 = 4;
+ if (l == 2 && world.t(i, j, k + 1)) {
+ k1 = 4;
}
- if (l == 3 && world.s(i, j, k - 1)) {
- i1 = 3;
+ if (l == 3 && world.t(i, j, k - 1)) {
+ k1 = 3;
}
- if (l == 4 && world.s(i + 1, j, k)) {
- i1 = 2;
+ if (l == 4 && world.t(i + 1, j, k)) {
+ k1 = 2;
}
- if (l == 5 && world.s(i - 1, j, k)) {
- i1 = 1;
+ if (l == 5 && world.t(i - 1, j, k)) {
+ k1 = 1;
}
- if (i1 == -1) {
- this.c(world, i, j, k, world.getData(i, j, k), 0);
- world.setTypeId(i, j, k, 0);
- } else {
- world.setData(i, j, k, i1 + j1);
- }
+ return k1 + j1;
}
public static int d(int i) {
@@ -101,35 +95,35 @@ public class BlockLever extends Block {
int i1 = world.getData(i, j, k) & 7;
boolean flag = false;
- if (!world.s(i - 1, j, k) && i1 == 1) {
+ if (!world.t(i - 1, j, k) && i1 == 1) {
flag = true;
}
- if (!world.s(i + 1, j, k) && i1 == 2) {
+ if (!world.t(i + 1, j, k) && i1 == 2) {
flag = true;
}
- if (!world.s(i, j, k - 1) && i1 == 3) {
+ if (!world.t(i, j, k - 1) && i1 == 3) {
flag = true;
}
- if (!world.s(i, j, k + 1) && i1 == 4) {
+ if (!world.t(i, j, k + 1) && i1 == 4) {
flag = true;
}
- if (!world.t(i, j - 1, k) && i1 == 5) {
+ if (!world.v(i, j - 1, k) && i1 == 5) {
flag = true;
}
- if (!world.t(i, j - 1, k) && i1 == 6) {
+ if (!world.v(i, j - 1, k) && i1 == 6) {
flag = true;
}
- if (!world.s(i, j + 1, k) && i1 == 0) {
+ if (!world.t(i, j + 1, k) && i1 == 0) {
flag = true;
}
- if (!world.s(i, j + 1, k) && i1 == 7) {
+ if (!world.t(i, j + 1, k) && i1 == 7) {
flag = true;
}
diff --git a/src/main/java/net/minecraft/server/BlockMushroom.java b/src/main/java/net/minecraft/server/BlockMushroom.java
index a9df950114..bfc48d4993 100644
--- a/src/main/java/net/minecraft/server/BlockMushroom.java
+++ b/src/main/java/net/minecraft/server/BlockMushroom.java
@@ -89,7 +89,7 @@ public class BlockMushroom extends BlockFlower {
if (j >= 0 && j < 256) {
int l = world.getTypeId(i, j - 1, k);
- return l == Block.MYCEL.id || world.k(i, j, k) < 13 && this.d_(l);
+ return l == Block.MYCEL.id || world.l(i, j, k) < 13 && this.d_(l);
} else {
return false;
}
diff --git a/src/main/java/net/minecraft/server/BlockNetherWart.java b/src/main/java/net/minecraft/server/BlockNetherWart.java
index 514abd29fd..22b8d19142 100644
--- a/src/main/java/net/minecraft/server/BlockNetherWart.java
+++ b/src/main/java/net/minecraft/server/BlockNetherWart.java
@@ -51,7 +51,7 @@ public class BlockNetherWart extends BlockFlower {
}
for (int k1 = 0; k1 < j1; ++k1) {
- this.a(world, i, j, k, new ItemStack(Item.NETHER_STALK));
+ this.b(world, i, j, k, new ItemStack(Item.NETHER_STALK));
}
}
}
diff --git a/src/main/java/net/minecraft/server/BlockPiston.java b/src/main/java/net/minecraft/server/BlockPiston.java
index ed73f32bca..3e5465b601 100644
--- a/src/main/java/net/minecraft/server/BlockPiston.java
+++ b/src/main/java/net/minecraft/server/BlockPiston.java
@@ -68,7 +68,7 @@ public class BlockPiston extends Block {
if (flag && !f(l)) {
// CraftBukkit start
- int length = h(world, i, j, k, i1);
+ int length = i(world, i, j, k, i1);
if (length >= 0) {
org.bukkit.block.Block block = world.getWorld().getBlockAt(i, j, k);
BlockPistonExtendEvent event = new BlockPistonExtendEvent(block, length, CraftBlock.notchToBlockFace(i1));
@@ -109,7 +109,7 @@ public class BlockPiston extends Block {
}
if (l == 0) {
- if (this.i(world, i, j, k, i1)) {
+ if (this.j(world, i, j, k, i1)) {
world.setData(i, j, k, i1 | 8);
world.makeSound((double) i + 0.5D, (double) j + 0.5D, (double) k + 0.5D, "tile.piston.out", 0.5F, world.random.nextFloat() * 0.25F + 0.6F);
} else {
@@ -268,7 +268,7 @@ public class BlockPiston extends Block {
}
// CraftBukkit - boolean -> int return
- private static int h(World world, int i, int j, int k, int l) {
+ private static int i(World world, int i, int j, int k, int l) {
int i1 = i + Facing.b[l];
int j1 = j + Facing.c[l];
int k1 = k + Facing.d[l];
@@ -305,7 +305,7 @@ public class BlockPiston extends Block {
}
}
- private boolean i(World world, int i, int j, int k, int l) {
+ private boolean j(World world, int i, int j, int k, int l) {
int i1 = i + Facing.b[l];
int j1 = j + Facing.c[l];
int k1 = k + Facing.d[l];
diff --git a/src/main/java/net/minecraft/server/BlockPortal.java b/src/main/java/net/minecraft/server/BlockPortal.java
index 7e519f66d2..29d1308393 100644
--- a/src/main/java/net/minecraft/server/BlockPortal.java
+++ b/src/main/java/net/minecraft/server/BlockPortal.java
@@ -19,15 +19,15 @@ public class BlockPortal extends BlockHalfTransparant {
if (world.worldProvider.d() && random.nextInt(2000) < world.difficulty) {
int l;
- for (l = j; !world.t(i, l, k) && l > 0; --l) {
+ for (l = j; !world.v(i, l, k) && l > 0; --l) {
;
}
- if (l > 0 && !world.s(i, l + 1, k)) {
+ if (l > 0 && !world.t(i, l + 1, k)) {
Entity entity = ItemMonsterEgg.a(world, 57, (double) i + 0.5D, (double) l + 1.1D, (double) k + 0.5D);
if (entity != null) {
- entity.an = entity.ab();
+ entity.portalCooldown = entity.ab();
}
}
}
diff --git a/src/main/java/net/minecraft/server/BlockPressurePlate.java b/src/main/java/net/minecraft/server/BlockPressurePlate.java
index 1d43560c6f..e4dc875426 100644
--- a/src/main/java/net/minecraft/server/BlockPressurePlate.java
+++ b/src/main/java/net/minecraft/server/BlockPressurePlate.java
@@ -44,13 +44,13 @@ public class BlockPressurePlate extends Block {
}
public boolean canPlace(World world, int i, int j, int k) {
- return world.t(i, j - 1, k) || BlockFence.c(world.getTypeId(i, j - 1, k));
+ return world.v(i, j - 1, k) || BlockFence.c(world.getTypeId(i, j - 1, k));
}
public void doPhysics(World world, int i, int j, int k, int l) {
boolean flag = false;
- if (!world.t(i, j - 1, k) && !BlockFence.c(world.getTypeId(i, j - 1, k))) {
+ if (!world.v(i, j - 1, k) && !BlockFence.c(world.getTypeId(i, j - 1, k))) {
flag = true;
}
diff --git a/src/main/java/net/minecraft/server/BlockPumpkin.java b/src/main/java/net/minecraft/server/BlockPumpkin.java
index 0abaa467ed..2b71464aa3 100644
--- a/src/main/java/net/minecraft/server/BlockPumpkin.java
+++ b/src/main/java/net/minecraft/server/BlockPumpkin.java
@@ -101,7 +101,7 @@ public class BlockPumpkin extends BlockDirectional {
public boolean canPlace(World world, int i, int j, int k) {
int l = world.getTypeId(i, j, k);
- return (l == 0 || Block.byId[l].material.isReplaceable()) && world.t(i, j - 1, k);
+ return (l == 0 || Block.byId[l].material.isReplaceable()) && world.v(i, j - 1, k);
}
public void postPlace(World world, int i, int j, int k, EntityLiving entityliving) {
diff --git a/src/main/java/net/minecraft/server/BlockRedstoneOre.java b/src/main/java/net/minecraft/server/BlockRedstoneOre.java
index cedc336549..2bb9436695 100644
--- a/src/main/java/net/minecraft/server/BlockRedstoneOre.java
+++ b/src/main/java/net/minecraft/server/BlockRedstoneOre.java
@@ -105,27 +105,27 @@ public class BlockRedstoneOre extends Block {
double d2 = (double) ((float) j + random.nextFloat());
double d3 = (double) ((float) k + random.nextFloat());
- if (l == 0 && !world.r(i, j + 1, k)) {
+ if (l == 0 && !world.s(i, j + 1, k)) {
d2 = (double) (j + 1) + d0;
}
- if (l == 1 && !world.r(i, j - 1, k)) {
+ if (l == 1 && !world.s(i, j - 1, k)) {
d2 = (double) (j + 0) - d0;
}
- if (l == 2 && !world.r(i, j, k + 1)) {
+ if (l == 2 && !world.s(i, j, k + 1)) {
d3 = (double) (k + 1) + d0;
}
- if (l == 3 && !world.r(i, j, k - 1)) {
+ if (l == 3 && !world.s(i, j, k - 1)) {
d3 = (double) (k + 0) - d0;
}
- if (l == 4 && !world.r(i + 1, j, k)) {
+ if (l == 4 && !world.s(i + 1, j, k)) {
d1 = (double) (i + 1) + d0;
}
- if (l == 5 && !world.r(i - 1, j, k)) {
+ if (l == 5 && !world.s(i - 1, j, k)) {
d1 = (double) (i + 0) - d0;
}
diff --git a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java
index e3056277bc..4240ade9fd 100644
--- a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java
+++ b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java
@@ -2,7 +2,6 @@ package net.minecraft.server;
import java.util.ArrayList;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Random;
@@ -23,15 +22,16 @@ public class BlockRedstoneTorch extends BlockTorch {
b.put(world, new ArrayList());
}
+ List list = (List) b.get(world);
+
if (flag) {
- ((List) b.get(world)).add(new RedstoneUpdateInfo(i, j, k, world.getTime()));
+ list.add(new RedstoneUpdateInfo(i, j, k, world.getTime()));
}
int l = 0;
- Iterator iterator = ((List) b.get(world)).iterator();
- while (iterator.hasNext()) {
- RedstoneUpdateInfo redstoneupdateinfo = (RedstoneUpdateInfo) iterator.next();
+ for (int i1 = 0; i1 < list.size(); ++i1) {
+ RedstoneUpdateInfo redstoneupdateinfo = (RedstoneUpdateInfo) list.get(i1);
if (redstoneupdateinfo.a == i && redstoneupdateinfo.b == j && redstoneupdateinfo.c == k) {
++l;
diff --git a/src/main/java/net/minecraft/server/BlockRedstoneWire.java b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
index d3a4bc4af6..0f821b9b0e 100644
--- a/src/main/java/net/minecraft/server/BlockRedstoneWire.java
+++ b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
@@ -2,7 +2,6 @@ package net.minecraft.server;
import java.util.ArrayList;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.Random;
import java.util.Set;
@@ -39,7 +38,7 @@ public class BlockRedstoneWire extends Block {
}
public boolean canPlace(World world, int i, int j, int k) {
- return world.t(i, j - 1, k) || world.getTypeId(i, j - 1, k) == Block.GLOWSTONE.id;
+ return world.v(i, j - 1, k) || world.getTypeId(i, j - 1, k) == Block.GLOWSTONE.id;
}
private void l(World world, int i, int j, int k) {
@@ -47,10 +46,9 @@ public class BlockRedstoneWire extends Block {
ArrayList arraylist = new ArrayList(this.b);
this.b.clear();
- Iterator iterator = arraylist.iterator();
- while (iterator.hasNext()) {
- ChunkPosition chunkposition = (ChunkPosition) iterator.next();
+ for (int l = 0; l < arraylist.size(); ++l) {
+ ChunkPosition chunkposition = (ChunkPosition) arraylist.get(l);
world.applyPhysics(chunkposition.x, chunkposition.y, chunkposition.z, this.id);
}
@@ -94,11 +92,11 @@ public class BlockRedstoneWire extends Block {
l1 = this.getPower(world, j2, j, k2, l1);
}
- if (world.s(j2, j, k2) && !world.s(i, j + 1, k)) {
+ if (world.t(j2, j, k2) && !world.t(i, j + 1, k)) {
if (j2 != l || j + 1 != i1 || k2 != j1) {
l1 = this.getPower(world, j2, j + 1, k2, l1);
}
- } else if (!world.s(j2, j, k2) && (j2 != l || j - 1 != i1 || k2 != j1)) {
+ } else if (!world.t(j2, j, k2) && (j2 != l || j - 1 != i1 || k2 != j1)) {
l1 = this.getPower(world, j2, j - 1, k2, l1);
}
}
@@ -146,7 +144,7 @@ public class BlockRedstoneWire extends Block {
++k2;
}
- if (world.s(j2, j, k2)) {
+ if (world.t(j2, j, k2)) {
l2 += 2;
}
@@ -208,25 +206,25 @@ public class BlockRedstoneWire extends Block {
this.n(world, i + 1, j, k);
this.n(world, i, j, k - 1);
this.n(world, i, j, k + 1);
- if (world.s(i - 1, j, k)) {
+ if (world.t(i - 1, j, k)) {
this.n(world, i - 1, j + 1, k);
} else {
this.n(world, i - 1, j - 1, k);
}
- if (world.s(i + 1, j, k)) {
+ if (world.t(i + 1, j, k)) {
this.n(world, i + 1, j + 1, k);
} else {
this.n(world, i + 1, j - 1, k);
}
- if (world.s(i, j, k - 1)) {
+ if (world.t(i, j, k - 1)) {
this.n(world, i, j + 1, k - 1);
} else {
this.n(world, i, j - 1, k - 1);
}
- if (world.s(i, j, k + 1)) {
+ if (world.t(i, j, k + 1)) {
this.n(world, i, j + 1, k + 1);
} else {
this.n(world, i, j - 1, k + 1);
@@ -248,25 +246,25 @@ public class BlockRedstoneWire extends Block {
this.n(world, i + 1, j, k);
this.n(world, i, j, k - 1);
this.n(world, i, j, k + 1);
- if (world.s(i - 1, j, k)) {
+ if (world.t(i - 1, j, k)) {
this.n(world, i - 1, j + 1, k);
} else {
this.n(world, i - 1, j - 1, k);
}
- if (world.s(i + 1, j, k)) {
+ if (world.t(i + 1, j, k)) {
this.n(world, i + 1, j + 1, k);
} else {
this.n(world, i + 1, j - 1, k);
}
- if (world.s(i, j, k - 1)) {
+ if (world.t(i, j, k - 1)) {
this.n(world, i, j + 1, k - 1);
} else {
this.n(world, i, j - 1, k - 1);
}
- if (world.s(i, j, k + 1)) {
+ if (world.t(i, j, k + 1)) {
this.n(world, i, j + 1, k + 1);
} else {
this.n(world, i, j - 1, k + 1);
@@ -317,25 +315,25 @@ public class BlockRedstoneWire extends Block {
} else if (l == 1) {
return true;
} else {
- boolean flag = g(iblockaccess, i - 1, j, k, 1) || !iblockaccess.s(i - 1, j, k) && g(iblockaccess, i - 1, j - 1, k, -1);
- boolean flag1 = g(iblockaccess, i + 1, j, k, 3) || !iblockaccess.s(i + 1, j, k) && g(iblockaccess, i + 1, j - 1, k, -1);
- boolean flag2 = g(iblockaccess, i, j, k - 1, 2) || !iblockaccess.s(i, j, k - 1) && g(iblockaccess, i, j - 1, k - 1, -1);
- boolean flag3 = g(iblockaccess, i, j, k + 1, 0) || !iblockaccess.s(i, j, k + 1) && g(iblockaccess, i, j - 1, k + 1, -1);
+ boolean flag = g(iblockaccess, i - 1, j, k, 1) || !iblockaccess.t(i - 1, j, k) && g(iblockaccess, i - 1, j - 1, k, -1);
+ boolean flag1 = g(iblockaccess, i + 1, j, k, 3) || !iblockaccess.t(i + 1, j, k) && g(iblockaccess, i + 1, j - 1, k, -1);
+ boolean flag2 = g(iblockaccess, i, j, k - 1, 2) || !iblockaccess.t(i, j, k - 1) && g(iblockaccess, i, j - 1, k - 1, -1);
+ boolean flag3 = g(iblockaccess, i, j, k + 1, 0) || !iblockaccess.t(i, j, k + 1) && g(iblockaccess, i, j - 1, k + 1, -1);
- if (!iblockaccess.s(i, j + 1, k)) {
- if (iblockaccess.s(i - 1, j, k) && g(iblockaccess, i - 1, j + 1, k, -1)) {
+ if (!iblockaccess.t(i, j + 1, k)) {
+ if (iblockaccess.t(i - 1, j, k) && g(iblockaccess, i - 1, j + 1, k, -1)) {
flag = true;
}
- if (iblockaccess.s(i + 1, j, k) && g(iblockaccess, i + 1, j + 1, k, -1)) {
+ if (iblockaccess.t(i + 1, j, k) && g(iblockaccess, i + 1, j + 1, k, -1)) {
flag1 = true;
}
- if (iblockaccess.s(i, j, k - 1) && g(iblockaccess, i, j + 1, k - 1, -1)) {
+ if (iblockaccess.t(i, j, k - 1) && g(iblockaccess, i, j + 1, k - 1, -1)) {
flag2 = true;
}
- if (iblockaccess.s(i, j, k + 1) && g(iblockaccess, i, j + 1, k + 1, -1)) {
+ if (iblockaccess.t(i, j, k + 1) && g(iblockaccess, i, j + 1, k + 1, -1)) {
flag3 = true;
}
}
diff --git a/src/main/java/net/minecraft/server/BlockSand.java b/src/main/java/net/minecraft/server/BlockSand.java
index 2738f08154..44c114846c 100644
--- a/src/main/java/net/minecraft/server/BlockSand.java
+++ b/src/main/java/net/minecraft/server/BlockSand.java
@@ -57,7 +57,7 @@ public class BlockSand extends Block {
protected void a(EntityFallingBlock entityfallingblock) {}
public int r_() {
- return 3;
+ return 5;
}
public static boolean canFall(World world, int i, int j, int k) {
diff --git a/src/main/java/net/minecraft/server/BlockSkull.java b/src/main/java/net/minecraft/server/BlockSkull.java
index d6cdd23ab8..968bd9416d 100644
--- a/src/main/java/net/minecraft/server/BlockSkull.java
+++ b/src/main/java/net/minecraft/server/BlockSkull.java
@@ -71,7 +71,7 @@ public class BlockSkull extends BlockContainer {
public int getDropData(World world, int i, int j, int k) {
TileEntity tileentity = world.getTileEntity(i, j, k);
- return tileentity != null && tileentity instanceof TileEntitySkull ? ((TileEntitySkull) tileentity).a() : super.getDropData(world, i, j, k);
+ return tileentity != null && tileentity instanceof TileEntitySkull ? ((TileEntitySkull) tileentity).getSkullType() : super.getDropData(world, i, j, k);
}
public int getDropData(int i) {
@@ -94,7 +94,15 @@ public class BlockSkull extends BlockContainer {
if (!world.isStatic) {
/* CraftBukkit start - don't special code dropping the item
if ((i1 & 8) == 0) {
- this.a(world, i, j, k, new ItemStack(Item.SKULL.id, 1, this.getDropData(world, i, j, k)));
+ ItemStack itemstack = new ItemStack(Item.SKULL.id, 1, this.getDropData(world, i, j, k));
+ TileEntitySkull tileentityskull = (TileEntitySkull) world.getTileEntity(i, j, k);
+
+ if (tileentityskull.getSkullType() == 3 && tileentityskull.getExtraType() != null && tileentityskull.getExtraType().length() > 0) {
+ itemstack.setTag(new NBTTagCompound());
+ itemstack.getTag().setString("SkullOwner", tileentityskull.getExtraType());
+ }
+
+ this.b(world, i, j, k, itemstack);
}
// CraftBukkit end */
@@ -107,7 +115,7 @@ public class BlockSkull extends BlockContainer {
}
public void a(World world, int i, int j, int k, TileEntitySkull tileentityskull) {
- if (tileentityskull.a() == 1 && j >= 2) {
+ if (tileentityskull.getSkullType() == 1 && j >= 2 && world.difficulty > 0) {
int l = Block.SOUL_SAND.id;
int i1;
@@ -195,7 +203,7 @@ public class BlockSkull extends BlockContainer {
} else {
TileEntity tileentity = world.getTileEntity(i, j, k);
- return tileentity != null && tileentity instanceof TileEntitySkull ? ((TileEntitySkull) tileentity).a() == l : false;
+ return tileentity != null && tileentity instanceof TileEntitySkull ? ((TileEntitySkull) tileentity).getSkullType() == l : false;
}
}
}
diff --git a/src/main/java/net/minecraft/server/BlockSnow.java b/src/main/java/net/minecraft/server/BlockSnow.java
index 2e11d2f973..eacb148593 100644
--- a/src/main/java/net/minecraft/server/BlockSnow.java
+++ b/src/main/java/net/minecraft/server/BlockSnow.java
@@ -56,7 +56,7 @@ public class BlockSnow extends Block {
public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) {
int i1 = Item.SNOW_BALL.id;
- this.a(world, i, j, k, new ItemStack(i1, 1, 0));
+ this.b(world, i, j, k, new ItemStack(i1, 1, 0));
world.setTypeId(i, j, k, 0);
entityhuman.a(StatisticList.C[this.id], 1);
}
diff --git a/src/main/java/net/minecraft/server/BlockSoil.java b/src/main/java/net/minecraft/server/BlockSoil.java
index bdffd5551e..a245359d47 100644
--- a/src/main/java/net/minecraft/server/BlockSoil.java
+++ b/src/main/java/net/minecraft/server/BlockSoil.java
@@ -31,7 +31,7 @@ public class BlockSoil extends Block {
}
public void b(World world, int i, int j, int k, Random random) {
- if (!this.n(world, i, j, k) && !world.B(i, j + 1, k)) {
+ if (!this.n(world, i, j, k) && !world.D(i, j + 1, k)) {
int l = world.getData(i, j, k);
if (l > 0) {
@@ -71,7 +71,7 @@ public class BlockSoil extends Block {
for (int i1 = k - b0; i1 <= k + b0; ++i1) {
int j1 = world.getTypeId(l, j + 1, i1);
- if (j1 == Block.CROPS.id || j1 == Block.MELON_STEM.id || j1 == Block.PUMPKIN_STEM.id) {
+ if (j1 == Block.CROPS.id || j1 == Block.MELON_STEM.id || j1 == Block.PUMPKIN_STEM.id || j1 == Block.POTATOES.id || j1 == Block.CARROTS.id) {
return true;
}
}
diff --git a/src/main/java/net/minecraft/server/BlockStem.java b/src/main/java/net/minecraft/server/BlockStem.java
index 50c3760d7b..ff1b89fa5a 100644
--- a/src/main/java/net/minecraft/server/BlockStem.java
+++ b/src/main/java/net/minecraft/server/BlockStem.java
@@ -161,7 +161,7 @@ public class BlockStem extends BlockFlower {
for (int j1 = 0; j1 < 3; ++j1) {
if (world.random.nextInt(15) <= l) {
- this.a(world, i, j, k, new ItemStack(item));
+ this.b(world, i, j, k, new ItemStack(item));
}
}
}
diff --git a/src/main/java/net/minecraft/server/BlockTNT.java b/src/main/java/net/minecraft/server/BlockTNT.java
index 8b6a2907c0..2090674432 100644
--- a/src/main/java/net/minecraft/server/BlockTNT.java
+++ b/src/main/java/net/minecraft/server/BlockTNT.java
@@ -53,7 +53,7 @@ public class BlockTNT extends Block {
}
public boolean interact(World world, int i, int j, int k, EntityHuman entityhuman, int l, float f, float f1, float f2) {
- if (entityhuman.bP() != null && entityhuman.bP().id == Item.FLINT_AND_STEEL.id) {
+ if (entityhuman.bT() != null && entityhuman.bT().id == Item.FLINT_AND_STEEL.id) {
this.postBreak(world, i, j, k, 1);
world.setTypeId(i, j, k, 0);
return true;
@@ -72,4 +72,8 @@ public class BlockTNT extends Block {
}
}
}
+
+ public boolean a(Explosion explosion) {
+ return false;
+ }
}
diff --git a/src/main/java/net/minecraft/server/BlockTrapdoor.java b/src/main/java/net/minecraft/server/BlockTrapdoor.java
index 7c5719af7b..7739df087b 100644
--- a/src/main/java/net/minecraft/server/BlockTrapdoor.java
+++ b/src/main/java/net/minecraft/server/BlockTrapdoor.java
@@ -152,33 +152,30 @@ public class BlockTrapdoor extends Block {
return super.a(world, i, j, k, vec3d, vec3d1);
}
- public void postPlace(World world, int i, int j, int k, int l, float f, float f1, float f2) {
- int i1 = 0;
+ public int getPlacedData(World world, int i, int j, int k, int l, float f, float f1, float f2, int i1) {
+ int j1 = 0;
if (l == 2) {
- i1 = 0;
+ j1 = 0;
}
if (l == 3) {
- i1 = 1;
+ j1 = 1;
}
if (l == 4) {
- i1 = 2;
+ j1 = 2;
}
if (l == 5) {
- i1 = 3;
+ j1 = 3;
}
- int j1 = Block.TRAP_DOOR.id;
-
if (l != 1 && l != 0 && f1 > 0.5F) {
- i1 |= 8;
+ j1 |= 8;
}
- world.setTypeIdAndData(i, j, k, j1, i1);
- doPhysics(world, i, j, k, Block.REDSTONE_WIRE.id); // CraftBukkit
+ return j1;
}
public boolean canPlace(World world, int i, int j, int k, int l) {
@@ -217,7 +214,7 @@ public class BlockTrapdoor extends Block {
} else {
Block block = Block.byId[i];
- return block != null && block.material.k() && block.b() || block == Block.GLOWSTONE;
+ return block != null && block.material.k() && block.b() || block == Block.GLOWSTONE || block instanceof BlockStepAbstract || block instanceof BlockStairs;
}
}
}
diff --git a/src/main/java/net/minecraft/server/BlockTripwire.java b/src/main/java/net/minecraft/server/BlockTripwire.java
index 3a4b7e42c5..191526a5f7 100644
--- a/src/main/java/net/minecraft/server/BlockTripwire.java
+++ b/src/main/java/net/minecraft/server/BlockTripwire.java
@@ -41,7 +41,7 @@ public class BlockTripwire extends Block {
public void doPhysics(World world, int i, int j, int k, int l) {
int i1 = world.getData(i, j, k);
boolean flag = (i1 & 2) == 2;
- boolean flag1 = !world.t(i, j - 1, k);
+ boolean flag1 = !world.v(i, j - 1, k);
if (flag != flag1) {
this.c(world, i, j, k, i1, 0);
@@ -64,7 +64,7 @@ public class BlockTripwire extends Block {
}
public void onPlace(World world, int i, int j, int k) {
- int l = world.t(i, j - 1, k) ? 0 : 2;
+ int l = world.v(i, j - 1, k) ? 0 : 2;
world.setData(i, j, k, l);
this.d(world, i, j, k, l);
@@ -76,7 +76,7 @@ public class BlockTripwire extends Block {
public void a(World world, int i, int j, int k, int l, EntityHuman entityhuman) {
if (!world.isStatic) {
- if (entityhuman.bP() != null && entityhuman.bP().id == Item.SHEARS.id) {
+ if (entityhuman.bT() != null && entityhuman.bT().id == Item.SHEARS.id) {
world.setData(i, j, k, l | 8);
}
}
diff --git a/src/main/java/net/minecraft/server/BlockTripwireHook.java b/src/main/java/net/minecraft/server/BlockTripwireHook.java
index 0fe164d6c3..e18bf43b26 100644
--- a/src/main/java/net/minecraft/server/BlockTripwireHook.java
+++ b/src/main/java/net/minecraft/server/BlockTripwireHook.java
@@ -33,14 +33,14 @@ public class BlockTripwireHook extends Block {
}
public boolean canPlace(World world, int i, int j, int k, int l) {
- return l == 2 && world.s(i, j, k + 1) ? true : (l == 3 && world.s(i, j, k - 1) ? true : (l == 4 && world.s(i + 1, j, k) ? true : l == 5 && world.s(i - 1, j, k)));
+ return l == 2 && world.t(i, j, k + 1) ? true : (l == 3 && world.t(i, j, k - 1) ? true : (l == 4 && world.t(i + 1, j, k) ? true : l == 5 && world.t(i - 1, j, k)));
}
public boolean canPlace(World world, int i, int j, int k) {
- return world.s(i - 1, j, k) ? true : (world.s(i + 1, j, k) ? true : (world.s(i, j, k - 1) ? true : world.s(i, j, k + 1)));
+ return world.t(i - 1, j, k) ? true : (world.t(i + 1, j, k) ? true : (world.t(i, j, k - 1) ? true : world.t(i, j, k + 1)));
}
- public void postPlace(World world, int i, int j, int k, int l, float f, float f1, float f2) {
+ public int getPlacedData(World world, int i, int j, int k, int l, float f, float f1, float f2, int i1) {
byte b0 = 0;
if (l == 2 && world.b(i, j, k + 1, true)) {
@@ -59,7 +59,11 @@ public class BlockTripwireHook extends Block {
b0 = 3;
}
- this.a(world, i, j, k, this.id, b0, false, -1, 0);
+ return b0;
+ }
+
+ public void postPlace(World world, int i, int j, int k, int l) {
+ this.a(world, i, j, k, this.id, l, false, -1, 0);
}
public void doPhysics(World world, int i, int j, int k, int l) {
@@ -69,19 +73,19 @@ public class BlockTripwireHook extends Block {
int j1 = i1 & 3;
boolean flag = false;
- if (!world.s(i - 1, j, k) && j1 == 3) {
+ if (!world.t(i - 1, j, k) && j1 == 3) {
flag = true;
}
- if (!world.s(i + 1, j, k) && j1 == 1) {
+ if (!world.t(i + 1, j, k) && j1 == 1) {
flag = true;
}
- if (!world.s(i, j, k - 1) && j1 == 0) {
+ if (!world.t(i, j, k - 1) && j1 == 0) {
flag = true;
}
- if (!world.s(i, j, k + 1) && j1 == 2) {
+ if (!world.t(i, j, k + 1) && j1 == 2) {
flag = true;
}
@@ -99,7 +103,7 @@ public class BlockTripwireHook extends Block {
boolean flag2 = (i1 & 8) == 8;
boolean flag3 = l == Block.TRIPWIRE_SOURCE.id;
boolean flag4 = false;
- boolean flag5 = !world.t(i, j - 1, k);
+ boolean flag5 = !world.v(i, j - 1, k);
int i2 = Direction.a[l1];
int j2 = Direction.b[l1];
int k2 = 0;
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 612d6f0179..62c7109052 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -159,7 +159,7 @@ public class Chunk {
if (chunksection != null) {
chunksection.c(j, i1 & 15, k, l);
- this.world.n((this.x << 4) + j, i1, (this.z << 4) + k);
+ this.world.o((this.x << 4) + j, i1, (this.z << 4) + k);
}
}
@@ -277,7 +277,7 @@ public class Chunk {
chunksection = this.sections[l1 >> 4];
if (chunksection != null) {
chunksection.c(i, l1 & 15, k, 15);
- this.world.n((this.x << 4) + i, l1, (this.z << 4) + k);
+ this.world.o((this.x << 4) + i, l1, (this.z << 4) + k);
}
}
} else {
@@ -285,7 +285,7 @@ public class Chunk {
chunksection = this.sections[l1 >> 4];
if (chunksection != null) {
chunksection.c(i, l1 & 15, k, 0);
- this.world.n((this.x << 4) + i, l1, (this.z << 4) + k);
+ this.world.o((this.x << 4) + i, l1, (this.z << 4) + k);
}
}
}
@@ -395,7 +395,7 @@ public class Chunk {
int k2 = this.z * 16 + k;
if (l1 != 0 && !this.world.isStatic) {
- Block.byId[l1].g(this.world, j2, j, k2, i2);
+ Block.byId[l1].h(this.world, j2, j, k2, i2);
}
chunksection.a(i, j & 15, k, l);
@@ -403,7 +403,7 @@ public class Chunk {
if (!this.world.isStatic) {
Block.byId[l1].remove(this.world, j2, j, k2, l1, i2);
} else if (Block.byId[l1] instanceof BlockContainer && l1 != l) {
- this.world.q(j2, j, k2);
+ this.world.r(j2, j, k2);
}
}
@@ -659,13 +659,9 @@ public class Chunk {
public void addEntities() {
this.d = true;
this.world.a(this.tileEntities.values());
- List[] alist = this.entitySlices;
- int i = alist.length;
- for (int j = 0; j < i; ++j) {
- List list = alist[j];
-
- this.world.a(list);
+ for (int i = 0; i < this.entitySlices.length; ++i) {
+ this.world.a(this.entitySlices[i]);
}
}
@@ -679,12 +675,9 @@ public class Chunk {
this.world.a(tileentity);
}
- List[] alist = this.entitySlices;
- int i = alist.length;
-
- for (int j = 0; j < i; ++j) {
+ for (int i = 0; i < this.entitySlices.length; ++i) {
// CraftBukkit start
- java.util.Iterator