summaryrefslogtreecommitdiffstats
path: root/nms-patches/Entity.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/Entity.patch')
-rw-r--r--nms-patches/Entity.patch27
1 files changed, 19 insertions, 8 deletions
diff --git a/nms-patches/Entity.patch b/nms-patches/Entity.patch
index 4115d5bc..79aa39c0 100644
--- a/nms-patches/Entity.patch
+++ b/nms-patches/Entity.patch
@@ -478,7 +478,7 @@
}
}
-@@ -1867,19 +2161,67 @@
+@@ -1867,19 +2161,70 @@
if (!this.world.isClientSide && !this.dead) {
this.world.methodProfiler.a("changeDimension");
MinecraftServer minecraftserver = this.B_();
@@ -522,7 +522,10 @@
+ return null;
+ }
+ exit = event.useTravelAgent() ? event.getPortalTravelAgent().findOrCreate(event.getTo()) : event.getTo();
-+ return this.teleportTo(exit, true);
++ // Need to make sure the profiler state is reset afterwards (but we still want to time the call)
++ Entity entity = this.teleportTo(exit, true);
++ this.world.methodProfiler.b();
++ return entity;
+ }
+ return null;
+ }
@@ -549,7 +552,7 @@
BlockPosition blockposition;
if (i == 1) {
-@@ -1908,12 +2250,18 @@
+@@ -1908,12 +2253,18 @@
blockposition = new BlockPosition(this);
}
@@ -569,7 +572,7 @@
if (j == 1 && i == 1) {
BlockPosition blockposition1 = worldserver1.q(worldserver1.getSpawn());
-@@ -1921,6 +2269,7 @@
+@@ -1921,6 +2272,7 @@
} else {
entity.setPositionRotation(blockposition, entity.yaw, entity.pitch);
}
@@ -577,7 +580,7 @@
boolean flag = entity.attachedToPlayer;
-@@ -1928,6 +2277,14 @@
+@@ -1928,13 +2280,21 @@
worldserver1.addEntity(entity);
entity.attachedToPlayer = flag;
worldserver1.entityJoinedWorld(entity, false);
@@ -592,7 +595,15 @@
}
this.dead = true;
-@@ -2038,6 +2395,11 @@
+ this.world.methodProfiler.b();
+ worldserver.m();
+ worldserver1.m();
+- this.world.methodProfiler.b();
++ // this.world.methodProfiler.b(); // CraftBukkit: Moved up to keep balanced
+ return entity;
+ } else {
+ return null;
+@@ -2038,6 +2398,11 @@
}
public void setCustomName(String s) {
@@ -604,7 +615,7 @@
this.datawatcher.set(Entity.aA, s);
}
-@@ -2095,7 +2457,26 @@
+@@ -2095,7 +2460,26 @@
}
public void a(AxisAlignedBB axisalignedbb) {
@@ -632,7 +643,7 @@
}
public float getHeadHeight() {
-@@ -2269,7 +2650,7 @@
+@@ -2269,7 +2653,7 @@
for (Iterator iterator = this.bx().iterator(); iterator.hasNext(); entity.a(oclass, set)) {
entity = (Entity) iterator.next();
if (oclass.isAssignableFrom(entity.getClass())) {