Skip to content

Commit 17565da

Browse files
authored
Merge pull request #173 from SirBlobman/master
Fix spawn egg error in 1.8.8 due to missing SpawnEggMeta class.
2 parents d1bef1f + dc01038 commit 17565da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/cryptomorin/xseries/XMaterial.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1742,8 +1742,8 @@ public static XMaterial matchXMaterial(@Nonnull ItemStack item) {
17421742
String material = item.getType().name();
17431743
byte data = (byte) (Data.ISFLAT || item.getType().getMaxDurability() > 0 ? 0 : item.getDurability());
17441744

1745-
// They didn't really use the items data value in older versions.
1746-
if (!Data.ISFLAT && item.hasItemMeta() && material.equals("MONSTER_EGG")) {
1745+
// Versions 1.9-1.12 didn't really use the items data value.
1746+
if (!Data.ISFLAT && item.hasItemMeta() && material.equals("MONSTER_EGG") && supports(9)) {
17471747
ItemMeta meta = item.getItemMeta();
17481748
if (meta instanceof SpawnEggMeta) {
17491749
SpawnEggMeta egg = (SpawnEggMeta) meta;

0 commit comments

Comments
 (0)