Lithostitched

Lithostitched

21M Downloads

Minimal side effect in mixin

SettingDust opened this issue ยท 5 comments

commented

The ChunkMapMixin is redirecting RandomState#create.
Why not inject at return and use a RandomStateAccessor set the values instead of replacing the object?

Can you push the latest code so that I can contribute?

commented

I don't see why this would matter? It gets applied the same either way, and WrapOperation means it won't break if another mod mixins the same method.

commented

It's redirecting on 1.20.1

commented

It's far more effort to move off of a @Redirect; The object has to basically be reconstructed. Unless you have a specific use case where this breaks another mod, it won't be fixed.

commented

What's to reconstruct? WrapOperation or Inject is enough to modify the field like how the Lithostitched do it now

commented

You can't simply swap out the noise router in the random state, all the noise router fields need to be mapped/visited again and several fields need to be re-accessed. It's a hassle. Hard to explain without showing the code which I can't access at the moment.