include actual class load diff (was dropped)

This commit is contained in:
Jake Potrebic 2024-12-23 15:08:42 -08:00
parent 011b91b1da
commit cb8d2c4b46
No known key found for this signature in database
GPG key ID: 27CC63F7CBC866C7

View file

@ -26,7 +26,7 @@
ResourceLocation resourceLocation = key.location(); ResourceLocation resourceLocation = key.location();
LOADERS.put(resourceLocation, () -> bootstrap.run(registry)); LOADERS.put(resourceLocation, () -> bootstrap.run(registry));
WRITABLE_REGISTRY.register((ResourceKey)key, registry, RegistrationInfo.BUILT_IN); WRITABLE_REGISTRY.register((ResourceKey)key, registry, RegistrationInfo.BUILT_IN);
@@ -328,7 +_,14 @@ @@ -328,16 +_,31 @@
} }
public static void bootStrap() { public static void bootStrap() {
@ -41,7 +41,16 @@
freeze(); freeze();
validate(REGISTRY); validate(REGISTRY);
} }
@@ -338,6 +_,7 @@
private static void createContents() {
+ // Paper start - class-load org.bukkit.Registry
+ try {
+ Class.forName(org.bukkit.Registry.class.getName());
+ } catch (final ClassNotFoundException ex) {
+ throw new RuntimeException(ex);
+ }
+ // Paper end - class-load org.bukkit.Registry
LOADERS.forEach((resourceLocation, supplier) -> {
if (supplier.get() == null) { if (supplier.get() == null) {
LOGGER.error("Unable to bootstrap registry '{}'", resourceLocation); LOGGER.error("Unable to bootstrap registry '{}'", resourceLocation);
} }