base mod created
This commit is contained in:
@@ -0,0 +1,90 @@
|
||||
package net.minecraft.block;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import net.minecraft.block.material.EnumPushReaction;
|
||||
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;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockStructureVoid extends Block
|
||||
{
|
||||
private static final AxisAlignedBB STRUCTURE_VOID_AABB = new AxisAlignedBB(0.3D, 0.3D, 0.3D, 0.7D, 0.7D, 0.7D);
|
||||
|
||||
protected BlockStructureVoid()
|
||||
{
|
||||
super(Material.STRUCTURE_VOID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
|
||||
{
|
||||
return STRUCTURE_VOID_AABB;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to determine ambient occlusion and culling when rebuilding chunks for render
|
||||
*/
|
||||
public boolean isOpaqueCube(IBlockState state)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isFullCube(IBlockState state)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getAmbientOcclusionLightValue(IBlockState state)
|
||||
{
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
/**
|
||||
* Spawns this Block's drops into the World as EntityItems.
|
||||
*/
|
||||
public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
|
||||
{
|
||||
}
|
||||
|
||||
public EnumPushReaction getMobilityFlag(IBlockState state)
|
||||
{
|
||||
return EnumPushReaction.DESTROY;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the geometry of the queried face at the given position and state. This is used to decide whether things like
|
||||
* buttons are allowed to be placed on the face, or how glass panes connect to the face, among other things.
|
||||
* <p>
|
||||
* Common values are {@code SOLID}, which is the default, and {@code UNDEFINED}, which represents something that
|
||||
* does not fit the other descriptions and will generally cause other things not to connect to the face.
|
||||
*
|
||||
* @return an approximation of the form of the given face
|
||||
*/
|
||||
public BlockFaceShape getBlockFaceShape(IBlockAccess worldIn, IBlockState state, BlockPos pos, EnumFacing face)
|
||||
{
|
||||
return BlockFaceShape.UNDEFINED;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user