diff --git a/build.gradle b/build.gradle index f6abc2088..b78a8c936 100644 --- a/build.gradle +++ b/build.gradle @@ -26,8 +26,8 @@ targetCompatibility = 1.8 archivesBaseName = "fabric" -def baseVersion = "0.2.4" -def mcVersion = "19w12a" +def baseVersion = "0.2.5" +def mcVersion = "19w12b" 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.2" + mappings "net.fabricmc:yarn:$mcVersion.1" 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 d6bace3cb..6a19c0370 100644 --- a/src/main/java/net/fabricmc/fabric/impl/itemgroup/FabricCreativeGuiComponents.java +++ b/src/main/java/net/fabricmc/fabric/impl/itemgroup/FabricCreativeGuiComponents.java @@ -46,17 +46,12 @@ public class FabricCreativeGuiComponents { Type type; public ItemGroupButtonWidget(int x, int y, Type type, CreativeGuiExtensions extensions) { - super(x, y, 10, 11, type.text); + super(x, y, 10, 11, type.text, (bw) -> type.clickConsumer.accept(extensions)); this.extensions = extensions; this.type = type; this.gui = (CreativePlayerInventoryScreen) extensions; } - @Override - public void onPressed() { - type.clickConsumer.accept(extensions); - } - @Override public void render(int mouseX, int mouseY, float float_1) { this.visible = extensions.fabric_isButtonVisible(type); diff --git a/src/test/java/net/fabricmc/fabric/containers/ContainerMod.java b/src/test/java/net/fabricmc/fabric/containers/ContainerMod.java index 807687006..7d37d39dc 100644 --- a/src/test/java/net/fabricmc/fabric/containers/ContainerMod.java +++ b/src/test/java/net/fabricmc/fabric/containers/ContainerMod.java @@ -40,7 +40,7 @@ public class ContainerMod implements ModInitializer { serverCommandSourceCommandDispatcher.register(ServerCommandManager .literal("container") .executes(context -> { - BlockPos pos = context.getSource().getEntity().getPos(); + BlockPos pos = new BlockPos(context.getSource().getEntity()); //Opens a container, sending the block pos ContainerProviderRegistry.INSTANCE.openContainer(EXAMPLE_INVENTORY_CONTAINER, context.getSource().getPlayer(), buf -> buf.writeBlockPos(pos));