Package net.glowstone.block.itemtype
Class ItemFoodSeeds
java.lang.Object
net.glowstone.block.itemtype.ItemType
net.glowstone.block.itemtype.ItemTimedUsage
net.glowstone.block.itemtype.ItemFood
net.glowstone.block.itemtype.ItemFoodSeeds
A type of edible item that can be planted on one specific type of block, such as a carrot or
potato.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.glowstone.block.itemtype.ItemType
ItemType.Context
-
Constructor Summary
ConstructorsConstructorDescriptionItemFoodSeeds
(org.bukkit.Material cropsType, org.bukkit.Material soilType, int food, float saturation) Creates an instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.Methods inherited from class net.glowstone.block.itemtype.ItemFood
eat, endUse, getFoodLevel, getSaturation, handleEat, startUse
Methods inherited from class net.glowstone.block.itemtype.ItemTimedUsage
getContext, rightClickAir
Methods inherited from class net.glowstone.block.itemtype.ItemType
getMaterial, getMaterials, getMaxStackSize, getPlaceAs, setMaterial, setMaxStackSize, setPlaceAs, setPlaceAs, toString
-
Constructor Details
-
ItemFoodSeeds
public ItemFoodSeeds(org.bukkit.Material cropsType, org.bukkit.Material soilType, int food, float saturation) Creates an instance.- Parameters:
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 saved
-
-
Method Details
-
rightClickBlock
public 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) Description copied from class:ItemType
Called when a player right-clicks on a block while holding this item.- Overrides:
rightClickBlock
in classItemTimedUsage
- Parameters:
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 item
-