Realistic Terrain Generation

Realistic Terrain Generation

3M Downloads

Peony Top on Fallen Log = Crash

whichonespink44 opened this issue ยท 9 comments

commented

From @whichonespink44 on May 18, 2016 18:1

Ported from the 1.7.10 repo: #716

@cattrfly said:

I was harvesting a fallen spruce log and noticed as I reached the end that the top half of a double peony, which I'd thought was behind the log, was actually protruding from the log's last block. As I looked up at it, I briefly thought "oh, another nice touch of realism, vegetation growing from a rotting log"... and then my game froze and crashed. >_< The crash report doesn't specifically mention RTG, but I thought since the fallen logs are generated by the mod it might be something you'd want to look into. Crash report attached below. Let me know if you need any other info. :)

Crash report: https://github.com/Team-RTG/Realistic-Terrain-Generation/files/271017/crash-2016-05-18_04.21.32-client.txt

Copied from original issue: Team-RTG/1.9-Realistic-Terrain-Generation#116

commented

From @topisani on May 18, 2016 21:9

this is probable an issue with the deco not notifying the client of changes when placing blocks. Not entirely sure what to do - i will look into it

commented

I've experienced this before and found out it was WAILA, not sure if you're still looking into this. removing WAILA allowed me to re-enter the world.

commented

@Jayceena thanks for the update... we still haven't looked into this properly, but based on the original report, it looks like we need to tweak the rules for fallen tree generation, as they shouldn't be overriding double-tall flowers. (They're currently just checking for flowers, and overriding if it finds one, but it's not taking into account the tall ones.)

commented

Yeah for me it happened in vanilla and a waterpool overrode half of a tall grass and the top defaults to peonys and WAILA is just like ummmmm nope

commented

seems the crash is on waila's side then, but this still shouldnt happen in the first place. Any ideas how to fix this?

commented

When a fallen tree is placed by RTG, we should either:

  1. Check if we are replacing a 2-tall plant with a log block and remove the plant's top, or
  2. Check the block above each log block and if it isn't Blocks.AIR, change it to Blocks.AIR
  3. Check for a 2-tall plant in some cleverer way that you can come up with.

Option 1 is the most desirable solution, but there's no way to guarantee proper detection of a plant that is greater than 1 block tall if it is added by a mod from a custom class that we don't know about.

Option 2 is completely fail-safe (with the exception of a custom plant >2 blocks tall), but could, in certain circumstances, remove some other block that isn't the top of a 2-tall plant, such as leaves if it is close to a shrub or something. Though this would likely be a rare occurance.

We can always check if the block above the log blocks is not Blocks.AIR and replace it with a mushroom, as muchrooms normally grow on rotting logs that have fallen.

commented

i dont like option 1 for the reason you specify, it doesnt guarantee anything.

I dont like option 2 for the same reasons you say, i really want it to be possible for these things to be overgrown.

I like the idea of a mushroom, except for this: you cant plant mushrooms on wood in vanilla (right?) and i think we should follow rules like that.

How about making sure the logs are generated before the 2 high plants? that would probably work - except for the whole deco bleed thing i guess...

commented

When the new delayed decoration system gets ported, I don't think we'll be able to guarantee order of decorations in that manner. Safest way would be to do a check for air blocks immediately above where the logs get placed - that way we know we're not cutting off any double/triple/etc blocks.

Fallen trees could still be overgrown via decorations that come after them, or if we explicitly decorate them.

commented

Fixed in 3258d04