Skip to content

Commit

Permalink
Changed and added a lot of things
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveeTheEpic committed Jun 28, 2024
1 parent e83cf8f commit 8aeb8bf
Show file tree
Hide file tree
Showing 6 changed files with 128 additions and 8 deletions.
11 changes: 4 additions & 7 deletions src/main/java/argent_matter/gtec/GTExtendedChem.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ public static void init() {
ConfigHolder.init(); // Forcefully init GT config because fabric doesn't allow dependents to load after dependencies

//.init();
GTECRecipeTypes.init();
GTECItems.init();
GTECCreativeModeTabs.init();
GTECMachines.init();
GTECDatagen.init();
GTECCompassSections.init();
GTECRegistries.REGISTRATE.registerRegistrate();
}

Expand All @@ -56,20 +56,17 @@ public void registerMaterialRegistry(MaterialRegistryEvent event) {
public void registerMaterials(MaterialEvent event) {
GTECMaterials.init();
}
public void registerElements(MaterialEvent event) {GTECElements.init();}

@SubscribeEvent
public void modifyMaterials(PostMaterialEvent event) {
GTECMaterials.modifyMaterials();
}

@SubscribeEvent
public void registerRecipeTypes(GTCEuAPI.RegisterEvent<ResourceLocation, GTRecipeType> event) {
GTECRecipeTypes.init();
}
public void registerRecipeTypes(GTCEuAPI.RegisterEvent<ResourceLocation, GTRecipeType> event) {GTECRecipeTypes.init();}

@SubscribeEvent
public void registerMachines(GTCEuAPI.RegisterEvent<ResourceLocation, MachineDefinition> event) {
GTECMachines.init();
}
public void registerMachines(GTCEuAPI.RegisterEvent<ResourceLocation, MachineDefinition> event) {GTECMachines.init();}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package argent_matter.gtec.common.data;

import com.gregtechceu.gtceu.api.registry.GTRegistries;

public class GTECCompassSections {

static {
GTRegistries.COMPASS_SECTIONS.unfreeze();
}

public static void init() {}

}
34 changes: 34 additions & 0 deletions src/main/java/argent_matter/gtec/common/data/GTECElements.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package argent_matter.gtec.common.data;

import com.gregtechceu.gtceu.GTCEu;
import com.gregtechceu.gtceu.api.GTCEuAPI;
import com.gregtechceu.gtceu.api.data.chemical.Element;
import com.gregtechceu.gtceu.api.registry.GTRegistries;
import com.gregtechceu.gtceu.integration.kjs.GTRegistryInfo;
import net.minecraftforge.fml.ModLoader;

public class GTECElements {

static {
GTRegistries.ELEMENTS.unfreeze();
}

public static final Element Lu = createAndRegister(-5, 0, -1, null, "Lu", "Lud", false);
public static final Element Retardium = createAndRegister(69420, 140000, 1, "Trinium", "Retardium", "Rt", false);


public static Element createAndRegister(long protons, long neutrons, long halfLifeSeconds, String decayTo,
String name, String symbol, boolean isIsotope) {
Element element = new Element(protons, neutrons, halfLifeSeconds, decayTo, name, symbol, isIsotope);
GTRegistries.ELEMENTS.register(name, element);
return element;
}

public static void init() {
ModLoader.get().postEvent(new GTCEuAPI.RegisterEvent<>(GTRegistries.ELEMENTS, Element.class));
if (GTCEu.isKubeJSLoaded()) {
GTRegistryInfo.registerFor(GTRegistries.ELEMENTS.getRegistryName());
}
GTRegistries.ELEMENTS.freeze();
}
}
33 changes: 33 additions & 0 deletions src/main/java/argent_matter/gtec/common/data/GTECMachines.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,42 @@
package argent_matter.gtec.common.data;



import com.gregtechceu.gtceu.api.data.RotationState;
import com.gregtechceu.gtceu.api.data.chemical.ChemicalHelper;
import com.gregtechceu.gtceu.api.data.tag.TagPrefix;
import com.gregtechceu.gtceu.api.machine.multiblock.WorkableElectricMultiblockMachine;
import com.gregtechceu.gtceu.api.pattern.FactoryBlockPattern;
import com.gregtechceu.gtceu.api.registry.registrate.MultiblockMachineBuilder;
import com.gregtechceu.gtceu.common.data.GTBlocks;
import com.gregtechceu.gtceu.common.data.GTMaterials;


import static argent_matter.gtec.registry.GTECRegistries.REGISTRATE;
import static com.gregtechceu.gtceu.api.pattern.Predicates.*;

@SuppressWarnings({"Convert2MethodRef", "FunctionalExpressionCanBeFolded", "unused"})
public class GTECMachines {


public static final MultiblockMachineBuilder BACTERIA_BATH = REGISTRATE.multiblock("bacteria_bath", WorkableElectricMultiblockMachine::new)
.rotationState(RotationState.NON_Y_AXIS)
.appearanceBlock(GTBlocks.CASING_STAINLESS_CLEAN)
.recipeType(GTECRecipeTypes.BACTERIA_RECIPES)
.pattern(definition -> FactoryBlockPattern.start()
.aisle("GGGGG", "F F", "F F", "F F", "GGGGG")
.aisle("GGGGG", " SSS ", " SSS ", " SSS ", "GGGGG")
.aisle("GGGGG", " S S ", " S S ", " S S ", "GGMGG")
.aisle("GGGGG", " SSS ", " SSS ", " SSS ", "GGGGG")
.aisle("GGCGG", "F F", "F F", "F F", "GGGGG")
.where('G', blocks(GTBlocks.CASING_STAINLESS_CLEAN.get()).setMinGlobalLimited(40)
.or(autoAbilities(definition.getRecipeTypes()))
.or(autoAbilities(false, true, false)))
.where("C", controller(blocks(definition.getBlock())))
.where('S', blocks(GTBlocks.CASING_TEMPERED_GLASS.get()))
.where('F', blocks(ChemicalHelper.getBlock(TagPrefix.frameGt, GTMaterials.Naquadah)))
.build());

public static void init() {

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,12 @@ public static void modifyMaterials() {
.buildAndRegister()
.setFormula("Nd2O3", true);

public static final Material Lu = new Material.Builder(GTExtendedChem.id("lu"))
.dust()
.color(0xffffff)
.buildAndRegister()
.setFormula("Lud", true);

}

// The New Platinum Line Stuff
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,46 @@
package argent_matter.gtec.common.data;

public class GTECRecipeTypes {
import argent_matter.gtec.GTExtendedChem;
import com.gregtechceu.gtceu.GTCEu;
import com.gregtechceu.gtceu.api.GTCEuAPI;
import com.gregtechceu.gtceu.api.gui.GuiTextures;
import com.gregtechceu.gtceu.api.recipe.GTRecipeSerializer;
import com.gregtechceu.gtceu.api.recipe.GTRecipeType;
import com.gregtechceu.gtceu.api.registry.GTRegistries;
import com.gregtechceu.gtceu.integration.kjs.GTRegistryInfo;
import com.lowdragmc.lowdraglib.gui.texture.ProgressTexture;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.world.item.crafting.RecipeType;
import net.minecraftforge.fml.ModLoader;

import static com.gregtechceu.gtceu.common.data.GTRecipeTypes.CHEMICAL_RECIPES;
import static com.gregtechceu.gtceu.common.data.GTRecipeTypes.MULTIBLOCK;

public class GTECRecipeTypes {
/*
static {
GTRegistries.RECIPE_TYPES.unfreeze();
}
*/

public static final GTRecipeType BACTERIA_RECIPES = register("bacteria_bath", MULTIBLOCK)
.setMaxIOSize(1, 1, 1, 1)
.setProgressBar(GuiTextures.PROGRESS_BAR_ARROW_MULTIPLE, ProgressTexture.FillDirection.LEFT_TO_RIGHT)
.setSound(CHEMICAL_RECIPES.getSound());
public static void init() {
ModLoader.get().postEvent(new GTCEuAPI.RegisterEvent<>(GTRegistries.RECIPE_TYPES, GTRecipeType.class));
if (GTCEu.isKubeJSLoaded()) {
GTRegistryInfo.registerFor(GTRegistries.RECIPE_TYPES.getRegistryName());
}
GTRegistries.RECIPE_TYPES.freeze();

}

public static GTRecipeType register(String name, String group, RecipeType<?>... proxyRecipes) {
var recipeType = new GTRecipeType(GTExtendedChem.id(name), group, proxyRecipes);
GTRegistries.register(BuiltInRegistries.RECIPE_TYPE, recipeType.registryName, recipeType);
GTRegistries.register(BuiltInRegistries.RECIPE_SERIALIZER, recipeType.registryName, new GTRecipeSerializer());
GTRegistries.RECIPE_TYPES.register(recipeType.registryName, recipeType);
return recipeType;
}
}

0 comments on commit 8aeb8bf

Please sign in to comment.