Paper icon indicating copy to clipboard operation
Paper copied to clipboard

EntityLoadCrossbowEvent item consumption is backwards

Open deadbeef-enc0de opened this issue 9 months ago • 1 comments

Expected behavior

EntityLoadCrossbowEvent setConsumeItem values should work as follows true; consumes an item from the inventory false: does not consume item from the inventory

Observed/Actual behavior

EntityLoadCrossbowEvent item consumption is working the opposite

Steps/models to reproduce

@EventHandler
public void onLoadCrossbow(EntityLoadCrossbowEvent event) {
    event.setConsumeItem(false);
}

Plugin and Datapack List

This happens with no plugins installed

With a simple plugin with just the eventhandler above you can get the crossbow to comsume items

Paper version

[15:51:46 INFO]: This server is running Paper version git-Paper-34 (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: 544ce20)

Other

No response

deadbeef-enc0de avatar May 01 '24 19:05 deadbeef-enc0de

This seems to be yet another issue caused by mojang moving projectile logic to ProjectileWeaponItem. That area would probably need to be skimmed through since all of that seems rather flawed

notTamion avatar May 01 '24 20:05 notTamion