Class ArmyPopulationTrigger
java.lang.Object
com.minecolonies.api.advancements.AbstractCriterionTrigger<ArmyPopulationListeners,ArmyPopulationCriterionInstance>
com.minecolonies.api.advancements.army_population.ArmyPopulationTrigger
- All Implemented Interfaces:
net.minecraft.advancements.CriterionTrigger<ArmyPopulationCriterionInstance>
public class ArmyPopulationTrigger
extends AbstractCriterionTrigger<ArmyPopulationListeners,ArmyPopulationCriterionInstance>
Triggered on allocation of new soldiers
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.advancements.CriterionTrigger
net.minecraft.advancements.CriterionTrigger.Listener<T extends net.minecraft.advancements.CriterionTriggerInstance> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull ArmyPopulationCriterionInstancecreateInstance(@NotNull com.google.gson.JsonObject object, @NotNull net.minecraft.advancements.critereon.DeserializationContext context) voidtrigger(net.minecraft.server.level.ServerPlayer player, int armySize) Triggers the listener checks if there is any listening inMethods inherited from class com.minecolonies.api.advancements.AbstractCriterionTrigger
addPlayerListener, getId, getListeners, removePlayerListener, removePlayerListeners
-
Constructor Details
-
ArmyPopulationTrigger
public ArmyPopulationTrigger()
-
-
Method Details
-
trigger
public void trigger(net.minecraft.server.level.ServerPlayer player, int armySize) Triggers the listener checks if there is any listening in- Parameters:
player- the player the check regardsarmySize- the related colony's current army size
-
createInstance
@NotNull public @NotNull ArmyPopulationCriterionInstance createInstance(@NotNull @NotNull com.google.gson.JsonObject object, @NotNull @NotNull net.minecraft.advancements.critereon.DeserializationContext context)
-