Unlock wrapped registries when firing register events.

This commit is contained in:
LexManos committed 2024-06-03 12:31:59 -07:00
1 parent a3fce36942
commit f22894cf70
1 file changed
+6
@@ -683,10 +683,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) {