Closed Caldron47 closed 4 months ago
When intercepting onSpawnProjectile event, the projectile doesn't get spawned but the number of item gets reduced.
mc.listen('onSpawnProjectile', function(shooter, type) { return false; });
Throw a trident/snowball/ender pearl/etc. It will be gone or reduced by 1
I believe the number of item should stay the same if the event is intercepted.
No response
Windows 10
1.20.81
0.12.3
0.7.12
I have fix it for trident. You can block snowball or something else's using by onUseItem from reducing them.
onUseItem
Describe the bug
When intercepting onSpawnProjectile event, the projectile doesn't get spawned but the number of item gets reduced.
To Reproduce
Throw a trident/snowball/ender pearl/etc. It will be gone or reduced by 1
Expected behavior
I believe the number of item should stay the same if the event is intercepted.
Screenshots
No response
Platform
Windows 10
BDS Version
1.20.81
LeviLamina Version
0.12.3
LegacyScriptEngine Version
0.7.12
Additional context
No response