From 6aeec56dc04773e68ee71832bc4887e0abc22bdc Mon Sep 17 00:00:00 2001 From: elix-x Date: Mon, 25 Jul 2016 14:53:14 +0200 Subject: [PATCH] Removed duplicated crafting things Removed duplicated crafting things. For some odd reasons they were using different blocks and meta at the same time. Probably somebody forgot to do something while porting 1.7.10 -> 1.8 ;) . Kinda relates to #9. --- .../block/crafting/BlockCraftingStorage.java | 38 ------------------- .../block/crafting/BlockCraftingUnit.java | 36 +++--------------- 2 files changed, 6 insertions(+), 68 deletions(-) diff --git a/src/main/java/appeng/block/crafting/BlockCraftingStorage.java b/src/main/java/appeng/block/crafting/BlockCraftingStorage.java index f00f385e..5eec519f 100644 --- a/src/main/java/appeng/block/crafting/BlockCraftingStorage.java +++ b/src/main/java/appeng/block/crafting/BlockCraftingStorage.java @@ -19,14 +19,6 @@ package appeng.block.crafting; -import java.util.List; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - import appeng.tile.crafting.TileCraftingStorageTile; @@ -45,34 +37,4 @@ public class BlockCraftingStorage extends BlockCraftingUnit return ItemCraftingStorage.class; } - @Override - @SideOnly( Side.CLIENT ) - public void getCheckedSubBlocks( final Item item, final CreativeTabs tabs, final List itemStacks ) - { - itemStacks.add( new ItemStack( this, 1, 0 ) ); - itemStacks.add( new ItemStack( this, 1, 1 ) ); - itemStacks.add( new ItemStack( this, 1, 2 ) ); - itemStacks.add( new ItemStack( this, 1, 3 ) ); - } - - @Override - public String getUnlocalizedName( final ItemStack is ) - { - if( is.getItemDamage() == 1 ) - { - return "tile.appliedenergistics2.BlockCraftingStorage4k"; - } - - if( is.getItemDamage() == 2 ) - { - return "tile.appliedenergistics2.BlockCraftingStorage16k"; - } - - if( is.getItemDamage() == 3 ) - { - return "tile.appliedenergistics2.BlockCraftingStorage64k"; - } - - return this.getItemUnlocalizedName( is ); - } } diff --git a/src/main/java/appeng/block/crafting/BlockCraftingUnit.java b/src/main/java/appeng/block/crafting/BlockCraftingUnit.java index fca52518..40aeee83 100644 --- a/src/main/java/appeng/block/crafting/BlockCraftingUnit.java +++ b/src/main/java/appeng/block/crafting/BlockCraftingUnit.java @@ -70,6 +70,12 @@ public class BlockCraftingUnit extends AEBaseTileBlock this.setFeature( EnumSet.of( AEFeature.CraftingCPU ) ); } + @Override + protected IProperty[] getAEStates() + { + return new IProperty[] { AE_BLOCK_FORWARD, AE_BLOCK_UP, POWERED, FORMED }; + } + @Override public IBlockState getStateFromMeta( final int meta ) { @@ -130,36 +136,6 @@ public class BlockCraftingUnit extends AEBaseTileBlock return false; } - protected String getItemUnlocalizedName( final ItemStack is ) - { - return super.getUnlocalizedName( is ); - } - - @Override - protected IProperty[] getAEStates() - { - return new IProperty[] { AE_BLOCK_FORWARD, AE_BLOCK_UP, POWERED, FORMED }; - } - - @Override - @SideOnly( Side.CLIENT ) - public void getCheckedSubBlocks( final Item item, final CreativeTabs tabs, final List itemStacks ) - { - itemStacks.add( new ItemStack( this, 1, 0 ) ); - itemStacks.add( new ItemStack( this, 1, 1 ) ); - } - - @Override - public String getUnlocalizedName( final ItemStack is ) - { - if( is.getItemDamage() == 1 ) - { - return "tile.appliedenergistics2.BlockCraftingAccelerator"; - } - - return this.getItemUnlocalizedName( is ); - } - public enum CraftingUnitType { UNIT, ACCELERATOR, STORAGE_1K, STORAGE_4K, STORAGE_16K, STORAGE_64K, MONITOR