Added alloyfurnace

This commit is contained in:
Gig 2015-05-03 23:25:16 +01:00
parent f0d0d2738e
commit 77f801f1a9
3 changed files with 68 additions and 1 deletions

View file

@ -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 BlockAlloyFurnace extends BlockMachineBase {
@SideOnly(Side.CLIENT)
private IIcon iconFront;
@SideOnly(Side.CLIENT)
private IIcon iconTop;
@SideOnly(Side.CLIENT)
private IIcon iconBottom;
public BlockAlloyFurnace(Material material)
{
super(material);
setBlockName("techreborn.alloyfurnace");
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister icon)
{
this.blockIcon = icon.registerIcon("techreborn:machine/alloy_furnace_side");
this.iconFront = icon.registerIcon("techreborn:machine/alloy_furnace_front_off");
this.iconTop = icon.registerIcon("techreborn:machine/alloy_furnace_top");
this.iconBottom = icon.registerIcon("techreborn:machine/alloy_furnace_bottom");
}
@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));
}
}

View file

@ -61,7 +61,7 @@ public class BlockSemiFluidGenerator extends BlockMachineBase {
this.blockIcon = icon.registerIcon("techreborn:machine/semifluid_generator_side"); this.blockIcon = icon.registerIcon("techreborn:machine/semifluid_generator_side");
this.iconFront = icon.registerIcon("techreborn:machine/semifluid_generator_side"); this.iconFront = icon.registerIcon("techreborn:machine/semifluid_generator_side");
this.iconTop = icon.registerIcon("techreborn:machine/machine_top"); this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottem"); this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)

View file

@ -4,6 +4,7 @@ import net.minecraft.block.Block;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.OreDictionary;
import techreborn.blocks.BlockAlloyFurnace;
import techreborn.blocks.BlockAlloySmelter; import techreborn.blocks.BlockAlloySmelter;
import techreborn.blocks.BlockAssemblingMachine; import techreborn.blocks.BlockAssemblingMachine;
import techreborn.blocks.BlockBlastFurnace; import techreborn.blocks.BlockBlastFurnace;
@ -69,6 +70,7 @@ public class ModBlocks {
public static Block IndustrialElectrolyzer; public static Block IndustrialElectrolyzer;
public static Block MagicalAbsorber; public static Block MagicalAbsorber;
public static Block Semifluidgenerator; public static Block Semifluidgenerator;
public static Block AlloyFurnace;
public static Block ore; public static Block ore;
public static Block storage; public static Block storage;
@ -168,6 +170,9 @@ public class ModBlocks {
Semifluidgenerator = new BlockSemiFluidGenerator(Material.rock); Semifluidgenerator = new BlockSemiFluidGenerator(Material.rock);
GameRegistry.registerBlock(Semifluidgenerator, "semifluidgenerator"); GameRegistry.registerBlock(Semifluidgenerator, "semifluidgenerator");
AlloyFurnace = new BlockAlloyFurnace(Material.rock);
GameRegistry.registerBlock(AlloyFurnace, "alloyfurnace");
registerOreDict(); registerOreDict();
} }