public interface IFruitProvider
| Modifier and Type | Method and Description |
|---|---|
int |
getColour(ITreeGenome genome,
net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos,
int ripeningTime)
Returns the color of the fruit spite based on the ripening time of the fruit.
|
int |
getDecorativeColor()
return the color to use for decorative leaves.
|
net.minecraft.util.ResourceLocation |
getDecorativeSprite()
return the ResourceLocation to display on decorative leaves
|
java.lang.String |
getDescription() |
IFruitFamily |
getFamily() |
default float |
getFruitChance(ITreeGenome genome,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos)
The chance that this leaves contains fruits or the chance that a pod block spawns.
|
net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> |
getFruits(ITreeGenome genome,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
int ripeningTime)
Returns all drops of this block if you harvest it.
|
java.lang.String |
getModelName() |
java.lang.String |
getModID() |
java.util.Map<net.minecraft.item.ItemStack,java.lang.Float> |
getProducts()
A unmodifiable map that contains all products and their associated drop chances.
|
int |
getRipeningPeriod() |
java.util.Map<net.minecraft.item.ItemStack,java.lang.Float> |
getSpecialty()
A unmodifiable map that contains all specialties and their associated drop chances.
|
net.minecraft.util.ResourceLocation |
getSprite(ITreeGenome genome,
net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos,
int ripeningTime) |
boolean |
isFruitLeaf(ITreeGenome genome,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos)
Determines if fruit block of this provider is considered a leaf block.
|
void |
registerSprites()
Can be used to register the sprite/s that can be returned with
getSprite(ITreeGenome, IBlockAccess, BlockPos, int). |
boolean |
requiresFruitBlocks() |
boolean |
trySpawnFruitBlock(ITreeGenome genome,
net.minecraft.world.World world,
java.util.Random rand,
net.minecraft.util.math.BlockPos pos)
Tries to spawn a fruit block at the potential position when the tree generates.
|
IFruitFamily getFamily()
int getColour(ITreeGenome genome, net.minecraft.world.IBlockAccess world, net.minecraft.util.math.BlockPos pos, int ripeningTime)
genome - The genome of the tree of the pod / leaves block.ripeningTime - The ripening time of the leaves / pod block. From 0 to getRipeningPeriod().int getDecorativeColor()
boolean isFruitLeaf(ITreeGenome genome, net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos)
genome - The genome of the tree of the pod / leaves block.world - The world in that the pod / leaves block is located.pos - The position of the pod / leaves block.default float getFruitChance(ITreeGenome genome, net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos)
genome - The genome of the tree of the pod / leaves block.int getRipeningPeriod()
java.util.Map<net.minecraft.item.ItemStack,java.lang.Float> getProducts()
java.util.Map<net.minecraft.item.ItemStack,java.lang.Float> getSpecialty()
net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> getFruits(ITreeGenome genome, net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos, int ripeningTime)
genome - The genome of the tree of the leaves / pod.ripeningTime - The repining time of the block. From 0 to getRipeningPeriod().java.lang.String getDescription()
@Nullable java.lang.String getModelName()
java.lang.String getModID()
@Nullable net.minecraft.util.ResourceLocation getSprite(ITreeGenome genome, net.minecraft.world.IBlockAccess world, net.minecraft.util.math.BlockPos pos, int ripeningTime)
ripeningTime - Elapsed ripening time for the fruit.@Nullable net.minecraft.util.ResourceLocation getDecorativeSprite()
boolean requiresFruitBlocks()
boolean trySpawnFruitBlock(ITreeGenome genome, net.minecraft.world.World world, java.util.Random rand, net.minecraft.util.math.BlockPos pos)
ITreeGenome.getSappiness()void registerSprites()
getSprite(ITreeGenome, IBlockAccess, BlockPos, int).