BiomesOPlenty/apis/powercrystals/minefactoryreloaded/api/IFactoryFertilizable.java

40 lines
1.7 KiB
Java
Raw Normal View History

2013-06-14 06:44:53 +00:00
package powercrystals.minefactoryreloaded.api;
import net.minecraft.world.World;
2013-09-21 10:30:47 +00:00
import java.util.Random;
2013-06-14 06:44:53 +00:00
/**
* @author PowerCrystals
2013-09-21 10:30:47 +00:00
* <p/>
* Defines a fertilizable block, and the process to fertilize it. You can assume that you will never have to check that block ID matches the one returned by
* getFertilizableBlockId().
2013-06-14 06:44:53 +00:00
*/
2013-09-21 10:30:47 +00:00
public interface IFactoryFertilizable {
/**
* @return The block ID this instance is managing.
*/
public int getFertilizableBlockId();
/**
* @param world The world this block belongs to.
* @param x The X coordinate of this block.
* @param y The Y coordinate of this block.
* @param z The Z coordinate of this block.
* @param fertilizerType The kind of fertilizer being used.
* @return True if the block at (x,y,z) can be fertilized with the given type of fertilizer.
*/
public boolean canFertilizeBlock(World world, int x, int y, int z, FertilizerType fertilizerType);
/**
* @param world The world this block belongs to.
* @param rand A Random instance to use when fertilizing, if necessary.
* @param x The X coordinate of this block.
* @param y The Y coordinate of this block.
* @param z The Z coordinate of this block.
* @param fertilizerType The kind of fertilizer being used.
* @return True if fertilization was successful. If false, the Fertilizer will not consume a fertilizer item and will not drain power.
*/
public boolean fertilize(World world, Random rand, int x, int y, int z, FertilizerType fertilizerType);
2013-06-14 06:44:53 +00:00
}