Exemple #1
0
 @Override
 public Vector[] getBlockHitbox(org.bukkit.block.Block block) {
   net.minecraft.server.v1_7_R3.World w = ((CraftWorld) block.getWorld()).getHandle();
   net.minecraft.server.v1_7_R3.Block b = w.getType(block.getX(), block.getY(), block.getZ());
   b.updateShape(w, block.getX(), block.getY(), block.getZ());
   return new Vector[] {
     new Vector(block.getX() + b.x(), block.getY() + b.z(), block.getZ() + b.B()),
     new Vector(block.getX() + b.y(), block.getY() + b.A(), block.getZ() + b.C())
   };
 }
Exemple #2
0
 @Override
 public int getBlockLightEmission(int blockId) {
   return Block.e(blockId).m();
 }
Exemple #3
0
 @Override
 public int getBlockLightBlocking(int blockId) {
   return Block.e(blockId).k();
 }
Exemple #4
0
 @Override
 public boolean setBlockFast(World world, int x, int y, int z, int blockId, byte data) {
   net.minecraft.server.v1_7_R3.World w = ((CraftWorld) world).getHandle();
   Chunk chunk = w.getChunkAt(x >> 4, z >> 4);
   return chunk.a(x & 0x0f, y, z & 0x0f, Block.e(blockId), data);
 }