1.21.5
Co-authored-by: Bjarne Koll <git@lynxplay.dev> Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> Co-authored-by: MiniDigger | Martin <admin@minidigger.dev> Co-authored-by: Nassim Jahnke <nassim@njahnke.dev> Co-authored-by: Noah van der Aa <ndvdaa@gmail.com> Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> Co-authored-by: Shane Freeder <theboyetronic@gmail.com> Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com> Co-authored-by: Tamion <70228790+notTamion@users.noreply.github.com> Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/resources/RegistryDataLoader.java
|
||||
+++ b/net/minecraft/resources/RegistryDataLoader.java
|
||||
@@ -247,13 +_,14 @@
|
||||
@@ -271,13 +_,14 @@
|
||||
RegistryOps<JsonElement> ops,
|
||||
ResourceKey<E> resourceKey,
|
||||
Resource resource,
|
||||
@@ -17,7 +17,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -267,6 +_,7 @@
|
||||
@@ -291,6 +_,7 @@
|
||||
FileToIdConverter fileToIdConverter = FileToIdConverter.registry(registry.key());
|
||||
RegistryOps<JsonElement> registryOps = RegistryOps.create(JsonOps.INSTANCE, registryInfoLookup);
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
for (Entry<ResourceLocation, Resource> entry : fileToIdConverter.listMatchingResources(resourceManager).entrySet()) {
|
||||
ResourceLocation resourceLocation = entry.getKey();
|
||||
ResourceKey<E> resourceKey = ResourceKey.create(registry.key(), fileToIdConverter.fileToId(resourceLocation));
|
||||
@@ -274,7 +_,7 @@
|
||||
@@ -298,7 +_,7 @@
|
||||
RegistrationInfo registrationInfo = REGISTRATION_INFO_CACHE.apply(resource.knownPackInfo());
|
||||
|
||||
try {
|
||||
@@ -34,7 +34,7 @@
|
||||
} catch (Exception var14) {
|
||||
loadingErrors.put(
|
||||
resourceKey,
|
||||
@@ -283,7 +_,9 @@
|
||||
@@ -307,7 +_,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
}
|
||||
|
||||
static <E> void loadContentsFromNetwork(
|
||||
@@ -300,6 +_,7 @@
|
||||
@@ -324,6 +_,7 @@
|
||||
RegistryOps<JsonElement> registryOps1 = RegistryOps.create(JsonOps.INSTANCE, registryInfoLookup);
|
||||
FileToIdConverter fileToIdConverter = FileToIdConverter.registry(registry.key());
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
for (RegistrySynchronization.PackedRegistryEntry packedRegistryEntry : networkedRegistryData.elements) {
|
||||
ResourceKey<E> resourceKey = ResourceKey.create(registry.key(), packedRegistryEntry.id());
|
||||
Optional<Tag> optional = packedRegistryEntry.data();
|
||||
@@ -318,7 +_,7 @@
|
||||
@@ -342,7 +_,7 @@
|
||||
|
||||
try {
|
||||
Resource resourceOrThrow = resourceProvider.getResourceOrThrow(resourceLocation);
|
||||
@@ -62,7 +62,7 @@
|
||||
} catch (Exception var17) {
|
||||
loadingErrors.put(resourceKey, new IllegalStateException("Failed to parse local data", var17));
|
||||
}
|
||||
@@ -360,6 +_,7 @@
|
||||
@@ -384,6 +_,7 @@
|
||||
|
||||
RegistryDataLoader.Loader<T> create(Lifecycle registryLifecycle, Map<ResourceKey<?>, Exception> loadingErrors) {
|
||||
WritableRegistry<T> writableRegistry = new MappedRegistry<>(this.key, registryLifecycle);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/resources/ResourceLocation.java
|
||||
+++ b/net/minecraft/resources/ResourceLocation.java
|
||||
@@ -32,6 +_,7 @@
|
||||
@@ -23,6 +_,7 @@
|
||||
public static final char NAMESPACE_SEPARATOR = ':';
|
||||
public static final String DEFAULT_NAMESPACE = "minecraft";
|
||||
public static final String REALMS_NAMESPACE = "realms";
|
||||
@@ -8,7 +8,7 @@
|
||||
private final String namespace;
|
||||
private final String path;
|
||||
|
||||
@@ -40,6 +_,13 @@
|
||||
@@ -31,6 +_,13 @@
|
||||
|
||||
assert isValidPath(path);
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
this.namespace = namespace;
|
||||
this.path = path;
|
||||
}
|
||||
@@ -252,7 +_,7 @@
|
||||
@@ -243,7 +_,7 @@
|
||||
|
||||
private static String assertValidNamespace(String namespace, String path) {
|
||||
if (!isValidNamespace(namespace)) {
|
||||
@@ -31,7 +31,7 @@
|
||||
} else {
|
||||
return namespace;
|
||||
}
|
||||
@@ -277,7 +_,7 @@
|
||||
@@ -268,7 +_,7 @@
|
||||
|
||||
private static String assertValidPath(String namespace, String path) {
|
||||
if (!isValidPath(path)) {
|
||||
|
||||
Reference in New Issue
Block a user