getOrCreate

@ApiStatus.Internal
@NotNull
open fun getOrCreate(@NotNull entity: @NotNull BaseEntity): @NotNull EntityTrackerRegistry

Gets or creates a registry for a base entity.

Return

the registry

Since

1.15.2

Parameters

entity

the base entity


@ApiStatus.Internal
@NotNull
open fun getOrCreate(@NotNull key: @NotNull String, @NotNull supplier: @NotNull (EntityTrackerRegistry) -> EntityTracker): @NotNull EntityTracker

Gets or creates a tracker in this registry.

Return

the tracker

Since

1.15.2

Parameters

key

the key (model ID)

supplier

the supplier to create the tracker