Added lathe
This commit is contained in:
parent
d9cf998d16
commit
a732052f49
2 changed files with 67 additions and 0 deletions
62
src/main/java/techreborn/blocks/BlockLathe.java
Normal file
62
src/main/java/techreborn/blocks/BlockLathe.java
Normal 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 BlockLathe extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockLathe(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.lathe");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/lathe_front_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));
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -17,6 +17,7 @@ import techreborn.blocks.BlockGrinder;
|
|||
import techreborn.blocks.BlockHighlyAdvancedMachine;
|
||||
import techreborn.blocks.BlockImplosionCompressor;
|
||||
import techreborn.blocks.BlockIndustrialElectrolyzer;
|
||||
import techreborn.blocks.BlockLathe;
|
||||
import techreborn.blocks.BlockMachineCasing;
|
||||
import techreborn.blocks.BlockMagicEnergyAbsorber;
|
||||
import techreborn.blocks.BlockMagicEnergyConverter;
|
||||
|
@ -73,6 +74,7 @@ public class ModBlocks {
|
|||
public static Block Semifluidgenerator;
|
||||
public static Block AlloyFurnace;
|
||||
public static Block ChemicalReactor;
|
||||
public static Block lathe;
|
||||
|
||||
public static Block ore;
|
||||
public static Block storage;
|
||||
|
@ -177,6 +179,9 @@ public class ModBlocks {
|
|||
|
||||
ChemicalReactor = new BlockChemicalReactor(Material.rock);
|
||||
GameRegistry.registerBlock(ChemicalReactor, "chemicalreactor");
|
||||
|
||||
lathe = new BlockLathe(Material.rock);
|
||||
GameRegistry.registerBlock(lathe, "lathe");
|
||||
|
||||
registerOreDict();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue