some recipe magic

This commit is contained in:
Boblet 2022-02-14 17:00:47 +01:00
parent decc1ede6f
commit c990f1dd81
5 changed files with 16 additions and 5 deletions

View File

@ -21,9 +21,9 @@ public class PowderRecipes {
CraftingManager.addShapelessAuto(new ItemStack(ModItems.powder_power, 5), new Object[] { REDSTONE.dust(), "dustGlowstone", DIAMOND.dust(), NP237.dust(), MAGTUNG.dust() });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ballistite, 3), new Object[] { Items.gunpowder, KNO.dust(), Items.sugar });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ball_dynamite, 2), new Object[] { KNO.dust(), Items.sugar, Blocks.sand, KEY_TOOL_CHEMISTRYSET });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ball_tnt, 4), new Object[] { new ItemStack(ModItems.fluid_tank_full, 1, Fluids.AROMATICS.getID()), KNO.dust(), KEY_TOOL_CHEMISTRYSET });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ball_tnt, 4), new Object[] { Fluids.AROMATICS.getDict(1000), KNO.dust(), KEY_TOOL_CHEMISTRYSET });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ingot_steel_dusted, 1), new Object[] { STEEL.ingot(), COAL.dust() });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.powder_bakelite, 2), new Object[] { new ItemStack(ModItems.fluid_tank_full, 1, Fluids.AROMATICS.getID()), new ItemStack(ModItems.fluid_tank_full, 1, Fluids.PETROLEUM.getID()), KEY_TOOL_CHEMISTRYSET });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.powder_bakelite, 2), new Object[] { Fluids.AROMATICS.getDict(1000), Fluids.PETROLEUM.getDict(1000), KEY_TOOL_CHEMISTRYSET });
//Gunpowder
CraftingManager.addShapelessAuto(new ItemStack(Items.gunpowder, 3), new Object[] { S.dust(), KNO.dust(), COAL.gem() });

View File

@ -10,6 +10,7 @@ import com.hbm.items.ModItems;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
public class FluidContainerRegistry {
@ -95,6 +96,7 @@ public class FluidContainerRegistry {
public static void registerContainer(FluidContainer con) {
allContainers.add(con);
OreDictionary.registerOre(con.type.getDict(con.content), con.fullContainer);
}
public static int getFluidContent(ItemStack stack, FluidType type) {

View File

@ -63,6 +63,10 @@ public class OreDictManager {
public static final String KEY_CRACK_TAR = "cracktar";
public static final String KEY_COAL_TAR = "coaltar";
public static final String KEY_UNIVERSAL_TANK = "ntmuniversaltank";
public static final String KEY_HAZARD_TANK = "ntmuhazardtank";
public static final String KEY_UNIVERSAL_BARREL = "ntmuniversalbarrel";
public static final String KEY_TOOL_SCREWDRIVER = "ntmscrewdriver";
public static final String KEY_TOOL_HANDDRILL = "ntmhanddrill";
public static final String KEY_TOOL_CHEMISTRYSET = "ntmchemistryset";
@ -385,6 +389,10 @@ public class OreDictManager {
OreDictionary.registerOre(KEY_CRACK_TAR, fromOne(oil_tar, EnumTarType.CRACK));
OreDictionary.registerOre(KEY_COAL_TAR, fromOne(oil_tar, EnumTarType.COAL));
OreDictionary.registerOre(KEY_UNIVERSAL_TANK, new ItemStack(fluid_tank_full, 1, OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre(KEY_HAZARD_TANK, new ItemStack(fluid_tank_lead_full, 1, OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre(KEY_UNIVERSAL_BARREL, new ItemStack(fluid_barrel_full, 1, OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre(KEY_TOOL_SCREWDRIVER, new ItemStack(screwdriver, 1, OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre(KEY_TOOL_SCREWDRIVER, new ItemStack(screwdriver_desh, 1, OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre(KEY_TOOL_HANDDRILL, new ItemStack(hand_drill, 1, OreDictionary.WILDCARD_VALUE));

View File

@ -80,6 +80,9 @@ public class FluidType {
public String getUnlocalizedName() {
return this.unlocalized;
}
public String getDict(int quantity) {
return "container" + quantity + this.stringId.replace("_", "");
}
public boolean isHot() {
return this.temperature >= 100;

View File

@ -855,9 +855,7 @@ public class CraftingManager {
addRecipeAuto(new ItemStack(Items.name_tag), new Object[] { "SB ", "BPB", " BP", 'S', Items.string, 'B', ANY_TAR.any(), 'P', Items.paper });
addRecipeAuto(new ItemStack(ModItems.rag, 4), new Object[] { "SW", "WS", 'S', Items.string, 'W', Blocks.wool });
addShapelessAuto(new ItemStack(ModItems.solid_fuel, 10), new Object[] { ModItems.canister_heatingoil, KEY_TOOL_CHEMISTRYSET });
addShapelessAuto(new ItemStack(ModItems.solid_fuel, 10), new Object[] { new ItemStack(ModItems.fluid_tank_full, 1, Fluids.HEATINGOIL.getID()), KEY_TOOL_CHEMISTRYSET });
addShapelessAuto(new ItemStack(ModItems.solid_fuel, 10), new Object[] { new ItemStack(ModItems.fluid_tank_lead_full, 1, Fluids.HEATINGOIL.getID()), KEY_TOOL_CHEMISTRYSET });
addShapelessAuto(new ItemStack(ModItems.solid_fuel, 10), new Object[] { Fluids.HEATINGOIL.getDict(1000), KEY_TOOL_CHEMISTRYSET });
addRecipeAuto(new ItemStack(ModBlocks.machine_condenser), new Object[] { "SIS", "ICI", "SIS", 'S', STEEL.ingot(), 'I', IRON.plate(), 'C', ModItems.board_copper });