Project MMO

Project MMO

10M Downloads

Crash with Dynamic Trees

Groupix05 opened this issue ยท 5 comments

commented

Describe the bug
Crashing when cutting trees with Addons for Dynamic Trees.
PMMO return a null level to Dynamic Trees so everything crash
On Forge 1.20.1 47.1.3 and 47.3.1

Paste your crash log here
InvictusSlayer/DynamicTrees-Slayers-Beasts#1

commented

Nyfaria ( a Dynamic Trees Dev) Said "basically theyre passing null into the getDestroySpeed when they shouldn't

float breakSpeed = block.defaultBlockState().getDestroySpeed(null, null);
"

commented

Changing the "null" to "EmptyBlockGetter.INSTANCE" seems to fix the crash.
float breakSpeed = block.defaultBlockState().getDestroySpeed(EmptyBlockGetter.INSTANCE, null);
Instead of adding every addon in the WORLD_SENSITIVE_MOD_IDS, changing the null by something else could be more interesting. Just hovering a branch in the inventory, the game crash.
I don't know if something has changed in the gameplay with these changes, I would like to know. I'm learning JAVA.

Thanks !

commented

also happens in 1.19.2

commented

With the latest version you Can maybe remove Dynamic Trees and DTBOP from the WORLD_SENSITIVE_MOD_IDS so we Can get XP from Dynamic Trees and Dynamic Trees BOP

commented

you still not going to get dynamic values even if i remove them. EmtpyBlockGetter.INSTANCE returns a null block entity always, which will cause them to be skipped. all this fix does is prevent the crash. you will always have to manually configure dynamic blocks and items like this.