Package forestry.api.arboriculture
Interface ICharcoalManager
public interface ICharcoalManager
Provides functions that are related to the forestry charcoal pile.
-
Method Summary
Modifier and TypeMethodDescriptiongetWall(net.minecraft.world.level.block.state.BlockState state) getWalls()voidRegisters your implementation of theICharcoalPileWallinterface.voidregisterWall(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.voidregisterWall(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.booleanremoveWall(net.minecraft.world.level.block.Block block) Remove a wall associated with the given block.booleanremoveWall(net.minecraft.world.level.block.state.BlockState state) Remove a wall thatICharcoalPileWall.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
Registers your implementation of theICharcoalPileWallinterface. -
getWall
-
removeWall
boolean removeWall(net.minecraft.world.level.block.Block block) Remove a wall associated with the given block. Not guaranteed to work depending on howICharcoalPileWallis 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 thatICharcoalPileWall.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.
-