Skip to content

Commit

Permalink
blerp
Browse files Browse the repository at this point in the history
  • Loading branch information
HbmMods committed Jul 8, 2024
1 parent 958a099 commit 962686d
Show file tree
Hide file tree
Showing 8 changed files with 3,921 additions and 19 deletions.
4 changes: 4 additions & 0 deletions changelog
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
* Gerald now makes use of BSCCO wires
* A new microcrafting item has been added, heavy duty elements, these need to be mass-produced in the arc welder using cast bronze, welded CMB and fullerite, also using stellar flux for welding
* The recipe uses a stack of the brand new quantum computers
* Electrolyzers now support variable duration recipes
* The water electrolysis now only takes 10 ticks per batch
* Rebalanced the upgrades for the electrolyzer, it can now also take overdrive upgrades
* Changed crystalline bedrock ore, redstone and cinnabar (mercury) are now primary while the less important diamond and sodalite are sulfuric byproducts

## Fixed
* Added a write lock on cellular dungeons while generating, fixing a crash caused by dungeons that generate next to each other due to cascading worldgen
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mod_version=1.0.27
# Empty build number makes a release type
mod_build_number=5012
mod_build_number=5020

credits=HbMinecraft,\
\ rodolphito (explosion algorithms),\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@
import com.google.gson.JsonObject;
import com.google.gson.stream.JsonWriter;
import com.hbm.inventory.FluidStack;
import com.hbm.inventory.RecipesCommon;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.material.Mats;
import com.hbm.inventory.recipes.loader.SerializableRecipe;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemFluidIcon;
Expand All @@ -26,7 +24,7 @@ public class ElectrolyserFluidRecipes extends SerializableRecipe {

@Override
public void registerDefaults() {
recipes.put(Fluids.WATER, new ElectrolysisRecipe(2_000, new FluidStack(Fluids.HYDROGEN, 200), new FluidStack(Fluids.OXYGEN, 200),10));
recipes.put(Fluids.WATER, new ElectrolysisRecipe(2_000, new FluidStack(Fluids.HYDROGEN, 200), new FluidStack(Fluids.OXYGEN, 200), 10));
recipes.put(Fluids.HEAVYWATER, new ElectrolysisRecipe(2_000, new FluidStack(Fluids.DEUTERIUM, 200), new FluidStack(Fluids.OXYGEN, 200), 10));
recipes.put(Fluids.VITRIOL, new ElectrolysisRecipe(1_000, new FluidStack(Fluids.SULFURIC_ACID, 500), new FluidStack(Fluids.CHLORINE, 500), new ItemStack(ModItems.powder_iron), new ItemStack(ModItems.ingot_mercury)));
recipes.put(Fluids.SLOP, new ElectrolysisRecipe(1_000, new FluidStack(Fluids.MERCURY, 250), new FluidStack(Fluids.NONE, 0), new ItemStack(ModItems.niter, 2), new ItemStack(ModItems.powder_limestone, 2), new ItemStack(ModItems.sulfur)));
Expand Down Expand Up @@ -82,10 +80,13 @@ public void readRecipe(JsonElement recipe) {
FluidStack output1 = this.readFluidStack(obj.get("output1").getAsJsonArray());
FluidStack output2 = this.readFluidStack(obj.get("output2").getAsJsonArray());

int duration = 20;
if(obj.has("duraion")) duration = obj.get("duration").getAsInt();

ItemStack[] byproducts = new ItemStack[0];
if(obj.has("byproducts")) byproducts = this.readItemStackArray(obj.get("byproducts").getAsJsonArray());

recipes.put(input.type, new ElectrolysisRecipe(input.fill, output1, output2, byproducts));
recipes.put(input.type, new ElectrolysisRecipe(input.fill, output1, output2, duration, byproducts));
}

@Override
Expand All @@ -101,6 +102,8 @@ public void writeRecipe(Object recipe, JsonWriter writer) throws IOException {
for(ItemStack stack : rec.getValue().byproduct) this.writeItemStack(stack, writer);
writer.endArray();
}

writer.name("duration").value(rec.getValue().duration);
}

public static class ElectrolysisRecipe {
Expand All @@ -115,7 +118,7 @@ public ElectrolysisRecipe(int amount, FluidStack output1, FluidStack output2, It
this.output2 = output2;
this.amount = amount;
this.byproduct = byproduct;
duration = 20;
this.duration = 20;
}
public ElectrolysisRecipe(int amount, FluidStack output1, FluidStack output2, int duration, ItemStack... byproduct) {
this.output1 = output1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import com.hbm.items.special.ItemBedrockOreNew;
import com.hbm.items.special.ItemBedrockOreNew.BedrockOreGrade;
import com.hbm.items.special.ItemBedrockOreNew.BedrockOreType;
import com.hbm.util.BobMathUtil;
import com.hbm.util.ItemStackUtil;

import net.minecraft.item.ItemStack;
Expand Down Expand Up @@ -135,23 +134,23 @@ public void registerDefaults() {

for(BedrockOreType type : BedrockOreType.values()) {

MaterialStack f0 = ItemBedrockOreNew.toFluid(type.primary1, MaterialShapes.INGOT.q(7));
MaterialStack f1 = ItemBedrockOreNew.toFluid(type.primary2, MaterialShapes.INGOT.q(4));
MaterialStack f0 = ItemBedrockOreNew.toFluid(type.primary1, MaterialShapes.INGOT.q(12));
MaterialStack f1 = ItemBedrockOreNew.toFluid(type.primary2, MaterialShapes.INGOT.q(6));
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_FIRST, type)), new ElectrolysisMetalRecipe(
f0 != null ? f0 : new MaterialStack(Mats.MAT_SLAG, MaterialShapes.INGOT.q(1)),
f1 != null ? f1 : new MaterialStack(Mats.MAT_SLAG, MaterialShapes.INGOT.q(1)),
20,
f0 == null ? ItemBedrockOreNew.extract(type.primary1, 7) : new ItemStack(ModItems.dust),
f1 == null ? ItemBedrockOreNew.extract(type.primary2, 4) : new ItemStack(ModItems.dust),
f0 == null ? ItemBedrockOreNew.extract(type.primary1, 12) : new ItemStack(ModItems.dust),
f1 == null ? ItemBedrockOreNew.extract(type.primary2, 6) : new ItemStack(ModItems.dust),
ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)));
MaterialStack s0 = ItemBedrockOreNew.toFluid(type.primary1, MaterialShapes.INGOT.q(4));
MaterialStack s1 = ItemBedrockOreNew.toFluid(type.primary2, MaterialShapes.INGOT.q(7));
MaterialStack s0 = ItemBedrockOreNew.toFluid(type.primary1, MaterialShapes.INGOT.q(6));
MaterialStack s1 = ItemBedrockOreNew.toFluid(type.primary2, MaterialShapes.INGOT.q(12));
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SECOND, type)), new ElectrolysisMetalRecipe(
s0 != null ? s0 : new MaterialStack(Mats.MAT_SLAG, MaterialShapes.INGOT.q(1)),
s1 != null ? s1 : new MaterialStack(Mats.MAT_SLAG, MaterialShapes.INGOT.q(1)),
20,
s0 == null ? ItemBedrockOreNew.extract(type.primary1, 4) : new ItemStack(ModItems.dust),
s1 == null ? ItemBedrockOreNew.extract(type.primary2, 7) : new ItemStack(ModItems.dust),
s0 == null ? ItemBedrockOreNew.extract(type.primary1, 6) : new ItemStack(ModItems.dust),
s1 == null ? ItemBedrockOreNew.extract(type.primary2, 12) : new ItemStack(ModItems.dust),
ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)));

MaterialStack c0 = ItemBedrockOreNew.toFluid(type.primary1, MaterialShapes.INGOT.q(2));
Expand Down Expand Up @@ -185,7 +184,7 @@ public static ElectrolysisMetalRecipe getRecipe(ItemStack stack) {

public static HashMap getRecipes() {

HashMap<Object[], Object[]> recipes = new HashMap<>();
HashMap<Object[], Object[]> recipes = new HashMap();

for(Entry<AStack, ElectrolysisMetalRecipe> entry : ElectrolyserMetalRecipes.recipes.entrySet()) {

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/hbm/items/special/ItemBedrockOreNew.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ public static enum BedrockOreType {
// primary sulfuric solvent radsolvent
LIGHT_METAL( 0xFFFFFF, 0x353535, "light", IRON, CU, TI, AL, AL, CHLOROCALCITE, LI, NA, CHLOROCALCITE, LI, NA),
HEAVY_METAL( 0x868686, 0x000000, "heavy", W, PB, GOLD, GOLD, BE, W, PB, GOLD, BI, BI, GOLD),
RARE_EARTH( 0xE6E6B6, 0x1C1C00, "rare", CO, EnumChunkType.RARE, B, LA, NB, ND, SR, ZR, CO, ND, SR),
RARE_EARTH( 0xE6E6B6, 0x1C1C00, "rare", CO, EnumChunkType.RARE, B, LA, NB, ND, SR, ZR, NB, ND, SR),
ACTINIDE( 0xC1C7BD, 0x2B3227, "actinide", U, TH232, RA226, RA226, PO210, RA226, RA226, PO210, TC99, TC99, U238),
NON_METAL( 0xAFAFAF, 0x0F0F0F, "nonmetal", COAL, S, LIGNITE, KNO, F, P_RED, F, S, CHLOROCALCITE, SI, SI),
CRYSTALLINE( 0xE2FFFA, 0x1E8A77, "crystal", DIAMOND, SODALITE, CINNABAR, ASBESTOS, REDSTONE, CINNABAR, ASBESTOS, EMERALD, BORAX, MOLYSITE, SODALITE);
CRYSTALLINE( 0xE2FFFA, 0x1E8A77, "crystal", REDSTONE, CINNABAR, SODALITE, ASBESTOS, DIAMOND, CINNABAR, ASBESTOS, EMERALD, BORAX, MOLYSITE, SODALITE);
//sediment

public int light;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/hbm/lib/RefStrings.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
public class RefStrings {
public static final String MODID = "hbm";
public static final String NAME = "Hbm's Nuclear Tech Mod";
public static final String VERSION = "1.0.27 BETA (5012)";
public static final String VERSION = "1.0.27 BETA (5020)";
//HBM's Beta Naming Convention:
//V T (X)
//V -> next release version
Expand Down
Loading

0 comments on commit 962686d

Please sign in to comment.