Repopulate client SearchTreeManager when registries are refreshed. Closes #4094

This commit is contained in:
LexManos 2017-06-27 16:28:08 -07:00
parent b90d7a838e
commit 7281708df6
5 changed files with 16 additions and 0 deletions

View file

@ -520,6 +520,7 @@ public class ForgeModContainer extends DummyModContainer implements WorldAccessC
OreDictionary.rebakeMap();
StatList.reinit();
Ingredient.invalidateAll();
FMLCommonHandler.instance().reloadSearchTrees();
}

View file

@ -1108,4 +1108,10 @@ public class FMLClientHandler implements IFMLSidedHandler
{
RecipeBookClient.rebuildTable();
}
@Override
public void reloadSearchTrees()
{
this.client.populateSearchTreeManager();
}
}

View file

@ -774,4 +774,8 @@ public class FMLCommonHandler
public void resetClientRecipeBook() {
this.sidedDelegate.resetClientRecipeBook();
}
public void reloadSearchTrees() {
this.sidedDelegate.reloadSearchTrees();
}
}

View file

@ -86,4 +86,6 @@ public interface IFMLSidedHandler
boolean isDisplayVSyncForced();
default void resetClientRecipeBook(){}
default void reloadSearchTrees(){}
}

View file

@ -320,5 +320,8 @@ public net.minecraft.util.ResourceLocation func_177516_a(Ljava/lang/String;)[Lja
# Ingredient
protected net.minecraft.item.crafting.Ingredient <init>([Lnet/minecraft/item/ItemStack;)V # Ingredient
# Crafting
public net.minecraft.client.Minecraft func_193986_ar()V # populateSearchTreeManager
# Advancements
public net.minecraft.advancements.AdvancementManager field_192783_b # GSON