diff --git a/resources/assets/enderio/lang/en_US.lang b/resources/assets/enderio/lang/en_US.lang index d090fc73..71d50c75 100644 --- a/resources/assets/enderio/lang/en_US.lang +++ b/resources/assets/enderio/lang/en_US.lang @@ -422,7 +422,7 @@ tile.blockExperienceObelisk.tooltip.detailed.line1=Stores Experience tile.blockExperienceObelisk.tooltip.detailed.line2=Can output liquid XP to tile.blockExperienceObelisk.tooltip.detailed.line3=adjacent tanks -tile.blockBuffer.basic.name=Item Buffer +tile.blockBuffer.item.name=Item Buffer tile.blockBuffer.power.name=Power Buffer tile.blockBuffer.omni.name=Omni Buffer tile.blockBuffer.creative.name=Creative Buffer diff --git a/src/main/java/crazypants/enderio/machine/MachineRecipes.java b/src/main/java/crazypants/enderio/machine/MachineRecipes.java index 165e447c..63db616e 100644 --- a/src/main/java/crazypants/enderio/machine/MachineRecipes.java +++ b/src/main/java/crazypants/enderio/machine/MachineRecipes.java @@ -6,10 +6,12 @@ import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.oredict.ShapedOreRecipe; +import net.minecraftforge.oredict.ShapelessOreRecipe; import cpw.mods.fml.common.registry.GameRegistry; import crazypants.enderio.EnderIO; import crazypants.enderio.config.Config; import crazypants.enderio.item.skull.BlockEndermanSkull; +import crazypants.enderio.machine.buffer.BlockItemBuffer.Type; import crazypants.enderio.machine.capbank.BlockItemCapBank; import crazypants.enderio.machine.capbank.CapBankType; import crazypants.enderio.machine.capbank.ConvertOldRecipe; @@ -262,7 +264,7 @@ public class MachineRecipes { public static void addOreDictionaryRecipes() { ItemStack capacitor = new ItemStack(itemBasicCapacitor, 1, 0); - ItemStack machineChassi = new ItemStack(EnderIO.itemMachinePart, 1, MachinePart.MACHINE_CHASSI.ordinal()); + ItemStack machineChassis = new ItemStack(EnderIO.itemMachinePart, 1, MachinePart.MACHINE_CHASSI.ordinal()); ItemStack fusedQuartz = new ItemStack(EnderIO.blockFusedQuartz, 1, 0); //powered light @@ -297,8 +299,16 @@ public class MachineRecipes { //Slice'N'Splice ItemStack soularium = new ItemStack(EnderIO.itemAlloy, 1, Alloy.SOULARIUM.ordinal()); ItemStack sns = new ItemStack(EnderIO.blockSliceAndSplice); - GameRegistry.addRecipe(new ShapedOreRecipe(sns, "iki", "ams", "iii", 'i', soularium, 'm', machineChassi, 'k', "itemSkull", 'a', Items.iron_axe, 's', + GameRegistry.addRecipe(new ShapedOreRecipe(sns, "iki", "ams", "iii", 'i', soularium, 'm', machineChassis, 'k', "itemSkull", 'a', Items.iron_axe, 's', Items.shears)); + + //Buffer + ItemStack itemBuffer = Type.getStack(Type.ITEM); + ItemStack powerBuffer = Type.getStack(Type.POWER); + ItemStack omniBuffer = Type.getStack(Type.OMNI); + GameRegistry.addRecipe(new ShapedOreRecipe(itemBuffer, "isi", "scs", "isi", 'i', "ingotIron", 's', "ingotElectricalSteel", 'c', Blocks.chest)); + GameRegistry.addRecipe(new ShapedOreRecipe(powerBuffer, "isi", "sfs", "isi", 'i', "ingotIron", 's', "ingotElectricalSteel", 'f', machineChassis)); + GameRegistry.addRecipe(new ShapelessOreRecipe(omniBuffer, itemBuffer, powerBuffer)); } } \ No newline at end of file diff --git a/src/main/java/crazypants/enderio/machine/buffer/BlockItemBuffer.java b/src/main/java/crazypants/enderio/machine/buffer/BlockItemBuffer.java index 36027909..e2326ba8 100644 --- a/src/main/java/crazypants/enderio/machine/buffer/BlockItemBuffer.java +++ b/src/main/java/crazypants/enderio/machine/buffer/BlockItemBuffer.java @@ -10,12 +10,13 @@ import net.minecraft.item.ItemBlockWithMetadata; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import crazypants.enderio.EnderIO; import crazypants.enderio.ModObject; public class BlockItemBuffer extends ItemBlockWithMetadata { public enum Type { - BASIC(true, false, false), + ITEM(true, false, false), POWER(false, true, false), OMNI(true, true, false), CREATIVE(true, true, true); @@ -31,12 +32,16 @@ public class BlockItemBuffer extends ItemBlockWithMetadata { } public static Type get(TileBuffer buffer) { - return !buffer.hasPower() ? BASIC : !buffer.hasInventory() ? POWER : !buffer.isCreative() ? OMNI : CREATIVE; + return !buffer.hasPower() ? ITEM : !buffer.hasInventory() ? POWER : !buffer.isCreative() ? OMNI : CREATIVE; } public String getUnlocalizedName() { return "tile." + ModObject.blockBuffer.unlocalisedName + "." + name().toLowerCase(); } + + public static ItemStack getStack(Type type) { + return new ItemStack(EnderIO.blockBuffer, 1, type.ordinal()); + } } public BlockItemBuffer(Block block) {