Fix ModelRegistryEvent firing every time resources reload instead of just once.
This commit is contained in:
parent
a8e68328c4
commit
a3c4ffd2c1
1 changed files with 6 additions and 2 deletions
|
@ -81,10 +81,14 @@ public class ModelLoaderRegistry
|
|||
* INTERNAL METHOD, DO NOT CALL
|
||||
*/
|
||||
public static void onModelLoadingStart()
|
||||
{
|
||||
// Minecraft recreates the ModelBakery on resource reload, but this should only run once during init.
|
||||
if (!registryFrozen)
|
||||
{
|
||||
net.minecraftforge.fml.ModLoader.get().postEvent(new net.minecraftforge.client.event.ModelRegistryEvent());
|
||||
registryFrozen = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes system aware of your loader.
|
||||
|
|
Loading…
Reference in a new issue