From 9f793ffa7d9ec64e7e66b1cc39a00a99c042347f Mon Sep 17 00:00:00 2001 From: brachy84 Date: Wed, 8 May 2024 15:35:04 +0200 Subject: [PATCH] fix server crash with creative tabs goh --- .../groovyscript/gameobjects/GameObjectHandlerManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/cleanroommc/groovyscript/gameobjects/GameObjectHandlerManager.java b/src/main/java/com/cleanroommc/groovyscript/gameobjects/GameObjectHandlerManager.java index 4f11a1233..ae0eb74f7 100644 --- a/src/main/java/com/cleanroommc/groovyscript/gameobjects/GameObjectHandlerManager.java +++ b/src/main/java/com/cleanroommc/groovyscript/gameobjects/GameObjectHandlerManager.java @@ -3,6 +3,7 @@ import com.cleanroommc.groovyscript.api.IGameObjectParser; import com.cleanroommc.groovyscript.api.IIngredient; import com.cleanroommc.groovyscript.api.Result; +import com.cleanroommc.groovyscript.core.mixin.CreativeTabsAccessor; import com.cleanroommc.groovyscript.core.mixin.OreDictionaryAccessor; import com.cleanroommc.groovyscript.helper.ingredient.OreDictIngredient; import com.cleanroommc.groovyscript.helper.ingredient.OreDictWildcardIngredient; @@ -107,7 +108,7 @@ public static void init() { .register(); GameObjectHandler.builder("creativeTab", CreativeTabs.class) .parser(GameObjectHandlers::parseCreativeTab) - .completerOfNamed(() -> Arrays.asList(CreativeTabs.CREATIVE_TAB_ARRAY), CreativeTabs::getTabLabel) + .completerOfNamed(() -> Arrays.asList(CreativeTabs.CREATIVE_TAB_ARRAY), v -> ((CreativeTabsAccessor) v).getTabLabel2()) .register(); GameObjectHandler.builder("textformat", TextFormatting.class) .parser(GameObjectHandlers::parseTextFormatting)