Commit Graph

3 Commits

Author SHA1 Message Date
Aikar
98e7d01ce8 Optimize isEmpty() to remove Map lookup
Every call to .isEmpty() made a horribly wasteful map lookup just to get the
reference to the Air Item for checking.

We will now cache a copy of that item
2016-12-21 04:21:42 -05:00
Aikar
a18f763412 Revert "Optimize ItemStack.isEmpty()"
This reverts commit 257c591391.

See a bug
2016-12-21 03:51:48 -05:00
Aikar
257c591391 Optimize ItemStack.isEmpty()
Remove hashMap lookup every check, simplify code to remove ternary
2016-12-21 03:50:43 -05:00