Unlock wrapped registries when firing register events. (#10035)

Co-authored-by: LexManos <LexManos@gmail.com>
This commit is contained in:
Edouard127andLexManos authored and GitHub committed 2024-07-02 11:09:00 -07:00
1 parent 7eee9dcbcd
commit 0d3921efb5
1 file changed
+6
@@ -685,10 +685,16 @@ public class ForgeRegistry<V> implements IForgeRegistryInternal<V>, IForgeRegist
*/
public void freeze() {
this.isFrozen = true;
var wrapper = this.getWrapper();
if (wrapper != null)
wrapper.locked = true;
}
public void unfreeze() {
this.isFrozen = false;
var wrapper = this.getWrapper();
if (wrapper != null)
wrapper.locked = false;
}
void dump(ResourceLocation name) {