From d7dd8eab5ee36cdb46f08fbf203847c2c1392154 Mon Sep 17 00:00:00 2001 From: ferreusveritas Date: Fri, 2 Feb 2018 16:08:15 -0500 Subject: [PATCH] Add IDropCreator Java Doc --- .../api/treedata/IDropCreator.java | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/src/main/java/com/ferreusveritas/dynamictrees/api/treedata/IDropCreator.java b/src/main/java/com/ferreusveritas/dynamictrees/api/treedata/IDropCreator.java index 893adadf9..fb75431d7 100644 --- a/src/main/java/com/ferreusveritas/dynamictrees/api/treedata/IDropCreator.java +++ b/src/main/java/com/ferreusveritas/dynamictrees/api/treedata/IDropCreator.java @@ -3,6 +3,9 @@ import java.util.List; import java.util.Random; +import com.ferreusveritas.dynamictrees.blocks.BlockBranch; +import com.ferreusveritas.dynamictrees.blocks.BlockDynamicLeaves; +import com.ferreusveritas.dynamictrees.trees.DynamicTree; import com.ferreusveritas.dynamictrees.trees.Species; import net.minecraft.item.ItemStack; @@ -15,12 +18,61 @@ public interface IDropCreator { ResourceLocation getName(); + /** + * Gets a list of drops for a {@link BlockDynamicLeaves} when the entire tree is harvested. + * NOT used for individual {@link BlockDynamicLeaves} being directly harvested by hand or tool. + * + * @param world + * @param species + * @param leafPos + * @param random + * @param dropList + * @param soilLife + * @param fortune + * @return + */ List getHarvestDrop(World world, Species species, BlockPos leafPos, Random random, List dropList, int soilLife, int fortune); + /** + * Gets a {@link List} of voluntary drops. Voluntary drops are {@link ItemStack}s that fall from the {@link DynamicTree} at + * random with no player interaction. + * + * @param world + * @param species + * @param rootPos + * @param random + * @param dropList + * @param soilLife + * @return + */ List getVoluntaryDrop(World world, Species species, BlockPos rootPos, Random random, List dropList, int soilLife); + /** + * Gets a {@link List} of Leaves drops. Leaves drops are {@link ItemStack}s that result from the breaking of + * a {@link BlockDynamicLeaves} directly by hand or with a tool. + * + * @param access + * @param species + * @param breakPos + * @param random + * @param dropList + * @param fortune + * @return + */ List getLeavesDrop(IBlockAccess access, Species species, BlockPos breakPos, Random random, List dropList, int fortune); + /** + * Gets a {@link List} of Logs drops. Logs drops are {@link ItemStack}s that result from the breaking of + * a {@link BlockBranch} directly by hand or with a tool. + * + * @param world + * @param species + * @param breakPos + * @param random + * @param dropList + * @param volume + * @return + */ List getLogsDrop(World world, Species species, BlockPos breakPos, Random random, List dropList, int volume); }