GlowstoneMC / Glowkit-Legacy

A continuation of Bukkit for use with Glowstone
GNU General Public License v3.0
27 stars 12 forks source link

No way to tell which plant grew a pumpkin/melon #67

Open gdude2002 opened 9 years ago

gdude2002 commented 9 years ago

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.

Ribesg commented 9 years ago

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

turt2live commented 9 years ago

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.

gdude2002 commented 9 years ago

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.

turt2live commented 9 years ago

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" notifications@github.com 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.

gdude2002 commented 9 years ago

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:

turt2live commented 9 years ago

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" notifications@github.com 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.