Package forestry.api.arboriculture
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:
-
WoodBlockKindForestryWoodTypeVanillaWoodType
-
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.block.state.BlockStategetBlock(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.ItemStackgetStack(IWoodType woodType, WoodBlockKind kind, boolean fireproof) voidregister(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.voidregisterLogTag(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
-
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 TeakwoodBlockKind- The kind of wood block, ex. Planks or Fencefireproof- 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 typeitemStack- 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 Teakfireproof- Whether these tags are for the fireproof logs or the regular logslogBlockTag- The block tag for logs of this wood typelogItemTag- The item tag for logs of this wood type- Since:
- 2.6.0
-