mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-21 07:59:19 +00:00
fix cooking reload on 1.20-1.20.4
This commit is contained in:
@@ -85,8 +85,6 @@ public class BukkitInjector {
|
|||||||
|
|
||||||
public static void init() {
|
public static void init() {
|
||||||
try {
|
try {
|
||||||
MethodHandles.Lookup lookup = MethodHandles.lookup();
|
|
||||||
|
|
||||||
clazz$InjectedCacheChecker = byteBuddy
|
clazz$InjectedCacheChecker = byteBuddy
|
||||||
.subclass(Object.class, ConstructorStrategy.Default.IMITATE_SUPER_CLASS_OPENING)
|
.subclass(Object.class, ConstructorStrategy.Default.IMITATE_SUPER_CLASS_OPENING)
|
||||||
.implement(Reflections.clazz$RecipeManager$CachedCheck)
|
.implement(Reflections.clazz$RecipeManager$CachedCheck)
|
||||||
@@ -349,7 +347,7 @@ public class BukkitInjector {
|
|||||||
boolean isCustom = recipeManager.isCustomRecipe(recipeId);
|
boolean isCustom = recipeManager.isCustomRecipe(recipeId);
|
||||||
if (!isCustom) {
|
if (!isCustom) {
|
||||||
field$InjectedCacheChecker$lastRecipe.set(thisObj, resourceLocation);
|
field$InjectedCacheChecker$lastRecipe.set(thisObj, resourceLocation);
|
||||||
return optionalRecipe;
|
return Optional.of(pair.getSecond());
|
||||||
}
|
}
|
||||||
|
|
||||||
Item<ItemStack> wrappedItem = BukkitItemManager.instance().wrap(itemStack);
|
Item<ItemStack> wrappedItem = BukkitItemManager.instance().wrap(itemStack);
|
||||||
|
|||||||
Reference in New Issue
Block a user