Fix GUI for TR Manual
This commit is contained in:
parent
75f14c145c
commit
193dc94f80
2 changed files with 21 additions and 23 deletions
|
@ -44,16 +44,13 @@ public class ManualItem extends Item {
|
|||
}
|
||||
|
||||
@Override
|
||||
public TypedActionResult<ItemStack> use(final World world, final PlayerEntity player,
|
||||
final Hand hand) {
|
||||
if (world.isClient) {
|
||||
openGui(player);
|
||||
}
|
||||
public TypedActionResult<ItemStack> use(final World world, final PlayerEntity player, final Hand hand) {
|
||||
if (world.isClient) { openGui(); }
|
||||
return new TypedActionResult<>(ActionResult.SUCCESS, player.getStackInHand(hand));
|
||||
}
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
private void openGui(PlayerEntity playerEntity) {
|
||||
MinecraftClient.getInstance().openScreen(new GuiManual(playerEntity));
|
||||
private void openGui() {
|
||||
MinecraftClient.getInstance().openScreen(new GuiManual());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue