Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* @param <T> registry value type
*/
@ApiStatus.NonExtendable
public non-sealed interface RegistryKeySet<T extends Keyed> extends Iterable<TypedKey<T>>, RegistrySet<T> { // TODO remove Keyed
public non-sealed interface RegistryKeySet<T extends Keyed> extends Iterable<TypedKey<T>>, RegistrySet<T> { // TODO: Remove Keyed once the registry-based API is finalized

@Override
default int size() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
@ApiStatus.Experimental
@NullMarked
public interface Tag<T extends Keyed> extends RegistryKeySet<T> { // TODO remove Keyed
public interface Tag<T extends Keyed> extends RegistryKeySet<T> { // TODO: Remove Keyed once the registry-based API is finalized

/**
* Get the identifier for this named set.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import net.minecraft.resources.ResourceKey;
import org.bukkit.Keyed;

public interface RegistryEntry<M, A extends Keyed> { // TODO remove Keyed
public interface RegistryEntry<M, A extends Keyed> { // TODO: Remove Keyed once the registry-based API is finalized

RegistryHolder<A> createRegistryHolder(Registry<M> nmsRegistry);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

public final class PaperRegistrySets {

public static <A extends Keyed, M> HolderSet<M> convertToNms(final ResourceKey<? extends Registry<M>> resourceKey, final RegistryOps.RegistryInfoLookup lookup, final RegistryKeySet<A> registryKeySet) { // TODO remove Keyed
public static <A extends Keyed, M> HolderSet<M> convertToNms(final ResourceKey<? extends Registry<M>> resourceKey, final RegistryOps.RegistryInfoLookup lookup, final RegistryKeySet<A> registryKeySet) { // TODO: Remove Keyed once the registry-based API is finalized
if (registryKeySet instanceof NamedRegistryKeySetImpl<A, ?>) {
return ((NamedRegistryKeySetImpl<A, M>) registryKeySet).namedSet();
} else {
Expand All @@ -27,7 +27,7 @@ public static <A extends Keyed, M> HolderSet<M> convertToNms(final ResourceKey<?
}
}

public static <A extends Keyed, M> HolderSet<M> convertToNmsWithDirects(final ResourceKey<? extends Registry<M>> resourceKey, final RegistryOps.RegistryInfoLookup lookup, final RegistrySet<A> registrySet) { // TODO remove Keyed
public static <A extends Keyed, M> HolderSet<M> convertToNmsWithDirects(final ResourceKey<? extends Registry<M>> resourceKey, final RegistryOps.RegistryInfoLookup lookup, final RegistrySet<A> registrySet) { // TODO: Remove Keyed once the registry-based API is finalized
if (registrySet instanceof NamedRegistryKeySetImpl<A, ?>) {
return ((NamedRegistryKeySetImpl<A, M>) registrySet).namedSet();
} else if (registrySet.isEmpty()) {
Expand All @@ -51,7 +51,7 @@ public static <A extends Keyed, M> HolderSet<M> convertToNmsWithDirects(final Re
}
}

public static <A extends Keyed, M> RegistryKeySet<A> convertToApi(final RegistryKey<A> registryKey, final HolderSet<M> holders) { // TODO remove Keyed
public static <A extends Keyed, M> RegistryKeySet<A> convertToApi(final RegistryKey<A> registryKey, final HolderSet<M> holders) { // TODO: Remove Keyed once the registry-based API is finalized
if (holders instanceof final HolderSet.Named<M> named) {
return new NamedRegistryKeySetImpl<>(PaperRegistries.fromNms(named.key()), named);
} else {
Expand All @@ -66,7 +66,7 @@ public static <A extends Keyed, M> RegistryKeySet<A> convertToApi(final Registry
}
}

public static <A extends Keyed, M> RegistrySet<A> convertToApiWithDirects(final RegistryKey<A> registryKey, final HolderSet<M> holders) { // TODO remove Keyed
public static <A extends Keyed, M> RegistrySet<A> convertToApiWithDirects(final RegistryKey<A> registryKey, final HolderSet<M> holders) { // TODO: Remove Keyed once the registry-based API is finalized
if (holders instanceof final HolderSet.Named<M> named) {
return new NamedRegistryKeySetImpl<>(PaperRegistries.fromNms(named.key()), named);
} else {
Expand Down