Infinite milking of cows
Description of Bug
When you turn on /co inspect you can milk cows indefinitely.
Steps to Reproduce
Just turn on /co inspect, create a task with milking cows and try to milk. This way it accrues your progress without milking.
Environment
- Minecraft version: 1.20.4
- Server software: PufferFish
- Quests version: 3.15.2
Agreements
- [X] I am running the latest version of Quests
- [X] I am certain this issue is unique and a similar issue is not currently open
- [X] I am using a version of Minecraft which is supported by Quests
Other
https://youtu.be/7Rnm0afRiDM
We already ignore cancelled event calls on MONITOR priority so there isn't (at least there shouldn't be - I will test it though) really much we can do.
One more question - do you use the proper task type? milking is the one meant to be used in such a task.
tasks: milk: type: "milking" amount: 300
I guess the issue is that CoreProtect cancels PlayerBucketFill, however they do not cancel PlayerInteractEntity. https://github.com/PlayPro/CoreProtect/blob/edadebf8c24360cd88689ddbc2e56f1bb3533d53/src/main/java/net/coreprotect/listener/player/PlayerBucketFillListener.java#L19-L45
Quests utilize PlayerInteractEntity to provide more configuration options though.
If you don't care about mob spawn reason or whether it is a goat or a cow then you can set it like this:
tasks:
milk:
type: bucketfill
amount: 300
bucket: MILK_BUCKET
exact-match: false
It should fix your issue (and it won't reset the progress as progress is stored by task name, which is milk) - however keep in mind that goats can still be used in both task types (unless you specified they can't in the milking one).
yeah works fine, thank you