Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions buildscript.properties
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ debug_deda = false
debug_avaritia = false
debug_gtfo = false
debug_jer = false
debug_bqu = false

# Select a username for testing your mod with breakpoints. You may leave this empty for a random username each time you
# restart Minecraft in development. Choose this dependent on your mod:
Expand Down
6 changes: 6 additions & 0 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ dependencies {
runtimeOnly rfg.deobf("curse.maven:draconicadditions-314515:3514704")
}

// Debug BQu: 4.2.7
compileOnly rfg.deobf("curse.maven:better-questing-unofficial-629629:7421294")
if (project.debug_all.toBoolean() || project.debug_deda.toBoolean()) {
Comment thread
tier940 marked this conversation as resolved.
Outdated
runtimeOnly rfg.deobf("curse.maven:better-questing-unofficial-629629:7421294")
}

// Debug Avaritia: 3.3.0.47-hotfix1
if (project.debug_all.toBoolean() || project.debug_avaritia.toBoolean()) {
runtimeOnly rfg.deobf("curse.maven:avaritia-1-1x-unofficial-1165010:7186329")
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/github/gtexpert/core/api/util/Mods.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public enum Mods {
Avaritia(Names.AVARITIA),
Avaritiaaddons(Names.AVARITIAADDONS),
Baubles(Names.BAUBLES),
BetterQuesting(Names.BETTER_QUESTING),
Chisel(Names.CHISEL),
CTM(Names.CONNECTED_TEXTURES_MOD),
CraftTweaker(Names.CRAFT_TWEAKER),
Expand Down Expand Up @@ -100,6 +101,7 @@ public static class Names {
public static final String AVARITIA = "avaritia";
public static final String AVARITIAADDONS = "avaritiaddons";
public static final String BAUBLES = "baubles";
public static final String BETTER_QUESTING = "betterquesting";
public static final String BOTANY = "botany";
public static final String CHISEL = "chisel";
public static final String CONNECTED_TEXTURES_MOD = "ctm";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ public class AEConfigHolder {
@Config.RangeInt(min = 2, max = 10)
public static int voltageTier = 3;

@Config.Comment({ "Change AE swords, axes, etc. to GT recipe standards.",
"CEu's hardToolArmorRecipes to true to reflect.", "Default: false" })
public static boolean hardToolRecipes = false;

@Config.Comment({ "Integrate Printed Silicon and various Circuit creation molds.", "Default: false" })
public static boolean moveSteelShape = false;
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
import gregtech.common.ConfigHolder;

import com.github.gtexpert.core.api.util.Mods;
import com.github.gtexpert.core.integration.ae.AEConfigHolder;

public class AEToolsRecipe {

public static void init() {
if (ConfigHolder.recipes.hardToolArmorRecipes && AEConfigHolder.hardToolRecipes) {
if (ConfigHolder.recipes.hardToolArmorRecipes) {
// Nether Quartz Axe
ModHandler.removeRecipeByName(
Mods.AppliedEnergistics2.getResource("tools/nether_quartz_axe"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ public class EnderIOConfigHolder {
@Config.RangeInt(min = 1, max = 8)
public static int voltageTier = 3;

@Config.Comment({ "Change EIO swords, axes, armor, etc. to GT recipe standards.",
"CEu's hardToolArmorRecipes to true to reflect.", "Default: false" })
public static boolean hardToolArmorRecipes = false;

@Config.Comment({ "Add Shapeless Recipe in CoreMod Machines and EIO Machines.",
"This change adds a recipe for equivalent exchange of HV machines and EIO machines", "Default: false" })
public static boolean addShapelessRecipeMachines = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@
import gregtech.common.ConfigHolder;

import com.github.gtexpert.core.api.unification.material.GTEMaterials;
import com.github.gtexpert.core.integration.eio.EnderIOConfigHolder;

import crazypants.enderio.base.init.ModObject;
import crazypants.enderio.endergy.init.EndergyObject;

public class EIOToolsRecipe {

public static void init() {
if (ConfigHolder.recipes.hardToolArmorRecipes && EnderIOConfigHolder.hardToolArmorRecipes) {
if (ConfigHolder.recipes.hardToolArmorRecipes) {
// Dark Helm
ModHandler.addShapedRecipe(true, "dark_steel_helmet",
new ItemStack(ModObject.itemDarkSteelHelmet.getItemNN(), 1),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,4 @@
category = "Thaumcraft")
public class TCConfigHolder {

@Config.Comment({ "Change Thaumcraft recipes to GT recipe standards.",
"CEu's hardToolArmorRecipes to true to reflect.", "Default: false" })
public static boolean hardToolRecipes = false;
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@

import com.github.gtexpert.core.api.unification.material.GTEMaterials;
import com.github.gtexpert.core.api.util.Mods;
import com.github.gtexpert.core.integration.tc.TCConfigHolder;

public class TCToolsRecipe {

public static void init() {
if (ConfigHolder.recipes.hardToolArmorRecipes && TCConfigHolder.hardToolRecipes) {
if (ConfigHolder.recipes.hardToolArmorRecipes) {
// Dark Helm
ModHandler.removeRecipeByName(Mods.Thaumcraft.getResource("thaumiumhelm"));
ModHandler.addShapedRecipe(true, "thaumium_helm",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
public class GTEMixinLoader implements ILateMixinLoader {

public static final Map<String, Boolean> modMixinsConfig = new ImmutableMap.Builder<String, Boolean>()
.put(Mods.Names.BETTER_QUESTING, true)
.put(Mods.Names.DRACONIC_EVOLUTION, true)
.put(Mods.Names.DRACONIC_ADDITIONS, true)
.put(Mods.Names.GREGTECH, true)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
package com.github.gtexpert.core.mixins.betterquesting;

import java.io.File;

import net.minecraft.client.Minecraft;
import net.minecraftforge.fml.common.FMLCommonHandler;

import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

import betterquesting.api.storage.BQ_Settings;
import betterquesting.api2.client.gui.controls.IPanelButton;
import betterquesting.api2.client.gui.events.PanelEvent;
import betterquesting.api2.client.gui.events.types.PEventButton;
import betterquesting.client.gui2.GuiHome;
import betterquesting.commands.admin.QuestCommandDefaults;
import betterquesting.handlers.SaveLoadHandler;

/**
* Fixes the "Update Available!" button on the BetterQuesting home screen.
* The original handler only checks for the legacy single-file format (DefaultQuests.json),
* silently ignoring the directory format (DefaultQuests/) used by newer modpacks.
* This mixin adds support for the directory format by delegating to
* {@link QuestCommandDefaults#load}, matching the behavior of {@code /bq_admin default load}.
*/
@Mixin(value = GuiHome.class, remap = false)
public class GuiHomeUpdateMixin {

@Inject(method = "onButtonPress", at = @At("HEAD"), cancellable = true)
private void gtexpert$fixUpdateButton(PanelEvent event, CallbackInfo ci) {
if (!(event instanceof PEventButton)) return;

IPanelButton btn = ((PEventButton) event).getButton();
if (btn.getButtonID() != 5) return;

File dataDir = new File(BQ_Settings.defaultDir, QuestCommandDefaults.DEFAULT_FILE);
File legacyFile = new File(BQ_Settings.defaultDir, QuestCommandDefaults.DEFAULT_FILE + ".json");

if (dataDir.exists()) {
FMLCommonHandler.instance().getMinecraftServerInstance().addScheduledTask(() -> {
QuestCommandDefaults.load(null, null, dataDir, false);
SaveLoadHandler.INSTANCE.resetUpdate();
});
Minecraft.getMinecraft().displayGuiScreen(null);
} else if (legacyFile.exists()) {
FMLCommonHandler.instance().getMinecraftServerInstance().addScheduledTask(() -> {
QuestCommandDefaults.loadLegacy(null, null, legacyFile, false);
SaveLoadHandler.INSTANCE.resetUpdate();
});
Minecraft.getMinecraft().displayGuiScreen(null);
}

ci.cancel();
}
}
14 changes: 14 additions & 0 deletions src/main/resources/mixins.gtexpert.betterquesting.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"package": "com.github.gtexpert.core.mixins.betterquesting",
"refmap": "mixins.gtexpert.refmap.json",
"target": "@env(DEFAULT)",
"minVersion": "0.8",
"compatibilityLevel": "JAVA_8",
"mixins": [
],
"server": [
],
"client": [
"GuiHomeUpdateMixin"
]
}
Loading