Hackily fix server crash
This commit is contained in:
parent
fb2ebc568a
commit
e21a3495f9
1 changed files with 7 additions and 1 deletions
|
@ -20,7 +20,7 @@ public class ItemWand extends Item {
|
|||
@Override
|
||||
public InteractionResultHolder<ItemStack> use(Level world, Player player, InteractionHand hand) {
|
||||
if (world.isClientSide()) {
|
||||
Minecraft.getInstance().setScreen(new GuiSpellcasting(hand));
|
||||
ClientAccess.openSpellcastGui(hand);
|
||||
}
|
||||
|
||||
player.awardStat(Stats.ITEM_USED.get(this));
|
||||
|
@ -28,4 +28,10 @@ public class ItemWand extends Item {
|
|||
return InteractionResultHolder.success(player.getItemInHand(hand));
|
||||
}
|
||||
|
||||
private static class ClientAccess {
|
||||
public static void openSpellcastGui(InteractionHand hand) {
|
||||
Minecraft.getInstance().setScreen(new GuiSpellcasting(hand));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue