aboutsummaryrefslogtreecommitdiff
path: root/GuiTest/src/main/java
diff options
context:
space:
mode:
authorFalkreon <falkreon@gmail.com>2019-10-24 08:49:49 -0500
committerFalkreon <falkreon@gmail.com>2019-10-24 08:49:49 -0500
commit6b40020b11fb6568c69699885f2836b552c40dc1 (patch)
tree7a0507f20fc988070b956812cfa5cc92ab3fc9c3 /GuiTest/src/main/java
parentdcf3d2f0cbe9d680f94fac26bda1f0c2936e7a57 (diff)
downloadLibGui-6b40020b11fb6568c69699885f2836b552c40dc1.tar.gz
LibGui-6b40020b11fb6568c69699885f2836b552c40dc1.tar.bz2
LibGui-6b40020b11fb6568c69699885f2836b552c40dc1.zip
Update to 19w42a
Diffstat (limited to 'GuiTest/src/main/java')
-rw-r--r--GuiTest/src/main/java/io/github/cottonmc/test/GuiBlock.java6
-rw-r--r--GuiTest/src/main/java/io/github/cottonmc/test/GuiItem.java2
2 files changed, 4 insertions, 4 deletions
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());
}
}