Package net.neoforged.neoforge.event
Class TagsUpdatedEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.TagsUpdatedEvent
public class TagsUpdatedEvent
extends net.neoforged.bus.api.Event
Fired when tags are updated on either server or client. This event can be used to refresh data that depends on tags.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresents the cause for a tag update. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate final HolderLookup.Providerprivate final TagsUpdatedEvent.UpdateCause -
Constructor Summary
ConstructorsConstructorDescriptionTagsUpdatedEvent(HolderLookup.Provider lookupProvider, boolean fromClientPacket, boolean isIntegratedServerConnection) -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether static data (which in single player is shared between server and client thread) should be updated as a result of this event.
-
Field Details
-
lookupProvider
-
updateCause
-
integratedServer
private final boolean integratedServer
-
-
Constructor Details
-
TagsUpdatedEvent
public TagsUpdatedEvent(HolderLookup.Provider lookupProvider, boolean fromClientPacket, boolean isIntegratedServerConnection)
-
-
Method Details
-
getLookupProvider
- Returns:
- The dynamic registries that have had their tags rebound.
-
getUpdateCause
- Returns:
- the cause for this tag update
-
shouldUpdateStaticData
public boolean shouldUpdateStaticData()Whether static data (which in single player is shared between server and client thread) should be updated as a result of this event. Effectively this means that in single player only the server-side updates this data.
-