Skip to content

Commit

Permalink
chore: update what "force" means
Browse files Browse the repository at this point in the history
  • Loading branch information
Duzos committed Sep 2, 2024
1 parent c3a77bc commit 9dacc4d
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ public static boolean toCase(ServerPlayerEntity player, boolean force) {
private static void toCasePost(ServerPlayerEntity player, boolean force) {
if (!force) {
if (!(getSet().isWearing(player))) return;

player.getArmorItems().forEach(stack -> stack.setCount(0));
}

player.getArmorItems().forEach(stack -> stack.setCount(0));
player.getInventory().offerOrDrop(new ItemStack(Register.Items.MARK_FIVE_CASE));
}

Expand All @@ -62,12 +62,12 @@ public static boolean fromCase(ServerPlayerEntity player, boolean force) {
if (!player.isOnGround()) return false; // not on ground
if (!player.getMainHandStack().isOf(Register.Items.MARK_FIVE_CASE)) return false; // not holding
if (hasArmor(player)) return false; // wearing armor
}

player.getWorld().playSound(null, player.getBlockPos(), Register.Sounds.MARK5_NOISES, SoundCategory.PLAYERS, 0.25f, 1f);
Network.toTracking(new MarkFiveCaseS2CPacket(player.getUuid(), true), player);
player.getWorld().playSound(null, player.getBlockPos(), Register.Sounds.MARK5_NOISES, SoundCategory.PLAYERS, 0.25f, 1f);
Network.toTracking(new MarkFiveCaseS2CPacket(player.getUuid(), true), player);

player.setStackInHand(Hand.MAIN_HAND, ItemStack.EMPTY);
}
player.setStackInHand(Hand.MAIN_HAND, ItemStack.EMPTY);

getSet().wear(player);
return true;
Expand Down

0 comments on commit 9dacc4d

Please sign in to comment.