Add obfhelper to vanish patch

This commit is contained in:
Zach Brown 2016-12-16 23:02:33 -06:00
parent 5ff732798d
commit d850fc67db
No known key found for this signature in database
GPG key ID: CC9DA35FC5450B76

View file

@ -1,9 +1,22 @@
From 7e1c3a4f9105ef80733d87058a6989126b728438 Mon Sep 17 00:00:00 2001
From 569bc3d87de11c7857fc9cb17422b6699a76c5e2 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Fri, 16 Dec 2016 22:10:35 -0600
Subject: [PATCH] Vanished players don't have rights
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 79bbc8e..a6c806b 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -67,7 +67,7 @@ public abstract class Entity implements ICommandListener {
private static double f = 1.0D;
private static int entityCount;
private int id;
- public boolean i;
+ public boolean i; public boolean blocksEntitySpawning() { return i; } // Paper - OBFHELPER
public final List<Entity> passengers;
protected int j;
private Entity au;
diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java
index eb32871..a380e61 100644
--- a/src/main/java/net/minecraft/server/ItemBlock.java
@ -18,7 +31,7 @@ index eb32871..a380e61 100644
IBlockData iblockdata1 = this.a.getPlacedState(world, blockposition, enumdirection, f, f1, f2, i, entityhuman);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index cacdafe..fe8a1db 100644
index cacdafe..02f2bdc 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1820,6 +1820,33 @@ public abstract class World implements IBlockAccess {
@ -43,7 +56,7 @@ index cacdafe..fe8a1db 100644
+ }
+ }
+
+ if (!entity1.dead && entity1.i) {
+ if (!entity1.dead && entity1.blocksEntitySpawning()) {
+ return false;
+ }
+ }