Skip to content

Commit

Permalink
[BLEEDING] Fix block shape retrieval for 1.9.
Browse files Browse the repository at this point in the history
  • Loading branch information
asofold committed Mar 4, 2016
1 parent 62ea433 commit c5d99f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Expand Up @@ -60,9 +60,9 @@ public double[] fetchBounds(final int x, final int y, final int z){
return null;
}
final BlockPosition pos = new BlockPosition(x, y, z);
final IBlockData data = block.getBlockData();
block.updateState(data, world, pos); // TODO: REALLY THIS?
final AxisAlignedBB bb = block.a(data, world, pos);
final IBlockData data = block.updateState(getType(pos), this, pos);

final AxisAlignedBB bb = block.a(data, this, pos);
if (bb == null) {
return new double[] {0.0, 0.0, 0.0, 1.0, 1.0, 1.0}; // Special case.
//return null;
Expand Down Expand Up @@ -129,11 +129,13 @@ public TileEntity getTileEntity(BlockPosition pos) {

@Override
public IBlockData getType(BlockPosition pos) {
// TODO: Can this be cached ?
return world.getType(pos);
}

@Override
public boolean isEmpty(BlockPosition pos) {
// TODO: Can (and should) this be cached ?
return world.isEmpty(pos);
}

Expand Down
Expand Up @@ -41,7 +41,7 @@ public MCAccessCBDev() {
// TODO: AxisAlignedBB abcdef
// TODO: BlockPosition
// TODO: IBlockData
// TODO: Block.a, Block.updateState, Block.q(IBlockData
// TODO: Block... used in BlockCache.
getCommandMap();
ReflectionUtil.checkMembers("net.minecraft.server.v1_9_R1.",
new String[] {"Entity" , "length", "width", "locY"});
Expand Down

0 comments on commit c5d99f9

Please sign in to comment.