Fixed double packet sending on single-player and LAN worlds.

This commit is contained in:
micle
2021-05-29 17:14:49 +01:00
parent 439440767d
commit 107eb688eb

View File

@ -55,6 +55,7 @@ public class TotemOfRevivingItem extends Item {
@Override
@OnlyIn(Dist.CLIENT)
public ActionResult<ItemStack> use(World world, PlayerEntity player, Hand hand) {
if (!world.isClientSide) { return super.use(world, player, hand); }
if (player.isCrouching()) {
TotemOfReviving.INSTANCE.sendToServer(new C2SRequestTotemTarget(player.getUUID(), hand));
} else {