resonant-induction/minecraft/dark/BasicUtilities/Blocks/BlockMachine.java
Rseifert 5787f65148 Reformating, and rebalance of tanks, Final 1.4.5
Did some file changes to make finding things easier
Added: Custom creative tab
Changed: File root system, :p to many files
Changed: Tank liquid trade method to balance out instead of full trade
Changed: the packet update rate of the Tank to try to fix Render Lag
Fixed: Tank Render so Liquid levels can be seen
BugIgnorable: uneven levels of liquid will not show up on tank render
but are present
BugIgnorable: eValve names sometime glitch and call all instances Empty
XXX
TODO: Fix Textures, and add model for eValve
TODO: Finish One way valve
TODO: Finish OIL,STEAM,FUEL liquid/gas blocks
2012-12-23 05:28:26 -05:00

70 lines
1.7 KiB
Java

package dark.BasicUtilities.Blocks;
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;
import dark.BasicUtilities.PipeTab;
import dark.BasicUtilities.Tile.TileEntityTank;
import dark.BasicUtilities.Tile.TileEntityPump;
public class BlockMachine extends BlockContainer
{
public BlockMachine(int id)
{
super(id, Material.iron);
this.setBlockName("Machine");
this.setCreativeTab(PipeTab.INSTANCE);
this.setRequiresSelfNotify();
this.blockIndexInTexture = 26;
this.setHardness(1f);
this.setResistance(5f);
}
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 TileEntityTank(); }
return null;
}
@Override
public TileEntity createNewTileEntity(World var1)
{
// TODO Auto-generated method stub
return null;
}
}