Interface ICharcoalManager


public interface ICharcoalManager
Provides functions that are related to the forestry charcoal pile.
  • Method Summary

    Modifier and Type
    Method
    Description
    getWall(net.minecraft.world.level.block.state.BlockState state)
     
     
    void
    Registers your implementation of the ICharcoalPileWall interface.
    void
    registerWall(net.minecraft.world.level.block.Block block, int amount)
    Registers the given block as a valid block for the charcoal pile wall and adds the given charcoal amount to it.
    void
    registerWall(net.minecraft.world.level.block.state.BlockState blockState, int amount)
    Registers the given block as a valid block for the charcoal pile wall and adds the given charcoal amount to it.
    boolean
    removeWall(net.minecraft.world.level.block.Block block)
    Remove a wall associated with the given block.
    boolean
    removeWall(net.minecraft.world.level.block.state.BlockState state)
    Remove a wall that ICharcoalPileWall.matches(BlockState) the given blockstate.
  • Method Details

    • registerWall

      void registerWall(net.minecraft.world.level.block.Block block, int amount)
      Registers the given block as a valid block for the charcoal pile wall and adds the given charcoal amount to it.

      This method unlike registerWall(BlockState, int) ignores the metadata of the actual block and only compares the world block with the given block.

    • registerWall

      void registerWall(net.minecraft.world.level.block.state.BlockState blockState, int amount)
      Registers the given block as a valid block for the charcoal pile wall and adds the given charcoal amount to it.

      This method unlike registerWall(Block, int) compares the world state with the given state and not only the block.

    • registerWall

      void registerWall(ICharcoalPileWall wall)
      Registers your implementation of the ICharcoalPileWall interface.
    • getWall

      @Nullable ICharcoalPileWall getWall(net.minecraft.world.level.block.state.BlockState state)
    • removeWall

      boolean removeWall(net.minecraft.world.level.block.Block block)
      Remove a wall associated with the given block. Not guaranteed to work depending on how ICharcoalPileWall is implemented. removeWall(BlockState) is preferred.
      Returns:
      true if the wall was removed.
    • removeWall

      boolean removeWall(net.minecraft.world.level.block.state.BlockState state)
      Remove a wall that ICharcoalPileWall.matches(BlockState) the given blockstate.
      Parameters:
      state - the blockstate to remove.
      Returns:
      true if the wall was removed.
    • getWalls

      List<ICharcoalPileWall> getWalls()
      Returns:
      A collection with all registered charcoal pile walls.