Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

Referance equality problem #49

Open
alphaqu opened this issue Jul 9, 2021 · 5 comments
Open

Referance equality problem #49

alphaqu opened this issue Jul 9, 2021 · 5 comments

Comments

@alphaqu
Copy link

alphaqu commented Jul 9, 2021

The reference equality issue has not been solved fully as the HydrogenImmutableReferenceHashMap still enforces it. This breaks DashLoader and should prob be fixed by using .equals instead of ``==` in the HydrogenImmutableReferenceHashMap.

@magneticflux-
Copy link

The point of a reference hash map (rather than an object hash map) is not to use .equals since == is significantly faster (a single integer comparison rather than a method call).

How does DashLoader break this assumption exactly?

@alphaqu
Copy link
Author

alphaqu commented Jul 10, 2021

Dashloader does not get properties like mc does it as it creates new objects for them. And because of this hydrogen cannot return any properties as they are not the same object

@magneticflux-
Copy link

It sounds like an issue that needs to be fixed on DashLoader's end. I recommend trying to inject earlier and trying to make it compatible with #22

@alphaqu
Copy link
Author

alphaqu commented Jul 10, 2021

that has been partly fixed in b691a68 but not fully

@alphaqu
Copy link
Author

alphaqu commented Jul 10, 2021

DashLoader cant fix this. Its not a normal mod. It recreates the other mods assets

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants