Skip to content

Commit

Permalink
1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ROMVoid95 committed Oct 15, 2020
1 parent dbec4c9 commit ec9e7bf
Show file tree
Hide file tree
Showing 29 changed files with 483 additions and 480 deletions.
14 changes: 11 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@

[Added]

- command /leaverace to leave GC SpaceRace team
(Team owners cannot use command)
- Ability to unlock Rocket Schematics via Configs

- Feature to fix planet/star Icon sizes when using AsmodeusCore celestial map
- Dimensional-Comets Spawn Rate can be modified per dimension via Configs

- Custom Spawn Dimension can be set via Configs

- New Version checking system


[Changed]

- Overworld-Comets merged into Dimensional-Comets
20 changes: 14 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ jacocoTestReport {
}

repositories {
jcenter()
maven {
// Location of CurseAPI Files
url "https://jitpack.io"
}
mavenCentral()
maven {
name 'MJRLegends'
url = "https://maven.mjrlegends.com/"
Expand All @@ -87,22 +91,26 @@ repositories {
maven {
url = "https://www.cursemaven.com"
}
maven {
// Location of CurseAPI Files
url "https://jitpack.io"
}

}

dependencies {

compile("com.github.TheRandomLabs:CurseAPI:master-SNAPSHOT"){
exclude group: 'com.google.guava', module: 'guava'
}

compile "org.apache.logging.log4j:log4j-core:2.13.3"
compile "org.apache.logging.log4j:log4j-slf4j18-impl:2.13.3"

compile "org.projectlombok:lombok:1.18.12"
apt "org.projectlombok:lombok:1.18.12"

compile "industrial-craft:industrialcraft-2-2.8.99:ex112:api"

// LOAD GC ADDONS
compile "com.mjr.planetprogression:PlanetProgression:1.12.2-0.4.5:api"
compile "curse.maven:AsmodeusCore-Dev:3039768"
compile "curse.maven:AsmodeusCore-Dev:3063158"
compile "curse.maven:GSMod-0.0.14:3015062"
compile "curse.maven:ExtraPlanets-1.7.0:3031689"
runtime "curse.maven:MJRLib-1.2.0:3029769"
Expand Down
27 changes: 12 additions & 15 deletions src/main/java/net/romvoid95/gctweaks/GalacticTweaks.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,16 @@
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.Mod.Instance;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLFingerprintViolationEvent;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
import net.minecraftforge.fml.common.event.*;
import net.minecraftforge.fml.common.network.NetworkCheckHandler;
import net.minecraftforge.fml.common.network.NetworkRegistry;
import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper;
import net.minecraftforge.fml.relauncher.Side;

import net.romvoid95.gctweaks.base.InternalModule;
import net.romvoid95.gctweaks.base.Module;
import net.romvoid95.gctweaks.base.core.proxy.CommonProxy;
import net.romvoid95.gctweaks.base.core.utils.GameUtil;
import net.romvoid95.gctweaks.base.core.utils.I18nHelper;
import net.romvoid95.gctweaks.base.core.utils.LogHelper;
import net.romvoid95.gctweaks.base.core.utils.*;
//import net.romvoid95.gctweaks.base.version.CommandDownloadUpdate;
import net.romvoid95.gctweaks.internal.command.DownloadCommand;
import net.romvoid95.gctweaks.internal.config.ConfigCore;
Expand All @@ -31,10 +26,11 @@
public class GalacticTweaks {

@Instance(Ref.MOD_ID)
public static GalacticTweaks instance;
public static SimpleNetworkWrapper network = NetworkRegistry.INSTANCE.newSimpleChannel(Ref.MOD_ID);
public static LogHelper logger = new LogHelper();
public static I18nHelper stringz = new I18nHelper(Ref.MOD_ID, logger, false);
public static GalacticTweaks instance;
public static SimpleNetworkWrapper network = NetworkRegistry.INSTANCE.newSimpleChannel(Ref.MOD_ID);
public static LogHelper logger = new LogHelper();
public static I18nHelper stringz = new I18nHelper(Ref.MOD_ID, logger, false);
public static File modFolder = null;

@NetworkCheckHandler
public boolean networkCheck(Map<String, String> map, Side side) {
Expand All @@ -57,9 +53,10 @@ public void onFingerprintViolation(FMLFingerprintViolationEvent event) {

@EventHandler
public void preInit(FMLPreInitializationEvent event) {
GalacticTweaks.modFolder = event.getModConfigurationDirectory();

MinecraftForge.EVENT_BUS.register(this);
MinecraftForge.EVENT_BUS
.register(new ConfigCore(new File(event.getModConfigurationDirectory(), "GalacticTweaks/core.cfg")));
MinecraftForge.EVENT_BUS.register(new ConfigCore(new File(modFolder, "GalacticTweaks/core.cfg")));

// ==========================================
// Internal Modules
Expand Down Expand Up @@ -140,7 +137,7 @@ public void onServerStarting(FMLServerStartingEvent event) {
// ~ Phase ~ //
ModuleController.modules.forEach(module -> module.serverStartingEvent(event));

if(ConfigCore.enableCheckVersion)
if (ConfigCore.enableCheckVersion)
event.registerServerCommand(new DownloadCommand());
}
}
2 changes: 1 addition & 1 deletion src/main/java/net/romvoid95/gctweaks/ModuleController.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
public class ModuleController {

public static List<Module> modules = new ArrayList<>();

public static List<InternalModule> internals = new ArrayList<>();


public static void registerModules() {
modules.add(new GalacticraftModule("Galacticraft Module"));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package net.romvoid95.gctweaks.base.core.proxy;

import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.event.*;

import net.romvoid95.gctweaks.ModuleController;
import net.romvoid95.gctweaks.base.Module;
import net.romvoid95.gctweaks.internal.config.ConfigCore;
//import net.romvoid95.gctweaks.base.version.VersionChecker;
import net.romvoid95.gctweaks.internal.versioning.VersionChecker;

Expand All @@ -19,7 +19,9 @@ public void preInit(FMLPreInitializationEvent event) {
@Override
public void init(FMLInitializationEvent event) {
ModuleController.modules.forEach(Module::proxyInit);
VersionChecker.init();
if (ConfigCore.enableCheckVersion) {
VersionChecker.init();
}
super.init(event);
}

Expand Down
18 changes: 12 additions & 6 deletions src/main/java/net/romvoid95/gctweaks/base/core/utils/GameUtil.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package net.romvoid95.gctweaks.base.core.utils;

import java.io.IOException;

import net.minecraft.client.Minecraft;
import net.minecraft.launchwrapper.Launch;

import net.minecraftforge.fml.client.FMLClientHandler;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.LoaderState;
import net.minecraftforge.fml.common.*;

public final class GameUtil {
private GameUtil() {
Expand Down Expand Up @@ -36,7 +37,12 @@ public static boolean isServer() {
* @return True if and only if we are running in a deobfuscated environment
*/
public static boolean isDeobfuscated() {
return (Boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment");
try {
return Launch.classLoader.getClassBytes("net.minecraft.world.World") != null;
} catch (IOException e) {
e.printStackTrace();
}
return false;
}

public static Minecraft getMinecraft() {
Expand All @@ -56,7 +62,7 @@ public static boolean shouldCalculateTooltip() {
LoaderState state = Loader.instance().getLoaderState();
// These states have no reason to go through tooltips that I can tell, but they
// do.
return state != LoaderState.INITIALIZATION && state != LoaderState.SERVER_ABOUT_TO_START
&& state != LoaderState.SERVER_STOPPING;
return (state != LoaderState.INITIALIZATION) && (state != LoaderState.SERVER_ABOUT_TO_START)
&& (state != LoaderState.SERVER_STOPPING);
}
}
15 changes: 7 additions & 8 deletions src/main/java/net/romvoid95/gctweaks/gc/GalacticraftModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import net.romvoid95.gctweaks.base.Module;
import net.romvoid95.gctweaks.gc.features.*;
import net.romvoid95.gctweaks.gc.features.DimensionalComets;
import net.romvoid95.gctweaks.gc.features.galaxyfeature.SeperateAddonPlanets;
import net.romvoid95.gctweaks.gc.features.generation.DisableDungeonGeneration;
import net.romvoid95.gctweaks.gc.features.oxygenfeature.SpawnWithOxygenEquip;
import net.romvoid95.gctweaks.gc.features.sprfeature.SpaceRaceFeature;
import net.romvoid95.gctweaks.gc.features.galaxy.SeperateAddonPlanets;
import net.romvoid95.gctweaks.gc.features.oxygen.SpawnWithOxygenEquip;
import net.romvoid95.gctweaks.gc.features.schematic.UnlockSchematics;
import net.romvoid95.gctweaks.gc.features.spawndim.SpawnDimension;
import net.romvoid95.gctweaks.gc.features.spawnitems.SpaceRaceFeature;

public class GalacticraftModule extends Module {

Expand All @@ -25,8 +25,7 @@ public void addFeatures() {
registerFeature(new FixAsmodeusMapIcons());
registerFeature(new DimensionalComets());
registerFeature(new UnlockSchematics());

//registerFeature(new OverworldComets()); No longer needed. Replaced with DimensionalComets.java
//registerFeature(new DisableDungeonGeneration()); I couldn't figure this our right now. Later
registerFeature(new SpawnDimension());

}
}
Loading

0 comments on commit ec9e7bf

Please sign in to comment.