For new registry values, allow copying from existing (#11796)
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
This commit is contained in:
@@ -23508,10 +23508,10 @@ index 3d3eec1db91cb47395f40c4f47aa77164ad42175..216f97207dac88cc1dc3df59c6ee8a62
|
||||
+ // Paper end - optimise collisions
|
||||
}
|
||||
diff --git a/net/minecraft/core/MappedRegistry.java b/net/minecraft/core/MappedRegistry.java
|
||||
index 47b1fafd91b39e73c4e9134b0b8048000fba108a..76994c1491221c06cca5405ba239e6ff642b19ed 100644
|
||||
index 452c358c2cfa0c39e0b09853cd4a9a12c6ced65d..5f752603aa5611ce9d3dd44cc5b70c27ac46a86e 100644
|
||||
--- a/net/minecraft/core/MappedRegistry.java
|
||||
+++ b/net/minecraft/core/MappedRegistry.java
|
||||
@@ -50,6 +50,19 @@ public class MappedRegistry<T> implements WritableRegistry<T> {
|
||||
@@ -51,6 +51,19 @@ public class MappedRegistry<T> implements WritableRegistry<T> {
|
||||
return this.getTags();
|
||||
}
|
||||
|
||||
@@ -23531,10 +23531,10 @@ index 47b1fafd91b39e73c4e9134b0b8048000fba108a..76994c1491221c06cca5405ba239e6ff
|
||||
public MappedRegistry(ResourceKey<? extends Registry<T>> key, Lifecycle registryLifecycle) {
|
||||
this(key, registryLifecycle, false);
|
||||
}
|
||||
@@ -114,6 +127,7 @@ public class MappedRegistry<T> implements WritableRegistry<T> {
|
||||
this.toId.put(value, size);
|
||||
@@ -116,6 +129,7 @@ public class MappedRegistry<T> implements WritableRegistry<T> {
|
||||
this.registrationInfos.put(key, registrationInfo);
|
||||
this.registryLifecycle = this.registryLifecycle.add(registrationInfo.lifecycle());
|
||||
this.temporaryUnfrozenMap.put(key.location(), value); // Paper - support pre-filling in registry mod API
|
||||
+ this.injectFluidRegister(key, value); // Paper - fluid method optimisations
|
||||
return reference;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user