Terrestria

Terrestria

2M Downloads

[Incompatibility] Terrestria and HT's TreeChop - crashing clients

TheyCallMeToast opened this issue ยท 9 comments

commented

Pack: Medieval Minecraft 1.19.2 [Fabric]

Issue: When chopping down a sakura tree with an axe, the axe activates HT's Tree Chop mod and crashes the client of the person that chopped the tree. (HT Tree Chop adds different phases of trunk thickness while chopping).
Crash log for the client that chopped the sakura tree:
crash-2022-11-27_18.03.35-client.txt

In addition, it creates a rendering bug that also crashes any player within render distance as well.
In the area of affect crash log:
crash-2022-11-27_18.58.30-client.txt

I know that this could be an issue with either mod, so I am creating a ticket on both mods' Github pages.
Thank you for all your hard work and for being active within the community!

p.s. We have been playing Medieval MC for about a month and in previous versions, we could use Tree Chop with sakura trees without an issue, therefore we are thinking it may be something that was changed in the last month. Hope all the information helps narrow the issue and solution!

commented

TreeChop issue: hammertater/treechop#146

This seems similar to #279 which may mean we don't have a good way to fix it on our end. I'm not certain without more extensive review.

commented

Yeah, it does seem like something on Treechops' end. We removed the treechop mod from the server and the client-side issues all but disappeared. One player had a crash that called out treechop somehow, so we removed it from the clients as well.
crash-2022-11-26_19.54.14-client.txt

commented

I don't exactly mean it's their fault ... our small trunk implementations are kind of funky to say the least. But in discussions with other Terraformers it seems like we've had trouble getting around that in the past. Ideally in most cases the other mod can accommodate us by doing more type checks in their code (f.e. is the block in a leaves tag or a trunk tag, etc.).

commented

Oh haha, I wasn't meaning to insinuate that it was their fault either, just from the crash logs it seems like it is the culprit in this situation. It is most likely as you said, the size of the trunk is incompatible with the way that treechop executes the replacing trunk behavior.

commented

Hey folks, both crashes are because of TreeChop. I should be able to fix the first crash. The second crash (the rendering one) is already fixed and but not yet released (hammertater/treechop#142). Sorry about that!

commented

The crash should be fixed in treechop 0.17.0. Sorry for the wait!

@gniftygnome I also ended up adding a mixin for your BareSmallLogBlock class to tell TreeChop that some TerraformersMC log blocks are slimmer (assuming radius 5, for now) than regular ones. Let me know if you think that was a terrible idea, maybe we can figure out a better solution.

commented

@hammertater Starting with 1.19.4 versions (Terraform API 6.1.0-alpha.1 and above), we have included a method you can call to get the trunk radius (half width): public int getLogRadius()

https://github.com/TerraformersMC/Terraform/blob/1.19.4/terraform-wood-api-v1/src/main/java/com/terraformersmc/terraform/wood/block/BareSmallLogBlock.java#L379

This will work for any instanceof BareSmallLogBlock (which includes SmallLogBlock).

commented

@gniftygnome Thanks a bunch! Looking forward to using it

commented

Resolving completed (a bit late).