Merge remote-tracking branch 'origin/1.14' into 1.14

This commit is contained in:
Prospector 2019-07-30 15:26:22 -07:00
commit 07db922127
390 changed files with 7282 additions and 1001 deletions

View file

@ -121,7 +121,7 @@ public class TechReborn implements ModInitializer {
CommandRegistry.INSTANCE.register(false, dispatcher -> dispatcher.register(CommandManager.literal("recipe").executes(context -> {
try {
RecipeTemplate.generate(context.getSource().getPlayer());
RecipeTemplate.generateFromInv(context.getSource().getPlayer());
} catch (Exception e){
e.printStackTrace();
}

View file

@ -50,14 +50,8 @@ public class BlockOre extends Block {
public static int sodaliteMinQuatity = 1;
@ConfigRegistry(config = "misc", category = "blocks", key = "sodaliteMaxQuantity", comment = "Maximum quantity of Sodalite dust per Sodalite ore")
public static int sodaliteMaxQuantity = 2;
@ConfigRegistry(config = "misc", category = "blocks", key = "cinnabarMinQuatity", comment = "Minimum quantity of Cinnabar dust per Cinnabar ore")
public static int cinnabarMinQuatity = 1;
@ConfigRegistry(config = "misc", category = "blocks", key = "cinnabarMaxQuantity", comment = "Maximum quantity of Cinnabar dust per Cinnabar ore")
public static int cinnabarMaxQuantity = 2;
@ConfigRegistry(config = "misc", category = "blocks", key = "sphaleriteMinQuatity", comment = "Minimum quantity of Sphalerite dust per Sphalerite ore")
public static int sphaleriteMinQuatity = 1;
@ConfigRegistry(config = "misc", category = "blocks", key = "sphaleriteMaxQuantity", comment = "Maximum quantity of Sphalerite dust per Sphalerite ore")
public static int sphaleriteMaxQuantity = 2;
public BlockOre() {
super(FabricBlockSettings.of(Material.STONE).strength(2f, 2f).build());
@ -82,12 +76,8 @@ public class BlockOre extends Block {
// } else if (ore == TRContent.Ores.SODALITE.block) {
// OreDrop sodalite = new OreDrop(TRContent.Dusts.SODALITE.getStack(sodaliteMinQuatity), sodaliteMaxQuantity);
// drops.add(sodalite.getDrops(fortune, random));
// } else if (ore == TRContent.Ores.CINNABAR.block) {
// OreDrop cinnabar = new OreDrop(TRContent.Dusts.CINNABAR.getStack(cinnabarMinQuatity), cinnabarMaxQuantity);
// drops.add(cinnabar.getDrops(fortune, random));
// } else if (ore == TRContent.Ores.SPHALERITE.block) {
// OreDrop sphalerite = new OreDrop(TRContent.Dusts.SPHALERITE.getStack(sphaleriteMinQuatity), sphaleriteMaxQuantity);
// drops.add(sphalerite.getDrops(fortune, random));
// } else {
// drops.add(new ItemStack(this));
// }

View file

@ -41,8 +41,7 @@ public class BlockBreakHandler {
public static double aluminiumDropChance = 0.50;
@ConfigRegistry(config = "misc", category = "blocks", key = "redstoneDropChance", comment = "Chance to get Redstone from Cinnabar Ore")
public static double redstoneDropChance = 0.25;
@ConfigRegistry(config = "misc", category = "blocks", key = "yellowGarnetDropChance", comment = "Chance to get Yellow Garnet gem from Sphalerite Ore")
public static double yellowGarnetDropChance = 0.125;
//TODO 1.14
// @SubscribeEvent
@ -68,10 +67,7 @@ public class BlockBreakHandler {
// OreDrop redstone = new OreDrop(new ItemStack(Items.REDSTONE), redstoneDropChance, 1);
// drops.add(redstone.getDrops(event.getFortuneLevel(), random));
// }
// else if (state.getBlock().matches(new BlockTags.CachingTag(new Identifier(TechReborn.MOD_ID, "sphalerite_ore")))) {
// OreDrop yellowGarnet = new OreDrop(TRContent.Gems.YELLOW_GARNET.getStack(), yellowGarnetDropChance, 1);
// drops.add(yellowGarnet.getDrops(event.getFortuneLevel(), random));
// }
// }
// }
//

View file

@ -63,8 +63,6 @@ public class ModRecipes {
public static void init() {
//Gonna rescan to make sure we have an uptodate list
//OreUtil.scanForOres();
/*
@ -93,87 +91,5 @@ public class ModRecipes {
//IndustrialSawmillRecipes.init();
}
private static void addCompressorRecipes() {
// ItemStack plate;
// for (String ore : OreUtil.oreNames) {
// if (ore.equals("iridium")) {
// continue;
// }
// if (OreUtil.hasPlate(ore)) {
// try {
// plate = ItemPlates.getPlateByName(ore, 1);
// } catch (InvalidParameterException e) {
// plate = OreUtil.getStackFromName("plate" + OreUtil.capitalizeFirstLetter(ore), 1);
// }
// if (plate.isEmpty()) {
// continue;
// }
// if (OreUtil.hasIngot(ore)) {
// RecipeHandler.addRecipe(Reference.COMPRESSOR_RECIPE, new CompressorRecipe(
// OreUtil.getStackFromName("ingot" + OreUtil.capitalizeFirstLetter(ore), 1), plate, 300, 4));
// }
// if (OreUtil.hasGem(ore) && OreUtil.hasDust(ore)) {
// RecipeHandler.addRecipe(Reference.COMPRESSOR_RECIPE, new CompressorRecipe(
// OreUtil.getStackFromName("dust" + OreUtil.capitalizeFirstLetter(ore), 1), plate, 300, 4));
// }
// if (OreUtil.hasBlock(ore)) {
// ItemStack morePlates = plate.copy();
// morePlates.setCount(9);
// RecipeHandler.addRecipe(Reference.COMPRESSOR_RECIPE, new CompressorRecipe(
// OreUtil.getStackFromName("block" + OreUtil.capitalizeFirstLetter(ore), 1), morePlates, 300, 4));
// }
// }
// }
}
static void addGrinderRecipes() {
//See comments bellow, this allows the ore to go to the product when it sometimes goes straight to dust.
// for (String oreDictionaryName : OreDictionary.getOreNames()) {
// if (isDictPrefixed(oreDictionaryName, "ore", "gem", "ingot")) {
// ItemStack oreStack = getDictOreOrEmpty(oreDictionaryName, 1);
// String[] data = getDictData(oreDictionaryName);
//
// //High-level ores shouldn't grind here
// if (data[0].equals("ore") && (
// data[1].equals("tungsten") ||
// data[1].equals("titanium") ||
// data[1].equals("aluminium") ||
// data[1].equals("iridium") ||
// data[1].equals("saltpeter")||
// data[1].equals("coal") || //Done here to skip going to dust so it can go to the output
// data[1].equals("diamond") || //For example diamond ore should go to diamonds not the diamond dust
// data[1].equals("emerald") || //TODO possibly remove this and make it a bit more dyamic? (Check for furnace recipes? and then the block drop?)
// data[1].equals("redstone") ||
// data[1].equals("quartz")
// ) ||
// oreStack.isEmpty())
// continue;
//
// boolean ore = data[0].equals("ore");
// TechReborn.LOGGER.debug("Ore: " + data[1]);
// ItemStack dust = getDictOreOrEmpty(joinDictName("dust", data[1]), ore ? 2 : 1);
// if (dust.isEmpty() || dust.getItem() == null) {
// continue;
// }
// dust = dust.copy();
// if (ore) {
// dust.setCount(2);
// }
// boolean useOreDict = true;
// //Disables the ore dict for lapis, this is becuase it is oredict with dye. This may cause some other lapis ores to not be grindable, but we can fix that when that arrises.
// if(data[1].equalsIgnoreCase("lapis")){
// useOreDict = false;
// }
// RecipeHandler.addRecipe(Reference.GRINDER_RECIPE, new GrinderRecipe(oreStack, dust, ore ? 270 : 200, ore ? 31 : 22, useOreDict));
// }
// }
}
public static ItemStack getBucketWithFluid(Fluid fluid) {
return FluidUtil.getFilledBucket(new FluidInstance(fluid, 1000));
}
}

View file

@ -6,27 +6,38 @@ import com.google.gson.JsonObject;
import com.mojang.datafixers.Dynamic;
import com.mojang.datafixers.types.JsonOps;
import net.minecraft.client.MinecraftClient;
import net.minecraft.container.Container;
import net.minecraft.datafixers.NbtOps;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.fluid.Fluid;
import net.minecraft.fluid.Fluids;
import net.minecraft.inventory.CraftingInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.recipe.CraftingRecipe;
import net.minecraft.recipe.RecipeType;
import net.minecraft.text.LiteralText;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.Validate;
import techreborn.items.ItemDynamicCell;
import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
public class RecipeTemplate {
public static void generate(PlayerEntity playerEntity) throws IOException {
public static void generateFromInv(PlayerEntity playerEntity) throws IOException {
if(playerEntity.inventory.getInvStack(0).isEmpty()){
playerEntity.sendMessage(new LiteralText("no machine in first slot"));
auto(playerEntity);
return;
}
@ -45,17 +56,182 @@ public class RecipeTemplate {
}
}
File file = generate(type,false, 20, 400, inputs, outputs);
playerEntity.sendMessage(new LiteralText("done: " + file.getAbsolutePath()));
}
public static void auto(PlayerEntity playerEntity) throws IOException {
List<Item> items = Registry.ITEM.stream().collect(Collectors.toList());
Map<String, Map<String, Item>> map = new HashMap<>();
List<String> names = new ArrayList<>();
for(Item item : items){
Identifier identifier = Registry.ITEM.getId(item);
String path = identifier.getPath();
if(path.contains("_")){
String name = path.substring(0, path.lastIndexOf('_')).replace("_storage", "");
String type = path.substring(path.lastIndexOf('_') + 1);
Map<String, Item> typeMap = map.computeIfAbsent(type, s -> new HashMap<>());
typeMap.put(name, item);
if (!names.contains(name)) {
names.add(name);
}
}
}
boolean compressor = false;
boolean grinder = false;
boolean sawmill = false;
if(compressor){
//Compressor
for(String name : names){
ItemStack plateStack = ItemStack.EMPTY;
if(map.get("plate").containsKey(name)){
Item plate = map.get("plate").get(name);
plateStack = new ItemStack(plate);
}
if(plateStack.isEmpty()){
continue;
}
if(map.get("ingot").containsKey(name)){
ItemStack ingotStack = new ItemStack(map.get("ingot").get(name));
generate(new Identifier("techreborn", "compressor"), true, 10, 300, Collections.singletonList(ingotStack), Collections.singletonList(plateStack));
}
if(map.get("dust").containsKey(name)){
ItemStack dust = new ItemStack(map.get("dust").get(name));
generate(new Identifier("techreborn", "compressor"), true, 10, 250, Collections.singletonList(dust), Collections.singletonList(plateStack));
}
if(map.get("block").containsKey(name)){
ItemStack blockStack = new ItemStack(map.get("block").get(name));
ItemStack morePlates = plateStack.copy();
morePlates.setCount(9);
generate(new Identifier("techreborn", "compressor"), true, 10, 300, Collections.singletonList(blockStack), Collections.singletonList(morePlates));
}
}
}
if(grinder){
String[] highTeirNames = new String[]{"tungsten", "titanium", "aluminium", "iridium", "saltpeter", "coal", "diamond", "emerald", "redstone", "quartz"};
String[] types = new String[]{"ore", "gem", "ingot"};
//Grinder
for(String name : names){
for(String type : types){
ItemStack inputStack = ItemStack.EMPTY;
if(map.get(type).containsKey(name)){
Item ore = map.get(type).get(name);
inputStack = new ItemStack(ore);
}
if(inputStack.isEmpty()){
continue;
}
boolean ore = type.equals("ore");
if (ore && Arrays.asList(highTeirNames).contains(name)) {
continue;
}
ItemStack dustStack = ItemStack.EMPTY;
if(map.get("dust").containsKey(name)){
Item dust = map.get("dust").get(name);
dustStack = new ItemStack(dust);
}
if(dustStack.isEmpty()){
continue;
}
if (ore){
dustStack.setCount(2);
}
generate(new Identifier("techreborn", "grinder"), true, ore ? 270 : 200, ore ? 31 : 22, Collections.singletonList(inputStack), Collections.singletonList(dustStack));
}
}
}
if(sawmill){
CraftingInventory inventory = new CraftingInventory(new Container(null, 0) {
@Override
public boolean canUse(PlayerEntity var1) {
return true;
}
}, 1, 1);
for(String name : names){
ItemStack inputStack = ItemStack.EMPTY;
if(map.get("log").containsKey(name)){
Item ore = map.get("log").get(name);
inputStack = new ItemStack(ore);
}
if(inputStack.isEmpty()){
continue;
}
inventory.setInvStack(0, inputStack.copy());
List<CraftingRecipe> recipes = playerEntity.world.getRecipeManager().getAllMatches(RecipeType.CRAFTING, inventory, playerEntity.world);
CraftingRecipe recipe = recipes.get(0);
ItemStack output = recipe.getOutput();
if(output.isEmpty()){
continue;
}
addRecipe(inputStack, output);
}
}
}
public static void addRecipe(ItemStack log, ItemStack plank) throws IOException {
plank.setCount(4);
register(log, Fluids.WATER, 100, 128, plank, TRContent.Dusts.SAW.getStack(3), new ItemStack(Items.PAPER));
}
static void register(ItemStack input1, Fluid fluid, int ticks, int euPerTick, ItemStack... outputs) throws IOException {
Identifier sawmill = new Identifier("techreborn:industrial_sawmill");
generate(sawmill, true, euPerTick, ticks, Collections.singletonList(input1), Arrays.asList(outputs));
}
public static File generate(Identifier type, boolean auto, int power, int time, List<ItemStack> inputs, List<ItemStack> outputs) throws IOException {
JsonObject object = new JsonObject();
object.addProperty("type", type.toString());
object.addProperty("power", 20);
object.addProperty("time", 400);
object.addProperty("power", power);
object.addProperty("time", time);
{
JsonArray ingredients = new JsonArray();
Function<ItemStack, JsonObject> toIngredient = stack -> {
JsonObject jsonObject = new JsonObject();
if(stack.getItem() == TRContent.CELL){
if(stack.getItem() == TRContent.CELL && TRContent.CELL.getFluid(stack) != Fluids.EMPTY){
jsonObject.addProperty("fluid", Registry.FLUID.getId(TRContent.CELL.getFluid(stack)).toString());
jsonObject.addProperty("holder", "techreborn:cell");
} else {
@ -63,10 +239,14 @@ public class RecipeTemplate {
if(stack.getCount() > 1){
jsonObject.addProperty("count", stack.getCount());
}
if(stack.getItem() instanceof ItemDynamicCell){
//Force it to be an empty cell
jsonObject.addProperty("nbt", "null");
}
}
return jsonObject;
};
inputs.forEach(stack -> ingredients.add(toIngredient.apply(stack)));
inputs.stream().peek(Validate::notNull).forEach(stack -> ingredients.add(toIngredient.apply(stack)));
object.add("ingredients", ingredients);
}
@ -101,9 +281,14 @@ public class RecipeTemplate {
String name = Registry.ITEM.getId(outputs.get(0).getItem()).getPath();
if(outputs.get(0).getItem() == TRContent.CELL){
name = Registry.FLUID.getId(TRContent.CELL.getFluid(outputs.get(0))).getPath();
if(name.equals("empty")){
name = "empty_cell";
}
}
file = new File(dir, "src/main/resources/data/techreborn/recipes/" + type.getPath() + "/" + name + (i == 0 ? "" : "_" + i) + ".json");
String extraPath = auto ? "/auto/" : "/";
file = new File(dir, "src/main/resources/data/techreborn/recipes/" + type.getPath() + extraPath + name + (i == 0 ? "" : "_" + i) + ".json");
i ++;
}
@ -111,9 +296,7 @@ public class RecipeTemplate {
MinecraftClient.getInstance().keyboard.setClipboard(file.getAbsolutePath());
System.out.println(MinecraftClient.getInstance().keyboard.getClipboard());
playerEntity.sendMessage(new LiteralText("done: " + file.getAbsolutePath()));
return file;
}

View file

@ -1,61 +0,0 @@
/*
* 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.item.ItemStack;
/**
* @author drcrazy
*
*/
public class ChemicalReactorRecipes extends RecipeMethods {
public static void init(){
//Cells recipes. One cell should be cooked in 20 seconds
register(getMaterial("carbon", Type.CELL), getMaterial("calcium", Type.CELL), getMaterial("calciumCarbonate", 2, Type.CELL), 800);
register(getMaterial("carbon", Type.CELL), getMaterial("hydrogen", 4, Type.CELL), getMaterial("methane", 5, Type.CELL), 2000);
register(getMaterial("carbon", Type.CELL), getMaterial("nitrogen", Type.CELL), getMaterial("nitrocarbon", 2, Type.CELL), 800);
register(getMaterial("nitrocarbon", Type.CELL), getMaterial("water", Type.CELL), getMaterial("glyceryl", 2, Type.CELL), 600);
register(getMaterial("glyceryl", Type.CELL), getMaterial("diesel", 4, Type.CELL), getMaterial("nitroDiesel", 5, Type.CELL), 250);
register(getMaterial("glyceryl", Type.CELL), getMaterial("carbon", 4, Type.CELL), getMaterial("nitrocoalFuel", 5, Type.CELL), 250);
register(getMaterial("sulfur", Type.CELL), getMaterial("water", 2, Type.CELL), getMaterial("sulfuricAcid", 3, Type.CELL), 1200);
register(getMaterial("sulfur", Type.CELL), getMaterial("sodium", Type.CELL), getMaterial("sodiumSulfide", 2, Type.CELL), 800);
register(getMaterial("sodiumSulfide", Type.CELL), getMaterial("compressedair", Type.CELL), getMaterial("sodiumPersulfate", 2, Type.CELL), 800);
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);
}
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));
}
public static void register (ItemStack in1, ItemStack in2, ItemStack out, int tickTime){
register(in1, in2, out, tickTime, 30);
}
}

View file

@ -1,105 +0,0 @@
/*
* 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.item.ItemStack;
import techreborn.init.ModFluids;
import techreborn.items.ItemDynamicCell;
import java.security.InvalidParameterException;
/**
* @author drcrazy
*
*/
public class DistillationTowerRecipes extends RecipeMethods {
public static void init() {
register(ItemDynamicCell.getCellWithFluid(ModFluids.OIL.getFluid(), 16), 1400, 13, getMaterial("diesel", 16, Type.CELL), getMaterial("sulfuricAcid", 16, Type.CELL), getMaterial("glyceryl", Type.CELL));
}
static void register(ItemStack input, int ticks, int euPerTick, boolean oreDict, ItemStack... outputs) {
ItemStack output1;
ItemStack output2 = null;
ItemStack output3 = null;
ItemStack output4 = null;
if (outputs.length == 3) {
output1 = outputs[0];
output2 = outputs[1];
output3 = outputs[2];
} else if (outputs.length == 2) {
output1 = outputs[0];
output2 = outputs[1];
} else if (outputs.length == 1) {
output1 = outputs[0];
} else if (outputs.length == 4) {
output1 = outputs[0];
output2 = outputs[1];
output3 = outputs[2];
output4 = outputs[3];
} else {
throw new InvalidParameterException("Invalid number of Distillation tower outputs: " + outputs);
}
int cellCount = 0;
for (ItemStack stack : outputs) {
if (stack.getItem() instanceof ItemDynamicCell) {
cellCount += stack.getCount();
}
}
if (input.getItem() instanceof ItemDynamicCell) {
int inputCount = input.getCount();
if (cellCount < inputCount) {
if (output2 == null) {
output2 = ItemDynamicCell.getEmptyCell(inputCount - cellCount);
} else if (output3 == null) {
output3 = ItemDynamicCell.getEmptyCell(inputCount - cellCount);
} else if (output4 == null) {
output4 = ItemDynamicCell.getEmptyCell(inputCount - cellCount);
}
}
cellCount -= inputCount;
}
if (cellCount < 0) { cellCount = 0; }
ItemStack cells = null;
if (cellCount > 0) {
if (cellCount > 64) {
throw new InvalidParameterException("Invalid Distillation tower outputs: " + outputs + "(Recipe requires > 64 cells)");
}
cells = ItemDynamicCell.getEmptyCell(cellCount);
}
// RecipeHandler.addRecipe(Reference.DistiLLATION_TOWER_RECIPE, new DistillationTowerRecipe(input, cells, output1, output2, output3, output4, ticks, euPerTick, oreDict));
}
static void register(ItemStack input, int ticks, int euPerTick, ItemStack... outputs) {
register(input, ticks, euPerTick, true, outputs);
}
}

View file

@ -1,70 +0,0 @@
/*
* 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;
/**
* Created by Prospector
*/
public class ExtractorRecipes extends RecipeMethods {
/* TODO 1.13 :D
public static void init() {
register(getStack(TRContent.RUBBER_SAPLING), TRContent.Parts.RUBBER.getStack(), false);
register(getStack(TRContent.RUBBER_LOG), TRContent.Parts.RUBBER.getStack(), false);
register(getStack(Items.SLIME_BALL), TRContent.Parts.RUBBER.getStack(2), false);
register(TRContent.Parts.SAP.getStack(), TRContent.Parts.RUBBER.getStack(3), false);
register(getStack(Blocks.RED_TULIP), getStack(Items.ROSE_RED, 2), false);
register(getStack(Blocks.POPPY), getStack(Items.ROSE_RED, 2), false);
register(getStack(Blocks.ROSE_BUSH), getStack(Items.ROSE_RED, 4), false);
register(getStack(Blocks.BLUE_ORCHID), getStack(Items.LIGHT_BLUE_DYE, 2), false);
register(getStack(Blocks.AZURE_BLUET), getStack(Items.LIGHT_GRAY_DYE, 2), false);
register(getStack(Blocks.OXEYE_DAISY), getStack(Items.LIGHT_GRAY_DYE, 2), false);
register(getStack(Blocks.WHITE_TULIP), getStack(Items.LIGHT_GRAY_DYE, 2), false);
register(getStack(Blocks.ALLIUM), getStack(Items.MAGENTA_DYE, 2), false);
register(getStack(Blocks.LILAC), getStack(Items.MAGENTA_DYE, 4), false);
register(getStack(Blocks.ORANGE_TULIP), getStack(Items.ORANGE_DYE, 2), false);
register(getStack(Blocks.PINK_TULIP), getStack(Items.PINK_DYE, 2), false);
register(getStack(Blocks.PEONY), getStack(Items.PINK_DYE, 4), false);
register(getStack(Blocks.DANDELION), getStack(Items.DANDELION_YELLOW, 2), false);
register(getStack(Blocks.SUNFLOWER), getStack(Items.DANDELION_YELLOW, 2), false);
register(getStack(Blocks.TALL_GRASS), getStack(Items.WHEAT_SEEDS), false);
register(getStack(Blocks.LARGE_FERN), getStack(Items.WHEAT_SEEDS), false);
register(getStack(Blocks.DEAD_BUSH), getStack(Items.STICK));
for (int i = 1; i < 15; i++)
register(getStack(Blocks.WOOL, 1, i), getStack(Blocks.WOOL, 1, 0), false);
for (Fluid fluid : FluidRegistry.getRegisteredFluids().values()) {
register(DynamicCell.getCellWithFluid(fluid), DynamicCell.getEmptyCell(1), false);
}
}
static void register(ItemStack input, ItemStack output) {
register(input, output, true);
}
static void register(ItemStack input, ItemStack output, boolean oreDict) {
RecipeHandler.addRecipe(Reference.EXTRACTOR_RECIPE, new ExtractorRecipe(input, output, 400, 2, oreDict));
}
*/
}

View file

@ -24,20 +24,23 @@
package techreborn.init.recipes;
import net.minecraft.item.ItemStack;
import techreborn.api.reactor.FusionReactorRecipe;
import techreborn.api.reactor.FusionReactorRecipeHelper;
import techreborn.init.ModFluids;
import techreborn.init.TRContent;
import techreborn.items.ItemDynamicCell;
/**
* @author drcrazy
*
*/
public class FusionReactorRecipes extends RecipeMethods {
public static void init() {
// FusionReactorRecipeHelper.registerRecipe(new FusionReactorRecipe(ItemCells.getCellByName("helium3"),
// ItemCells.getCellByName("deuterium"), ItemCells.getCellByName("heliumplasma"), 40000000, 32768, 1024));
// FusionReactorRecipeHelper.registerRecipe(new FusionReactorRecipe(ItemCells.getCellByName("tritium"),
// ItemCells.getCellByName("deuterium"), ItemCells.getCellByName("helium3"), 60000000, 16384, 2048));
// FusionReactorRecipeHelper.registerRecipe(new FusionReactorRecipe(ItemCells.getCellByName("wolframium"),
// ItemCells.getCellByName("Berylium"), TRContent.Dusts.PLATINUM.getStack(), 80000000, -2048, 1024));
// TODO: Fix recipe
// FusionReactorRecipeHelper.registerRecipe(new FusionReactorRecipe(ItemCells.getCellByName("wolframium"),
// ItemCells.getCellByName("lithium"), BlockOre.getOreByName("iridium"), 90000000, -2048, 1024));
FusionReactorRecipeHelper.registerRecipe(new FusionReactorRecipe(ItemDynamicCell.getCellWithFluid(ModFluids.HELIUM_3.getFluid()), ItemDynamicCell.getCellWithFluid(ModFluids.DEUTERIUM.getFluid()), ItemDynamicCell.getCellWithFluid(ModFluids.HELIUMPLASMA.getFluid()), 40000000, 32768, 1024));
FusionReactorRecipeHelper.registerRecipe(new FusionReactorRecipe(ItemDynamicCell.getCellWithFluid(ModFluids.TRITIUM.getFluid()), ItemDynamicCell.getCellWithFluid(ModFluids.DEUTERIUM.getFluid()), ItemDynamicCell.getCellWithFluid(ModFluids.HELIUM_3.getFluid()), 60000000, 16384, 2048));
FusionReactorRecipeHelper.registerRecipe(new FusionReactorRecipe(ItemDynamicCell.getCellWithFluid(ModFluids.WOLFRAMIUM.getFluid()), ItemDynamicCell.getCellWithFluid(ModFluids.BERYLIUM.getFluid()), TRContent.Dusts.PLATINUM.getStack(), 80000000, -2048, 1024));
FusionReactorRecipeHelper.registerRecipe(new FusionReactorRecipe(ItemDynamicCell.getCellWithFluid(ModFluids.WOLFRAMIUM.getFluid()), ItemDynamicCell.getCellWithFluid(ModFluids.LITHIUM.getFluid()), new ItemStack(TRContent.Ores.IRIDIUM.asItem()), 90000000, -2048, 1024));
}
}

View file

@ -1,180 +0,0 @@
/*
* 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.block.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import techreborn.items.ItemDynamicCell;
import java.security.InvalidParameterException;
/**
* Created by Prospector
*/
public class IndustrialCentrifugeRecipes extends RecipeMethods {
public static void init() {
register(getStack(Blocks.DIRT, 16), 2500, getStack(Blocks.SAND, 8), getStack(Items.CLAY_BALL), getStack(Blocks.GRAVEL, 2));
register(getStack(Blocks.GRASS, 16), 2500, getStack(Blocks.SAND, 8), getStack(Items.CLAY_BALL), getStack(Blocks.GRAVEL, 2), getStack(Items.WHEAT_SEEDS, 4));
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.ENCHANTED_GOLDEN_APPLE), 5000, getStack(Items.GOLD_INGOT, 64), getMaterial("methane", Type.CELL));
register(getStack(Items.GOLDEN_CARROT), 5000, getStack(Items.GOLD_NUGGET, 6), getMaterial("methane", Type.CELL));
register(getStack(Items.GLISTERING_MELON_SLICE, 8), 5000, getStack(Items.GOLD_NUGGET, 6), getMaterial("methane", Type.CELL));
register(getStack(Items.APPLE, 32), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.MUSHROOM_STEW, 16), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.BREAD, 64), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.PORKCHOP, 12), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.COOKED_PORKCHOP, 16), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.BEEF, 12), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.COOKED_BEEF, 16), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.CHICKEN, 12), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.COOKED_CHICKEN, 16), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.MUTTON, 12), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.COOKED_MUTTON, 16), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.RABBIT, 12), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.COOKED_RABBIT, 16), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.COD, 12), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.COOKED_COD, 16), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.SALMON, 12), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.COOKED_SALMON, 16), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.MELON_SLICE, 64), 5000, getMaterial("methane", Type.CELL));
register(getStack(Blocks.PUMPKIN, 16), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.ROTTEN_FLESH, 16), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.SPIDER_EYE, 32), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.CARROT, 16), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.POTATO, 16), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.POISONOUS_POTATO, 12), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.BAKED_POTATO, 24), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.BEETROOT, 12), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.COOKIE, 64), 5000, getMaterial("methane", Type.CELL));
register(getStack(Blocks.BROWN_MUSHROOM_BLOCK, 12), 5000, getMaterial("methane", Type.CELL));
register(getStack(Blocks.RED_MUSHROOM_BLOCK, 12), 5000, getMaterial("methane", Type.CELL));
register(getStack(Blocks.BROWN_MUSHROOM, 32), 5000, getMaterial("methane", Type.CELL));
register(getStack(Blocks.RED_MUSHROOM, 32), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.NETHER_WART, 32), 5000, getMaterial("methane", Type.CELL));
//TODO: Fixme
// 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(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));
// register(getOre("dustSilver", 2), 2400, getMaterial("lead", Type.SMALL_DUST));
// register(getOre("dustLead", 2), 2400, getMaterial("silver", Type.SMALL_DUST));
// register(getOre("dustTin", 2), 210, getMaterial("zinc", Type.SMALL_DUST), getMaterial("iron", Type.SMALL_DUST));
// register(getOre("dustElectrum"), 960, getMaterial("gold", 2, Type.SMALL_DUST), getMaterial("silver", 2, Type.SMALL_DUST));
// register(getOre("dustZinc"), 1040, getMaterial("tin", Type.SMALL_DUST));
// register(getOre("dustBrass"), 1500, getMaterial("copper", 3, Type.SMALL_DUST), getMaterial("zinc", Type.SMALL_DUST));
// register(getOre("dustPlatinum", 2), 3000, getMaterial("iridium", 2, Type.NUGGET), getMaterial("nickel", Type.SMALL_DUST));
// register(getOre("dustNickel", 3), 3440, getMaterial("iron", Type.SMALL_DUST), getMaterial("gold", Type.SMALL_DUST), getMaterial("copper", Type.SMALL_DUST));
// register(getOre("dustGold", 3), 2400, getMaterial("copper", Type.SMALL_DUST), getMaterial("nickel", Type.SMALL_DUST));
// register(getOre("dustCopper", 3), 2400, getMaterial("gold", Type.SMALL_DUST), getMaterial("nickel", Type.SMALL_DUST));
// register(getOre("dustRedstone", 32), 2200, getMaterial("silicon", 3, Type.CELL), getMaterial("pyrite", 16, Type.DUST), getMaterial("ruby", 3, Type.DUST), getMaterial("mercury", 10, Type.CELL));
// register(getOre("dustGlowstone", 16), 2500, getStack(Items.REDSTONE, 8), getMaterial("sulfur", Type.CELL), getMaterial("helium", Type.CELL));
// register(getStack(Items.DYE, 4, 4), 1500, false, getMaterial("lazurite", 3, Type.DUST), getMaterial("pyrite", Type.SMALL_DUST), getMaterial("calcite", Type.SMALL_DUST), getMaterial("sodalite", 2, Type.SMALL_DUST));
// register(getOre("dustEnderEye", 2), 1840, getMaterial("ender_pearl", 2, Type.DUST), getStack(Items.BLAZE_POWDER));
// register(getOre("dustNetherrack", 16), 2400, getStack(Items.REDSTONE), getMaterial("sulfur", Type.CELL), getMaterial("coal", Type.DUST), getStack(Items.GOLD_NUGGET));
// register(getOre("dustEndstone", 16), 4800, getMaterial("helium3", Type.CELL), getMaterial("helium", Type.CELL), getMaterial("tungsten", Type.SMALL_DUST), getStack(Blocks.SAND, 12));
// register(getOre("dustRedGarnet", 16), 3000, getMaterial("pyrope", 3, Type.DUST), getMaterial("almandine", 5, Type.DUST), getMaterial("spessartine", 8, Type.DUST));
// register(getOre("dustYellowGarnet", 16), 3500, getMaterial("andradite", 5, Type.DUST), getMaterial("grossular", 8, Type.DUST), getMaterial("uvarovite", 3, Type.DUST));
// register(getOre("dustDarkAshes", 2), 240, getMaterial("ashes", 1, Type.DUST));
// register(getOre("dustAshes", 2), 240, getMaterial("carbon", Type.CELL));
// register(getOre("dustMarble"), 1040, getMaterial("magnesium", Type.DUST), getMaterial("calcite", 7, Type.DUST));
// register(getOre("dustBasalt", 16), 2040, getMaterial("peridot", Type.DUST), getMaterial("calcite", 3, Type.DUST), getMaterial("flint", 8, Type.DUST), getMaterial("dark_ashes", 4, Type.DUST));
// register(getMaterial("lava", 16, Type.CELL), 1500, getMaterial("tin", 6, Type.INGOT), getMaterial("copper", 4, Type.INGOT), getMaterial("electrum", Type.INGOT), getMaterial("tungsten", Type.SMALL_DUST));
register(getMaterial("hydrogen", 4, Type.CELL), 3000, getMaterial("deuterium", Type.CELL));
register(getMaterial("deuterium", 4, Type.CELL), 3000, getMaterial("tritium", Type.CELL));
register(getMaterial("helium", 16, Type.CELL), 5000, getMaterial("helium3", Type.CELL));
// register(getMaterial("calciumcarbonate", Type.CELL), 40, getMaterial("calcite", Type.DUST));
// register(getMaterial("sulfur", Type.CELL), 40, getMaterial("sulfur", Type.DUST));
}
static void register(Object input, int ticks, boolean oreDict, ItemStack... outputs) {
ItemStack output1;
ItemStack output2 = null;
ItemStack output3 = null;
ItemStack output4 = null;
if (outputs.length == 3) {
output1 = outputs[0];
output2 = outputs[1];
output3 = outputs[2];
} else if (outputs.length == 2) {
output1 = outputs[0];
output2 = outputs[1];
} else if (outputs.length == 1) {
output1 = outputs[0];
} else if (outputs.length == 4) {
output1 = outputs[0];
output2 = outputs[1];
output3 = outputs[2];
output4 = outputs[3];
} else {
throw new InvalidParameterException("Invalid industrial centrifuge outputs: " + outputs);
}
int cellCount = 0;
for (ItemStack stack : outputs) {
if (stack.getItem() instanceof ItemDynamicCell) {
cellCount += stack.getCount();
}
}
if (input instanceof ItemStack) {
if (((ItemStack) input).getItem() instanceof ItemDynamicCell) {
int inputCount = ((ItemStack) input).getCount();
if (cellCount < inputCount) {
if (output2 == null) {
output2 = ItemDynamicCell.getEmptyCell(inputCount - cellCount);
} else if (output3 == null) {
output3 = ItemDynamicCell.getEmptyCell(inputCount - cellCount);
} else if (output4 == null) {
output4 = ItemDynamicCell.getEmptyCell(inputCount - cellCount);
}
}
cellCount -= inputCount;
}
}
if (cellCount < 0) {
cellCount = 0;
}
ItemStack cells = null;
if (cellCount > 0) {
if (cellCount > 64) {
throw new InvalidParameterException("Invalid industrial centrifuge outputs: " + outputs + "(Recipe requires > 64 cells)");
}
cells = ItemDynamicCell.getEmptyCell(cellCount);
}
//RecipeHandler.addRecipe(Reference.CENTRIFUGE_RECIPE, new CentrifugeRecipe(input, cells, output1, output2, output3, output4, ticks, 5, oreDict));
}
static void register(Object input, int ticks, ItemStack... outputs) {
register(input, ticks, true, outputs);
}
}

View file

@ -1,116 +0,0 @@
/*
* 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 reborncore.common.registration.RebornRegister;
import techreborn.TechReborn;
@RebornRegister(TechReborn.MOD_ID)
public class IndustrialSawmillRecipes extends RecipeMethods {
/* TODO 1.13 :D
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

@ -25,46 +25,84 @@
package techreborn.init.recipes;
import net.minecraft.block.Block;
import net.minecraft.fluid.Fluid;
import net.minecraft.fluid.Fluids;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.recipe.Ingredient;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;
import reborncore.common.util.StringUtils;
import techreborn.items.ItemDynamicCell;
/**
* Created by Prospector
*/
public abstract class RecipeMethods {
public static ItemStack getMaterial(String name, int count, Type type) {
// if (type == Type.DUST) {
// return ItemDusts.getDustByName(name, count);
// } else if (type == Type.SMALL_DUST) {
// return ItemDustsSmall.getSmallDustByName(name, count);
// } else if (type == Type.INGOT) {
// return ItemIngots.getIngotByName(name, count);
// } else if (type == Type.GEM) {
// return ItemGems.getGemByName(name, count);
// TODO: fix recipe
// } else if (type == Type.PLATE) {
// return ItemPlates.getPlateByName(name, count);
// } else if (type == Type.NUGGET) {
// return ItemNuggets.getNuggetByName(name, count);
// } else
// if (type == Type.CELL) {
// return ItemCells.getCellByName(name, count);
// } else if (type == Type.PART) {
// return ItemParts.getPartByName(name, count);
// } else if (type == Type.CABLE) {
// return BlockCable.getCableByName(name, count);
// } else if (type == Type.MACHINE_FRAME) {
// return BlockMachineFrames.getFrameByName(name, count);
// } else if (type == Type.MACHINE_CASING) {
// return BlockMachineCasing.getStackByName(name, count);
// } else if (type == Type.UPGRADE) {
// return ItemUpgrades.getUpgradeByName(name, count);
// } else if (type == Type.ORE) {
// return BlockOre.getOreByName(name, count);
// }
return ItemStack.EMPTY;
name = name.toLowerCase();
if(type == Type.CELL){
Fluid fluid = Registry.FLUID.get(new Identifier("techreborn", name.toLowerCase()));
if(name.equals("water")){
fluid = Fluids.WATER;
}
if(name.equals("lava")){
fluid = Fluids.LAVA;
}
if(fluid == Fluids.EMPTY){
throw new RuntimeException("could not find fluid " + name);
}
return ItemDynamicCell.getCellWithFluid(fluid, count);
}
if(type == Type.INGOT){
return find(name + "_ingot", count);
}
if(type == Type.DUST){
return find(name + "_dust", count);
}
if(type == Type.PLATE){
return find(name + "_plate", count);
}
if(type == Type.NUGGET){
return find(name + "_nugget", count);
}
if(type == Type.SMALL_DUST){
return find(name + "_small_dust", count);
}
if(type == Type.ORE){
return find(name + "_ore", count);
}
if(type == Type.PART){
return find(name, count);
}
throw new UnsupportedOperationException(type.name());
}
private static ItemStack find(String path, int count){
Identifier identifier = new Identifier(path);
Item item = Registry.ITEM.get(identifier);
if(item != Items.AIR){
return new ItemStack(item, count);
}
identifier = new Identifier("techreborn", path);
item = Registry.ITEM.get(identifier);
if(item != Items.AIR){
return new ItemStack(item, count);
}
throw new UnsupportedOperationException("Could not find" + path);
}
static Object getMaterialObjectFromType(String name, Type type) {
@ -98,23 +136,25 @@ public abstract class RecipeMethods {
return getMaterial(name, 1, type);
}
public static Object getMaterialObject(String name, Type type) {
return getMaterialObjectFromType(name, type);
}
@Deprecated
public static ItemStack getOre(String name, int count) {
throw new UnsupportedOperationException("Use tags");
if(name.equals("dustRedstone")){
return new ItemStack(Items.REDSTONE, count);
}
if(name.startsWith("dust")){
return getMaterial(name.replace("dust", ""), count, Type.DUST);
}
return getMaterial(name, count, Type.ORE);
}
@Deprecated
public static ItemStack getOre(String name) {
throw new UnsupportedOperationException("Use tags");
return getOre(name, 1);
}
@Deprecated
public static boolean oresExist(String... names) {
throw new UnsupportedOperationException("Use tags");
return false;
}
public static ItemStack getStack(Item item) {
@ -132,7 +172,7 @@ public abstract class RecipeMethods {
@Deprecated
public static ItemStack getStack(Item item, int count, boolean wildcard) {
throw new UnsupportedOperationException("Use tags");
return new ItemStack(item, count);
}
public static ItemStack getStack(Block block) {
@ -140,7 +180,7 @@ public abstract class RecipeMethods {
}
public static ItemStack getStack(Block block, int count) {
return getStack(block, count);
return new ItemStack(block, count);
}
public static ItemStack getStack(Block block, boolean wildcard) {

View file

@ -49,7 +49,7 @@ import techreborn.utils.FluidUtils;
public class ItemDynamicCell extends Item implements ItemFluidInfo {
public ItemDynamicCell() {
super(new Item.Settings().maxCount(1).group(TechReborn.ITEMGROUP));
super(new Item.Settings().group(TechReborn.ITEMGROUP));
}
@Override

View file

@ -1,18 +0,0 @@
{
"forge_marker": 1,
"variants": {
"inventory": {
"model": "forge:forgebucket",
"textures": {
"base": "techreborn:items/cell_base",
"fluid": "techreborn:items/cell_fluid",
"cover": "techreborn:items/cell_cover"
},
"transform": "forge:default-item",
"custom": {
"fluid": "water",
"flipGas": true
}
}
}
}

View file

@ -1,209 +0,0 @@
{
"forge_marker": 1,
"defaults": {
"model": "forge:fluid"
},
"variants": {
"techreborn.berylium": [{
"custom": { "fluid": "berylium" }
}],
"techreborn.calcium": {
"model": "forge:fluid",
"custom": {
"fluid": "calcium"
}
},
"techreborn.calciumcarbonate": {
"model": "forge:fluid",
"custom": {
"fluid": "calciumcarbonate"
}
},
"techreborn.carbon": {
"model": "forge:fluid",
"custom": {
"fluid": "carbon"
}
},
"techreborn.carbonfiber": {
"model": "forge:fluid",
"custom": {
"fluid": "carbonfiber"
}
},
"techreborn.chlorite": {
"model": "forge:fluid",
"custom": {
"fluid": "chlorite"
}
},
"techreborn.compressedair": {
"model": "forge:fluid",
"custom": {
"fluid": "compressedair"
}
},
"techreborn.deuterium": {
"model": "forge:fluid",
"custom": {
"fluid": "deuterium"
}
},
"techreborn.diesel": {
"model": "forge:fluid",
"custom": {
"fluid": "diesel"
}
},
"techreborn.electrolyzedwater": {
"model": "forge:fluid",
"custom": {
"fluid": "electrolyzedwater"
}
},
"techreborn.glyceryl": {
"model": "forge:fluid",
"custom": {
"fluid": "glyceryl"
}
},
"techreborn.helium": {
"model": "forge:fluid",
"custom": {
"fluid": "helium"
}
},
"techreborn.helium3": {
"model": "forge:fluid",
"custom": {
"fluid": "helium3"
}
},
"techreborn.heliumplasma": {
"model": "forge:fluid",
"custom": {
"fluid": "heliumplasma"
}
},
"techreborn.hydrogen": {
"model": "forge:fluid",
"custom": {
"fluid": "hydrogen"
}
},
"techreborn.lithium": {
"model": "forge:fluid",
"custom": {
"fluid": "lithium"
}
},
"techreborn.mercury": {
"model": "forge:fluid",
"custom": {
"fluid": "mercury"
}
},
"techreborn.methane": {
"model": "forge:fluid",
"custom": {
"fluid": "methane"
}
},
"techreborn.nitrocarbon": {
"model": "forge:fluid",
"custom": {
"fluid": "nitrocarbon"
}
},
"techreborn.nitrocoalfuel": {
"model": "forge:fluid",
"custom": {
"fluid": "nitrocoalfuel"
}
},
"techreborn.nitrodiesel": {
"model": "forge:fluid",
"custom": {
"fluid": "nitrodiesel"
}
},
"techreborn.nitrofuel": {
"model": "forge:fluid",
"custom": {
"fluid": "nitrofuel"
}
},
"techreborn.nitrogen": {
"model": "forge:fluid",
"custom": {
"fluid": "nitrogen"
}
},
"techreborn.nitrogendioxide": {
"model": "forge:fluid",
"custom": {
"fluid": "nitrogendioxide"
}
},
"techreborn.oil": {
"model": "forge:fluid",
"custom": {
"fluid": "oil"
}
},
"techreborn.potassium": {
"model": "forge:fluid",
"custom": {
"fluid": "potassium"
}
},
"techreborn.silicon": {
"model": "forge:fluid",
"custom": {
"fluid": "silicon"
}
},
"techreborn.sodium": {
"model": "forge:fluid",
"custom": {
"fluid": "sodium"
}
},
"techreborn.sodiumpersulfate": {
"model": "forge:fluid",
"custom": {
"fluid": "sodiumpersulfate"
}
},
"techreborn.sodiumsulfide": {
"model": "forge:fluid",
"custom": {
"fluid": "sodiumsulfide"
}
},
"techreborn.sulfur": {
"model": "forge:fluid",
"custom": {
"fluid": "sulfur"
}
},
"techreborn.sulfuricacid": {
"model": "forge:fluid",
"custom": {
"fluid": "sulfuricacid"
}
},
"techreborn.tritium": {
"model": "forge:fluid",
"custom": {
"fluid": "tritium"
}
},
"techreborn.wolframium": {
"model": "forge:fluid",
"custom": {
"fluid": "wolframium"
}
}
}
}

View file

@ -1,24 +0,0 @@
{
"forge_marker": 1,
"defaults": {
"model": "cube_all",
"textures": {
"all": "techreborn:blocks/rubber_planks"
}
},
"variants": {
"inventory": {
"transform": "forge:default-block",
"model": "half_slab",
"textures": {
"top": "techreborn:blocks/rubber_planks",
"bottom": "techreborn:blocks/rubber_planks",
"side": "techreborn:blocks/rubber_planks"
}
},
"variant": {
"default": {}
}
}
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:adjustable_su"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:advanced_machine_casing"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:advanced_machine_frame"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:advanced_solar_panel"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:alarm"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:alloy_smelter"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:aluminum_storage_block"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:assembly_machine"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:auto_crafting_table"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:basic_machine_casing"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:basic_machine_frame"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:basic_solar_panel"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:bauxite_ore"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:brass_storage_block"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:bronze_storage_block"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:charge_o_mat"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:chemical_reactor"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:chrome_storage_block"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:chunk_loader"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,48 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:alternatives",
"children": [
{
"type": "minecraft:item",
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"enchantments": [
{
"enchantment": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
],
"name": "techreborn:cinnabar_ore"
},
{
"type": "minecraft:item",
"functions": [
{
"function": "minecraft:apply_bonus",
"enchantment": "minecraft:fortune",
"formula": "minecraft:ore_drops"
},
{
"function": "minecraft:explosion_decay"
}
],
"name": "techreborn:cinnabar_dust"
}
]
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:compressor"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:computer_cube"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:copper_cable"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:copper_ore"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:copper_storage_block"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:creative_quantum_chest"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:creative_quantum_tank"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:creative_solar_panel"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:diesel_generator"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:digital_chest"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:distillation_tower"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:dragon_egg_syphon"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:electric_furnace"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:electrum_storage_block"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:extractor"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:fluid_replicator"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:fusion_coil"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:fusion_control_computer"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:galena_ore"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:gas_turbine"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:glassfiber_cable"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:gold_cable"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:grinder"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:high_voltage_su"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:hv_cable"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:hv_transformer"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:implosion_compressor"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:industrial_blast_furnace"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:industrial_centrifuge"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:industrial_electrolyzer"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:industrial_grinder"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:industrial_machine_casing"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:industrial_machine_frame"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:industrial_sawmill"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:industrial_solar_panel"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:insulated_copper_cable"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:insulated_gold_cable"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:insulated_hv_cable"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:interdimensional_su"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:invar_storage_block"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:iridium_ore"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:iridium_reinforced_stone_storage_block"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:iridium_reinforced_tungstensteel_storage_block"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:iridium_storage_block"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:iron_alloy_furnace"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:iron_furnace"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:lamp_incandescent"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:lamp_led"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:lapotronic_su"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:lead_ore"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:lead_storage_block"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:lightning_rod"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:low_voltage_su"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:lsu_storage"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:lv_transformer"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:magic_energy_absorber"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:magic_energy_converter"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:matter_fabricator"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:medium_voltage_su"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:mv_transformer"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:nickel_storage_block"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:nuke"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:osmium_storage_block"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "techreborn:peridot_ore"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

Some files were not shown because too many files have changed in this diff Show more