From d3089a48dae23dbaec653355abeb2d0231347cd3 Mon Sep 17 00:00:00 2001 From: RecursivePineapple Date: Mon, 26 Aug 2024 17:44:58 -0400 Subject: Added a tooltip line for strong redstone output (#2983) Co-authored-by: boubou19 --- .../api/metatileentity/CoverableTileEntity.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/main/java/gregtech/api/metatileentity/CoverableTileEntity.java') diff --git a/src/main/java/gregtech/api/metatileentity/CoverableTileEntity.java b/src/main/java/gregtech/api/metatileentity/CoverableTileEntity.java index aa3d70e56b..429e0fc04c 100644 --- a/src/main/java/gregtech/api/metatileentity/CoverableTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/CoverableTileEntity.java @@ -609,6 +609,7 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov public static void addInstalledCoversInformation(NBTTagCompound aNBT, List aList) { if (aNBT == null || aList == null) return; final NBTTagList tList = aNBT.getTagList(GT_Values.NBT.COVERS, 10); + for (byte i = 0; i < tList.tagCount(); i++) { final NBTTagCompound tNBT = tList.getCompoundTagAt(i); final CoverInfo coverInfo = new CoverInfo(null, tNBT); @@ -647,6 +648,22 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov } } } + + byte strongRedstone = aNBT.getByte("mStrongRedstone"); + + for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) { + if ((strongRedstone & dir.flag) != 0) { + aList.add(String.format("Emits a strong redstone signal on the %s side", switch (dir) { + case DOWN -> "bottom"; + case UP -> "top"; + case NORTH -> "north"; + case SOUTH -> "south"; + case WEST -> "west"; + case EAST -> "east"; + default -> ""; + })); + } + } } protected ModularWindow createCoverWindow(EntityPlayer player, ForgeDirection side) { -- cgit