Skip to content

Commit

Permalink
Add missing flags for materials (#2024)
Browse files Browse the repository at this point in the history
  • Loading branch information
JuiceyBeans authored Oct 1, 2024
1 parent f105578 commit afd65ab
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@ public static void register() {
.ingot(6)
.liquid(new FluidBuilder().temperature(100_000))
.color(0xFFFFFF).secondaryColor(0x000000)
.appendFlags(EXT_METAL, GENERATE_BOLT_SCREW, GENERATE_FRAME)
.appendFlags(EXT_METAL, GENERATE_BOLT_SCREW, GENERATE_FRAME, GENERATE_GEAR, GENERATE_LONG_ROD)
.element(GTElements.Nt)
.toolStats(ToolProperty.Builder.of(180.0F, 100.0F, 65535, 6)
.attackSpeed(0.5F).enchantability(33).magnetic().unbreakable().build())
Expand All @@ -986,7 +986,7 @@ public static void register() {
.ingot(5)
.liquid(new FluidBuilder().temperature(7500))
.color(0xf3e7a9).secondaryColor(0x9c9487).iconSet(BRIGHT)
.appendFlags(EXT_METAL, GENERATE_FOIL, GENERATE_GEAR)
.appendFlags(EXT_METAL, GENERATE_FOIL, GENERATE_GEAR, GENERATE_BOLT_SCREW, GENERATE_LONG_ROD)
.element(GTElements.Dr)
.toolStats(ToolProperty.Builder.of(14.0F, 12.0F, 8192, 5)
.attackSpeed(0.3F).enchantability(33).magnetic().build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ public static void register() {
.gem(3).ore()
.color(0xC8FFFF).iconSet(DIAMOND)
.flags(GENERATE_BOLT_SCREW, GENERATE_LENS, GENERATE_GEAR, NO_SMASHING, NO_SMELTING,
HIGH_SIFTER_OUTPUT, DISABLE_DECOMPOSITION, EXCLUDE_BLOCK_CRAFTING_BY_HAND_RECIPES)
HIGH_SIFTER_OUTPUT, DISABLE_DECOMPOSITION, EXCLUDE_BLOCK_CRAFTING_BY_HAND_RECIPES,
GENERATE_LONG_ROD)
.components(Carbon, 1)
.toolStats(ToolProperty.Builder.of(6.0F, 7.0F, 768, 3)
.attackSpeed(0.1F).enchantability(18).build())
Expand Down Expand Up @@ -405,7 +406,7 @@ public static void register() {
.ingot()
.liquid(new FluidBuilder().temperature(1258))
.color(0xfaf4dc).secondaryColor(0x484434).iconSet(SHINY)
.appendFlags(EXT2_METAL)
.appendFlags(EXT2_METAL, GENERATE_GEAR)
.components(Copper, 1, Silver, 4)
.toolStats(ToolProperty.Builder.of(3.0F, 8.0F, 768, 2)
.attackSpeed(0.3F).enchantability(33)
Expand All @@ -419,7 +420,7 @@ public static void register() {
.ingot()
.liquid(new FluidBuilder().temperature(1341))
.color(0xecd5b8).secondaryColor(0xd85f2d).iconSet(SHINY)
.appendFlags(EXT2_METAL, GENERATE_RING)
.appendFlags(EXT2_METAL, GENERATE_RING, GENERATE_GEAR)
.components(Copper, 1, Gold, 4)
.toolStats(ToolProperty.Builder.of(12.0F, 2.0F, 768, 2)
.enchantability(33)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static void register() {
RedSteel = new Material.Builder(GTCEu.id("red_steel"))
.ingot(3).fluid()
.color(0xa09191).secondaryColor(0x500404).iconSet(METALLIC)
.appendFlags(EXT_METAL, GENERATE_GEAR)
.appendFlags(EXT_METAL, GENERATE_GEAR, GENERATE_BOLT_SCREW, GENERATE_LONG_ROD)
.components(SterlingSilver, 1, BismuthBronze, 1, Steel, 2, BlackSteel, 4)
.toolStats(ToolProperty.Builder.of(7.0F, 6.0F, 2560, 3)
.attackSpeed(0.1F).enchantability(21).build())
Expand All @@ -47,7 +47,7 @@ public static void register() {
BlueSteel = new Material.Builder(GTCEu.id("blue_steel"))
.ingot(3).fluid()
.color(0x779ac6).secondaryColor(0x191948).iconSet(METALLIC)
.appendFlags(EXT_METAL, GENERATE_FRAME, GENERATE_GEAR)
.appendFlags(EXT_METAL, GENERATE_FRAME, GENERATE_GEAR, GENERATE_BOLT_SCREW, GENERATE_LONG_ROD)
.components(RoseGold, 1, Brass, 1, Steel, 2, BlackSteel, 4)
.toolStats(ToolProperty.Builder.of(15.0F, 6.0F, 1024, 3)
.attackSpeed(0.1F).enchantability(33).build())
Expand Down Expand Up @@ -112,7 +112,7 @@ public static void register() {
HSSE = new Material.Builder(GTCEu.id("hsse"))
.ingot(4).fluid()
.color(0x9d9cbe).secondaryColor(0x2b0350).iconSet(METALLIC)
.appendFlags(EXT2_METAL, GENERATE_FRAME, GENERATE_RING)
.appendFlags(EXT2_METAL, GENERATE_FRAME, GENERATE_RING, GENERATE_GEAR)
.components(HSSG, 6, Cobalt, 1, Manganese, 1, Silicon, 1)
.toolStats(ToolProperty.Builder.of(5.0F, 10.0F, 3072, 4)
.attackSpeed(0.3F).enchantability(33).build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public static void register() {
DamascusSteel = new Material.Builder(GTCEu.id("damascus_steel"))
.ingot(3).fluid()
.color(0x6E6E6E).secondaryColor(0x302222).iconSet(METALLIC)
.appendFlags(EXT_METAL)
.appendFlags(EXT_METAL, GENERATE_BOLT_SCREW, GENERATE_LONG_ROD, GENERATE_GEAR)
.components(Steel, 1)
.toolStats(ToolProperty.Builder.of(6.0F, 4.0F, 1024, 3)
.addTypes(GTToolType.MORTAR)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ public static void register() {
ConstructionFoam = new Material.Builder(GTCEu.id("construction_foam"))
.fluid().color(0x808080).buildAndRegister();

// Free IDs 1517-1521

SulfuricHeavyFuel = new Material.Builder(GTCEu.id("sulfuric_heavy_fuel"))
.liquid(new FluidBuilder().customStill()).flags(FLAMMABLE).buildAndRegister();

Expand Down Expand Up @@ -310,8 +308,6 @@ public static void register() {
EnrichedBacterialSludge = new Material.Builder(GTCEu.id("enriched_bacterial_sludge"))
.fluid().color(0x7FFF00).buildAndRegister();

// free id: 1587

Mutagen = new Material.Builder(GTCEu.id("mutagen"))
.fluid().color(0x00FF7F).buildAndRegister();

Expand All @@ -327,8 +323,6 @@ public static void register() {
HighOctaneGasoline = new Material.Builder(GTCEu.id("high_octane_gasoline"))
.fluid().color(0xFFA500).flags(FLAMMABLE, EXPLOSIVE).buildAndRegister();

// free id: 1593

CoalGas = new Material.Builder(GTCEu.id("coal_gas"))
.gas().color(0x333333).buildAndRegister();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.gregtechceu.gtceu.data.recipe.generated;

import com.gregtechceu.gtceu.GTCEu;
import com.gregtechceu.gtceu.api.GTValues;
import com.gregtechceu.gtceu.api.capability.GTCapabilityHelper;
import com.gregtechceu.gtceu.api.capability.IElectricItem;
Expand Down Expand Up @@ -51,6 +52,11 @@ public class ToolRecipeHandler {
public static Map<Integer, Material> baseMaterials = new HashMap<>();
public static Map<Integer, List<ItemEntry<? extends Item>>> batteryItems = new HashMap<>();
public static Map<Integer, ItemEntry<? extends Item>> powerUnitItems = new HashMap<>();
private static final Material[] softMaterials = new Material[] {
GTMaterials.Wood, GTMaterials.Rubber, GTMaterials.Polyethylene,
GTMaterials.Polytetrafluoroethylene, GTMaterials.Polybenzimidazole,
GTMaterials.SiliconeRubber, GTMaterials.StyreneButadieneRubber
};

public static void init(Consumer<FinishedRecipe> provider) {
initializeGTItems();
Expand Down Expand Up @@ -211,6 +217,9 @@ private static void processTool(TagPrefix prefix, Material material, ToolPropert
addToolRecipe(provider, material, GTToolType.WRENCH, false,
"PhP", " P ", " P ",
'P', plate);
} else {
GTCEu.LOGGER.info("Did not find plate for " + material.getName() +
", skipping mining hammer, spade, saw, axe, hoe, pickaxe, scythe, shovel, sword, hammer, file, knife, wrench recipes");
}

if (material.hasFlag(GENERATE_ROD)) {
Expand All @@ -228,7 +237,13 @@ private static void processTool(TagPrefix prefix, Material material, ToolPropert
'P', plate,
'T', new UnificationEntry(TagPrefix.screw, material),
'S', rod);
} else if (!ArrayUtils.contains(softMaterials, material)) {
GTCEu.LOGGER
.info("Did not find bolt for " + material.getName() + ", skipping wirecutter recipe");
}
} else {
GTCEu.LOGGER.info("Did not find plate for " + material.getName() +
", skipping wirecutter, butchery knife recipes");
}

addToolRecipe(provider, material, GTToolType.SCREWDRIVER, true,
Expand All @@ -239,6 +254,9 @@ private static void processTool(TagPrefix prefix, Material material, ToolPropert
addDyeableToolRecipe(provider, material, GTToolType.CROWBAR, true,
"hDS", "DSD", "SDf",
'S', rod);
} else if (!ArrayUtils.contains(softMaterials, material)) {
GTCEu.LOGGER.info("Did not find rod for " + material.getName() +
", skipping wirecutter, butchery knife, screwdriver, crowbar recipes");
}
}

Expand Down Expand Up @@ -327,8 +345,14 @@ private static void processElectricTool(TagPrefix prefix, Material material, Too
.duration((int) material.getMass() * 4)
.EUt(8L * voltageMultiplier)
.save(provider);
} else {
GTCEu.LOGGER.info("Did not find gear for " + material.getName() +
", skipping gear -> buzzsaw blade recipe");
}
}
} else {
GTCEu.LOGGER.info("Did not find plate for " + material.getName() +
", skipping electric drill, chainsaw, wrench, wirecutter, buzzsaw recipe");
}

// screwdriver
Expand All @@ -341,6 +365,9 @@ private static void processElectricTool(TagPrefix prefix, Material material, Too
ChemicalHelper.get(toolPrefix, material),
"fR", " h",
'R', new UnificationEntry(TagPrefix.rodLong, material));
} else {
GTCEu.LOGGER.info("Did not find long rod for " + material.getName() +
", skipping electric screwdriver recipe");
}
}
}
Expand Down Expand Up @@ -467,11 +494,6 @@ private static void registerMortarRecipes(Consumer<FinishedRecipe> provider) {
}

private static void registerSoftToolRecipes(Consumer<FinishedRecipe> provider) {
final Material[] softMaterials = new Material[] {
GTMaterials.Wood, GTMaterials.Rubber, GTMaterials.Polyethylene,
GTMaterials.Polytetrafluoroethylene, GTMaterials.Polybenzimidazole
};

final ItemStack stick = new ItemStack(Items.STICK);

for (int i = 0; i < softMaterials.length; i++) {
Expand Down

0 comments on commit afd65ab

Please sign in to comment.