Commit Graph

2 Commits

Author SHA1 Message Date
Shane Freeder
6c3f04049d Initial work on 1.14 pre-5 2019-04-23 10:35:52 +01:00
Aikar
2f8bdbfde8
Fix BlockState hashCode optimization patch performance bug
we missed something in updating this patch and accidently left
hashCode as a 0 value. This caused a pretty nasty performance hit
for BlockStateEnum instances as they would be all a hash collision.

This update fixes that and also promotes the optimizations to cover
ALL cases of Block States, not just enums.

While mojang cached hashCode in 1.13, we can still just use a simple
large prime based hashCode that auto increments guaranteeing no overlap.

Additionally, replace all equals with an identity check.
2019-02-28 01:35:06 -05:00