2017-07-31 02:46:08 +02:00
|
|
|
package de.ellpeck.actuallyadditions.mod.blocks;
|
|
|
|
|
|
|
|
import javax.annotation.Nullable;
|
|
|
|
|
|
|
|
import de.ellpeck.actuallyadditions.mod.RegistryHandler;
|
|
|
|
import net.minecraft.block.Block;
|
|
|
|
import net.minecraft.block.material.Material;
|
|
|
|
import net.minecraft.block.state.BlockFaceShape;
|
|
|
|
import net.minecraft.block.state.IBlockState;
|
|
|
|
import net.minecraft.util.EnumBlockRenderType;
|
|
|
|
import net.minecraft.util.EnumFacing;
|
|
|
|
import net.minecraft.util.math.AxisAlignedBB;
|
|
|
|
import net.minecraft.util.math.BlockPos;
|
|
|
|
import net.minecraft.world.IBlockAccess;
|
|
|
|
import net.minecraft.world.World;
|
|
|
|
|
|
|
|
public class BlockFakeAir extends Block
|
|
|
|
{
|
2017-08-02 14:01:41 +02:00
|
|
|
public BlockFakeAir(String name){
|
2017-07-31 02:46:08 +02:00
|
|
|
super(Material.AIR);
|
2017-08-02 14:01:41 +02:00
|
|
|
setRegistryName(name);
|
2017-07-31 02:46:08 +02:00
|
|
|
setUnlocalizedName("stop");
|
|
|
|
RegistryHandler.BLOCKS_TO_REGISTER.add(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The type of render function called. MODEL for mixed tesr and static model, MODELBLOCK_ANIMATED for TESR-only,
|
|
|
|
* LIQUID for vanilla liquids, INVISIBLE to skip all rendering
|
|
|
|
*/
|
|
|
|
public EnumBlockRenderType getRenderType(IBlockState state)
|
|
|
|
{
|
|
|
|
return EnumBlockRenderType.INVISIBLE;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Nullable
|
|
|
|
public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, IBlockAccess worldIn, BlockPos pos)
|
|
|
|
{
|
|
|
|
return NULL_AABB;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Used to determine ambient occlusion and culling when rebuilding chunks for render
|
|
|
|
*/
|
|
|
|
public boolean isOpaqueCube(IBlockState state)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean canCollideCheck(IBlockState state, boolean hitIfLiquid)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Spawns this Block's drops into the World as EntityItems.
|
|
|
|
*/
|
|
|
|
public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Whether this Block can be replaced directly by other blocks (true for e.g. tall grass)
|
|
|
|
*/
|
|
|
|
public boolean isReplaceable(IBlockAccess worldIn, BlockPos pos)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean isFullCube(IBlockState state)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
public BlockFaceShape getBlockFaceShape(IBlockAccess p_193383_1_, IBlockState p_193383_2_, BlockPos p_193383_3_, EnumFacing p_193383_4_)
|
|
|
|
{
|
|
|
|
return BlockFaceShape.UNDEFINED;
|
|
|
|
}
|
|
|
|
}
|