Skip to content

Commit

Permalink
Optimization for Autocrafters without items in them
Browse files Browse the repository at this point in the history
Optimization from Crec0
  • Loading branch information
QPCrummer committed Apr 4, 2022
1 parent 1e83431 commit 6bea0a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ loader_version=0.13.3
mod_version=1.0.4
maven_group=com.gitlab.essentialmods
archives_base_name=fabricautocrafter
fabric_version=0.47.8+1.18.2
fabric_version=0.48.0+1.18.2
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ public void clear() {
}

private Optional<CraftingRecipe> getCurrentRecipe() {
if (this.world == null) return Optional.empty();
//Optimiation Code from Crec0
if (this.world == null || this.isEmpty()) return Optional.empty();
return this.world.getRecipeManager().getFirstMatch(RecipeType.CRAFTING, craftingInventory, world);
}

Expand Down Expand Up @@ -203,5 +204,4 @@ public CraftingInventory unsetHandler() {
public void onContainerClose(AutoCraftingTableContainer container) {
this.openContainers.remove(container);
}

}

0 comments on commit 6bea0a4

Please sign in to comment.