aboutsummaryrefslogtreecommitdiff
path: root/GuiTest/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'GuiTest/src/main/java')
-rw-r--r--GuiTest/src/main/java/io/github/cottonmc/test/GuiItem.java3
1 files changed, 1 insertions, 2 deletions
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 d629b68..4fbc6df 100644
--- a/GuiTest/src/main/java/io/github/cottonmc/test/GuiItem.java
+++ b/GuiTest/src/main/java/io/github/cottonmc/test/GuiItem.java
@@ -16,7 +16,6 @@ import io.github.cottonmc.cotton.gui.client.CottonClientScreen;
import io.github.cottonmc.test.client.TestClientGui;
public class GuiItem extends Item {
-
public GuiItem() {
super(new Item.Settings().rarity(Rarity.EPIC));
}
@@ -27,7 +26,7 @@ public class GuiItem extends Item {
openScreen(); // In its own method to prevent class loading issues
}
- return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, (hand==Hand.MAIN_HAND) ? player.getMainHandStack() : player.getOffHandStack());
+ return new TypedActionResult<>(ActionResult.SUCCESS, player.getStackInHand(hand));
}
@Environment(EnvType.CLIENT)