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

Chorus update #75

Merged
merged 10 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
26 changes: 25 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//version: 1720106721
//version: 1720840170
/*
* DO NOT CHANGE THIS FILE!
* Also, you may replace this file at any time if there is an update available.
Expand Down Expand Up @@ -1237,6 +1237,30 @@ if (cfApiKey.isPresent() || deploymentDebug.toBoolean()) {
additionalFile.changelog = changelogRaw
}
}
doLast {
// No File IDs in Debug Mode
if (!deploymentDebug.toBoolean()) {
def list = []
for (def artifact : tasks.curseforge.getUploadArtifacts()) {
list.add(artifact)
for (def additionalArtifact : artifact.getAdditionalArtifacts()) {
list.add(additionalArtifact)
}
}
def summary = "## CurseForge Build Summary (Mod ${modName} | Project ID ${curseForgeProjectId})"
for (def artifact : list) {
def fileId = artifact.getCurseFileId()
def fileName = artifact.getArtifact().getSingleFile().name
println("Uploaded File ${fileName}, With File ID: ${fileId}")
summary = summary + "\n - File: ${fileName} | File ID: ${fileId}"
}
println(summary)
def stepSummary = providers.environmentVariable("GITHUB_STEP_SUMMARY")
if (stepSummary.isPresent()) {
file(stepSummary.get()).write(summary)
}
}
}
}
tasks.curseforge.dependsOn(build)
tasks.curseforge.dependsOn('generateChangelog')
Expand Down
4 changes: 2 additions & 2 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ dependencies {

implementation rfg.deobf("curse.maven:mixin-booter-419286:4828995")
compileOnly "CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-4.1.20.554"
implementation rfg.deobf("curse.maven:gregtech-ce-unofficial-557242:5121638")
implementation rfg.deobf("curse.maven:gregtech-ce-unofficial-557242:5519022")
implementation rfg.deobf("curse.maven:groovyscript-687577:4991701")

implementation "team.chisel.ctm:CTM:MC${project.minecraft.version}-1.0.2.31"
//provided files("libs/gregicality-1.12.2-0.23.1.jar")
implementation "codechicken:ChickenASM:1.12-1.0.2.9"
implementation rfg.deobf("curse.maven:codechicken-lib-1-8-${ccl_pid}:${ccl_fid}")
implementation rfg.deobf("curse.maven:groovyscript-687577:4905039")
implementation rfg.deobf("curse.maven:groovyscript-687577:5507936")

//deobfCompile "nuclearcraft-overhauled:NuclearCraft:2o.6.0:1.12.2"
implementation "de.ellpeck.actuallyadditions:ActuallyAdditions:${project.minecraft.version}-r144"
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ modId = gregtechfoodoption

modGroup = gregtechfoodoption

modVersion = 1.11.2.1
modVersion = 1.11.3

# The name of your jar when you produce builds, not including any versioning info
modArchivesBaseName = gregtechfoodoption
Expand Down
22 changes: 15 additions & 7 deletions src/main/java/gregtechfoodoption/CommonProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
import crazypants.enderio.base.farming.farmers.CustomSeedFarmer;
import gregtech.api.block.VariantItemBlock;
import gregtech.api.recipes.RecipeMaps;
import gregtech.api.unification.OreDictUnifier;
import gregtech.api.unification.material.Materials;
import gregtech.api.unification.ore.OrePrefix;
import gregtechfoodoption.block.GTFOBerryBush;
import gregtechfoodoption.block.GTFOCrop;
import gregtechfoodoption.block.GTFOMetaBlocks;
Expand All @@ -15,10 +18,7 @@
import gregtechfoodoption.item.GTFOMetaItems;
import gregtechfoodoption.item.GTFOSpecialVariantItemBlock;
import gregtechfoodoption.machines.multiblock.MetaTileEntityGreenhouse;
import gregtechfoodoption.potion.AntiSchizoPotion;
import gregtechfoodoption.potion.CyanidePoisoningPotion;
import gregtechfoodoption.potion.GTFOPotions;
import gregtechfoodoption.potion.LacingEntry;
import gregtechfoodoption.potion.*;
import gregtechfoodoption.recipe.GTFOOreDictRegistration;
import gregtechfoodoption.recipe.GTFORecipeAddition;
import gregtechfoodoption.recipe.GTFORecipeHandler;
Expand All @@ -37,6 +37,8 @@
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Optional;
import net.minecraftforge.fml.common.event.FMLInterModComms;
import net.minecraftforge.fml.common.event.FMLLoadCompleteEvent;
import net.minecraftforge.fml.common.eventhandler.EventPriority;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.registries.IForgeRegistry;
Expand Down Expand Up @@ -75,10 +77,17 @@ public void onPostLoad() {
LacingEntry.LACING_REGISTRY.register(1, "antischizo", new LacingEntry(GTFOMaterialHandler.LithiumCarbonate.getItemStack(),
new PotionEffect(AntiSchizoPotion.INSTANCE, 1000, 0),
"14hez98zk7/2/3/5/9/10/"));
LacingEntry.LACING_REGISTRY.register(2, "lungcancer", new LacingEntry(OreDictUnifier.get(OrePrefix.dust, Materials.Asbestos),
new PotionEffect(LungCancerPotion.INSTANCE, 99999999, 0),
"17aaqe0i1q/1/2/3/7/10/"));


if (Loader.isModLoaded(GTFOValues.MODID_NUGT) && GTFOConfig.gtfoOtherFoodModConfig.enableGTFONutrition) {
GTFONutritionCompatibility.init();
}

GTFOLog.logger.info("Removing recipes during post init (thanks Ender IO!)");
GTFORecipeRemoval.init();
}

@SubscribeEvent
Expand Down Expand Up @@ -153,11 +162,11 @@ private static <T extends Block> ItemBlock createItemBlock(T block, Function<T,
@SubscribeEvent(priority = EventPriority.LOWEST)
public static void registerRecipesLowest(RegistryEvent.Register<IRecipe> event) {
GTFOLog.logger.info("Registering recipe very low...");
GTFORecipeRemoval.init();

GTFORecipeAddition.compatInit();
}

@SubscribeEvent
@SubscribeEvent
@Optional.Method(modid = "enderio")
public static void registerEIOFarmerJoes(@Nonnull RegistryEvent.Register<IFarmerJoe> event) {
for (GTFOCrop crop : CROP_BLOCKS) {
Expand All @@ -176,7 +185,6 @@ public static void registerEIOFarmerJoes(@Nonnull RegistryEvent.Register<IFarmer
.setRegistryName(crop.getRegistryName()));
}
}

// These recipes are generated at the beginning of the init() phase with the proper config set.
// This is not great practice, but ensures that they are run AFTER CraftTweaker,
// meaning they will follow the recipes in the map with CraftTweaker changes,
Expand Down
29 changes: 29 additions & 0 deletions src/main/java/gregtechfoodoption/GTFOMaterialHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,33 @@ public class GTFOMaterialHandler {
.color(0x2a7b5a)
.build();

public static final Material EnderPearlSolution = fluidBuilder(21621, "ender_pearl_solution")
.components(EnderPearl, 1, Water, 1)
.color(EnderPearl.getMaterialRGB())
.build();
public static final Material EnderSugarSolution = fluidBuilder(21622, "ender_sugar_solution")
.components(Beryllium, 1, Nitrogen, 2, Potassium, 1, Water, 1)
.color(averageRGB(2, EnderPearlSolution.getMaterialRGB(), Beryllium.getMaterialRGB()))
.build();
public static final Material ChorusJuice = fluidBuilder(21623, "chorus_juice")
.color(0xa670e0)
.build();
public static final Material FermentedChorusJuice = fluidBuilder(21624, "fermented_chorus_juice")
.color(0xb5e8e6)
.build();
public static final Material Antaf = fluidBuilder(21625, "antaf")
.color(0xd4b5e8)
.build();
public static final Material VibrantExtract = fluidBuilder(21626, "vibrant_extract")
.color(0x3dfff7)
.build();
public static final Material ApricotExtract = fluidBuilder(21627, "apricot_extract")
.color(0xe3de9d)
.build();
public static final Material GrapeExtract = fluidBuilder(21628, "grape_extract")
.color(0xa83351)
.build();


public static final Material SweetenedDilutedCaneSyrupMixture = fluidBuilder(21970, "sweetened_diluted_cane_syrup_mixture")
.color(0xdedcc8)
Expand Down Expand Up @@ -618,6 +645,8 @@ public static void onMaterialsInit() {

DistilledWater.setProperty(CLEANER, new CleanerProperty(2));
SodiumStearate.setProperty(CLEANER, new CleanerProperty(16));

ChorusJuice.setFormula("(C6H12O6)?", true);
}

public static Material.Builder fluidBuilder(int id, String name) {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/gregtechfoodoption/GTFOValues.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ public class GTFOValues {
MODID_AP = "applecore",
MODID_NU = "nutrition",
MODID_NUGT = "nutrition_gtceu",
MODID_SS = "sereneseasons";
MODID_SS = "sereneseasons",
MODID_EIO = "enderio";

public static final String craftingToolRollingPin = "craftingToolRollingPin";

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/gregtechfoodoption/GregTechFoodOption.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.*;
import net.minecraftforge.fml.common.eventhandler.EventPriority;
import net.minecraftforge.fml.common.registry.GameRegistry;

@Mod(modid = GregTechFoodOption.MODID, name = GregTechFoodOption.NAME, version = GregTechFoodOption.VERSION,
Expand Down Expand Up @@ -87,5 +88,4 @@ public void init(FMLInitializationEvent event) {
public void postInit(FMLPostInitializationEvent event) {
proxy.onPostLoad();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package gregtechfoodoption.integration.enderio;

import crazypants.enderio.base.init.ModObject;
import gregtech.api.recipes.ModHandler;
import gregtech.api.unification.material.Materials;
import gregtech.api.unification.ore.OrePrefix;
import gregtechfoodoption.GTFOMaterialHandler;
import gregtechfoodoption.recipe.GTFORecipeMaps;
import net.minecraft.init.Items;
import net.minecraft.util.ResourceLocation;

import static gregtech.api.unification.material.Materials.Wheat;

public class GTFOEIORecipeHandler {
public static void enderios() {
GTFORecipeMaps.CUISINE_ASSEMBLER_RECIPES.recipeBuilder().EUt(24).duration(100)
.fluidInputs(GTFOMaterialHandler.EnderSugarSolution.getFluid(100))
.fluidInputs(Materials.Milk.getFluid(500))
.input(Items.WHEAT_SEEDS, 2)
.output(ModObject.itemEnderFood.getItem())
.buildAndRegister();
}

public static void removeEnderios() {
ModHandler.removeRecipeByName(new ResourceLocation("enderio:enderios"));
}
}
68 changes: 67 additions & 1 deletion src/main/java/gregtechfoodoption/item/GTFOMetaItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,25 @@ public class GTFOMetaItem extends MetaItem<GTFOMetaItem.GTFOMetaValueItem> imple

public static MetaItem<?>.MetaValueItem KITCHEN_RECIPE;

public static MetaItem<?>.MetaValueItem SORBET_PLAIN;
public static MetaItem<?>.MetaValueItem SORBET_APPLE;
public static MetaItem<?>.MetaValueItem SORBET_APRICOT;
public static MetaItem<?>.MetaValueItem SORBET_CHORUS;
public static MetaItem<?>.MetaValueItem SORBET_GRAPE;
public static MetaItem<?>.MetaValueItem SORBET_LIME;
public static MetaItem<?>.MetaValueItem SORBET_VIBRANT;

public static MetaItem<?>.MetaValueItem ANTAF;

public static MetaItem<?>.MetaValueItem FERMENTED_CHORUS;
public static MetaItem<?>.MetaValueItem FERMENTED_CHORUS_PIE;

public static MetaItem<?>.MetaValueItem NAQUADAH_CHIPS;

public static MetaItem<?>.MetaValueItem CHORUS_CAPLET;
public static MetaItem<?>.MetaValueItem VIBRANT_CAPLET;
public static MetaItem<?>.MetaValueItem SANDWICH_VIBRANT;

public GTFOMetaItem() {
super((short) 0);
}
Expand Down Expand Up @@ -606,7 +625,7 @@ public void registerSubItems() {

PORCHETTA = addItem(310, "component.porchetta")
.addComponents(new GTFOFoodStats(7, 0.7f).setEatingDuration(50)
.nutrients(0, 0, 0, 0.5f, 0.1f));
.nutrients(0, 0, 0, 0.5f, 0.1f));

AGED_PARMIGIANO_ROLL = addItem(312, "component.aged_parmigiano_roll").blacklistKitchen();
BRINED_PARMIGIANO = addItem(313, "component.brined_parmigiano").blacklistKitchen();
Expand Down Expand Up @@ -1073,6 +1092,51 @@ public void registerSubItems() {
SEASONED_PELMENI = addItem(341, "food.pelmeni_seasoned").addComponents(new GTFOFoodStats(7, 1f).setEatingDuration(24)
.nutrients(0.5f, 0f, 1f, 1f, 1f));

ANTAF = addItem(344, "food.antaf").addComponents(new GTFOFoodStats(5, 0.5f, true, true, PLASTIC_BOTTLE.getStackForm())
.nutrients(0, 0.5f, 0f, 0f, 0f));

SORBET_PLAIN = addItem(345, "food.sorbet.plain").addComponents(new GTFOFoodStats(0, 0f, false, true)
.nutrients(0, 0f, 0f, 0f, 0f).setEatingDuration(12));
SORBET_APPLE = addItem(346, "food.sorbet.apple").addComponents(new GTFOFoodStats(0, 0f)
.nutrients(0, 1f, 0f, 0f, 0f).setEatingDuration(12));
SORBET_APRICOT = addItem(347, "food.sorbet.apricot").addComponents(new GTFOFoodStats(0, 0f)
.nutrients(0, 1f, 0f, 0f, 0f).setEatingDuration(12));
SORBET_CHORUS = addItem(348, "food.sorbet.chorus").addComponents(new GTFOFoodStats(0, 0f)
.nutrients(0, 0f, 0f, 0f, 1f).setEatingDuration(12)
.setPotionEffects(new RandomPotionEffect(EnhancedChorusPotion.INSTANCE, 600, 0, 100 - 80)));
SORBET_GRAPE = addItem(349, "food.sorbet.grape").addComponents(new GTFOFoodStats(0, 0f)
.nutrients(0, 1f, 0f, 0f, 0f).setEatingDuration(12));
SORBET_LIME = addItem(350, "food.sorbet.lime").addComponents(new GTFOFoodStats(0, 0f)
.nutrients(0, 1f, 0f, 0f, 0f).setEatingDuration(12));
SORBET_VIBRANT = addItem(351, "food.sorbet.vibrant").addComponents(new GTFOFoodStats(0, 0f)
.nutrients(0, 2f, 0f, 0f, 2f).setEatingDuration(12)
.setPotionEffects(new RandomPotionEffect(CreativityPotion.INSTANCE, 1200, 0, 100 - 80),
new RandomPotionEffect(MobEffects.POISON, 1200, 2, 100 - 100),
new RandomPotionEffect(MobEffects.NAUSEA, 1200, 1, 100 - 40)));

FERMENTED_CHORUS = addItem(352, "food.fermented_chorus").addComponents(new GTFOFoodStats(2, 0.5f, false, true)
.nutrients(0, 0f, 0f, 0f, 2f).setEatingDuration(60)
.setPotionEffects(new RandomPotionEffect(EnhancedChorusPotion.INSTANCE, 300, 0, 100 - 80)));
FERMENTED_CHORUS_PIE = addItem(353, "food.pie.fermented_chorus").addComponents(new GTFOFoodStats(6, 1f, false, true)
.nutrients(0, 0f, 2f, 0f, 2f)
.setPotionEffects(new RandomPotionEffect(EnhancedChorusPotion.INSTANCE, 1200, 0, 100 - 100)));

NAQUADAH_CHIPS = addItem(354, "food.naquadah_chips").addComponents(new GTFOFoodStats(GTFOConfig.gtfoFoodConfig.chipHunger, GTFOConfig.gtfoFoodConfig.chipSaturation, false, true, () -> OreDictUnifier.get(OrePrefix.foil, RhodiumPlatedPalladium))
.nutrients(0, 0f, 1f, 0f, 1f)
.setPotionEffects(new RandomPotionEffect(MobEffects.BLINDNESS, 500, 0, 100 - 100)));

CHORUS_CAPLET = addItem(355, "food.caplet.chorus").addComponents(new GTFOFoodStats(0, 1f, false, true, ItemStack.EMPTY)
.setPotionEffects(new RandomPotionEffect(EnhancedChorusPotion.INSTANCE, 300, 0, 100 - 100)));
VIBRANT_CAPLET = addItem(356, "food.caplet.vibrant").addComponents(new GTFOFoodStats(0, 1f, false, true, ItemStack.EMPTY)
.setPotionEffects(new RandomPotionEffect(CreativityPotion.INSTANCE, 600, 0, 100 - 60),
new RandomPotionEffect(MobEffects.POISON, 600, 2, 100 - 90)));

SANDWICH_VIBRANT = addItem(357, "food.sandwich.vibrant").addComponents(new GTFOFoodStats(7, 0.8f)
.setEatingDuration(40)
.nutrients(0f, 1f, 1f, 1f, 0f)
.setPotionEffects(new RandomPotionEffect(CreativityPotion.INSTANCE, 1200, 0, 100 - 80),
new RandomPotionEffect(MobEffects.POISON, 1200, 2, 100 - 100)));

UNKNOWN_SEED = addItem(158, "seed.unknown");
ONION_SEED = addItem(159, "seed.onion");
ONION_SEED.addComponents(new GTFOCropSeedBehaviour(GTFOCrops.CROP_ONION, ONION_SEED.getStackForm(), ONION.getStackForm()));
Expand Down Expand Up @@ -1214,9 +1278,11 @@ public boolean hasEffect(ItemStack stack) {
public class GTFOMetaValueItem extends MetaItem<?>.MetaValueItem {

private boolean kitchenBlacklisted;

protected GTFOMetaValueItem(int metaValue, String unlocalizedName) {
super(metaValue, unlocalizedName);
}

private boolean hasEnchantmentSheen;

public void setHasEnchantmentSheen(boolean hasEnchantmentSheen) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package gregtechfoodoption.mixins.late;

import gregtech.api.items.metaitem.MetaItem;
import gregtech.api.recipes.Recipe;
import gregtech.api.recipes.ingredients.GTRecipeItemInput;
import gregtech.api.recipes.machines.RecipeMapFluidCanner;
Expand Down Expand Up @@ -61,14 +62,16 @@ public void findLacingRecipe(List<ItemStack> inputs, List<FluidStack> fluidInput
inputStack.setCount(1);
continue;
}
if (input.getItem() instanceof GTFOOredictItem) { // Hoping there's only one
if (input.getItem() instanceof MetaItem<?>) { // Hoping there's only one
lacingWith = input.copy();
}
}
if (inputStack.isEmpty()) {
return;
}
FluidStack potentialFluid = fluidInputs.get(0);
FluidStack potentialFluid = null;
if (!fluidInputs.isEmpty())
potentialFluid = fluidInputs.get(0);
if (potentialFluid != null && potentialFluid.amount != 0) {
inputFluid = potentialFluid.copy();
if (inputFluid.amount < 100)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import net.minecraft.util.text.TextComponentTranslation;

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

public class CyanidePoisoningPotion extends GTFOPotion {
Expand Down Expand Up @@ -57,6 +58,6 @@ public boolean shouldRender(PotionEffect effect) {

@Override
public List<ItemStack> getCurativeItems() {
return new ArrayList<>(); // Nothing :)
return Collections.emptyList(); // Nothing :)
}
}
Loading
Loading