Skip to content

Commit

Permalink
Fire InteractItemEvent.Secondary even when cooldown is active (#3740)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yeregorix authored Aug 16, 2022
1 parent cdf7123 commit be368a0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ public abstract class ServerPlayerGameModeMixin_Tracker {

@Inject(method = "useItem", cancellable = true,
at = @At(value = "INVOKE",
target = "Lnet/minecraft/world/item/ItemStack;getCount()I", ordinal = 0))
public void impl$callInteractItemSecondary(final ServerPlayer player, final Level p_187250_2_, final ItemStack stack, final InteractionHand hand,
target = "Lnet/minecraft/world/item/ItemCooldowns;isOnCooldown(Lnet/minecraft/world/item/Item;)Z"))
public void impl$callInteractItemSecondary(final ServerPlayer player, final Level level, final ItemStack stack, final InteractionHand hand,
final CallbackInfoReturnable<InteractionResult> cir
) {
final InteractItemEvent.Secondary event = SpongeCommonEventFactory.callInteractItemEventSecondary(player, stack, hand);
Expand Down

0 comments on commit be368a0

Please sign in to comment.