Fix BlockPlace

By: Erik Broes <erikbroes@grum.nl>
This commit is contained in:
CraftBukkit/Spigot
2011-03-21 00:25:26 +01:00
parent 7b978d1dd4
commit c964c8657e
2 changed files with 108 additions and 0 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
*