Improved water/bucket fix by having it set back the original block. Unfortunately this doesn't do anything about setting water buckets into lava (creating obsidian).

This commit is contained in:
sk89q 2010-11-19 00:14:08 -08:00
parent 0a8dd85224
commit 84eb9343ce

View File

@ -236,13 +236,14 @@ public boolean onBlockCreate(Player player, Block blockPlaced, Block blockClicke
final int x = blockPlaced.getX(); final int x = blockPlaced.getX();
final int y = blockPlaced.getY(); final int y = blockPlaced.getY();
final int z = blockPlaced.getZ(); final int z = blockPlaced.getZ();
final int existingID = etc.getServer().getBlockIdAt(x, y, z);
// This is REALLY BAD, but there's no other choice // This is REALLY BAD, but there's no other choice
// at the moment that is as reliable // at the moment that is as reliable
timer.schedule(new TimerTask() { timer.schedule(new TimerTask() {
public void run() { public void run() {
try { try {
etc.getServer().setBlockAt(0, x, y, z); etc.getServer().setBlockAt(existingID, x, y, z);
} catch (Throwable t) {} } catch (Throwable t) {}
} }
}, 200); // Just in case }, 200); // Just in case