Skip to content

Commit

Permalink
Introducing the Klein bottle! An "Infinite" "Volumetric" "Flask" (#3490)
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Co-authored-by: Maya <10861407+serenibyss@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 22, 2024
1 parent ad278f9 commit 5de8297
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 19 deletions.
1 change: 1 addition & 0 deletions src/main/java/gregtech/common/render/FlaskRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public FlaskRenderer() {
MinecraftForgeClient.registerItemRenderer(ItemList.VOLUMETRIC_FLASK.getItem(), this);
MinecraftForgeClient.registerItemRenderer(GregtechItemList.VOLUMETRIC_FLASK_8k.getItem(), this);
MinecraftForgeClient.registerItemRenderer(GregtechItemList.VOLUMETRIC_FLASK_32k.getItem(), this);
MinecraftForgeClient.registerItemRenderer(GregtechItemList.KLEIN_BOTTLE.getItem(), this);
}

@Override
Expand Down
7 changes: 5 additions & 2 deletions src/main/java/gtPlusPlus/core/item/ModItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -742,11 +742,14 @@ public static void init() {
itemIonParticleBase = new IonParticles();
itemStandarParticleBase = new StandardBaseParticles();

Item a8kFlask = VolumetricFlaskHelper.generateNewFlask("Volumetric_Flask_8k", "Large Volumetric Flask", 8000);
Item a8kFlask = VolumetricFlaskHelper.generateNewFlask("Volumetric_Flask_8k", "Large Volumetric Flask", 16000);
Item a64kFlask = VolumetricFlaskHelper
.generateNewFlask("Volumetric_Flask_32k", "Gigantic Volumetric Flask", 32000);
.generateNewFlask("Volumetric_Flask_32k", "Gigantic Volumetric Flask", 256000);
Item aMAXINTFlask = VolumetricFlaskHelper
.generateNewFlask("Volumetric_Flask_Infinite", "Klein Bottle", 2147483647);
GregtechItemList.VOLUMETRIC_FLASK_8k.set(a8kFlask);
GregtechItemList.VOLUMETRIC_FLASK_32k.set(a64kFlask);
GregtechItemList.KLEIN_BOTTLE.set(aMAXINTFlask);

itemBoilerChassis = new ItemBoilerChassis();
itemDehydratorCoilWire = new ItemDehydratorCoilWire();
Expand Down
31 changes: 15 additions & 16 deletions src/main/java/gtPlusPlus/core/recipe/RecipesGeneral.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package gtPlusPlus.core.recipe;

import static gregtech.api.enums.Mods.EnderIO;
import static gregtech.api.recipe.RecipeMaps.assemblerRecipes;
import static gregtech.api.recipe.RecipeMaps.compressorRecipes;
import static gregtech.api.recipe.RecipeMaps.*;
import static gregtech.api.util.GTRecipeBuilder.MINUTES;
import static gregtech.api.util.GTRecipeBuilder.SECONDS;
import static gtPlusPlus.core.recipe.common.CI.bitsd;
Expand Down Expand Up @@ -164,28 +163,28 @@ private static void run() {
ItemUtils.simpleMetaStack(ModItems.itemBasicTurbine, 2, 1));

GTValues.RA.stdBuilder()
.itemInputs(
ItemUtils.getSimpleStack(Blocks.glass, 16),
ItemUtils.getSimpleStack(Blocks.glowstone, 16),
ItemList.Large_Fluid_Cell_Steel.get(1),
CI.getNumberedAdvancedCircuit(4))
.itemInputs(ItemList.Large_Fluid_Cell_Aluminium.get(1))
.itemOutputs(VolumetricFlaskHelper.getLargeVolumetricFlask(2))
.fluidInputs(FluidUtils.getFluidStack("molten.borosilicateglass", 2000))
.fluidInputs(FluidUtils.getFluidStack("molten.borosilicateglass", 4000))
.duration(15 * SECONDS)
.eut(TierEU.RECIPE_HV)
.addTo(assemblerRecipes);
.addTo(fluidSolidifierRecipes);

GTValues.RA.stdBuilder()
.itemInputs(
ItemUtils.getSimpleStack(Blocks.glass, 64),
ItemUtils.getSimpleStack(Blocks.glowstone, 64),
ItemList.Large_Fluid_Cell_TungstenSteel.get(1),
CI.getNumberedAdvancedCircuit(5))
.itemInputs(ItemList.Large_Fluid_Cell_TungstenSteel.get(1))
.itemOutputs(VolumetricFlaskHelper.getGiganticVolumetricFlask(2))
.fluidInputs(FluidUtils.getFluidStack("molten.borosilicateglass", 8000))
.fluidInputs(FluidUtils.getFluidStack("molten.borosilicateglass", 16000))
.duration(15 * SECONDS)
.eut(TierEU.RECIPE_IV)
.addTo(assemblerRecipes);
.addTo(fluidSolidifierRecipes);

GTValues.RA.stdBuilder()
.itemInputs(ItemList.Tesseract.get(1))
.itemOutputs(VolumetricFlaskHelper.getKleinBottle(1))
.fluidInputs(MaterialsElements.STANDALONE.CHRONOMATIC_GLASS.getFluidStack(2304))
.duration(15 * SECONDS)
.eut(TierEU.RECIPE_UHV)
.addTo(fluidSolidifierRecipes);

// Mining Explosive
Logger.RECIPE("[Inspection] Explosives");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ private int getFlaskType(ItemStack aStack) {
return 2;
} else if (VolumetricFlaskHelper.isGiganticVolumetricFlask(aStack)) {
return 3;
} else if (VolumetricFlaskHelper.isKleinBottle(aStack)) {
return 4;
}
return 0;
}
Expand Down Expand Up @@ -201,6 +203,8 @@ public boolean addOutput() {
aOutput = VolumetricFlaskHelper.getLargeVolumetricFlask(1);
} else if (aTypeInSlot == 3) {
aOutput = VolumetricFlaskHelper.getGiganticVolumetricFlask(1);
} else if (aTypeInSlot == 4) {
aOutput = VolumetricFlaskHelper.getKleinBottle(1);
} else {
aOutput = null;
}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/gtPlusPlus/nei/NEIGTPPConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public synchronized void loadConfig() {
if (Utils.isClient()) {
API.addItemListEntry(GregtechItemList.VOLUMETRIC_FLASK_8k.get(1));
API.addItemListEntry(GregtechItemList.VOLUMETRIC_FLASK_32k.get(1));
API.addItemListEntry(GregtechItemList.KLEIN_BOTTLE.get(1));
}
sIsAdded = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ public enum GregtechItemList implements IGregtechItemContainer {
// Larger Volumetric Flasks
VOLUMETRIC_FLASK_8k,
VOLUMETRIC_FLASK_32k,
KLEIN_BOTTLE,

// RTG Fuels
Pellet_RTG_PU238,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,14 @@ public static ItemStack getGiganticVolumetricFlask(int aAmount) {
return GregtechItemList.VOLUMETRIC_FLASK_32k.get(aAmount);
}

public static ItemStack getKleinBottle(int aAmount) {
return GregtechItemList.KLEIN_BOTTLE.get(aAmount);
}

public static boolean isVolumetricFlask(ItemStack aStack) {
return isNormalVolumetricFlask(aStack) || isLargeVolumetricFlask(aStack) || isGiganticVolumetricFlask(aStack);
return isNormalVolumetricFlask(aStack) || isLargeVolumetricFlask(aStack)
|| isGiganticVolumetricFlask(aStack)
|| isKleinBottle(aStack);
}

public static boolean isNormalVolumetricFlask(ItemStack aStack) {
Expand All @@ -39,6 +45,10 @@ public static boolean isGiganticVolumetricFlask(ItemStack aStack) {
return GregtechItemList.VOLUMETRIC_FLASK_32k.getItem() == aStack.getItem();
}

public static boolean isKleinBottle(ItemStack aStack) {
return GregtechItemList.KLEIN_BOTTLE.getItem() == aStack.getItem();
}

public static int getMaxFlaskCapacity(ItemStack aStack) {
if (aStack != null) {
Item aItem = aStack.getItem();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public final class FlaskRenderer implements net.minecraftforge.client.IItemRende
public FlaskRenderer() {
MinecraftForgeClient.registerItemRenderer(GregtechItemList.VOLUMETRIC_FLASK_8k.getItem(), this);
MinecraftForgeClient.registerItemRenderer(GregtechItemList.VOLUMETRIC_FLASK_32k.getItem(), this);
MinecraftForgeClient.registerItemRenderer(GregtechItemList.KLEIN_BOTTLE.getItem(), this);
}

@Override
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5de8297

Please sign in to comment.