/* * This file ("BlockWallAA.java") is part of the Actually Additions Mod for Minecraft. * It is created and owned by Ellpeck and distributed * under the Actually Additions License to be found at * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.util.IActAddItemOrBlock; import net.minecraft.block.Block; import net.minecraft.block.BlockWall; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import java.util.List; public class BlockWallAA extends BlockWall implements IActAddItemOrBlock{ private String name; private Block baseBlock; public BlockWallAA(String name, Block base){ super(base); this.baseBlock = base; this.name = name; } @Override @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int meta){ return this.baseBlock.getBlockTextureFromSide(side); } @SuppressWarnings("unchecked") @Override @SideOnly(Side.CLIENT) public void getSubBlocks(Item item, CreativeTabs tab, List list){ list.add(new ItemStack(item, 1, 0)); } @Override public int damageDropped(int meta){ return meta; } @Override public String getName(){ return this.name; } @Override public EnumRarity getRarity(ItemStack stack){ return EnumRarity.common; } }