Cuberite Forum
Farming - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Development (https://forum.cuberite.org/forum-13.html)
+--- Thread: Farming (/thread-451.html)

Pages: 1 2 3 4 5 6


RE: Farming - NiLSPACE - 05-31-2012

And long long grass on the ground


RE: Farming - xoft - 05-31-2012

I was thinking that for melons and pumpkins would be nice if it took one bonemeal to grow the stem fully and then one click to grow the produce. So for 2 bonemeals you could get a melon (unless there was something obstructing the growth, of course).
Again, this would be a difference from the vanilla server, the question is, do we want to go that way? It might be better to make this into an optional plugin instead.

So, the full list for bonemeal-able stuff:
- wheat
- pumpkins (1 bonemeal for stem, then one bonemeal per pumpkin)
- melons (ditto)
- saplings
- sugarcane (1 bonemeal = grow 1 block or grow to full height?)
- cactus (1 bonemeal = grow 1 block or grow to full height?)
- mushrooms (produces giant mushrooms)
- grass (produces tall grass, flowers)
- nether wart

(I will edit this list if I forgot anything)

One more proposal: bonemeal-ing dirt could change it to grass if there's enough light and there's a non-solid block on top of it. How about it? Smile


RE: Farming - Taugeshtu - 05-31-2012

Quote:It might be better to make this into an optional plugin instead.
True. I can write such a plugin (pretty easy), but I need some way to force melon/pumpkin to grow the produce (maybe exported to lua function?)))
Quote:bonemeal-ing dirt could change it to grass if there's enough light and there's a non-solid block on top of it. How about it?
Nice. But it should be a plugin tooBig Grin
Quote:- sugarcane (1 bonemeal = grow 1 block or grow to full height?)
- cactus (1 bonemeal = grow 1 block or grow to full height?)
Full, I think. Bonemeal causes sapling to form a proper tree - so no logical obstacles there.


RE: Farming - xoft - 05-31-2012

You have the cWord:GetBlock() and cWorld:SetBlock() functions, that's all you need Wink

Yeah, I know, the melon and pumpkin code is rather large. I'll see about exporting that somehow. I think a generic cWorld::GrowFromBlock(BlockX, BlockY, BlockZ) would do the trick Smile So the server would know how to grow stuff, but deliberately not use that, only allow plugins to call it.

What if you have one sugarcane block on top of another one, and bonemeal one of them? What if the bottom one? Although, the same question arises with "grow 1 block".


RE: Farming - Taugeshtu - 05-31-2012

Quote:What if you have one sugarcane block on top of another one, and bonemeal one of them? What if the bottom one?
I'm pretty sure sugarcane code count overall sugarcane length in blocks (in order not to grow it to the sky... wait! sounds like a nice idea!Big Grin)
And bonemeal-ing any block of sugarcane of non-maximum size should make it grow to full length.
You get block you right-clicked with bonemeal on, right? You can then check blocks at the bottom till you find ground and you can check few blocks up to calculate sugarcane length.... Meh, you know it better than meBig Grin

Quote:You have the cWord:GetBlock() and cWorld:SetBlock() functions, that's all you need
Thing is: I don't want to replicate pumpkin code in plugin... No point, I think.
Quote:I think a generic cWorld::GrowFromBlock(BlockX, BlockY, BlockZ)
Nice, I like it. It will allow several tricks, including insta-grow magic and stuff)


RE: Farming - xoft - 05-31-2012

Insta-grow is (kinda) already done in the sTicks plugin - simply by forcing chunk's blocktick to update the block, it results in growth on that block.


RE: Farming - NiLSPACE - 05-31-2012

when i place pumpkin seeds and let them grow with the sTick plugin the "Seed" wil be replaced for the pumpkin.
and there is not yet an legit way to get seeds (wheat, pumpkin, melon) or sugar cane.


RE: Farming - xoft - 05-31-2012

weird, I specifically tried pumpkins and they grew okay. I'll retry, more carefully.


RE: Farming - NiLSPACE - 06-01-2012

or you try to connect to my serverTongue you still have my IP??


RE: Farming - xoft - 06-01-2012

Found the problem, fixed in Rev 530.

That one was tricky. I knew where a part of the problem was, but I couldn't, for the life of me, figure out how it could actually overwrite the stem. The only possible code path I found was that no melon got generated. But finally it dawned on me, we were having a buffer overflow at the very same time! Yuck!