From 465519cbd06b7a19ce802c5d03734abdb46664e0 Mon Sep 17 00:00:00 2001 From: Gig Date: Mon, 4 May 2015 19:06:42 +0100 Subject: [PATCH] Added things --- .../java/techreborn/blocks/BlockLesu.java | 62 +++++++++++++++++++ .../blocks/BlockSupercondensator.java | 62 +++++++++++++++++++ .../techreborn/blocks/BlockWoodenshelf.java | 62 +++++++++++++++++++ src/main/java/techreborn/init/ModBlocks.java | 15 +++++ 4 files changed, 201 insertions(+) create mode 100644 src/main/java/techreborn/blocks/BlockLesu.java create mode 100644 src/main/java/techreborn/blocks/BlockSupercondensator.java create mode 100644 src/main/java/techreborn/blocks/BlockWoodenshelf.java diff --git a/src/main/java/techreborn/blocks/BlockLesu.java b/src/main/java/techreborn/blocks/BlockLesu.java new file mode 100644 index 000000000..8b86ebc2f --- /dev/null +++ b/src/main/java/techreborn/blocks/BlockLesu.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 BlockLesu extends BlockMachineBase { + + @SideOnly(Side.CLIENT) + private IIcon iconFront; + + @SideOnly(Side.CLIENT) + private IIcon iconTop; + + @SideOnly(Side.CLIENT) + private IIcon iconBottom; + + public BlockLesu(Material material) + { + super(material); + setBlockName("techreborn.lesu"); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister icon) + { + this.blockIcon = icon.registerIcon("techreborn:machine/lesu_side"); + this.iconFront = icon.registerIcon("techreborn:machine/lesu_front"); + this.iconTop = icon.registerIcon("techreborn:machine/lesu_side"); + this.iconBottom = icon.registerIcon("techreborn:machine/lesu_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/blocks/BlockSupercondensator.java b/src/main/java/techreborn/blocks/BlockSupercondensator.java new file mode 100644 index 000000000..7b24d3469 --- /dev/null +++ b/src/main/java/techreborn/blocks/BlockSupercondensator.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 BlockSupercondensator extends BlockMachineBase { + + @SideOnly(Side.CLIENT) + private IIcon iconFront; + + @SideOnly(Side.CLIENT) + private IIcon iconTop; + + @SideOnly(Side.CLIENT) + private IIcon iconBottom; + + public BlockSupercondensator(Material material) + { + super(material); + setBlockName("techreborn.supercondensator"); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister icon) + { + this.blockIcon = icon.registerIcon("techreborn:machine/supercondensator_side"); + this.iconFront = icon.registerIcon("techreborn:machine/supercondensator_front"); + this.iconTop = icon.registerIcon("techreborn:machine/supercondensator_side"); + this.iconBottom = icon.registerIcon("techreborn:machine/supercondensator_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/blocks/BlockWoodenshelf.java b/src/main/java/techreborn/blocks/BlockWoodenshelf.java new file mode 100644 index 000000000..02c7e2a83 --- /dev/null +++ b/src/main/java/techreborn/blocks/BlockWoodenshelf.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 BlockWoodenshelf extends BlockMachineBase { + + @SideOnly(Side.CLIENT) + private IIcon iconFront; + + @SideOnly(Side.CLIENT) + private IIcon iconTop; + + @SideOnly(Side.CLIENT) + private IIcon iconBottom; + + public BlockWoodenshelf(Material material) + { + super(material); + setBlockName("techreborn.woodenshelf"); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister icon) + { + this.blockIcon = icon.registerIcon("techreborn:machine/wood_shelf_side"); + this.iconFront = icon.registerIcon("techreborn:machine/wood_shelf_empty"); + this.iconTop = icon.registerIcon("techreborn:machine/wood_shelf_side"); + this.iconBottom = icon.registerIcon("techreborn:machine/wood_shelf_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 9acaef3aa..0c7439667 100644 --- a/src/main/java/techreborn/init/ModBlocks.java +++ b/src/main/java/techreborn/init/ModBlocks.java @@ -20,6 +20,7 @@ import techreborn.blocks.BlockIDSU; import techreborn.blocks.BlockImplosionCompressor; import techreborn.blocks.BlockIndustrialElectrolyzer; import techreborn.blocks.BlockLathe; +import techreborn.blocks.BlockLesu; import techreborn.blocks.BlockMachineCasing; import techreborn.blocks.BlockMagicEnergyAbsorber; import techreborn.blocks.BlockMagicEnergyConverter; @@ -31,7 +32,9 @@ import techreborn.blocks.BlockQuantumTank; import techreborn.blocks.BlockRollingMachine; import techreborn.blocks.BlockSemiFluidGenerator; import techreborn.blocks.BlockStorage; +import techreborn.blocks.BlockSupercondensator; import techreborn.blocks.BlockThermalGenerator; +import techreborn.blocks.BlockWoodenshelf; import techreborn.client.TechRebornCreativeTab; import techreborn.itemblocks.ItemBlockMachineCasing; import techreborn.itemblocks.ItemBlockOre; @@ -81,6 +84,9 @@ public class ModBlocks { public static Block platecuttingmachine; public static Block Idsu; public static Block Aesu; + public static Block Lesu; + public static Block Supercondensator; + public static Block Woodenshelf; public static Block ore; public static Block storage; @@ -197,6 +203,15 @@ public class ModBlocks { Aesu = new BlockAesu(Material.rock); GameRegistry.registerBlock(Aesu, "aesu"); + + Lesu = new BlockLesu(Material.rock); + GameRegistry.registerBlock(Lesu, "lesu"); + + Supercondensator = new BlockSupercondensator(Material.rock); + GameRegistry.registerBlock(Supercondensator, "supercondensator"); + + Woodenshelf = new BlockWoodenshelf(Material.wood); + GameRegistry.registerBlock(Woodenshelf, "woodenshelf"); registerOreDict(); }