diff options
author | Falkreon <falkreon@gmail.com> | 2019-10-24 08:49:49 -0500 |
---|---|---|
committer | Falkreon <falkreon@gmail.com> | 2019-10-24 08:49:49 -0500 |
commit | 6b40020b11fb6568c69699885f2836b552c40dc1 (patch) | |
tree | 7a0507f20fc988070b956812cfa5cc92ab3fc9c3 /GuiTest | |
parent | dcf3d2f0cbe9d680f94fac26bda1f0c2936e7a57 (diff) | |
download | LibGui-6b40020b11fb6568c69699885f2836b552c40dc1.tar.gz LibGui-6b40020b11fb6568c69699885f2836b552c40dc1.tar.bz2 LibGui-6b40020b11fb6568c69699885f2836b552c40dc1.zip |
Update to 19w42a
Diffstat (limited to 'GuiTest')
-rw-r--r-- | GuiTest/gradle.properties | 11 | ||||
-rw-r--r-- | GuiTest/src/main/java/io/github/cottonmc/test/GuiBlock.java | 6 | ||||
-rw-r--r-- | GuiTest/src/main/java/io/github/cottonmc/test/GuiItem.java | 2 |
3 files changed, 9 insertions, 10 deletions
diff --git a/GuiTest/gradle.properties b/GuiTest/gradle.properties index 921cf11..fef99be 100644 --- a/GuiTest/gradle.properties +++ b/GuiTest/gradle.properties @@ -3,16 +3,15 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/use - minecraft_version=19w37a - yarn_mappings=19w37a+build.9 - loader_version=0.6.1+build.165 + minecraft_version=19w42a + yarn_mappings=19w42a+build.1 + loader_version=0.6.3+build.167 # Mod Properties - mod_version = 1.3.1 + mod_version = 1.3.3-beta.7 maven_group = io.github.cottonmc archives_base_name = LibGui # Dependencies - # currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric - fabric_version=0.3.2+build.230-1.15 + fabric_version=0.4.8+build.255-1.15 jankson_version=2.0.0+j1.2.0 diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/GuiBlock.java b/GuiTest/src/main/java/io/github/cottonmc/test/GuiBlock.java index ec37c55..ded6fcb 100644 --- a/GuiTest/src/main/java/io/github/cottonmc/test/GuiBlock.java +++ b/GuiTest/src/main/java/io/github/cottonmc/test/GuiBlock.java @@ -8,6 +8,7 @@ import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.block.entity.BlockEntity; import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; import net.minecraft.util.Identifier; import net.minecraft.util.hit.BlockHitResult; @@ -21,13 +22,12 @@ public class GuiBlock extends Block implements BlockEntityProvider { super(FabricBlockSettings.copy(Blocks.IRON_BLOCK).build()); } - @Override - public boolean activate(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hitResult) { + public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hitResult) { if (!world.isClient) { ContainerProviderRegistry.INSTANCE.openContainer(new Identifier(LibGuiTest.MODID, "gui"), player, (buf)->buf.writeBlockPos(pos)); } - return true; + return ActionResult.SUCCESS; } diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/GuiItem.java b/GuiTest/src/main/java/io/github/cottonmc/test/GuiItem.java index 37b98f6..b777361 100644 --- a/GuiTest/src/main/java/io/github/cottonmc/test/GuiItem.java +++ b/GuiTest/src/main/java/io/github/cottonmc/test/GuiItem.java @@ -25,6 +25,6 @@ public class GuiItem extends Item { MinecraftClient.getInstance().openScreen(new CottonClientScreen(new TestClientGui())); } - return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, (hand==Hand.MAIN_HAND) ? player.getMainHandStack() : player.getOffHandStack(), false); + return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, (hand==Hand.MAIN_HAND) ? player.getMainHandStack() : player.getOffHandStack()); } } |