--- a/net/minecraft/core/IRegistryCustom.java +++ b/net/minecraft/core/IRegistryCustom.java @@ -80,7 +80,7 @@ public Optional> registry(ResourceKey> resourcekey) { Optional> optional = this.ownedRegistry(resourcekey); - return optional.isPresent() ? optional : IRegistry.REGISTRY.getOptional(resourcekey.location()); + return optional.isPresent() ? optional : (Optional>) IRegistry.REGISTRY.getOptional(resourcekey.location()); // CraftBukkit - decompile error } public IRegistry registryOrThrow(ResourceKey> resourcekey) { @@ -138,7 +138,7 @@ } private static > void copyBuiltin(IRegistryCustom.Dimension iregistrycustom_dimension, ResourceKey resourcekey) { - IRegistry iregistry = RegistryGeneration.REGISTRY; + IRegistry iregistry = (IRegistry) RegistryGeneration.REGISTRY; // CraftBukkit - decompile error IRegistry iregistry1 = (IRegistry) iregistry.getOrThrow(resourcekey); copy(iregistrycustom_dimension, iregistry1); @@ -178,8 +178,10 @@ }); } - public static final class RegistryData extends Record { + // CraftBukkit start + public static final record RegistryData(ResourceKey> key, Codec codec, @Nullable Codec networkCodec) { + /* private final ResourceKey> key; private final Codec codec; @Nullable @@ -190,11 +192,15 @@ this.codec = codec; this.networkCodec = codec1; } + */ + // CraftBukkit end public boolean sendToClient() { return this.networkCodec != null; } + // CraftBukkit start + /* public final String toString() { return this.toString < invokedynamic > (this); } @@ -219,6 +225,8 @@ public Codec networkCodec() { return this.networkCodec; } + */ + // CraftBukkit end } public static final class Dimension extends IRegistryCustom { @@ -267,7 +275,7 @@ } private static RegistryMaterials parseRegistry(ResourceKey> resourcekey, Dynamic dynamic) { - DataResult dataresult = RegistryLookupCodec.create(resourcekey).codec().parse(dynamic); + DataResult dataresult = RegistryLookupCodec.create((ResourceKey) resourcekey).codec().parse(dynamic); // CraftBukkit - decompile error String s = resourcekey + " registry: "; Logger logger = IRegistryCustom.LOGGER; @@ -282,7 +290,7 @@ } private static RegistryMaterials createRegistry(ResourceKey> resourcekey) { - return new RegistryMaterials<>(resourcekey, Lifecycle.stable()); + return new RegistryMaterials(resourcekey, Lifecycle.stable()); // CraftBukkit - decompile error } @Override