Open IdrisQe opened 6 years ago
Avalanche config option set to true, did not break any block. Severe FPS lag and physics rubberbanding due to the sheer number of blocks constantly falling, an entire sand dune collapsing into the ravine it generated next to. This is the kind of thing I'm hoping to get fixed.
HI IdrisQe, thanks for reporting this. If I may quote myself from issue #33: this sort of thing tends to happen in modded worlds with more suspended gravity-enabled blocks than Repose normally has to deal with. There's a "safety valve" in the code that causes blocks to teleport instead of creating falling entities when the server starts to lag too much, but clearly that's not sufficient. I was planning to change this mechanic for 1.13 but I'll see if I can come up with a workaround for 1.12 in the meantime.
I like a lot of your suggestions, and explored some of them when first creating this mod but I was wary of modifying blocks as suggested in point 2). Now that the mod's been out for a while, this kind of thing makes more sense as long as it's configurable. My time is rather limited right now, but stay tuned for updates.
Recurrent Complex and Ruins have quite a few structures that use dirt and what not, why not try and pick up on those structures, and shut off the functionality of the mod on dirt, sand, and other such blocks spawned in their structures?
Hi Sunconure11, thanks for your suggestion. Unfortunately it's not possible to detect if a given block is part of a structure from an unknown mod. If they use special blocks, they'd be able to exclude them from Repose's config; if they use vanilla blocks it wouldn't be possible to treat them differently than the natural ones. So I'll be looking at the various other lag-reducing solutions available.
A number of mods add floating islands in the sky, near-surface caves generate with dirt and sand and gravel on top, and sometimes multiple layers of blocks that don't count as a full block spawn atop eachother (soul sand, Biomes O' Plenty Mud or Ash, etc.) and this can cause some pretty intense worldgen lag as the internal server panics trying to calculate the falling positions of hundreds of blocks at once.
Now, obviously, this can be solved by simply removing said blocks from the config, but then you lose the falling behaviour on many of them entirely. What I propose is some config options to help mitigate these potential issues:
As an example, I generated a Biomes O' Plenty world and my world was immediately frozen for 10+ minutes as a mangrove biome spawned, the mud floor began to collapse, broke on the part of the second mud layer beneath it, which also then collapsed, leaving a huge sinkhole and floating trees. With this config, those wouldn't fall even if in the granular list, nor be automatically placed in the granular list, preventing issues like that.
And then for example, you have a floating island from a structure mod generate made from dirt, the bottom layer of dirt open to the air will instead become stone to prevent the whole island from crashing to the ground instantly.
3a. repose.supportBlocks=minecraft.grass,minecraft.mycelium
This would make it so, say a cliff generated with grass on top, and a 2 block overhang of grass and dirt. Due to the grass's roots, the grass nor the dirt right below it will fall, despite both hanging over air, due to the grass that IS on the cliff beside the overhanging grass holding up the overhanging grass with its roots, and the overhanging grass holding up the dirt below it with its roots. If the grass/grass connection is broken, the grass will start to fall because there's no support beside or above it to hold it up, and the dirt below it would start to fall as a result too.
3b. repose.granularBlocks=minecraft.cobblestone repose.frictionBlocks=minecraft.cobblestone repose.allFriction=false repose.bottomFriction=false
And then you build a hollow box out of cobblestone. Due to the roof cobblestone being surrounded on all four sides by more cobblestone, it doesn't fall. if the integrity is compromised, there's a 25% chance that blocks with horizontal sides now exposed to the air due to the missing block will fall. 50% chance if two sides aren't against friction blocks. 100% if 3 or 4 sides have air beside them, instantly causing it to fall, not held in place by friction.
allFriction, if true would label every block as a friction block, making it so any granular block can only fall if 1-4 horizontal sides are exposed to air and it's not being held up by a Support Block. This would let sand roofs be stable so long as the sand block is surrounded on all four sides by any block that isn't a non-full block. Could also make cave-ins a significant hazard if you set Stone to be a Granular block and had allFriction on, so if you mine out a cave wall incorrectly there's a chance part of it will collapse.
bottomFriction, if true would make it so if there is any Friction Block directly under a Granular block, it cannot collapse outward when disturbed, essentially stabilizing them.