Bonsai Trees 3

Bonsai Trees 3

51M Downloads

Custom Biomes O Plenty Trees Drop Incorrect Saplings - Sapling Metadata not read properly?

katubug opened this issue ยท 2 comments

commented

Hi there! Firstly, thank you for providing us with this super useful mod. My players and I love it.

Bonsai Trees version: bonsaitrees-1.1.2-b144
Forge version: forge-1.12.2-14.23.5.2838-universal
I am not using Optifine: Not using OptiFine
Screenshot (if possible): 2019-05-27_22 38 10

Description of the problem including expected versus actual behavior:
Currently there is support for most BoP trees, but I'm trying to add support for the Sacred Oak and the Ethereal Tree. However, I'm having some issues with them dropping the incorrect saplings.

I expect the Ethereal Tree to drop Ethereal Saplings, but it's dropping Yellow Autumn Saplings. I expect the Sacred Oak Tree to drop Sacred Oak Saplings, but it's dropping Origin Saplings.

It seems to me like the "data" field below the "sapling" > "name" field isn't being correctly read. The Sacred Oak Sapling is "biomesoplenty:sapling_1:7," and the Origin Sapling is "biomesoplenty:sapling_1." The same goes for the other - the Ethereal Sapling is "biomesoplenty:sapling_0:7" and the Yellow Autumn Sapling is "biomesoplenty:sapling_0." All the other drops correctly read the "data" field, but for some reason the sapling doesn't seem to. Or I've done something wrong, which is entirely possible.

Steps to reproduce:
Use the following scripts to add support for the saplings:

Ethereal Tree Type: https://pastebin.com/ttaMiCX1
Ethereal Tree Shape: https://pastebin.com/eYjcwV5b

Sacred Oak Type: https://pastebin.com/w1ZySrAu
Sacred Oak Shape: https://pastebin.com/sspim5vm (I need to redo the model so it's smaller and less janky, this is a wip)

Then, place them in a Pot and wait for them to drop Saplings.

Thanks for your help!

commented

Oh my goodness I'm a big ol dummy, I see the issue. I configured the top sapling data correctly but totally spaced on the dropped sapling. facepalm I really need a second pair of eyes, haha.

Thanks so much for your help, I'm very sorry to trouble you with my mistake.

commented

Hey, so both of those saplings have 7 as meta-data.
Both your type definitions say they drop the sapling with 0 as meta-data, so you get the wrong saplings.
It should work once your type.jsons say "data": 7 for the saplings.