Skip to content

Commit

Permalink
disallow any item interacting in bat mode or dbno state
Browse files Browse the repository at this point in the history
close #1304
  • Loading branch information
Cheaterpaul committed Mar 17, 2024
1 parent e81668b commit f49d5cc
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,9 @@ public void onItemRightClick(PlayerInteractEvent.@NotNull RightClickItem event)
event.setCanceled(true);
}

if ((event.getItemStack().getItem() instanceof ThrowablePotionItem || event.getItemStack().getItem() instanceof CrossbowItem)) {
if (VampirismPlayerAttributes.get(event.getEntity()).getVampSpecial().isCannotInteract()) {
event.setCancellationResult(InteractionResult.sidedSuccess(event.getLevel().isClientSide()));
event.setCanceled(true);
}
if (VampirismPlayerAttributes.get(event.getEntity()).getVampSpecial().isCannotInteract()) {
event.setCancellationResult(InteractionResult.sidedSuccess(event.getLevel().isClientSide()));
event.setCanceled(true);
}
}

Expand Down

0 comments on commit f49d5cc

Please sign in to comment.