Skip to content

Commit 91a004a

Browse files
committed
Fix compile issue for Test RegistryHelper
1 parent 159fa37 commit 91a004a

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎paper-server/src/test/java/org/bukkit/support/RegistryHelper.java‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ public static PackedRegistries createRegistries(ResourceManager resourceManager)
7474
LayeredRegistryAccess<RegistryLayer> layers = RegistryLayer.createRegistryAccess();
7575
List<Registry.PendingTags<?>> pendingTags = TagLoader.loadTagsForExistingRegistries(resourceManager, layers.getLayer(RegistryLayer.STATIC));
7676

77-
List<HolderLookup.RegistryLookup<?>> lookupsWithPendingTags = TagLoader.buildUpdatedLookups(layers.getAccessForLoading(RegistryLayer.WORLDGEN), pendingTags);
78-
RegistryAccess.Frozen worldGenRegistries = RegistryDataLoader.load(resourceManager, lookupsWithPendingTags, RegistryDataLoader.WORLDGEN_REGISTRIES, Util.backgroundExecutor()).join();
79-
layers = layers.replaceFrom(RegistryLayer.WORLDGEN, worldGenRegistries);
77+
List<HolderLookup.RegistryLookup<?>> lookupsWithPendingTags = TagLoader.buildUpdatedLookups(layers.getAccessForLoading(RegistryLayer.WORLD), pendingTags);
78+
RegistryAccess.Frozen worldGenRegistries = RegistryDataLoader.load(resourceManager, lookupsWithPendingTags, RegistryDataLoader.WORLD_REGISTRIES, Util.backgroundExecutor()).join();
79+
layers = layers.replaceFrom(RegistryLayer.WORLD, worldGenRegistries);
8080

8181
List<HolderLookup.RegistryLookup<?>> staticAndWorldgenLookups = Stream.concat(lookupsWithPendingTags.stream(), worldGenRegistries.listRegistries()).toList();
8282
RegistryAccess.Frozen dimensionRegistries = RegistryDataLoader.load(resourceManager, staticAndWorldgenLookups, RegistryDataLoader.DIMENSION_REGISTRIES, Util.backgroundExecutor()).join();
@@ -110,6 +110,7 @@ public static void setup(FeatureFlagSet enabledFeatures) {
110110
);
111111
}
112112

113+
@SuppressWarnings("unchecked")
113114
public static <T extends Keyed> Class<T> getFieldType(Class<T> apiClass, NamespacedKey key) {
114115
Class<T> fieldType = apiClass;
115116
// Some registries have extra Typed classes such as BlockType and ItemType.

0 commit comments

Comments
 (0)