Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chunk Cascading Feature is lying. #75

Open
Speiger opened this issue Feb 8, 2023 · 2 comments
Open

Chunk Cascading Feature is lying. #75

Speiger opened this issue Feb 8, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@Speiger
Copy link

Speiger commented Feb 8, 2023

Code piece.

o/ I know you copied this from forge. But sadly this feature is lying, was lying, and in forges implementation will be always lying!

Why?
Said feature said "bearcore" was causing chunk cascading, yet it only overrided 2 events and cleared endermens pickup list.
The bonemeal event, and the Sleep event.

So why is this caused?
Forges WorldGenerator never actually saves which mod registers what WorldGenerator.
And when worldgen is executed this causes that no mod will be set to be placed to cause chunkcascading, not even cleared.
Causing it to spill out random garbage.

What is the fix:
Simply add 2 more mixins.
1: in the register function that maps the Mods to the WorldGenerator, Map<IWorldGenerator, ModContainer>.
2: in the worldgenerator process function set the active Mod to the respective WorldGenerators.
3: Win/Profit.

Note: Some mods wrap all WorldGenerators so they can do retrogen stuff, which the Retrogen mod from CPW does.
but these edge cases can be accounted for. Just so you know.

@makamys makamys added the bug Something isn't working label Feb 17, 2023
@embeddedt
Copy link
Owner

Note: Some mods wrap all WorldGenerators so they can do retrogen stuff, which the Retrogen mod from CPW does.
but these edge cases can be accounted for. Just so you know.

Could you explain how this can be accounted for without needing to hardcode a list of these world generators?

@Speiger
Copy link
Author

Speiger commented Apr 4, 2023

@embeddedt F i forgot to answer.
I had a answer but removed it due to be wrong.

Basically the only mod you need to account for is CPWs Retrogen mod which uses Wrappers sadly.
But you can account with reflection or mixins.
Simply have a mod specific mixin or reflection and test for the Wrapper instance. If the mod is detected.

Yes this hardcodes to CPW but his mod is the only mod that Wrappers it, since it is the only one doing it. (After rechecking it)

Sorry that it took so long to answer. I simply forgot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants