PaperSpigot-Parent/Spigot-Server-Patches/0045-Toggleable-player-crits-helps-mitigate-hacked-client.patch
Zach Brown 8022d678b3 Fix the repo's patches because I can't merge things today
Thanks to Byteflux for all the PRs you see below bringing 1.8 PaperSpigot that much closer to feature parity with it's 1.7 branch
2015-04-18 15:50:17 -05:00

39 lines
1.9 KiB
Diff

From 80e45c4e71cabb79b8452ffc301c4ffd1ebe23c4 Mon Sep 17 00:00:00 2001
From: Roman Alexander <romanalexander@users.noreply.github.com>
Date: Fri, 27 Mar 2015 00:52:24 -0400
Subject: [PATCH] Toggleable player crits, helps mitigate hacked clients.
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 4aa8096..ec69752 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -974,7 +974,7 @@ public abstract class EntityHuman extends EntityLiving {
}
if (f > 0.0F || f1 > 0.0F) {
- boolean flag = this.fallDistance > 0.0F && !this.onGround && !this.k_() && !this.V() && !this.hasEffect(MobEffectList.BLINDNESS) && this.vehicle == null && entity instanceof EntityLiving;
+ boolean flag = !world.paperSpigotConfig.disablePlayerCrits && this.fallDistance > 0.0F && !this.onGround && !this.k_() && !this.V() && !this.hasEffect(MobEffectList.BLINDNESS) && this.vehicle == null && entity instanceof EntityLiving; // PaperSpigot
if (flag && f > 0.0F) {
f *= 1.5F;
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 1ca8b0d..64f8630 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -182,9 +182,11 @@ public class PaperSpigotWorldConfig
}
public boolean boatsDropBoats;
+ public boolean disablePlayerCrits;
private void mechanicsChanges()
{
boatsDropBoats = getBoolean( "game-mechanics.boats-drop-boats", false );
+ disablePlayerCrits = getBoolean( "game-mechanics.disable-player-crits", false );
}
public boolean netherVoidTopDamage;
--
2.3.5