Skip to content

Commit 3333c4b

Browse files
committed
Hide Robit's health from Jade as the Robit uses energy not health
1 parent d00749f commit 3333c4b

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/main/java/mekanism/common/integration/lookingat/jade/JadeBuiltinRemover.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
package mekanism.common.integration.lookingat.jade;
22

33
import mekanism.api.SerializationConstants;
4+
import mekanism.common.entity.EntityRobit;
45
import net.minecraft.nbt.Tag;
56
import net.minecraft.resources.ResourceLocation;
67
import snownee.jade.api.Accessor;
8+
import snownee.jade.api.EntityAccessor;
79
import snownee.jade.api.IComponentProvider;
810
import snownee.jade.api.ITooltip;
911
import snownee.jade.api.JadeIds;
@@ -24,6 +26,9 @@ public void appendTooltip(ITooltip tooltip, ACCESSOR accessor, IPluginConfig con
2426
if (accessor.getServerData().contains(SerializationConstants.MEK_DATA, Tag.TAG_LIST)) {
2527
tooltip.remove(JadeIds.UNIVERSAL_ENERGY_STORAGE);
2628
tooltip.remove(JadeIds.UNIVERSAL_FLUID_STORAGE);
29+
if (accessor instanceof EntityAccessor entityAccessor && entityAccessor.getEntity() instanceof EntityRobit) {
30+
tooltip.remove(JadeIds.MC_ENTITY_HEALTH);
31+
}
2732
}
2833
}
2934

src/main/java/mekanism/common/integration/lookingat/wthit/MekanismWTHITPlugin.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,17 @@ public void register(IRegistrar registration) {
4747
public void onHandleTooltip(ITooltip tooltip, ICommonAccessor accessor, IPluginConfig config) {
4848
if (tooltip.getLine(MEK_DATA) != null) {
4949
//If we have mekanism data then clear out the default energy and fluid data as we handle that ourselves
50+
// Note: Setting adds it if it is not present, so only set it if it is present
5051
if (tooltip.getLine(EnergyData.ID) != null) {
51-
//Setting adds it if it is not present, so only set it if it is present
5252
tooltip.setLine(EnergyData.ID);
5353
}
5454
if (tooltip.getLine(FluidData.ID) != null) {
55-
//Setting adds it if it is not present, so only set it if it is present
5655
tooltip.setLine(FluidData.ID);
5756
}
57+
//TODO: Figure out how to remove the health bar for the robit from WTHIT
58+
/*if (accessor.getEntity() instanceof EntityRobit && tooltip.getLine(ID) != null) {
59+
tooltip.setLine(ID);
60+
}*/
5861
}
5962
}
6063
});

0 commit comments

Comments
 (0)