Class ItemAttributeEvent
java.lang.Object
net.minecraftforge.eventbus.internal.MutableEventInternals
net.minecraftforge.eventbus.api.event.MutableEvent
com.stereowalker.unionlib.event.item.ItemAttributeEvent
- All Implemented Interfaces:
net.minecraftforge.eventbus.api.event.characteristic.Cancellable, net.minecraftforge.eventbus.internal.Event, net.minecraftforge.eventbus.internal.EventCharacteristic
public class ItemAttributeEvent
extends net.minecraftforge.eventbus.api.event.MutableEvent
implements net.minecraftforge.eventbus.api.event.characteristic.Cancellable
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraftforge.eventbus.api.bus.CancellableEventBus<ItemAttributeEvent> Fields inherited from class net.minecraftforge.eventbus.internal.MutableEventInternals
isMonitoring -
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()
-
Field Details
-
BUS
-
-
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()
-