This commit is contained in:
Technus 2017-06-25 12:28:11 +02:00
parent 29c2639e83
commit 850f30a9d7

View file

@ -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) {