mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 18:37:42 +01:00
Shift right click to use exp for mending
This commit is contained in:
committed by
granny
parent
8ce5cc6607
commit
eab7420f71
@@ -181,6 +181,14 @@
|
||||
// Paper start - optimise out extra getCubes
|
||||
private boolean hasNewCollision(final ServerLevel level, final Entity entity, final AABB oldBox, final AABB newBox) {
|
||||
final List<AABB> collisionsBB = new java.util.ArrayList<>();
|
||||
@@ -1994,6 +_,7 @@
|
||||
|
||||
boolean cancelled;
|
||||
if (hitResult == null || hitResult.getType() != HitResult.Type.BLOCK) {
|
||||
+ if (this.player.gameMode.shiftClickMended(itemInHand)) return; // Purpur - Shift right click to use exp for mending
|
||||
org.bukkit.event.player.PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(this.player, Action.RIGHT_CLICK_AIR, itemInHand, hand);
|
||||
cancelled = event.useItemInHand() == Event.Result.DENY;
|
||||
} else {
|
||||
@@ -2734,6 +_,7 @@
|
||||
|
||||
AABB boundingBox = target.getBoundingBox();
|
||||
|
||||
Reference in New Issue
Block a user