2015-11-08 18:29:05 +01:00
|
|
|
/*
|
|
|
|
* 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;
|
|
|
|
}
|
2015-12-01 19:48:09 +01:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getName(){
|
|
|
|
return this.name;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public EnumRarity getRarity(ItemStack stack){
|
|
|
|
return EnumRarity.common;
|
|
|
|
}
|
2015-11-08 18:29:05 +01:00
|
|
|
}
|