-
Notifications
You must be signed in to change notification settings - Fork 754
/
TankAirBlock.java
110 lines (91 loc) · 2.65 KB
/
TankAirBlock.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
package tconstruct.smeltery.blocks;
import java.util.List;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.Vec3;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import tconstruct.smeltery.logic.TankAirLogic;
import tconstruct.smeltery.model.TankAirRender;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class TankAirBlock extends BlockContainer
{
public TankAirBlock(Material material)
{
super(material);
}
@Override
public TileEntity createNewTileEntity (World world, int var2)
{
return new TankAirLogic();
}
@Override
public int getRenderType ()
{
return TankAirRender.model;
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons (IIconRegister par1IconRegister)
{
}
@Override
public boolean isOpaqueCube ()
{
return false;
}
@Override
public boolean renderAsNormalBlock ()
{
return false;
}
@Override
public AxisAlignedBB getCollisionBoundingBoxFromPool (World world, int x, int y, int z)
{
TankAirLogic tank = (TankAirLogic) world.getTileEntity(x, y, z);
if (tank != null && tank.hasItem())
return super.getCollisionBoundingBoxFromPool(world, x, y, z);
return null;
}
@Override
public MovingObjectPosition collisionRayTrace (World world, int x, int y, int z, Vec3 par5Vec3, Vec3 par6Vec3)
{
TankAirLogic tank = (TankAirLogic) world.getTileEntity(x, y, z);
if (tank.hasItem())
return super.collisionRayTrace(world, x, y, z, par5Vec3, par6Vec3);
return null;
}
@Override
public ItemStack getPickBlock (MovingObjectPosition target, World world, int x, int y, int z)
{
return null;
}
@Override
public boolean isReplaceable (IBlockAccess world, int x, int y, int z)
{
return false;
}
@Override
public boolean canHarvestBlock (EntityPlayer player, int meta)
{
return false;
}
@Override
public boolean isAir (IBlockAccess world, int x, int y, int z)
{
return false;
}
@Override
public void getSubBlocks (Item id, CreativeTabs tab, List list)
{
}
}