Merged all ingredients into single class

This commit is contained in:
drcrazy 2018-09-03 14:49:59 +03:00
parent 0b1733b733
commit 33b9f697dc
40 changed files with 258 additions and 1072 deletions

View file

@ -1,88 +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;
import java.util.Arrays;
import com.google.common.base.CaseFormat;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IStringSerializable;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import reborncore.RebornRegistry;
import techreborn.items.ItemDusts;
import techreborn.lib.ModInfo;
/**
* @author drcrazy
*
*/
public enum ModDusts implements IStringSerializable {
ALMANDINE, ALUMINUM, ANDESITE, ANDRADITE, ASHES, BASALT, BAUXITE, BRASS, BRONZE, CALCITE, CHARCOAL, CHROME,
CINNABAR, CLAY, COAL, COPPER, DARK_ASHES, DIAMOND, DIORITE, ELECTRUM, EMERALD, ENDER_EYE, ENDER_PEARL, ENDSTONE,
FLINT, GALENA, GOLD, GRANITE, GROSSULAR, INVAR, IRON, LAZURITE, LEAD, MAGNESIUM, MANGANESE, MARBLE, NETHERRACK,
NICKEL, OBSIDIAN, OLIVINE, PERIDOT, PHOSPHOROUS, PLATINUM, PYRITE, PYROPE, RED_GARNET, RUBY, SALTPETER, SAPPHIRE,
SAW, SILVER, SODALITE, SPESSARTINE, SPHALERITE, STEEL, SULFUR, TIN, TITANIUM, TUNGSTEN, UVAROVITE,
YELLOW_GARNET, ZINC;
public final String name;
public final Item item;
private ModDusts() {
name = CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "DUST_" + this.toString());
item = new ItemDusts();
item.setRegistryName(new ResourceLocation(ModInfo.MOD_ID, name));
item.setTranslationKey(ModInfo.MOD_ID + "." + name);
}
public ItemStack getStack() {
return new ItemStack(item);
}
public ItemStack getStack(int amount) {
return new ItemStack(item, amount);
}
public static void register() {
Arrays.stream(ModDusts.values()).forEach(dust -> RebornRegistry.registerItem(dust.item));
}
@SideOnly(Side.CLIENT)
public static void registerModel() {
ResourceLocation blockstateJson = new ResourceLocation(ModInfo.MOD_ID, "items/materials/dusts");
Arrays.stream(ModDusts.values()).forEach(dust -> ModelLoader.setCustomModelResourceLocation(dust.item, 0,
new ModelResourceLocation(blockstateJson, "type=" + dust.name)));
}
@Override
public String getName() {
return name;
}
}

View file

@ -1,89 +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;
import java.util.Arrays;
import com.google.common.base.CaseFormat;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IStringSerializable;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import reborncore.RebornRegistry;
import techreborn.items.ItemDusts;
import techreborn.lib.ModInfo;
/**
* @author drcrazy
*
*/
public enum ModDustsSmall implements IStringSerializable {
ALMANDINE, ALUMINUM, ANDESITE, ANDRADITE, ASHES, BASALT, BAUXITE, BRASS, BRONZE, CALCITE, CHARCOAL, CHROME,
CINNABAR, CLAY, COAL, COPPER, DARK_ASHES, DIAMOND, DIORITE, ELECTRUM, EMERALD, ENDER_EYE, ENDER_PEARL, ENDSTONE,
FLINT, GALENA, GLOWSTONE, GOLD, GRANITE, GROSSULAR, INVAR, IRON, LAZURITE, LEAD, MAGNESIUM, MANGANESE, MARBLE,
NETHERRACK, NICKEL, OBSIDIAN, OLIVINE, PERIDOT, PHOSPHOROUS, PLATINUM, PYRITE, PYROPE, REDSTONE, RED_GARNET, RUBY,
SALTPETER, SAPPHIRE, SAW, SILVER, SODALITE, SPESSARTINE, SPHALERITE, STEEL, SULFUR, TIN, TITANIUM, TUNGSTEN,
UVAROVITE, YELLOW_GARNET, ZINC;
public final String name;
public final Item item;
private ModDustsSmall() {
name = CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "DUST_SMALL_" + this.toString());
item = new ItemDusts();
item.setRegistryName(new ResourceLocation(ModInfo.MOD_ID, name));
item.setTranslationKey(ModInfo.MOD_ID + "." + name);
}
public ItemStack getStack() {
return new ItemStack(item);
}
public ItemStack getStack(int amount) {
return new ItemStack(item, amount);
}
public static void register() {
Arrays.stream(ModDustsSmall.values()).forEach(dustSmall -> RebornRegistry.registerItem(dustSmall.item));
}
@SideOnly(Side.CLIENT)
public static void registerModel() {
ResourceLocation blockstateJson = new ResourceLocation(ModInfo.MOD_ID, "items/materials/dustssmall");
Arrays.stream(ModDustsSmall.values())
.forEach(dustSmall -> ModelLoader.setCustomModelResourceLocation(dustSmall.item, 0,
new ModelResourceLocation(blockstateJson, "type=" + dustSmall.name)));
}
@Override
public String getName() {
return name;
}
}

View file

@ -1,83 +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;
import java.util.Arrays;
import com.google.common.base.CaseFormat;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IStringSerializable;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import reborncore.RebornRegistry;
import techreborn.items.ItemGems;
import techreborn.lib.ModInfo;
/**
* @author drcrazy
*
*/
public enum ModGems implements IStringSerializable {
PERIDOT, RED_GARNET, RUBY, SAPPHIRE, YELLOW_GARNET;
public final String name;
public final Item item;
private ModGems() {
name = CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "GEM_" + this.toString());
item = new ItemGems();
item.setRegistryName(new ResourceLocation(ModInfo.MOD_ID, name));
item.setTranslationKey(ModInfo.MOD_ID + "." + name);
}
public ItemStack getStack() {
return new ItemStack(item);
}
public ItemStack getStack(int amount) {
return new ItemStack(item, amount);
}
public static void register() {
Arrays.stream(ModGems.values()).forEach(gem -> RebornRegistry.registerItem(gem.item));
}
@SideOnly(Side.CLIENT)
public static void registerModel() {
ResourceLocation blockstateJson = new ResourceLocation(ModInfo.MOD_ID, "items/materials/gems");
Arrays.stream(ModGems.values()).forEach(gem -> ModelLoader.setCustomModelResourceLocation(gem.item, 0,
new ModelResourceLocation(blockstateJson, "type=" + gem.name)));
}
@Override
public String getName() {
return name;
}
}

View file

@ -1,84 +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;
import java.util.Arrays;
import com.google.common.base.CaseFormat;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IStringSerializable;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import reborncore.RebornRegistry;
import techreborn.items.ItemIngots;
import techreborn.lib.ModInfo;
/**
* @author drcrazy
*
*/
public enum ModIngots implements IStringSerializable {
ADVANCED_ALLOY, ALUMINUM, BRASS, BRONZE, CHROME, COPPER, ELECTRUM, HOT_TUNGSTENSTEEL, INVAR, IRIDIUM_ALLOY, IRIDIUM,
LEAD, MIXED_METAL, NICKEL, PLATINUM, REFINED_IRON, SILVER, STEEL, TIN, TITANIUM, TUNGSTEN, TUNGSTENSTEEL, ZINC;
public final String name;
public final Item item;
private ModIngots() {
name = CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "INGOT_" + this.toString());
item = new ItemIngots();
item.setRegistryName(new ResourceLocation(ModInfo.MOD_ID, name));
item.setTranslationKey(ModInfo.MOD_ID + "." + name);
}
public ItemStack getStack() {
return new ItemStack(item);
}
public ItemStack getStack(int amount) {
return new ItemStack(item, amount);
}
public static void register() {
Arrays.stream(ModIngots.values()).forEach(ingot -> RebornRegistry.registerItem(ingot.item));
}
@SideOnly(Side.CLIENT)
public static void registerModel() {
ResourceLocation blockstateJson = new ResourceLocation(ModInfo.MOD_ID, "items/materials/ingots");
Arrays.stream(ModIngots.values()).forEach(ingot -> ModelLoader.setCustomModelResourceLocation(ingot.item, 0,
new ModelResourceLocation(blockstateJson, "type=" + ingot.name)));
}
@Override
public String getName() {
return name;
}
}

View file

@ -30,7 +30,6 @@ import net.minecraftforge.common.MinecraftForge;
import reborncore.RebornRegistry;
import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.util.BucketHandler;
import reborncore.common.util.OreUtil;
import techreborn.Core;
import techreborn.api.Reference;
import techreborn.blocks.BlockMachineFrames;
@ -149,14 +148,7 @@ public class ModItems {
public static void init() {
ModDusts.register();
ModDustsSmall.register();
ModGems.register();
ModIngots.register();
ModNuggets.register();
ModParts.register();
ModPlates.register();
TRIngredients.register();
ROCK_CUTTER = new ItemRockCutter();
registerItem(ROCK_CUTTER, "rockCutter");

View file

@ -1,84 +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;
import java.util.Arrays;
import com.google.common.base.CaseFormat;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IStringSerializable;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import reborncore.RebornRegistry;
import techreborn.items.ItemNuggets;
import techreborn.lib.ModInfo;
/**
* @author drcrazy
*
*/
public enum ModNuggets implements IStringSerializable {
ALUMINUM, BRASS, BRONZE, CHROME, COPPER, DIAMOND, ELECTRUM, HOT_TUNGSTENSTEEL, INVAR, IRIDIUM, LEAD, NICKEL,
PLATINUM, REFINED_IRON, SILVER, STEEL, TIN, TITANIUM, TUNGSTEN, TUNGSTENSTEEL, ZINC;
public final String name;
public final Item item;
private ModNuggets() {
name = CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "NUGGET_" + this.toString());
item = new ItemNuggets();
item.setRegistryName(new ResourceLocation(ModInfo.MOD_ID, name));
item.setTranslationKey(ModInfo.MOD_ID + "." + name);
}
public ItemStack getStack() {
return new ItemStack(item);
}
public ItemStack getStack(int amount) {
return new ItemStack(item, amount);
}
public static void register() {
Arrays.stream(ModNuggets.values()).forEach(nugget -> RebornRegistry.registerItem(nugget.item));
}
@SideOnly(Side.CLIENT)
public static void registerModel() {
ResourceLocation blockstateJson = new ResourceLocation(ModInfo.MOD_ID, "items/materials/nuggets");
Arrays.stream(ModNuggets.values()).forEach(nugget -> ModelLoader.setCustomModelResourceLocation(nugget.item, 0,
new ModelResourceLocation(blockstateJson, "type=" + nugget.name)));
}
@Override
public String getName() {
return name;
}
}

View file

@ -1,90 +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;
import java.util.Arrays;
import com.google.common.base.CaseFormat;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IStringSerializable;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import reborncore.RebornRegistry;
import techreborn.items.ItemParts;
import techreborn.lib.ModInfo;
/**
* @author drcrazy
*
*/
public enum ModParts implements IStringSerializable {
CARBON_FIBER, CARBON_MESH, CIRCUIT_ADVANCED, CIRCUIT_BASIC, CIRCUIT_ELITE, COMPUTER_MONITOR, COOLANT_SIMPLE, COOLANT_SIX, COOLANT_TRIPLE,
CUPRONICKEL_HEATING_COIL, DATA_ORB, DATA_STORAGE_CIRCUIT, DEPLETED_CELL,
DIAMOND_GRINDING_HEAD, DIAMOND_SAW_BLADE, DOUBLE_DEPLETED_CELL, DOUBLE_PLUTONIUM_CELL, DOUBLE_THORIUM_CELL,
DOUBLE_URANIUM_CELL, ENERGY_FLOW_CIRCUIT, HELIUM_COOLANT_SIMPLE, HELIUM_COOLANT_SIX,
HELIUM_COOLANT_TRIPLE, IRIDIUM_NEUTRON_REFLECTOR, KANTHAL_HEATING_COIL, MACHINE_PARTS, NAK_COOLANT_SIMPLE,
NAK_COOLANT_SIX, NAK_COOLANT_TRIPLE, NEUTRON_REFLECTOR, NICHROME_HEATING_COIL, PLUTONIUM_CELL, QUAD_DEPLETED_CELL,
QUAD_PLUTONIUM_CELL, QUAD_THORIUM_CELL, QUAD_URANIUM_CELL, RUBBER, SAP, SCRAP, SUPER_CONDUCTOR,
THICK_NEUTRON_REFLECTOR, THORIUM_CELL, TUNGSTEN_GRINDING_HEAD, URANIUM_CELL, UU_MATTER;
public final String name;
public final Item item;
private ModParts() {
name = CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, this.toString());
item = new ItemParts();
item.setRegistryName(new ResourceLocation(ModInfo.MOD_ID, name));
item.setTranslationKey(ModInfo.MOD_ID + "." + name);
}
public ItemStack getStack() {
return new ItemStack(item);
}
public ItemStack getStack(int amount) {
return new ItemStack(item, amount);
}
public static void register() {
Arrays.stream(ModParts.values()).forEach(part -> RebornRegistry.registerItem(part.item));
}
@SideOnly(Side.CLIENT)
public static void registerModel() {
ResourceLocation blockstateJson = new ResourceLocation(ModInfo.MOD_ID, "items/materials/parts");
Arrays.stream(ModParts.values()).forEach(part -> ModelLoader.setCustomModelResourceLocation(part.item, 0,
new ModelResourceLocation(blockstateJson, "type=" + part.name)));
}
@Override
public String getName() {
return name;
}
}

View file

@ -1,86 +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;
import java.util.Arrays;
import com.google.common.base.CaseFormat;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IStringSerializable;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import reborncore.RebornRegistry;
import techreborn.lib.ModInfo;
import techreborn.items.ItemPlates;
/**
* @author drcrazy
*
*/
public enum ModPlates implements IStringSerializable {
ADVANCED_ALLOY, ALUMINUM, BRASS, BRONZE, CARBON, COAL, COPPER, DIAMOND, ELECTRUM, EMERALD, GOLD, INVAR,
IRIDIUM_ALLOY, IRIDIUM, IRON, LAPIS, LAZURITE, LEAD, MAGNALIUM, NICKEL, OBSIDIAN, PERIDOT, PLATINUM, RED_GARNET,
REDSTONE, REFINED_IRON, RUBY, SAPPHIRE, SILICON, SILVER, STEEL, TIN, TITANIUM, TUNGSTEN, TUNGSTENSTEEL, WOOD,
YELLOW_GARNET, ZINC;
public final String name;
public final Item item;
private ModPlates() {
name = CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "PLATE_" + this.toString());
item = new ItemPlates();
item.setRegistryName(new ResourceLocation(ModInfo.MOD_ID, name));
item.setTranslationKey(ModInfo.MOD_ID + "." + name);
}
public ItemStack getStack() {
return new ItemStack(item);
}
public ItemStack getStack(int amount) {
return new ItemStack(item, amount);
}
public static void register() {
Arrays.stream(ModPlates.values()).forEach(plate -> RebornRegistry.registerItem(plate.item));
}
@SideOnly(Side.CLIENT)
public static void registerModel() {
ResourceLocation blockstateJson = new ResourceLocation(ModInfo.MOD_ID, "items/materials/plates");
Arrays.stream(ModPlates.values()).forEach(plate -> ModelLoader.setCustomModelResourceLocation(plate.item, 0,
new ModelResourceLocation(blockstateJson, "type=" + plate.name)));
}
@Override
public String getName() {
return name;
}
}

View file

@ -38,17 +38,13 @@ import reborncore.common.util.ItemUtils;
import reborncore.common.util.OreUtil;
import techreborn.Core;
import techreborn.api.Reference;
import techreborn.api.recipe.machines.BlastFurnaceRecipe;
import techreborn.api.recipe.machines.CompressorRecipe;
import techreborn.api.recipe.machines.GrinderRecipe;
import techreborn.api.recipe.machines.VacuumFreezerRecipe;
import techreborn.blocks.BlockOre;
import techreborn.config.ConfigTechReborn;
import techreborn.init.recipes.*;
import techreborn.items.*;
import techreborn.lib.ModInfo;
import java.security.InvalidParameterException;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;

View file

@ -24,7 +24,6 @@
package techreborn.init;
import com.google.common.base.CaseFormat;
import com.google.common.collect.ImmutableList;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
@ -32,7 +31,6 @@ import net.minecraft.item.ItemStack;
import reborncore.common.util.OreUtil;
import techreborn.blocks.BlockMachineFrames;
import techreborn.blocks.cable.BlockCable;
import techreborn.items.*;
public class OreDict {
@ -49,17 +47,17 @@ public class OreDict {
OreUtil.registerOre("glassReinforced", ModBlocks.REINFORCED_GLASS);
// Parts
OreUtil.registerOre("circuitBasic", ModParts.CIRCUIT_BASIC.getStack());
OreUtil.registerOre("circuitAdvanced", ModParts.CIRCUIT_ADVANCED.getStack());
OreUtil.registerOre("circuitElite", ModParts.CIRCUIT_ELITE.getStack());
OreUtil.registerOre("circuitStorage", ModParts.DATA_STORAGE_CIRCUIT.getStack());
OreUtil.registerOre("circuitMaster", ModParts.ENERGY_FLOW_CIRCUIT.getStack());
OreUtil.registerOre("craftingDiamondGrinder", ModParts.DIAMOND_GRINDING_HEAD.getStack());
OreUtil.registerOre("craftingTungstenGrinder", ModParts.TUNGSTEN_GRINDING_HEAD.getStack());
OreUtil.registerOre("craftingSuperconductor", ModParts.SUPER_CONDUCTOR.getStack());
OreUtil.registerOre("materialResin", ModParts.SAP.getStack());
OreUtil.registerOre("materialRubber", ModParts.RUBBER.getStack());
OreUtil.registerOre("itemRubber", ModParts.RUBBER.getStack());
OreUtil.registerOre("circuitBasic", TRIngredients.Parts.CIRCUIT_BASIC.getStack());
OreUtil.registerOre("circuitAdvanced", TRIngredients.Parts.CIRCUIT_ADVANCED.getStack());
OreUtil.registerOre("circuitElite", TRIngredients.Parts.CIRCUIT_ELITE.getStack());
OreUtil.registerOre("circuitStorage", TRIngredients.Parts.DATA_STORAGE_CIRCUIT.getStack());
OreUtil.registerOre("circuitMaster", TRIngredients.Parts.ENERGY_FLOW_CIRCUIT.getStack());
OreUtil.registerOre("craftingDiamondGrinder", TRIngredients.Parts.DIAMOND_GRINDING_HEAD.getStack());
OreUtil.registerOre("craftingTungstenGrinder", TRIngredients.Parts.TUNGSTEN_GRINDING_HEAD.getStack());
OreUtil.registerOre("craftingSuperconductor", TRIngredients.Parts.SUPER_CONDUCTOR.getStack());
OreUtil.registerOre("materialResin", TRIngredients.Parts.SAP.getStack());
OreUtil.registerOre("materialRubber", TRIngredients.Parts.RUBBER.getStack());
OreUtil.registerOre("itemRubber", TRIngredients.Parts.RUBBER.getStack());
// Frames
OreUtil.registerOre("machineBlockBasic", BlockMachineFrames.getFrameByName("machine", 1));
@ -78,7 +76,7 @@ public class OreDict {
OreUtil.registerOre("craftingIndustrialDiamond", Items.DIAMOND);
OreUtil.registerOre("insulatedGoldCableItem", BlockCable.getCableByName("insulatedgold"));
OreUtil.registerOre("fertilizer", new ItemStack(Items.DYE, 1, 15));
OreUtil.registerOre("pulpWood", ModDusts.SAW.getStack());
OreUtil.registerOre("pulpWood", TRIngredients.Dusts.SAW.getStack());
//OreUtil.registerOre("uran235", nothing);
//OreUtil.registerOre("uran238", nothing);

View file

@ -49,6 +49,11 @@ public class TRIngredients {
public static void register() {
Arrays.stream(Dusts.values()).forEach(value -> RebornRegistry.registerItem(value.item));
Arrays.stream(DustsSmall.values()).forEach(value -> RebornRegistry.registerItem(value.item));
Arrays.stream(Gems.values()).forEach(value -> RebornRegistry.registerItem(value.item));
Arrays.stream(Ingots.values()).forEach(value -> RebornRegistry.registerItem(value.item));
Arrays.stream(Nuggets.values()).forEach(value -> RebornRegistry.registerItem(value.item));
Arrays.stream(Parts.values()).forEach(value -> RebornRegistry.registerItem(value.item));
Arrays.stream(Plates.values()).forEach(value -> RebornRegistry.registerItem(value.item));
}
@SideOnly(Side.CLIENT)
@ -61,6 +66,25 @@ public class TRIngredients {
Arrays.stream(DustsSmall.values()).forEach(value -> ModelLoader.setCustomModelResourceLocation(value.item, 0,
new ModelResourceLocation(dustsSmallRL, "type=" + value.name)));
ResourceLocation gemsRL = new ResourceLocation(ModInfo.MOD_ID, "items/materials/gems");
Arrays.stream(Gems.values()).forEach(value -> ModelLoader.setCustomModelResourceLocation(value.item, 0,
new ModelResourceLocation(gemsRL, "type=" + value.name)));
ResourceLocation ingotsRL = new ResourceLocation(ModInfo.MOD_ID, "items/materials/ingots");
Arrays.stream(Ingots.values()).forEach(value -> ModelLoader.setCustomModelResourceLocation(value.item, 0,
new ModelResourceLocation(ingotsRL, "type=" + value.name)));
ResourceLocation nuggetsRL = new ResourceLocation(ModInfo.MOD_ID, "items/materials/nuggets");
Arrays.stream(Nuggets.values()).forEach(value -> ModelLoader.setCustomModelResourceLocation(value.item, 0,
new ModelResourceLocation(nuggetsRL, "type=" + value.name)));
ResourceLocation partsRL = new ResourceLocation(ModInfo.MOD_ID, "items/materials/parts");
Arrays.stream(Parts.values()).forEach(value -> ModelLoader.setCustomModelResourceLocation(value.item, 0,
new ModelResourceLocation(partsRL, "type=" + value.name)));
ResourceLocation platesRL = new ResourceLocation(ModInfo.MOD_ID, "items/materials/plates");
Arrays.stream(Plates.values()).forEach(value -> ModelLoader.setCustomModelResourceLocation(value.item, 0,
new ModelResourceLocation(platesRL, "type=" + value.name)));
}
public static enum Dusts implements IStringSerializable {
@ -96,7 +120,7 @@ public class TRIngredients {
}
}
public enum DustsSmall implements IStringSerializable {
public static enum DustsSmall implements IStringSerializable {
ALMANDINE, ALUMINUM, ANDESITE, ANDRADITE, ASHES, BASALT, BAUXITE, BRASS, BRONZE, CALCITE, CHARCOAL, CHROME,
CINNABAR, CLAY, COAL, COPPER, DARK_ASHES, DIAMOND, DIORITE, ELECTRUM, EMERALD, ENDER_EYE, ENDER_PEARL, ENDSTONE,
FLINT, GALENA, GLOWSTONE, GOLD, GRANITE, GROSSULAR, INVAR, IRON, LAZURITE, LEAD, MAGNESIUM, MANGANESE, MARBLE,
@ -128,5 +152,156 @@ public class TRIngredients {
return name;
}
}
public static enum Gems implements IStringSerializable {
PERIDOT, RED_GARNET, RUBY, SAPPHIRE, YELLOW_GARNET;
public final String name;
public final Item item;
private Gems() {
name = CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "GEM_" + this.toString());
item = new ItemTR();
item.setRegistryName(new ResourceLocation(ModInfo.MOD_ID, name));
item.setTranslationKey(ModInfo.MOD_ID + "." + name);
TRRecipeHandler.hideEntry(item);
}
public ItemStack getStack() {
return new ItemStack(item);
}
public ItemStack getStack(int amount) {
return new ItemStack(item, amount);
}
@Override
public String getName() {
return name;
}
}
public static enum Ingots implements IStringSerializable {
ADVANCED_ALLOY, ALUMINUM, BRASS, BRONZE, CHROME, COPPER, ELECTRUM, HOT_TUNGSTENSTEEL, INVAR, IRIDIUM_ALLOY, IRIDIUM,
LEAD, MIXED_METAL, NICKEL, PLATINUM, REFINED_IRON, SILVER, STEEL, TIN, TITANIUM, TUNGSTEN, TUNGSTENSTEEL, ZINC;
public final String name;
public final Item item;
private Ingots() {
name = CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "INGOT_" + this.toString());
item = new ItemTR();
item.setRegistryName(new ResourceLocation(ModInfo.MOD_ID, name));
item.setTranslationKey(ModInfo.MOD_ID + "." + name);
TRRecipeHandler.hideEntry(item);
}
public ItemStack getStack() {
return new ItemStack(item);
}
public ItemStack getStack(int amount) {
return new ItemStack(item, amount);
}
@Override
public String getName() {
return name;
}
}
public static enum Nuggets implements IStringSerializable {
ALUMINUM, BRASS, BRONZE, CHROME, COPPER, DIAMOND, ELECTRUM, HOT_TUNGSTENSTEEL, INVAR, IRIDIUM, LEAD, NICKEL,
PLATINUM, REFINED_IRON, SILVER, STEEL, TIN, TITANIUM, TUNGSTEN, TUNGSTENSTEEL, ZINC;
public final String name;
public final Item item;
private Nuggets() {
name = CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "NUGGET_" + this.toString());
item = new ItemTR();
item.setRegistryName(new ResourceLocation(ModInfo.MOD_ID, name));
item.setTranslationKey(ModInfo.MOD_ID + "." + name);
TRRecipeHandler.hideEntry(item);
}
public ItemStack getStack() {
return new ItemStack(item);
}
public ItemStack getStack(int amount) {
return new ItemStack(item, amount);
}
@Override
public String getName() {
return name;
}
}
public static enum Parts implements IStringSerializable {
CARBON_FIBER, CARBON_MESH, CIRCUIT_ADVANCED, CIRCUIT_BASIC, CIRCUIT_ELITE, COMPUTER_MONITOR, COOLANT_SIMPLE, COOLANT_SIX, COOLANT_TRIPLE,
CUPRONICKEL_HEATING_COIL, DATA_ORB, DATA_STORAGE_CIRCUIT, DEPLETED_CELL,
DIAMOND_GRINDING_HEAD, DIAMOND_SAW_BLADE, DOUBLE_DEPLETED_CELL, DOUBLE_PLUTONIUM_CELL, DOUBLE_THORIUM_CELL,
DOUBLE_URANIUM_CELL, ENERGY_FLOW_CIRCUIT, HELIUM_COOLANT_SIMPLE, HELIUM_COOLANT_SIX,
HELIUM_COOLANT_TRIPLE, IRIDIUM_NEUTRON_REFLECTOR, KANTHAL_HEATING_COIL, MACHINE_PARTS, NAK_COOLANT_SIMPLE,
NAK_COOLANT_SIX, NAK_COOLANT_TRIPLE, NEUTRON_REFLECTOR, NICHROME_HEATING_COIL, PLUTONIUM_CELL, QUAD_DEPLETED_CELL,
QUAD_PLUTONIUM_CELL, QUAD_THORIUM_CELL, QUAD_URANIUM_CELL, RUBBER, SAP, SCRAP, SUPER_CONDUCTOR,
THICK_NEUTRON_REFLECTOR, THORIUM_CELL, TUNGSTEN_GRINDING_HEAD, URANIUM_CELL, UU_MATTER;
public final String name;
public final Item item;
private Parts() {
name = CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, this.toString());
item = new ItemTR();
item.setRegistryName(new ResourceLocation(ModInfo.MOD_ID, name));
item.setTranslationKey(ModInfo.MOD_ID + "." + name);
TRRecipeHandler.hideEntry(item);
}
public ItemStack getStack() {
return new ItemStack(item);
}
public ItemStack getStack(int amount) {
return new ItemStack(item, amount);
}
@Override
public String getName() {
return name;
}
}
public static enum Plates implements IStringSerializable {
ADVANCED_ALLOY, ALUMINUM, BRASS, BRONZE, CARBON, COAL, COPPER, DIAMOND, ELECTRUM, EMERALD, GOLD, INVAR,
IRIDIUM_ALLOY, IRIDIUM, IRON, LAPIS, LAZURITE, LEAD, MAGNALIUM, NICKEL, OBSIDIAN, PERIDOT, PLATINUM, RED_GARNET,
REDSTONE, REFINED_IRON, RUBY, SAPPHIRE, SILICON, SILVER, STEEL, TIN, TITANIUM, TUNGSTEN, TUNGSTENSTEEL, WOOD,
YELLOW_GARNET, ZINC;
public final String name;
public final Item item;
private Plates() {
name = CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "PLATE_" + this.toString());
item = new ItemTR();
item.setRegistryName(new ResourceLocation(ModInfo.MOD_ID, name));
item.setTranslationKey(ModInfo.MOD_ID + "." + name);
TRRecipeHandler.hideEntry(item);
}
public ItemStack getStack() {
return new ItemStack(item);
}
public ItemStack getStack(int amount) {
return new ItemStack(item, amount);
}
@Override
public String getName() {
return name;
}
}
}

View file

@ -31,8 +31,6 @@ import reborncore.api.recipe.RecipeHandler;
import reborncore.common.util.OreUtil;
import techreborn.api.Reference;
import techreborn.api.recipe.machines.AlloySmelterRecipe;
import techreborn.items.ItemDusts;
import techreborn.items.ItemIngots;
/**
* @author drcrazy

View file

@ -24,15 +24,12 @@
package techreborn.init.recipes;
import com.google.common.base.CaseFormat;
import net.minecraft.init.Blocks;
import net.minecraft.init.Enchantments;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
import reborncore.common.util.OreUtil;
import reborncore.common.util.RebornCraftingHelper;
import reborncore.common.util.StringUtils;
import techreborn.Core;
import techreborn.blocks.BlockStorage;
import techreborn.blocks.BlockStorage2;
@ -40,7 +37,7 @@ import techreborn.blocks.cable.EnumCableType;
import techreborn.config.ConfigTechReborn;
import techreborn.init.ModBlocks;
import techreborn.init.ModItems;
import techreborn.init.ModParts;
import techreborn.init.TRIngredients;
import techreborn.items.*;
/**
@ -87,7 +84,7 @@ public class CraftingTableRecipes extends RecipeMethods {
registerShaped(getStack(ModItems.ENERGY_CRYSTAL), "RRR", "RDR", "RRR", 'R', "dustRedstone", 'D', "gemDiamond");
registerShaped(getStack(ModItems.LAPOTRONIC_CRYSTAL), "LCL", "LEL", "LCL", 'L', "dyeBlue", 'E', "energyCrystal", 'C', "circuitBasic");
registerShaped(getStack(ModItems.LAPOTRONIC_ORB), "LLL", "LPL", "LLL", 'L', "lapotronCrystal", 'P', "plateIridiumAlloy");
registerShaped(getStack(ModItems.SCRAP_BOX), "SSS", "SSS", "SSS", 'S', ModParts.SCRAP.getStack());
registerShaped(getStack(ModItems.SCRAP_BOX), "SSS", "SSS", "SSS", 'S', TRIngredients.Parts.SCRAP.getStack());
registerShapeless(getStack(ModItems.FREQUENCY_TRANSMITTER), EnumCableType.ICOPPER.getStack(), "circuitBasic");
if (ConfigTechReborn.enableGemArmorAndTools) {
@ -99,9 +96,9 @@ public class CraftingTableRecipes extends RecipeMethods {
//Upgrades
registerShaped(ItemUpgrades.getUpgradeByName("energy_storage"), "PPP", "WBW", "PCP", 'P', "plankWood", 'W', EnumCableType.ICOPPER.getStack(), 'C', "circuitBasic", 'B', "reBattery");
registerShaped(ItemUpgrades.getUpgradeByName("overclock"), "TTT", "WCW", 'T', ModParts.COOLANT_SIMPLE.getStack(), 'W', EnumCableType.ICOPPER.getStack(), 'C', "circuitBasic");
registerShaped(ItemUpgrades.getUpgradeByName("overclock", 2), " T ", "WCW", 'T', ModParts.HELIUM_COOLANT_TRIPLE.getStack(), 'W', EnumCableType.ICOPPER.getStack(), 'C', "circuitBasic");
registerShaped(ItemUpgrades.getUpgradeByName("overclock", 2), " T ", "WCW", 'T', ModParts.NAK_COOLANT_SIMPLE.getStack(), 'W', EnumCableType.ICOPPER.getStack(), 'C', "circuitBasic");
registerShaped(ItemUpgrades.getUpgradeByName("overclock"), "TTT", "WCW", 'T', TRIngredients.Parts.COOLANT_SIMPLE.getStack(), 'W', EnumCableType.ICOPPER.getStack(), 'C', "circuitBasic");
registerShaped(ItemUpgrades.getUpgradeByName("overclock", 2), " T ", "WCW", 'T', TRIngredients.Parts.HELIUM_COOLANT_TRIPLE.getStack(), 'W', EnumCableType.ICOPPER.getStack(), 'C', "circuitBasic");
registerShaped(ItemUpgrades.getUpgradeByName("overclock", 2), " T ", "WCW", 'T', TRIngredients.Parts.NAK_COOLANT_SIMPLE.getStack(), 'W', EnumCableType.ICOPPER.getStack(), 'C', "circuitBasic");
registerShaped(ItemUpgrades.getUpgradeByName("transformer"), "GGG", "WTW", "GCG", 'G', "blockGlass", 'W', EnumCableType.IGOLD.getStack(), 'C', "circuitBasic", 'T', getStack(ModBlocks.MV_TRANSFORMER));
//Machines
@ -121,7 +118,7 @@ public class CraftingTableRecipes extends RecipeMethods {
registerShaped(getStack(ModBlocks.INDUSTRIAL_ELECTROLYZER), "RER", "CFC", "RER", 'R', "plateIron", 'E', getStack(ModBlocks.EXTRACTOR), 'C', "circuitAdvanced", 'F', "machineBlockAdvanced");
registerShaped(getStack(ModBlocks.INDUSTRIAL_CENTRIFUGE), "RCR", "AEA", "RCR", 'R', "ingotRefinedIron", 'E', getStack(ModBlocks.EXTRACTOR), 'A', "machineBlockAdvanced", 'C', "circuitAdvanced");
registerShaped(getStack(ModBlocks.INDUSTRIAL_CENTRIFUGE), "RCR", "AEA", "RCR", 'R', "plateAluminum", 'E', getStack(ModBlocks.EXTRACTOR), 'A', "machineBlockAdvanced", 'C', "circuitAdvanced");
registerShaped(getStack(ModBlocks.INDUSTRIAL_SAWMILL), "PAP", "SSS", "ACA", 'P', "ingotRefinedIron", 'A', "circuitAdvanced", 'S', ModParts.DIAMOND_SAW_BLADE.getStack(), 'C', "machineBlockAdvanced");
registerShaped(getStack(ModBlocks.INDUSTRIAL_SAWMILL), "PAP", "SSS", "ACA", 'P', "ingotRefinedIron", 'A', "circuitAdvanced", 'S', TRIngredients.Parts.DIAMOND_SAW_BLADE.getStack(), 'C', "machineBlockAdvanced");
registerShaped(getStack(ModBlocks.INDUSTRIAL_BLAST_FURNACE), "CHC", "HBH", "FHF", 'H', getMaterial("cupronickelHeatingCoil", Type.PART), 'C', "circuitAdvanced", 'B', "machineBlockAdvanced", 'F', getStack(ModBlocks.ELECTRIC_FURNACE));
registerShaped(getStack(ModBlocks.INDUSTRIAL_GRINDER), "ECG", "HHH", "CBC", 'E', getStack(ModBlocks.INDUSTRIAL_ELECTROLYZER), 'H', "craftingDiamondGrinder", 'C', "circuitAdvanced", 'B', "machineBlockAdvanced", 'G', getStack(ModBlocks.GRINDER));
// registerShaped(getStack(ModBlocks.IMPLOSION_COMPRESSOR), "ABA", "CPC", "ABA", 'A', getMaterialObject("advancedAlloy", Type.INGOT), 'C', "circuitAdvanced", 'B', "machineBlockAdvanced", 'P', getStack(ModBlocks.COMPRESSOR));
@ -139,10 +136,10 @@ public class CraftingTableRecipes extends RecipeMethods {
registerShaped(getStack(ModBlocks.SCRAPBOXINATOR), "ICI", "DSD", "ICI", 'S', getStack(ModItems.SCRAP_BOX), 'C', "circuitBasic", 'I', "plateIron", 'D', "dirt");
registerShaped(getStack(ModBlocks.FUSION_CONTROL_COMPUTER), "CCC", "PTP", "CCC", 'P', "energyCrystal", 'T', getStack(ModBlocks.FUSION_COIL), 'C', "circuitMaster");
registerShaped(getStack(ModBlocks.FUSION_COIL), "CSC", "NAN", "CRC", 'A', getStack(ModBlocks.MACHINE_CASINGS, 1, 2), 'N', getMaterial("nichromeHeatingCoil", Type.PART), 'C', "circuitMaster", 'S', "craftingSuperconductor", 'R', getMaterial("iridiumNeutronReflector", Type.PART));
registerShaped(getStack(ModBlocks.DIGITAL_CHEST), "PPP", "PDP", "PCP", 'P', "plateAluminum", 'D', ModParts.DATA_ORB.getStack(), 'C', ModParts.COMPUTER_MONITOR.getStack());
registerShaped(getStack(ModBlocks.DIGITAL_CHEST), "PPP", "PDP", "PCP", 'P', "plateSteel", 'D', ModParts.DATA_ORB.getStack(), 'C', ModParts.COMPUTER_MONITOR.getStack());
registerShaped(getStack(ModBlocks.DIGITAL_CHEST), "PPP", "PDP", "PCP", 'P', "plateAluminum", 'D', TRIngredients.Parts.DATA_ORB.getStack(), 'C', TRIngredients.Parts.COMPUTER_MONITOR.getStack());
registerShaped(getStack(ModBlocks.DIGITAL_CHEST), "PPP", "PDP", "PCP", 'P', "plateSteel", 'D', TRIngredients.Parts.DATA_ORB.getStack(), 'C', TRIngredients.Parts.COMPUTER_MONITOR.getStack());
registerShaped(getStack(ModBlocks.MATTER_FABRICATOR), "ETE", "AOA", "ETE", 'E', "circuitMaster", 'T', getStack(ModBlocks.EXTRACTOR), 'A', "machineBlockElite", 'O', getStack(ModItems.LAPOTRONIC_ORB));
registerShaped(getStack(ModBlocks.COMPUTER_CUBE), "OMC", "MFM", "CMO", 'O', ModParts.DATA_ORB.getStack(), 'M', ModParts.COMPUTER_MONITOR.getStack(), 'C', "circuitMaster", 'F', "machineBlockAdvanced");
registerShaped(getStack(ModBlocks.COMPUTER_CUBE), "OMC", "MFM", "CMO", 'O', TRIngredients.Parts.DATA_ORB.getStack(), 'M', TRIngredients.Parts.COMPUTER_MONITOR.getStack(), 'C', "circuitMaster", 'F', "machineBlockAdvanced");
registerShaped(getStack(ModBlocks.PLAYER_DETECTOR, true), " D ", "CFC", " D ", 'D', "circuitStorage", 'C', "circuitAdvanced", 'F', getStack(ModBlocks.COMPUTER_CUBE));
registerShaped(getStack(ModBlocks.DRAGON_EGG_SYPHON), "CTC", "PSP", "CBC", 'C', "circuitMaster", 'T', getStack(ModBlocks.MEDIUM_VOLTAGE_SU), 'P', "plateIridiumAlloy", 'S', "craftingSuperconductor", 'B', getStack(ModItems.LAPOTRONIC_ORB));
registerShaped(getStack(ModBlocks.PLASMA_GENERATOR), "PPP", "PTP", "CGC", 'P', "plateTungstensteel", 'T', getStack(ModBlocks.HV_TRANSFORMER), 'C', "circuitMaster", 'G', getStack(ModBlocks.SOLID_FUEL_GENEREATOR));
@ -170,9 +167,9 @@ public class CraftingTableRecipes extends RecipeMethods {
registerShaped(getStack(ModBlocks.IRON_FURNACE), " I ", "I I", "IFI", 'I', "ingotIron", 'F', getStack(Blocks.FURNACE));
registerShaped(getStack(ModBlocks.EXTRACTOR), "TMT", "TCT", " ", 'T', getStack(ModItems.TREE_TAP, true), 'M', "machineBlockBasic", 'C', "circuitBasic");
registerShaped(getStack(ModBlocks.GRINDER), "FFF", "SMS", " C ", 'F', Items.FLINT, 'S', getStack(Blocks.COBBLESTONE), 'M', "machineBlockBasic", 'C', "circuitBasic");
registerShaped(getStack(ModBlocks.QUANTUM_CHEST), "DCD", "ATA", "DQD", 'D', ModParts.DATA_ORB.getStack(), 'C', ModParts.COMPUTER_MONITOR.getStack(), 'A', "machineBlockElite", 'Q', getStack(ModBlocks.DIGITAL_CHEST), 'T', getStack(ModBlocks.COMPRESSOR));
registerShaped(getStack(ModBlocks.QUANTUM_CHEST), "DCD", "ATA", "DQD", 'D', TRIngredients.Parts.DATA_ORB.getStack(), 'C', TRIngredients.Parts.COMPUTER_MONITOR.getStack(), 'A', "machineBlockElite", 'Q', getStack(ModBlocks.DIGITAL_CHEST), 'T', getStack(ModBlocks.COMPRESSOR));
registerShaped(getStack(ModBlocks.QUANTUM_TANK), "EPE", "PCP", "EPE", 'P', "platePlatinum", 'E', "circuitAdvanced", 'C', getStack(ModBlocks.QUANTUM_CHEST));
registerShaped(getStack(ModBlocks.LAMP_INCANDESCENT), "GGG", "TCT", "GGG", 'G', "paneGlass", 'T', getMaterial("copper", Type.CABLE), 'C', ModParts.CARBON_FIBER.getStack());
registerShaped(getStack(ModBlocks.LAMP_INCANDESCENT), "GGG", "TCT", "GGG", 'G', "paneGlass", 'T', getMaterial("copper", Type.CABLE), 'C', TRIngredients.Parts.CARBON_FIBER.getStack());
registerShaped(getStack(ModBlocks.LAMP_LED), "GGG", "TLT", "GGG", 'G', "paneGlass", 'T', getMaterial("tin", Type.CABLE), 'L', "dustGlowstone");
@ -243,7 +240,7 @@ public class CraftingTableRecipes extends RecipeMethods {
//UU-Matter
ItemStack uuStack = ModParts.UU_MATTER.getStack();
ItemStack uuStack = TRIngredients.Parts.UU_MATTER.getStack();
registerShaped(getStack(Blocks.LOG, 8), " U ", " ", " ", 'U', uuStack);
registerShaped(getStack(Blocks.STONE, 16), " ", " U ", " ", 'U', uuStack);
registerShaped(getStack(Blocks.SNOW, 16), "U U", " ", " ", 'U', uuStack);

View file

@ -32,7 +32,6 @@ import net.minecraftforge.fluids.FluidRegistry;
import reborncore.api.recipe.RecipeHandler;
import techreborn.api.Reference;
import techreborn.api.recipe.machines.ExtractorRecipe;
import techreborn.init.ModBlocks;
import techreborn.items.DynamicCell;
/**

View file

@ -27,27 +27,22 @@ package techreborn.init.recipes;
import techreborn.api.reactor.FusionReactorRecipe;
import techreborn.api.reactor.FusionReactorRecipeHelper;
import techreborn.blocks.BlockOre;
import techreborn.init.TRIngredients;
import techreborn.items.ItemCells;
import techreborn.items.ItemDusts;
/**
* @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));
// TODO: Fix Recipe
// FusionReactorRecipeHelper.registerRecipe(
// new FusionReactorRecipe(ItemCells.getCellByName("wolframium"), ItemCells.getCellByName("Berylium"),
// ItemDusts.getDustByName("platinum"), 80000000, -2048, 1024));
FusionReactorRecipeHelper.registerRecipe(
new FusionReactorRecipe(ItemCells.getCellByName("wolframium"), ItemCells.getCellByName("lithium"),
BlockOre.getOreByName("iridium"), 90000000, -2048, 1024));
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"), TRIngredients.Dusts.PLATINUM.getStack(), 80000000, -2048, 1024));
FusionReactorRecipeHelper.registerRecipe(new FusionReactorRecipe(ItemCells.getCellByName("wolframium"),
ItemCells.getCellByName("lithium"), BlockOre.getOreByName("iridium"), 90000000, -2048, 1024));
}
}

View file

@ -25,7 +25,6 @@
package techreborn.init.recipes;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import reborncore.api.recipe.RecipeHandler;
import techreborn.api.Reference;

View file

@ -30,7 +30,6 @@ import net.minecraft.item.ItemStack;
import reborncore.api.recipe.RecipeHandler;
import techreborn.api.Reference;
import techreborn.api.recipe.machines.CentrifugeRecipe;
import techreborn.init.ModBlocks;
import techreborn.items.DynamicCell;
import java.security.InvalidParameterException;

View file

@ -24,7 +24,6 @@
package techreborn.init.recipes;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidRegistry;
@ -32,7 +31,6 @@ import net.minecraftforge.fluids.FluidStack;
import reborncore.api.recipe.RecipeHandler;
import techreborn.api.Reference;
import techreborn.api.recipe.machines.IndustrialGrinderRecipe;
import techreborn.blocks.BlockOre;
import techreborn.init.ModFluids;
import java.security.InvalidParameterException;

View file

@ -40,7 +40,7 @@ import reborncore.common.registration.impl.ConfigRegistry;
import reborncore.common.util.ItemUtils;
import techreborn.api.Reference;
import techreborn.api.recipe.machines.IndustrialSawmillRecipe;
import techreborn.init.ModDusts;
import techreborn.init.TRIngredients;
import techreborn.lib.ModInfo;
import javax.annotation.Nonnull;
@ -116,7 +116,7 @@ public class IndustrialSawmillRecipes extends RecipeMethods {
public static void addRecipe(ItemStack log, ItemStack plank) {
plank.setCount(plankCount);
register(log, WATER, 100, 128, plank, ModDusts.SAW.getStack(3), getStack(Items.PAPER, 1));
register(log, WATER, 100, 128, plank, TRIngredients.Dusts.SAW.getStack(3), getStack(Items.PAPER, 1));
}
static void register(ItemStack input1, FluidStack fluid, int ticks, int euPerTick, ItemStack... outputs) {

View file

@ -34,7 +34,6 @@ import techreborn.api.Reference;
import techreborn.api.recipe.machines.ScrapboxRecipe;
import techreborn.init.ModBlocks;
import techreborn.items.DynamicCell;
import techreborn.items.ItemDusts;
import techreborn.utils.StackWIPHandler;
/**

View file

@ -29,7 +29,7 @@ import net.minecraft.item.ItemStack;
import reborncore.common.util.RebornCraftingHelper;
import techreborn.blocks.BlockOre;
import techreborn.blocks.BlockOre2;
import techreborn.items.ItemIngots;
import techreborn.init.TRIngredients;
/**
* Created by Prospector
@ -37,15 +37,16 @@ import techreborn.items.ItemIngots;
public class SmeltingRecipes extends RecipeMethods {
public static void init() {
// register(getMaterial("sap", Type.PART), getMaterial("rubber", Type.PART));
register(getStack(Items.IRON_INGOT), TRIngredients.Ingots.REFINED_IRON.getStack());
register(TRIngredients.Parts.SAP.getStack(), TRIngredients.Parts.RUBBER.getStack());
register(TRIngredients.Ingots.MIXED_METAL.getStack(), TRIngredients.Ingots.ADVANCED_ALLOY.getStack());
register(BlockOre.getOreByName("silver"), TRIngredients.Ingots.SILVER.getStack());
register(BlockOre2.getOreByName("tin"), TRIngredients.Ingots.TIN.getStack());
// TODO: Fix recipe
// register(getStack(Items.IRON_INGOT), getMaterial("refined_iron", Type.INGOT));
// register(BlockOre2.getOreByName("copper"), getMaterial("copper", Type.INGOT));
// register(BlockOre2.getOreByName("tin"), getMaterial("tin", Type.INGOT));
// register(BlockOre.getOreByName("silver"), getMaterial("silver", Type.INGOT));
// register(BlockOre.getOreByName("lead"), getMaterial("lead", Type.INGOT));
// register(BlockOre.getOreByName("sheldonite"), getMaterial("platinum", Type.INGOT));
// register(ItemIngots.getIngotByName("mixed_metal"), getMaterial("advanced_alloy", Type.INGOT));
// Dust smelting
// register(getMaterial("iron", Type.DUST), getStack(Items.IRON_INGOT));