mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-03 14:38:46 +00:00
Fixed falses with sweet berry bushes
This commit is contained in:
1 parent
8de7ae1c59
commit
09c42905d0
2 files changed
+5
-3
No files matched your search
@@ -221,7 +221,8 @@ public class Backend {
|
|||||||
public CheckResult checkSpider(Player player, double y) {
|
public CheckResult checkSpider(Player player, double y) {
|
||||||
if (y <= 0.11761 && y >= 0.11759 && !Utilities.isClimbableBlock(player.getLocation().getBlock())
|
if (y <= 0.11761 && y >= 0.11759 && !Utilities.isClimbableBlock(player.getLocation().getBlock())
|
||||||
&& !Utilities.isClimbableBlock(player.getEyeLocation().getBlock())
|
&& !Utilities.isClimbableBlock(player.getEyeLocation().getBlock())
|
||||||
&& !Utilities.isClimbableBlock(player.getLocation().clone().add(0, -0.98, 0).getBlock())) {
|
&& !Utilities.isClimbableBlock(player.getLocation().clone().add(0, -0.98, 0).getBlock())
|
||||||
|
&& !Utilities.isNearClimbable(player)) {
|
||||||
return new CheckResult(CheckResult.Result.FAILED,
|
return new CheckResult(CheckResult.Result.FAILED,
|
||||||
"tried to climb a non-climbable block (" + player.getLocation().getBlock().getType() + ")");
|
"tried to climb a non-climbable block (" + player.getLocation().getBlock().getType() + ")");
|
||||||
} else {
|
} else {
|
||||||
@@ -235,7 +236,7 @@ public class Backend {
|
|||||||
&& !isMovingExempt(player) && !justPlaced(player) && !Utilities.isNearWater(player)
|
&& !isMovingExempt(player) && !justPlaced(player) && !Utilities.isNearWater(player)
|
||||||
&& !Utilities.isInWeb(player) && !player.getLocation().getBlock().getType().name().endsWith("TRAPDOOR")
|
&& !Utilities.isInWeb(player) && !player.getLocation().getBlock().getType().name().endsWith("TRAPDOOR")
|
||||||
&& !VersionUtil.isSlowFalling(player) && !Utilities
|
&& !VersionUtil.isSlowFalling(player) && !Utilities
|
||||||
.isNearShulkerBox(player.getLocation().getBlock().getRelative(BlockFace.DOWN).getLocation())) {
|
.isNearShulkerBox(player.getLocation().getBlock().getRelative(BlockFace.DOWN).getLocation()) && !Utilities.isNearClimbable(player)) {
|
||||||
if (player.getFallDistance() == 0) {
|
if (player.getFallDistance() == 0) {
|
||||||
if (nofallViolation.get(uuid) == null) {
|
if (nofallViolation.get(uuid) == null) {
|
||||||
nofallViolation.put(uuid, 1);
|
nofallViolation.put(uuid, 1);
|
||||||
|
|||||||
@@ -529,7 +529,7 @@ public final class Utilities {
|
|||||||
* @return true if web
|
* @return true if web
|
||||||
*/
|
*/
|
||||||
public static boolean isWeb(Block block) {
|
public static boolean isWeb(Block block) {
|
||||||
return block.getType() == XMaterial.COBWEB.parseMaterial();
|
return block.getType() == COB_WEB;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1016,6 +1016,7 @@ public final class Utilities {
|
|||||||
if (VersionUtil.isOfVersion("v1_14") || VersionUtil.isOfVersion("v1_15")
|
if (VersionUtil.isOfVersion("v1_14") || VersionUtil.isOfVersion("v1_15")
|
||||||
|| VersionUtil.isOfVersion("v1_16")) {
|
|| VersionUtil.isOfVersion("v1_16")) {
|
||||||
CLIMBABLE.add(Material.SCAFFOLDING);
|
CLIMBABLE.add(Material.SCAFFOLDING);
|
||||||
|
CLIMBABLE.add(Material.SWEET_BERRY_BUSH);
|
||||||
}
|
}
|
||||||
// End 1.14 objects
|
// End 1.14 objects
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user