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 TypeMethodDescriptionvoid
clear()
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 entityvoid
setArmorContents
(ItemStack[] items) Sets the entities armor to the provided array of ItemStacksvoid
Sets the boots worn by the entityvoid
setChestplate
(ItemStack chestplate) Sets the chest plate worn by the entityvoid
Sets the helmet worn by the entityvoid
setItem
(EquipmentSlot slot, ItemStack item) Stores the ItemStack at the given equipment slot in the inventory.void
setItemInMainHand
(ItemStack item) Sets the item the entity is holding in their main hand.void
setItemInOffHand
(ItemStack item) Sets the item the entity is holding in their off hand.void
setLeggings
(ItemStack leggings) Sets the leggings worn by the entity
-
Constructor Details
-
StandardEntityEquipment
-
-
Method Details
-
setItem
Description copied from interface:EntityEquipment
Stores the ItemStack at the given equipment slot in the inventory.- Specified by:
setItem
in interfaceEntityEquipment
- Parameters:
slot
- the slot to put the ItemStackitem
- the ItemStack to set
-
getItem
Description copied from interface:EntityEquipment
Gets the ItemStack at the given equipment slot in the inventory.- Specified by:
getItem
in interfaceEntityEquipment
- Parameters:
slot
- the slot to get the ItemStack- Returns:
- the ItemStack in the given slot
-
getItemInMainHand
Description copied from interface:EntityEquipment
Gets a copy of the item the entity is currently holding in their main hand.- Specified by:
getItemInMainHand
in interfaceEntityEquipment
- Returns:
- the currently held item
-
setItemInMainHand
Description copied from interface:EntityEquipment
Sets the item the entity is holding in their main hand.- Specified by:
setItemInMainHand
in interfaceEntityEquipment
- Parameters:
item
- The item to put into the entities hand
-
getItemInOffHand
Description copied from interface:EntityEquipment
Gets a copy of the item the entity is currently holding in their off hand.- Specified by:
getItemInOffHand
in interfaceEntityEquipment
- Returns:
- the currently held item
-
setItemInOffHand
Description copied from interface:EntityEquipment
Sets the item the entity is holding in their off hand.- Specified by:
setItemInOffHand
in interfaceEntityEquipment
- Parameters:
item
- The item to put into the entities hand
-
getHelmet
Description copied from interface:EntityEquipment
Gets a copy of the helmet currently being worn by the entity- Specified by:
getHelmet
in interfaceEntityEquipment
- Returns:
- The helmet being worn
-
setHelmet
Description copied from interface:EntityEquipment
Sets the helmet worn by the entity- Specified by:
setHelmet
in interfaceEntityEquipment
- Parameters:
helmet
- The helmet to put on the entity
-
getChestplate
Description copied from interface:EntityEquipment
Gets a copy of the chest plate currently being worn by the entity- Specified by:
getChestplate
in interfaceEntityEquipment
- Returns:
- The chest plate being worn
-
setChestplate
Description copied from interface:EntityEquipment
Sets the chest plate worn by the entity- Specified by:
setChestplate
in interfaceEntityEquipment
- Parameters:
chestplate
- The chest plate to put on the entity
-
getLeggings
Description copied from interface:EntityEquipment
Gets a copy of the leggings currently being worn by the entity- Specified by:
getLeggings
in interfaceEntityEquipment
- Returns:
- The leggings being worn
-
setLeggings
Description copied from interface:EntityEquipment
Sets the leggings worn by the entity- Specified by:
setLeggings
in interfaceEntityEquipment
- Parameters:
leggings
- The leggings to put on the entity
-
getBoots
Description copied from interface:EntityEquipment
Gets a copy of the boots currently being worn by the entity- Specified by:
getBoots
in interfaceEntityEquipment
- Returns:
- The boots being worn
-
setBoots
Description copied from interface:EntityEquipment
Sets the boots worn by the entity- Specified by:
setBoots
in interfaceEntityEquipment
- Parameters:
boots
- The boots to put on the entity
-
getArmorContents
Description copied from interface:EntityEquipment
Gets a copy of all worn armor- Specified by:
getArmorContents
in interfaceEntityEquipment
- Returns:
- The array of worn armor. Individual items may be null.
-
setArmorContents
Description copied from interface:EntityEquipment
Sets the entities armor to the provided array of ItemStacks- Specified by:
setArmorContents
in interfaceEntityEquipment
- Parameters:
items
- The items to set the armor as. Individual items may be null.
-
clear
public void clear()Description copied from interface:EntityEquipment
Clears the entity of all armor and held items- Specified by:
clear
in interfaceEntityEquipment
-
getHolder
Description copied from interface:EntityEquipment
Get the entity this EntityEquipment belongs to- Specified by:
getHolder
in interfaceEntityEquipment
- Returns:
- the entity this EntityEquipment belongs to
-