diff options
Diffstat (limited to 'src/main/java/gregtech/common/GT_Client.java')
-rw-r--r-- | src/main/java/gregtech/common/GT_Client.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java index 79c8256c04..b93060ba59 100644 --- a/src/main/java/gregtech/common/GT_Client.java +++ b/src/main/java/gregtech/common/GT_Client.java @@ -90,6 +90,7 @@ import gregtech.api.util.GT_PlayedSound; import gregtech.api.util.GT_Utility; import gregtech.api.util.WorldSpawnedEventBuilder; import gregtech.client.SeekingOggCodec; +import gregtech.common.blocks.GT_Block_FrameBox; import gregtech.common.blocks.GT_Item_Machines; import gregtech.common.render.GT_CapeRenderer; import gregtech.common.render.GT_FlaskRenderer; @@ -842,8 +843,16 @@ public class GT_Client extends GT_Proxy implements Runnable { if (GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sWrenchList)) { if (aTileEntity instanceof ITurnable || ROTATABLE_VANILLA_BLOCKS.contains(aBlock) || aTileEntity instanceof IWrenchable - || (aTileEntity instanceof IOrientable orientable && orientable.canBeRotated())) - drawGrid(aEvent, false, true, aEvent.player.isSneaking()); + || (aTileEntity instanceof IOrientable orientable && orientable.canBeRotated()) + || (aBlock instanceof GT_Block_FrameBox)) drawGrid(aEvent, false, true, aEvent.player.isSneaking()); + return; + } + + // If there is no tile entity and the block is a frame box block, still draw the grid if a cover is held + if (aTileEntity == null && aBlock instanceof GT_Block_FrameBox) { + if (GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sCovers.keySet())) { + drawGrid(aEvent, true, false, aEvent.player.isSneaking()); + } return; } |