HyperiumClient / Hyperium-Kotlin

Hyperium Client rewritten in Kotlin with good coding standards.
GNU Lesser General Public License v3.0
5 stars 3 forks source link

Implemented HyPlayer System #12

Closed FalseHonesty closed 5 years ago

FalseHonesty commented 5 years ago

Description

For many different client systems, there will need to be custom data attached to players. The way this was done in the Hyperium Java was through the use of maps to those specific pieces of data in every system where it was required. This is a waste of space and efficiency, and this pull request aims to fix that by having all player-specific data stored in the HyPlayer equivalent to an EntityPlayer.

Type of change

Please delete options that are not relevant.

Checklist:

FalseHonesty commented 5 years ago

Currently this is a WIP and should not be merged yet. I am waiting on my pull requests in Blaze and BlazeAPI to be accepted, as this change requires them.

Also, there is another way to implement the storage of HyPlayers than the current hashmap being used, and that is mixing in a custom field into EntityPlayer, and rather than having hyplayers created and destroyed when entityplayers are, they can be created in the constructor of an entity player and then be garbage collected normally with the entityplayer. I would like opinions on which implementation would be preferred, as they can both back the same API that’s currently provided, ie, EntityPlayer#hyplayer.