resonant-induction/minecraft/dark/BasicUtilities/machines/BlockMachine.java
Rseifert 494d98bb05 where do i begin
I've made a mess of changes since last upload. Main big change is change
in forge file formate that merged minecraft and common folder. The other
is the complete rewrite to Forge Liquid api. So far only the pump,
boiler, and pipe are converted to the new system. The pipe will actual
not fully work with most machines since it can't drain liquids out of
machines. In future update there will be a block to do this called a
pipe pump. Other than those changes nothing much is diffrent.
2012-12-22 04:44:17 -05:00

73 lines
1.5 KiB
Java

package dark.BasicUtilities.machines;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import dark.BasicUtilities.ItemRenderHelper;
public class BlockMachine extends BlockContainer
{
public BlockMachine(int id)
{
super(id, Material.iron);
this.setBlockName("Machine");
this.setCreativeTab(CreativeTabs.tabBlock);
this.setRequiresSelfNotify();
this.blockIndexInTexture = 26;
this.setHardness(1f);
this.setResistance(3f);
}
public boolean isOpaqueCube()
{
return false;
}
public boolean renderAsNormalBlock()
{
return false;
}
/**
* The type of render function that is called for this block
*/
public int getRenderType()
{
return ItemRenderHelper.renderID;
}
public int damageDropped(int meta)
{
if(meta < 4)
{
return 0;
}
return meta;
}
@Override
public TileEntity createNewTileEntity(World var1,int meta) {
// TODO Auto-generated method stub
if(meta < 4)
{
return new TileEntityPump();
}
if(meta == 4)
{
//return new TileEntityCondenser();
}
if(meta == 5)
{
//return new TileEntityLTank();
}
return null;
}
@Override
public TileEntity createNewTileEntity(World var1) {
// TODO Auto-generated method stub
return null;
}
}