Update CB/S

This commit is contained in:
Shane Freeder 2018-03-31 10:34:25 +01:00
parent 99efa104db
commit 1872a94c83
12 changed files with 28 additions and 28 deletions

View File

@ -22,7 +22,7 @@ index 94d011721..fcf99e668 100644
if (CraftEventFactory.callPigZapEvent(this, entitylightning, entitypigzombie).isCancelled()) {
return;
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
index 2795447b5..2c90112bc 100644
index fd3714e8e..cfc8d986f 100644
--- a/src/main/java/net/minecraft/server/EntityVillager.java
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
@@ -0,0 +0,0 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant {

View File

@ -102,7 +102,7 @@ index 0adfcaa8b..9e8f67ffd 100644
}
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index b937b6d0d..ef081a57f 100644
index 2391adac7..8b7eb47a2 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@ -161,7 +161,7 @@ index ab7933079..5c09c6ff7 100644
this.methodProfiler.a("tallying");
// Spigot start
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index ed5852ef4..efea22c92 100644
index 3fc242e4b..90f6e2e04 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -0,0 +0,0 @@ public abstract class PlayerList {

View File

@ -28,7 +28,7 @@ index 513c4b020..631aa6eb9 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
index 2c90112bc..22e3e05ac 100644
index cfc8d986f..d0183457e 100644
--- a/src/main/java/net/minecraft/server/EntityVillager.java
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
@@ -0,0 +0,0 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant {

View File

@ -75,7 +75,7 @@ index 549d4e89d..df11764e0 100644
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 9f678530f..ed5852ef4 100644
index e589cc827..3fc242e4b 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -0,0 +0,0 @@ public abstract class PlayerList {

View File

@ -7,7 +7,7 @@ Saving players async is extremely dangerous. This will force it to main
the same way we handle async chunk loads.
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index efea22c92..91136a8d8 100644
index 90f6e2e04..054483a73 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -0,0 +0,0 @@ public abstract class PlayerList {

View File

@ -129,7 +129,7 @@ index 6ac89d1e3..177d8582f 100644
// CraftBukkit end
Item item = itemstack.getItem();
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 3cd37f28d..ab3ab3889 100644
index 9e864864d..91e8c1d75 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
@ -156,7 +156,7 @@ index 0255986fd..e14f614f5 100644
this.die();
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
index 22e3e05ac..cad3465ed 100644
index d0183457e..812e88e58 100644
--- a/src/main/java/net/minecraft/server/EntityVillager.java
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
@@ -0,0 +0,0 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant {

View File

@ -32,7 +32,7 @@ operations are decoupled from the sync tasks queue.
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncScheduler.java
new file mode 100644
index 000000000..061c0ac52
index 000000000..eaf869287
--- /dev/null
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncScheduler.java
@@ -0,0 +0,0 @@
@ -160,11 +160,11 @@ index 000000000..061c0ac52
+ * @return
+ */
+ static boolean isValid(CraftTask runningTask) {
+ return runningTask.getPeriod() >= -1L;
+ return runningTask.getPeriod() >= CraftTask.NO_REPEATING;
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index e47f4cca2..ab423392a 100644
index cc4a256c2..5d0d26e1a 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -0,0 +0,0 @@ import java.util.concurrent.atomic.AtomicReference;
@ -219,11 +219,11 @@ index e47f4cca2..ab423392a 100644
+ // Paper end
+
public int scheduleSyncDelayedTask(final Plugin plugin, final Runnable task) {
return this.scheduleSyncDelayedTask(plugin, task, 0l);
return this.scheduleSyncDelayedTask(plugin, task, 0L);
}
@@ -0,0 +0,0 @@ public class CraftScheduler implements BukkitScheduler {
} else if (period < -1l) {
period = -1l;
} else if (period < CraftTask.NO_REPEATING) {
period = CraftTask.NO_REPEATING;
}
- return handle(new CraftAsyncTask(runners, plugin, runnable, nextId(), period), delay);
+ return handle(new CraftAsyncTask(this.asyncScheduler.runners, plugin, runnable, nextId(), period), delay); // Paper
@ -291,7 +291,7 @@ index e47f4cca2..ab423392a 100644
+ // Paper end
for (CraftTask task = head.getNext(); task != null; task = task.getNext()) {
if (task.getTaskId() == taskId) {
return task.getPeriod() >= -1l; // The task will run
return task.getPeriod() >= CraftTask.NO_REPEATING; // The task will run
@@ -0,0 +0,0 @@ public class CraftScheduler implements BukkitScheduler {
}

View File

@ -5,7 +5,7 @@ Subject: [PATCH] ProfileWhitelistVerifyEvent
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 563b0fb12..d28838627 100644
index 15af94b3f..1c0c1bd81 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -0,0 +0,0 @@ public abstract class PlayerList {

View File

@ -78,7 +78,7 @@ index 13c6b5ccd..908a5d273 100644
return this.serverThread;
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 91136a8d8..cc6a209ea 100644
index 054483a73..fbbb4e73c 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -0,0 +0,0 @@ public abstract class PlayerList {

View File

@ -1062,7 +1062,7 @@ index f74b06794..1fc632e0c 100644
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 6d27860cd..0fc37a095 100644
index d4acbed0c..1d9f3e3dd 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -0,0 +0,0 @@
@ -1674,7 +1674,7 @@ index 2d5dc2179..916781403 100644
public Player.Spigot spigot()
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index 23d7ce26f..d50bbd2a6 100644
index 71ee1fdd5..e149dbf62 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -0,0 +0,0 @@ import java.util.concurrent.atomic.AtomicInteger;
@ -1691,7 +1691,7 @@ index 23d7ce26f..d50bbd2a6 100644
return false;
- }});
+ }}){{this.timings=co.aikar.timings.MinecraftTimings.getCancelTasksTimer();}}; // Paper
handle(task, 0l);
handle(task, 0L);
for (CraftTask taskPending = head.getNext(); taskPending != null; taskPending = taskPending.getNext()) {
if (taskPending == task) {
@@ -0,0 +0,0 @@ public class CraftScheduler implements BukkitScheduler {
@ -1700,7 +1700,7 @@ index 23d7ce26f..d50bbd2a6 100644
}
- });
+ }){{this.timings=co.aikar.timings.MinecraftTimings.getCancelTasksTimer(plugin);}}; // Paper
handle(task, 0l);
handle(task, 0L);
for (CraftTask taskPending = head.getNext(); taskPending != null; taskPending = taskPending.getNext()) {
if (taskPending == task) {
@@ -0,0 +0,0 @@ public class CraftScheduler implements BukkitScheduler {
@ -1709,7 +1709,7 @@ index 23d7ce26f..d50bbd2a6 100644
}
- });
+ }){{this.timings=co.aikar.timings.MinecraftTimings.getCancelTasksTimer();}}; // Paper
handle(task, 0l);
handle(task, 0L);
for (CraftTask taskPending = head.getNext(); taskPending != null; taskPending = taskPending.getNext()) {
if (taskPending == task) {
@@ -0,0 +0,0 @@ public class CraftScheduler implements BukkitScheduler {
@ -1750,7 +1750,7 @@ index 23d7ce26f..d50bbd2a6 100644
private boolean isReady(final int currentTick) {
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
index c37275f2a..a03f933af 100644
index 7e7ce9a81..46029ce24 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
@@ -0,0 +0,0 @@
@ -1776,10 +1776,10 @@ index c37275f2a..a03f933af 100644
- final CustomTimingsHandler timings; // Spigot
CraftTask() {
this(null, null, -1, -1);
this(null, null, CraftTask.NO_REPEATING, CraftTask.NO_REPEATING);
}
@@ -0,0 +0,0 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
this(null, task, -1, -1);
this(null, task, CraftTask.NO_REPEATING, CraftTask.NO_REPEATING);
}
- // Spigot start
@ -1818,7 +1818,7 @@ index c37275f2a..a03f933af 100644
long getPeriod() {
@@ -0,0 +0,0 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
setPeriod(-2l);
setPeriod(CraftTask.CANCEL);
return true;
}
-

@ -1 +1 @@
Subproject commit aa255689c1e00b77b066440bbfd2d84b641bfd58
Subproject commit 1daee53916b517727c17fb5cfe06cc3e662b9375

@ -1 +1 @@
Subproject commit c3093efafc5eab1ea62a8a57aa47f28f5ea85d03
Subproject commit b6ecf3b31636d08e0bac78dd21adc3b0a8ca70ed