Don't use delayed registries in impl anywhere (#11918)
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
package org.bukkit.registry;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assumptions.*;
|
||||
import static org.mockito.Mockito.*;
|
||||
import com.google.common.base.Joiner;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
@@ -13,7 +10,6 @@ import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Keyed;
|
||||
import org.bukkit.Registry;
|
||||
import org.bukkit.craftbukkit.util.Handleable;
|
||||
@@ -25,6 +21,13 @@ import org.junit.jupiter.api.Order;
|
||||
import org.junit.jupiter.api.TestMethodOrder;
|
||||
import org.junit.jupiter.params.provider.Arguments;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertSame;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
import static org.junit.jupiter.api.Assumptions.assumeFalse;
|
||||
import static org.junit.jupiter.api.Assumptions.assumeTrue;
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
||||
@AllFeatures
|
||||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
|
||||
public class RegistryConversionTest {
|
||||
@@ -260,7 +263,7 @@ public class RegistryConversionTest {
|
||||
Joiner.on('\n').withKeyValueSeparator(" got: ").join(notMatching)));
|
||||
}
|
||||
|
||||
static final Set<RegistryKey<?>> IGNORE_FOR_DIRECT_HOLDER = Set.of(RegistryKey.TRIM_MATERIAL, RegistryKey.TRIM_PATTERN, RegistryKey.INSTRUMENT, RegistryKey.PAINTING_VARIANT, RegistryKey.BANNER_PATTERN, RegistryKey.SOUND_EVENT); // Paper
|
||||
static final Set<RegistryKey<?>> IGNORE_FOR_DIRECT_HOLDER = Set.of(RegistryKey.TRIM_MATERIAL, RegistryKey.TRIM_PATTERN, RegistryKey.INSTRUMENT, RegistryKey.PAINTING_VARIANT, RegistryKey.BANNER_PATTERN, RegistryKey.SOUND_EVENT, RegistryKey.ENCHANTMENT); // Paper
|
||||
|
||||
/**
|
||||
* Minecraft registry can return a default key / value
|
||||
|
||||
Reference in New Issue
Block a user