Quests icon indicating copy to clipboard operation
Quests copied to clipboard

Infinite milking of cows

Open Aides123 opened this issue 1 year ago • 5 comments

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

Aides123 avatar Aug 29 '24 11:08 Aides123

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. image

Krakenied avatar Aug 29 '24 12:08 Krakenied

One more question - do you use the proper task type? milking is the one meant to be used in such a task.

Krakenied avatar Aug 29 '24 12:08 Krakenied

tasks: milk: type: "milking" amount: 300

Aides123 avatar Aug 29 '24 12:08 Aides123

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).

Krakenied avatar Aug 29 '24 12:08 Krakenied

yeah works fine, thank you

Aides123 avatar Aug 29 '24 13:08 Aides123