mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-17 11:05:40 +00:00
Add new DeferredRegistry helper, and change RegistryObject to update when overrides are registered.
This commit is contained in:
1 parent
9183c2fa0d
commit
281ef5a152
8 files changed
+214
-67
No files matched your search
@@ -19,7 +19,6 @@
|
||||
|
||||
package net.minecraftforge.registries;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -85,7 +84,7 @@ public class RegistryManager
|
||||
{
|
||||
return this.registries.inverse().get(reg);
|
||||
}
|
||||
|
||||
|
||||
public <V extends IForgeRegistryEntry<V>> ResourceLocation updateLegacyName(ResourceLocation legacyName)
|
||||
{
|
||||
while (getRegistry(legacyName) == null)
|
||||
@@ -142,7 +141,7 @@ public class RegistryManager
|
||||
addLegacyName(legacyName, name);
|
||||
return getRegistry(name);
|
||||
}
|
||||
|
||||
|
||||
private void addLegacyName(ResourceLocation legacyName, ResourceLocation name)
|
||||
{
|
||||
if (this.legacyNames.containsKey(legacyName))
|
||||
|
||||
Reference in new issue
Block a user