make midclick not spam events
This commit is contained in:
parent
535b3a06a4
commit
605fe8deeb
1 changed files with 7 additions and 1 deletions
|
@ -99,8 +99,13 @@ public class MidClick extends Feature {
|
|||
doCheck();
|
||||
}
|
||||
|
||||
boolean down = false;
|
||||
private void doCheck() {
|
||||
if(Mouse.isButtonDown(2)) {
|
||||
if(down)
|
||||
return;
|
||||
down = true;
|
||||
|
||||
RayTraceResult hover = mc.objectMouseOver;
|
||||
if(hover.entityHit != null) {
|
||||
if(hover.entityHit instanceof EntityPlayer) {
|
||||
|
@ -113,7 +118,8 @@ public class MidClick extends Feature {
|
|||
}
|
||||
}
|
||||
blockAction.action.accept(hover.getBlockPos());
|
||||
}
|
||||
|
||||
} else down = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue