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

Stimulant update #79

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
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
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.3
modVersion = 1.11.4

# The name of your jar when you produce builds, not including any versioning info
modArchivesBaseName = gregtechfoodoption
Expand Down
7 changes: 6 additions & 1 deletion src/main/java/gregtechfoodoption/CommonProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
import java.util.Objects;
import java.util.function.Function;

import static gregtech.api.unification.ore.OrePrefix.dust;
import static gregtechfoodoption.GTFOMaterialHandler.RecrystalizedLurdmanine;
import static gregtechfoodoption.block.GTFOCrop.CROP_BLOCKS;

@Mod.EventBusSubscriber(modid = GregTechFoodOption.MODID)
Expand Down Expand Up @@ -77,9 +79,12 @@ 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),
LacingEntry.LACING_REGISTRY.register(2, "lungcancer", new LacingEntry(OreDictUnifier.get(dust, Materials.Asbestos),
new PotionEffect(LungCancerPotion.INSTANCE, 99999999, 0),
"17aaqe0i1q/1/2/3/7/10/"));
LacingEntry.LACING_REGISTRY.register(3, "asphyxiation", new LacingEntry(OreDictUnifier.get(dust, RecrystalizedLurdmanine),
new PotionEffect(asphyxiationpotion.INSTANCE, 100, 0),
"fsdfdss/1/"));


if (Loader.isModLoaded(GTFOValues.MODID_NUGT) && GTFOConfig.gtfoOtherFoodModConfig.enableGTFONutrition) {
Expand Down
278 changes: 275 additions & 3 deletions src/main/java/gregtechfoodoption/GTFOMaterialHandler.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public class GTFOClientHandler {
public static OrientedOverlayRenderer BAKING_OVEN_OVERLAY = new OrientedOverlayRenderer("machines/baking_oven");
public static OrientedOverlayRenderer CUISINE_ASSEMBLER_OVERLAY = new OrientedOverlayRenderer("machines/cuisine_assembler");
public static OrientedOverlayRenderer MICROWAVE_OVERLAY = new OrientedOverlayRenderer("machines/microwave");
public static OrientedOverlayRenderer FREEZEDRYER_OVERLAY = new OrientedOverlayRenderer("machines/freezedryer");
public static OrientedOverlayRenderer MULTICOOKER_OVERLAY = new OrientedOverlayRenderer("machines/multicooker");
public static final OrientedOverlayRenderer MOB_AGE_SORTER_OVERLAY = new OrientedOverlayRenderer("machines/mob_age_sorter");
public static final OrientedOverlayRenderer MOB_EXTERMINATOR_OVERLAY = new OrientedOverlayRenderer("machines/mob_exterminator");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ public class GTFOTileEntities {
public static GTFOSimpleMachineMetaTileEntity[] CUISINE_ASSEMBLER = new GTFOSimpleMachineMetaTileEntity[GTValues.V.length - 1];
public static MetaTileEntityMicrowave[] MICROWAVE = new MetaTileEntityMicrowave[GTValues.V.length - 1];
public static GTFOSimpleMachineMetaTileEntity[] MULTICOOKER = new GTFOSimpleMachineMetaTileEntity[GTValues.V.length - 1];
public static MetaTileEntityFreezedryer[] FREEZEDRYER = new MetaTileEntityFreezedryer[GTValues.V.length - 1];


public static final MetaTileEntityMobAgeSorter[] MOB_AGE_SORTER = new MetaTileEntityMobAgeSorter[4];
public static final MetaTileEntityMobExterminator[] MOB_EXTERMINATOR = new MetaTileEntityMobExterminator[4];
Expand Down Expand Up @@ -101,6 +103,13 @@ public static void init() {
registerGTFOSimpleMetaTileEntity(MULTICOOKER, 8566, "multicooker", GTFORecipeMaps.MULTICOOKER_RECIPES, GTFOClientHandler.MULTICOOKER_OVERLAY, true, GTFOTileEntities::location, GTUtility.hvCappedTankSizeFunction);

KITCHEN = registerMetaTileEntity(8581, new MetaTileEntityKitchen(location("kitchen")));

//Freeze Dryer, IDS 8582-8585
FREEZEDRYER[1] = registerMetaTileEntity(8582, new MetaTileEntityFreezedryer(location("freezedryer.lv"), GTFORecipeMaps.MICROWAVE_RECIPES, GTFOClientHandler.FREEZEDRYER_OVERLAY, 1));
FREEZEDRYER[2] = registerMetaTileEntity(8583, new MetaTileEntityFreezedryer(location("freezedryer.mv"), GTFORecipeMaps.MICROWAVE_RECIPES, GTFOClientHandler.FREEZEDRYER_OVERLAY, 2));
FREEZEDRYER[3] = registerMetaTileEntity(8584, new MetaTileEntityFreezedryer(location("freezedryer.hv"), GTFORecipeMaps.MICROWAVE_RECIPES, GTFOClientHandler.FREEZEDRYER_OVERLAY, 3));
FREEZEDRYER[4] = registerMetaTileEntity(8585, new MetaTileEntityFreezedryer(location("freezedryer.ev"), GTFORecipeMaps.MICROWAVE_RECIPES, GTFOClientHandler.FREEZEDRYER_OVERLAY, 4));

}

private static ResourceLocation location(String name) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
package gregtechfoodoption.machines;

import gregtech.api.GTValues;
import gregtech.api.capability.IEnergyContainer;
import gregtech.api.capability.impl.RecipeLogicEnergy;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.interfaces.IGregTechTileEntity;
import gregtech.api.recipes.RecipeMap;
import gregtech.api.unification.OreDictUnifier;
import gregtech.api.unification.material.info.MaterialFlags;
import gregtech.api.unification.material.properties.PropertyKey;
import gregtech.api.unification.stack.MaterialStack;
import gregtech.client.renderer.ICubeRenderer;
import gregtechfoodoption.client.GTFOClientHandler;
import gregtechfoodoption.item.GTFOSimpleMachineMetaTileEntity;
import net.minecraft.tileentity.TileEntityFurnace;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundCategory;

import java.util.function.Supplier;

public class MetaTileEntityFreezedryer extends GTFOSimpleMachineMetaTileEntity {
public MetaTileEntityFreezedryer(ResourceLocation metaTileEntityId, RecipeMap<?> recipeMap, ICubeRenderer renderer, int tier) {
super(metaTileEntityId, recipeMap, renderer, tier, true);
}

@Override
public MetaTileEntity createMetaTileEntity(IGregTechTileEntity tileEntity) {
return new MetaTileEntityFreezedryer(this.metaTileEntityId, this.workable.getRecipeMap(), this.renderer, this.getTier());
}

@Override
public void update() {
if (this.energyContainer.getEnergyStored() > GTValues.V[this.getTier()]) {
MaterialStack materialIn = OreDictUnifier.getMaterial(importItems.getStackInSlot(0));
if (materialIn != null) {
if (materialIn.material.hasProperty(PropertyKey.INGOT) || materialIn.material.hasFlag(MaterialFlags.FLAMMABLE) || materialIn.material.hasFlag(MaterialFlags.EXPLOSIVE)) {
this.doExplosion(this.getTier() * 4);
return;
}
}
if (TileEntityFurnace.getItemBurnTime(importItems.getStackInSlot(0)) > 0) {
this.doExplosion(this.getTier() * 4);
return;
}
}
super.update();
}

protected RecipeLogicEnergy createWorkable(RecipeMap<?> recipeMap) {
return new RecipeLogicMicrowave(this, recipeMap, () -> this.energyContainer);
}

public class RecipeLogicMicrowave extends RecipeLogicEnergy {
public RecipeLogicMicrowave(MetaTileEntity tileEntity, RecipeMap<?> recipeMap, Supplier<IEnergyContainer> energyContainer) {
super(tileEntity, recipeMap, energyContainer);
}


}
}
1 change: 1 addition & 0 deletions src/main/java/gregtechfoodoption/potion/GTFOPotions.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public static void initPotionInstances()
new PotionLengthenerPotion();
new AntiSchizoPotion();
new LungCancerPotion();
new asphyxiationpotion();
new EnhancedChorusPotion();
}

Expand Down
59 changes: 59 additions & 0 deletions src/main/java/gregtechfoodoption/potion/asphyxiationpotion.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
package gregtechfoodoption.potion;

import gregtechfoodoption.utils.GTFODamageSources;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.init.MobEffects;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.text.TextComponentTranslation;

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

public class asphyxiationpotion extends GTFOPotion {
public static final String TAG_NAME = "gregtechfoodoption - asphyxiation";
public static asphyxiationpotion INSTANCE = null;
public asphyxiationpotion() {
super("asphyxiation", true, 0xffffff, 0);
INSTANCE = this;
}

@Override
public boolean isReady(int duration, int amplifier) {
return true;
}

@Override
public void performEffect(EntityLivingBase entity, int amplifier) {
int phase = entity.getActivePotionEffect(this).getDuration();

if (phase == 80) {
if (entity.world.isRemote)
entity.sendMessage(new TextComponentTranslation("gregtechfoodoption.asphyxiation.1"));
entity.addPotionEffect(new PotionEffect(MobEffects.NAUSEA, 1000, 9));
entity.addPotionEffect(new PotionEffect(MobEffects.WEAKNESS, 1000, 9));
entity.addPotionEffect(new PotionEffect(MobEffects.SLOWNESS, 1000, 9));
} else if (phase == 20) {
entity.addPotionEffect(new PotionEffect(MobEffects.BLINDNESS, 1000, 0));
} else if (phase < 80 && phase % 5 == 0) {
entity.attackEntityFrom(GTFODamageSources.ASPHYXIATION, (float) Math.pow((double) (200 - phase) / 80, 2));
entity.hurtResistantTime = 0;
//the dmg calc is subject to change
}
}

@Override
protected boolean canRender() {
return false;
}

@Override
public boolean shouldRender(PotionEffect effect) {
return false;
}

@Override
public List<ItemStack> getCurativeItems() {
return Collections.emptyList(); // Nothing :)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ public static void init() {
RussianChain.init();
ChorusChain.init();
SorbetChain.init();

LurdmanineChain.init();
Cholesterolchain.init();
Testosteronechain.init();
Trenchain.init();
Superdrolchain.init();
if (Loader.isModLoaded(GTFOValues.MODID_GCYS)) {
PopcornChain.init();
MineralWaterChain.init();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,14 @@ public static void init() {
.inputs(CAPLET_CAP.getStackForm())
.outputs(VIBRANT_CAPLET.getStackForm())
.buildAndRegister();
/*
// Fent
CANNER_RECIPES.recipeBuilder().EUt(30).duration(200)
.inputs(CAPLET_BODY.getStackForm())
.input(dust, RecrystalizedLurdmanine, 1)
.inputs(CAPLET_CAP.getStackForm())
.outputs(FENT_CAPLET.getStackForm())
.buildAndRegister();
*/
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
package gregtechfoodoption.recipe.chain;

import com.cleanroommc.groovyscript.compat.vanilla.OreDict;
import crafttweaker.api.item.IItemStack;
import gregtech.api.recipes.ModHandler;
import gregtech.api.recipes.RecipeMaps;
import gregtech.api.unification.material.Materials;
import gregtech.common.blocks.BlockCleanroomCasing;
import gregtech.common.blocks.MetaBlocks;
import gregtech.common.items.MetaItems;
import gregtechfoodoption.GTFOMaterialHandler;
import gregtechfoodoption.item.GTFOMetaItem;
import gregtechfoodoption.recipe.GTFORecipeMaps;
import gregtechfoodoption.utils.GTFOUtils;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;

import static gregtech.api.recipes.RecipeMaps.*;
import static gregtech.api.recipes.RecipeMaps.MIXER_RECIPES;
import static gregtech.api.unification.material.Materials.*;
import static gregtech.api.unification.ore.OrePrefix.*;
import static gregtechfoodoption.GTFOMaterialHandler.*;
import static gregtechfoodoption.item.GTFOMetaItem.*;
import static gregtechfoodoption.recipe.GTFORecipeMaps.*;
import static gregtechfoodoption.recipe.GTFORecipeMaps.MULTICOOKER_RECIPES;

public class Cholesterolchain {
public static void init() {
CENTRIFUGE_RECIPES.recipeBuilder().EUt(24).duration(100)
.fluidInputs(Yolk.getFluid(1000))
.fluidOutputs(EmulsifiedYolk.getFluid(1000))
.buildAndRegister();

MIXER_RECIPES.recipeBuilder().EUt(8).duration(300)
.fluidInputs(Ethanol.getFluid(1000))
.fluidInputs(EmulsifiedYolk.getFluid(1000))
.fluidOutputs(yolkethanol.getFluid(1000))
.buildAndRegister();

CENTRIFUGE_RECIPES.recipeBuilder().EUt(24).duration(100)
.fluidInputs(yolkethanol.getFluid(1000))
.fluidOutputs(lipidsolvent.getFluid(1000))
.buildAndRegister();

DISTILLERY_RECIPES.recipeBuilder().EUt(8).duration(300)
.fluidInputs(lipidsolvent.getFluid(1000))
.fluidOutputs(lipidsolution.getFluid(500))
.buildAndRegister();

AUTOCLAVE_RECIPES.recipeBuilder().EUt(8).duration(300)
.fluidInputs(lipidsolution.getFluid(1000))
.fluidOutputs(Cholesterol.getFluid(1000))
.buildAndRegister();
}
}

30 changes: 30 additions & 0 deletions src/main/java/gregtechfoodoption/recipe/chain/Dianabolchain.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package gregtechfoodoption.recipe.chain;

import static gregtech.api.recipes.RecipeMaps.*;
import static gregtech.api.unification.material.Materials.*;
import static gregtech.api.unification.ore.OrePrefix.dust;
import static gregtechfoodoption.GTFOMaterialHandler.*;

public class Dianabolchain {
public static void init() {
CHEMICAL_RECIPES.recipeBuilder().EUt(128).duration(3600)
.fluidInputs(Methyltestosterone.getFluid(1000))
.notConsumable(dust, ChromiumTrioxide)
.notConsumable(dust, AceticAnhydride)
.fluidInputs(Acetone.getFluid(1000))
.fluidOutputs(DianabolSolution.getFluid(1000))
.buildAndRegister();

CENTRIFUGE_RECIPES.recipeBuilder().EUt(64).duration(1800)
.fluidInputs(DianabolSolution.getFluid(1000))
.fluidOutputs(PurifiedDianabolSolution.getFluid(500))
.buildAndRegister();

AUTOCLAVE_RECIPES.recipeBuilder().EUt(96).duration(3600)
.fluidInputs(PurifiedDianabolSolution.getFluid(1000))
.output(dust, Dianabol, 10)
.buildAndRegister();

}
}

Loading
Loading