-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e83cf8f
commit 8aeb8bf
Showing
6 changed files
with
128 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/main/java/argent_matter/gtec/common/data/GTECCompassSections.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
34
src/main/java/argent_matter/gtec/common/data/GTECElements.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
33
src/main/java/argent_matter/gtec/common/data/GTECMachines.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 38 additions & 1 deletion
39
src/main/java/argent_matter/gtec/common/data/GTECRecipeTypes.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |