Skip to content

Commit

Permalink
Restore stability waila info for black hole (#3803)
Browse files Browse the repository at this point in the history
Co-authored-by: Maya <[email protected]>
  • Loading branch information
FourIsTheNumber and serenibyss authored Jan 13, 2025
1 parent 3e28700 commit 4022009
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,8 @@ public void saveNBTData(NBTTagCompound aNBT) {
public void getWailaNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y,
int z) {
super.getWailaNBTData(player, tile, tag, world, x, y, z);
tag.setByte("blackHoleStatus", blackHoleStatus);
tag.setFloat("blackHoleStability", blackHoleStability);
tag.setInteger("parallels", getMaxParallelRecipes());
}

Expand All @@ -454,6 +456,18 @@ public void getWailaBody(ItemStack itemStack, List<String> currentTip, IWailaDat
StatCollector.translateToLocal("GT5U.multiblock.parallelism") + ": "
+ EnumChatFormatting.WHITE
+ tag.getInteger("parallels"));
if (tag.getByte("blackHoleStatus") != 1) {
if (tag.getFloat("blackHoleStability") > 0) {
currentTip.add(EnumChatFormatting.DARK_PURPLE + "Black Hole Active");
currentTip.add(
EnumChatFormatting.DARK_PURPLE + "Stability: "
+ EnumChatFormatting.BOLD
+ Math.round(tag.getFloat("blackHoleStability"))
+ "%");
} else {
currentTip.add(EnumChatFormatting.RED + "BLACK HOLE UNSTABLE");
}
} else currentTip.add(EnumChatFormatting.DARK_PURPLE + "Black Hole Offline");
}

private int getModeFromCircuit(ItemStack[] t) {
Expand Down

0 comments on commit 4022009

Please sign in to comment.