diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockWallAA.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockWallAA.java new file mode 100644 index 000000000..4a8c0f61e --- /dev/null +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockWallAA.java @@ -0,0 +1,64 @@ +/* + * 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); + } + + @Override + public String getName(){ + return this.name; + } + + @Override + public EnumRarity getRarity(ItemStack stack){ + return EnumRarity.common; + } + + @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; + } +} diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/InitBlocks.java b/src/main/java/ellpeck/actuallyadditions/blocks/InitBlocks.java index 1585b1549..fbfe667aa 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/InitBlocks.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/InitBlocks.java @@ -82,6 +82,8 @@ public class InitBlocks{ public static Block blockTestifiBucksWhiteStairs; public static Block blockTestifiBucksGreenSlab; public static Block blockTestifiBucksWhiteSlab; + public static Block blockTestifiBucksGreenFence; + public static Block blockTestifiBucksWhiteFence; public static Block blockColoredLamp; public static Block blockColoredLampOn; @@ -136,6 +138,10 @@ public class InitBlocks{ BlockUtil.register(blockTestifiBucksGreenSlab, BlockSlabs.TheItemBlock.class); blockTestifiBucksWhiteSlab = new BlockSlabs("blockTestifiBucksWhiteSlab", blockTestifiBucksWhiteWall); BlockUtil.register(blockTestifiBucksWhiteSlab, BlockSlabs.TheItemBlock.class); + blockTestifiBucksGreenFence = new BlockWallAA("blockTestifiBucksGreenFence", blockTestifiBucksGreenWall); + BlockUtil.register(blockTestifiBucksGreenFence); + blockTestifiBucksWhiteFence = new BlockWallAA("blockTestifiBucksWhiteFence", blockTestifiBucksWhiteWall); + BlockUtil.register(blockTestifiBucksWhiteFence); blockColoredLamp = new BlockColoredLamp(false); BlockUtil.register(blockColoredLamp, BlockColoredLamp.TheItemBlock.class); diff --git a/src/main/java/ellpeck/actuallyadditions/creative/CreativeTab.java b/src/main/java/ellpeck/actuallyadditions/creative/CreativeTab.java index 679df8e7c..aa0e246aa 100644 --- a/src/main/java/ellpeck/actuallyadditions/creative/CreativeTab.java +++ b/src/main/java/ellpeck/actuallyadditions/creative/CreativeTab.java @@ -100,6 +100,8 @@ public class CreativeTab extends CreativeTabs{ add(InitBlocks.blockTestifiBucksWhiteStairs); add(InitBlocks.blockTestifiBucksGreenSlab); add(InitBlocks.blockTestifiBucksWhiteSlab); + add(InitBlocks.blockTestifiBucksGreenFence); + add(InitBlocks.blockTestifiBucksWhiteFence); add(InitBlocks.blockColoredLamp); add(InitBlocks.blockLampPowerer); add(InitBlocks.blockTreasureChest); diff --git a/src/main/resources/assets/actuallyadditions/lang/en_US.lang b/src/main/resources/assets/actuallyadditions/lang/en_US.lang index 310ccdeab..362383f56 100644 --- a/src/main/resources/assets/actuallyadditions/lang/en_US.lang +++ b/src/main/resources/assets/actuallyadditions/lang/en_US.lang @@ -79,12 +79,12 @@ tile.actuallyadditions.blockWildCanola.name=Wild Canola tile.actuallyadditions.blockWildRice.name=Wild Rice tile.actuallyadditions.blockWildCoffee.name=Wild Coffee tile.actuallyadditions.blockWildFlax.name=Wild Flax -tile.actuallyadditions.blockTestifiBucksGreenWall.name=Green TestifiBucks Wall -tile.actuallyadditions.blockTestifiBucksWhiteWall.name=White TestifiBucks Wall -tile.actuallyadditions.blockTestifiBucksGreenStairs.name=Green TestifiBucks Stairs -tile.actuallyadditions.blockTestifiBucksWhiteStairs.name=White TestifiBucks Stairs -tile.actuallyadditions.blockTestifiBucksGreenSlab.name=Green TestifiBucks Slab -tile.actuallyadditions.blockTestifiBucksWhiteSlab.name=White TestifiBucks Slab +tile.actuallyadditions.blockTestifiBucksGreenWall.name=Green TB Block +tile.actuallyadditions.blockTestifiBucksWhiteWall.name=White TB Block +tile.actuallyadditions.blockTestifiBucksGreenStairs.name=Green TB Stairs +tile.actuallyadditions.blockTestifiBucksWhiteStairs.name=White TB Stairs +tile.actuallyadditions.blockTestifiBucksGreenSlab.name=Green TB Slab +tile.actuallyadditions.blockTestifiBucksWhiteSlab.name=White TB Slab tile.actuallyadditions.blockCanola.name=Canola Plant tile.actuallyadditions.blockTreasureChest.name=Treasure Chest tile.actuallyadditions.blockCanolaPress.name=Canola Press @@ -107,6 +107,8 @@ tile.actuallyadditions.blockRangedCollector.name=Ranged Collector tile.actuallyadditions.blockLaserRelay.name=Laser Relay tile.actuallyadditions.blockMiscIronCasing.name=Iron Casing tile.actuallyadditions.blockBlackLotus.name=Black Lotus +tile.actuallyadditions.blockTestifiBucksWhiteFence.name=White TB Wall +tile.actuallyadditions.blockTestifiBucksGreenFence.name=Green TB Wall #ESD tile.actuallyadditions.blockInputter.name=ESD