public class ItemFoodSeeds extends ItemFood
ItemType.Context
Constructor and Description |
---|
ItemFoodSeeds(org.bukkit.Material cropsType,
org.bukkit.Material soilType,
int food,
float saturation)
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
void |
rightClickBlock(GlowPlayer player,
GlowBlock target,
org.bukkit.block.BlockFace face,
org.bukkit.inventory.ItemStack holding,
org.bukkit.util.Vector clickedLoc,
org.bukkit.inventory.EquipmentSlot hand)
Called when a player right-clicks on a block while holding this item.
|
eat, endUse, getFoodLevel, getSaturation, handleEat, startUse
getContext, rightClickAir
getId, getMaterial, getMaxStackSize, getPlaceAs, setId, setMaterial, setMaxStackSize, setPlaceAs, setPlaceAs, toString
public ItemFoodSeeds(org.bukkit.Material cropsType, org.bukkit.Material soilType, int food, float saturation)
cropsType
- this item's block formsoilType
- the type of block this can be planted onfood
- the amount of hunger this food fills, in half iconssaturation
- the amount of saturation this food grants, in half icons savedpublic void rightClickBlock(GlowPlayer player, GlowBlock target, org.bukkit.block.BlockFace face, org.bukkit.inventory.ItemStack holding, org.bukkit.util.Vector clickedLoc, org.bukkit.inventory.EquipmentSlot hand)
ItemType
rightClickBlock
in class ItemTimedUsage
player
- The playertarget
- The block the player right-clickedface
- The face on which the click occurredholding
- The ItemStack the player was holdingclickedLoc
- The coordinates at which the click occurredhand
- The hand slot of this itemCopyright © 2021. All rights reserved.