Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On bottle fill #1070

Open
Ydda opened this issue Jan 25, 2018 · 6 comments
Open

On bottle fill #1070

Ydda opened this issue Jan 25, 2018 · 6 comments
Labels
enhancement Feature request, an issue about something that could be improved, or a PR improving something. good first issue An issue that would be good for a first-time contributor to make a PR for priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements).

Comments

@Ydda
Copy link

Ydda commented Jan 25, 2018

It would be great to have an event for filling a bottle, similar to 'on bucket fill'.

Filling of a bottle cannot really be handled by using 'on right click' as right clicking water does not register and it can't be handled by using 'on break of water' since filling a bottle does not actually change the water into air.

I hope that I'm not missing anything obvious.

@bensku
Copy link
Member

bensku commented Jan 25, 2018

Sounds like a bug with right click event.

Edit: Ooops, we responded at same time

@TheBentoBox
Copy link
Member

I hope that I'm not missing anything obvious.

Well, I guess the obvious thing is that there isn't a Spigot bottle fill event as far as I'm aware, meaning there is no event we can listen to for this. I'm not gonna close this immediately in case someone else can correct me on that but I'm pretty sure we'd have to implement it in the same janky way you'd have to, which means you should probably just do it yourself.

And on that note, you can just use target block instead of clicked block. e.g.

on right click:
    player's tool is glass bottle
    player's target block is water block
    distance between player and player's target block <= 5
    <event>

Of course this would need some tweaking, mainly with the distance check since I'm sure that's not exact, but you get the idea. Could also add a wait a tick then check if their tool is a filled water bottle to help make it more foolproof.

@bensku bensku added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Jan 25, 2018
@TheBentoBox
Copy link
Member

Also I don't believe this is a bug as water has never fired a click event since the player can't actually interact with or target it; I don't think the client event communicates to the server if it clicks on water with an open hand (unless it clicks through the water to a block behind it, of course). Needs more testing to verify but I believe that was always the case and that it's meant to be that way.

@Ydda
Copy link
Author

Ydda commented Jan 25, 2018

I don't believe it is a bug either. I was thinking more in terms of adding a on bottle fill feature, since I am having difficulty cancelling the filling of a bottle.

@bensku
Copy link
Member

bensku commented Jan 25, 2018

Well, you do click on water... Not a bug, but maybe an enhancement?

@bensku bensku added enhancement Feature request, an issue about something that could be improved, or a PR improving something. and removed bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. labels Jan 25, 2018
@supertassu
Copy link
Contributor

Could also add a wait a tick then check if their tool is a filled water bottle to help make it more foolproof.

This would break if you had more than 1 bottle in the stack.

@Snow-Pyon Snow-Pyon added the priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements). label Feb 13, 2018
@TheLimeGlass TheLimeGlass added the good first issue An issue that would be good for a first-time contributor to make a PR for label Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request, an issue about something that could be improved, or a PR improving something. good first issue An issue that would be good for a first-time contributor to make a PR for priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements).
Projects
None yet
Development

No branches or pull requests

6 participants