Added chemicalreactor

This commit is contained in:
Gig 2015-05-03 23:30:44 +01:00
parent 77f801f1a9
commit d9cf998d16
2 changed files with 67 additions and 0 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 BlockChemicalReactor extends BlockMachineBase {
@SideOnly(Side.CLIENT)
private IIcon iconFront;
@SideOnly(Side.CLIENT)
private IIcon iconTop;
@SideOnly(Side.CLIENT)
private IIcon iconBottom;
public BlockChemicalReactor(Material material)
{
super(material);
setBlockName("techreborn.chemicalreactor");
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister icon)
{
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
this.iconFront = icon.registerIcon("techreborn:machine/chemical_reactor_side_off");
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
this.iconBottom = icon.registerIcon("techreborn:machine/machine_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

@ -9,6 +9,7 @@ import techreborn.blocks.BlockAlloySmelter;
import techreborn.blocks.BlockAssemblingMachine;
import techreborn.blocks.BlockBlastFurnace;
import techreborn.blocks.BlockCentrifuge;
import techreborn.blocks.BlockChemicalReactor;
import techreborn.blocks.BlockChunkLoader;
import techreborn.blocks.BlockDieselGenerator;
import techreborn.blocks.BlockDragonEggSiphoner;
@ -71,6 +72,7 @@ public class ModBlocks {
public static Block MagicalAbsorber;
public static Block Semifluidgenerator;
public static Block AlloyFurnace;
public static Block ChemicalReactor;
public static Block ore;
public static Block storage;
@ -173,6 +175,9 @@ public class ModBlocks {
AlloyFurnace = new BlockAlloyFurnace(Material.rock);
GameRegistry.registerBlock(AlloyFurnace, "alloyfurnace");
ChemicalReactor = new BlockChemicalReactor(Material.rock);
GameRegistry.registerBlock(ChemicalReactor, "chemicalreactor");
registerOreDict();
}