Skip to content

Commit

Permalink
Deprecate reload() and add warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
mezz committed Jan 1, 2017
1 parent e2a1eb8 commit bc15fb3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/mezz/jei/ProxyCommonClient.java
Expand Up @@ -124,6 +124,7 @@ public void onEntityJoinedWorld(EntityJoinWorldEvent event) {

@Override
public void restartJEI() {
Log.warning("Restarting JEI. Warning: This feature will be removed soon, please see the JavaDocs for more information.", new RuntimeException());
restartJEI(false);
}

Expand All @@ -132,7 +133,6 @@ private void restartJEI(final boolean resourceReload) {
if (minecraft.isCallingFromMinecraftThread()) {
// check that JEI has been started before. if not, do nothing
if (this.starter.hasStarted()) {
Log.info("Restarting JEI.", new RuntimeException());
this.starter.start(this.plugins, false, resourceReload);
}
} else {
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/mezz/jei/api/IJeiHelpers.java
Expand Up @@ -63,6 +63,10 @@ public interface IJeiHelpers {
/**
* Reload JEI at runtime.
* Used by mods that add and remove items or recipes like MineTweaker's /mt reload.
*
* @deprecated since JEI 3.14.1. This will be deactivated soon because it takes too long and causes server disconnects.
* If you need to change recipes, use {@link IRecipeRegistry#addRecipe(Object)} and {@link IRecipeRegistry#removeRecipe(Object)}
*/
@Deprecated
void reload();
}

0 comments on commit bc15fb3

Please sign in to comment.