9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2026-01-04 15:41:40 +00:00
This commit is contained in:
Dreeam
2023-09-25 02:56:54 -04:00
parent 78531a5405
commit ecb834ec0d
38 changed files with 1642 additions and 2063 deletions

View File

@@ -11,25 +11,25 @@ This is a fully vanilla optimization. Improves: [Blast]Furnace/Campfire/Smoker/S
This was mostly made for the auto crafting table, since the performance boost is much more visible while using that mod
diff --git a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
index 9ffb6999171f602f0b113dac40e0130410cad870..3efac27f360b45e53a11374cf9a051f9eee8ddf3 100644
index 666fc85bc2079cb367b340f2605f29fe002f4d22..72fb1729f366a4ea6e3cb7f81d87472201be81e1 100644
--- a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
+++ b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
@@ -11,8 +11,8 @@ import com.google.gson.JsonParseException;
import com.google.gson.JsonSyntaxException;
import com.mojang.datafixers.util.Pair;
@@ -13,8 +13,8 @@ import com.mojang.datafixers.util.Pair;
import com.mojang.logging.LogUtils;
import com.mojang.serialization.Codec;
import com.mojang.serialization.JsonOps;
+import java.util.ArrayList;
import java.util.Collection;
-import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
@@ -134,7 +134,7 @@ public class RecipeManager extends SimpleJsonResourceReloadListener {
@@ -137,7 +137,7 @@ public class RecipeManager extends SimpleJsonResourceReloadListener {
}
public <C extends Container, T extends Recipe<C>> List<T> getAllRecipesFor(RecipeType<T> type) {
public <C extends Container, T extends Recipe<C>> List<RecipeHolder<T>> getAllRecipesFor(RecipeType<T> type) {
- return List.copyOf(this.byType(type).values());
+ return (List<T>)new ArrayList<>(this.byType(type).values()); // KeYi // Leaf
+ return new ArrayList<>(this.byType(type).values()); // KeYi // Leaf
}
public <C extends Container, T extends Recipe<C>> List<T> getRecipesFor(RecipeType<T> type, C inventory, Level world) {
public <C extends Container, T extends Recipe<C>> List<RecipeHolder<T>> getRecipesFor(RecipeType<T> type, C inventory, Level world) {