Skip to content

Commit

Permalink
Place player at center of block when warping
Browse files Browse the repository at this point in the history
  • Loading branch information
Gegy committed Oct 27, 2023
1 parent 9c5a575 commit aca7603
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private static int warp(CommandContext<CommandSourceStack> ctx) throws CommandSy
throw GENERAL_ERROR.create();
}

player.teleportTo(level, target.globalPos().pos().getX(), blockPos.getY(), blockPos.getZ(), player.getYRot(), player.getXRot());
player.teleportTo(level, blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5, player.getYRot(), player.getXRot());
player.playSound(SoundEvents.CHORUS_FRUIT_TELEPORT);

ctx.getSource().sendSuccess(() -> Component.translatable("commands.warp.success", target.description()), false);
Expand Down

0 comments on commit aca7603

Please sign in to comment.