Skip to content

Commit a63158c

Browse files
committed
add weather-proof tooltip to multiblocks
1 parent e086960 commit a63158c

File tree

4 files changed

+6
-14
lines changed

4 files changed

+6
-14
lines changed

src/main/java/gregtech/api/metatileentity/MetaTileEntity.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,10 @@ public void addDebugInfo(List<String> list) {}
235235

236236
@SideOnly(Side.CLIENT)
237237
public void addInformation(ItemStack stack, @Nullable World world, @NotNull List<String> tooltip,
238-
boolean advanced) {}
238+
boolean advanced) {
239+
if (ConfigHolder.machines.doTerrainExplosion && getIsWeatherOrTerrainResistant())
240+
tooltip.add(I18n.format("gregtech.universal.tooltip.terrain_resist"));
241+
}
239242

240243
/**
241244
* Override this to add extended tool information to the "Hold SHIFT to show Tool Info" tooltip section.

src/main/java/gregtech/api/metatileentity/TieredMetaTileEntity.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,6 @@ protected SimpleSidedCubeRenderer getBaseRenderer() {
5757
return Textures.VOLTAGE_CASINGS[tier];
5858
}
5959

60-
@Override
61-
public void addInformation(ItemStack stack, @Nullable World player, @NotNull List<String> tooltip,
62-
boolean advanced) {
63-
super.addInformation(stack, player, tooltip, advanced);
64-
if (ConfigHolder.machines.doTerrainExplosion && getIsWeatherOrTerrainResistant())
65-
tooltip.add(I18n.format("gregtech.universal.tooltip.terrain_resist"));
66-
}
67-
6860
@Override
6961
@SideOnly(Side.CLIENT)
7062
public Pair<TextureAtlasSprite, Integer> getParticleTexture() {

src/main/java/gregtech/common/metatileentities/electric/MetaTileEntityPump.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,9 +398,8 @@ public void readFromNBT(NBTTagCompound data) {
398398

399399
@Override
400400
public void addInformation(ItemStack stack, @Nullable World player, List<String> tooltip, boolean advanced) {
401+
super.addInformation(stack, player, tooltip, advanced);
401402
tooltip.add(I18n.format("gregtech.machine.pump.tooltip"));
402-
if (ConfigHolder.machines.doTerrainExplosion)
403-
tooltip.add(I18n.format("gregtech.universal.tooltip.terrain_resist"));
404403
tooltip.add(
405404
I18n.format("gregtech.universal.tooltip.uses_per_op", GTValues.V[getTier()] * 2) + TextFormatting.GRAY +
406405
", " + I18n.format("gregtech.machine.pump.tooltip_buckets", getPumpingCycleLength()));

src/main/java/gregtech/common/metatileentities/storage/MetaTileEntityLongDistanceEndpoint.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,15 +213,13 @@ protected boolean openGUIOnRightClick() {
213213
@Override
214214
public void addInformation(ItemStack stack, @Nullable World player, @NotNull List<String> tooltip,
215215
boolean advanced) {
216+
super.addInformation(stack, player, tooltip, advanced);
216217
tooltip.add(I18n.format("gregtech.machine.endpoint.tooltip.1"));
217218
tooltip.add(I18n.format("gregtech.machine.endpoint.tooltip.2"));
218219
tooltip.add(I18n.format("gregtech.machine.endpoint.tooltip.3"));
219220
if (pipeType.getMinLength() > 0) {
220221
tooltip.add(I18n.format("gregtech.machine.endpoint.tooltip.min_length", pipeType.getMinLength()));
221222
}
222-
if (ConfigHolder.machines.doTerrainExplosion && getIsWeatherOrTerrainResistant()) {
223-
tooltip.add(I18n.format("gregtech.universal.tooltip.terrain_resist"));
224-
}
225223
}
226224

227225
@Override

0 commit comments

Comments
 (0)