Class DefaultDataComponentsBoundEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.DefaultDataComponentsBoundEvent
public class DefaultDataComponentsBoundEvent
extends net.neoforged.bus.api.Event
This event is emitted after data components have been bound to holders in a registry.
This can occur on the server when datapacks are reloaded or when the client receives this data upon joining a world.
This event signals when Holder.areComponentsBound() becomes true.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresents the cause for binding the default data components. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate final DefaultDataComponentsBoundEvent.UpdateCause -
Constructor Summary
ConstructorsConstructorDescriptionDefaultDataComponentsBoundEvent(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
-
updateCause
-
integratedServer
private final boolean integratedServer
-
-
Constructor Details
-
DefaultDataComponentsBoundEvent
@Internal public DefaultDataComponentsBoundEvent(boolean fromClientPacket, boolean isIntegratedServerConnection)
-
-
Method Details
-
getUpdateCause
- Returns:
- the cause for binding the default data components
-
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.
-