tcr/java/src/game/block/BlockAir.java

57 lines
1.2 KiB
Java
Raw Normal View History

2025-03-11 00:23:54 +01:00
package game.block;
import game.material.Material;
import game.world.BlockPos;
import game.world.BoundingBox;
import game.world.State;
import game.world.World;
public class BlockAir extends Block
{
public BlockAir()
{
super(Material.air);
}
/**
* The type of render function called. 3 for standard block models, 2 for TESR's, 1 for liquids, -1 is no render
*/
public int getRenderType()
{
return -1;
}
public BoundingBox getCollisionBoundingBox(World worldIn, BlockPos pos, State state)
{
return null;
}
/**
* Used to determine ambient occlusion and culling when rebuilding chunks for render
*/
public boolean isOpaqueCube()
{
return false;
}
public boolean canCollideCheck(State state, boolean hitIfLiquid)
{
return false;
}
/**
* Spawns this Block's drops into the World as EntityItems.
*/
public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, State state, float chance, int fortune)
{
}
/**
* Whether this Block can be replaced directly by other blocks (true for e.g. tall grass)
*/
public boolean isReplaceable(World worldIn, BlockPos pos)
{
return true;
}
}