From df32569af63b1a28ef182f743f16a325a8fa5143 Mon Sep 17 00:00:00 2001 From: Matsv Date: Thu, 19 Jul 2018 13:18:27 +0200 Subject: [PATCH] Flowerpot check for empty strings / return air --- .../providers/blockentities/FlowerPotHandler.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/providers/blockentities/FlowerPotHandler.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/providers/blockentities/FlowerPotHandler.java index 536227486..7d16f57b6 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/providers/blockentities/FlowerPotHandler.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/providers/blockentities/FlowerPotHandler.java @@ -52,7 +52,10 @@ public class FlowerPotHandler implements BlockEntityProvider.BlockEntityHandler ? new Pair<>(((Number) item).byteValue(), data) : new Pair<>((String) item, data); - if (flowers.containsKey(pair)) { + // Return air on empty string + if (item instanceof String && ((String) item).isEmpty()) + return 5265; + else if (flowers.containsKey(pair)) { return flowers.get(pair); } else if (flowersNumberId.containsKey(pair)) { return flowersNumberId.get(pair);