-
Notifications
You must be signed in to change notification settings - Fork 100
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
1.18.2 - buggy getShape implementation #758
Comments
I've received a similar crash report on 1.16; I assume the implementation is pretty much the same. |
Stale issue message |
I've done some more experimenting with this as someone bringing up compatibility issues with ModernFix reminded me of this issue (whether or not the recent reports are related to this I have yet to determine). Firstly, setting Anyway, the instant deadlock with |
When
Yes, basically you need
The other issue is with an optimization in ModernFix that isn't on by default; I think it's not related to this. |
The problem with this is it seems to majorly slow down the game whenever near dynamic trees, seen as without the cache things like the light engine call |
This issue has gone stale due to inactivity. Please comment again if it is still an issue. |
I received a crash report. when Dynamic Trees is installed alongside my performance mod ModernFix. Upon further investigation, it seems that Dynamic Trees has a buggy
getShape
implementation for its blocks. On some seeds this leads to the game entirely deadlocking when it tries to generate chunks (e.g. on seed-8079293905500261883
with no other mods except Dynamic Trees and ModernFix installed); in other cases it seems to lead to an endless recursive loop of calling shape methods on blocks until the game crashes (see the log given in the linked issue).The reason these issues are not visible when ModernFix isn't installed is because vanilla caches block shapes immediately upon launch, while ModernFix defers the building of this cache and runs it in the background. This means that your block's
getShape
handler can get invoked with a real world rather than the fake empty world vanilla uses. I believe it is actually an oversight on your end that the cache is even used for your blocks at all, as it seems that you're intending to provide a shape based on nearby branches. You probably need to set thedynamicShape
flag when initializing your block properties.The only mods required to reproduce this issue are Dynamic Trees and ModernFix.
The text was updated successfully, but these errors were encountered: