Interface IWoodAccess


public interface IWoodAccess
Provides easy access to Forestry and Vanilla wood items. Forestry wood blocks have the same block state properties as vanilla ones. Note that all doors are fireproof (even vanilla).
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.world.level.block.state.BlockState
    getBlock(IWoodType woodType, WoodBlockKind kind, boolean fireproof)
     
    net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block>
    getLogBlockTag(IWoodType kind, boolean fireproof)
     
    net.minecraft.tags.TagKey<net.minecraft.world.item.Item>
    getLogItemTag(IWoodType kind, boolean fireproof)
     
     
    net.minecraft.world.item.ItemStack
    getStack(IWoodType woodType, WoodBlockKind kind, boolean fireproof)
     
    void
    register(IWoodType woodType, WoodBlockKind woodBlockKind, boolean fireproof, net.minecraft.world.level.block.state.BlockState blockState, Supplier<net.minecraft.world.item.Item> itemStack)
    Call this after item registry to register the blocks/items for your wood type.
    void
    registerLogTag(IWoodType woodType, boolean fireproof, net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block> logBlockTag, net.minecraft.tags.TagKey<net.minecraft.world.item.Item> logItemTag)
    Call this after item registry to register the block tags used by your wood type.
  • Method Details

    • getStack

      net.minecraft.world.item.ItemStack getStack(IWoodType woodType, WoodBlockKind kind, boolean fireproof)
    • getBlock

      net.minecraft.world.level.block.state.BlockState getBlock(IWoodType woodType, WoodBlockKind kind, boolean fireproof)
    • getLogBlockTag

      net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block> getLogBlockTag(IWoodType kind, boolean fireproof)
      Since:
      2.6.0
    • getLogItemTag

      net.minecraft.tags.TagKey<net.minecraft.world.item.Item> getLogItemTag(IWoodType kind, boolean fireproof)
      Since:
      2.6.0
    • getRegisteredWoodTypes

      List<IWoodType> getRegisteredWoodTypes()
    • register

      void register(IWoodType woodType, WoodBlockKind woodBlockKind, boolean fireproof, net.minecraft.world.level.block.state.BlockState blockState, Supplier<net.minecraft.world.item.Item> itemStack)
      Call this after item registry to register the blocks/items for your wood type.
      Parameters:
      woodType - The type of wood, ex. Oak or Teak
      woodBlockKind - The kind of wood block, ex. Planks or Fence
      fireproof - Whether this is for the fireproof variant of the wood block kind (ignored in the case of non-burnable wood blocks)
      blockState - The default block state of the Planks/Fence/etc. for the given wood type
      itemStack - Supplier for the item form of Planks/Fence/etc. for the given wood type
    • registerLogTag

      void registerLogTag(IWoodType woodType, boolean fireproof, net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block> logBlockTag, net.minecraft.tags.TagKey<net.minecraft.world.item.Item> logItemTag)
      Call this after item registry to register the block tags used by your wood type.
      Parameters:
      woodType - The type of wood, ex. Oak or Teak
      fireproof - Whether these tags are for the fireproof logs or the regular logs
      logBlockTag - The block tag for logs of this wood type
      logItemTag - The item tag for logs of this wood type
      Since:
      2.6.0