You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
The big problem with entity mapping from Flint to Minecraft and from Minecraft to Flint currently is, that the types do not always match. For example, when wanting the map the Minecraft.getInstance().player to a Flint object, the result will never be instanceof ClientPlayer. This can lead to problems when wanting to store something in an entity, for example the potion effects. ClientPlayer#getActivePotions will never return a non-empty list because the potion effects are applied to another instance of PlayerEntity representing the player.
Another issue of the current mapping system is, that there has to be a mapping method for every single entity, which will get too much when all entities are implemented. A single method like fromMinecraftEntity(Object handle) would be good.
Furthermore, the toMinecraft mapping method is not really needed. As all entities currently are wrappers around the minecraft object, a getHandle() method should be fine.
The text was updated successfully, but these errors were encountered:
Description
The big problem with entity mapping from Flint to Minecraft and from Minecraft to Flint currently is, that the types do not always match. For example, when wanting the map the Minecraft.getInstance().player to a Flint object, the result will never be instanceof ClientPlayer. This can lead to problems when wanting to store something in an entity, for example the potion effects. ClientPlayer#getActivePotions will never return a non-empty list because the potion effects are applied to another instance of PlayerEntity representing the player.
Another issue of the current mapping system is, that there has to be a mapping method for every single entity, which will get too much when all entities are implemented. A single method like fromMinecraftEntity(Object handle) would be good.
Furthermore, the toMinecraft mapping method is not really needed. As all entities currently are wrappers around the minecraft object, a getHandle() method should be fine.
The text was updated successfully, but these errors were encountered: