From 8d63982a28142cb4fd77f2a36bcd770bb8876992 Mon Sep 17 00:00:00 2001 From: Alejandro <25-alejandro@users.noreply.git.krews.org> Date: Mon, 27 May 2019 13:50:42 +0300 Subject: [PATCH] Fix MysqlDataTruncation in HabboItem --- src/main/java/com/eu/habbo/habbohotel/users/HabboItem.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/eu/habbo/habbohotel/users/HabboItem.java b/src/main/java/com/eu/habbo/habbohotel/users/HabboItem.java index ff027dd2..523b7ddf 100644 --- a/src/main/java/com/eu/habbo/habbohotel/users/HabboItem.java +++ b/src/main/java/com/eu/habbo/habbohotel/users/HabboItem.java @@ -245,7 +245,7 @@ public abstract class HabboItem implements Runnable, IEventTriggers { statement.setString(3, this.wallPosition); statement.setInt(4, this.x); statement.setInt(5, this.y); - statement.setDouble(6, this.z); + statement.setDouble(6, Math.round(this.z * Math.pow(10, 6)) / Math.pow(10, 6)); statement.setInt(7, this.rotation); statement.setString(8, this instanceof InteractionGuildGate ? "" : this.getDatabaseExtraData()); statement.setString(9, this.limitedStack + ":" + this.limitedSells);