From fa4b8dfc929dbb7d0915dd3221d980823d528f9c Mon Sep 17 00:00:00 2001 From: modmuss50 Date: Thu, 14 Mar 2019 19:51:51 +0000 Subject: [PATCH] Fix ItemGroup buttons not working --- build.gradle | 4 ++-- .../fabric/impl/itemgroup/FabricCreativeGuiComponents.java | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index 8f5e9117d..de1f25d61 100644 --- a/build.gradle +++ b/build.gradle @@ -27,7 +27,7 @@ targetCompatibility = 1.8 archivesBaseName = "fabric" def baseVersion = "0.2.3" -def mcVersion = "19w11a" +def mcVersion = "19w11b" def ENV = System.getenv() version = baseVersion + "." + (ENV.BUILD_NUMBER ?: "local") @@ -38,7 +38,7 @@ minecraft { dependencies { minecraft "com.mojang:minecraft:$mcVersion" - mappings "net.fabricmc:yarn:$mcVersion.1" + mappings "net.fabricmc:yarn:$mcVersion.3" modCompile "net.fabricmc:fabric-loader:0.3.7.109" } diff --git a/src/main/java/net/fabricmc/fabric/impl/itemgroup/FabricCreativeGuiComponents.java b/src/main/java/net/fabricmc/fabric/impl/itemgroup/FabricCreativeGuiComponents.java index 10c28af63..f220fc212 100644 --- a/src/main/java/net/fabricmc/fabric/impl/itemgroup/FabricCreativeGuiComponents.java +++ b/src/main/java/net/fabricmc/fabric/impl/itemgroup/FabricCreativeGuiComponents.java @@ -17,9 +17,9 @@ package net.fabricmc.fabric.impl.itemgroup; import com.mojang.blaze3d.platform.GlStateManager; +import net.minecraft.class_4185; import net.minecraft.client.MinecraftClient; import net.minecraft.client.gui.ingame.CreativePlayerInventoryScreen; -import net.minecraft.client.gui.widget.ButtonWidget; import net.minecraft.client.resource.language.I18n; import net.minecraft.item.ItemGroup; import net.minecraft.util.Identifier; @@ -39,7 +39,7 @@ public class FabricCreativeGuiComponents { COMMON_GROUPS.add(ItemGroup.HOTBAR); } - public static class ItemGroupButtonWidget extends ButtonWidget { + public static class ItemGroupButtonWidget extends class_4185 { CreativeGuiExtensions extensions; CreativePlayerInventoryScreen gui; @@ -53,8 +53,7 @@ public class FabricCreativeGuiComponents { } @Override - public void method_19347(double double_1, double double_2) { - super.method_19347(double_1, double_2); + public void method_1826() { type.clickConsumer.accept(extensions); }