Fix TESR culling for beacons, and implement a good enough measure for Chests.
This commit is contained in:
parent
a0bc6a3ed0
commit
a520e128d7
1 changed files with 11 additions and 2 deletions
|
@ -11,7 +11,7 @@
|
|||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntity
|
||||
@@ -296,4 +299,84 @@
|
||||
@@ -296,4 +299,93 @@
|
||||
addMapping(TileEntityBeacon.class, "Beacon");
|
||||
addMapping(TileEntitySkull.class, "Skull");
|
||||
}
|
||||
|
@ -85,7 +85,16 @@
|
|||
+ public AxisAlignedBB getRenderBoundingBox()
|
||||
+ {
|
||||
+ AxisAlignedBB bb = INFINITE_EXTENT_AABB;
|
||||
+ if (getBlockType()!=null && getBlockType() != Block.chest)
|
||||
+ Block type = getBlockType();
|
||||
+ if (type == Block.enchantmentTable)
|
||||
+ {
|
||||
+ bb = AxisAlignedBB.getAABBPool().addOrModifyAABBInPool(xCoord, yCoord, zCoord, xCoord + 1, yCoord + 1, zCoord + 1);
|
||||
+ }
|
||||
+ else if (type == Block.chest)
|
||||
+ {
|
||||
+ bb = AxisAlignedBB.getAABBPool().addOrModifyAABBInPool(xCoord - 1, yCoord, zCoord - 1, xCoord + 2, yCoord + 1, zCoord + 2);
|
||||
+ }
|
||||
+ else if (type != null && type != Block.beacon)
|
||||
+ {
|
||||
+ AxisAlignedBB cbb = getBlockType().getCollisionBoundingBoxFromPool(worldObj, xCoord, yCoord, zCoord);
|
||||
+ if (cbb != null)
|
||||
|
|
Loading…
Reference in a new issue