Merge remote-tracking branch 'remotes/origin/1.12' into 1.13-prep

# Conflicts:
#	build.gradle
#	src/main/java/techreborn/TechReborn.java
#	src/main/java/techreborn/blocks/BlockNuke.java
#	src/main/java/techreborn/blocks/BlockOre.java
#	src/main/java/techreborn/blocks/BlockRubberLog.java
#	src/main/java/techreborn/blocks/generator/BlockSolarPanel.java
#	src/main/java/techreborn/client/RegisterItemJsons.java
#	src/main/java/techreborn/client/container/builder/BuiltContainer.java
#	src/main/java/techreborn/client/container/builder/ContainerBuilder.java
#	src/main/java/techreborn/client/container/builder/ContainerPlayerInventoryBuilder.java
#	src/main/java/techreborn/client/container/builder/ContainerTileInventoryBuilder.java
#	src/main/java/techreborn/client/container/builder/slot/FilteredSlot.java
#	src/main/java/techreborn/client/container/builder/slot/SpriteSlot.java
#	src/main/java/techreborn/client/container/builder/slot/UpgradeSlot.java
#	src/main/java/techreborn/client/gui/GuiAESU.java
#	src/main/java/techreborn/client/gui/GuiAlloySmelter.java
#	src/main/java/techreborn/client/gui/GuiAssemblingMachine.java
#	src/main/java/techreborn/client/gui/GuiBase.java
#	src/main/java/techreborn/client/gui/GuiBlastFurnace.java
#	src/main/java/techreborn/client/gui/GuiChemicalReactor.java
#	src/main/java/techreborn/client/gui/GuiCompressor.java
#	src/main/java/techreborn/client/gui/GuiDieselGenerator.java
#	src/main/java/techreborn/client/gui/GuiDigitalChest.java
#	src/main/java/techreborn/client/gui/GuiDistillationTower.java
#	src/main/java/techreborn/client/gui/GuiElectricFurnace.java
#	src/main/java/techreborn/client/gui/GuiExtractor.java
#	src/main/java/techreborn/client/gui/GuiFluidReplicator.java
#	src/main/java/techreborn/client/gui/GuiFusionReactor.java
#	src/main/java/techreborn/client/gui/GuiGasTurbine.java
#	src/main/java/techreborn/client/gui/GuiGenerator.java
#	src/main/java/techreborn/client/gui/GuiGrinder.java
#	src/main/java/techreborn/client/gui/GuiImplosionCompressor.java
#	src/main/java/techreborn/client/gui/GuiIndustrialElectrolyzer.java
#	src/main/java/techreborn/client/gui/GuiIndustrialGrinder.java
#	src/main/java/techreborn/client/gui/GuiIndustrialSawmill.java
#	src/main/java/techreborn/client/gui/GuiIronFurnace.java
#	src/main/java/techreborn/client/gui/GuiManual.java
#	src/main/java/techreborn/client/gui/GuiQuantumChest.java
#	src/main/java/techreborn/client/gui/GuiRecycler.java
#	src/main/java/techreborn/client/gui/GuiScrapboxinator.java
#	src/main/java/techreborn/client/gui/GuiSemifluidGenerator.java
#	src/main/java/techreborn/client/gui/GuiThermalGenerator.java
#	src/main/java/techreborn/client/gui/GuiVacuumFreezer.java
#	src/main/java/techreborn/client/gui/TRBuilder.java
#	src/main/java/techreborn/client/gui/slot/GuiFluidConfiguration.java
#	src/main/java/techreborn/client/gui/slot/GuiSlotConfiguration.java
#	src/main/java/techreborn/client/gui/slot/elements/CheckBoxElement.java
#	src/main/java/techreborn/client/gui/slot/elements/ConfigSlotElement.java
#	src/main/java/techreborn/client/gui/slot/elements/ElementBase.java
#	src/main/java/techreborn/client/gui/slot/elements/FluidConfigPopupElement.java
#	src/main/java/techreborn/client/gui/slot/elements/ISprite.java
#	src/main/java/techreborn/client/gui/slot/elements/OffsetSprite.java
#	src/main/java/techreborn/client/gui/slot/elements/SlotConfigPopupElement.java
#	src/main/java/techreborn/client/gui/slot/elements/Sprite.java
#	src/main/java/techreborn/compat/CompatManager.java
#	src/main/java/techreborn/compat/ICompatModule.java
#	src/main/java/techreborn/compat/jei/BaseRecipeWrapper.java
#	src/main/java/techreborn/compat/jei/BuiltContainerTransferInfo.java
#	src/main/java/techreborn/compat/jei/RecipeUtil.java
#	src/main/java/techreborn/compat/jei/TechRebornJeiPlugin.java
#	src/main/java/techreborn/compat/jei/alloySmelter/AlloySmelterRecipeWrapper.java
#	src/main/java/techreborn/compat/jei/assemblingMachine/AssemblingMachineRecipeCategory.java
#	src/main/java/techreborn/compat/jei/assemblingMachine/AssemblingMachineRecipeWrapper.java
#	src/main/java/techreborn/compat/jei/blastFurnace/BlastFurnaceRecipeWrapper.java
#	src/main/java/techreborn/compat/jei/centrifuge/CentrifugeRecipeWrapper.java
#	src/main/java/techreborn/compat/jei/chemicalReactor/ChemicalReactorRecipeWrapper.java
#	src/main/java/techreborn/compat/jei/compressor/CompressorRecipeWrapper.java
#	src/main/java/techreborn/compat/jei/distillationTower/DistillationTowerRecipeWrapper.java
#	src/main/java/techreborn/compat/jei/extractor/ExtractorRecipeWrapper.java
#	src/main/java/techreborn/compat/jei/fluidReplicator/FluidReplicatorRecipeWrapper.java
#	src/main/java/techreborn/compat/jei/fusionReactor/FusionReactorRecipeCategory.java
#	src/main/java/techreborn/compat/jei/fusionReactor/FusionReactorRecipeWrapper.java
#	src/main/java/techreborn/compat/jei/generators/fluid/FluidGeneratorRecipeWrapper.java
#	src/main/java/techreborn/compat/jei/grinder/GrinderRecipeWrapper.java
#	src/main/java/techreborn/compat/jei/implosionCompressor/ImplosionCompressorRecipeWrapper.java
#	src/main/java/techreborn/compat/jei/industrialGrinder/IndustrialGrinderRecipeWrapper.java
#	src/main/java/techreborn/compat/jei/industrialSawmill/IndustrialSawmillRecipeWrapper.java
#	src/main/java/techreborn/compat/jei/rollingMachine/RollingMachineRecipeCategory.java
#	src/main/java/techreborn/compat/jei/scrapbox/ScrapboxRecipeCategory.java
#	src/main/java/techreborn/compat/jei/vacuumFreezer/VacuumFreezerRecipeWrapper.java
#	src/main/java/techreborn/events/BlockBreakHandler.java
#	src/main/java/techreborn/events/StackToolTipEvent.java
#	src/main/java/techreborn/init/IC2Duplicates.java
#	src/main/java/techreborn/init/ModItems.java
#	src/main/java/techreborn/init/ModRecipes.java
#	src/main/java/techreborn/init/OreDict.java
#	src/main/java/techreborn/init/recipes/AlloySmelterRecipes.java
#	src/main/java/techreborn/init/recipes/ChemicalReactorRecipes.java
#	src/main/java/techreborn/init/recipes/CraftingTableRecipes.java
#	src/main/java/techreborn/init/recipes/FusionReactorRecipes.java
#	src/main/java/techreborn/init/recipes/IndustrialCentrifugeRecipes.java
#	src/main/java/techreborn/init/recipes/IndustrialSawmillRecipes.java
#	src/main/java/techreborn/init/recipes/RollingMachineRecipes.java
#	src/main/java/techreborn/init/recipes/ScrapboxRecipes.java
#	src/main/java/techreborn/items/ItemDestructopack.java
#	src/main/java/techreborn/items/ItemFrequencyTransmitter.java
#	src/main/java/techreborn/items/ItemManual.java
#	src/main/java/techreborn/items/ItemMissingRecipe.java
#	src/main/java/techreborn/items/ItemScrapBox.java
#	src/main/java/techreborn/items/ItemTechManual.java
#	src/main/java/techreborn/items/ItemUUmatter.java
#	src/main/java/techreborn/items/ItemUpgrade.java
#	src/main/java/techreborn/items/ItemUpgrades.java
#	src/main/java/techreborn/items/armor/ItemCloakingDevice.java
#	src/main/java/techreborn/items/ingredients/ItemDusts.java
#	src/main/java/techreborn/items/ingredients/ItemDustsSmall.java
#	src/main/java/techreborn/items/ingredients/ItemGems.java
#	src/main/java/techreborn/items/ingredients/ItemIngots.java
#	src/main/java/techreborn/items/ingredients/ItemNuggets.java
#	src/main/java/techreborn/items/ingredients/ItemParts.java
#	src/main/java/techreborn/items/ingredients/ItemPlates.java
#	src/main/java/techreborn/items/ingredients/ItemUUmatter.java
#	src/main/java/techreborn/items/tool/ItemDebugTool.java
#	src/main/java/techreborn/items/tool/ItemTreeTap.java
#	src/main/java/techreborn/items/tool/basic/ItemElectricTreetap.java
#	src/main/java/techreborn/items/tools/ItemTechManual.java
#	src/main/java/techreborn/items/tools/ItemTreeTap.java
#	src/main/java/techreborn/items/tools/ItemWrench.java
#	src/main/java/techreborn/lib/ModInfo.java
#	src/main/java/techreborn/proxies/ClientProxy.java
#	src/main/java/techreborn/tiles/TileChargeOMat.java
#	src/main/java/techreborn/tiles/TileChunkLoader.java
#	src/main/java/techreborn/tiles/TileDigitalChest.java
#	src/main/java/techreborn/tiles/TileIndustrialCentrifuge.java
#	src/main/java/techreborn/tiles/TileMatterFabricator.java
#	src/main/java/techreborn/tiles/TileQuantumChest.java
#	src/main/java/techreborn/tiles/TileQuantumTank.java
#	src/main/java/techreborn/tiles/cable/TileCable.java
#	src/main/java/techreborn/tiles/fusionReactor/TileFusionControlComputer.java
#	src/main/java/techreborn/tiles/generator/TileCreativeSolarPanel.java
#	src/main/java/techreborn/tiles/generator/TilePlasmaGenerator.java
#	src/main/java/techreborn/tiles/generator/advanced/TileDieselGenerator.java
#	src/main/java/techreborn/tiles/generator/advanced/TileGasTurbine.java
#	src/main/java/techreborn/tiles/generator/advanced/TileSemiFluidGenerator.java
#	src/main/java/techreborn/tiles/generator/advanced/TileThermalGenerator.java
#	src/main/java/techreborn/tiles/generator/basic/TileSolidFuelGenerator.java
#	src/main/java/techreborn/tiles/machine/iron/TileIronAlloyFurnace.java
#	src/main/java/techreborn/tiles/machine/multiblock/TileDistillationTower.java
#	src/main/java/techreborn/tiles/machine/multiblock/TileFluidReplicator.java
#	src/main/java/techreborn/tiles/machine/multiblock/TileImplosionCompressor.java
#	src/main/java/techreborn/tiles/machine/multiblock/TileIndustrialBlastFurnace.java
#	src/main/java/techreborn/tiles/machine/multiblock/TileIndustrialGrinder.java
#	src/main/java/techreborn/tiles/machine/multiblock/TileIndustrialSawmill.java
#	src/main/java/techreborn/tiles/machine/multiblock/TileVacuumFreezer.java
#	src/main/java/techreborn/tiles/machine/tier1/TileAlloySmelter.java
#	src/main/java/techreborn/tiles/machine/tier1/TileAssemblingMachine.java
#	src/main/java/techreborn/tiles/machine/tier1/TileAutoCraftingTable.java
#	src/main/java/techreborn/tiles/machine/tier1/TileChemicalReactor.java
#	src/main/java/techreborn/tiles/machine/tier1/TileCompressor.java
#	src/main/java/techreborn/tiles/machine/tier1/TileElectricFurnace.java
#	src/main/java/techreborn/tiles/machine/tier1/TileExtractor.java
#	src/main/java/techreborn/tiles/machine/tier1/TileGrinder.java
#	src/main/java/techreborn/tiles/machine/tier1/TileIndustrialElectrolyzer.java
#	src/main/java/techreborn/tiles/machine/tier1/TileRecycler.java
#	src/main/java/techreborn/tiles/machine/tier1/TileRollingMachine.java
#	src/main/java/techreborn/tiles/machine/tier1/TileScrapboxinator.java
#	src/main/java/techreborn/tiles/storage/TileAdjustableSU.java
#	src/main/java/techreborn/tiles/storage/TileEnergyStorage.java
#	src/main/java/techreborn/tiles/storage/TileHighVoltageSU.java
#	src/main/java/techreborn/tiles/storage/TileLowVoltageSU.java
#	src/main/java/techreborn/tiles/storage/TileMediumVoltageSU.java
#	src/main/java/techreborn/tiles/storage/idsu/TileInterdimensionalSU.java
#	src/main/java/techreborn/tiles/storage/lesu/TileLapotronicSU.java
#	src/main/java/techreborn/utils/StackWIPHandler.java
#	src/main/java/techreborn/world/TechRebornRetroGen.java
#	src/main/resources/assets/techreborn/textures/items/armor/lithium_batpack.png
This commit is contained in:
modmuss50 2018-12-26 16:08:04 +00:00
commit 4440c2f305
148 changed files with 1016 additions and 5344 deletions

View file

@ -43,6 +43,11 @@ import techreborn.api.recipe.machines.VacuumFreezerRecipe;
import techreborn.config.ConfigTechReborn;
import techreborn.init.recipes.*;
import techreborn.items.*;
import techreborn.items.ingredients.ItemDusts;
import techreborn.items.ingredients.ItemDustsSmall;
import techreborn.items.ingredients.ItemIngots;
import techreborn.items.ingredients.ItemPlates;
import techreborn.lib.ModInfo;
import java.util.Iterator;
import java.util.Map;
@ -125,7 +130,7 @@ public class ModRecipes {
// ItemPlates.getPlateByName("RedGarnet", 9), 300, 4));
// RecipeHandler.addRecipe(Reference.COMPRESSOR_RECIPE, new CompressorRecipe(OreUtil.getStackFromName("ingotRefinedIron", 1),
// ItemPlates.getPlateByName("RefinedIron"), 300, 4));
//
//
// ItemStack plate;
// for (String ore : OreUtil.oreNames) {
// if (ore.equals("iridium")) {
@ -138,7 +143,7 @@ public class ModRecipes {
// plate = OreUtil.getStackFromName("plate" + OreUtil.capitalizeFirstLetter(ore), 1);
// }
// if (plate.isEmpty()) {
// continue;
// continue;
// }
// if (OreUtil.hasIngot(ore)) {
// RecipeHandler.addRecipe(Reference.COMPRESSOR_RECIPE, new CompressorRecipe(
@ -202,7 +207,7 @@ public class ModRecipes {
// new ItemStack(Blocks.NETHERRACK),
// ItemDusts.getDustByName("netherrack"),
// 300, 27));
//
//
// RecipeHandler.addRecipe(Reference.GRINDER_RECIPE, new GrinderRecipe(
// new ItemStack(Blocks.END_STONE),
// ItemDusts.getDustByName("endstone"),
@ -237,14 +242,14 @@ public class ModRecipes {
// ItemStack marbleStack = getOre("stoneMarble");
// marbleStack.setCount(1);
// RecipeHandler.addRecipe(Reference.GRINDER_RECIPE, new GrinderRecipe(
// marbleStack, ItemDusts.getDustByName("marble"),
// marbleStack, ItemDusts.getDustByName("marble"),
// 120, 10));
}
if (OreUtil.doesOreExistAndValid("stoneBasalt")) {
// ItemStack marbleStack = getOre("stoneBasalt");
// marbleStack.setCount(1);
// RecipeHandler.addRecipe(Reference.GRINDER_RECIPE, new GrinderRecipe(
// marbleStack, ItemDusts.getDustByName("basalt"),
// marbleStack, ItemDusts.getDustByName("basalt"),
// 120, 10));
}

View file

@ -31,6 +31,7 @@ import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import reborncore.common.util.OreUtil;
import reborncore.common.util.StringUtils;
import techreborn.api.TechRebornAPI;
import techreborn.init.TRContent.Dusts;
import techreborn.init.TRContent.Ores;
@ -46,6 +47,9 @@ public class OreDict {
* Register blocks and items
*/
public static void init() {
if(TechRebornAPI.ic2Helper != null){
TechRebornAPI.ic2Helper.initDuplicates();
}
// Blocks
OreUtil.registerOre("fenceIron", TRContent.REFINED_IRON_FENCE);
OreUtil.registerOre("woodRubber", TRContent.RUBBER_LOG);
@ -100,17 +104,17 @@ public class OreDict {
//OreUtil.registerOre("uran235", nothing);
//OreUtil.registerOre("uran238", nothing);
//OreUtil.registerOre("smallUran235", nothing);
for (Ores ore : TRContent.Ores.values()) {
OreUtil.registerOre("ore" + StringUtils.toFirstCapital(ore.name), new ItemStack(ore.block));
}
for (Dusts dust : TRContent.Dusts.values()) {
OreUtil.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "dust_" + dust.name), dust.getStack());
}
// OreUtil.registerOre("blockSilver", BlockStorage.getStorageBlockByName("silver"));
// OreUtil.registerOre("blockAluminum", BlockStorage.getStorageBlockByName("aluminum"));
// OreUtil.registerOre("blockAluminium", BlockStorage.getStorageBlockByName("aluminum"));

View file

@ -27,6 +27,13 @@ package techreborn.init;
import net.minecraft.item.ItemStack;
import techreborn.api.ISubItemRetriever;
import techreborn.items.*;
import techreborn.items.ingredients.ItemDusts;
import techreborn.items.ingredients.ItemDustsSmall;
import techreborn.items.ingredients.ItemGems;
import techreborn.items.ingredients.ItemIngots;
import techreborn.items.ingredients.ItemNuggets;
import techreborn.items.ingredients.ItemParts;
import techreborn.items.ingredients.ItemPlates;
/**
* Created by Mark on 03/04/2016.

View file

@ -28,6 +28,7 @@ import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import reborncore.api.recipe.RecipeHandler;
import reborncore.common.recipes.OreRecipeInput;
import reborncore.common.util.OreUtil;
import techreborn.api.Reference;
import techreborn.api.recipe.machines.AlloySmelterRecipe;
@ -39,64 +40,68 @@ import techreborn.api.recipe.machines.AlloySmelterRecipe;
public class AlloySmelterRecipes extends RecipeMethods {
public static void init() {
// Bronze
// TODO: Fix Recipe
// RecipeHandler.addRecipe(Reference.ALLOY_SMELTER_RECIPE,
// new AlloySmelterRecipe(ItemIngots.getIngotByName("copper", 3), ItemIngots.getIngotByName("tin", 1),
// ItemIngots.getIngotByName("bronze", 4), 200, 16));
// RecipeHandler.addRecipe(Reference.ALLOY_SMELTER_RECIPE,
// new AlloySmelterRecipe(ItemIngots.getIngotByName("copper", 3), ItemDusts.getDustByName("tin", 1),
// ItemIngots.getIngotByName("bronze", 4), 200, 16));
// RecipeHandler.addRecipe(Reference.ALLOY_SMELTER_RECIPE,
// new AlloySmelterRecipe(ItemDusts.getDustByName("copper", 3), ItemIngots.getIngotByName("tin", 1),
// ItemIngots.getIngotByName("bronze", 4), 200, 16));
// RecipeHandler.addRecipe(Reference.ALLOY_SMELTER_RECIPE,
// new AlloySmelterRecipe(ItemDusts.getDustByName("copper", 3), ItemDusts.getDustByName("tin", 1),
// ItemIngots.getIngotByName("bronze", 4), 200, 16));
// Electrum
// RecipeHandler.addRecipe(Reference.ALLOY_SMELTER_RECIPE,
// new AlloySmelterRecipe(new ItemStack(Items.GOLD_INGOT, 1), ItemIngots.getIngotByName("silver", 1),
// ItemIngots.getIngotByName("electrum", 2), 200, 16));
// RecipeHandler.addRecipe(Reference.ALLOY_SMELTER_RECIPE,
// new AlloySmelterRecipe(new ItemStack(Items.GOLD_INGOT, 1), ItemDusts.getDustByName("silver", 1),
// ItemIngots.getIngotByName("electrum", 2), 200, 16));
// RecipeHandler.addRecipe(Reference.ALLOY_SMELTER_RECIPE,
// new AlloySmelterRecipe(ItemDusts.getDustByName("gold", 1), ItemIngots.getIngotByName("silver", 1),
// ItemIngots.getIngotByName("electrum", 2), 200, 16));
// RecipeHandler.addRecipe(Reference.ALLOY_SMELTER_RECIPE,
// new AlloySmelterRecipe(ItemDusts.getDustByName("gold", 1), ItemDusts.getDustByName("silver", 1),
// ItemIngots.getIngotByName("electrum", 2), 200, 16));
OreRecipeInput ingotCopper3 = new OreRecipeInput("ingotCopper", 3);
OreRecipeInput dustCopper3 = new OreRecipeInput("dustCopper", 3);
// Invar
// RecipeHandler.addRecipe(Reference.ALLOY_SMELTER_RECIPE,
// new AlloySmelterRecipe(new ItemStack(Items.IRON_INGOT, 2), ItemIngots.getIngotByName("nickel", 1),
// // Bronze
//// TODO: Fix Recipe
// RecipeHandler.addRecipe(
// new AlloySmelterRecipe(ingotCopper3, "ingotTin",
// ItemIngots.getIngotByName("bronze", 4), 200, 16));
// RecipeHandler.addRecipe(
// new AlloySmelterRecipe(ingotCopper3, "dustTin",
// ItemIngots.getIngotByName("bronze", 4), 200, 16));
// RecipeHandler.addRecipe(
// new AlloySmelterRecipe(dustCopper3, "ingotTin",
// ItemIngots.getIngotByName("bronze", 4), 200, 16));
// RecipeHandler.addRecipe(
// new AlloySmelterRecipe(dustCopper3, "dustTin",
// ItemIngots.getIngotByName("bronze", 4), 200, 16));
//
// // Electrum
// RecipeHandler.addRecipe(
// new AlloySmelterRecipe(new ItemStack(Items.GOLD_INGOT, 1), "ingotSilver",
// ItemIngots.getIngotByName("electrum", 2), 200, 16));
// RecipeHandler.addRecipe(
// new AlloySmelterRecipe(new ItemStack(Items.GOLD_INGOT, 1), "dustSilver",
// ItemIngots.getIngotByName("electrum", 2), 200, 16));
// RecipeHandler.addRecipe(
// new AlloySmelterRecipe("dustGold", "ingotSilver",
// ItemIngots.getIngotByName("electrum", 2), 200, 16));
// RecipeHandler.addRecipe(
// new AlloySmelterRecipe("dustGold", "dustSilver",
// ItemIngots.getIngotByName("electrum", 2), 200, 16));
//
// // Invar
// RecipeHandler.addRecipe(
// new AlloySmelterRecipe(new ItemStack(Items.IRON_INGOT, 2), "ingotNickel",
// ItemIngots.getIngotByName("invar", 3), 200, 16));
// RecipeHandler.addRecipe(Reference.ALLOY_SMELTER_RECIPE,
// new AlloySmelterRecipe(new ItemStack(Items.IRON_INGOT, 2), ItemDusts.getDustByName("nickel", 1),
// RecipeHandler.addRecipe(
// new AlloySmelterRecipe(new ItemStack(Items.IRON_INGOT, 2), "dustNickel",
// ItemIngots.getIngotByName("invar", 3), 200, 16));
// RecipeHandler.addRecipe(Reference.ALLOY_SMELTER_RECIPE,
// new AlloySmelterRecipe(ItemDusts.getDustByName("iron", 2), ItemIngots.getIngotByName("nickel", 1),
// RecipeHandler.addRecipe(
// new AlloySmelterRecipe(new OreRecipeInput("dustIron", 2), "ingotNickel",
// ItemIngots.getIngotByName("invar", 3), 200, 16));
// RecipeHandler.addRecipe(Reference.ALLOY_SMELTER_RECIPE,
// new AlloySmelterRecipe(ItemDusts.getDustByName("iron", 2), ItemDusts.getDustByName("nickel", 1),
// RecipeHandler.addRecipe(
// new AlloySmelterRecipe(new OreRecipeInput("dustIron", 2), "dustNickel",
// ItemIngots.getIngotByName("invar", 3), 200, 16));
// Brass
//
// // Brass
// if (OreUtil.doesOreExistAndValid("ingotBrass")) {
// ItemStack brassStack = getOre("ingotBrass");
// brassStack.setCount(4);
// RecipeHandler.addRecipe(Reference.ALLOY_SMELTER_RECIPE,
// new AlloySmelterRecipe(ItemIngots.getIngotByName("copper", 3), ItemIngots.getIngotByName("zinc", 1),
// RecipeHandler.addRecipe(
// new AlloySmelterRecipe(ingotCopper3, "ingotZinc",
// brassStack, 200, 16));
// RecipeHandler.addRecipe(Reference.ALLOY_SMELTER_RECIPE,
// new AlloySmelterRecipe(ItemIngots.getIngotByName("copper", 3), ItemDusts.getDustByName("zinc", 1),
// RecipeHandler.addRecipe(
// new AlloySmelterRecipe(ingotCopper3, "dustZinc",
// brassStack, 200, 16));
// RecipeHandler.addRecipe(Reference.ALLOY_SMELTER_RECIPE,
// new AlloySmelterRecipe(ItemDusts.getDustByName("copper", 3), ItemIngots.getIngotByName("zinc", 1),
// RecipeHandler.addRecipe(
// new AlloySmelterRecipe(dustCopper3, "ingotZinc",
// brassStack, 200, 16));
// RecipeHandler.addRecipe(Reference.ALLOY_SMELTER_RECIPE,
// new AlloySmelterRecipe(ItemDusts.getDustByName("copper", 3), ItemDusts.getDustByName("zinc", 1),
// RecipeHandler.addRecipe(
// new AlloySmelterRecipe(dustCopper3, "dustZinc",
// brassStack, 200, 16));
// }
@ -164,7 +169,7 @@ public class AlloySmelterRecipes extends RecipeMethods {
if (OreUtil.doesOreExistAndValid("ingotConductiveIron")) {
ItemStack conductiveIronStack = getOre("ingotConductiveIron");
conductiveIronStack.setCount(1);
RecipeHandler.addRecipe(Reference.ALLOY_SMELTER_RECIPE,
RecipeHandler.addRecipe(Reference.ALLOY_SMELTER_RECIPE,
new AlloySmelterRecipe(new ItemStack(Items.REDSTONE, 1), new ItemStack(Items.IRON_INGOT, 1),
conductiveIronStack, 200, 16));
}

View file

@ -57,13 +57,14 @@ public class ChemicalReactorRecipes extends RecipeMethods {
register(getMaterial("compressedair", Type.CELL), getMaterial("hydrogen", 2, Type.CELL), getMaterial("water", Type.CELL), 400);
register(getMaterial("compressedair", 2, Type.CELL), getMaterial("nitrogen", Type.CELL), getMaterial("nitrogenDioxide", Type.CELL), 400);
register(getMaterial("oil", Type.CELL), getMaterial("nitrogen", Type.CELL), getMaterial("nitrofuel", 2, Type.CELL), 800);
}
static void register(ItemStack in1, ItemStack in2, ItemStack out, int tickTime, int euPerTick){
public static void register(ItemStack in1, ItemStack in2, ItemStack out, int tickTime, int euPerTick){
RecipeHandler.addRecipe(Reference.CHEMICAL_REACTOR_RECIPE, new ChemicalReactorRecipe(in1, in2, out, tickTime, euPerTick));
}
static void register (ItemStack in1, ItemStack in2, ItemStack out, int tickTime){
public static void register (ItemStack in1, ItemStack in2, ItemStack out, int tickTime){
register(in1, in2, out, tickTime, 30);
}

View file

@ -45,7 +45,7 @@ public class IndustrialCentrifugeRecipes extends RecipeMethods {
register(getStack(Blocks.MYCELIUM, 8), 1640, getStack(Blocks.SAND, 4), getStack(Items.CLAY_BALL), getStack(Blocks.BROWN_MUSHROOM, 2), getStack(Blocks.RED_MUSHROOM, 2));
register(getStack(Items.GOLDEN_APPLE), 5000, getStack(Items.GOLD_INGOT, 6), getMaterial("methane", Type.CELL));
register(getStack(Items.GOLDEN_APPLE, 1, 1), 5000, getStack(Items.GOLD_INGOT, 64), getMaterial("methane", Type.CELL));
// TODO: Fix recipe
// TODO: Fix recipe
// register(getStack(Items.GOLDEN_CARROT), 5000, getStack(Items.GOLD_NUGGET, 6), getMaterial("methane", Type.CELL));
// register(getStack(Items.SPECKLED_MELON, 8), 5000, getStack(Items.GOLD_NUGGET, 6), getMaterial("methane", Type.CELL));
register(getStack(Items.APPLE, 32), 5000, getMaterial("methane", Type.CELL));
@ -79,7 +79,7 @@ public class IndustrialCentrifugeRecipes extends RecipeMethods {
register(getStack(Blocks.RED_MUSHROOM, 32), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.NETHER_WART, 32), 5000, getMaterial("methane", Type.CELL));
// register(getMaterial("sap", 4, Type.PART), 1300, getMaterial("rubber", 14, Type.PART));
// register(getStack(ModBlocks.RUBBER_LOG, 16), 5000, false, getMaterial("sap", 8, Type.PART), getMaterial("methane", Type.CELL), getMaterial("carbon", 4, Type.CELL));
// register(getStack(ModBlocks.RUBBER_LOG, 16), 5000, false, getMaterial("sap", 8, Type.PART), getMaterial("methane", Type.CELL), getMaterial("carbon", 4, Type.CELL));
// register(getStack(Blocks.SOUL_SAND, 16), 2500, getStack(Blocks.SAND, 10), getMaterial("saltpeter", 4, Type.DUST), getMaterial("coal", Type.DUST), getMaterial("oil", Type.CELL));
// register(getOre("dustBronze"), 1500, getMaterial("copper", 6, Type.SMALL_DUST), getMaterial("tin", 2, Type.SMALL_DUST));
// register(getOre("dustIron", 2), 1500, getMaterial("tin", Type.SMALL_DUST), getMaterial("nickel", Type.SMALL_DUST));

View file

@ -1,134 +1,134 @@
/*
* This file is part of TechReborn, licensed under the MIT License (MIT).
*
* Copyright (c) 2018 TechReborn
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package techreborn.init.recipes;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.IRecipe;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.oredict.OreDictionary;
import reborncore.api.recipe.RecipeHandler;
import reborncore.common.registration.RebornRegister;
import reborncore.common.registration.impl.ConfigRegistry;
import reborncore.common.util.ItemUtils;
import techreborn.TechReborn;
import techreborn.api.Reference;
import techreborn.api.recipe.machines.IndustrialSawmillRecipe;
import techreborn.init.TRContent;
import javax.annotation.Nonnull;
import java.security.InvalidParameterException;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
@RebornRegister(modID = TechReborn.MOD_ID)
public class IndustrialSawmillRecipes extends RecipeMethods {
static FluidStack WATER = new FluidStack(FluidRegistry.WATER, 1000);
@ConfigRegistry(config = "recipes", category = "sawmill", key = "plankCount", comment = "Number of planks the saw mill will ouput")
public static int plankCount = 4;
@ConfigRegistry(config = "recipes", category = "sawmill", key = "disableRecipes", comment = "Set to true to disable sawmill recipes from loading.")
public static boolean disableRecipes = false;
public static void init() {
if(disableRecipes){
return;
}
InventoryCrafting inventoryCrafting = new InventoryCrafting(new Container() {
@Override
public boolean canInteractWith(EntityPlayer playerIn) {
return false;
}
}, 1, 1);
inventoryCrafting.setInventorySlotContents(0, ItemStack.EMPTY);
List<ItemStack> logs = OreDictionary.getOres("logWood").stream()
.filter(Objects::nonNull)
.map(ItemStack::copy)
.collect(Collectors.toList());
for (ItemStack logStack : logs) {
if (logStack.getItemDamage() == OreDictionary.WILDCARD_VALUE && logStack.getHasSubtypes()) {
for (int i = 0; i < 16; i++) {
ItemStack newStack = logStack.copy();
newStack.setItemDamage(i);
inventoryCrafting.setInventorySlotContents(0, newStack);
ItemStack output = findMatchingRecipe(inventoryCrafting);
if (!output.isEmpty()) {
if (ItemUtils.isInputEqual("plankWood", output, false, false, false)) {
addRecipe(newStack.copy(), output.copy());
}
}
}
} else {
logStack.setItemDamage(0); //Done to remove the wildcard value if the item doesnt have subtypes
inventoryCrafting.setInventorySlotContents(0, logStack.copy());
ItemStack output = findMatchingRecipe(inventoryCrafting);
if (!output.isEmpty()) {
if (ItemUtils.isInputEqual("plankWood", output, false, false, false)) {
addRecipe(logStack.copy(), output.copy());
}
}
}
}
}
@Nonnull
public static ItemStack findMatchingRecipe(InventoryCrafting inv) {
for (IRecipe recipe : CraftingManager.REGISTRY) {
if (recipe.canFit(1, 1) && recipe.matches(inv, null)) {
return recipe.getCraftingResult(inv);
}
}
return ItemStack.EMPTY;
}
public static void addRecipe(ItemStack log, ItemStack plank) {
plank.setCount(plankCount);
register(log, WATER, 100, 128, plank, TRContent.Dusts.SAW.getStack(3), getStack(Items.PAPER, 1));
}
static void register(ItemStack input1, FluidStack fluid, int ticks, int euPerTick, ItemStack... outputs) {
if (outputs.length == 3) {
RecipeHandler.addRecipe(Reference.INDUSTRIAL_SAWMILL_RECIPE, new IndustrialSawmillRecipe(input1, fluid, outputs[0], outputs[1], outputs[2], ticks, euPerTick, false));
} else if (outputs.length == 2) {
RecipeHandler.addRecipe(Reference.INDUSTRIAL_SAWMILL_RECIPE, new IndustrialSawmillRecipe(input1, fluid, outputs[0], outputs[1], null, ticks, euPerTick, false));
} else if (outputs.length == 1) {
RecipeHandler.addRecipe(Reference.INDUSTRIAL_SAWMILL_RECIPE, new IndustrialSawmillRecipe(input1, fluid, outputs[0], null, null, ticks, euPerTick, false));
} else {
throw new InvalidParameterException("Invalid industrial sawmill outputs: " + outputs);
}
}
}
/*
* This file is part of TechReborn, licensed under the MIT License (MIT).
*
* Copyright (c) 2018 TechReborn
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package techreborn.init.recipes;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.IRecipe;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.oredict.OreDictionary;
import reborncore.api.recipe.RecipeHandler;
import reborncore.common.registration.RebornRegister;
import reborncore.common.registration.impl.ConfigRegistry;
import reborncore.common.util.ItemUtils;
import techreborn.TechReborn;
import techreborn.api.Reference;
import techreborn.api.recipe.machines.IndustrialSawmillRecipe;
import techreborn.init.TRContent;
import javax.annotation.Nonnull;
import java.security.InvalidParameterException;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
@RebornRegister(modID = TechReborn.MOD_ID)
public class IndustrialSawmillRecipes extends RecipeMethods {
static FluidStack WATER = new FluidStack(FluidRegistry.WATER, 1000);
@ConfigRegistry(config = "recipes", category = "sawmill", key = "plankCount", comment = "Number of planks the saw mill will ouput")
public static int plankCount = 4;
@ConfigRegistry(config = "recipes", category = "sawmill", key = "disableRecipes", comment = "Set to true to disable sawmill recipes from loading.")
public static boolean disableRecipes = false;
public static void init() {
if(disableRecipes){
return;
}
InventoryCrafting inventoryCrafting = new InventoryCrafting(new Container() {
@Override
public boolean canInteractWith(EntityPlayer playerIn) {
return false;
}
}, 1, 1);
inventoryCrafting.setInventorySlotContents(0, ItemStack.EMPTY);
List<ItemStack> logs = OreDictionary.getOres("logWood").stream()
.filter(Objects::nonNull)
.map(ItemStack::copy)
.collect(Collectors.toList());
for (ItemStack logStack : logs) {
if (logStack.getItemDamage() == OreDictionary.WILDCARD_VALUE && logStack.getHasSubtypes()) {
for (int i = 0; i < 16; i++) {
ItemStack newStack = logStack.copy();
newStack.setItemDamage(i);
inventoryCrafting.setInventorySlotContents(0, newStack);
ItemStack output = findMatchingRecipe(inventoryCrafting);
if (!output.isEmpty()) {
if (ItemUtils.isInputEqual("plankWood", output, false, false, false)) {
addRecipe(newStack.copy(), output.copy());
}
}
}
} else {
logStack.setItemDamage(0); //Done to remove the wildcard value if the item doesnt have subtypes
inventoryCrafting.setInventorySlotContents(0, logStack.copy());
ItemStack output = findMatchingRecipe(inventoryCrafting);
if (!output.isEmpty()) {
if (ItemUtils.isInputEqual("plankWood", output, false, false, false)) {
addRecipe(logStack.copy(), output.copy());
}
}
}
}
}
@Nonnull
public static ItemStack findMatchingRecipe(InventoryCrafting inv) {
for (IRecipe recipe : CraftingManager.REGISTRY) {
if (recipe.canFit(1, 1) && recipe.matches(inv, null)) {
return recipe.getCraftingResult(inv);
}
}
return ItemStack.EMPTY;
}
public static void addRecipe(ItemStack log, ItemStack plank) {
plank.setCount(plankCount);
register(log, WATER, 100, 128, plank, TRContent.Dusts.SAW.getStack(3), getStack(Items.PAPER, 1));
}
static void register(ItemStack input1, FluidStack fluid, int ticks, int euPerTick, ItemStack... outputs) {
if (outputs.length == 3) {
RecipeHandler.addRecipe(Reference.INDUSTRIAL_SAWMILL_RECIPE, new IndustrialSawmillRecipe(input1, fluid, outputs[0], outputs[1], outputs[2], ticks, euPerTick, false));
} else if (outputs.length == 2) {
RecipeHandler.addRecipe(Reference.INDUSTRIAL_SAWMILL_RECIPE, new IndustrialSawmillRecipe(input1, fluid, outputs[0], outputs[1], null, ticks, euPerTick, false));
} else if (outputs.length == 1) {
RecipeHandler.addRecipe(Reference.INDUSTRIAL_SAWMILL_RECIPE, new IndustrialSawmillRecipe(input1, fluid, outputs[0], null, null, ticks, euPerTick, false));
} else {
throw new InvalidParameterException("Invalid industrial sawmill outputs: " + outputs);
}
}
}

View file

@ -32,6 +32,13 @@ import net.minecraftforge.oredict.OreDictionary;
import reborncore.common.util.OreUtil;
import reborncore.common.util.StringUtils;
import techreborn.items.*;
import techreborn.items.ingredients.ItemDusts;
import techreborn.items.ingredients.ItemDustsSmall;
import techreborn.items.ingredients.ItemGems;
import techreborn.items.ingredients.ItemIngots;
import techreborn.items.ingredients.ItemNuggets;
import techreborn.items.ingredients.ItemParts;
import techreborn.items.ingredients.ItemPlates;
/**
* Created by Prospector