Class DynamicTreeProxy
java.lang.Object
com.minecolonies.api.compatibility.dynamictrees.DynamicTreeProxy
- Direct Known Subclasses:
DynamicTreeCompat
This is the fallback for when dynamictrees is not present!
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckForDynamicLeavesBlock(net.minecraft.world.level.block.Block block) Default method for when dynamic Tree's mod is not present, returns falsebooleancheckForDynamicSapling(net.minecraft.world.item.Item item) Default method for when dynamic Tree's mod is not present, returns falsebooleancheckForDynamicTreeBlock(net.minecraft.world.level.block.Block block) Default method for when dynamic Tree's mod is not present, returns falsebooleancheckForDynamicTrunkShellBlock(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 leafnet.minecraft.resources.ResourceKey<net.minecraft.world.damagesource.DamageType>Returns the damageType string falling dynamic Tree's usegetTreeBreakActionCompat(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 presentbooleanhasFittingTreeFamilyCompat(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 familybooleanDefault method for when dynamic Tree's mod is not present, returns falsebooleanplantDynamicSaplingCompat(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.
-
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.
-
getDynamicTreeDamage
public net.minecraft.resources.ResourceKey<net.minecraft.world.damagesource.DamageType> getDynamicTreeDamage()Returns the damageType string falling dynamic Tree's use- Returns:
- damageType
-
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:
leaf- The leaf to checkworld- the world it is in.pos- the pos of the block.blockstate- the blockstate to check.fortune- the fortune effect.- Returns:
NonNullListofItemStackDrops
-
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 toolworkerPos- 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 compareblock2- Second blockpos to compareworld- the world it is in.- Returns:
- if compat exists.
-