public class FruitProviderNone extends java.lang.Object implements IFruitProvider
| Modifier and Type | Field and Description |
|---|---|
protected int |
ripeningPeriod |
| Constructor and Description |
|---|
FruitProviderNone(java.lang.String unlocalizedDescription,
IFruitFamily family) |
| 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() |
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
IFruitProvider.getSprite(ITreeGenome, IBlockAccess, BlockPos, int). |
boolean |
requiresFruitBlocks() |
IFruitProvider |
setOverlay(java.lang.String ident) |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFruitChancepublic FruitProviderNone(java.lang.String unlocalizedDescription,
IFruitFamily family)
public IFruitProvider setOverlay(java.lang.String ident)
public IFruitFamily getFamily()
getFamily in interface IFruitProviderpublic net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> getFruits(ITreeGenome genome, net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos, int ripeningTime)
IFruitProvidergetFruits in interface IFruitProvidergenome - The genome of the tree of the leaves / pod.ripeningTime - The repining time of the block. From 0 to IFruitProvider.getRipeningPeriod().public boolean requiresFruitBlocks()
requiresFruitBlocks in interface IFruitProviderpublic boolean trySpawnFruitBlock(ITreeGenome genome, net.minecraft.world.World world, java.util.Random rand, net.minecraft.util.math.BlockPos pos)
IFruitProviderITreeGenome.getSappiness()trySpawnFruitBlock in interface IFruitProviderpublic int getColour(ITreeGenome genome, net.minecraft.world.IBlockAccess world, net.minecraft.util.math.BlockPos pos, int ripeningTime)
IFruitProvidergetColour in interface IFruitProvidergenome - The genome of the tree of the pod / leaves block.ripeningTime - The ripening time of the leaves / pod block. From 0 to IFruitProvider.getRipeningPeriod().public int getDecorativeColor()
IFruitProvidergetDecorativeColor in interface IFruitProviderpublic boolean isFruitLeaf(ITreeGenome genome, net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos)
IFruitProviderisFruitLeaf in interface IFruitProvidergenome - 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.public int getRipeningPeriod()
getRipeningPeriod in interface IFruitProviderpublic java.util.Map<net.minecraft.item.ItemStack,java.lang.Float> getProducts()
IFruitProvidergetProducts in interface IFruitProviderpublic java.util.Map<net.minecraft.item.ItemStack,java.lang.Float> getSpecialty()
IFruitProvidergetSpecialty in interface IFruitProviderpublic java.lang.String getDescription()
getDescription in interface IFruitProviderpublic net.minecraft.util.ResourceLocation getSprite(ITreeGenome genome, net.minecraft.world.IBlockAccess world, net.minecraft.util.math.BlockPos pos, int ripeningTime)
getSprite in interface IFruitProviderripeningTime - Elapsed ripening time for the fruit.public net.minecraft.util.ResourceLocation getDecorativeSprite()
IFruitProvidergetDecorativeSprite in interface IFruitProviderpublic void registerSprites()
IFruitProviderIFruitProvider.getSprite(ITreeGenome, IBlockAccess, BlockPos, int).registerSprites in interface IFruitProvider@Nullable public java.lang.String getModelName()
getModelName in interface IFruitProviderpublic java.lang.String getModID()
getModID in interface IFruitProvider