public class AttachCapabilitiesEvent extends Event
Modifier and Type | Class and Description |
---|---|
static class |
AttachCapabilitiesEvent.Entity
A version of the parent event which is only fired for Entities.
|
static class |
AttachCapabilitiesEvent.Item
A version of the parent event which is only fired for ItemStacks.
|
static class |
AttachCapabilitiesEvent.TileEntity
A version of the parent event which is only fired for Tile Entities.
|
Event.HasResult, Event.Result
Constructor and Description |
---|
AttachCapabilitiesEvent(java.lang.Object obj) |
Modifier and Type | Method and Description |
---|---|
void |
addCapability(ResourceLocation key,
ICapabilityProvider cap)
Adds a capability to be attached to this object.
|
java.util.Map<ResourceLocation,ICapabilityProvider> |
getCapabilities()
A unmodifiable view of the capabilities that will be attached to this object.
|
java.lang.Object |
getObject()
Retrieves the object that is being created, Not much state is set.
|
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
public java.lang.Object getObject()
public void addCapability(ResourceLocation key, ICapabilityProvider cap)
key
- The name of owner of this capability provider.cap
- The capability providerpublic java.util.Map<ResourceLocation,ICapabilityProvider> getCapabilities()