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
Vanilla's resource reloaders are constructed anew on each reload get access to some context, notably the parameters to DataPackContents. Since 1.20.5, I need access to the RegistryWrapper.WrapperLookup for deserialization context.
Potential Solution
Instead of just having a global list of pre-created of resource loaders, create an event to register reload listeners with context arguments passed in (ideally the DataPackContents and RegistryWrapper.WrapperLookup). This would be similar to fabric-networking-api, where both global and context-based receivers may be registered.
The text was updated successfully, but these errors were encountered:
#3083 This PR has been shelved since 1.20, maybe someone wants to revive that?
In the meantime, I have to inject the reloaders myself, which doesn't sound very safe. (I'm not even sure if reloaders are sorted by the resource loader) DataPackContentsMixin
Reloaders added not through the API will always be grouped where their added. Any reloaders added by the API are sorted and inserted after all other reloaders.
Problem
Vanilla's resource reloaders are constructed anew on each reload get access to some context, notably the parameters to
DataPackContents
. Since 1.20.5, I need access to theRegistryWrapper.WrapperLookup
for deserialization context.Potential Solution
Instead of just having a global list of pre-created of resource loaders, create an event to register reload listeners with context arguments passed in (ideally the
DataPackContents
andRegistryWrapper.WrapperLookup
). This would be similar tofabric-networking-api
, where both global and context-based receivers may be registered.The text was updated successfully, but these errors were encountered: