Class FullPotsAccessorDemo.DioriteFlowerPotBlock

All Implemented Interfaces:
IItemProvider, IForgeBlock, IForgeRegistryEntry<Block>
Enclosing class:
FullPotsAccessorDemo

private static class FullPotsAccessorDemo.DioriteFlowerPotBlock extends Block
  • Field Details

  • Constructor Details

    • DioriteFlowerPotBlock

      public DioriteFlowerPotBlock()
  • Method Details

    • use

      public ActionResultType use(BlockState state, World level, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit)
      Overrides:
      use in class AbstractBlock
    • getShape

      public VoxelShape getShape(BlockState state, IBlockReader world, BlockPos pos, ISelectionContext context)
      Overrides:
      getShape in class AbstractBlock
    • hasTileEntity

      public boolean hasTileEntity(BlockState state)
      Description copied from interface: IForgeBlock
      Called throughout the code as a replacement for block instanceof BlockContainer Moving this to the Block base class allows for mods that wish to extend vanilla blocks, and also want to have a tile entity on that block, may. Return true from this function to specify this block has a tile entity.
      Parameters:
      state - State of the current block
      Returns:
      True if block has a tile entity, false otherwise
    • createTileEntity

      public TileEntity createTileEntity(BlockState state, IBlockReader world)
      Description copied from interface: IForgeBlock
      Called throughout the code as a replacement for ITileEntityProvider.createNewTileEntity Return the same thing you would from that function. This will fall back to ITileEntityProvider.createNewTileEntity(World) if this block is a ITileEntityProvider
      Parameters:
      state - The state of the current block
      world - The world to create the TE in
      Returns:
      A instance of a class extending TileEntity