Update upstream

This commit is contained in:
Aikar 2016-03-28 20:26:11 -04:00
parent d52a49cfa1
commit 030de0f42a
9 changed files with 43 additions and 43 deletions

@ -1 +1 @@
Subproject commit fc9ee90fc543adbbe1641cc722b0b2d4b800f668
Subproject commit 1d9c5c628da5adcc73984901ad444ad322d140af

View file

@ -1,4 +1,4 @@
From 66aac33b3c5fdc29d155afdca2a5cdfaaa492ad4 Mon Sep 17 00:00:00 2001
From bb46ae1ec8983a4caad91253f7216514c901ee1b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 04:00:11 -0600
Subject: [PATCH] Timings v2
@ -528,7 +528,7 @@ index e6524e9..4193f20 100644
private static Map<String, Class<? extends TileEntity>> f = Maps.newHashMap();
private static Map<Class<? extends TileEntity>, String> g = Maps.newHashMap();
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 59b7dd2..6d5eb6a 100644
index 18993be..fab56f7 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -18,11 +18,11 @@ import com.google.common.collect.Maps;
@ -562,7 +562,7 @@ index 59b7dd2..6d5eb6a 100644
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
}
@@ -1369,6 +1369,7 @@ public abstract class World implements IBlockAccess {
@@ -1370,6 +1370,7 @@ public abstract class World implements IBlockAccess {
}
this.methodProfiler.c("remove");
@ -570,7 +570,7 @@ index 59b7dd2..6d5eb6a 100644
this.entityList.removeAll(this.f);
int j;
@@ -1389,6 +1390,7 @@ public abstract class World implements IBlockAccess {
@@ -1390,6 +1391,7 @@ public abstract class World implements IBlockAccess {
this.f.clear();
this.l();
@ -578,7 +578,7 @@ index 59b7dd2..6d5eb6a 100644
this.methodProfiler.c("regular");
CrashReportSystemDetails crashreportsystemdetails1;
@@ -1398,6 +1400,7 @@ public abstract class World implements IBlockAccess {
@@ -1399,6 +1401,7 @@ public abstract class World implements IBlockAccess {
timings.entityTick.startTiming(); // Spigot
guardEntityList = true; // Spigot
// CraftBukkit start - Use field for loop variable
@ -586,7 +586,7 @@ index 59b7dd2..6d5eb6a 100644
int entitiesThisCycle = 0;
if (tickPosition < 0) tickPosition = 0;
for (entityLimiter.initTick();
@@ -1419,10 +1422,11 @@ public abstract class World implements IBlockAccess {
@@ -1420,10 +1423,11 @@ public abstract class World implements IBlockAccess {
this.methodProfiler.a("tick");
if (!entity.dead && !(entity instanceof EntityPlayer)) {
try {
@ -600,7 +600,7 @@ index 59b7dd2..6d5eb6a 100644
crashreport1 = CrashReport.a(throwable1, "Ticking entity");
crashreportsystemdetails1 = crashreport1.a("Entity being ticked");
entity.appendEntityCrashDetails(crashreportsystemdetails1);
@@ -1554,6 +1558,7 @@ public abstract class World implements IBlockAccess {
@@ -1555,6 +1559,7 @@ public abstract class World implements IBlockAccess {
}
timings.tileEntityPending.stopTiming(); // Spigot
@ -608,7 +608,7 @@ index 59b7dd2..6d5eb6a 100644
this.methodProfiler.b();
this.methodProfiler.b();
}
@@ -1599,7 +1604,6 @@ public abstract class World implements IBlockAccess {
@@ -1600,7 +1605,6 @@ public abstract class World implements IBlockAccess {
entity.ticksLived++;
entity.inactiveTick();
} else {
@ -616,7 +616,7 @@ index 59b7dd2..6d5eb6a 100644
// CraftBukkit end
entity.M = entity.locX;
entity.N = entity.locY;
@@ -1608,6 +1612,7 @@ public abstract class World implements IBlockAccess {
@@ -1609,6 +1613,7 @@ public abstract class World implements IBlockAccess {
entity.lastPitch = entity.pitch;
if (flag && entity.aa) {
++entity.ticksLived;
@ -624,7 +624,7 @@ index 59b7dd2..6d5eb6a 100644
if (entity.isPassenger()) {
entity.aw();
} else {
@@ -1666,8 +1671,6 @@ public abstract class World implements IBlockAccess {
@@ -1667,8 +1672,6 @@ public abstract class World implements IBlockAccess {
}
}
}

View file

@ -1,4 +1,4 @@
From da7727914a2119d762d3b77b90f6e323163a531a Mon Sep 17 00:00:00 2001
From fc3db01074dfbe35fe255ebeaffe22a51224f764 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 21:20:21 -0600
Subject: [PATCH] Vanished players don't have rights
@ -75,10 +75,10 @@ index 300573a..6eeb03b 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 6d5eb6a..72dfc66 100644
index fab56f7..b26516a 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1684,6 +1684,14 @@ public abstract class World implements IBlockAccess {
@@ -1685,6 +1685,14 @@ public abstract class World implements IBlockAccess {
for (int i = 0; i < list.size(); ++i) {
Entity entity1 = (Entity) list.get(i);

View file

@ -1,11 +1,11 @@
From e8ded4caea493383b25a22cc8de1d8f59ce2533b Mon Sep 17 00:00:00 2001
From c01e23fb95c1ae0579eeb1a8082110b891210ad6 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Tue, 1 Mar 2016 14:47:52 -0600
Subject: [PATCH] Player affects spawning API
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 83f84ea..344ff69 100644
index 8e143f7..b6aa51e 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -64,6 +64,7 @@ public abstract class EntityHuman extends EntityLiving {
@ -65,10 +65,10 @@ index 9e19dfd..b724586 100644
biomebase_biomemeta = worldserver.a(enumcreaturetype, (BlockPosition) blockposition_mutableblockposition);
if (biomebase_biomemeta == null) {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 17c0b00..9124558 100644
index 5524e43..0460dc5 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -2688,6 +2688,53 @@ public abstract class World implements IBlockAccess {
@@ -2689,6 +2689,53 @@ public abstract class World implements IBlockAccess {
return i;
}
@ -123,7 +123,7 @@ index 17c0b00..9124558 100644
return this.a(entity.locX, entity.locY, entity.locZ, d0, false);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index c9c30eb..56bdaa1 100644
index dfa5962..3203458 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1405,6 +1405,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

View file

@ -1,4 +1,4 @@
From 4ec4d6943f6c93abbc66d389945bf4d9e96de6bc Mon Sep 17 00:00:00 2001
From d246c4ba59d08a38f15f8b13d1146971b8585848 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 1 Mar 2016 23:52:34 -0600
Subject: [PATCH] Prevent tile entity and entity crashes
@ -23,10 +23,10 @@ index 4193f20..f579d28 100644
public String a() throws Exception {
int i = Block.getId(TileEntity.this.world.getType(TileEntity.this.position).getBlock());
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 18d0bd8..f564b1a 100644
index 87236e8..f8746b3 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1434,10 +1434,12 @@ public abstract class World implements IBlockAccess {
@@ -1435,10 +1435,12 @@ public abstract class World implements IBlockAccess {
entity.tickTimer.stopTiming(); // Paper
} catch (Throwable throwable1) {
entity.tickTimer.stopTiming();
@ -43,7 +43,7 @@ index 18d0bd8..f564b1a 100644
}
}
@@ -1499,10 +1501,13 @@ public abstract class World implements IBlockAccess {
@@ -1500,10 +1502,13 @@ public abstract class World implements IBlockAccess {
((ITickable) tileentity).c();
this.methodProfiler.b();
} catch (Throwable throwable2) {
@ -62,5 +62,5 @@ index 18d0bd8..f564b1a 100644
// Spigot start
finally {
--
2.7.1.windows.2
2.7.4

View file

@ -1,14 +1,14 @@
From eb7ba9fcaad158852e146e383bf65e7410e63059 Mon Sep 17 00:00:00 2001
From 3056085331bf477adf8ae5e6ae6065562f528115 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Wed, 2 Mar 2016 23:45:17 -0600
Subject: [PATCH] Disable spigot tick limiters
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index a4b4d1e..18e49b5 100644
index c0f0b83..bffa3ac 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1421,10 +1421,10 @@ public abstract class World implements IBlockAccess {
@@ -1422,10 +1422,10 @@ public abstract class World implements IBlockAccess {
// CraftBukkit start - Use field for loop variable
co.aikar.timings.TimingHistory.entityTicks += this.entityList.size(); // Paper
int entitiesThisCycle = 0;
@ -23,7 +23,7 @@ index a4b4d1e..18e49b5 100644
tickPosition = (tickPosition < entityList.size()) ? tickPosition : 0;
entity = (Entity) this.entityList.get(this.tickPosition);
// CraftBukkit end
@@ -1489,9 +1489,7 @@ public abstract class World implements IBlockAccess {
@@ -1490,9 +1490,7 @@ public abstract class World implements IBlockAccess {
// Spigot start
// Iterator iterator = this.tileEntityListTick.iterator();
int tilesThisCycle = 0;
@ -35,5 +35,5 @@ index a4b4d1e..18e49b5 100644
TileEntity tileentity = (TileEntity) this.tileEntityListTick.get(tileTickPosition);
// Spigot start
--
2.7.1.windows.2
2.7.4

View file

@ -1,11 +1,11 @@
From e8e6bdea274b31e55511c5f353c9e3e88c0493a9 Mon Sep 17 00:00:00 2001
From 991755c40444df0dfd334947be578d6591f7dbcf Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 02:39:54 -0600
Subject: [PATCH] Change implementation of (tile)entity removal list
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 18e49b5..cf5f4f5 100644
index bffa3ac..ad5c96c 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -30,6 +30,11 @@ import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
@ -34,7 +34,7 @@ index 18e49b5..cf5f4f5 100644
public final List<EntityHuman> players = Lists.newArrayList();
public final List<Entity> j = Lists.newArrayList();
protected final IntHashMap<Entity> entitiesById = new IntHashMap();
@@ -1393,19 +1398,20 @@ public abstract class World implements IBlockAccess {
@@ -1394,19 +1399,20 @@ public abstract class World implements IBlockAccess {
int j;
@ -64,5 +64,5 @@ index 18e49b5..cf5f4f5 100644
this.f.clear();
this.l();
--
2.7.1.windows.2
2.7.4

View file

@ -1,4 +1,4 @@
From 6e2fcdb3c97946c75a14eb3d1ce5fbba80959837 Mon Sep 17 00:00:00 2001
From eb47524cfc19add78d89e412092c2adf158cb4fc Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 03:15:41 -0600
Subject: [PATCH] Add exception reporting event
@ -292,7 +292,7 @@ index 320e52e..d40257f 100644
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index cf5f4f5..d3621ec 100644
index ad5c96c..ad7a81c 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1,5 +1,7 @@
@ -303,7 +303,7 @@ index cf5f4f5..d3621ec 100644
import com.google.common.base.Function;
import com.google.common.base.Objects;
import com.google.common.base.Predicate;
@@ -1453,8 +1455,10 @@ public abstract class World implements IBlockAccess {
@@ -1454,8 +1456,10 @@ public abstract class World implements IBlockAccess {
} catch (Throwable throwable1) {
entity.tickTimer.stopTiming();
// Paper start - Prevent tile entity and entity crashes
@ -315,7 +315,7 @@ index cf5f4f5..d3621ec 100644
entity.dead = true;
continue;
// Paper end
@@ -1518,8 +1522,10 @@ public abstract class World implements IBlockAccess {
@@ -1519,8 +1523,10 @@ public abstract class World implements IBlockAccess {
this.methodProfiler.b();
} catch (Throwable throwable2) {
// Paper start - Prevent tile entity and entity crashes
@ -372,5 +372,5 @@ index 44e057c..cf0bd0c 100644
// (async tasks must live with race-conditions if they attempt to cancel between these few lines of code)
}
--
2.7.1.windows.2
2.7.4

View file

@ -1,4 +1,4 @@
From d99823c93acbfbff23f1e9057d12ef1ea40fd783 Mon Sep 17 00:00:00 2001
From 495070b053f203978f7ec264ae448b0f869262af Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 22 Mar 2016 23:41:34 -0400
Subject: [PATCH] Optimize isValidLocation for inlining
@ -22,7 +22,7 @@ index f0908a2..d1688e1 100644
public BaseBlockPosition(int i, int j, int k) {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index a78b029..e5ea99c 100644
index 825e931..b5406e9 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -284,8 +284,8 @@ public abstract class World implements IBlockAccess {
@ -99,7 +99,7 @@ index a78b029..e5ea99c 100644
return Blocks.AIR.getBlockData();
} else {
Chunk chunk = this.getChunkAtWorldCoords(blockposition);
@@ -2062,7 +2062,7 @@ public abstract class World implements IBlockAccess {
@@ -2063,7 +2063,7 @@ public abstract class World implements IBlockAccess {
public Map<BlockPosition, TileEntity> capturedTileEntities = Maps.newHashMap();
public TileEntity getTileEntity(BlockPosition blockposition) {
@ -108,7 +108,7 @@ index a78b029..e5ea99c 100644
return null;
} else {
// CraftBukkit start
@@ -2165,7 +2165,7 @@ public abstract class World implements IBlockAccess {
@@ -2166,7 +2166,7 @@ public abstract class World implements IBlockAccess {
}
public boolean d(BlockPosition blockposition, boolean flag) {
@ -118,5 +118,5 @@ index a78b029..e5ea99c 100644
} else {
Chunk chunk = this.chunkProvider.getLoadedChunkAt(blockposition.getX() >> 4, blockposition.getZ() >> 4);
--
2.7.1.windows.2
2.7.4