diff --git a/src/main/java/techreborn/blocks/BlockQuantumChest.java b/src/main/java/techreborn/blocks/BlockQuantumChest.java index e193d6f88..fa6c85330 100644 --- a/src/main/java/techreborn/blocks/BlockQuantumChest.java +++ b/src/main/java/techreborn/blocks/BlockQuantumChest.java @@ -27,7 +27,7 @@ public class BlockQuantumChest extends BlockMachineBase { public BlockQuantumChest() { super(Material.rock); - setHardness(2f); + setBlockName("techreborn.quantumChest"); } @Override diff --git a/src/main/java/techreborn/blocks/BlockQuantumTank.java b/src/main/java/techreborn/blocks/BlockQuantumTank.java index 283ab3147..f16e428d8 100644 --- a/src/main/java/techreborn/blocks/BlockQuantumTank.java +++ b/src/main/java/techreborn/blocks/BlockQuantumTank.java @@ -23,7 +23,7 @@ public class BlockQuantumTank extends BlockMachineBase { public BlockQuantumTank() { super(Material.rock); - setHardness(2f); + setBlockName("techreborn.quantumTank"); } @Override diff --git a/src/main/java/techreborn/blocks/generator/BlockThermalGenerator.java b/src/main/java/techreborn/blocks/generator/BlockThermalGenerator.java index 1503e17ac..1d7ccfde4 100644 --- a/src/main/java/techreborn/blocks/generator/BlockThermalGenerator.java +++ b/src/main/java/techreborn/blocks/generator/BlockThermalGenerator.java @@ -37,7 +37,7 @@ public class BlockThermalGenerator extends BlockMachineBase { public BlockThermalGenerator() { super(Material.rock); - setHardness(2f); + setBlockName("techreborn.thermalGenerator"); } @Override diff --git a/src/main/java/techreborn/blocks/machine/BlockAlloyFurnace.java b/src/main/java/techreborn/blocks/machine/BlockAlloyFurnace.java index 944c541ca..30fd848a2 100644 --- a/src/main/java/techreborn/blocks/machine/BlockAlloyFurnace.java +++ b/src/main/java/techreborn/blocks/machine/BlockAlloyFurnace.java @@ -26,6 +26,9 @@ public class BlockAlloyFurnace extends BlockMachineBase { @SideOnly(Side.CLIENT) private IIcon iconFront; + + @SideOnly(Side.CLIENT) + private IIcon iconFrontOn; @SideOnly(Side.CLIENT) private IIcon iconTop; @@ -45,6 +48,7 @@ public class BlockAlloyFurnace extends BlockMachineBase { { this.blockIcon = icon.registerIcon("techreborn:machine/alloy_furnace_side"); this.iconFront = icon.registerIcon("techreborn:machine/alloy_furnace_front_off"); + this.iconFrontOn = icon.registerIcon("techreborn:machine/alloy_furnace_front_on"); this.iconTop = icon.registerIcon("techreborn:machine/alloy_furnace_top"); this.iconBottom = icon.registerIcon("techreborn:machine/alloy_furnace_bottom"); } @@ -52,7 +56,6 @@ public class BlockAlloyFurnace extends BlockMachineBase { @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata) { - return metadata == 0 && side == 3 ? this.iconFront : side == 1 ? this.iconTop : side == 0 ? this.iconBottom: (side == 0 ? this.iconTop diff --git a/src/main/java/techreborn/blocks/machine/BlockCentrifuge.java b/src/main/java/techreborn/blocks/machine/BlockCentrifuge.java index 3a00f3101..88f0c8ef0 100644 --- a/src/main/java/techreborn/blocks/machine/BlockCentrifuge.java +++ b/src/main/java/techreborn/blocks/machine/BlockCentrifuge.java @@ -32,7 +32,7 @@ public class BlockCentrifuge extends BlockMachineBase { public BlockCentrifuge() { super(Material.rock); - setHardness(2F); + setBlockName("techreborn.centrifuge"); } @Override diff --git a/src/main/java/techreborn/client/gui/GuiRollingMachine.java b/src/main/java/techreborn/client/gui/GuiRollingMachine.java index 2889ea914..b641f93b9 100644 --- a/src/main/java/techreborn/client/gui/GuiRollingMachine.java +++ b/src/main/java/techreborn/client/gui/GuiRollingMachine.java @@ -11,7 +11,7 @@ import techreborn.tiles.TileRollingMachine; public class GuiRollingMachine extends GuiContainer { private static final ResourceLocation texture = new ResourceLocation( - "techreborn", "textures/gui/rollingmachine.png"); + "techreborn", "textures/gui/rolling_machine.png"); TileRollingMachine rollingMachine; public GuiRollingMachine(EntityPlayer player, diff --git a/src/main/java/techreborn/compat/nei/NEIConfig.java b/src/main/java/techreborn/compat/nei/NEIConfig.java index 9c1e85baf..675a578c5 100644 --- a/src/main/java/techreborn/compat/nei/NEIConfig.java +++ b/src/main/java/techreborn/compat/nei/NEIConfig.java @@ -6,8 +6,11 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.inventory.GuiContainer; import scala.tools.nsc.backend.icode.analysis.TypeFlowAnalysis; +import techreborn.compat.nei.recipes.AlloySmelterRecipeHandler; +import techreborn.compat.nei.recipes.AssemblingMachineRecipeHandler; import techreborn.compat.nei.recipes.GenericRecipeHander; import techreborn.compat.nei.recipes.ImplosionCompressorRecipeHandler; +import techreborn.compat.nei.recipes.LatheRecipeHandler; import techreborn.lib.ModInfo; import codechicken.nei.api.API; import codechicken.nei.api.IConfigureNEI; @@ -33,10 +36,23 @@ public class NEIConfig implements IConfigureNEI { ShapedRollingMachineHandler shapedRollingMachineHandler = new ShapedRollingMachineHandler(); ShapelessRollingMachineHandler shapelessRollingMachineHandler = new ShapelessRollingMachineHandler(); NEIConfig.blastFurnaceRecipeHandle = new BlastFurnaceRecipeHandler(); + ImplosionCompressorRecipeHandler implosion = new ImplosionCompressorRecipeHandler(); API.registerUsageHandler(implosion); API.registerRecipeHandler(implosion); + + AlloySmelterRecipeHandler alloy = new AlloySmelterRecipeHandler(); + API.registerUsageHandler(alloy); + API.registerRecipeHandler(alloy); + + AssemblingMachineRecipeHandler assembling = new AssemblingMachineRecipeHandler(); + API.registerUsageHandler(assembling); + API.registerRecipeHandler(assembling); + + LatheRecipeHandler lathe = new LatheRecipeHandler(); + API.registerUsageHandler(lathe); + API.registerRecipeHandler(lathe); API.registerRecipeHandler(centrifugeRecipeHandler); API.registerUsageHandler(centrifugeRecipeHandler); diff --git a/src/main/java/techreborn/compat/nei/recipes/AlloySmelterRecipeHandler.java b/src/main/java/techreborn/compat/nei/recipes/AlloySmelterRecipeHandler.java new file mode 100644 index 000000000..95063c683 --- /dev/null +++ b/src/main/java/techreborn/compat/nei/recipes/AlloySmelterRecipeHandler.java @@ -0,0 +1,47 @@ +package techreborn.compat.nei.recipes; + +import codechicken.nei.PositionedStack; +import net.minecraft.client.gui.inventory.GuiContainer; +import techreborn.api.recipe.IBaseRecipeType; +import techreborn.client.gui.GuiAlloySmelter; +import techreborn.client.gui.GuiImplosionCompressor; + +import java.util.List; + +public class AlloySmelterRecipeHandler extends GenericRecipeHander implements INeiBaseRecipe { + @Override + public void addPositionedStacks(List input, List outputs, IBaseRecipeType recipeType) { + int offset = 4; + PositionedStack pStack = new PositionedStack(recipeType.getInputs().get(0), 56 - offset, 25 - offset); + pStack.setMaxSize(1); + input.add(pStack); + + PositionedStack pStack2 = new PositionedStack(recipeType.getInputs().get(1), 56 - offset, 43 - offset); + pStack2.setMaxSize(1); + input.add(pStack2); + + PositionedStack pStack3 = new PositionedStack(recipeType.getOutputs().get(0), 116 - offset, 35 - offset); + pStack3.setMaxSize(1); + outputs.add(pStack3); + } + + @Override + public String getRecipeName() { + return "alloySmelterRecipe"; + } + + @Override + public String getGuiTexture() { + return "techreborn:textures/gui/industrial_blast_furnace.png"; + } + + @Override + public Class getGuiClass() { + return GuiAlloySmelter.class; + } + + @Override + public INeiBaseRecipe getNeiBaseRecipe() { + return this; + } +} diff --git a/src/main/java/techreborn/compat/nei/recipes/AssemblingMachineRecipeHandler.java b/src/main/java/techreborn/compat/nei/recipes/AssemblingMachineRecipeHandler.java new file mode 100644 index 000000000..af8f25338 --- /dev/null +++ b/src/main/java/techreborn/compat/nei/recipes/AssemblingMachineRecipeHandler.java @@ -0,0 +1,47 @@ +package techreborn.compat.nei.recipes; + +import codechicken.nei.PositionedStack; +import net.minecraft.client.gui.inventory.GuiContainer; +import techreborn.api.recipe.IBaseRecipeType; +import techreborn.client.gui.GuiAssemblingMachine; +import techreborn.client.gui.GuiImplosionCompressor; + +import java.util.List; + +public class AssemblingMachineRecipeHandler extends GenericRecipeHander implements INeiBaseRecipe { + @Override + public void addPositionedStacks(List input, List outputs, IBaseRecipeType recipeType) { + int offset = 4; + PositionedStack pStack = new PositionedStack(recipeType.getInputs().get(0), 47 - offset, 17 - offset); + pStack.setMaxSize(1); + input.add(pStack); + + PositionedStack pStack2 = new PositionedStack(recipeType.getInputs().get(1), 65 - offset, 17 - offset); + pStack2.setMaxSize(1); + input.add(pStack2); + + PositionedStack pStack3 = new PositionedStack(recipeType.getOutputs().get(0), 116 - offset, 35 - offset); + pStack3.setMaxSize(1); + outputs.add(pStack3); + } + + @Override + public String getRecipeName() { + return "assemblingMachineRecipe"; + } + + @Override + public String getGuiTexture() { + return "techreborn:textures/gui/assembling_machine.png"; + } + + @Override + public Class getGuiClass() { + return GuiAssemblingMachine.class; + } + + @Override + public INeiBaseRecipe getNeiBaseRecipe() { + return this; + } +} diff --git a/src/main/java/techreborn/compat/nei/recipes/LatheRecipeHandler.java b/src/main/java/techreborn/compat/nei/recipes/LatheRecipeHandler.java new file mode 100644 index 000000000..35a9881ce --- /dev/null +++ b/src/main/java/techreborn/compat/nei/recipes/LatheRecipeHandler.java @@ -0,0 +1,44 @@ +package techreborn.compat.nei.recipes; + +import codechicken.nei.PositionedStack; +import net.minecraft.client.gui.inventory.GuiContainer; +import techreborn.api.recipe.IBaseRecipeType; +import techreborn.client.gui.GuiAlloySmelter; +import techreborn.client.gui.GuiImplosionCompressor; +import techreborn.client.gui.GuiLathe; + +import java.util.List; + +public class LatheRecipeHandler extends GenericRecipeHander implements INeiBaseRecipe { + @Override + public void addPositionedStacks(List input, List outputs, IBaseRecipeType recipeType) { + int offset = 4; + PositionedStack pStack = new PositionedStack(recipeType.getInputs().get(0), 56 - offset, 17 - offset); + pStack.setMaxSize(1); + input.add(pStack); + + PositionedStack pStack3 = new PositionedStack(recipeType.getOutputs().get(0), 116 - offset, 35 - offset); + pStack3.setMaxSize(1); + outputs.add(pStack3); + } + + @Override + public String getRecipeName() { + return "latheRecipe"; + } + + @Override + public String getGuiTexture() { + return "techreborn:textures/gui/lathe.png"; + } + + @Override + public Class getGuiClass() { + return GuiLathe.class; + } + + @Override + public INeiBaseRecipe getNeiBaseRecipe() { + return this; + } +} diff --git a/src/main/java/techreborn/init/ModBlocks.java b/src/main/java/techreborn/init/ModBlocks.java index 7763bea27..50ed1327c 100644 --- a/src/main/java/techreborn/init/ModBlocks.java +++ b/src/main/java/techreborn/init/ModBlocks.java @@ -116,32 +116,19 @@ public class ModBlocks { public static void init() { - thermalGenerator = new BlockThermalGenerator() - .setBlockName("techreborn.thermalGenerator") - .setBlockTextureName("techreborn:ThermalGenerator_other") - .setCreativeTab(TechRebornCreativeTab.instance); + thermalGenerator = new BlockThermalGenerator(); GameRegistry.registerBlock(thermalGenerator, "techreborn.thermalGenerator"); GameRegistry.registerTileEntity(TileThermalGenerator.class, "TileThermalGenerator"); - quantumTank = new BlockQuantumTank() - .setBlockName("techreborn.quantumTank") - .setBlockTextureName("techreborn:quantumTank") - .setCreativeTab(TechRebornCreativeTab.instance); + quantumTank = new BlockQuantumTank(); GameRegistry.registerBlock(quantumTank, ItemBlockQuantumTank.class, "techreborn.quantumTank"); GameRegistry.registerTileEntity(TileQuantumTank.class, "TileQuantumTank"); - quantumChest = new BlockQuantumChest() - .setBlockName("techreborn.quantumChest") - .setBlockTextureName("techreborn:quantumChest") - .setCreativeTab(TechRebornCreativeTab.instance); + quantumChest = new BlockQuantumChest(); GameRegistry.registerBlock(quantumChest, ItemBlockQuantumChest.class, "techreborn.quantumChest"); GameRegistry.registerTileEntity(TileQuantumChest.class, "TileQuantumChest"); - centrifuge = new BlockCentrifuge() - .setBlockName("techreborn.centrifuge") - .setBlockTextureName("techreborn:centrifuge") - .setCreativeTab(TechRebornCreativeTab.instance); - + centrifuge = new BlockCentrifuge(); GameRegistry.registerBlock(centrifuge, "techreborn.centrifuge"); GameRegistry.registerTileEntity(TileCentrifuge.class, "TileCentrifuge"); @@ -183,7 +170,6 @@ public class ModBlocks { storage = new BlockStorage(Material.rock); GameRegistry.registerBlock(storage, ItemBlockStorage.class, "techreborn.storage"); - LogHelper.info("TechReborns Blocks Loaded"); HighAdvancedMachineBlock = new BlockHighlyAdvancedMachine(Material.rock); GameRegistry.registerBlock(HighAdvancedMachineBlock, "highlyadvancedmachine"); diff --git a/src/main/java/techreborn/init/ModRecipes.java b/src/main/java/techreborn/init/ModRecipes.java index 12dd002b8..f49500509 100644 --- a/src/main/java/techreborn/init/ModRecipes.java +++ b/src/main/java/techreborn/init/ModRecipes.java @@ -10,7 +10,10 @@ import techreborn.api.CentrifugeRecipie; import techreborn.api.TechRebornAPI; import techreborn.api.recipe.RecipeHanderer; import techreborn.config.ConfigTechReborn; +import techreborn.recipes.AlloySmelterRecipe; +import techreborn.recipes.AssemblingMachineRecipe; import techreborn.recipes.ImplosionCompressorRecipe; +import techreborn.recipes.LatheRecipe; import techreborn.util.CraftingHelper; import techreborn.util.LogHelper; @@ -197,6 +200,11 @@ public class ModRecipes { RecipeHanderer.addRecipe(new ImplosionCompressorRecipe(new ItemStack(Items.record_11), new ItemStack(Items.golden_apple), new ItemStack(Items.brewing_stand), new ItemStack(Items.carrot), 120, 5)); + RecipeHanderer.addRecipe(new AlloySmelterRecipe(new ItemStack(Items.coal), new ItemStack(Blocks.sand), new ItemStack(Items.diamond), 120, 5)); + RecipeHanderer.addRecipe(new AssemblingMachineRecipe(new ItemStack(Items.coal), new ItemStack(Blocks.sand), new ItemStack(Items.diamond), 120, 5)); + //TODO BORKEN +// RecipeHanderer.addRecipe(new LatheRecipe(new ItemStack(Items.coal), new ItemStack(Items.diamond), 120, 5)); + LogHelper.info("Machine Recipes Added"); } diff --git a/src/main/java/techreborn/recipes/LatheRecipe.java b/src/main/java/techreborn/recipes/LatheRecipe.java index 2828dd7ba..52473bac1 100644 --- a/src/main/java/techreborn/recipes/LatheRecipe.java +++ b/src/main/java/techreborn/recipes/LatheRecipe.java @@ -7,7 +7,7 @@ public class LatheRecipe extends BaseRecipe { public LatheRecipe(ItemStack input1, ItemStack output1, int tickTime, int euPerTick) { - super("alloySmelterRecipe", tickTime, euPerTick); + super("latheRecipe", tickTime, euPerTick); if(input1 != null) inputs.add(input1); if(output1 != null) diff --git a/src/main/resources/assets/techreborn/textures/gui/rollingmachine.png b/src/main/resources/assets/techreborn/textures/gui/autocraftingtable.png similarity index 100% rename from src/main/resources/assets/techreborn/textures/gui/rollingmachine.png rename to src/main/resources/assets/techreborn/textures/gui/autocraftingtable.png