CorgiTaco / Oh-The-Trees-Youll-Grow

Tree generation Library
GNU Lesser General Public License v3.0
1 stars 0 forks source link

"Alter ground" decorator is not working #7

Open Darsenia opened 1 month ago

Darsenia commented 1 month ago

I cannot make podzol (or any other block) circles generate under the trees.There are no errors in the log and trees work as intended, but without any alter ground. The mod version is the latest one.

This is the code for the example tree:

{ "type": "ohthetreesyoullgrow:tree_from_nbt_v1", "config": { "base_location": "mineperfection:features/trees/oak/otr_6", "can_grow_on_filter": { "type": "minecraft:matching_block_tag", "tag": "minecraft:dirt" }, "can_leaves_place_filter": { "type": "minecraft:replaceable" }, "canopy_location": "mineperfection:features/trees/oak_canopy_1", "decorators": [{ "type": "minecraft:alter_ground", "provider": { "type": "minecraft:simple_state_provider", "state": { "Name": "minecraft:podzol" } } } ], "height": { "type": "minecraft:uniform", "value": { "max_inclusive": 14, "min_inclusive": 10 } }, "leaves_provider": { "type": "minecraft:simple_state_provider", "state": { "Name": "minecraft:oak_leaves", "Properties": { "distance": "7", "persistent": "true", "waterlogged": "false" } } }, "leaves_target": [ "minecraft:oak_leaves" ], "log_provider": { "type": "minecraft:simple_state_provider", "state": { "Name": "minecraft:oak_log", "Properties": { "axis": "y" } } }, "log_target": [ "minecraft:oak_wood" ], "place_from_nbt": ["minecraft:oak_wood", "minecraft:oak_log", "minecraft:oak_leaves"] } }

CorgiTaco commented 2 weeks ago

Not sure exactly what might be going wrong here, do you have a datapack i can use to test?

Darsenia commented 1 week ago

Hi again! Sorry for the late response. I think I find the clue to this mystery. The lore of this is a bit long and weird, bust still=) I saw your response and decided to make a small lightweight datapack just for you to test (because the actual datapack I'm working on is too big and overwhelming for testing obviously).I placed all needed stuff from the biome with (non)altered ground, some other base stuff, changed and removed a few things and you know what? It worked! There were podzol circles in place. Still no circles in my actual datapack... So, I started thinking about this again and trying different things. I tried adding noise and terrain rules stuff, removing features etc.Nothing. And finally I got it! It's a bit strange though=) I'm a bit of a lazy one and most of my trees are often big and complicated, so i initially threw away the part of dividing trees into actual Trunk and Canopy.So I made one-block trunks for simple trees, but for the bigger ones I used to place just a block of leaves instead of a canopy, somewhere inside the actual tree canopy (which was obviously a part of the trunk .nbt). That means in the configured feature it was something like "height": { "type": "minecraft:uniform", "value": { "max_inclusive": 14, "min_inclusive": 10 } } Somewhere between 10 and 14 the fake canopy leaves block can be easily hidden away. But recently I came across some issues with such a trick, considering some complicated tree shapes like big sacura or palms, it became too hard to hide a leaf block properly. So, i "invented" a new trick ;-D Now placing the fake canopy of one wood block on 0,0 at the very foot of a tree. And it was definitely a better trick=) I haven't remade all features for now. But, for the testing datapack I decided to use this trick for whatever reason, because I was changing files anyway... This was the reason of podzol circles appearing!) So, after a few tests I got that if you have not 0,0 in the height, you will get no circles or just a couple for a biome (if "min height" is 0, 1 or close).And completely no circles with bigger numbers like 10,14. I hope this makes sense :-D This is the testing datapack Test.zip