Skip to content

Commit

Permalink
fix: 座標がfloatで送信される
Browse files Browse the repository at this point in the history
  • Loading branch information
yuuki1293 committed Aug 19, 2022
1 parent 4a372fb commit 15ec298
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ object CopyCoordinate {
try {
val player = Minecraft.getInstance().player
val clipboard = new ClipboardManager()
val text = s"${player.getX()} ${player.getY()} ${player.getZ()}"
val text = s"${player.getX.toInt} ${player.getY.toInt} ${player.getZ.toInt}"
val window = Minecraft.getInstance().getWindow.getWindow
clipboard.setClipboard(window, text)
} catch {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import net.minecraft.client.Minecraft
object SendCoordinate {
def onPressKey(): Unit = {
val player = Minecraft.getInstance().player
val text = s"${player.getX()} ${player.getY()} ${player.getZ()}"
val text = s"${player.getX.toInt} ${player.getY.toInt} ${player.getZ.toInt}"
player.chat(text)
}
}

0 comments on commit 15ec298

Please sign in to comment.