public final class CropManager
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static boolean |
canSustainPlant(net.minecraft.world.World world,
net.minecraft.item.ItemStack seed,
net.minecraft.util.math.BlockPos pos) |
static ICropHandler |
getDefaultHandler() |
static boolean |
harvestCrop(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> drops) |
static boolean |
isMature(net.minecraft.world.IBlockAccess blockAccess,
net.minecraft.block.state.IBlockState state,
net.minecraft.util.math.BlockPos pos) |
static boolean |
isSeed(net.minecraft.item.ItemStack stack) |
static boolean |
plantCrop(net.minecraft.world.World world,
net.minecraft.entity.player.EntityPlayer player,
net.minecraft.item.ItemStack seed,
net.minecraft.util.math.BlockPos pos)
Attempts to plant the crop given by the seed into the world.
|
static void |
registerHandler(ICropHandler cropHandler) |
static void |
setDefaultHandler(ICropHandler cropHandler) |
public static void registerHandler(ICropHandler cropHandler)
public static void setDefaultHandler(ICropHandler cropHandler)
public static ICropHandler getDefaultHandler()
public static boolean isSeed(net.minecraft.item.ItemStack stack)
public static boolean canSustainPlant(net.minecraft.world.World world, net.minecraft.item.ItemStack seed, net.minecraft.util.math.BlockPos pos)
public static 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.isSeed(ItemStack)
is true, and
ICropHandler.canSustainPlant(World, ItemStack, BlockPos)
is true for the position.public static boolean isMature(net.minecraft.world.IBlockAccess blockAccess, net.minecraft.block.state.IBlockState state, net.minecraft.util.math.BlockPos pos)
public static boolean harvestCrop(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos, net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> drops)