aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRecursivePineapple <recursive_pineapple@proton.me>2024-08-26 17:44:58 -0400
committerGitHub <noreply@github.com>2024-08-26 21:44:58 +0000
commitd3089a48dae23dbaec653355abeb2d0231347cd3 (patch)
treefbe6e200f34f7cc9c3a096ccb9f38f0f7b769d89
parenteb8e822195db13aaed5f922785a02faa69ad0c85 (diff)
downloadGT5-Unofficial-d3089a48dae23dbaec653355abeb2d0231347cd3.tar.gz
GT5-Unofficial-d3089a48dae23dbaec653355abeb2d0231347cd3.tar.bz2
GT5-Unofficial-d3089a48dae23dbaec653355abeb2d0231347cd3.zip
Added a tooltip line for strong redstone output (#2983)
Co-authored-by: boubou19 <miisterunknown@gmail.com>
-rw-r--r--src/main/java/gregtech/api/metatileentity/CoverableTileEntity.java17
1 files changed, 17 insertions, 0 deletions
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<String> 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 -> "<unknown>";
+ }));
+ }
+ }
}
protected ModularWindow createCoverWindow(EntityPlayer player, ForgeDirection side) {