Skip to content

Commit

Permalink
Merge branch 'master' into pipe-switch
Browse files Browse the repository at this point in the history
  • Loading branch information
Dream-Master authored Jan 21, 2025
2 parents 46cad99 + 683af10 commit 30578f8
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 24 deletions.
2 changes: 1 addition & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ dependencies {
api("com.github.GTNewHorizons:ModularUI:1.2.17:dev")
api("com.github.GTNewHorizons:ModularUI2:2.2.0-1.7.10:dev")
api("com.github.GTNewHorizons:waila:1.8.2:dev")
api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-523-GTNH:dev")
api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-525-GTNH:dev")
api("com.github.GTNewHorizons:AE2FluidCraft-Rework:1.4.23-gtnh:dev")
api('com.github.GTNewHorizons:Yamcl:0.6.0:dev')
api("com.github.GTNewHorizons:Postea:1.0.13:dev")
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/bartworks/API/recipe/BacterialVatFrontend.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package bartworks.API.recipe;

import static gregtech.api.util.GTRecipeConstants.GLASS;
import static gregtech.api.util.GTUtility.getTierNameWithParentheses;
import static gregtech.api.util.GTUtility.trans;

import java.util.List;

Expand All @@ -16,6 +18,7 @@
import gregtech.api.recipe.NEIRecipePropertiesBuilder;
import gregtech.api.recipe.RecipeMapFrontend;
import gregtech.api.util.GTRecipeConstants;
import gregtech.api.util.GTUtility;
import gregtech.api.util.MethodsReturnNonnullByDefault;
import gregtech.api.util.recipe.Sievert;
import gregtech.nei.GTNEIDefaultHandler;
Expand Down Expand Up @@ -76,10 +79,15 @@ private void drawFluidOverlay(GTNEIDefaultHandler.FixedPositionedStack stack) {

@Override
protected void drawEnergyInfo(RecipeDisplayInfo recipeInfo) {
long eut = recipeInfo.recipe.mEUt;
long duration = recipeInfo.recipe.mDuration;
int glassTier = recipeInfo.recipe.getMetadataOrDefault(GLASS, 3);
Sievert data = recipeInfo.recipe.getMetadataOrDefault(GTRecipeConstants.SIEVERT, new Sievert(0, false));
int sievert = data.sievert;
boolean isExact = data.isExact;
recipeInfo.drawText(trans("152", "Total: ") + GTUtility.formatNumbers(eut * duration) + " EU");
recipeInfo.drawText(
trans("153", "Usage: ") + GTUtility.formatNumbers(eut) + " EU/t" + getTierNameWithParentheses(eut));
recipeInfo.drawText(StatCollector.translateToLocalFormatted("nei.biovat.0.name", GTValues.VN[glassTier]));
if (sievert != 0) {
if (!isExact) {
Expand Down
20 changes: 15 additions & 5 deletions src/main/java/bartworks/system/material/Werkstoff.java
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ public static class GenerationFeatures {
/*
* dust 1 metal 10 (ingot, nugget) gem 100 ore 1000 cell 10000 plasma 100000 molten 1000000 crafting metal
* 10000000 (sticks, plates) meta crafting metal 100000000 (gears, screws, bolts, springs) multiple ingotWorth
* stuff 1000000000 (double, triple, quadruple, ingot/plates)
* stuff 1000000000 (double and dense plates) 1000000000 (triple, quadruple and quintuple plates)
*/
private boolean isExtension;
private static final NonNullWrappedHashMap<OrePrefixes, Integer> prefixLogic = new NonNullWrappedHashMap<>(0);
Expand Down Expand Up @@ -759,10 +759,12 @@ public static void initPrefixLogic() {
Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.wireFine, 0b100000000);

Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.plateDouble, 0x200);
Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.plateTriple, 0x200);
Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.plateQuadruple, 0x200);
Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.plateQuintuple, 0x200);
Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.plateDense, 0x200);

Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.plateTriple, 0x400);
Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.plateQuadruple, 0x400);
Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.plateQuintuple, 0x400);

Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.blockCasing, 0x380);
Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.blockCasingAdvanced, 0x380);
}
Expand Down Expand Up @@ -969,11 +971,19 @@ public Werkstoff.GenerationFeatures addCraftingMetalWorkingItems() {
return this;
}

public Werkstoff.GenerationFeatures addMultipleIngotMetalWorkingItems() {
public Werkstoff.GenerationFeatures addDoubleAndDensePlates() {
this.toGenerate = this.toGenerate | 0x200;
return this;
}

/**
* Due to rebolted casings, double plates had to be excluded from this
*/
public Werkstoff.GenerationFeatures addMultiPlates() {
this.toGenerate = this.toGenerate | 0x400;
return this;
}

public Werkstoff.GenerationFeatures addPrefix(OrePrefixes prefixes) {
this.toGenerate = this.toGenerate | getPrefixDataRaw(prefixes);
return this;
Expand Down
12 changes: 7 additions & 5 deletions src/main/java/bartworks/system/material/WerkstoffLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -1347,7 +1347,7 @@ public static void setUp() {
.addMixerRecipes((short) 1)
.addSimpleMetalWorkingItems()
.addCraftingMetalWorkingItems()
.addMultipleIngotMetalWorkingItems()
.addDoubleAndDensePlates()
.addMetaSolidifierRecipes()
.addMetalCraftingSolidifierRecipes(),
88,
Expand Down Expand Up @@ -1385,7 +1385,7 @@ public static void setUp() {
.addMixerRecipes((short) 1)
.addSimpleMetalWorkingItems()
.addCraftingMetalWorkingItems()
.addMultipleIngotMetalWorkingItems()
.addDoubleAndDensePlates()
.addMetaSolidifierRecipes()
.addMetalCraftingSolidifierRecipes(),
90,
Expand Down Expand Up @@ -1417,7 +1417,7 @@ public static void setUp() {
.addMixerRecipes()
.addSimpleMetalWorkingItems()
.addCraftingMetalWorkingItems()
.addMultipleIngotMetalWorkingItems()
.addDoubleAndDensePlates()
.addMetaSolidifierRecipes()
.addMetalCraftingSolidifierRecipes(),
92,
Expand Down Expand Up @@ -1480,7 +1480,7 @@ public static void setUp() {
.addCraftingMetalWorkingItems()
.addMolten()
.addSimpleMetalWorkingItems()
.addMultipleIngotMetalWorkingItems()
.addDoubleAndDensePlates()
.addMetaSolidifierRecipes()
.addMetalCraftingSolidifierRecipes(),
96,
Expand Down Expand Up @@ -1968,11 +1968,13 @@ private static void addItemsForGeneration() {
WerkstoffLoader.items.put(wireFine, new BWMetaGeneratedItems(wireFine));
}
if ((WerkstoffLoader.toGenerateGlobal & 0b1000000000) != 0) {
WerkstoffLoader.items.put(plateDense, new BWMetaGeneratedItems(plateDense));;
}
if ((WerkstoffLoader.toGenerateGlobal & 0b10000000000) != 0) {
WerkstoffLoader.items.put(plateDouble, new BWMetaGeneratedItems(plateDouble));
WerkstoffLoader.items.put(plateTriple, new BWMetaGeneratedItems(plateTriple));
WerkstoffLoader.items.put(plateQuadruple, new BWMetaGeneratedItems(plateQuadruple));
WerkstoffLoader.items.put(plateQuintuple, new BWMetaGeneratedItems(plateQuintuple));
WerkstoffLoader.items.put(plateDense, new BWMetaGeneratedItems(plateDense));;
}
ENABLED_ORE_PREFIXES.addAll(WerkstoffLoader.items.keySet());
ENABLED_ORE_PREFIXES.add(ore);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ public IStructureDefinition<MTEPreciseAssembler> getStructureDefinition() {
withChannel(
"machine casing",
StructureUtility.ofBlocksTiered(
(block, meta) -> block == GregTechAPI.sBlockCasings1 ? meta : -2,
(block, meta) -> (block == GregTechAPI.sBlockCasings1 && meta >= 0 && meta <= 9) ? meta
: -2,
IntStream.range(0, 10)
.mapToObj(
meta -> org.apache.commons.lang3.tuple.Pair.of(GregTechAPI.sBlockCasings1, meta))
Expand Down
19 changes: 10 additions & 9 deletions src/main/java/goodgenerator/items/GGMaterial.java
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ public class GGMaterial implements Runnable {
.addMetalItems()
.addCraftingMetalWorkingItems()
.addSimpleMetalWorkingItems()
.addMultipleIngotMetalWorkingItems()
.addDoubleAndDensePlates()
.addMetaSolidifierRecipes()
.addMetalCraftingSolidifierRecipes(),
OffsetID + 21,
Expand Down Expand Up @@ -314,7 +314,7 @@ public class GGMaterial implements Runnable {
.addMetalItems()
.addCraftingMetalWorkingItems()
.addSimpleMetalWorkingItems()
.addMultipleIngotMetalWorkingItems()
.addDoubleAndDensePlates()
.addMetaSolidifierRecipes()
.addMetalCraftingSolidifierRecipes(),
OffsetID + 23,
Expand Down Expand Up @@ -1075,7 +1075,7 @@ public class GGMaterial implements Runnable {
.addMetalItems()
.addCraftingMetalWorkingItems()
.addSimpleMetalWorkingItems()
.addMultipleIngotMetalWorkingItems()
.addDoubleAndDensePlates()
.addMetaSolidifierRecipes()
.addMetalCraftingSolidifierRecipes()
.addMixerRecipes((short) 3),
Expand Down Expand Up @@ -1201,7 +1201,7 @@ public class GGMaterial implements Runnable {
.addMetalItems()
.addCraftingMetalWorkingItems()
.addSimpleMetalWorkingItems()
.addMultipleIngotMetalWorkingItems()
.addDoubleAndDensePlates()
.addMetaSolidifierRecipes()
.addMetalCraftingSolidifierRecipes()
.addMixerRecipes((short) 7),
Expand Down Expand Up @@ -1231,7 +1231,7 @@ public class GGMaterial implements Runnable {
.addMetalItems()
.addCraftingMetalWorkingItems()
.addSimpleMetalWorkingItems()
.addMultipleIngotMetalWorkingItems()
.addDoubleAndDensePlates()
.addMetaSolidifierRecipes()
.addMetalCraftingSolidifierRecipes(),
OffsetID + 96,
Expand Down Expand Up @@ -1446,7 +1446,7 @@ public class GGMaterial implements Runnable {
.addMolten()
.addMetalItems()
.addCraftingMetalWorkingItems()
.addMultipleIngotMetalWorkingItems()
.addDoubleAndDensePlates()
.addMetaSolidifierRecipes()
.addMetalCraftingSolidifierRecipes()
.addMixerRecipes((short) 6),
Expand All @@ -1472,7 +1472,7 @@ public class GGMaterial implements Runnable {
.addMetalItems()
.addCraftingMetalWorkingItems()
.addSimpleMetalWorkingItems()
.addMultipleIngotMetalWorkingItems()
.addDoubleAndDensePlates()
.addMetaSolidifierRecipes()
.addMetalCraftingSolidifierRecipes()
.addMixerRecipes((short) 4),
Expand All @@ -1497,7 +1497,7 @@ public class GGMaterial implements Runnable {
.addMetalItems()
.addCraftingMetalWorkingItems()
.addSimpleMetalWorkingItems()
.addMultipleIngotMetalWorkingItems()
.addDoubleAndDensePlates()
.addMetaSolidifierRecipes()
.addMetalCraftingSolidifierRecipes(),
OffsetID + 110,
Expand All @@ -1519,7 +1519,8 @@ public class GGMaterial implements Runnable {
.addMetalItems()
.addCraftingMetalWorkingItems()
.addSimpleMetalWorkingItems()
.addMultipleIngotMetalWorkingItems()
.addDoubleAndDensePlates()
.addMultiPlates()
.addMetaSolidifierRecipes()
.addMetalCraftingSolidifierRecipes(),
OffsetID + 111,
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/gregtech/common/GTProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -1293,11 +1293,11 @@ public void onPostLoad() {
GTModHandler.addCraftingRecipe(
GTOreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 4L),
tBits,
new Object[] { " X ", 'X', OrePrefixes.dust.get(aMaterial) });
new Object[] { " X ", " ", " ", 'X', OrePrefixes.dust.get(aMaterial) });
GTModHandler.addCraftingRecipe(
GTOreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 9L),
tBits,
new Object[] { "X ", 'X', OrePrefixes.dust.get(aMaterial) });
new Object[] { "X ", " ", " ", 'X', OrePrefixes.dust.get(aMaterial) });
GTModHandler.addCraftingRecipe(
GTOreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L),
tBits,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1894,7 +1894,7 @@ public class WerkstoffMaterialPool implements Runnable {
new Werkstoff.GenerationFeatures().disable()
.onlyDust()
.addMetalItems()
.addMultipleIngotMetalWorkingItems()
.addDoubleAndDensePlates()
.addCraftingMetalWorkingItems()
.enforceUnification(),
offsetID3b + 1,
Expand Down

0 comments on commit 30578f8

Please sign in to comment.