Contents
Class KillObjectiveTask
java.lang.Object
com.hypixel.hytale.builtin.adventure.objectives.task.ObjectiveTask
com.hypixel.hytale.builtin.adventure.objectives.task.CountObjectiveTask
com.hypixel.hytale.builtin.adventure.npcobjectives.task.KillObjectiveTask
- All Implemented Interfaces:
KillTask, NetworkSerializer<Objective, ObjectiveTask>
- Direct Known Subclasses:
KillNPCObjectiveTask, KillSpawnBeaconObjectiveTask, KillSpawnMarkerObjectiveTask
An objective task representing a kill objective for entities.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BuilderCodec<KillObjectiveTask> The codec used to parseKillObjectiveTaskinstances.Fields inherited from class ObjectiveTask
BASE_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionKillObjectiveTask(KillObjectiveTaskAsset asset, int taskSetIndex, int taskIndex) -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckKilledEntity(Store<EntityStore> store, Ref<EntityStore> npcRef, Objective objective, NPCEntity npc, Damage info) Checks if the killed entity satisfies the conditions of the kill task and updates the objective progress accordingly.getAsset()Methods inherited from class CountObjectiveTask
assetChanged, checkCompletion, increaseTaskCompletion, setTaskCompletion, toPacketMethods inherited from class ObjectiveTask
addMarker, areTaskConditionsFulfilled, complete, completeTransactionRecords, consumeTaskConditions, getMarkers, getNonSerializedTransactionRecords, getSerializedTransactionRecords, isComplete, removeMarker, revertTransactionRecords, sendUpdateObjectiveTaskPacket, setAsset, setup, toString, unloadTransactionRecords
-
Field Details
-
CODEC
The codec used to parseKillObjectiveTaskinstances.
-
-
Constructor Details
-
KillObjectiveTask
-
-
Method Details
-
getAsset
- Overrides:
getAssetin classCountObjectiveTask
-
checkKilledEntity
public void checkKilledEntity(@Nonnull Store<EntityStore> store, @Nonnull Ref<EntityStore> npcRef, @Nonnull Objective objective, @Nonnull NPCEntity npc, @Nonnull Damage info) Description copied from interface:KillTaskChecks if the killed entity satisfies the conditions of the kill task and updates the objective progress accordingly.- Specified by:
checkKilledEntityin interfaceKillTask- Parameters:
store- TheStore<EntityStore>for component access.npcRef- The entity reference of the killed NPC entity.objective- TheObjectiveassociated with this kill task.npc- TheNPCEntitycomponent of the killed entity.info- TheDamageinformation related to the kill event.
-