-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added missing verbose for a few checks #1852
base: 2.0
Are you sure you want to change the base?
Conversation
src/main/java/ac/grim/grimac/checks/impl/scaffolding/AirLiquidPlace.java
Outdated
Show resolved
Hide resolved
if (flagAndAlert() && shouldModifyPackets() && shouldCancel()) { | ||
double distance = NumberConversions.square(blockPos.getX() - player.x) + NumberConversions.square(blockPos.getY() - player.y) + NumberConversions.square(blockPos.getZ() - player.z); | ||
|
||
if (flagAndAlert("against=" + placeAgainst + " type=" + place.getMaterial() + " dist=" + Math.sqrt(distance)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is distance included?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is distance included?
AirLiquidPlace has falsed in the past for me when the player places blocks particularly close to them.
Co-authored-by: ManInMyVan <[email protected]>
…Place.java Co-authored-by: ManInMyVan <[email protected]>
src/main/java/ac/grim/grimac/checks/impl/scaffolding/FarPlace.java
Outdated
Show resolved
Hide resolved
@@ -23,7 +24,10 @@ public void onBlockPlace(final BlockPlace place) { | |||
StateType placeAgainst = player.compensatedWorld.getStateTypeAt(blockPos.getX(), blockPos.getY(), blockPos.getZ()); | |||
|
|||
if (placeAgainst.isAir() || Materials.isNoPlaceLiquid(placeAgainst)) { // fail | |||
if (flagAndAlert() && shouldModifyPackets() && shouldCancel()) { | |||
double distance = NumberConversions.square(blockPos.getX() - player.x) + NumberConversions.square(blockPos.getY() - player.y) + NumberConversions.square(blockPos.getZ() - player.z); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really don't think distance is necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really don't think distance is necessary
just include it anyways 🙏
AirLiquidPlace has falsed in the past for me when the player places blocks particularly close to them.
@@ -39,7 +39,7 @@ public void onBlockPlace(final BlockPlace place) { | |||
maxReach += Math.hypot(threshold, threshold); | |||
|
|||
if (min > maxReach * maxReach) { // fail | |||
if (flagAndAlert() && shouldModifyPackets() && shouldCancel()) { | |||
if (flagAndAlert("dist=" + Math.sqrt(min)) && shouldModifyPackets() && shouldCancel()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The amount of decimals shown should be capped
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The amount of decimals shown should be capped
does grim have any easy util methods for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
String.format() is fine
Co-authored-by: ManInMyVan <[email protected]>
…java Co-authored-by: ManInMyVan <[email protected]>
No description provided.