public enum CropHandlerPlantable extends java.lang.Enum<CropHandlerPlantable> implements ICropHandler
Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Method and Description |
---|---|
boolean |
canSustainPlant(net.minecraft.world.World world,
net.minecraft.item.ItemStack seed,
net.minecraft.util.math.BlockPos pos)
Check if the item can be planted.
|
boolean |
harvestCrop(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> drops)
Harvest the crop.
|
boolean |
isMature(net.minecraft.world.IBlockAccess blockAccess,
net.minecraft.block.state.IBlockState state,
net.minecraft.util.math.BlockPos pos)
Check if a crop is mature and can be harvested.
|
boolean |
isSeed(net.minecraft.item.ItemStack stack)
Check if an item is a seed.
|
boolean |
plantCrop(net.minecraft.world.World world,
net.minecraft.entity.player.EntityPlayer player,
net.minecraft.item.ItemStack seed,
net.minecraft.util.math.BlockPos pos)
Plant the item in the block.
|
static CropHandlerPlantable |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static CropHandlerPlantable[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CropHandlerPlantable INSTANCE
public static CropHandlerPlantable[] values()
for (CropHandlerPlantable c : CropHandlerPlantable.values()) System.out.println(c);
public static CropHandlerPlantable valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic boolean isSeed(net.minecraft.item.ItemStack stack)
ICropHandler
isSeed
in interface ICropHandler
public boolean canSustainPlant(net.minecraft.world.World world, net.minecraft.item.ItemStack seed, net.minecraft.util.math.BlockPos pos)
ICropHandler
canSustainPlant
in interface ICropHandler
public boolean plantCrop(net.minecraft.world.World world, net.minecraft.entity.player.EntityPlayer player, net.minecraft.item.ItemStack seed, net.minecraft.util.math.BlockPos pos)
ICropHandler
plantCrop
in interface ICropHandler
public boolean isMature(net.minecraft.world.IBlockAccess blockAccess, net.minecraft.block.state.IBlockState state, net.minecraft.util.math.BlockPos pos)
ICropHandler
isMature
in interface ICropHandler
public boolean harvestCrop(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos, net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> drops)
ICropHandler
harvestCrop
in interface ICropHandler
drops
- a list to return the harvest's drops.