From 9b1383591b524cf96ca0b827520b63a1f0ff967a Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sun, 15 Jan 2012 07:33:02 +0000 Subject: [PATCH] Fixed Leaves.getSpecies returning null on higher data values. Thanks to Wolvereness for the PR. By: Nathan Adams --- paper-api/src/main/java/org/bukkit/material/Leaves.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-api/src/main/java/org/bukkit/material/Leaves.java b/paper-api/src/main/java/org/bukkit/material/Leaves.java index 8b8e0d7005..d02dc90a59 100644 --- a/paper-api/src/main/java/org/bukkit/material/Leaves.java +++ b/paper-api/src/main/java/org/bukkit/material/Leaves.java @@ -38,7 +38,7 @@ public class Leaves extends MaterialData { * @return TreeSpecies of this leave */ public TreeSpecies getSpecies() { - return TreeSpecies.getByData(getData()); + return TreeSpecies.getByData((byte) (getData() & 3)); } /**