Update KubeJS mixin for 1.19.2

This commit is contained in:
embeddedt 2023-04-25 19:37:48 -04:00
parent 61050ec861
commit c0d27ee01d
No known key found for this signature in database
GPG Key ID: A69433EC199B5613

View File

@ -1,6 +1,6 @@
package org.embeddedt.modernfix.mixin.perf.kubejs;
import dev.latvian.mods.kubejs.recipe.RecipeEventJS;
import dev.latvian.mods.kubejs.recipe.RecipesEventJS;
import org.embeddedt.modernfix.ModernFix;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
@ -12,7 +12,7 @@ import java.lang.reflect.Modifier;
import java.util.Collection;
import java.util.Map;
@Mixin(RecipeEventJS.class)
@Mixin(RecipesEventJS.class)
public class RecipeEventJSMixin {
/**
@ -22,7 +22,7 @@ public class RecipeEventJSMixin {
private void clearRecipeLists(CallbackInfo ci) {
ModernFix.LOGGER.info("Clearing KubeJS recipe lists...");
// Even though we are a mixin class, use reflection so this works across a variety of versions
Field[] fields = RecipeEventJS.class.getDeclaredFields();
Field[] fields = RecipesEventJS.class.getDeclaredFields();
for(Field f : fields) {
try {
if(!Modifier.isStatic(f.getModifiers())