Module gomint.api

Interface Block

    • Method Detail

      • getType

        BlockType getType()
        Get the type of this block. This is only recommended when using switch tables.
        Returns:
        type of this block
      • getSkyLightLevel

        byte getSkyLightLevel()
        Get the level of skylight this block has
        Returns:
        The skylight data of this block
      • getBlockLightLevel

        byte getBlockLightLevel()
        get the level of block light
        Returns:
        The block light data
      • isTransparent

        boolean isTransparent()
        Does this block let sky light shine trough?
        Returns:
        true when it does, false when it does not
      • isSolid

        boolean isSolid()
        Is this block solid?
        Returns:
        true when its solid, false when not
      • getLocation

        Location getLocation()
        Get the current location of this block
        Returns:
        Location of this block
      • setType

        <T extends Block> T setType​(Class<T> blockType)
        Set the type of this block to another material
        Type Parameters:
        T - block generic type
        Parameters:
        blockType - the new material of this block
        Returns:
        the new placed block
      • setFromBlock

        <T extends Block> T setFromBlock​(T block)
        Set the data and tiles from a block which has been on the same position before
        Type Parameters:
        T - type of block
        Parameters:
        block - which should be set
        Returns:
        null when location doesn't match, block when set
      • copyFromBlock

        <T extends Block> T copyFromBlock​(T block)
        Copy all data from the given block to this block
        Type Parameters:
        T - type of block
        Parameters:
        block - which should be set
        Returns:
        new block
      • canPassThrough

        boolean canPassThrough()
        Can a bounding box pass through this block?
        Returns:
        if a bounding box can pass though or not
      • getBoundingBox

        List<AxisAlignedBB> getBoundingBox()
        Get the bounding box of this block
        Returns:
        the bounding boxes of this block (can be multiple for stairs etc.)
      • intersectsWith

        boolean intersectsWith​(AxisAlignedBB bb)
        Check if the block intersects with the given bounding box
        Parameters:
        bb - bounding box to check
        Returns:
        true when it intersects, false when not
      • getFrictionFactor

        float getFrictionFactor()
        Describes how slippery a block is
        Returns:
        the amount of blocks something can slip on this block
      • getSide

        Block getSide​(BlockFace face)
        Get the block attached to the given side
        Parameters:
        face - for which we want the block
        Returns:
        attached block
      • getDrops

        List<ItemStack> getDrops​(ItemStack toolItem)
        Get a list of drops which will be dropped when using the given tool
        Parameters:
        toolItem - which will be used to generate the drops
        Returns:
        list of item stacks which can be used as drops
      • isPlaced

        boolean isPlaced()
        This method tells you if you can modify the block. A block gets unmodifiable when the block id in the same location differs (setType(Class).
        Returns:
        true when the block has been placed in the world, false when not
      • getBiome

        Biome getBiome()
        Get the biome of this block
        Returns:
        biome of the block