Merge remote-tracking branch 'origin/master'

This commit is contained in:
Tntrololol 2015-05-08 16:44:16 -05:00
commit a4bf97beac
14 changed files with 176 additions and 25 deletions

View file

@ -27,7 +27,7 @@ public class BlockQuantumChest extends BlockMachineBase {
public BlockQuantumChest() public BlockQuantumChest()
{ {
super(Material.rock); super(Material.rock);
setHardness(2f); setBlockName("techreborn.quantumChest");
} }
@Override @Override

View file

@ -23,7 +23,7 @@ public class BlockQuantumTank extends BlockMachineBase {
public BlockQuantumTank() public BlockQuantumTank()
{ {
super(Material.rock); super(Material.rock);
setHardness(2f); setBlockName("techreborn.quantumTank");
} }
@Override @Override

View file

@ -37,7 +37,7 @@ public class BlockThermalGenerator extends BlockMachineBase {
public BlockThermalGenerator() public BlockThermalGenerator()
{ {
super(Material.rock); super(Material.rock);
setHardness(2f); setBlockName("techreborn.thermalGenerator");
} }
@Override @Override

View file

@ -26,6 +26,9 @@ public class BlockAlloyFurnace extends BlockMachineBase {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
private IIcon iconFront; private IIcon iconFront;
@SideOnly(Side.CLIENT)
private IIcon iconFrontOn;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
private IIcon iconTop; private IIcon iconTop;
@ -45,6 +48,7 @@ public class BlockAlloyFurnace extends BlockMachineBase {
{ {
this.blockIcon = icon.registerIcon("techreborn:machine/alloy_furnace_side"); this.blockIcon = icon.registerIcon("techreborn:machine/alloy_furnace_side");
this.iconFront = icon.registerIcon("techreborn:machine/alloy_furnace_front_off"); 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.iconTop = icon.registerIcon("techreborn:machine/alloy_furnace_top");
this.iconBottom = icon.registerIcon("techreborn:machine/alloy_furnace_bottom"); this.iconBottom = icon.registerIcon("techreborn:machine/alloy_furnace_bottom");
} }
@ -52,7 +56,6 @@ public class BlockAlloyFurnace extends BlockMachineBase {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata) public IIcon getIcon(int side, int metadata)
{ {
return metadata == 0 && side == 3 ? this.iconFront return metadata == 0 && side == 3 ? this.iconFront
: side == 1 ? this.iconTop : : side == 1 ? this.iconTop :
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop side == 0 ? this.iconBottom: (side == 0 ? this.iconTop

View file

@ -32,7 +32,7 @@ public class BlockCentrifuge extends BlockMachineBase {
public BlockCentrifuge() public BlockCentrifuge()
{ {
super(Material.rock); super(Material.rock);
setHardness(2F); setBlockName("techreborn.centrifuge");
} }
@Override @Override

View file

@ -11,7 +11,7 @@ import techreborn.tiles.TileRollingMachine;
public class GuiRollingMachine extends GuiContainer { public class GuiRollingMachine extends GuiContainer {
private static final ResourceLocation texture = new ResourceLocation( private static final ResourceLocation texture = new ResourceLocation(
"techreborn", "textures/gui/rollingmachine.png"); "techreborn", "textures/gui/rolling_machine.png");
TileRollingMachine rollingMachine; TileRollingMachine rollingMachine;
public GuiRollingMachine(EntityPlayer player, public GuiRollingMachine(EntityPlayer player,

View file

@ -6,8 +6,11 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.gui.inventory.GuiContainer;
import scala.tools.nsc.backend.icode.analysis.TypeFlowAnalysis; 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.GenericRecipeHander;
import techreborn.compat.nei.recipes.ImplosionCompressorRecipeHandler; import techreborn.compat.nei.recipes.ImplosionCompressorRecipeHandler;
import techreborn.compat.nei.recipes.LatheRecipeHandler;
import techreborn.lib.ModInfo; import techreborn.lib.ModInfo;
import codechicken.nei.api.API; import codechicken.nei.api.API;
import codechicken.nei.api.IConfigureNEI; import codechicken.nei.api.IConfigureNEI;
@ -33,10 +36,23 @@ public class NEIConfig implements IConfigureNEI {
ShapedRollingMachineHandler shapedRollingMachineHandler = new ShapedRollingMachineHandler(); ShapedRollingMachineHandler shapedRollingMachineHandler = new ShapedRollingMachineHandler();
ShapelessRollingMachineHandler shapelessRollingMachineHandler = new ShapelessRollingMachineHandler(); ShapelessRollingMachineHandler shapelessRollingMachineHandler = new ShapelessRollingMachineHandler();
NEIConfig.blastFurnaceRecipeHandle = new BlastFurnaceRecipeHandler(); NEIConfig.blastFurnaceRecipeHandle = new BlastFurnaceRecipeHandler();
ImplosionCompressorRecipeHandler implosion = new ImplosionCompressorRecipeHandler(); ImplosionCompressorRecipeHandler implosion = new ImplosionCompressorRecipeHandler();
API.registerUsageHandler(implosion); API.registerUsageHandler(implosion);
API.registerRecipeHandler(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.registerRecipeHandler(centrifugeRecipeHandler);
API.registerUsageHandler(centrifugeRecipeHandler); API.registerUsageHandler(centrifugeRecipeHandler);

View file

@ -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<PositionedStack> input, List<PositionedStack> 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<? extends GuiContainer> getGuiClass() {
return GuiAlloySmelter.class;
}
@Override
public INeiBaseRecipe getNeiBaseRecipe() {
return this;
}
}

View file

@ -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<PositionedStack> input, List<PositionedStack> 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<? extends GuiContainer> getGuiClass() {
return GuiAssemblingMachine.class;
}
@Override
public INeiBaseRecipe getNeiBaseRecipe() {
return this;
}
}

View file

@ -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<PositionedStack> input, List<PositionedStack> 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<? extends GuiContainer> getGuiClass() {
return GuiLathe.class;
}
@Override
public INeiBaseRecipe getNeiBaseRecipe() {
return this;
}
}

View file

@ -116,32 +116,19 @@ public class ModBlocks {
public static void init() public static void init()
{ {
thermalGenerator = new BlockThermalGenerator() thermalGenerator = new BlockThermalGenerator();
.setBlockName("techreborn.thermalGenerator")
.setBlockTextureName("techreborn:ThermalGenerator_other")
.setCreativeTab(TechRebornCreativeTab.instance);
GameRegistry.registerBlock(thermalGenerator, "techreborn.thermalGenerator"); GameRegistry.registerBlock(thermalGenerator, "techreborn.thermalGenerator");
GameRegistry.registerTileEntity(TileThermalGenerator.class, "TileThermalGenerator"); GameRegistry.registerTileEntity(TileThermalGenerator.class, "TileThermalGenerator");
quantumTank = new BlockQuantumTank() quantumTank = new BlockQuantumTank();
.setBlockName("techreborn.quantumTank")
.setBlockTextureName("techreborn:quantumTank")
.setCreativeTab(TechRebornCreativeTab.instance);
GameRegistry.registerBlock(quantumTank, ItemBlockQuantumTank.class, "techreborn.quantumTank"); GameRegistry.registerBlock(quantumTank, ItemBlockQuantumTank.class, "techreborn.quantumTank");
GameRegistry.registerTileEntity(TileQuantumTank.class, "TileQuantumTank"); GameRegistry.registerTileEntity(TileQuantumTank.class, "TileQuantumTank");
quantumChest = new BlockQuantumChest() quantumChest = new BlockQuantumChest();
.setBlockName("techreborn.quantumChest")
.setBlockTextureName("techreborn:quantumChest")
.setCreativeTab(TechRebornCreativeTab.instance);
GameRegistry.registerBlock(quantumChest, ItemBlockQuantumChest.class, "techreborn.quantumChest"); GameRegistry.registerBlock(quantumChest, ItemBlockQuantumChest.class, "techreborn.quantumChest");
GameRegistry.registerTileEntity(TileQuantumChest.class, "TileQuantumChest"); GameRegistry.registerTileEntity(TileQuantumChest.class, "TileQuantumChest");
centrifuge = new BlockCentrifuge() centrifuge = new BlockCentrifuge();
.setBlockName("techreborn.centrifuge")
.setBlockTextureName("techreborn:centrifuge")
.setCreativeTab(TechRebornCreativeTab.instance);
GameRegistry.registerBlock(centrifuge, "techreborn.centrifuge"); GameRegistry.registerBlock(centrifuge, "techreborn.centrifuge");
GameRegistry.registerTileEntity(TileCentrifuge.class, "TileCentrifuge"); GameRegistry.registerTileEntity(TileCentrifuge.class, "TileCentrifuge");
@ -183,7 +170,6 @@ public class ModBlocks {
storage = new BlockStorage(Material.rock); storage = new BlockStorage(Material.rock);
GameRegistry.registerBlock(storage, ItemBlockStorage.class, "techreborn.storage"); GameRegistry.registerBlock(storage, ItemBlockStorage.class, "techreborn.storage");
LogHelper.info("TechReborns Blocks Loaded");
HighAdvancedMachineBlock = new BlockHighlyAdvancedMachine(Material.rock); HighAdvancedMachineBlock = new BlockHighlyAdvancedMachine(Material.rock);
GameRegistry.registerBlock(HighAdvancedMachineBlock, "highlyadvancedmachine"); GameRegistry.registerBlock(HighAdvancedMachineBlock, "highlyadvancedmachine");

View file

@ -10,7 +10,10 @@ import techreborn.api.CentrifugeRecipie;
import techreborn.api.TechRebornAPI; import techreborn.api.TechRebornAPI;
import techreborn.api.recipe.RecipeHanderer; import techreborn.api.recipe.RecipeHanderer;
import techreborn.config.ConfigTechReborn; import techreborn.config.ConfigTechReborn;
import techreborn.recipes.AlloySmelterRecipe;
import techreborn.recipes.AssemblingMachineRecipe;
import techreborn.recipes.ImplosionCompressorRecipe; import techreborn.recipes.ImplosionCompressorRecipe;
import techreborn.recipes.LatheRecipe;
import techreborn.util.CraftingHelper; import techreborn.util.CraftingHelper;
import techreborn.util.LogHelper; 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 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"); LogHelper.info("Machine Recipes Added");
} }

View file

@ -7,7 +7,7 @@ public class LatheRecipe extends BaseRecipe {
public LatheRecipe(ItemStack input1, ItemStack output1, int tickTime, int euPerTick) public LatheRecipe(ItemStack input1, ItemStack output1, int tickTime, int euPerTick)
{ {
super("alloySmelterRecipe", tickTime, euPerTick); super("latheRecipe", tickTime, euPerTick);
if(input1 != null) if(input1 != null)
inputs.add(input1); inputs.add(input1);
if(output1 != null) if(output1 != null)

View file

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB