SPIGOT-1640: Fix spawning particles that use MaterialData

This commit is contained in:
Thinkofdeath 2016-03-02 14:51:50 +00:00
parent a5d4a933bc
commit 09b4549a29

View File

@ -34,8 +34,7 @@ public class CraftParticle {
return new int[]{0};
}
MaterialData data = (MaterialData) obj;
IBlockData nms = CraftMagicNumbers.getBlock(data.getItemType()).fromLegacyData(data.getData());
return new int[]{Block.REGISTRY_ID.getId(nms)};
return new int[]{data.getItemTypeId() + ((int)(data.getData()) << 12)};
}
throw new IllegalArgumentException(particle.getDataType().toString());
}