Glowstone-Legacy
Glowstone-Legacy copied to clipboard
Bonemeal interaction
This handles the bonemeal interaction with:
- Carrots and potatoes
- Cocoa
- Crops
- DoublePlants (the flowers only, as expected)
- Grass
- Tall grasses (normal and fern)
- Melon and Pumpkin stems
- Brown and red mushrooms
- Saplings (I worked around the bukkit bug with saplings MaterialData)
Progress
- [x] add tree generation
- [x] add huge mushroom generation
- [x] provide a test plugin for BlockGrowEvent and StructureGrowEvent
Test Plugin:
- jar: https://drive.google.com/file/d/0B0gnjB7PN1h3X0VKRnlOMmozZUU/view?usp=sharing
- source available here: https://gist.github.com/jimmikaelkael/b7aac6c8c27a8dd2aed5
Edited by turt2live
Related Links:
- Ticket: #206
- Ticket: #325
- Waiting for #492 (or similar)
- Waiting for #289 (or similar)
@turt2live Ready to get this reviewed. Please note that I merged the content of #434 and closed it.
Some notes for tests:
- for mushrooms, you can place them on mycel or podzol to avoid the light amount checks
- melon and pumpkins stem grows, but does not produce a fruit: this is an expected behavior as it's generated on block ticking (#431)
- growing huge trees (redwood, jungle and dark oak, with 4 saplings) is already handled but there's not yet huge trees generation (#492), so don't be desperate if it eats your 4 saplings but just grow a normal tree in north west corner instead ^^
- remember that "soft materials" currently drops nothing due to another bug
This PR should be pulled before #431.
Simple conflict in ItemTable, keep both sides. Branch
@dequis thanks. Rebased on top of master.
@turt2live this PR should be put on hold until #289 is pulled as it will allow to make use of the bonemeal effect instead of spawning particles directly.
PRHOLD: Waiting for #289 for ease of use
@turt2live I tought that it could wait for #492 too in order to grow all tree species with bonemeal.
PRHOLD: Waiting for #289 for ease of use and #492 for complete implementation
Both required PRs got merged!
@turt2live Fixed the conflicts, and added the use of the now implemented BONEMEAL_USE effect. Retested tree saplings and it seems to be ok.
@turt2live As @dequis opened my eyes here #539, it seems you can stick it again with "On Hold" label: This PR can wait for #249 to be pulled so that I can change my BlockAttachable extends to BlockNeedsAttached (drop cocoa beans when log was broken, drop seeds when soil with crops is destroyed, etc...).
Instead of locking it into a hold state I'll just let it continue as-is. Whichever PR is pulled first will leave the problem for the other to deal with.
Okay, no problem.
@jimmikaelkael Only known bug: Using bonemeal on a tall grass block will create a double tall grass block, as expected, but it replaces any block that was directly above it.
@turt2live I'm sorry I forgot to check the above block when growing tall grass. This is fixed now, thank you.
Finally updated Bamboo. This is building: http://bamboo.gserv.me/browse/GLOW-SRV-PR432-124
@jimmikaelkael Cocoa fails to work on placement.
21:52:47 [WARNING] Wrong MaterialData for COCOA (BlockCocoa): expected SimpleAttachableMaterialData, got COCOA(3) facing EAST SMALL
@turt2live I guess it's because of the physics update. I'll check that soon.
@turt2live I've rebased on top of master and fixed bug.
@jimmikaelkael More bugs:
- Using bonemeal in survival on grass does not spawn a patch like it should
- Bonemeal can be used in adventure mode (should be restricted)
@turt2live For the survival bug, I'm unable to reproduce it.
@jimmikaelkael This is the setup I used to test the grass:
The large patch of grass was tested in creative mode just fine (in that state). After a few tests in survival the bonemeal stopped spawning patches and only created 1 grass and sometimes 1 flower instead. Testing again in creative proved to be just fine.
@turt2live This is because of the "soft material" bug, I guess you're destroying grass in survival mode and try to spawn it on the same place again, is it that ?
@turt2live After a quick test this is confirmed to be the "soft material" bug like I said above. As it is a third party bug I'm sorry but I'll not handle it in this PR (see #541, it is the fix).
Try to break your tall grasses and flowers in survival mode then disconnect the server, and reconnect: you'll see it has been broken on client side ONLY.
This "soft material" bug is quite old and you should consider it for every tests with instabreak blocks when in survival mode.
Whups! I'll test everything else then.
Assigning to @SpaceManiac as ready to pull with minor formatting concerns.
@SpaceManiac This pull request is still pending pull. The pull request has been re-tested and is confirmed to be operational.