diff --git a/src/main/java/techreborn/blocks/BlockAesu.java b/src/main/java/techreborn/blocks/BlockAesu.java new file mode 100644 index 000000000..e17ba8d11 --- /dev/null +++ b/src/main/java/techreborn/blocks/BlockAesu.java @@ -0,0 +1,62 @@ +package techreborn.blocks; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import techreborn.Core; +import techreborn.client.GuiHandler; +import techreborn.client.TechRebornCreativeTab; +import techreborn.tiles.TileAlloySmelter; +import techreborn.tiles.TileBlastFurnace; +import techreborn.tiles.TileMachineCasing; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockAesu extends BlockMachineBase { + + @SideOnly(Side.CLIENT) + private IIcon iconFront; + + @SideOnly(Side.CLIENT) + private IIcon iconTop; + + @SideOnly(Side.CLIENT) + private IIcon iconBottom; + + public BlockAesu(Material material) + { + super(material); + setBlockName("techreborn.aesu"); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister icon) + { + this.blockIcon = icon.registerIcon("techreborn:machine/aesu_side"); + this.iconFront = icon.registerIcon("techreborn:machine/aesu_front"); + this.iconTop = icon.registerIcon("techreborn:machine/aesu_side"); + this.iconBottom = icon.registerIcon("techreborn:machine/aesu_side"); + } + + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int metadata) + { + + return metadata == 0 && side == 3 ? this.iconFront + : side == 1 ? this.iconTop : + side == 0 ? this.iconBottom: (side == 0 ? this.iconTop + : (side == metadata ? this.iconFront : this.blockIcon)); + + } + +} diff --git a/src/main/java/techreborn/init/ModBlocks.java b/src/main/java/techreborn/init/ModBlocks.java index f75caa1a6..9acaef3aa 100644 --- a/src/main/java/techreborn/init/ModBlocks.java +++ b/src/main/java/techreborn/init/ModBlocks.java @@ -4,6 +4,7 @@ import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; +import techreborn.blocks.BlockAesu; import techreborn.blocks.BlockAlloyFurnace; import techreborn.blocks.BlockAlloySmelter; import techreborn.blocks.BlockAssemblingMachine; @@ -79,6 +80,7 @@ public class ModBlocks { public static Block lathe; public static Block platecuttingmachine; public static Block Idsu; + public static Block Aesu; public static Block ore; public static Block storage; @@ -192,6 +194,9 @@ public class ModBlocks { Idsu = new BlockIDSU(Material.rock); GameRegistry.registerBlock(Idsu, "idsu"); + + Aesu = new BlockAesu(Material.rock); + GameRegistry.registerBlock(Aesu, "aesu"); registerOreDict(); }