diff --git a/dependencies.gradle b/dependencies.gradle index dfe62ce..d8e7cfb 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -1,7 +1,7 @@ dependencies { - api('com.github.GTNewHorizons:GT5-Unofficial:5.09.51.70:dev') - api('com.github.GTNewHorizons:Galacticraft:3.3.2-GTNH:dev') - api('com.github.GTNewHorizons:GTNHLib:0.6.1:dev') + api('com.github.GTNewHorizons:GT5-Unofficial:5.09.51.77:dev') + api('com.github.GTNewHorizons:Galacticraft:3.3.3-GTNH:dev') + api('com.github.GTNewHorizons:GTNHLib:0.6.2:dev') compileOnly('com.github.GTNewHorizons:BlockRenderer6343:1.3.2:dev') {transitive = false} - compileOnly("com.github.GTNewHorizons:Hodgepodge:2.6.15:dev") {transitive = false} + compileOnly("com.github.GTNewHorizons:Hodgepodge:2.6.16:dev") {transitive = false} } diff --git a/src/main/java/com/gtnewhorizons/gtnhintergalactic/client/TooltipUtil.java b/src/main/java/com/gtnewhorizons/gtnhintergalactic/client/TooltipUtil.java index 2ddaf54..1c692c2 100644 --- a/src/main/java/com/gtnewhorizons/gtnhintergalactic/client/TooltipUtil.java +++ b/src/main/java/com/gtnewhorizons/gtnhintergalactic/client/TooltipUtil.java @@ -4,11 +4,8 @@ import java.util.function.Supplier; -import com.gtnewhorizon.gtnhlib.client.tooltip.LoreHandler; +import com.gtnewhorizon.gtnhlib.client.tooltip.LoreHolder; import com.gtnewhorizons.gtnhintergalactic.item.IGItems; -import com.gtnewhorizons.gtnhintergalactic.tile.multi.TileEntityDysonSwarm; -import com.gtnewhorizons.gtnhintergalactic.tile.multi.TileEntityPlanetaryGasSiphon; -import com.gtnewhorizons.gtnhintergalactic.tile.multi.elevator.TileEntitySpaceElevator; /** * Utility functions for tooltips @@ -17,14 +14,19 @@ */ public class TooltipUtil { + @LoreHolder("gt.blockmachines.multimachine.ig.siphon.lore") + public static String siphonLoreText; + + @LoreHolder("gt.blockmachines.multimachine.ig.elevator.lore") + public static String elevatorLoreText; + + @LoreHolder("gt.blockmachines.multimachine.ig.dyson.lore") + public static String dysonLoreText; + /** * Initialize the tooltip utilities */ public static void postInit() { - LoreHandler.registerLoreHolder(TileEntityPlanetaryGasSiphon.class); - LoreHandler.registerLoreHolder(TileEntityDysonSwarm.class); - LoreHandler.registerLoreHolder(TileEntitySpaceElevator.class); - Supplier AUTHOR_GLOWREDMAN = chain( translatedText("ig.structure.author"), text(": "), diff --git a/src/main/java/com/gtnewhorizons/gtnhintergalactic/tile/multi/TileEntityDysonSwarm.java b/src/main/java/com/gtnewhorizons/gtnhintergalactic/tile/multi/TileEntityDysonSwarm.java index a899253..8fca7ca 100644 --- a/src/main/java/com/gtnewhorizons/gtnhintergalactic/tile/multi/TileEntityDysonSwarm.java +++ b/src/main/java/com/gtnewhorizons/gtnhintergalactic/tile/multi/TileEntityDysonSwarm.java @@ -19,7 +19,6 @@ import net.minecraft.world.WorldProvider; import net.minecraftforge.common.util.ForgeDirection; -import com.gtnewhorizon.gtnhlib.client.tooltip.LoreHolder; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; @@ -27,6 +26,7 @@ import com.gtnewhorizon.structurelib.structure.StructureUtility; import com.gtnewhorizons.gtnhintergalactic.block.IGBlocks; import com.gtnewhorizons.gtnhintergalactic.client.IGTextures; +import com.gtnewhorizons.gtnhintergalactic.client.TooltipUtil; import com.gtnewhorizons.gtnhintergalactic.config.IGConfig; import com.gtnewhorizons.gtnhintergalactic.item.IGItems; @@ -50,9 +50,6 @@ public class TileEntityDysonSwarm extends TTMultiblockBase implements ISurvivalConstructable { - @LoreHolder("gt.blockmachines.multimachine.ig.dyson.lore") - private static String loreTooltip; - private static final Map DECIMAL_FORMATTERS = new HashMap<>(); private static final String STRUCTURE_PIECE_MAIN = "main"; @@ -404,7 +401,7 @@ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirec protected MultiblockTooltipBuilder createTooltip() { final MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder(); tt.addMachineType(translateToLocal("gt.blockmachines.multimachine.ig.dyson.type")); - if (loreTooltip != null) tt.addInfo(ITALIC + loreTooltip); + if (TooltipUtil.dysonLoreText != null) tt.addInfo(ITALIC + TooltipUtil.dysonLoreText); tt.addInfo(translateToLocal("gt.blockmachines.multimachine.ig.dyson.desc1")) .addInfo( diff --git a/src/main/java/com/gtnewhorizons/gtnhintergalactic/tile/multi/TileEntityPlanetaryGasSiphon.java b/src/main/java/com/gtnewhorizons/gtnhintergalactic/tile/multi/TileEntityPlanetaryGasSiphon.java index ad3572b..d713815 100644 --- a/src/main/java/com/gtnewhorizons/gtnhintergalactic/tile/multi/TileEntityPlanetaryGasSiphon.java +++ b/src/main/java/com/gtnewhorizons/gtnhintergalactic/tile/multi/TileEntityPlanetaryGasSiphon.java @@ -28,7 +28,6 @@ import org.jetbrains.annotations.NotNull; -import com.gtnewhorizon.gtnhlib.client.tooltip.LoreHolder; import com.gtnewhorizon.structurelib.StructureLibAPI; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.IStructureElement; @@ -36,6 +35,7 @@ import com.gtnewhorizon.structurelib.structure.StructureUtility; import com.gtnewhorizons.gtnhintergalactic.block.IGBlocks; import com.gtnewhorizons.gtnhintergalactic.client.IGTextures; +import com.gtnewhorizons.gtnhintergalactic.client.TooltipUtil; import com.gtnewhorizons.gtnhintergalactic.recipe.GasSiphonRecipes; import bartworks.client.textures.PrefixTextureLinker; @@ -73,10 +73,6 @@ public class TileEntityPlanetaryGasSiphon extends MTEEnhancedMultiBlockBase implements IChunkLoader { - /** Lore string, which will be randomly picked from a selection each time the resources are reloaded */ - @LoreHolder("gt.blockmachines.multimachine.ig.siphon.lore") - @SuppressWarnings("unused") - private static String loreTooltip; /** Main structure of the machine */ private static final String STRUCTURE_PIECE_MAIN = "main"; /** Cached value of log10(4) */ @@ -178,7 +174,7 @@ public IMetaTileEntity newMetaEntity(IGregTechTileEntity tileEntity) { protected MultiblockTooltipBuilder createTooltip() { final MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder(); tt.addMachineType(GCCoreUtil.translate("gt.blockmachines.multimachine.ig.siphon.type")); - if (loreTooltip != null) tt.addInfo(ITALIC + loreTooltip); + if (TooltipUtil.siphonLoreText != null) tt.addInfo(ITALIC + TooltipUtil.siphonLoreText); tt.addInfo(GCCoreUtil.translate("gt.blockmachines.multimachine.ig.siphon.desc1")) .addInfo(GCCoreUtil.translate("gt.blockmachines.multimachine.ig.siphon.desc2")) .addInfo(GCCoreUtil.translate("gt.blockmachines.multimachine.ig.siphon.desc3")) diff --git a/src/main/java/com/gtnewhorizons/gtnhintergalactic/tile/multi/elevator/TileEntitySpaceElevator.java b/src/main/java/com/gtnewhorizons/gtnhintergalactic/tile/multi/elevator/TileEntitySpaceElevator.java index 5d0b8dd..66eac77 100644 --- a/src/main/java/com/gtnewhorizons/gtnhintergalactic/tile/multi/elevator/TileEntitySpaceElevator.java +++ b/src/main/java/com/gtnewhorizons/gtnhintergalactic/tile/multi/elevator/TileEntitySpaceElevator.java @@ -23,7 +23,6 @@ import org.jetbrains.annotations.NotNull; -import com.gtnewhorizon.gtnhlib.client.tooltip.LoreHolder; import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.alignment.enumerable.Rotation; @@ -32,6 +31,7 @@ import com.gtnewhorizon.structurelib.structure.StructureDefinition; import com.gtnewhorizon.structurelib.structure.StructureUtility; import com.gtnewhorizons.gtnhintergalactic.block.IGBlocks; +import com.gtnewhorizons.gtnhintergalactic.client.TooltipUtil; import com.gtnewhorizons.gtnhintergalactic.config.IGConfig; import com.gtnewhorizons.gtnhintergalactic.gui.IG_UITextures; import com.gtnewhorizons.gtnhintergalactic.tile.TileEntitySpaceElevatorCable; @@ -124,10 +124,6 @@ public class TileEntitySpaceElevator extends TTMultiblockBase implements ISurviv /** Depth offset of the extended structure piece */ private static final int STRUCTURE_PIECE_EXTENDED_DEPTH_OFFSET = 20; - /** Lore tooltip of the machine. Randomly picked from a selection */ - @LoreHolder("gt.blockmachines.multimachine.ig.elevator.lore") - private static String loreTooltip; - // spotless:off /** Structure definition of this machine */ private static final IStructureDefinition STRUCTURE_DEFINITION = @@ -672,7 +668,7 @@ protected SoundResource getActivitySoundLoop() { protected MultiblockTooltipBuilder createTooltip() { final MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder(); tt.addMachineType(GCCoreUtil.translate("gt.blockmachines.multimachine.ig.elevator.name")); - if (loreTooltip != null) tt.addInfo(ITALIC + loreTooltip); + if (TooltipUtil.elevatorLoreText != null) tt.addInfo(ITALIC + TooltipUtil.elevatorLoreText); tt.addInfo(GCCoreUtil.translate("gt.blockmachines.multimachine.ig.elevator.desc2")) .addInfo(GCCoreUtil.translate("gt.blockmachines.multimachine.ig.elevator.desc3")) .addInfo(GCCoreUtil.translate("gt.blockmachines.multimachine.ig.elevator.desc4"))