Package com.loohp.limbo.entity
Class StandardEntityEquipment
java.lang.Object
com.loohp.limbo.entity.StandardEntityEquipment
- All Implemented Interfaces:
EntityEquipment
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the entity of all armor and held itemsGets a copy of all worn armorgetBoots()Gets a copy of the boots currently being worn by the entityGets a copy of the chest plate currently being worn by the entityGets a copy of the helmet currently being worn by the entityGet the entity this EntityEquipment belongs togetItem(EquipmentSlot slot) Gets the ItemStack at the given equipment slot in the inventory.Gets a copy of the item the entity is currently holding in their main hand.Gets a copy of the item the entity is currently holding in their off hand.Gets a copy of the leggings currently being worn by the entityvoidsetArmorContents(ItemStack[] items) Sets the entities armor to the provided array of ItemStacksvoidSets the boots worn by the entityvoidsetChestplate(ItemStack chestplate) Sets the chest plate worn by the entityvoidSets the helmet worn by the entityvoidsetItem(EquipmentSlot slot, ItemStack item) Stores the ItemStack at the given equipment slot in the inventory.voidsetItemInMainHand(ItemStack item) Sets the item the entity is holding in their main hand.voidsetItemInOffHand(ItemStack item) Sets the item the entity is holding in their off hand.voidsetLeggings(ItemStack leggings) Sets the leggings worn by the entity
-
Constructor Details
-
StandardEntityEquipment
-
-
Method Details
-
setItem
Description copied from interface:EntityEquipmentStores the ItemStack at the given equipment slot in the inventory.- Specified by:
setItemin interfaceEntityEquipment- Parameters:
slot- the slot to put the ItemStackitem- the ItemStack to set
-
getItem
Description copied from interface:EntityEquipmentGets the ItemStack at the given equipment slot in the inventory.- Specified by:
getItemin interfaceEntityEquipment- Parameters:
slot- the slot to get the ItemStack- Returns:
- the ItemStack in the given slot
-
getItemInMainHand
Description copied from interface:EntityEquipmentGets a copy of the item the entity is currently holding in their main hand.- Specified by:
getItemInMainHandin interfaceEntityEquipment- Returns:
- the currently held item
-
setItemInMainHand
Description copied from interface:EntityEquipmentSets the item the entity is holding in their main hand.- Specified by:
setItemInMainHandin interfaceEntityEquipment- Parameters:
item- The item to put into the entities hand
-
getItemInOffHand
Description copied from interface:EntityEquipmentGets a copy of the item the entity is currently holding in their off hand.- Specified by:
getItemInOffHandin interfaceEntityEquipment- Returns:
- the currently held item
-
setItemInOffHand
Description copied from interface:EntityEquipmentSets the item the entity is holding in their off hand.- Specified by:
setItemInOffHandin interfaceEntityEquipment- Parameters:
item- The item to put into the entities hand
-
getHelmet
Description copied from interface:EntityEquipmentGets a copy of the helmet currently being worn by the entity- Specified by:
getHelmetin interfaceEntityEquipment- Returns:
- The helmet being worn
-
setHelmet
Description copied from interface:EntityEquipmentSets the helmet worn by the entity- Specified by:
setHelmetin interfaceEntityEquipment- Parameters:
helmet- The helmet to put on the entity
-
getChestplate
Description copied from interface:EntityEquipmentGets a copy of the chest plate currently being worn by the entity- Specified by:
getChestplatein interfaceEntityEquipment- Returns:
- The chest plate being worn
-
setChestplate
Description copied from interface:EntityEquipmentSets the chest plate worn by the entity- Specified by:
setChestplatein interfaceEntityEquipment- Parameters:
chestplate- The chest plate to put on the entity
-
getLeggings
Description copied from interface:EntityEquipmentGets a copy of the leggings currently being worn by the entity- Specified by:
getLeggingsin interfaceEntityEquipment- Returns:
- The leggings being worn
-
setLeggings
Description copied from interface:EntityEquipmentSets the leggings worn by the entity- Specified by:
setLeggingsin interfaceEntityEquipment- Parameters:
leggings- The leggings to put on the entity
-
getBoots
Description copied from interface:EntityEquipmentGets a copy of the boots currently being worn by the entity- Specified by:
getBootsin interfaceEntityEquipment- Returns:
- The boots being worn
-
setBoots
Description copied from interface:EntityEquipmentSets the boots worn by the entity- Specified by:
setBootsin interfaceEntityEquipment- Parameters:
boots- The boots to put on the entity
-
getArmorContents
Description copied from interface:EntityEquipmentGets a copy of all worn armor- Specified by:
getArmorContentsin interfaceEntityEquipment- Returns:
- The array of worn armor. Individual items may be null.
-
setArmorContents
Description copied from interface:EntityEquipmentSets the entities armor to the provided array of ItemStacks- Specified by:
setArmorContentsin interfaceEntityEquipment- Parameters:
items- The items to set the armor as. Individual items may be null.
-
clear
public void clear()Description copied from interface:EntityEquipmentClears the entity of all armor and held items- Specified by:
clearin interfaceEntityEquipment
-
getHolder
Description copied from interface:EntityEquipmentGet the entity this EntityEquipment belongs to- Specified by:
getHolderin interfaceEntityEquipment- Returns:
- the entity this EntityEquipment belongs to
-