From a9e638b93f92b6cffaac0b008bb8f4fdfcea856d Mon Sep 17 00:00:00 2001 From: themode Date: Mon, 25 Jan 2021 21:58:06 +0100 Subject: [PATCH] Fix infinite recursion with Instance#getBlockStateId --- src/main/java/net/minestom/server/instance/Instance.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/minestom/server/instance/Instance.java b/src/main/java/net/minestom/server/instance/Instance.java index 52c60061d..dba318945 100644 --- a/src/main/java/net/minestom/server/instance/Instance.java +++ b/src/main/java/net/minestom/server/instance/Instance.java @@ -632,7 +632,7 @@ public abstract class Instance implements BlockModifier, EventHandler, DataConta * @return the block state id at the position */ public short getBlockStateId(double x, double y, double z) { - return getBlockStateId(Math.round(x), Math.round(y), Math.round(z)); + return getBlockStateId((int) Math.round(x), (int) Math.round(y), (int) Math.round(z)); } /**