Glowkit-Legacy icon indicating copy to clipboard operation
Glowkit-Legacy copied to clipboard

No way to tell which plant grew a pumpkin/melon

Open gdude2002 opened this issue 9 years ago • 6 comments

Since the actual Bukkit API isn't being worked on, thought I might as well see if we can get this into Glowkit at some point.

There is an event to tell when a plant block grows - EG, a pumpkin or a melon - But that event doesn't have a way to tell what plant the block grew from.

Even worse, if I'm looking for the plant that grew a pumpkin, I can't even iterate the blocks around it to find the attached plant.

gdude2002 avatar Mar 17 '15 10:03 gdude2002

This requires BlockGrowEvent to be implemented in Glowstone first (See https://github.com/GlowstoneMC/Glowstone/issues/28).

Related PRs: https://github.com/GlowstoneMC/Glowstone/pull/431 & https://github.com/GlowstoneMC/Glowstone/pull/432

Ribesg avatar Mar 17 '15 10:03 Ribesg

I remember looking into this myself and found that it is actually very difficult to determine. The server basically checks if there are valid conditions (fully grown stem, dirt block) and throws down the pumpkin if the random succeeds. Additionally, the stems "bending" are purely client side and follow a simple ruleset clearly shown in your graphic.

turt2live avatar Mar 17 '15 12:03 turt2live

Oh, they're actually entirely client-side? Well, that's even less useful, lol.

Yeah, I wanted to figure this out for a plugin, but I guess it's not going to be viable for a bit.

gdude2002 avatar Mar 17 '15 12:03 gdude2002

Yea, I wanted to do the same at some point as well. I don't think we can reliably forcefully implement this either...

For plugin purposes, assuming all stems are candidates is normally okay though, such as the case in regional protection plugins.

sent from mobile On Mar 17, 2015 6:53 AM, "Gareth Coles" [email protected] wrote:

Oh, they're actually entirely client-side? Well, that's even less useful, lol.

Yeah, I wanted to figure this out for a plugin https://github.com/TheArchives/ArchBlock, but I guess it's not going to be viable for a bit.

— Reply to this email directly or view it on GitHub https://github.com/GlowstoneMC/Glowkit/issues/67#issuecomment-82330284.

turt2live avatar Mar 17 '15 12:03 turt2live

It's a very specific protection where each block is owned by a player individually, so while it's possible to guess, it's not really sufficient unfortunately D:

gdude2002 avatar Mar 17 '15 12:03 gdude2002

I'd personally simply not allow the protections so close. Yes it is inconvenient, but it is better than guessing.

sent from mobile On Mar 17, 2015 6:59 AM, "Gareth Coles" [email protected] wrote:

It's a very specific protection where each block is owned by a player individually, so while it's possible to guess, it's not really sufficient unfortunately D:

— Reply to this email directly or view it on GitHub https://github.com/GlowstoneMC/Glowkit/issues/67#issuecomment-82332098.

turt2live avatar Mar 17 '15 13:03 turt2live