Skript icon indicating copy to clipboard operation
Skript copied to clipboard

When you right click under a block with a water bucket, the breaking event is triggered.

Open ashtre1 opened this issue 2 years ago • 7 comments

Skript/Server Version

server version: 1.20.2
skript version: 2.7.3

Bug Description

When you right click under a block with a water bucket, the breaking event is triggered. (You should spam with bucket to under the block) image

Expected Behavior

Will not be triggered

Steps to Reproduce

on break of any ore: if getGörev(player) is 2: if tool of the player is not enchanted with silk touch: send "mined" to event-player

They complete the breaking event without breaking the blocks and complete the tasks.

Errors or Screenshots

image

Other

No response

Agreement

  • [X] I have read the guidelines above and affirm I am following them with this report.

ashtre1 avatar Dec 30 '23 09:12 ashtre1

Cannot replicate on 1.20.2, 2.7.3 image

Can you please provide the full output of /sk info?

sovdeeth avatar Dec 30 '23 09:12 sovdeeth

image

ashtre1 avatar Dec 30 '23 09:12 ashtre1

Do you mind trying without addons, and if possible, providing a video of it occurring?

sovdeeth avatar Dec 30 '23 09:12 sovdeeth

https://youtu.be/SSOPyB7TNZ0

ashtre1 avatar Dec 30 '23 09:12 ashtre1

I used 2.7.2 here, but i have same problem in 2.7.3.

ashtre1 avatar Dec 30 '23 09:12 ashtre1

Ah ok I can replicate it. It seems dependent on the angle and position you place the bucket at.

sovdeeth avatar Dec 30 '23 09:12 sovdeeth

Lines 114-119 of EvtBlock seem to be incorrect on both 1.20.2 and 1.19.4 paper. More testing should be done on prior versions, but it seems like this code is both unnecessary and causing incorrect results:

else if (e instanceof PlayerBucketFillEvent) {
	PlayerBucketFillEvent playerBucketFillEvent = ((PlayerBucketFillEvent) e);
	Block relative = playerBucketFillEvent.getBlockClicked().getRelative(playerBucketFillEvent.getBlockFace());
	item = new ItemType(relative);
	blockData = relative.getBlockData();
}

A simple solution would be to use playerBucketFillEvent.getBlockClicked() without the getRelative.

sovdeeth avatar Dec 30 '23 09:12 sovdeeth