Class DynamicTreeProxy

java.lang.Object
com.minecolonies.api.compatibility.dynamictrees.DynamicTreeProxy
Direct Known Subclasses:
DynamicTreeCompat

public class DynamicTreeProxy extends Object
This is the fallback for when dynamictrees is not present!
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    checkForDynamicLeavesBlock(net.minecraft.world.level.block.Block block)
    Default method for when dynamic Tree's mod is not present, returns false
    boolean
    checkForDynamicSapling(net.minecraft.world.item.Item item)
    Default method for when dynamic Tree's mod is not present, returns false
    boolean
    checkForDynamicTreeBlock(net.minecraft.world.level.block.Block block)
    Default method for when dynamic Tree's mod is not present, returns false
    boolean
    checkForDynamicTrunkShellBlock(net.minecraft.world.level.block.Block block)
    Default method for when dynamic Tree's mod is not present, returns false.
    net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack>
    getDropsForLeaf(net.minecraft.world.level.LevelAccessor world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockstate, int fortune, net.minecraft.world.level.block.Block leaf)
    Get the list of Drops from a Dynamic leaf
    getTreeBreakActionCompat(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos blockToBreak, net.minecraft.world.item.ItemStack toolToUse, net.minecraft.core.BlockPos workerPos)
    Default method when dynamic tree's isnt present
    boolean
    hasFittingTreeFamilyCompat(net.minecraft.core.BlockPos block1, net.minecraft.core.BlockPos block2, net.minecraft.world.level.LevelAccessor world)
    Default method to check if two given blocks have the same Tree family
    boolean
    Default method for when dynamic Tree's mod is not present, returns false
    boolean
    plantDynamicSaplingCompat(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos location, net.minecraft.world.item.ItemStack sapling)
    Default method for trying to plant a dynamic sapling when the mod isnt present.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DynamicTreeProxy

      public DynamicTreeProxy()
  • Method Details

    • isDynamicTreePresent

      public boolean isDynamicTreePresent()
      Default method for when dynamic Tree's mod is not present, returns false
      Returns:
      true if so.
    • checkForDynamicTreeBlock

      public boolean checkForDynamicTreeBlock(net.minecraft.world.level.block.Block block)
      Default method for when dynamic Tree's mod is not present, returns false
      Parameters:
      block - Block to check
      Returns:
      false
    • checkForDynamicLeavesBlock

      public boolean checkForDynamicLeavesBlock(net.minecraft.world.level.block.Block block)
      Default method for when dynamic Tree's mod is not present, returns false
      Parameters:
      block - Block to check
      Returns:
      false
    • checkForDynamicTrunkShellBlock

      public boolean checkForDynamicTrunkShellBlock(net.minecraft.world.level.block.Block block)
      Default method for when dynamic Tree's mod is not present, returns false.
      Parameters:
      block - Block to check
      Returns:
      false
    • getDropsForLeaf

      public net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getDropsForLeaf(net.minecraft.world.level.LevelAccessor world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockstate, int fortune, net.minecraft.world.level.block.Block leaf)
      Get the list of Drops from a Dynamic leaf
      Parameters:
      world - the world it is in.
      pos - the pos of the block.
      blockstate - the blockstate to check.
      fortune - the fortune effect.
      leaf - The leaf to check
      Returns:
      NonNullList of ItemStack Drops
    • checkForDynamicSapling

      public boolean checkForDynamicSapling(net.minecraft.world.item.Item item)
      Default method for when dynamic Tree's mod is not present, returns false
      Parameters:
      item - Block to check
      Returns:
      false
    • getTreeBreakActionCompat

      public Runnable getTreeBreakActionCompat(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos blockToBreak, net.minecraft.world.item.ItemStack toolToUse, net.minecraft.core.BlockPos workerPos)
      Default method when dynamic tree's isnt present
      Parameters:
      world - the world it is in.
      blockToBreak - the block position.
      toolToUse - the tool
      workerPos - the pos of the worker
      Returns:
      Null
    • plantDynamicSaplingCompat

      public boolean plantDynamicSaplingCompat(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos location, net.minecraft.world.item.ItemStack sapling)
      Default method for trying to plant a dynamic sapling when the mod isnt present.
      Parameters:
      world - the world it is in.
      location - the position.
      sapling - the sapling stack.
      Returns:
      false
    • hasFittingTreeFamilyCompat

      public boolean hasFittingTreeFamilyCompat(net.minecraft.core.BlockPos block1, net.minecraft.core.BlockPos block2, net.minecraft.world.level.LevelAccessor world)
      Default method to check if two given blocks have the same Tree family
      Parameters:
      block1 - First blockpos to compare
      block2 - Second blockpos to compare
      world - the world it is in.
      Returns:
      if compat exists.