KubeJS

KubeJS

69M Downloads

Cancelled milking cow, give a ghost milk bucket

AriesStar1337 opened this issue ยท 2 comments

commented

Minecraft Version

1.19.2

KubeJS Version

1902.6.0-build.142

Rhino Version

1902.2.2-build.264

Architectury Version

6.5.69

Forge/Fabric Version

Forge 43.2.0

Describe your issue

Right click a cow with a bucket cause a milking sound effect and a ghost milk bucket
Code:

ItemEvents.entityInteracted((event) => {
	event.cancel()
})

Crash report/logs

No response

commented

Are you canceling it on the client as well? If something is canceled on the server but not on the client it can cause a desync in certain situations.

commented

Yeah, starting in 1.19, events are split between logical client and server as well, so you will need to resync the inventory or cancel the event on the client side as well. We're planning on adding startup events that fire for both logical client and server though.