int id = action.getInput().getId();
if (id != -1) {
MouseInput button = MouseInput.find(action.getInput().getType(), action.getInput().getId());
boolean consumed = sendMouseEvent(button, action.getState().isDown(), action.getMousePosition(), delta);
BindableButtonImpl bind = mouseButtonBinds.get(button);
if (bind != null) {
bind.updateBindState(
action.getInput(),
action.getState().isDown(),
delta,
getInputEntities(),
targetSystem.getTarget(),
targetSystem.getTargetBlockPosition(),
targetSystem.getHitPosition(),
targetSystem.getHitNormal(),
consumed
);
}
}
break;
case MOUSE_WHEEL:
int dir = action.getInput().getId();
if (dir != 0 && action.getTurns() != 0) {
boolean consumed = sendMouseWheelEvent(action.getMousePosition(), dir * action.getTurns(), delta);
BindableButtonImpl bind = (dir == 1) ? mouseWheelUpBind : mouseWheelDownBind;
if (bind != null) {
for (int i = 0; i < action.getTurns(); ++i) {
bind.updateBindState(
action.getInput(),
true,
delta,
getInputEntities(),
targetSystem.getTarget(),
targetSystem.getTargetBlockPosition(),
targetSystem.getHitPosition(),
targetSystem.getHitNormal(),
consumed
);
bind.updateBindState(
action.getInput(),
false,
delta,
getInputEntities(),
targetSystem.getTarget(),