From 389267d73391abdea33c9eae09aa2d3aac51ac7b Mon Sep 17 00:00:00 2001 From: Technus Date: Sat, 26 Nov 2016 11:02:11 +0100 Subject: [PATCH] Fix scaling of ItemBlock GT machines in certain scenarios, repostion wire heating info. --- .../implementations/GT_MetaPipeEntity_Cable.java | 6 +++--- .../java/gregtech/common/blocks/GT_Block_Machines.java | 7 ++++++- .../java/gregtech/common/covers/GT_Cover_SolarPanel.java | 3 --- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java index a6624bdf..b4c6b3f5 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java @@ -322,6 +322,8 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile public String[] getInfoData() { return new String[]{ //EnumChatFormatting.BLUE + mName + EnumChatFormatting.RESET, + "Heat: "+ + EnumChatFormatting.RED+ mOverheat +EnumChatFormatting.RESET+" / "+EnumChatFormatting.YELLOW+ mMaxOverheat + EnumChatFormatting.RESET, "Max Load (1t):", EnumChatFormatting.GREEN + Integer.toString(mTransferredAmperageOK) + EnumChatFormatting.RESET +" A / "+ EnumChatFormatting.YELLOW + Long.toString(mAmperage) + EnumChatFormatting.RESET +" A", @@ -331,9 +333,7 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile "Max Load (20t): "+ EnumChatFormatting.GREEN + Integer.toString(mTransferredAmperageLast20OK) + EnumChatFormatting.RESET +" A", "Max EU/p (20t): "+ - EnumChatFormatting.GREEN + Long.toString(mTransferredVoltageLast20OK) + EnumChatFormatting.RESET +" EU", - "Heat: "+ - EnumChatFormatting.RED+ mOverheat +EnumChatFormatting.RESET+" / "+EnumChatFormatting.YELLOW+ mMaxOverheat + EnumChatFormatting.RESET + EnumChatFormatting.GREEN + Long.toString(mTransferredVoltageLast20OK) + EnumChatFormatting.RESET +" EU" }; } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Machines.java b/src/main/java/gregtech/common/blocks/GT_Block_Machines.java index 00065aa3..0f5e3978 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Machines.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Machines.java @@ -207,7 +207,7 @@ 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)) { @@ -218,6 +218,11 @@ public class GT_Block_Machines 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) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null)) { diff --git a/src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java b/src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java index 1b6a0e23..73cfd7da 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java @@ -71,10 +71,7 @@ public class GT_Cover_SolarPanel return false; } - - public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return 1; } - } \ No newline at end of file