Class AdvancementEvent.AdvancementProgressEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.entity.EntityEvent
net.neoforged.neoforge.event.entity.living.LivingEvent
net.neoforged.neoforge.event.entity.player.PlayerEvent
net.neoforged.neoforge.event.entity.player.AdvancementEvent
net.neoforged.neoforge.event.entity.player.AdvancementEvent.AdvancementProgressEvent
- Enclosing class:
AdvancementEvent
Fired when the player's progress on an advancement criterion is granted or revoked.
This event is not cancellable, and does not
.invalid reference
have a result
This event is fired on the main Forge event bus, only on the logical server.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.player.AdvancementEvent
AdvancementEvent.AdvancementEarnEvent, AdvancementEvent.AdvancementProgressEvent
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.player.PlayerEvent
PlayerEvent.BreakSpeed, PlayerEvent.Clone, PlayerEvent.HarvestCheck, PlayerEvent.ItemCraftedEvent, PlayerEvent.ItemSmeltedEvent, PlayerEvent.LoadFromFile, PlayerEvent.NameFormat, PlayerEvent.PlayerChangedDimensionEvent, PlayerEvent.PlayerChangeGameModeEvent, PlayerEvent.PlayerLoggedInEvent, PlayerEvent.PlayerLoggedOutEvent, PlayerEvent.PlayerRespawnEvent, PlayerEvent.SaveToFile, PlayerEvent.StartTracking, PlayerEvent.StopTracking, PlayerEvent.TabListNameFormat
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.living.LivingEvent
LivingEvent.LivingJumpEvent, LivingEvent.LivingVisibilityEvent
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.EntityEvent
EntityEvent.EnteringSection, EntityEvent.EntityConstructing, EntityEvent.Size
-
Field Summary
Modifier and TypeFieldDescriptionprivate final AdvancementProgress
private final String
private final AdvancementEvent.AdvancementProgressEvent.ProgressType
-
Constructor Summary
ConstructorDescriptionAdvancementProgressEvent
(Player player, AdvancementHolder progressed, AdvancementProgress advancementProgress, String criterionName, AdvancementEvent.AdvancementProgressEvent.ProgressType progressType) -
Method Summary
Modifier and TypeMethodDescriptionReturns the progress of the advancement.Returns name of the criterion that was progressed.Returns The type of progress for the criterion in this event.Methods inherited from class net.neoforged.neoforge.event.entity.player.AdvancementEvent
getAdvancement
Methods inherited from class net.neoforged.neoforge.event.entity.player.PlayerEvent
getEntity
-
Field Details
-
advancementProgress
-
criterionName
-
progressType
-
-
Constructor Details
-
AdvancementProgressEvent
public AdvancementProgressEvent(Player player, AdvancementHolder progressed, AdvancementProgress advancementProgress, String criterionName, AdvancementEvent.AdvancementProgressEvent.ProgressType progressType)
-
-
Method Details
-
getAdvancementProgress
Returns the progress of the advancement.- Returns:
- the progress of the advancement
-
getCriterionName
Returns name of the criterion that was progressed.- Returns:
- name of the criterion that was progressed
-
getProgressType
Returns The type of progress for the criterion in this event.- Returns:
- The type of progress for the criterion in this event
-