Fix BlockPlace

This commit is contained in:
Erik Broes
2011-03-21 00:25:26 +01:00
parent 0d2dc3902c
commit 324efa8224
11 changed files with 355 additions and 202 deletions

View File

@@ -10,6 +10,7 @@ import org.bukkit.block.BlockState;
import org.bukkit.craftbukkit.CraftChunk;
import org.bukkit.craftbukkit.CraftWorld;
import org.bukkit.material.MaterialData;
import net.minecraft.server.WorldServer;
public class CraftBlockState implements BlockState {
private final CraftWorld world;
@@ -33,6 +34,10 @@ public class CraftBlockState implements BlockState {
createData(block.getData());
}
public static BlockState getBlockState( net.minecraft.server.World world, int x, int y, int z) {
return new CraftBlockState( ((WorldServer) world).getWorld().getBlockAt(x, y, z) );
}
/**
* Gets the world which contains this Block
*