Package net.minecraftforge.event
Class TagsUpdatedEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.TagsUpdatedEvent
public class TagsUpdatedEvent
extends net.minecraftforge.eventbus.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
Modifier and TypeClassDescriptionstatic enum
Represents the cause for a tag update.Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
Modifier and TypeFieldDescriptionprivate final boolean
private final RegistryAccess
private final TagsUpdatedEvent.UpdateCause
-
Constructor Summary
ConstructorDescriptionTagsUpdatedEvent
(RegistryAccess registryAccess, boolean fromClientPacket, boolean isIntegratedServerConnection) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether static data (which in single player is shared between server and client thread) should be updated as a result of this event.Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Field Details
-
registryAccess
-
updateCause
-
integratedServer
private final boolean integratedServer
-
-
Constructor Details
-
TagsUpdatedEvent
public TagsUpdatedEvent(RegistryAccess registryAccess, boolean fromClientPacket, boolean isIntegratedServerConnection)
-
-
Method Details
-
getRegistryAccess
- 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.
-