From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: ishland Date: Sun, 23 Aug 2020 10:57:44 +0200 Subject: [PATCH] Fix MC-197271 This patch only fixes an issue for servers running OpenJ9. diff --git a/src/main/java/net/minecraft/server/RegistryGeneration.java b/src/main/java/net/minecraft/server/RegistryGeneration.java index 30db8342893e0af3028fbd8766642407cc109a5d..691f256427825a8e6b3eeaf317da2405954bff1d 100644 --- a/src/main/java/net/minecraft/server/RegistryGeneration.java +++ b/src/main/java/net/minecraft/server/RegistryGeneration.java @@ -28,11 +28,11 @@ public class RegistryGeneration { public static final IRegistry g = a(IRegistry.aw, () -> { return ProcessorLists.b; }); - public static final IRegistry h = a(IRegistry.ax, WorldGenFeaturePieces::a); + public static final IRegistry h = a(IRegistry.ax, () -> WorldGenFeaturePieces.a()); // Paper - MC-197271 public static final IRegistry WORLDGEN_BIOME = a(IRegistry.ay, () -> { return BiomeRegistry.a; }); - public static final IRegistry j = a(IRegistry.ar, GeneratorSettingBase::i); + public static final IRegistry j = a(IRegistry.ar, () -> GeneratorSettingBase.i()); // Paper - MC-197271 private static IRegistry a(ResourceKey> resourcekey, Supplier supplier) { return a(resourcekey, Lifecycle.stable(), supplier); @@ -46,9 +46,9 @@ public class RegistryGeneration { MinecraftKey minecraftkey = resourcekey.a(); RegistryGeneration.k.put(minecraftkey, supplier); - IRegistryWritable iregistrywritable = RegistryGeneration.l; + IRegistryWritable iregistrywritable = (IRegistryWritable) RegistryGeneration.l; // Paper - decompile fix - return (IRegistryWritable) iregistrywritable.a(resourcekey, (Object) r0, lifecycle); + return (R) iregistrywritable.a((ResourceKey) resourcekey, r0, lifecycle); // Paper - decompile fix } public static T a(IRegistry iregistry, String s, T t0) { @@ -56,11 +56,11 @@ public class RegistryGeneration { } public static T a(IRegistry iregistry, MinecraftKey minecraftkey, T t0) { - return ((IRegistryWritable) iregistry).a(ResourceKey.a(iregistry.f(), minecraftkey), t0, Lifecycle.stable()); + return (T) ((IRegistryWritable) iregistry).a(ResourceKey.a(iregistry.f(), minecraftkey), t0, Lifecycle.stable()); // Paper - decompile fix } public static T a(IRegistry iregistry, int i, ResourceKey resourcekey, T t0) { - return ((IRegistryWritable) iregistry).a(i, resourcekey, t0, Lifecycle.stable()); + return (T) ((IRegistryWritable) iregistry).a(i, resourcekey, t0, Lifecycle.stable()); // Paper - decompile fix } public static void a() {}