Extra fix for: https://github.com/Blood-Asp/GT5-Unofficial/issues/1098
This commit is contained in:
parent
29c2639e83
commit
850f30a9d7
1 changed files with 14 additions and 4 deletions
|
@ -206,15 +206,25 @@ public class GT_Block_Machines
|
|||
return super.getSelectedBoundingBoxFromPool(aWorld, aX, aY, aZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override //THIS
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess blockAccess, int aX, int aY, int aZ) {
|
||||
TileEntity tTileEntity = blockAccess.getTileEntity(aX, aY, aZ);
|
||||
if (((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null)) {
|
||||
AxisAlignedBB bbb = ((IGregTechTileEntity) tTileEntity).getCollisionBoundingBoxFromPool(((IGregTechTileEntity) tTileEntity).getWorld(), aX, aY, aZ).getOffsetBoundingBox(-aX, -aY, -aZ);
|
||||
setBlockBounds((float) bbb.minX, (float) bbb.minY, (float) bbb.minZ, (float) bbb.maxX, (float) bbb.maxY, (float) bbb.maxZ);
|
||||
AxisAlignedBB bbb=((IGregTechTileEntity)tTileEntity).getCollisionBoundingBoxFromPool(((IGregTechTileEntity)tTileEntity).getWorld(), 0, 0, 0);
|
||||
minX=bbb.minX;//This essentially sets block bounds
|
||||
minY=bbb.minY;
|
||||
minZ=bbb.minZ;
|
||||
maxX=bbb.maxX;
|
||||
maxY=bbb.maxY;
|
||||
maxZ=bbb.maxZ;
|
||||
return;
|
||||
}
|
||||
super.setBlockBoundsBasedOnState(blockAccess, aX, aY, aZ);
|
||||
super.setBlockBoundsBasedOnState(blockAccess,aX,aY,aZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsForItemRender() {
|
||||
super.setBlockBounds(0,0,0,1,1,1);
|
||||
}
|
||||
|
||||
public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity collider) {
|
||||
|
|
Loading…
Reference in a new issue