Skip to content

Commit

Permalink
Merge branch 'master' into new-ae2-content-recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
serenibyss authored Jan 19, 2025
2 parents 5c2f0d4 + 069d4a7 commit 6d36879
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,38 +262,38 @@ public void run() {
bits,
new Object[] { "DPD", "PMP", "DGD", 'M', ItemList.Automation_ChestBuffer_LV, 'G',
OrePrefixes.plate.get(Materials.PulsatingIron), 'D', OrePrefixes.circuit.get(Materials.LV), 'P',
OrePrefixes.plateDense.get(Materials.Iron) });
OrePrefixes.plateTriple.get(Materials.Iron) });
GTModHandler.addCraftingRecipe(
ItemList.Super_Chest_MV.get(1L),
bits,
new Object[] { "DPD", "PMP", "DGD", 'M', ItemList.Automation_ChestBuffer_MV, 'G',
OrePrefixes.plate.get(Materials.VibrantAlloy), 'D', OrePrefixes.circuit.get(Materials.MV), 'P',
OrePrefixes.plateDense.get(Materials.Steel) });
OrePrefixes.plateTriple.get(Materials.Steel) });
GTModHandler.addCraftingRecipe(
ItemList.Super_Chest_HV.get(1L),
bits,
new Object[] { "DPD", "PMP", "DGD", 'M', ItemList.Automation_ChestBuffer_HV, 'G',
ItemList.Field_Generator_LV, 'D', OrePrefixes.circuit.get(Materials.HV), 'P',
OrePrefixes.plateQuintuple.get(Materials.Aluminium) });
OrePrefixes.plateTriple.get(Materials.Aluminium) });
GTModHandler.addCraftingRecipe(
ItemList.Super_Chest_EV.get(1L),
bits,
new Object[] { "DPD", "PMP", "DGD", 'M', ItemList.Automation_ChestBuffer_EV, 'G',
ItemList.Field_Generator_MV, 'D', OrePrefixes.circuit.get(Materials.EV), 'P',
OrePrefixes.plateQuintuple.get(Materials.StainlessSteel) });
OrePrefixes.plateTriple.get(Materials.StainlessSteel) });
GTModHandler.addCraftingRecipe(
ItemList.Super_Chest_IV.get(1L),
bits,
new Object[] { "DPD", "PMP", "DGD", 'M', ItemList.Automation_ChestBuffer_IV, 'G',
ItemList.Field_Generator_HV, 'D', OrePrefixes.circuit.get(Materials.IV), 'P',
OrePrefixes.plateQuadruple.get(Materials.Titanium) });
OrePrefixes.plateTriple.get(Materials.Titanium) });

GTModHandler.addCraftingRecipe(
ItemList.Quantum_Chest_LV.get(1L),
bits,
new Object[] { "DPD", "PMP", "DGD", 'M', ItemList.Automation_ChestBuffer_LuV, 'G',
ItemList.Field_Generator_EV, 'D', OrePrefixes.circuit.get(Materials.LuV), 'P',
OrePrefixes.plateQuadruple.get(Materials.TungstenSteel) });
OrePrefixes.plateTriple.get(Materials.TungstenSteel) });
GTModHandler.addCraftingRecipe(
ItemList.Quantum_Chest_MV.get(1L),
bits,
Expand All @@ -311,13 +311,13 @@ public void run() {
bits,
new Object[] { "DPD", "PMP", "DGD", 'M', ItemList.Automation_ChestBuffer_UHV, 'G',
ItemList.Field_Generator_ZPM, 'D', OrePrefixes.circuit.get(Materials.UHV), 'P',
OrePrefixes.plateDouble.get(Materials.Europium) });
OrePrefixes.plateTriple.get(Materials.Europium) });
GTModHandler.addCraftingRecipe(
ItemList.Quantum_Chest_IV.get(1L),
bits,
new Object[] { "DPD", "PMP", "DGD", 'M', ItemList.Automation_ChestBuffer_UEV, 'G',
ItemList.Field_Generator_UV, 'D', OrePrefixes.circuit.get(Materials.UEV), 'P',
OrePrefixes.plate.get(Materials.Americium) });
OrePrefixes.plateTriple.get(Materials.Americium) });

// Hermetic casings
GTModHandler.addCraftingRecipe(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2013,7 +2013,7 @@ public void run() {
GTValues.RA.stdBuilder()
.itemInputs(
GTOreDictUnificator.get(OrePrefixes.circuit.get(Materials.IV), 4),
GTOreDictUnificator.get(OrePrefixes.plateQuadruple, Materials.Titanium, 3),
GTOreDictUnificator.get(OrePrefixes.plateTriple, Materials.Titanium, 3),
ItemList.Field_Generator_HV.get(1),
ItemList.Automation_ChestBuffer_IV.get(1))
.itemOutputs(ItemList.Super_Chest_IV.get(1L)).duration(5 * SECONDS).eut(TierEU.RECIPE_HV)
Expand Down Expand Up @@ -2053,7 +2053,7 @@ public void run() {
GTValues.RA.stdBuilder()
.itemInputs(
GTOreDictUnificator.get(OrePrefixes.circuit.get(Materials.UEV), 4),
Materials.Americium.getPlates(3),
GTOreDictUnificator.get(OrePrefixes.plateTriple.get(Materials.Americium), 3),
ItemList.Field_Generator_UV.get(1),
ItemList.Automation_ChestBuffer_UEV.get(1L))
.itemOutputs(ItemList.Quantum_Chest_IV.get(1)).duration(5 * SECONDS).eut(TierEU.RECIPE_HV)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,36 +10,35 @@
import net.minecraft.util.StatCollector;

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

import com.dreammaster.client.util.IconLoader;
import com.dreammaster.coremod.DreamCoreMod;
import com.dreammaster.lib.Refstrings;
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;

@Mixin(Minecraft.class)
public class MixinMinecraft_ConfirmExit {
public abstract class MixinMinecraft_ConfirmExit {

@Unique
private boolean dreamcraft$isCloseRequested;

@Unique
private boolean dreamcraft$waitingDialogQuit;

@ModifyExpressionValue(
method = "runGameLoop",
at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/Display;isCloseRequested()Z", remap = false))
private boolean dreamcraft$confirmGameShutdown(boolean isCloseRequested) {
if (!DreamCoreMod.showConfirmExitWindow) {
return isCloseRequested;
}
if (this.dreamcraft$isCloseRequested) {
return true;
@Shadow
public abstract void shutdown();

@Inject(method = "shutdown", at = @At(value = "HEAD"), cancellable = true)
private void dreamcraft$confirmGameShutdown(CallbackInfo ci) {
if (!DreamCoreMod.showConfirmExitWindow || this.dreamcraft$isCloseRequested) {
return;
}
if (dreamcraft$waitingDialogQuit) return false;
if (isCloseRequested) {
dreamcraft$waitingDialogQuit = true;
if (!this.dreamcraft$waitingDialogQuit) {
this.dreamcraft$waitingDialogQuit = true;
new Thread(() -> {
final JFrame frame = new JFrame();
frame.setAlwaysOnTop(true);
Expand All @@ -60,12 +59,11 @@ public class MixinMinecraft_ConfirmExit {
imageIcon);
if (result == JOptionPane.YES_OPTION) {
this.dreamcraft$isCloseRequested = true;
this.shutdown();
}
dreamcraft$waitingDialogQuit = false;
this.dreamcraft$waitingDialogQuit = false;
}).start();
return false;
}
return false;
ci.cancel();
}

}

0 comments on commit 6d36879

Please sign in to comment.