Skip to content

Commit

Permalink
Refractor but still broken
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveeTheEpic committed Jun 28, 2024
1 parent 8aeb8bf commit 4686ea6
Showing 28 changed files with 225 additions and 124 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package argent_matter.gtec;
package stevee.gtec;

import argent_matter.gtec.common.data.*;
import argent_matter.gtec.registry.GTECCreativeModeTabs;
import argent_matter.gtec.registry.GTECRegistries;
import argent_matter.gtec.data.GTECDatagen;
import stevee.gtec.common.data.*;
import stevee.gtec.registry.GTECCreativeModeTabs;
import stevee.gtec.registry.GTECRegistries;
import stevee.gtec.data.GTECDatagen;
import com.gregtechceu.gtceu.api.GTCEuAPI;
import com.gregtechceu.gtceu.api.data.chemical.material.event.MaterialEvent;
import com.gregtechceu.gtceu.api.data.chemical.material.event.MaterialRegistryEvent;
@@ -12,6 +12,7 @@
import com.gregtechceu.gtceu.api.machine.MachineDefinition;
import com.gregtechceu.gtceu.api.machine.multiblock.CleanroomType;
import com.gregtechceu.gtceu.api.recipe.GTRecipeType;
import com.gregtechceu.gtceu.api.registry.registrate.CompassNode;
import com.gregtechceu.gtceu.config.ConfigHolder;
import net.minecraft.resources.ResourceLocation;
import net.minecraftforge.eventbus.api.SubscribeEvent;
@@ -35,11 +36,11 @@ public static void init() {
ConfigHolder.init(); // Forcefully init GT config because fabric doesn't allow dependents to load after dependencies

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

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

@SubscribeEvent
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();
}

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

Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
package argent_matter.gtec;
package stevee.gtec;

import argent_matter.gtec.common.data.GTECRecipes;
import argent_matter.gtec.registry.GTECRegistries;
import stevee.gtec.common.data.GTECRecipes;
import stevee.gtec.registry.GTECRegistries;
import com.gregtechceu.gtceu.api.addon.GTAddon;
import com.gregtechceu.gtceu.api.addon.IGTAddon;
import com.gregtechceu.gtceu.api.addon.events.MaterialCasingCollectionEvent;

import com.gregtechceu.gtceu.api.registry.registrate.GTRegistrate;
import com.gregtechceu.gtceu.common.data.GTBlocks;
import net.minecraft.data.recipes.FinishedRecipe;

import java.util.function.Consumer;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package argent_matter.gtec.block;
package stevee.gtec.block;

/*
import argent_matter.gtec.GTExtendedChem;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package argent_matter.gtec.block;
package stevee.gtec.block;

/*
import argent_matter.gtec.GTExtendedChem;
121 changes: 121 additions & 0 deletions src/main/java/stevee/gtec/common/data/GTECCompassSections.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
package stevee.gtec.common.data;

import com.gregtechceu.gtceu.api.GTValues;
import com.gregtechceu.gtceu.api.data.tag.TagPrefix;
import com.gregtechceu.gtceu.api.gui.GuiTextures;
import com.gregtechceu.gtceu.api.item.tool.GTToolType;
import com.gregtechceu.gtceu.api.registry.GTRegistries;
import com.gregtechceu.gtceu.api.registry.registrate.CompassSection;

import com.gregtechceu.gtceu.common.data.GTBlocks;
import com.gregtechceu.gtceu.common.data.GTItems;
import com.gregtechceu.gtceu.common.data.GTMachines;
import com.gregtechceu.gtceu.common.data.GTMaterials;
import com.lowdragmc.lowdraglib.gui.texture.ItemStackTexture;

import java.util.Locale;

/**
* @author KilaBash
* @date 2023/7/31
* @implNote GTCompassSections
*/
public class GTECCompassSections {

static {
GTRegistries.COMPASS_SECTIONS.unfreeze();
}

private static int priority = 0;

public final static CompassSection INTRODUCTION = CompassSection.create("introduction")
.icon(() -> GuiTextures.GREGTECH_LOGO)
.priority(priority++)
.register();

public final static CompassSection GENERATIONS = CompassSection.create("generation")
.icon(() -> new ItemStackTexture(GTBlocks.MATERIAL_BLOCKS.get(TagPrefix.ore, GTMaterials.Silver).asStack()))
.priority(priority++)
.register();

public final static CompassSection COVERS = CompassSection.create("covers")
.icon(() -> new ItemStackTexture(GTItems.ITEM_FILTER.asStack()))
.priority(priority++)
.register();

public final static CompassSection TOOLS = CompassSection.create("tools")
.icon(() -> new ItemStackTexture(GTItems.TOOL_ITEMS.get(GTMaterials.Iron, GTToolType.WRENCH).asStack()))
.priority(priority++)
.register();

public final static CompassSection MATERIALS = CompassSection.create("materials")
.icon(() -> new ItemStackTexture(GTItems.MATERIAL_ITEMS.get(TagPrefix.gear, GTMaterials.Steel).asStack()))
.priority(priority++)
.register();

public final static CompassSection ITEMS = CompassSection.create("items")
.icon(() -> new ItemStackTexture(GTItems.SHAPE_MOLD_INGOT.asStack()))
.priority(priority++)
.register();

public final static CompassSection MISC = CompassSection.create("misc")
.icon(() -> new ItemStackTexture(GTItems.COIN_GOLD_ANCIENT.asStack()))
.priority(priority++)
.register();

public final static CompassSection CIRCUITS = CompassSection.create("circuits")
.icon(() -> new ItemStackTexture(GTItems.ELECTRONIC_CIRCUIT_LV.asStack()))
.priority(priority++)
.register();

public final static CompassSection COMPONENTS = CompassSection.create("components")
.icon(() -> new ItemStackTexture(GTItems.ELECTRIC_MOTOR_LV.asStack()))
.priority(priority++)
.register();

public final static CompassSection BATTERIES = CompassSection.create("batteries")
.icon(() -> new ItemStackTexture(GTItems.BATTERY_HV_SODIUM.asStack()))
.priority(priority++)
.register();

public final static CompassSection BLOCKS = CompassSection.create("blocks")
.icon(() -> new ItemStackTexture(GTBlocks.COIL_CUPRONICKEL.asStack()))
.priority(priority++)
.register();

public final static CompassSection MACHINES = CompassSection.create("machines")
.icon(() -> new ItemStackTexture(GTMachines.CHEMICAL_REACTOR[GTValues.LV].asStack()))
.priority(priority++)
.register();

public final static CompassSection PARTS = CompassSection.create("parts")
.icon(() -> new ItemStackTexture(GTMachines.MAINTENANCE_HATCH.asStack()))
.priority(priority++)
.register();

public final static CompassSection MULTIBLOCK = CompassSection.create("multiblock")
.icon(() -> new ItemStackTexture(GTMachines.ELECTRIC_BLAST_FURNACE.asStack()))
.priority(priority++)
.register();
public final static CompassSection STEAM = CompassSection.create("steam")
.icon(() -> new ItemStackTexture(GTMachines.STEAM_SOLID_BOILER.left().asStack()))
.lang("Steam Age")
.priority(priority++)
.register();

public final static CompassSection[] TIER = new CompassSection[10];

static {
for (int i = 0; i < 10; i++) {
int finalI = i;
TIER[i] = CompassSection.create(GTValues.VN[i].toLowerCase(Locale.ROOT))
.icon(() -> new ItemStackTexture(GTMachines.HULL[finalI].asStack()))
.background(() -> GuiTextures.DISPLAY)
.lang(GTValues.VNF[i] + " Voltage")
.priority(priority++)
.register();
}
}

public static void init() {}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package argent_matter.gtec.common.data;
package stevee.gtec.common.data;

import com.gregtechceu.gtceu.GTCEu;
import com.gregtechceu.gtceu.api.GTCEuAPI;
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package argent_matter.gtec.common.data;
package stevee.gtec.common.data;

import argent_matter.gtec.registry.GTECCreativeModeTabs;
import stevee.gtec.registry.GTECCreativeModeTabs;
import com.tterrag.registrate.util.entry.ItemEntry;
import static argent_matter.gtec.registry.GTECRegistries.REGISTRATE;
import static stevee.gtec.registry.GTECRegistries.REGISTRATE;
import net.minecraft.world.item.Item;


Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
package argent_matter.gtec.common.data;
package stevee.gtec.common.data;



import com.gregtechceu.gtceu.GTCEu;
import com.gregtechceu.gtceu.api.GTCEuAPI;
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.MachineDefinition;
import com.gregtechceu.gtceu.api.machine.MultiblockMachineDefinition;
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.api.registry.GTRegistries;
import com.gregtechceu.gtceu.common.data.GTBlocks;
import com.gregtechceu.gtceu.common.data.GTMaterials;
import com.gregtechceu.gtceu.integration.kjs.GTRegistryInfo;
import net.minecraftforge.fml.ModLoader;


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

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

static {
GTRegistries.MACHINES.unfreeze();
}

public static final MultiblockMachineBuilder BACTERIA_BATH = REGISTRATE.multiblock("bacteria_bath", WorkableElectricMultiblockMachine::new)
public static final MultiblockMachineDefinition BACTERIA_BATH = REGISTRATE.multiblock("bacteria_bath", WorkableElectricMultiblockMachine::new)
.rotationState(RotationState.NON_Y_AXIS)
.appearanceBlock(GTBlocks.CASING_STAINLESS_CLEAN)
.recipeType(GTECRecipeTypes.BACTERIA_RECIPES)
@@ -31,13 +40,23 @@ public class GTECMachines {
.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)))
.or(autoAbilities(true, 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());
.where(' ', any())
.build())
.workableCasingRenderer(GTCEu.id("block/casings/solid/machine_casing_solid_steel"),
GTCEu.id("block/multiblock/implosion_compressor"))
.register();

public static void init() {


public static void init() {
if (GTCEu.isKubeJSLoaded()) {
GTRegistryInfo.registerFor(GTRegistries.MACHINES.getRegistryName());
}
ModLoader.get().postEvent(new GTCEuAPI.RegisterEvent<>(GTRegistries.MACHINES, MachineDefinition.class));
GTRegistries.MACHINES.freeze();
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package argent_matter.gtec.common.data;
package stevee.gtec.common.data;

import argent_matter.gtec.GTExtendedChem;
import stevee.gtec.GTExtendedChem;
import com.gregtechceu.gtceu.api.data.chemical.material.Material;
import com.gregtechceu.gtceu.api.data.chemical.material.info.MaterialIconSet;
import com.gregtechceu.gtceu.api.data.chemical.material.Material;
import com.gregtechceu.gtceu.api.data.chemical.material.properties.*;
import com.gregtechceu.gtceu.api.fluids.FluidBuilder;
import com.gregtechceu.gtceu.api.fluids.store.FluidStorageKeys;
@@ -678,12 +677,6 @@ 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
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
package argent_matter.gtec.common.data;
package stevee.gtec.common.data;

import argent_matter.gtec.GTExtendedChem;
import stevee.gtec.GTExtendedChem;
import com.gregtechceu.gtceu.GTCEu;
import com.gregtechceu.gtceu.api.GTCEuAPI;
import com.gregtechceu.gtceu.api.capability.recipe.IO;
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.common.data.GTSoundEntries;
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)
.setEUIO(IO.IN)
.setProgressBar(GuiTextures.PROGRESS_BAR_ARROW_MULTIPLE, ProgressTexture.FillDirection.LEFT_TO_RIGHT)
.setSound(CHEMICAL_RECIPES.getSound());
.setSound(GTSoundEntries.CHEMICAL);
public static void init() {
ModLoader.get().postEvent(new GTCEuAPI.RegisterEvent<>(GTRegistries.RECIPE_TYPES, GTRecipeType.class));
if (GTCEu.isKubeJSLoaded()) {
Loading

0 comments on commit 4686ea6

Please sign in to comment.