Class ItemAttributeEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.stereowalker.unionlib.event.item.ItemAttributeEvent
public class ItemAttributeEvent
extends net.minecraftforge.eventbus.api.Event
This event is fired whenever an items attribute modifier is being retrieved
This allows mod authors to add or remove attribute modifiers from vanilla or other modded items
If this event is cancelled, it will give the item an empty attribute map
NOTE: Attributes added via this event do not persist.
This allows mod authors to add or remove attribute modifiers from vanilla or other modded items
If this event is cancelled, it will give the item an empty attribute map
NOTE: Attributes added via this event do not persist.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionItemAttributeEvent(com.google.common.collect.HashMultimap<net.minecraft.world.entity.ai.attributes.Attribute, net.minecraft.world.entity.ai.attributes.AttributeModifier> attributeMap, net.minecraft.world.entity.EquipmentSlot equipmentSlot, net.minecraft.world.item.ItemStack stack) -
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.collect.HashMultimap<net.minecraft.world.entity.ai.attributes.Attribute, net.minecraft.world.entity.ai.attributes.AttributeModifier> net.minecraft.world.entity.EquipmentSlotnet.minecraft.world.item.ItemStackgetStack()Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Constructor Details
-
ItemAttributeEvent
public ItemAttributeEvent(com.google.common.collect.HashMultimap<net.minecraft.world.entity.ai.attributes.Attribute, net.minecraft.world.entity.ai.attributes.AttributeModifier> attributeMap, net.minecraft.world.entity.EquipmentSlot equipmentSlot, net.minecraft.world.item.ItemStack stack)
-
-
Method Details
-
getEquipmentSlot
public net.minecraft.world.entity.EquipmentSlot getEquipmentSlot() -
getStack
public net.minecraft.world.item.ItemStack getStack() -
getAttributeMap
public com.google.common.collect.HashMultimap<net.minecraft.world.entity.ai.attributes.Attribute,net.minecraft.world.entity.ai.attributes.AttributeModifier> getAttributeMap()
-