Skip to content

Commit

Permalink
perf: ⚡remove crafting recipes in [Engineer's Manual]
Browse files Browse the repository at this point in the history
This should save 2-6 seconds of game load.

Usually, it wont take so long for IE to make thosre 3x3 grid recipe pages. But in E2EE there is a lot of recipes. IE script made the way it need to iterate all 16000 crafting table recipes for each manual book recipe.

Those recipes makes sense if modpack doesnt have  HEI. But since most of the recipes are changed and was already not actual, I removed them. Text on pagest still there, just without 3x3 grid.
  • Loading branch information
Krutoy242 committed Jun 19, 2024
1 parent e7e352f commit ed6c46c
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 0 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@@ -122,7 +122,6 @@ public abstract class ManualInstance {
for (ManualEntry entry : this.manualContents.values()) {
int iP = 0;
for (IManualPage p : entry.getPages()) {
- p.recalculateCraftingRecipes();
for (ItemStack s : p.getProvidedRecipes()) {
this.itemLinks.put(this.getItemHash(s), new ManualLink(entry.getName(), iP));
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@@ -57,7 +57,6 @@ extends ManualPages {
this.stacks = stacks;
this.recipePage = new int[stacks.length];
this.yOff = new int[stacks.length];
- this.recalculateCraftingRecipes();
}

@Override
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@@ -58,7 +58,6 @@ extends ManualPages {
public ManualPages.CraftingMulti(ManualInstance manual, String text, Object ... stacks) {
super(manual, text);
this.stacks = stacks;
- this.recalculateCraftingRecipes();
}

@Override
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@@ -170,7 +170,6 @@ implements IManualPage {
public CraftingMulti(ManualInstance manual, String text, Object ... stacks) {
super(manual, text);
this.stacks = stacks;
- this.recalculateCraftingRecipes();
}

@Override
@@ -360,7 +359,6 @@ implements IManualPage {
this.stacks = stacks;
this.recipePage = new int[stacks.length];
this.yOff = new int[stacks.length];
- this.recalculateCraftingRecipes();
}

@Override

0 comments on commit ed6c46c

Please sign in to comment.