summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntityHuman.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/EntityHuman.patch')
-rw-r--r--nms-patches/EntityHuman.patch23
1 files changed, 11 insertions, 12 deletions
diff --git a/nms-patches/EntityHuman.patch b/nms-patches/EntityHuman.patch
index 06172c79..8d81262a 100644
--- a/nms-patches/EntityHuman.patch
+++ b/nms-patches/EntityHuman.patch
@@ -171,8 +171,8 @@
}
public boolean a(EntityHuman entityhuman) {
-- ScoreboardTeamBase scoreboardteambase = this.be();
-- ScoreboardTeamBase scoreboardteambase1 = entityhuman.be();
+- ScoreboardTeamBase scoreboardteambase = this.getScoreboardTeam();
+- ScoreboardTeamBase scoreboardteambase1 = entityhuman.getScoreboardTeam();
+ // CraftBukkit start - Change to check OTHER player's scoreboard team according to API
+ // To summarize this method's logic, it's "Can parameter hurt this"
+ org.bukkit.scoreboard.Team team;
@@ -330,7 +330,15 @@
return EntityHuman.EnumBedResult.NOT_POSSIBLE_HERE;
}
-@@ -1143,6 +1270,26 @@
+@@ -1136,13 +1263,33 @@
+ if (!this.u()) {
+ double d0 = 8.0D;
+ double d1 = 5.0D;
+- List list = this.world.a(EntityMonster.class, new AxisAlignedBB((double) blockposition.getX() - 8.0D, (double) blockposition.getY() - 5.0D, (double) blockposition.getZ() - 8.0D, (double) blockposition.getX() + 8.0D, (double) blockposition.getY() + 5.0D, (double) blockposition.getZ() + 8.0D), (Predicate) (new EntityHuman.c(this, null)));
++ List list = this.world.a(EntityMonster.class, new AxisAlignedBB((double) blockposition.getX() - 8.0D, (double) blockposition.getY() - 5.0D, (double) blockposition.getZ() - 8.0D, (double) blockposition.getX() + 8.0D, (double) blockposition.getY() + 5.0D, (double) blockposition.getZ() + 8.0D), (Predicate) (new EntityHuman.c(this))); // CraftBukkit - decompile error
+
+ if (!list.isEmpty()) {
+ return EntityHuman.EnumBedResult.NOT_SAFE;
}
}
}
@@ -442,12 +450,3 @@
}
public abstract boolean isSpectator();
-@@ -1856,7 +2032,7 @@
- return entitymonster.c(this.a);
- }
-
-- public boolean test(@Nullable Object object) {
-+ public boolean test(@Nullable EntityMonster object) { // CraftBukkit - decompile error
- return this.a((EntityMonster) object);
- }
-