Skip to content

Commit

Permalink
Merge branch 'master' into ra2-space-miner
Browse files Browse the repository at this point in the history
  • Loading branch information
Dream-Master authored Dec 5, 2024
2 parents 6afe385 + 8c152c2 commit b52153f
Show file tree
Hide file tree
Showing 17 changed files with 116 additions and 322 deletions.
9 changes: 5 additions & 4 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
dependencies {
api('com.github.GTNewHorizons:GT5-Unofficial:5.09.50.68:dev')
api('com.github.GTNewHorizons:Galaxy-Space-GTNH:1.1.96-GTNH:dev')
api('com.github.GTNewHorizons:GTNHLib:0.5.20:dev')
compileOnly("com.github.GTNewHorizons:Hodgepodge:2.5.78:dev") {transitive = false}
api('com.github.GTNewHorizons:GT5-Unofficial:5.09.50.93:dev')
api('com.github.GTNewHorizons:Galaxy-Space-GTNH:1.1.97-GTNH:dev')
api('com.github.GTNewHorizons:GTNHLib:0.5.21:dev')
compileOnly('com.github.GTNewHorizons:BlockRenderer6343:1.2.15:dev') {transitive = false}
compileOnly("com.github.GTNewHorizons:Hodgepodge:2.5.82:dev") {transitive = false}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import com.gtnewhorizon.gtnhlib.config.ConfigException;
import com.gtnewhorizon.gtnhlib.config.ConfigurationManager;
import com.gtnewhorizons.gtnhintergalactic.block.IGBlocks;
import com.gtnewhorizons.gtnhintergalactic.config.IGConfig;
import com.gtnewhorizons.gtnhintergalactic.item.IGItems;
import com.gtnewhorizons.gtnhintergalactic.proxy.CommonProxy;

Expand All @@ -26,7 +29,7 @@
acceptedMinecraftVersions = "[1.7.10]",
dependencies = "required-after:GalacticraftCore@[3.0.36,);" + "required-after:GalacticraftMars;"
+ "required-after:gregtech;"
+ "required-after:gtnhlib@[0.3.3,);"
+ "required-after:gtnhlib@[0.5.21,);"
+ "required-after:tectech;"
+ "required-after:structurelib;"
+ "required-after:GalaxySpace;"
Expand All @@ -38,6 +41,14 @@
+ "after:IronChest;")
public class GTNHIntergalactic {

static {
try {
ConfigurationManager.registerConfig(IGConfig.class);
} catch (ConfigException e) {
throw new RuntimeException(e);
}
}

/** Logger used by this mod */
public static final Logger LOG = LogManager.getLogger(Tags.MODID);
/** Prefix for assets */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@

import java.util.function.Supplier;

import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.SimpleReloadableResourceManager;

import com.gtnewhorizons.gtnhintergalactic.client.lore.LoreHandler;
import com.gtnewhorizon.gtnhlib.client.tooltip.LoreHandler;
import com.gtnewhorizons.gtnhintergalactic.item.IGItems;
import com.gtnewhorizons.gtnhintergalactic.tile.multi.TileEntityPlanetaryGasSiphon;
import com.gtnewhorizons.gtnhintergalactic.tile.multi.elevator.TileEntitySpaceElevator;
Expand All @@ -23,8 +20,6 @@ public class TooltipUtil {
* Initialize the tooltip utilities
*/
public static void postInit() {
((SimpleReloadableResourceManager) Minecraft.getMinecraft().getResourceManager())
.registerReloadListener(new LoreHandler());
LoreHandler.registerLoreHolder(TileEntityPlanetaryGasSiphon.class);
LoreHandler.registerLoreHolder(TileEntitySpaceElevator.class);

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.gtnewhorizons.gtnhintergalactic.config;

import com.gtnewhorizon.gtnhlib.config.Config;

import gregtech.api.enums.Mods;

@Config(modid = Mods.Names.G_T_N_H_INTERGALACTIC, filename = "gtnhintergalactic")
public class IGConfig {

public static SpaceElevator spaceElevator = new SpaceElevator();

@Config.Comment("Space Elevator section")
public static class SpaceElevator {

@Config.Comment("If true, the Space Elevator will use it's fancy renderer, otherwise a simple block renderer")
@Config.DefaultBoolean(true)
public boolean isCableRenderingEnabled;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import net.minecraft.util.IIcon;

import com.gtnewhorizons.gtnhintergalactic.block.IGBlocks;
import com.gtnewhorizons.gtnhintergalactic.config.Config;
import com.gtnewhorizons.gtnhintergalactic.item.IGItems;
import com.gtnewhorizons.gtnhintergalactic.loader.MachineLoader;
import com.gtnewhorizons.gtnhintergalactic.loader.RecipeLoader;
Expand All @@ -30,9 +29,7 @@ public class CommonProxy {

// preInit "Run before anything else. Read your config, create blocks, items, etc, and register them with the
// GameRegistry." (Remove if not needed)
public void preInit(FMLPreInitializationEvent event) {
Config.synchronizeConfiguration(event.getSuggestedConfigurationFile());
}
public void preInit(FMLPreInitializationEvent event) {}

// load "Do your mod setup. Build whatever data structures you care about. Register recipes." (Remove if not needed)
public void init(FMLInitializationEvent event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import com.gtnewhorizon.gtnhlib.client.renderer.shader.ShaderProgram;
import com.gtnewhorizons.gtnhintergalactic.GTNHIntergalactic;
import com.gtnewhorizons.gtnhintergalactic.block.BlockSpaceElevatorCable;
import com.gtnewhorizons.gtnhintergalactic.config.Config;
import com.gtnewhorizons.gtnhintergalactic.config.IGConfig;
import com.gtnewhorizons.gtnhintergalactic.tile.TileEntitySpaceElevatorCable;

import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
Expand Down Expand Up @@ -108,7 +108,7 @@ public RenderSpaceElevatorCable() {
*/
@Override
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float timeSinceLastTick) {
if (!Config.isCableRenderingEnabled) return;
if (!IGConfig.spaceElevator.isCableRenderingEnabled) return;
if (!(tile instanceof TileEntitySpaceElevatorCable)) return;

final TileEntitySpaceElevatorCable cableTile = (TileEntitySpaceElevatorCable) tile;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;

import com.gtnewhorizons.gtnhintergalactic.config.Config;
import com.gtnewhorizons.gtnhintergalactic.config.IGConfig;

import cpw.mods.fml.relauncher.Side;
import io.netty.buffer.ByteBuf;
Expand Down Expand Up @@ -159,7 +159,7 @@ public boolean shouldRender() {
*/
@Override
public void updateEntity() {
if (!Config.isCableRenderingEnabled) return;
if (!IGConfig.spaceElevator.isCableRenderingEnabled) return;
super.updateEntity();
// If the render state changed we need to issue a block renderer update to switch to the block renderer
if (worldObj != null && worldObj.isRemote) {
Expand Down
Loading

0 comments on commit b52153f

Please sign in to comment.