Paper 1.9.2 Update

This commit is contained in:
Aikar
2016-03-30 20:50:23 -04:00
parent e96190ed9e
commit f16d938497
19 changed files with 194 additions and 6082 deletions

View File

@@ -168,7 +168,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper end
world.addEntity(entitytntprimed);
world.a((EntityHuman) null, entitytntprimed.locX, entitytntprimed.locY, entitytntprimed.locZ, SoundEffects.gj, SoundCategory.BLOCKS, 1.0F, 1.0F);
world.a((EntityHuman) null, entitytntprimed.locX, entitytntprimed.locY, entitytntprimed.locZ, SoundEffects.gk, SoundCategory.BLOCKS, 1.0F, 1.0F);
diff --git a/src/main/java/net/minecraft/server/DispenserRegistry.java b/src/main/java/net/minecraft/server/DispenserRegistry.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/DispenserRegistry.java

View File

@@ -1,77 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
Date: Wed, 2 Mar 2016 00:21:24 -0600
Subject: [PATCH] Fix redstone lag issues
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
netherVoidTopDamage = getBoolean( "nether-ceiling-void-damage", false );
log("Top of the nether void damage: " + netherVoidTopDamage);
}
+
+ public int tickNextTickCap;
+ public boolean tickNextTickListCapIgnoresRedstone;
+ private void tickNextTickCap() {
+ tickNextTickCap = getInt("tick-next-tick-list-cap", 1000); // Higher values will be friendlier to vanilla style mechanics (to a point) but may hurt performance
+ tickNextTickListCapIgnoresRedstone = getBoolean("tick-next-tick-list-cap-ignores-redstone", false); // Redstone TickNextTicks will always bypass the preceding cap
+ log("WorldServer TickNextTick cap set at " + tickNextTickCap);
+ log("WorldServer TickNextTickList cap always processes redstone: " + tickNextTickListCapIgnoresRedstone);
+
+ }
+
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler {
if (false) { // CraftBukkit
throw new IllegalStateException("TickNextTick list out of synch");
} else {
+ // Paper start - No, stop doing this, it affects things like redstone
+ /*
if (i > 1000) {
// CraftBukkit start - If the server has too much to process over time, try to alleviate that
if (i > 20 * 1000) {
@@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler {
}
// CraftBukkit end
}
+ */
+ if (i > paperConfig.tickNextTickCap) {
+ i = paperConfig.tickNextTickCap;
+ }
+ // Paper end
this.methodProfiler.a("cleaning");
@@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler {
}
timings.scheduledBlocksCleanup.stopTiming(); // Paper
+ // Paper start - Allow redstone ticks to bypass the tickNextTickListCap
+ if (paperConfig.tickNextTickListCapIgnoresRedstone) {
+ Iterator<NextTickListEntry> iterator = this.nextTickList.iterator();
+ while (iterator.hasNext()) {
+ NextTickListEntry next = iterator.next();
+ if (!flag && next.b > this.worldData.getTime()) {
+ break;
+ }
+
+ IBlockData data = next.a().getBlockData();
+ if (next.a().isPowerSource(data) || next.a() instanceof IInventory) {
+ iterator.remove();
+ this.U.add(next);
+ }
+ }
+ }
+ // Paper end
+
this.methodProfiler.b();
this.methodProfiler.a("ticking");
timings.scheduledBlocksTicking.startTiming(); // Paper
--

View File

@@ -21,9 +21,20 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
netherVoidTopDamage = getBoolean( "nether-ceiling-void-damage", false );
log("Top of the nether void damage: " + netherVoidTopDamage);
}
+
+ public int tickNextTickCap;
+ public boolean tickNextTickListCapIgnoresRedstone;
+ private void tickNextTickCap() {
+ tickNextTickCap = getInt("tick-next-tick-list-cap", 1000); // Higher values will be friendlier to vanilla style mechanics (to a point) but may hurt performance
+ tickNextTickListCapIgnoresRedstone = getBoolean("tick-next-tick-list-cap-ignores-redstone", false); // Redstone TickNextTicks will always bypass the preceding cap
+ log("WorldServer TickNextTick cap set at " + tickNextTickCap);
+ log("WorldServer TickNextTickList cap always processes redstone: " + tickNextTickListCapIgnoresRedstone);
+
+ }
+
+ public boolean queueLightUpdates;
+ private void queueLightUpdates() {
+ queueLightUpdates = getBoolean("queue-light-updates", false);

View File

@@ -0,0 +1,86 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 30 Mar 2016 19:36:20 -0400
Subject: [PATCH] MC Dev fixes
diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java
+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java
@@ -0,0 +0,0 @@ public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
return Objects.toStringHelper(this).add("x", this.getX()).add("y", this.getY()).add("z", this.getZ()).toString();
}
- public int compareTo(Object object) {
+ public int compareTo(BaseBlockPosition object) { // Paper - decompile fix
return this.i((BaseBlockPosition) object);
}
}
diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/BiomeBase.java
+++ b/src/main/java/net/minecraft/server/BiomeBase.java
@@ -0,0 +0,0 @@ public abstract class BiomeBase {
protected List<BiomeBase.BiomeMeta> x;
public static int a(BiomeBase biomebase) {
- return BiomeBase.REGISTRY_ID.a((Object) biomebase);
+ return BiomeBase.REGISTRY_ID.a(biomebase); // Paper - decompile fix
}
public static BiomeBase a(int i) {
diff --git a/src/main/java/net/minecraft/server/BlockStateList.java b/src/main/java/net/minecraft/server/BlockStateList.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/BlockStateList.java
+++ b/src/main/java/net/minecraft/server/BlockStateList.java
@@ -0,0 +0,0 @@ public class BlockStateList {
if (!BlockStateList.a.matcher(s).matches()) {
throw new IllegalArgumentException("Block: " + block.getClass() + " has invalidly named property: " + s);
} else {
- Iterator iterator = iblockstate.c().iterator();
+ Iterator<T> iterator = iblockstate.c().iterator(); // Paper - decompile fix
String s1;
@@ -0,0 +0,0 @@ public class BlockStateList {
return s;
}
- Comparable comparable = (Comparable) iterator.next();
+ T comparable = iterator.next(); // Paper - decompile fix
s1 = iblockstate.a(comparable);
} while (BlockStateList.a.matcher(s1).matches());
@@ -0,0 +0,0 @@ public class BlockStateList {
if (!this.b.containsKey(iblockstate)) {
throw new IllegalArgumentException("Cannot get property " + iblockstate + " as it does not exist in " + this.a.t());
} else {
- return (Comparable) iblockstate.b().cast(this.b.get(iblockstate));
+ return iblockstate.b().cast(this.b.get(iblockstate)); // Paper - decompile fix
}
}
diff --git a/src/main/java/net/minecraft/server/CommandAbstract.java b/src/main/java/net/minecraft/server/CommandAbstract.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/CommandAbstract.java
+++ b/src/main/java/net/minecraft/server/CommandAbstract.java
@@ -0,0 +0,0 @@ public abstract class CommandAbstract implements ICommand {
}
if (object != null && oclass.isAssignableFrom(object.getClass())) {
- return (Entity) object;
+ return (T) object; // Paper - fix decompile error
} else {
throw new ExceptionEntityNotFound();
}
@@ -0,0 +0,0 @@ public abstract class CommandAbstract implements ICommand {
return this.getCommand().compareTo(icommand.getCommand());
}
- public int compareTo(Object object) {
+ public int compareTo(ICommand object) { // Paper - fix decompile error
return this.a((ICommand) object);
}
--

View File

@@ -23,7 +23,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- if (!this.b.containsKey(iblockstate)) {
- throw new IllegalArgumentException("Cannot get property " + iblockstate + " as it does not exist in " + this.a.t());
- } else {
- return iblockstate.b().cast(this.b.get(iblockstate));
- return iblockstate.b().cast(this.b.get(iblockstate)); // Paper - decompile fix
- }
+ return iblockstate.b().cast(this.b.get(iblockstate)); // Paper
}

View File

@@ -17,7 +17,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ <groupId>com.destroystokyo.paper</groupId>
+ <artifactId>paper</artifactId>
<packaging>jar</packaging>
<version>1.9-R0.1-SNAPSHOT</version>
<version>1.9.2-R0.1-SNAPSHOT</version>
- <name>Spigot</name>
- <url>http://www.spigotmc.org</url>
+ <name>Paper</name>

View File

@@ -8,15 +8,7 @@ diff --git a/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFoo
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java
+++ b/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java
@@ -0,0 +0,0 @@
package net.minecraft.server;
-import net.minecraft.server.IChatBaseComponent;
-import net.minecraft.server.Packet;
-import net.minecraft.server.PacketDataSerializer;
-import net.minecraft.server.PacketListenerPlayOut;
-
import java.io.IOException;
@@ -0,0 +0,0 @@ import java.io.IOException;
public class PacketPlayOutPlayerListHeaderFooter implements Packet<PacketListenerPlayOut> {

View File

@@ -45,12 +45,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
} else if (astring[0].equals("reload")) {
minecraftserver.getPlayerList().reloadWhitelist();
@@ -0,0 +0,0 @@ public class CommandWhitelist extends CommandAbstract {
return a((ICommand) o);
return Collections.emptyList();
}
}
// Paper end
+
+ // Paper start
+ /**
+ * Paper - Adds or removes a player from the game whitelist
+ * Adds or removes a player from the game whitelist
+ *
+ * @param mcserver running instance of MinecraftServer
+ * @param playerName the player we're going to be whitelisting
@@ -85,5 +86,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+ }
+ }
+ // Paper end
}
--

File diff suppressed because it is too large Load Diff