BentoBoxWorld / TwerkingForTrees

Twerk to make trees grow faster on your island!
Eclipse Public License 2.0
4 stars 1 forks source link

Bee Nests not generating from twerking #23

Closed gecko10000 closed 1 year ago

gecko10000 commented 3 years ago

Description

Describe the bug

Bee nests are not generating from twerking on oak and birch with the 5% chance that they do when grown naturally or with bonemeal within 2 blocks of a flower.

Steps to reproduce the behavior

Use bonemeal to grow saplings near a flower until a bee nest is obtained; do the same with twerking and observe no results.

Expected behavior

Bee nests should generate like they do in vanilla

Environment

Output of /bbox version (Mandatory)
17.04 04:36:36 [Server] INFO Running Invalid (TUINITY) 1.16.5.
17.04 04:36:36 [Server] INFO BentoBox version: 1.16.1
17.04 04:36:36 [Server] INFO Database: JSON
17.04 04:36:36 [Server] INFO Loaded Game Worlds:
17.04 04:36:36 [Server] INFO skyblock (Skyblock): Overworld, Nether, The End
17.04 04:36:36 [Server] INFO Loaded Addons:
17.04 04:36:36 [Server] INFO Biomes 1.13.0 (ENABLED)
17.04 04:36:36 [Server] INFO Border 3.0.1 (ENABLED)
17.04 04:36:36 [Server] INFO BSkyBlock 1.14.3 (ENABLED)
17.04 04:36:36 [Server] INFO Level 2.6.3 (ENABLED)
17.04 04:36:36 [Server] INFO Limits 1.15.5 (ENABLED)
17.04 04:36:36 [Server] INFO TwerkingForTrees 1.4.1 (ENABLED)
17.04 04:36:36 [Server] INFO Warps 1.10.2 (ENABLED)

Additional context (Optional)

I believe this is because World#generateTree does not by default check nearby blocks for flowers and generate bee nests based on that.

tastybento commented 3 years ago

I've filed a request with Spigot to enhance the API: https://hub.spigotmc.org/jira/browse/SPIGOT-6428 Trying to do this manually will be incredibly difficult.

BONNe commented 3 years ago

Are you in the correct biome? As not in all biomes nest will generate

gecko10000 commented 3 years ago

Are you in the correct biome? As not in all biomes nest will generate

Bee nests generate in any biome, and it works in the exact same location with bonemeal.

gecko10000 commented 3 years ago

Would it maybe help to use Block#applyBonemeal instead? That would most likely grow the tree correctly with the 5% bee nest chance if applicable.

tastybento commented 3 years ago

That's a nice new API. I changed the code to use it. It's a bit weird because it never returns true, which seems like a bug to me. As a result, I just apply bonemeal 100 times and hope that the tree grows. Also, I cannot tell yet whether the tree has grown. Maybe I can check if the sapling is now wood... Anyway, @levtey give the snapshot a try and see if it generates bees nests!

gecko10000 commented 3 years ago

That does, in fact, work. Using it on production server now

tastybento commented 3 years ago

Thanks for closing and i'm glad it works! I am going to keep it open though because I want to see if I can make the sounds and animations work before calling it done.

gecko10000 commented 3 years ago

Trees can grow outside of the border with the flag set to false with this change, just want to let you know.

tastybento commented 3 years ago

Interesting. Maybe by using this API there is no firing of the associate Bukkit event.