public class KilledTrigger extends java.lang.Object implements ICriterionTrigger<KilledTrigger.Instance>
Modifier and Type | Class and Description |
---|---|
static class |
KilledTrigger.Instance |
(package private) static class |
KilledTrigger.Listeners |
ICriterionTrigger.Listener<T extends ICriterionInstance>
Modifier and Type | Field and Description |
---|---|
private ResourceLocation |
id |
private java.util.Map<PlayerAdvancements,KilledTrigger.Listeners> |
listeners |
Constructor and Description |
---|
KilledTrigger(ResourceLocation id) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(PlayerAdvancements playerAdvancementsIn,
ICriterionTrigger.Listener<KilledTrigger.Instance> listener) |
KilledTrigger.Instance |
deserializeInstance(com.google.gson.JsonObject json,
com.google.gson.JsonDeserializationContext context) |
ResourceLocation |
getId() |
void |
removeAllListeners(PlayerAdvancements playerAdvancementsIn) |
void |
removeListener(PlayerAdvancements playerAdvancementsIn,
ICriterionTrigger.Listener<KilledTrigger.Instance> listener) |
void |
trigger(EntityPlayerMP player,
Entity entity,
DamageSource source) |
private final java.util.Map<PlayerAdvancements,KilledTrigger.Listeners> listeners
private final ResourceLocation id
public KilledTrigger(ResourceLocation id)
public ResourceLocation getId()
getId
in interface ICriterionTrigger<KilledTrigger.Instance>
public void addListener(PlayerAdvancements playerAdvancementsIn, ICriterionTrigger.Listener<KilledTrigger.Instance> listener)
addListener
in interface ICriterionTrigger<KilledTrigger.Instance>
public void removeListener(PlayerAdvancements playerAdvancementsIn, ICriterionTrigger.Listener<KilledTrigger.Instance> listener)
removeListener
in interface ICriterionTrigger<KilledTrigger.Instance>
public void removeAllListeners(PlayerAdvancements playerAdvancementsIn)
removeAllListeners
in interface ICriterionTrigger<KilledTrigger.Instance>
public KilledTrigger.Instance deserializeInstance(com.google.gson.JsonObject json, com.google.gson.JsonDeserializationContext context)
deserializeInstance
in interface ICriterionTrigger<KilledTrigger.Instance>
public void trigger(EntityPlayerMP player, Entity entity, DamageSource source)