Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mega fusion reactors + Material overhaul with Nomi Labs compat + Minor recipe refactor #35

Merged
merged 36 commits into from
Sep 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
2f068cf
Should probably work (my dev env is borked!??)
Zorbatron Sep 18, 2024
d985e52
e
Zorbatron Sep 18, 2024
9575f12
What was I cooking!?
Zorbatron Sep 21, 2024
e5e6196
Extra fusion tiers
Zorbatron Sep 21, 2024
b6a25bb
Mk1-3 mega fusions
Zorbatron Sep 21, 2024
3c41b37
Yippe it saves the stored power across world reloads!!!
Zorbatron Sep 21, 2024
2f3e087
Why did I do that?
Zorbatron Sep 21, 2024
35761c5
Fix the Mk3 not overclocking properly
Zorbatron Sep 21, 2024
3e501f5
Oops didn't need that
Zorbatron Sep 21, 2024
a4adfab
Material overhaul pt1
Zorbatron Sep 22, 2024
d92b44c
Material overhaul pt2
Zorbatron Sep 22, 2024
1bd1520
Material overhaul pt3 (btw the ore veins won't work LOL)
Zorbatron Sep 22, 2024
f1194bb
Base GT already has zeron 100 :skull:
Zorbatron Sep 22, 2024
bc5cca2
More funny materials
Zorbatron Sep 22, 2024
3c60671
:thumbsup:
Zorbatron Sep 23, 2024
8ea3d77
Yay worldgen!!!! :desolate:
Zorbatron Sep 23, 2024
f108263
No molten!!!!
Zorbatron Sep 23, 2024
25d474b
I'm a genius
Zorbatron Sep 23, 2024
157b62a
Remove commented out code
Zorbatron Sep 23, 2024
f4a9b65
lang
Zorbatron Sep 23, 2024
accc9c2
(arch commit time)
Zorbatron Sep 24, 2024
af014ee
Another arch commit, I don't even remember what I did :desolate:
Zorbatron Sep 24, 2024
357470b
Switching branches
Zorbatron Sep 24, 2024
def76ff
Nomi is HIGH so I can let it use NORMAL
Zorbatron Sep 24, 2024
170dcf3
Copy Nomi Labs material definitions
Zorbatron Sep 24, 2024
3e00bbf
Add some recipes
Zorbatron Sep 24, 2024
539c2be
Spotless
Zorbatron Sep 24, 2024
66723c7
Uhhh more stuff
Zorbatron Sep 24, 2024
7234289
Match gtnh a little more
Zorbatron Sep 24, 2024
0af7b2d
Special plates and finalize the T3 mega fusion recipe
Zorbatron Sep 24, 2024
ca1ef8d
Hikarium
Zorbatron Sep 24, 2024
9be0e66
Simplify dependencies
Zorbatron Sep 24, 2024
bf26c45
Conflict with NC liquid nitrogen
Zorbatron Sep 24, 2024
5be646a
Dense plates only stack to 7
Zorbatron Sep 24, 2024
4f0d410
Finish that
Zorbatron Sep 24, 2024
c68cde2
Merge branch 'main' into mega-fusion
Zorbatron Sep 29, 2024
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
5 changes: 2 additions & 3 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,10 @@ dependencies {
api("codechicken:codechickenlib:3.2.3.358")
api("appeng:ae2-uel:v0.56.4") { transitive = false }
api("gregicality:GregicalityMultiblocks:1.2.11")
compileOnly rfg.deobf("curse.maven:ulv-covers-635555:4912949")
implementation rfg.deobf("curse.maven:ulv-covers-635555:4912949")
compileOnly rfg.deobf("curse.maven:nomi-labs-932060:5677263")

//For easier testing
runtimeOnlyNonPublishable("curse.maven:nae2-884359:5380800")
runtimeOnlyNonPublishable("curse.maven:spark-361579:3542217")

runtimeOnlyNonPublishable rfg.deobf("curse.maven:ulv-covers-635555:4912949")
}
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ useSrcApiPath = false
accessTransformersFile =

# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
usesMixins = false
usesMixins = true
# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
mixinsPackage =
mixinsPackage = mixin
# Automatically generates a mixin config json if enabled, with the name mixins.modid.json
generateMixinConfig = true
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
Expand Down
22 changes: 22 additions & 0 deletions src/main/java/com/zorbatron/zbgt/ZBGTConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,26 @@ public static class RecipeSettings {
@Config.Name("Parallel Hatch Recipes")
public boolean enableParallelHatchRecipes = true;
}

@Config.Name("World Generation Settings")
@Config.RequiresMcRestart
public static WorldGenerationSettings worldGenerationSettings = new WorldGenerationSettings();

public static class WorldGenerationSettings {

@Config.Comment({ "Enable ore vein generation",
"Default: true" })
@Config.Name("Enable ore vein generation")
public boolean enableOreGeneration = true;
}

public static CompatibilitySettings compatibilitySettings = new CompatibilitySettings();

public static class CompatibilitySettings {

@Config.Comment({ "Force disable Nomi Labs compatibility",
"Default: false" })
@Config.Name("Force disable Nomifactory compat")
public boolean disableNomiLabsCompatibility = false;
}
}
8 changes: 8 additions & 0 deletions src/main/java/com/zorbatron/zbgt/ZBGTCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
import static com.zorbatron.zbgt.api.ZBGTAPI.*;
import static com.zorbatron.zbgt.common.block.ZBGTMetaBlocks.*;

import java.io.IOException;

import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

import com.zorbatron.zbgt.api.util.ZBGTLog;
Expand Down Expand Up @@ -76,4 +79,9 @@ public void preInit(FMLPreInitializationEvent event) {

proxy.preInit();
}

@EventHandler
public void postInit(FMLPostInitializationEvent event) throws IOException {
proxy.postInit();
}
}
52 changes: 52 additions & 0 deletions src/main/java/com/zorbatron/zbgt/ZBGTMixinPlugin.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package com.zorbatron.zbgt;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import net.minecraftforge.common.ForgeVersion;
import net.minecraftforge.fml.common.Optional;
import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin;

import org.jetbrains.annotations.Nullable;

import zone.rong.mixinbooter.ILateMixinLoader;

@IFMLLoadingPlugin.MCVersion(ForgeVersion.mcVersion)
@IFMLLoadingPlugin.Name("MGTCEuA-Core")
@Optional.Interface(iface = "zone.rong.mixinbooter.ILateMixinLoader", modid = "mixinbooter")
public class ZBGTMixinPlugin implements IFMLLoadingPlugin, ILateMixinLoader {

@Override
public String[] getASMTransformerClass() {
return new String[0];
}

@Override
public String getModContainerClass() {
return null;
}

@Nullable
@Override
public String getSetupClass() {
return null;
}

@Override
public void injectData(Map<String, Object> data) {}

@Override
public String getAccessTransformerClass() {
return null;
}

@Override
@Optional.Method(modid = "mixinbooter")
public List<String> getMixinConfigs() {
System.out.println("getMixinConfigs ZBGT");
ArrayList<String> mixins = new ArrayList<>();
mixins.add("mixins.zbgt.json");
return mixins;
}
}
5 changes: 5 additions & 0 deletions src/main/java/com/zorbatron/zbgt/api/ZBGTAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import net.minecraft.block.state.IBlockState;

import com.zorbatron.zbgt.ZBGTConfig;
import com.zorbatron.zbgt.api.util.ZBGTMods;
import com.zorbatron.zbgt.common.block.blocks.CoALCasing;
import com.zorbatron.zbgt.common.block.blocks.PreciseCasing;
import com.zorbatron.zbgt.common.block.blocks.YOTTankCell;
Expand All @@ -19,4 +21,7 @@ public class ZBGTAPI {
public static final Object2ObjectMap<IBlockState, BlockMachineCasing.MachineCasingType> MACHINE_CASINGS = new Object2ObjectOpenHashMap<>();

public static final Object2ObjectMap<IBlockState, YOTTankCell.CasingType> YOTTANK_CELLS = new Object2ObjectOpenHashMap<>();

public static final boolean nomiLabsCompat = ZBGTMods.NOMI_LABS.isModLoaded() &&
!ZBGTConfig.compatibilitySettings.disableNomiLabsCompatibility;
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.zorbatron.zbgt.api.metatileentity;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import net.minecraft.client.resources.I18n;
Expand Down Expand Up @@ -60,7 +59,7 @@ protected void initializeAbilities() {
list.addAll(getAbilities(MultiblockAbility.SUBSTATION_INPUT_ENERGY));
}

this.energyContainer = new EnergyContainerList(Collections.unmodifiableList(list));
this.energyContainer = new EnergyContainerList(list);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.zorbatron.zbgt.api.metatileentity;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import net.minecraft.client.resources.I18n;
Expand Down Expand Up @@ -50,7 +49,7 @@ protected void initializeAbilities() {
list.addAll(getAbilities(MultiblockAbility.SUBSTATION_INPUT_ENERGY));
}

this.energyContainer = new EnergyContainerList(Collections.unmodifiableList(list));
this.energyContainer = new EnergyContainerList(list);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.zorbatron.zbgt.api.metatileentity;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import net.minecraft.client.resources.I18n;
Expand Down Expand Up @@ -51,7 +50,7 @@ protected void initializeAbilities() {
list.addAll(getAbilities(MultiblockAbility.SUBSTATION_INPUT_ENERGY));
}

this.energyContainer = new EnergyContainerList(Collections.unmodifiableList(list));
this.energyContainer = new EnergyContainerList(list);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public static void modifyMaps() {
List<RecipeIOMod> recipeModList = new ArrayList<>();
recipeModList.add(new RecipeIOMod(POLARIZER_RECIPES, 0, 0, 1, 1));
recipeModList.add(new RecipeIOMod(COMPRESSOR_RECIPES, 0, 0, 1, 1));
// recipeModList.add(new RecipeIOMod(MIXER_RECIPES, 9, 0, 0, 0));

recipeModList.forEach(recipeIOMod -> {
recipeIOMod.recipeMap().setMaxInputs(recipeIOMod.minItemInputs());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ public PreciseAssemblerRecipeBuilder copy() {
@Override
public boolean applyProperty(@NotNull String key, Object value) {
if (key.equals(PreciseAssemblerProperty.KEY)) {
this.CasingTier(((Number) value).intValue());
this.casingTier(((Number) value).intValue());
return true;
}

return super.applyProperty(key, value);
}

public PreciseAssemblerRecipeBuilder CasingTier(int tier) {
public PreciseAssemblerRecipeBuilder casingTier(int tier) {
if (tier < 0) {
ZBGTLog.logger.error("Precise casing tier cannot be less than 0 (Imprecise)!",
new IllegalArgumentException());
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/com/zorbatron/zbgt/api/unification/ZBGTElements.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.zorbatron.zbgt.api.unification;

import static gregtech.api.unification.Elements.add;

import gregtech.api.unification.Element;

public class ZBGTElements {

public static final Element Ad = add(351, 509, -1, null, "Adamantium", "Ad", false);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
package com.zorbatron.zbgt.api.unification.material;

import com.zorbatron.zbgt.api.unification.material.materials.*;

import gregtech.api.unification.material.Material;

public final class ZBGTMaterials {

// Elements
public static Material Adamantium;
public static Material LiquidNitrogen;

// First degree materials
public static Material Indalloy140;
public static Material MAR_M200;
public static Material TanmolyiumBetaC;
public static Material AdamantiumAlloy;
public static Material Artherium_Sn;
public static Material PreciousMetalsAlloy;
public static Material Alumina;
public static Material AluminumNitride;
public static Material YttriumOxide;
public static Material Luminessence;

// Second degree materials
public static Material MAR_CE_M200;
public static Material HDCS;
public static Material Dalisenite;

// Third degree materials
public static Material Hikarium;

// Nomifactory materials
public static Material Ardite;
public static Material Manyullyn;
public static Material Signalum;
public static Material Lumium;
public static Material Enderium;
public static Material FluxedElectrum;

public static Material EnergeticAlloy;
public static Material VibrantAlloy;

// Unknown Composition Materials
public static Material SpecialCeramics;

public static void init() {
ZBGTElementMaterials.register();
ZBGTFirstDegreeMaterials.register();
ZBGTSecondDegreeMaterials.register();
ZBGTThirdDegreeMaterials.register();
ZBGTUnknownCompositionMaterials.register();

ZBGTMaterialExtraProperties.register();
ZBGTMaterialExtraFlags.register();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package com.zorbatron.zbgt.api.unification.material.materials;

import static com.zorbatron.zbgt.api.unification.ZBGTElements.Ad;
import static com.zorbatron.zbgt.api.unification.material.ZBGTMaterials.*;
import static com.zorbatron.zbgt.api.util.ZBGTUtility.zbgtId;

import gregtech.api.fluids.FluidBuilder;
import gregtech.api.unification.Elements;
import gregtech.api.unification.material.Material;
import gregtech.api.unification.material.info.MaterialIconSet;

public final class ZBGTElementMaterials {

private static int id = 0;

public static void register() {
Adamantium = new Material.Builder(id++, zbgtId("adamantium"))
.dust(7).iconSet(MaterialIconSet.SHINY)
.ore(true)
.element(Ad)
.build();

LiquidNitrogen = new Material.Builder(id++, zbgtId("zb_liquid_nitrogen"))
.liquid(new FluidBuilder().temperature(77))
.color(0xE1FAFA)
.element(Elements.N)
.build();
}
}
Loading