Walls. Lots of them.

This commit is contained in:
Ellpeck 2015-11-08 18:29:05 +01:00
parent 3572c4a4b5
commit e3261eba32
4 changed files with 80 additions and 6 deletions

View file

@ -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;
}
}

View file

@ -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);

View file

@ -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);

View file

@ -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