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

Introducing the Klein bottle! An "Infinite" "Volumetric" "Flask" #3490

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
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
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
3 changes: 3 additions & 0 deletions src/main/java/gtPlusPlus/core/item/ModItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -744,8 +744,11 @@ public static void init() {
Item a8kFlask = VolumetricFlaskHelper.generateNewFlask("Volumetric_Flask_8k", "Large Volumetric Flask", 8000);
Item a64kFlask = VolumetricFlaskHelper
.generateNewFlask("Volumetric_Flask_32k", "Gigantic Volumetric Flask", 32000);
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
18 changes: 17 additions & 1 deletion src/main/java/gtPlusPlus/core/recipe/RecipesGeneral.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
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.plasmaForgeRecipes;
import static gregtech.api.util.GTRecipeBuilder.MINUTES;
import static gregtech.api.util.GTRecipeBuilder.SECONDS;
import static gregtech.api.util.GTRecipeConstants.COIL_HEAT;
import static gtPlusPlus.core.material.MaterialsElements.STANDALONE.CELESTIAL_TUNGSTEN;
import static gtPlusPlus.core.material.MaterialsElements.STANDALONE.CHRONOMATIC_GLASS;
import static gtPlusPlus.core.recipe.common.CI.bitsd;
import static gtPlusPlus.core.util.minecraft.ItemUtils.getSimpleStack;
import static gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechConduits.generatePipeRecipes;
Expand Down Expand Up @@ -187,6 +191,18 @@ private static void run() {
.eut(TierEU.RECIPE_IV)
.addTo(assemblerRecipes);

GTValues.RA.stdBuilder()
.itemInputs(ItemList.Shape_Mold_Bottle.get(1), ItemList.Tesseract.get(1), ItemList.Shape_Mold_Bottle.get(1))
.itemOutputs(VolumetricFlaskHelper.getKleinBottle(1))
.fluidInputs(
CHRONOMATIC_GLASS.getFluidStack(1440),
FluidUtils.getFluidStack("molten.borosilicateglass", 1000000),
CELESTIAL_TUNGSTEN.getFluidStack(1440))
.duration(60 * SECONDS)
.metadata(COIL_HEAT, 4500)
.eut(TierEU.RECIPE_UHV)
.addTo(plasmaForgeRecipes);

// Mining Explosive
Logger.RECIPE("[Inspection] Explosives");
if (RecipeUtils.addShapedRecipe(
Expand Down Expand Up @@ -416,7 +432,7 @@ private static void migratedRecipes() {
generateWireRecipes(MaterialsAlloy.LEAGRISIUM);
generateWireRecipes(MaterialsAlloy.TRINIUM_TITANIUM);
generateWireRecipes(MaterialsElements.STANDALONE.HYPOGEN);
generateWireRecipes(MaterialsElements.STANDALONE.CHRONOMATIC_GLASS);
generateWireRecipes(CHRONOMATIC_GLASS);

Material[] gtpp = new Material[] { MaterialsAlloy.STABALLOY, MaterialsAlloy.TANTALLOY_60,
MaterialsAlloy.TANTALLOY_61, MaterialsAlloy.POTIN, MaterialsAlloy.MARAGING300, MaterialsAlloy.MARAGING350,
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.
Loading