Archiviert
13
0

Paper 1.9.4 Update

Dieser Commit ist enthalten in:
Aikar 2016-05-11 22:07:46 -04:00
Ursprung 442d190103
Commit b59e2a51de
157 geänderte Dateien mit 1103 neuen und 2166 gelöschten Zeilen

Datei anzeigen

@ -1,11 +1,11 @@
From a0243fa99d5017189d33a96c3a7dd8838245d915 Mon Sep 17 00:00:00 2001
From 40a793d76f1bb04ad6d9d6cbbadb2a04024ed1b3 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 17:16:08 -0600
Subject: [PATCH] POM changes
diff --git a/pom.xml b/pom.xml
index 662379f..a03865f 100644
index 0ab9e14..79498ae 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,35 +4,37 @@
@ -24,7 +24,7 @@ index 662379f..a03865f 100644
- <artifactId>spigot-api</artifactId>
+ <groupId>com.destroystokyo.paper</groupId>
+ <artifactId>paper-api</artifactId>
<version>1.9.2-R0.1-SNAPSHOT</version>
<version>1.9.4-R0.1-SNAPSHOT</version>
<packaging>jar</packaging>
- <name>Spigot-API</name>
@ -95,5 +95,5 @@ index 662379f..a03865f 100644
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.1</version>
--
2.8.1
2.8.2

Datei anzeigen

@ -1,11 +1,11 @@
From 99e0482b0bdb8105b8a6d5a6220ece2edcc25190 Mon Sep 17 00:00:00 2001
From 91ee9a57d18f73a2947465b971dc8e81c0b3fae2 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 20:40:33 -0600
Subject: [PATCH] POM Changes
diff --git a/pom.xml b/pom.xml
index d775f7b..8899e3a 100644
index 95a9224..90fde44 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,12 +1,12 @@
@ -17,7 +17,7 @@ index d775f7b..8899e3a 100644
+ <groupId>com.destroystokyo.paper</groupId>
+ <artifactId>paper</artifactId>
<packaging>jar</packaging>
<version>1.9.2-R0.1-SNAPSHOT</version>
<version>1.9.4-R0.1-SNAPSHOT</version>
- <name>Spigot</name>
- <url>http://www.spigotmc.org</url>
+ <name>Paper</name>
@ -26,7 +26,7 @@ index d775f7b..8899e3a 100644
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -15,21 +15,22 @@
<minecraft_version>1_9_R1</minecraft_version>
<minecraft_version>1_9_R2</minecraft_version>
<buildtag.prefix>git-Bukkit-</buildtag.prefix>
<buildtag.suffix></buildtag.suffix>
- <maven.compiler.source>1.6</maven.compiler.source>
@ -184,5 +184,5 @@ index 9304637..674096c 100644
if (stream != null) {
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 9ba541352fa628a6a285572dbbd59a83389b5d14 Mon Sep 17 00:00:00 2001
From 41aae67ada140ebfe2b2c0fcbd5eb9172943b696 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 21:02:09 -0600
Subject: [PATCH] Paper config files
@ -250,10 +250,10 @@ index 0000000..2d50237
+ }
+}
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index b542536..328857d 100644
index c956362..6750d85 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -180,6 +180,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -179,6 +179,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
org.spigotmc.SpigotConfig.init((File) options.valueOf("spigot-settings"));
org.spigotmc.SpigotConfig.registerCommands();
// Spigot end
@ -265,7 +265,7 @@ index b542536..328857d 100644
DedicatedServer.LOGGER.info("Generating keypair");
this.a(MinecraftEncryption.b());
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index c386a60..f38b256 100644
index a7ab03d..4dd6777 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -125,6 +125,8 @@ public abstract class World implements IBlockAccess {

Datei anzeigen

@ -1,27 +1,27 @@
From 6c59912ddf9adcda60b7bd1f59ac2624b4674946 Mon Sep 17 00:00:00 2001
From 9fec88bf2a25d685dedd4338cbd7bec7df280fd7 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 e54e7b7..47c9f69 100644
index f02fc60..d60e755 100644
--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java
+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java
@@ -87,7 +87,7 @@ public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
@@ -89,7 +89,7 @@ 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);
return this.l((BaseBlockPosition) object);
}
}
diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java
index be4b871..5ca8125 100644
index 75e98d2..36952ae 100644
--- a/src/main/java/net/minecraft/server/BiomeBase.java
+++ b/src/main/java/net/minecraft/server/BiomeBase.java
@@ -47,7 +47,7 @@ public abstract class BiomeBase {
@@ -49,7 +49,7 @@ public abstract class BiomeBase {
protected List<BiomeBase.BiomeMeta> x;
public static int a(BiomeBase biomebase) {
@ -29,40 +29,9 @@ index be4b871..5ca8125 100644
+ 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 8df8b04..19ea22f 100644
--- a/src/main/java/net/minecraft/server/BlockStateList.java
+++ b/src/main/java/net/minecraft/server/BlockStateList.java
@@ -83,7 +83,7 @@ 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;
@@ -92,7 +92,7 @@ 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());
@@ -154,7 +154,7 @@ 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
}
}
@Nullable
diff --git a/src/main/java/net/minecraft/server/CommandAbstract.java b/src/main/java/net/minecraft/server/CommandAbstract.java
index 156922a..f2feee5 100644
index f900ff9..95a9c77 100644
--- a/src/main/java/net/minecraft/server/CommandAbstract.java
+++ b/src/main/java/net/minecraft/server/CommandAbstract.java
@@ -212,7 +212,7 @@ public abstract class CommandAbstract implements ICommand {
@ -74,7 +43,7 @@ index 156922a..f2feee5 100644
} else {
throw new ExceptionEntityNotFound();
}
@@ -551,7 +551,7 @@ public abstract class CommandAbstract implements ICommand {
@@ -554,7 +554,7 @@ public abstract class CommandAbstract implements ICommand {
return this.getCommand().compareTo(icommand.getCommand());
}
@ -97,5 +66,5 @@ index f5bcbdb..3190cad 100644
for (ZipEntry clazzEntry; (clazzEntry = nmsZipStream.getNextEntry()) != null; ) {
final String entryName = clazzEntry.getName();
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 20642f167afea36583aae227bf7fb18ced1a1f57 Mon Sep 17 00:00:00 2001
From 510ca29c8152d471740af9cf9bd99f3f9c0af690 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 20:55:47 -0400
Subject: [PATCH] MC Utils
@ -131,10 +131,10 @@ index 0000000..ffd3152
+ }
+}
diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java
index 8e944a4..d9835cf 100644
index c01cecb..7fa49dd 100644
--- a/src/main/java/net/minecraft/server/NBTTagCompound.java
+++ b/src/main/java/net/minecraft/server/NBTTagCompound.java
@@ -13,7 +13,7 @@ import java.util.concurrent.Callable;
@@ -13,7 +13,7 @@ import javax.annotation.Nullable;
public class NBTTagCompound extends NBTBase {
@ -154,9 +154,9 @@ index 8e944a4..d9835cf 100644
}
+ public UUID getUUID(String prefix) { return a(prefix); } // Paper // OBFHELPER
@Nullable
public UUID a(String s) {
return new UUID(this.getLong(s + "Most"), this.getLong(s + "Least"));
}
diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java
index 256614d..e86ca6c 100644
--- a/src/main/java/net/minecraft/server/NBTTagList.java

Datei anzeigen

@ -1,11 +1,11 @@
From 6e216f2da974c97aca67d7852e0a00976366ddc2 Mon Sep 17 00:00:00 2001
From 5e8f9b65bb21ee111ac18d14817827fbfa6ad44e 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
diff --git a/pom.xml b/pom.xml
index 8899e3a..8bc1a26 100644
index 90fde44..c31ee8f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -65,6 +65,12 @@
@ -215,7 +215,7 @@ index 0000000..11dd692
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 32abf12..891423d 100644
index 4f4377e..252c6c3 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -14,11 +14,14 @@ import java.util.concurrent.TimeUnit;
@ -259,10 +259,10 @@ index 32abf12..891423d 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index 1d2f580..6005d03 100644
index 8cee6fa..3212255 100644
--- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java
@@ -32,6 +32,15 @@ public class Block {
@@ -33,6 +33,15 @@ public class Block {
protected final BlockStateList blockStateList;
private IBlockData blockData;
private String name;
@ -279,10 +279,10 @@ index 1d2f580..6005d03 100644
public static int getId(Block block) {
return Block.REGISTRY.a(block); // CraftBukkit - decompile error
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 328857d..42752d9 100644
index 6750d85..70994d4 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -22,7 +22,7 @@ import java.io.PrintStream;
@@ -21,7 +21,7 @@ import java.io.PrintStream;
import org.apache.logging.log4j.Level;
import org.bukkit.craftbukkit.LoggerOutputStream;
@ -291,7 +291,7 @@ index 328857d..42752d9 100644
import org.bukkit.event.server.ServerCommandEvent;
import org.bukkit.craftbukkit.util.Waitable;
import org.bukkit.event.server.RemoteServerCommandEvent;
@@ -428,7 +428,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -427,7 +427,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
}
public void aL() {
@ -300,7 +300,7 @@ index 328857d..42752d9 100644
while (!this.serverCommandQueue.isEmpty()) {
ServerCommand servercommand = (ServerCommand) this.serverCommandQueue.remove(0);
@@ -443,7 +443,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -442,7 +442,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
// CraftBukkit end
}
@ -310,7 +310,7 @@ index 328857d..42752d9 100644
public boolean aa() {
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 2983756..54367ef 100644
index 6ad99b0..62ada23 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -24,7 +24,8 @@ import org.bukkit.block.BlockFace;
@ -323,7 +323,7 @@ index 2983756..54367ef 100644
import org.bukkit.event.entity.EntityCombustByEntityEvent;
import org.bukkit.event.hanging.HangingBreakByEntityEvent;
import org.bukkit.event.vehicle.VehicleBlockCollisionEvent;
@@ -140,7 +141,7 @@ public abstract class Entity implements ICommandListener {
@@ -141,7 +142,7 @@ public abstract class Entity implements ICommandListener {
public boolean valid; // CraftBukkit
public org.bukkit.projectiles.ProjectileSource projectileSource; // CraftBukkit - For projectiles only
public boolean forceExplosionKnockback; // CraftBukkit - SPIGOT-949
@ -332,7 +332,7 @@ index 2983756..54367ef 100644
// Spigot start
public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
public final boolean defaultActivationState;
@@ -462,7 +463,6 @@ public abstract class Entity implements ICommandListener {
@@ -464,7 +465,6 @@ public abstract class Entity implements ICommandListener {
}
public void move(double d0, double d1, double d2) {
@ -340,7 +340,7 @@ index 2983756..54367ef 100644
if (this.noclip) {
this.a(this.getBoundingBox().c(d0, d1, d2));
this.recalcPosition();
@@ -803,7 +803,6 @@ public abstract class Entity implements ICommandListener {
@@ -805,7 +805,6 @@ public abstract class Entity implements ICommandListener {
this.world.methodProfiler.b();
}
@ -349,10 +349,10 @@ index 2983756..54367ef 100644
public void recalcPosition() {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 09d6bd5..9fc46b1 100644
index 5f84a70..4d7be74 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -25,7 +25,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
@@ -26,7 +26,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
import org.bukkit.event.player.PlayerItemConsumeEvent;
// CraftBukkit end
@ -361,15 +361,15 @@ index 09d6bd5..9fc46b1 100644
public abstract class EntityLiving extends Entity {
@@ -1698,7 +1698,6 @@ public abstract class EntityLiving extends Entity {
@@ -1707,7 +1707,6 @@ public abstract class EntityLiving extends Entity {
}
public void m() {
- SpigotTimings.timerEntityBaseTick.startTiming(); // Spigot
super.m();
this.cu();
this.cv();
if (!this.world.isClientSide) {
@@ -1771,9 +1770,7 @@ public abstract class EntityLiving extends Entity {
@@ -1780,9 +1779,7 @@ public abstract class EntityLiving extends Entity {
}
}
@ -379,24 +379,24 @@ index 09d6bd5..9fc46b1 100644
double d0 = this.locX - this.lastX;
double d1 = this.locZ - this.lastZ;
float f = (float) (d0 * d0 + d1 * d1);
@@ -1842,8 +1839,6 @@ public abstract class EntityLiving extends Entity {
@@ -1851,8 +1848,6 @@ public abstract class EntityLiving extends Entity {
} else {
this.bo = 0;
this.bp = 0;
}
-
- SpigotTimings.timerEntityTickRest.stopTiming(); // Spigot
}
protected float h(float f, float f1) {
@@ -1908,7 +1903,6 @@ public abstract class EntityLiving extends Entity {
@@ -1917,7 +1912,6 @@ public abstract class EntityLiving extends Entity {
}
this.world.methodProfiler.a("ai");
- SpigotTimings.timerEntityAI.startTiming(); // Spigot
if (this.cf()) {
this.bc = false;
this.bd = 0.0F;
@@ -1919,7 +1913,6 @@ public abstract class EntityLiving extends Entity {
if (this.cg()) {
this.bd = false;
this.be = 0.0F;
@@ -1928,7 +1922,6 @@ public abstract class EntityLiving extends Entity {
this.doTick();
this.world.methodProfiler.b();
}
@ -404,26 +404,26 @@ index 09d6bd5..9fc46b1 100644
this.world.methodProfiler.b();
this.world.methodProfiler.a("jump");
@@ -1942,14 +1935,10 @@ public abstract class EntityLiving extends Entity {
this.be *= 0.98F;
this.bf *= 0.9F;
@@ -1951,14 +1944,10 @@ public abstract class EntityLiving extends Entity {
this.bf *= 0.98F;
this.bg *= 0.9F;
this.r();
- SpigotTimings.timerEntityAIMove.startTiming(); // Spigot
this.g(this.bd, this.be);
this.g(this.be, this.bf);
- SpigotTimings.timerEntityAIMove.stopTiming(); // Spigot
this.world.methodProfiler.b();
this.world.methodProfiler.a("push");
- SpigotTimings.timerEntityAICollision.startTiming(); // Spigot
this.cn();
this.co();
- SpigotTimings.timerEntityAICollision.stopTiming(); // Spigot
this.world.methodProfiler.b();
}
diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java
index 3773bb1..8eceb93 100644
index 68242d9..2eea1c1 100644
--- a/src/main/java/net/minecraft/server/EntityTracker.java
+++ b/src/main/java/net/minecraft/server/EntityTracker.java
@@ -172,7 +172,7 @@ public class EntityTracker {
@@ -171,7 +171,7 @@ public class EntityTracker {
public void updatePlayers() {
ArrayList arraylist = Lists.newArrayList();
Iterator iterator = this.c.iterator();
@ -432,7 +432,7 @@ index 3773bb1..8eceb93 100644
while (iterator.hasNext()) {
EntityTrackerEntry entitytrackerentry = (EntityTrackerEntry) iterator.next();
@@ -185,7 +185,9 @@ public class EntityTracker {
@@ -184,7 +184,9 @@ public class EntityTracker {
}
}
}
@ -442,7 +442,7 @@ index 3773bb1..8eceb93 100644
for (int i = 0; i < arraylist.size(); ++i) {
EntityPlayer entityplayer = (EntityPlayer) arraylist.get(i);
Iterator iterator1 = this.c.iterator();
@@ -198,6 +200,7 @@ public class EntityTracker {
@@ -197,6 +199,7 @@ public class EntityTracker {
}
}
}
@ -451,19 +451,19 @@ index 3773bb1..8eceb93 100644
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 0caa3f9..8bfbc2c 100644
index e17d5d3..8845ad2 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -45,7 +45,7 @@ import org.bukkit.craftbukkit.CraftServer;
// CraftBukkit start
@@ -50,7 +50,7 @@ import org.apache.logging.log4j.Logger;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.CraftServer;
// CraftBukkit end
-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
+import co.aikar.timings.MinecraftTimings; // Paper
public abstract class MinecraftServer implements Runnable, ICommandListener, IAsyncTaskHandler, IMojangStatistics {
@@ -449,6 +449,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -454,6 +454,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
}
// CraftBukkit end
MinecraftServer.LOGGER.info("Stopping server");
@ -471,7 +471,7 @@ index 0caa3f9..8bfbc2c 100644
// CraftBukkit start
if (this.server != null) {
this.server.disablePlugins();
@@ -646,7 +647,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -651,7 +652,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
protected void B() {}
protected void C() throws ExceptionWorldConflict { // CraftBukkit - added throws
@ -480,7 +480,7 @@ index 0caa3f9..8bfbc2c 100644
long i = System.nanoTime();
++this.ticks;
@@ -673,7 +674,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -678,7 +679,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
}
if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit
@ -489,7 +489,7 @@ index 0caa3f9..8bfbc2c 100644
this.methodProfiler.a("save");
this.v.savePlayers();
// Spigot Start
@@ -688,7 +689,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -693,7 +694,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
// this.saveChunks(true);
// Spigot End
this.methodProfiler.b();
@ -498,7 +498,7 @@ index 0caa3f9..8bfbc2c 100644
}
this.methodProfiler.a("tallying");
@@ -705,12 +706,13 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -710,12 +711,13 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
this.methodProfiler.b();
this.methodProfiler.b();
@ -514,7 +514,7 @@ index 0caa3f9..8bfbc2c 100644
this.methodProfiler.a("jobs");
Queue queue = this.j;
@@ -721,26 +723,27 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -726,26 +728,27 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
SystemUtils.a(entry, MinecraftServer.LOGGER);
}
// Spigot end
@ -549,7 +549,7 @@ index 0caa3f9..8bfbc2c 100644
// Send time updates to everyone, it will get the right time from the world the player is in.
if (this.ticks % 20 == 0) {
for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
@@ -748,7 +751,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -753,7 +756,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
entityplayer.playerConnection.sendPacket(new PacketPlayOutUpdateTime(entityplayer.world.getTime(), entityplayer.getPlayerTime(), entityplayer.world.getGameRules().getBoolean("doDaylightCycle"))); // Add support for per player time
}
}
@ -558,7 +558,7 @@ index 0caa3f9..8bfbc2c 100644
int i;
@@ -805,9 +808,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -810,9 +813,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
this.methodProfiler.b();
this.methodProfiler.a("tracker");
@ -568,7 +568,7 @@ index 0caa3f9..8bfbc2c 100644
this.methodProfiler.b();
this.methodProfiler.b();
// } // CraftBukkit
@@ -816,20 +817,20 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -821,20 +822,20 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
}
this.methodProfiler.c("connection");
@ -596,10 +596,10 @@ index 0caa3f9..8bfbc2c 100644
this.methodProfiler.b();
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 711b037..5599845 100644
index 0a14dd2..7c52e15 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -58,6 +58,7 @@ import org.bukkit.inventory.CraftingInventory;
@@ -57,6 +57,7 @@ import org.bukkit.inventory.CraftingInventory;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.InventoryView;
import org.bukkit.util.NumberConversions;
@ -607,7 +607,7 @@ index 711b037..5599845 100644
// CraftBukkit end
public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1331,7 +1332,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1330,7 +1331,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
// CraftBukkit end
private void handleCommand(String s) {
@ -616,7 +616,7 @@ index 711b037..5599845 100644
// CraftBukkit start - whole method
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
this.LOGGER.info(this.player.getName() + " issued server command: " + s);
@@ -1342,22 +1343,22 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1341,22 +1342,22 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
this.server.getPluginManager().callEvent(event);
if (event.isCancelled()) {
@ -644,10 +644,10 @@ index 711b037..5599845 100644
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index e6524e9..20bf384 100644
index 0cb2e63..6d4f4e7 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -6,12 +6,13 @@ import java.util.concurrent.Callable;
@@ -6,12 +6,13 @@ import javax.annotation.Nullable;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@ -664,7 +664,7 @@ index e6524e9..20bf384 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 f38b256..9c67687 100644
index 4dd6777..0c3ed2d 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;
@ -698,7 +698,7 @@ index f38b256..9c67687 100644
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
}
@@ -1370,6 +1370,7 @@ public abstract class World implements IBlockAccess {
@@ -1375,6 +1375,7 @@ public abstract class World implements IBlockAccess {
}
this.methodProfiler.c("remove");
@ -706,7 +706,7 @@ index f38b256..9c67687 100644
this.entityList.removeAll(this.f);
int j;
@@ -1390,6 +1391,7 @@ public abstract class World implements IBlockAccess {
@@ -1395,6 +1396,7 @@ public abstract class World implements IBlockAccess {
this.f.clear();
this.l();
@ -714,7 +714,7 @@ index f38b256..9c67687 100644
this.methodProfiler.c("regular");
CrashReportSystemDetails crashreportsystemdetails1;
@@ -1399,6 +1401,7 @@ public abstract class World implements IBlockAccess {
@@ -1404,6 +1406,7 @@ public abstract class World implements IBlockAccess {
timings.entityTick.startTiming(); // Spigot
guardEntityList = true; // Spigot
// CraftBukkit start - Use field for loop variable
@ -722,7 +722,7 @@ index f38b256..9c67687 100644
int entitiesThisCycle = 0;
if (tickPosition < 0) tickPosition = 0;
for (entityLimiter.initTick();
@@ -1420,10 +1423,11 @@ public abstract class World implements IBlockAccess {
@@ -1425,10 +1428,11 @@ public abstract class World implements IBlockAccess {
this.methodProfiler.a("tick");
if (!entity.dead && !(entity instanceof EntityPlayer)) {
try {
@ -736,7 +736,7 @@ index f38b256..9c67687 100644
crashreport1 = CrashReport.a(throwable1, "Ticking entity");
crashreportsystemdetails1 = crashreport1.a("Entity being ticked");
entity.appendEntityCrashDetails(crashreportsystemdetails1);
@@ -1555,6 +1559,7 @@ public abstract class World implements IBlockAccess {
@@ -1560,6 +1564,7 @@ public abstract class World implements IBlockAccess {
}
timings.tileEntityPending.stopTiming(); // Spigot
@ -744,7 +744,7 @@ index f38b256..9c67687 100644
this.methodProfiler.b();
this.methodProfiler.b();
}
@@ -1600,7 +1605,6 @@ public abstract class World implements IBlockAccess {
@@ -1605,7 +1610,6 @@ public abstract class World implements IBlockAccess {
entity.ticksLived++;
entity.inactiveTick();
} else {
@ -752,7 +752,7 @@ index f38b256..9c67687 100644
// CraftBukkit end
entity.M = entity.locX;
entity.N = entity.locY;
@@ -1609,6 +1613,7 @@ public abstract class World implements IBlockAccess {
@@ -1614,6 +1618,7 @@ public abstract class World implements IBlockAccess {
entity.lastPitch = entity.pitch;
if (flag && entity.aa) {
++entity.ticksLived;
@ -760,7 +760,7 @@ index f38b256..9c67687 100644
if (entity.isPassenger()) {
entity.aw();
} else {
@@ -1667,8 +1672,6 @@ public abstract class World implements IBlockAccess {
@@ -1672,8 +1677,6 @@ public abstract class World implements IBlockAccess {
}
}
}
@ -770,10 +770,10 @@ index f38b256..9c67687 100644
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 7bf6480..433ed2a 100644
index f8ef497..4980c7a 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -244,13 +244,13 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -245,13 +245,13 @@ public class WorldServer extends World implements IAsyncTaskHandler {
timings.doChunkUnload.stopTiming(); // Spigot
this.methodProfiler.c("tickPending");
@ -791,7 +791,7 @@ index 7bf6480..433ed2a 100644
this.methodProfiler.c("chunkMap");
timings.doChunkMap.startTiming(); // Spigot
this.manager.flush();
@@ -481,7 +481,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -483,7 +483,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
}
}
@ -800,7 +800,7 @@ index 7bf6480..433ed2a 100644
if (i > 0) {
ChunkSection[] achunksection = chunk.getSections();
int i1 = achunksection.length;
@@ -509,6 +509,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -511,6 +511,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
}
}
}
@ -808,7 +808,7 @@ index 7bf6480..433ed2a 100644
}
this.methodProfiler.b();
@@ -704,6 +705,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -706,6 +707,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
this.methodProfiler.a("cleaning");
@ -816,7 +816,7 @@ index 7bf6480..433ed2a 100644
NextTickListEntry nextticklistentry;
for (int j = 0; j < i; ++j) {
@@ -717,9 +719,11 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -719,9 +721,11 @@ public class WorldServer extends World implements IAsyncTaskHandler {
// this.nextTickListHash.remove(nextticklistentry);
this.U.add(nextticklistentry);
}
@ -828,7 +828,7 @@ index 7bf6480..433ed2a 100644
Iterator iterator = this.U.iterator();
while (iterator.hasNext()) {
@@ -729,6 +733,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -731,6 +735,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
if (this.areChunksLoadedBetween(nextticklistentry.a.a(-b0, -b0, -b0), nextticklistentry.a.a(b0, b0, b0))) {
IBlockData iblockdata = this.getType(nextticklistentry.a);
@ -837,7 +837,7 @@ index 7bf6480..433ed2a 100644
if (iblockdata.getMaterial() != Material.AIR && Block.a(iblockdata.getBlock(), nextticklistentry.a())) {
try {
@@ -741,10 +747,12 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -743,10 +749,12 @@ public class WorldServer extends World implements IAsyncTaskHandler {
throw new ReportedException(crashreport);
}
}
@ -1067,7 +1067,7 @@ index 41d2d87..0000000
- }
-}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 6d13b62..dc5ddb1 100644
index 46882f1..35f6c27 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -37,15 +37,9 @@ import org.bukkit.configuration.serialization.DelegateDeserialization;
@ -1087,7 +1087,7 @@ index 6d13b62..dc5ddb1 100644
import org.bukkit.craftbukkit.map.CraftMapView;
import org.bukkit.craftbukkit.map.RenderData;
import org.bukkit.craftbukkit.scoreboard.CraftScoreboard;
@@ -1542,6 +1536,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1545,6 +1539,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
packet.components = components;
getHandle().playerConnection.sendPacket(packet);
}
@ -1236,7 +1236,7 @@ index e52ef47..3d90b34 100644
this.value = value;
}
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index e53092c..499dc24 100644
index a752376..8870607 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -29,7 +29,7 @@ import net.minecraft.server.EntityWither;

Datei anzeigen

@ -1,14 +1,14 @@
From 985d47dbf4c2334eb94567cad6fca09c5ede38e3 Mon Sep 17 00:00:00 2001
From 71af32a912b140b221e5df8701fdefe297a19ceb 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
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
index bd0fd80..df19327 100644
index 7593aa2..29b6f16 100644
--- a/src/main/java/net/minecraft/server/EntityArrow.java
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
@@ -184,6 +184,14 @@ public abstract class EntityArrow extends Entity implements IProjectile {
@@ -185,6 +185,14 @@ public abstract class EntityArrow extends Entity implements IProjectile {
}
}
@ -24,7 +24,7 @@ index bd0fd80..df19327 100644
this.a(movingobjectposition);
}
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
index 04fa947..140df3a 100644
index c47b009..12e2303 100644
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
@@ -198,6 +198,14 @@ public class EntityFishingHook extends Entity {
@ -43,10 +43,10 @@ index 04fa947..140df3a 100644
org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this); // Craftbukkit - Call event
if (movingobjectposition.entity != null) {
diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java
index 93014a4..e0fc22b 100644
index f47b148..0c36bad 100644
--- a/src/main/java/net/minecraft/server/EntityProjectile.java
+++ b/src/main/java/net/minecraft/server/EntityProjectile.java
@@ -157,6 +157,14 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
@@ -158,6 +158,14 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
movingobjectposition = new MovingObjectPosition(entity);
}
@ -62,10 +62,10 @@ index 93014a4..e0fc22b 100644
if (movingobjectposition.type == MovingObjectPosition.EnumMovingObjectType.BLOCK && this.world.getType(movingobjectposition.a()).getBlock() == Blocks.PORTAL) {
this.e(movingobjectposition.a());
diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java
index 300573a..6eeb03b 100644
index b9aa1fc..6dbad10 100644
--- a/src/main/java/net/minecraft/server/ItemBlock.java
+++ b/src/main/java/net/minecraft/server/ItemBlock.java
@@ -21,7 +21,7 @@ public class ItemBlock extends Item {
@@ -23,7 +23,7 @@ public class ItemBlock extends Item {
blockposition = blockposition.shift(enumdirection);
}
@ -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 fab56f7..b26516a 100644
index 0c3ed2d..e2a06f1 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1685,6 +1685,14 @@ public abstract class World implements IBlockAccess {
@@ -1690,6 +1690,14 @@ public abstract class World implements IBlockAccess {
for (int i = 0; i < list.size(); ++i) {
Entity entity1 = (Entity) list.get(i);
@ -94,5 +94,5 @@ index fab56f7..b26516a 100644
return false;
}
--
2.7.4
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 39ea4e339a937f8079827d3b9a46e00afae5f4c0 Mon Sep 17 00:00:00 2001
From ba437ee826f25bccd4ff0b36e33a206e4e625c66 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 12:45:11 -0600
Subject: [PATCH] Configurable squid spawn ranges
@ -22,19 +22,19 @@ index 2d50237..fe9502c 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java
index b94444d..9f1a50e 100644
index c771b6b..62469f8 100644
--- a/src/main/java/net/minecraft/server/EntitySquid.java
+++ b/src/main/java/net/minecraft/server/EntitySquid.java
@@ -138,7 +138,8 @@ public class EntitySquid extends EntityWaterAnimal {
@@ -141,7 +141,8 @@ public class EntitySquid extends EntityWaterAnimal {
}
public boolean cF() {
- return this.locY > 45.0D && this.locY < (double) this.world.K() && super.cF();
public boolean cG() {
- return this.locY > 45.0D && this.locY < (double) this.world.K() && super.cG();
+ // Paper - Configurable squid spawn height range
+ return this.locY > world.paperConfig.squidMinSpawnHeight && this.locY < world.paperConfig.squidMaxSpawnHeight && super.cF();
+ return this.locY > world.paperConfig.squidMinSpawnHeight && this.locY < world.paperConfig.squidMaxSpawnHeight && super.cG();
}
public void b(float f, float f1, float f2) {
--
2.7.4
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From b0e638701232329aa46911cab5cfdc6d484605a0 Mon Sep 17 00:00:00 2001
From 37379ea38aeae3de6345be81d535c6304db9286a Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 13:02:51 -0600
Subject: [PATCH] Configurable cactus and reed natural growth heights
@ -23,7 +23,7 @@ index fe9502c..22b643e 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java
index 6f0af4e..e994692 100644
index 4368731..fec2f0a 100644
--- a/src/main/java/net/minecraft/server/BlockCactus.java
+++ b/src/main/java/net/minecraft/server/BlockCactus.java
@@ -28,7 +28,7 @@ public class BlockCactus extends Block {
@ -36,10 +36,10 @@ index 6f0af4e..e994692 100644
if (j >= (byte) range(3, ((100.0F / world.spigotConfig.cactusModifier) * 15) + 0.5F, 15)) { // Spigot
diff --git a/src/main/java/net/minecraft/server/BlockReed.java b/src/main/java/net/minecraft/server/BlockReed.java
index 4a79cf4..4c69376 100644
index 4bb63ff..2e565d3 100644
--- a/src/main/java/net/minecraft/server/BlockReed.java
+++ b/src/main/java/net/minecraft/server/BlockReed.java
@@ -27,7 +27,7 @@ public class BlockReed extends Block {
@@ -28,7 +28,7 @@ public class BlockReed extends Block {
;
}
@ -49,5 +49,5 @@ index 4a79cf4..4c69376 100644
if (j >= (byte) range(3, ((100.0F / world.spigotConfig.caneModifier) * 15) + 0.5F, 15)) { // Spigot
--
2.7.4
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 078cefa411dcb2cbc5b722781ae0af2548261f80 Mon Sep 17 00:00:00 2001
From bb6eb027005395cbddc8fc0acae01a60dda0858e Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 13:09:16 -0600
Subject: [PATCH] Configurable baby zombie movement speed
@ -20,19 +20,19 @@ index 22b643e..2cb4ac6 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
index e7be27a..949452c 100644
index 13af566..9f81142 100644
--- a/src/main/java/net/minecraft/server/EntityZombie.java
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
@@ -15,7 +15,7 @@ public class EntityZombie extends EntityMonster {
@@ -16,7 +16,7 @@ public class EntityZombie extends EntityMonster {
protected static final IAttribute a = (new AttributeRanged((IAttribute) null, "zombie.spawnReinforcements", 0.0D, 0.0D, 1.0D)).a("Spawn Reinforcements Chance");
private static final UUID b = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836");
- private static final AttributeModifier c = new AttributeModifier(EntityZombie.b, "Baby speed boost", 0.5D, 1);
+ private final AttributeModifier c = new AttributeModifier(EntityZombie.b, "Baby speed boost", world.paperConfig.babyZombieMovementSpeed, 1); // Paper - Remove static - Make baby speed configurable
private static final DataWatcherObject<Boolean> bv = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.h);
private static final DataWatcherObject<Integer> bw = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.b);
private static final DataWatcherObject<Boolean> bx = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.h);
@@ -105,9 +105,9 @@ public class EntityZombie extends EntityMonster {
private static final DataWatcherObject<Boolean> bw = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.h);
private static final DataWatcherObject<Integer> bx = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.b);
private static final DataWatcherObject<Boolean> by = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.h);
@@ -106,9 +106,9 @@ public class EntityZombie extends EntityMonster {
if (this.world != null && !this.world.isClientSide) {
AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED);
@ -45,5 +45,5 @@ index e7be27a..949452c 100644
}
--
2.7.4
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 5d63e7d32e8fd136134d6e07f97b34da19e03b9d Mon Sep 17 00:00:00 2001
From 7f1e7b45866ef1b0f6d4236c5e255ae3e1d8698b Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 13:14:11 -0600
Subject: [PATCH] Configurable fishing time ranges
@ -22,18 +22,18 @@ index 2cb4ac6..03a4fb4 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
index 140df3a..b99d9c4 100644
index 12e2303..0e135ce 100644
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
@@ -359,7 +359,7 @@ public class EntityFishingHook extends Entity {
this.aw = MathHelper.nextInt(this.random, 20, 80);
this.ax = MathHelper.nextInt(this.random, 20, 80);
}
} else {
- this.av = MathHelper.nextInt(this.random, 100, 900);
+ this.av = MathHelper.nextInt(this.random, world.paperConfig.fishingMinTicks, world.paperConfig.fishingMaxTicks); // Paper - Configurable fishing time range
this.av -= EnchantmentManager.g(this.owner) * 20 * 5;
- this.aw = MathHelper.nextInt(this.random, 100, 900);
+ this.aw = MathHelper.nextInt(this.random, world.paperConfig.fishingMinTicks, world.paperConfig.fishingMaxTicks); // Paper - Configurable fishing time range
this.aw -= EnchantmentManager.g(this.owner) * 20 * 5;
}
}
--
2.7.4
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 7995af463977ca7eeec05b1651e267e18c19b03b Mon Sep 17 00:00:00 2001
From ebe3ea7e457df136088d8e88252db21880d3bff2 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 13:24:16 -0600
Subject: [PATCH] Allow nerfed mobs to jump
@ -19,18 +19,18 @@ index 03a4fb4..6d6793c 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index b3f637f..d115234 100644
index ea77a33..ecb59e7 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -43,6 +43,7 @@ public abstract class EntityInsentient extends EntityLiving {
private boolean bC;
@@ -44,6 +44,7 @@ public abstract class EntityInsentient extends EntityLiving {
private boolean bD;
private Entity leashHolder;
private NBTTagCompound bE;
private NBTTagCompound bF;
+ public PathfinderGoalFloat goalFloat; // Paper
public EntityInsentient(World world) {
super(world);
@@ -623,6 +624,12 @@ public abstract class EntityInsentient extends EntityLiving {
@@ -631,6 +632,12 @@ public abstract class EntityInsentient extends EntityLiving {
// Spigot Start
if ( this.fromMobSpawner )
{
@ -56,5 +56,5 @@ index 1a20dbf..c56a0d0 100644
((Navigation) entityinsentient.getNavigation()).c(true);
}
--
2.8.0
2.8.2

Datei anzeigen

@ -1,11 +1,11 @@
From 10ef84cd8963f9fa245e08032f2cadc54fea7cac Mon Sep 17 00:00:00 2001
From 3dd75df6f6bc3d751fd8055aa8635f2fceee2f4f Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 13:31:05 -0600
Subject: [PATCH] Toggle for player interact limiter
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 891423d..f75b758 100644
index 252c6c3..f9a4bf4 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -184,4 +184,12 @@ public class PaperConfig {
@ -22,10 +22,10 @@ index 891423d..f75b758 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 5599845..961747d 100644
index 7c52e15..0c2c151 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -913,7 +913,8 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -912,7 +912,8 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
this.player.resetIdleTimer();
// Spigot start
boolean throttled = false;

Datei anzeigen

@ -1,4 +1,4 @@
From 284c8d203857ff23b9b0484880cd760ebb7afe65 Mon Sep 17 00:00:00 2001
From 539d8278cd23299ba4310d2f5b3f2862be81e9fb Mon Sep 17 00:00:00 2001
From: gsand <gsandowns@gmail.com>
Date: Tue, 1 Mar 2016 13:43:16 -0600
Subject: [PATCH] Player Exhaustion Multipliers
@ -23,12 +23,12 @@ index 6d6793c..8a63435 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index 88e1e98..0f71013 100644
index 3212255..3d6f803 100644
--- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java
@@ -418,7 +418,7 @@ public class Block {
@@ -450,7 +450,7 @@ public class Block {
public void a(World world, EntityHuman entityhuman, BlockPosition blockposition, IBlockData iblockdata, TileEntity tileentity, ItemStack itemstack) {
public void a(World world, EntityHuman entityhuman, BlockPosition blockposition, IBlockData iblockdata, @Nullable TileEntity tileentity, @Nullable ItemStack itemstack) {
entityhuman.b(StatisticList.a(this));
- entityhuman.applyExhaustion(0.025F);
+ entityhuman.applyExhaustion(world.paperConfig.blockBreakExhaustion); // Paper - Configurable block break exhaustion
@ -36,10 +36,10 @@ index 88e1e98..0f71013 100644
ItemStack itemstack1 = this.u(iblockdata);
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index e1bb5c5..11388ab 100644
index 6a8f499..3e1a84e 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -1451,13 +1451,13 @@ public abstract class EntityHuman extends EntityLiving {
@@ -1455,13 +1455,13 @@ public abstract class EntityHuman extends EntityLiving {
i = Math.round(MathHelper.sqrt(d0 * d0 + d1 * d1 + d2 * d2) * 100.0F);
if (i > 0) {
this.a(StatisticList.q, i);
@ -56,5 +56,5 @@ index e1bb5c5..11388ab 100644
} else if (this.n_()) {
if (d1 > 0.0D) {
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From ce0854bb55f35fce8f1539b124a7865322e839c3 Mon Sep 17 00:00:00 2001
From 498b31972ea2738871d13c59515cabcc9e231b76 Mon Sep 17 00:00:00 2001
From: Suddenly <suddenly@suddenly.coffee>
Date: Tue, 1 Mar 2016 13:51:54 -0600
Subject: [PATCH] Add configurable despawn distances for living entities
@ -30,10 +30,10 @@ index 8a63435..f9da7f8 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index d115234..c706963 100644
index ecb59e7..ff3443a 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -602,13 +602,13 @@ public abstract class EntityInsentient extends EntityLiving {
@@ -610,13 +610,13 @@ public abstract class EntityInsentient extends EntityLiving {
double d2 = entityhuman.locZ - this.locZ;
double d3 = d0 * d0 + d1 * d1 + d2 * d2;
@ -51,5 +51,5 @@ index d115234..c706963 100644
}
}
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 0d17591b964a7dfac11699bb71e8f7e4f075696f Mon Sep 17 00:00:00 2001
From c2b98da52b36fcfa251ddc1951645eadf6b25bbd Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Tue, 1 Mar 2016 14:14:15 -0600
Subject: [PATCH] Drop falling block and tnt entities at the specified height
@ -24,10 +24,10 @@ index f9a58f9..df3e6fb 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
index 6573634..6246c05 100644
index 0b2c5d7..08a7969 100644
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
@@ -76,6 +76,17 @@ public class EntityFallingBlock extends Entity {
@@ -77,6 +77,17 @@ public class EntityFallingBlock extends Entity {
this.motY -= 0.03999999910593033D;
this.move(this.motX, this.motY, this.motZ);
@ -64,5 +64,5 @@ index 35ed2a6..564ea37 100644
this.motY *= 0.9800000190734863D;
this.motZ *= 0.9800000190734863D;
--
2.7.4
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 5fb24d96351092f0b6880a8e0f30de8fa517ba6e Mon Sep 17 00:00:00 2001
From 1a9b35b6da96dd27d24b90dd432fc27a79615bc1 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 14:32:43 -0600
Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
@ -20,10 +20,10 @@ index c872029..fac5f88 100644
EULA.a.warn("Failed to save " + this.b, exception);
} finally {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 8bfbc2c..b510e31 100644
index 8845ad2..14389dd 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1023,7 +1023,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -1028,7 +1028,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
}
public String getServerModName() {
@ -88,5 +88,5 @@ index 94a3d42..6898b56 100644
log.log( Level.SEVERE, "------------------------------" );
//
--
2.8.2.windows.1
2.8.2

Datei anzeigen

@ -1,11 +1,11 @@
From ab1bcbaacff40a69b94ba83f4488771599eedce3 Mon Sep 17 00:00:00 2001
From ec731f31e18887483d230fc0ae9143b6e152860c 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 11388ab..767c384 100644
index 3e1a84e..0f73fcf 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -1,6 +1,7 @@
@ -16,8 +16,8 @@ index 11388ab..767c384 100644
import com.google.common.collect.Lists;
import com.mojang.authlib.GameProfile;
import java.util.Arrays;
@@ -65,6 +66,19 @@ public abstract class EntityHuman extends EntityLiving {
private final ItemCooldown bU = this.l();
@@ -66,6 +67,19 @@ public abstract class EntityHuman extends EntityLiving {
private final ItemCooldown bV = this.l();
public EntityFishingHook hookedFish;
+ // Paper start - affectsSpawning API
@ -37,10 +37,10 @@ index 11388ab..767c384 100644
public boolean fauxSleeping;
public String spawnWorld = "";
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index c706963..393ea79 100644
index ff3443a..da102e3 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -594,7 +594,7 @@ public abstract class EntityInsentient extends EntityLiving {
@@ -602,7 +602,7 @@ public abstract class EntityInsentient extends EntityLiving {
if (this.persistent) {
this.ticksFarFromPlayer = 0;
} else {
@ -50,23 +50,23 @@ index c706963..393ea79 100644
if (entityhuman != null) {
double d0 = entityhuman.locX - this.locX;
diff --git a/src/main/java/net/minecraft/server/EntitySilverfish.java b/src/main/java/net/minecraft/server/EntitySilverfish.java
index 28db04e..e19a19a 100644
index b5fce84..ed8a425 100644
--- a/src/main/java/net/minecraft/server/EntitySilverfish.java
+++ b/src/main/java/net/minecraft/server/EntitySilverfish.java
@@ -86,7 +86,7 @@ public class EntitySilverfish extends EntityMonster {
@@ -88,7 +88,7 @@ public class EntitySilverfish extends EntityMonster {
public boolean cF() {
if (super.cF()) {
public boolean cG() {
if (super.cG()) {
- EntityHuman entityhuman = this.world.b(this, 5.0D);
+ EntityHuman entityhuman = this.world.findNearbyPlayerNotInCreativeMode(this, 5.0D, EntityHuman.affectsSpawningFilter()); // Paper - affectsSpawning filter
return entityhuman == null;
} else {
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
index 7a5b053..28fed1f 100644
index 9f81142..774d773 100644
--- a/src/main/java/net/minecraft/server/EntityZombie.java
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
@@ -196,7 +196,7 @@ public class EntityZombie extends EntityMonster {
@@ -197,7 +197,7 @@ public class EntityZombie extends EntityMonster {
if (this.world.getType(new BlockPosition(i1, j1 - 1, k1)).q() && this.world.getLightLevel(new BlockPosition(i1, j1, k1)) < 10) {
entityzombie.setPosition((double) i1, (double) j1, (double) k1);
@ -76,7 +76,7 @@ index 7a5b053..28fed1f 100644
entityzombie.setGoalTarget(entityliving, EntityTargetEvent.TargetReason.REINFORCEMENT_TARGET, true);
entityzombie.prepare(this.world.D(new BlockPosition(entityzombie)), (GroupDataEntity) null);
diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
index a7903a2..f53e52c 100644
index df35d71..6c3e365 100644
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
@@ -32,7 +32,7 @@ public abstract class MobSpawnerAbstract {
@ -89,7 +89,7 @@ index a7903a2..f53e52c 100644
public void c() {
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index 9e19dfd..588377c 100644
index 4eedd41..852bdf8 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -50,6 +50,8 @@ public final class SpawnerCreature {
@ -111,7 +111,7 @@ index 9e19dfd..588377c 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 8b30dc4..60d658f 100644
index 9599849..81f4a42 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -3,6 +3,7 @@
@ -122,9 +122,9 @@ index 8b30dc4..60d658f 100644
import com.google.common.collect.Lists;
import java.util.ArrayList;
import java.util.Calendar;
@@ -2690,14 +2691,29 @@ public abstract class World implements IBlockAccess {
}
@@ -2701,16 +2702,31 @@ public abstract class World implements IBlockAccess {
@Nullable
public EntityHuman findNearbyPlayer(Entity entity, double d0) {
- return this.a(entity.locX, entity.locY, entity.locZ, d0, false);
+ // Paper start - Add filter parameter
@ -135,6 +135,7 @@ index 8b30dc4..60d658f 100644
+ return this.findNearbyPlayer(entity.locX, entity.locY, entity.locZ, d0, false, filter);
}
@Nullable
public EntityHuman b(Entity entity, double d0) {
- return this.a(entity.locX, entity.locY, entity.locZ, d0, true);
+ return this.findNearbyPlayerNotInCreativeMode(entity, d0, Predicates.<EntityHuman>alwaysTrue());
@ -144,6 +145,7 @@ index 8b30dc4..60d658f 100644
+ return this.findNearbyPlayer(entity.locX, entity.locY, entity.locZ, d0, true, filter);
}
@Nullable
public EntityHuman a(double d0, double d1, double d2, double d3, boolean flag) {
+ return findNearbyPlayer(d0, d1, d2, d3, flag, Predicates.<EntityHuman>alwaysTrue());
+ }
@ -154,7 +156,7 @@ index 8b30dc4..60d658f 100644
double d4 = -1.0D;
EntityHuman entityhuman = null;
@@ -2709,6 +2725,8 @@ public abstract class World implements IBlockAccess {
@@ -2722,6 +2738,8 @@ public abstract class World implements IBlockAccess {
}
// CraftBukkit end
@ -163,7 +165,7 @@ index 8b30dc4..60d658f 100644
if ((IEntitySelector.d.apply(entityhuman1) || !flag) && (IEntitySelector.e.apply(entityhuman1) || flag)) {
double d5 = entityhuman1.e(d0, d1, d2);
@@ -2723,9 +2741,17 @@ public abstract class World implements IBlockAccess {
@@ -2736,9 +2754,17 @@ public abstract class World implements IBlockAccess {
}
public boolean isPlayerNearby(double d0, double d1, double d2, double d3) {
@ -182,10 +184,10 @@ index 8b30dc4..60d658f 100644
double d4 = entityhuman.e(d0, d1, d2);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 888823c..3f1c9bf 100644
index 35f6c27..b7ff27c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1405,6 +1405,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1408,6 +1408,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
@ -203,5 +205,5 @@ index 888823c..3f1c9bf 100644
private final Player.Spigot spigot = new Player.Spigot()
{
--
2.8.0
2.8.2

Datei anzeigen

@ -1,14 +1,14 @@
From be23fa2011288fc9a21363c2bc5d43400763bff0 Mon Sep 17 00:00:00 2001
From f739616fdab39b3ef5bdd9e64fdaf319f262026c Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Tue, 1 Mar 2016 15:08:03 -0600
Subject: [PATCH] Remove invalid mob spawner tile entities
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 3c67d36..cde4124 100644
index 00fb20d..5690e81 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -717,6 +717,10 @@ public class Chunk {
@@ -721,6 +721,10 @@ public class Chunk {
tileentity.z();
this.tileEntities.put(blockposition, tileentity);
// CraftBukkit start
@ -20,5 +20,5 @@ index 3c67d36..cde4124 100644
System.out.println("Attempted to place a tile entity (" + tileentity + ") at " + tileentity.position.getX() + "," + tileentity.position.getY() + "," + tileentity.position.getZ()
+ " (" + org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(getBlockData(blockposition).getBlock()) + ") where there was no entity tile!");
--
2.7.4
2.8.2

Datei anzeigen

@ -1,14 +1,14 @@
From 8ea5671563d902a6a971506d8ea12f01bd943b4c Mon Sep 17 00:00:00 2001
From dff7e0d34f098097330c9431e2fda06a6dda2b1a Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 22:01:19 -0600
Subject: [PATCH] Optimize TileEntity Ticking
diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java
index e82c8e3..722dfac 100644
index 0b70d16..7635df9 100644
--- a/src/main/java/net/minecraft/server/TileEntityChest.java
+++ b/src/main/java/net/minecraft/server/TileEntityChest.java
@@ -8,17 +8,17 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity;
@@ -9,17 +9,17 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity;
import org.bukkit.entity.HumanEntity;
// CraftBukkit end
@ -33,7 +33,7 @@ index e82c8e3..722dfac 100644
private int p;
private BlockChest.Type q;
private String r;
@@ -231,6 +231,8 @@ public class TileEntityChest extends TileEntityLootable implements ITickable, II
@@ -237,6 +237,8 @@ public class TileEntityChest extends TileEntityLootable implements ITickable, II
}
public void c() {
@ -42,7 +42,7 @@ index e82c8e3..722dfac 100644
this.m();
int i = this.position.getX();
int j = this.position.getY();
@@ -311,7 +313,8 @@ public class TileEntityChest extends TileEntityLootable implements ITickable, II
@@ -317,7 +319,8 @@ public class TileEntityChest extends TileEntityLootable implements ITickable, II
this.j = 0.0F;
}
}
@ -52,7 +52,7 @@ index e82c8e3..722dfac 100644
}
public boolean c(int i, int j) {
@@ -331,6 +334,28 @@ public class TileEntityChest extends TileEntityLootable implements ITickable, II
@@ -337,6 +340,28 @@ public class TileEntityChest extends TileEntityLootable implements ITickable, II
int oldPower = Math.max(0, Math.min(15, this.l)); // CraftBukkit - Get power before new viewer is added
++this.l;
@ -81,7 +81,7 @@ index e82c8e3..722dfac 100644
if (this.world == null) return; // CraftBukkit
this.world.playBlockAction(this.position, this.getBlock(), 1, this.l);
@@ -354,6 +379,34 @@ public class TileEntityChest extends TileEntityLootable implements ITickable, II
@@ -360,6 +385,34 @@ public class TileEntityChest extends TileEntityLootable implements ITickable, II
int oldPower = Math.max(0, Math.min(15, this.l)); // CraftBukkit - Get power before new viewer is added
--this.l;
if (this.world == null) return; // CraftBukkit
@ -117,7 +117,7 @@ index e82c8e3..722dfac 100644
// CraftBukkit start - Call redstone event
diff --git a/src/main/java/net/minecraft/server/TileEntityEnderChest.java b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
index d9a0346..9276a46 100644
index eca71c0..73085d6 100644
--- a/src/main/java/net/minecraft/server/TileEntityEnderChest.java
+++ b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
@@ -1,15 +1,17 @@
@ -152,7 +152,7 @@ index d9a0346..9276a46 100644
@@ -73,11 +77,34 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
public void b() {
public void d() {
++this.g;
+
+ // Paper start - Move enderchest open sounds out of the tick loop
@ -169,7 +169,7 @@ index d9a0346..9276a46 100644
this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.g);
}
public void d() {
public void e() {
--this.g;
+
+ // Paper start - Move enderchest close sounds out of the tick loop
@ -186,5 +186,5 @@ index d9a0346..9276a46 100644
}
--
2.7.4
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 39a2b68881f6f6a9de18ce84c77288124e004925 Mon Sep 17 00:00:00 2001
From 4c865cb3096bf8d40245c09142b7bee6e4f5d5e0 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 1 Mar 2016 23:09:29 -0600
Subject: [PATCH] Further improve server tick loop
@ -12,10 +12,10 @@ Previous implementation did not calculate TPS correctly.
Switch to a realistic rolling average and factor in std deviation as an extra reporting variable
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index d901d2c..e9bb02f 100644
index 14389dd..ebf6c48 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -109,17 +109,11 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -114,17 +114,11 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
public org.bukkit.command.ConsoleCommandSender console;
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
public ConsoleReader reader;
@ -34,7 +34,7 @@ index d901d2c..e9bb02f 100644
public MinecraftServer(OptionSet options, Proxy proxy, DataConverterManager dataconvertermanager, YggdrasilAuthenticationService yggdrasilauthenticationservice, MinecraftSessionService minecraftsessionservice, GameProfileRepository gameprofilerepository, UserCache usercache) {
io.netty.util.ResourceLeakDetector.setEnabled( false ); // Spigot - disable
@@ -516,12 +510,54 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -521,12 +515,54 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
this.isRunning = false;
}
@ -94,7 +94,7 @@ index d901d2c..e9bb02f 100644
public void run() {
try {
@@ -535,24 +571,41 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -540,24 +576,41 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
// Spigot start
Arrays.fill( recentTps, 20 );
@ -211,5 +211,5 @@ index be2e31d..6d21c32 100644
return ( ( tps > 18.0 ) ? ChatColor.GREEN : ( tps > 16.0 ) ? ChatColor.YELLOW : ChatColor.RED ).toString()
+ ( ( tps > 20.0 ) ? "*" : "" ) + Math.min( Math.round( tps * 100.0 ) / 100.0, 20.0 );
--
2.7.4
2.8.2

Datei anzeigen

@ -1,14 +1,14 @@
From 83c757b2b09a6ff9dff0f2f2e4861aa324aefdb7 Mon Sep 17 00:00:00 2001
From f66a5ec26463b256252abb850427e24b017d10ed Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 23:12:03 -0600
Subject: [PATCH] Only refresh abilities if needed
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 3f1c9bf..64bd053 100644
index b7ff27c..5515958 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1133,12 +1133,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1136,12 +1136,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void setFlying(boolean value) {
@ -24,5 +24,5 @@ index 3f1c9bf..64bd053 100644
@Override
--
2.7.4
2.8.2

Datei anzeigen

@ -1,14 +1,14 @@
From 6c60d9170e309cb01828a57ab43013fca7fb98d7 Mon Sep 17 00:00:00 2001
From d8934d31e50f6acafde740667621263e70e57553 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 23:19:01 -0600
Subject: [PATCH] Add async chunk load API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 7b2c289..83e3003 100644
index afbdb5c..898316f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -124,6 +124,26 @@ public class CraftWorld implements World {
@@ -125,6 +125,26 @@ public class CraftWorld implements World {
}
}
@ -33,8 +33,8 @@ index 7b2c289..83e3003 100644
+ // Paper end
+
public Chunk getChunkAt(int x, int z) {
return this.world.getChunkProviderServer().getOrCreateChunkFast(x, z).bukkitChunk;
return this.world.getChunkProviderServer().getChunkAt(x, z).bukkitChunk;
}
--
2.7.4
2.8.2

Datei anzeigen

@ -1,14 +1,14 @@
From 51306b297c90ec78be730733123a3e4be59904c7 Mon Sep 17 00:00:00 2001
From 8c16d42fc8c678523d3198f8ba20fba2580ef0c3 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Tue, 1 Mar 2016 23:45:08 -0600
Subject: [PATCH] Entity Origin API
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 54367ef..9a8d534 100644
index 62ada23..2455b9c 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -142,6 +142,7 @@ public abstract class Entity implements ICommandListener {
@@ -143,6 +143,7 @@ public abstract class Entity implements ICommandListener {
public org.bukkit.projectiles.ProjectileSource projectileSource; // CraftBukkit - For projectiles only
public boolean forceExplosionKnockback; // CraftBukkit - SPIGOT-949
public Timing tickTimer = MinecraftTimings.getEntityTimings(this); // Paper
@ -16,19 +16,19 @@ index 54367ef..9a8d534 100644
// Spigot start
public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
public final boolean defaultActivationState;
@@ -1347,6 +1348,11 @@ public abstract class Entity implements ICommandListener {
@@ -1350,6 +1351,11 @@ public abstract class Entity implements ICommandListener {
}
}
+ // Paper start - Save the entity's origin location
+ if (origin != null) {
+ nbttagcompound.set("Paper.Origin", this.a(origin.getX(), origin.getY(), origin.getZ()));
+ nbttagcompound.set("Paper.Origin", this.createList(origin.getX(), origin.getY(), origin.getZ()));
+ }
+ // Paper end
return nbttagcompound;
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being saved");
@@ -1480,6 +1486,13 @@ public abstract class Entity implements ICommandListener {
@@ -1485,6 +1491,13 @@ public abstract class Entity implements ICommandListener {
}
// CraftBukkit end
@ -42,11 +42,19 @@ index 54367ef..9a8d534 100644
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded");
@@ -1508,6 +1521,7 @@ public abstract class Entity implements ICommandListener {
public void at() {}
+ protected NBTTagList createList(double... adouble) { return a(adouble); } // Paper // OBFHELPER
protected NBTTagList a(double... adouble) {
NBTTagList nbttaglist = new NBTTagList();
double[] adouble1 = adouble;
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
index 6246c05..8f2b253 100644
index 08a7969..4c14d75 100644
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
@@ -242,6 +242,14 @@ public class EntityFallingBlock extends Entity {
@@ -241,6 +241,14 @@ public class EntityFallingBlock extends Entity {
this.block = Blocks.SAND.getBlockData();
}
@ -81,10 +89,10 @@ index 564ea37..1113b1c 100644
public EntityLiving getSource() {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 60d658f..0e9cf7a 100644
index 81f4a42..9bfabe0 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -949,6 +949,12 @@ public abstract class World implements IBlockAccess {
@@ -958,6 +958,12 @@ public abstract class World implements IBlockAccess {
int j = MathHelper.floor(entity.locZ / 16.0D);
boolean flag = entity.attachedToPlayer;
@ -98,7 +106,7 @@ index 60d658f..0e9cf7a 100644
flag = true;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 8a1df54..f61f6cd 100644
index b5126d4..a6c0b45 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -604,4 +604,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@ -147,5 +155,5 @@ index c493c9c..93843aa 100644
+ // Paper end
}
--
2.8.1
2.8.2

Datei anzeigen

@ -1,14 +1,14 @@
From f91f93ffdd35c348ea7d926e70c876ae4dcf6b20 Mon Sep 17 00:00:00 2001
From 05fa7c0419cdcd091313c88da05ef233093893f6 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
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 4193f20..f579d28 100644
index 6d4f4e7..f59e6f8 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -164,7 +164,12 @@ public abstract class TileEntity {
@@ -174,7 +174,12 @@ public abstract class TileEntity {
}
});
if (this.world != null) {
@ -16,17 +16,17 @@ index 4193f20..f579d28 100644
+ // Paper start - Prevent TileEntity and Entity crashes
+ Block block = this.getBlock();
+ if (block != null) {
+ CrashReportSystemDetails.a(crashreportsystemdetails, this.position, this.getBlock(), this.u());
+ CrashReportSystemDetails.a(crashreportsystemdetails, this.position, block, this.u());
+ }
+ // Paper end
crashreportsystemdetails.a("Actual block type", new Callable() {
crashreportsystemdetails.a("Actual block type", new CrashReportCallable() {
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 0e9cf7a..3b84e27 100644
index 9bfabe0..362df8f 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1436,10 +1436,12 @@ public abstract class World implements IBlockAccess {
@@ -1441,10 +1441,12 @@ public abstract class World implements IBlockAccess {
entity.tickTimer.stopTiming(); // Paper
} catch (Throwable throwable1) {
entity.tickTimer.stopTiming();
@ -43,7 +43,7 @@ index 0e9cf7a..3b84e27 100644
}
}
@@ -1501,10 +1503,13 @@ public abstract class World implements IBlockAccess {
@@ -1506,10 +1508,13 @@ public abstract class World implements IBlockAccess {
((ITickable) tileentity).c();
this.methodProfiler.b();
} catch (Throwable throwable2) {
@ -62,5 +62,5 @@ index 0e9cf7a..3b84e27 100644
// Spigot start
finally {
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 03c404597d6f991e3d0efe86410ba1ae26622b18 Mon Sep 17 00:00:00 2001
From 660b12196ce83db18407308413758b721fe5c643 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 23:58:50 -0600
Subject: [PATCH] Configurable top of nether void damage
@ -20,10 +20,10 @@ index f81ece3..7c0e61f 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 7152182..96014a9 100644
index 2455b9c..751e07d 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -301,6 +301,13 @@ public abstract class Entity implements ICommandListener {
@@ -303,6 +303,13 @@ public abstract class Entity implements ICommandListener {
this.U();
}
@ -36,8 +36,8 @@ index 7152182..96014a9 100644
+
public void U() {
this.world.methodProfiler.a("entityBaseTick");
if (this.isPassenger() && this.by().dead) {
@@ -381,7 +388,7 @@ public abstract class Entity implements ICommandListener {
if (this.isPassenger() && this.bz().dead) {
@@ -383,7 +390,7 @@ public abstract class Entity implements ICommandListener {
this.fallDistance *= 0.5F;
}
@ -47,5 +47,5 @@ index 7152182..96014a9 100644
}
--
2.7.4
2.8.2

Datei anzeigen

@ -1,15 +1,15 @@
From 534ef829ced9cd8f7b2a291cd88fc681c14e390a Mon Sep 17 00:00:00 2001
From becc47e96fdaf11d96e9bc96f2690f125d5a12b1 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Wed, 2 Mar 2016 00:03:55 -0600
Subject: [PATCH] Check online mode before converting and renaming player data
diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java
index df82c14..c2d384c 100644
index bc6e138..1aed6fe 100644
--- a/src/main/java/net/minecraft/server/WorldNBTStorage.java
+++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java
@@ -166,7 +166,7 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData {
File file = new File(this.playerDir, entityhuman.getUniqueID().toString() + ".dat");
@@ -165,7 +165,7 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData {
File file = new File(this.playerDir, entityhuman.bd() + ".dat");
// Spigot Start
boolean usingWrongFile = false;
- if ( !file.exists() )
@ -18,5 +18,5 @@ index df82c14..c2d384c 100644
file = new File( this.playerDir, UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + entityhuman.getName() ).getBytes( "UTF-8" ) ).toString() + ".dat");
if ( file.exists() )
--
2.7.4
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From cf551879a447edab9e7fbbdbe01190b3663ad0dc Mon Sep 17 00:00:00 2001
From 254eb4d02c98435ce53fc85794f9912f9b3c63e2 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 00:52:31 -0600
Subject: [PATCH] Lighting Queue
@ -32,18 +32,18 @@ index 7c0e61f..8e3a0f3 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index cde4124..3b5e8c2 100644
index 5690e81..3bcbbb9 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -44,6 +44,7 @@ public class Chunk {
private int w;
private ConcurrentLinkedQueue<BlockPosition> x;
@@ -45,6 +45,7 @@ public class Chunk {
private ConcurrentLinkedQueue<BlockPosition> y;
public boolean d;
protected gnu.trove.map.hash.TObjectIntHashMap<Class> entityCount = new gnu.trove.map.hash.TObjectIntHashMap<Class>(); // Spigot
+ public int lightUpdates; // Paper - Number of queued light updates for this chunk
// CraftBukkit start - Neighbor loaded cache for chunk lighting and entity ticking
private int neighbors = 0x1 << 12;
@@ -226,6 +227,22 @@ public class Chunk {
@@ -227,6 +228,22 @@ public class Chunk {
private void h(boolean flag) {
this.world.methodProfiler.a("recheckGaps");
if (this.world.areChunksLoaded(new BlockPosition(this.locX * 16 + 8, 0, this.locZ * 16 + 8), 16)) {
@ -65,8 +65,8 @@ index cde4124..3b5e8c2 100644
+ // Paper end
for (int i = 0; i < 16; ++i) {
for (int j = 0; j < 16; ++j) {
if (this.h[i + j * 16]) {
@@ -476,7 +493,7 @@ public class Chunk {
if (this.i[i + j * 16]) {
@@ -478,7 +495,7 @@ public class Chunk {
} else {
if (flag) {
this.initLighting();
@ -75,7 +75,7 @@ index cde4124..3b5e8c2 100644
int j1 = iblockdata.c();
int k1 = iblockdata1.c();
@@ -491,6 +508,28 @@ public class Chunk {
@@ -493,6 +510,28 @@ public class Chunk {
if (j1 != k1 && (j1 < k1 || this.getBrightness(EnumSkyBlock.SKY, blockposition) > 0 || this.getBrightness(EnumSkyBlock.BLOCK, blockposition) > 0)) {
this.d(i, k);
}
@ -104,7 +104,7 @@ index cde4124..3b5e8c2 100644
}
TileEntity tileentity;
@@ -1314,4 +1353,29 @@ public class Chunk {
@@ -1318,4 +1357,29 @@ public class Chunk {
private EnumTileEntityState() {}
}
@ -135,22 +135,22 @@ index cde4124..3b5e8c2 100644
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 7d3adde..54c83f3 100644
index de85bd5..20dccfb 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -288,6 +288,7 @@ public class ChunkProviderServer implements IChunkProvider {
long chunkcoordinates = this.unloadQueue.popFirst();
Chunk chunk = this.chunks.get(chunkcoordinates);
if (chunk == null) continue;
+ if (chunk.hasLightUpdates()) continue; // Paper - Don't unload chunks with pending light updates.
@@ -269,6 +269,7 @@ public class ChunkProviderServer implements IChunkProvider {
Chunk chunk = (Chunk) this.chunks.get(olong);
ChunkUnloadEvent event = new ChunkUnloadEvent(chunk.bukkitChunk);
server.getPluginManager().callEvent(event);
if (chunk != null && chunk.d) {
+ if (chunk.hasLightUpdates()) continue; // Paper - Don't unload chunks with pending light updates.
// CraftBukkit start
ChunkUnloadEvent event = new ChunkUnloadEvent(chunk.bukkitChunk);
this.world.getServer().getPluginManager().callEvent(event);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index cd784a0..75f2605 100644
index ebf6c48..fcc1214 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -47,6 +47,11 @@ import org.bukkit.craftbukkit.CraftServer;
@@ -52,6 +52,11 @@ import org.bukkit.craftbukkit.CraftServer;
// CraftBukkit end
import co.aikar.timings.MinecraftTimings; // Paper
@ -162,7 +162,7 @@ index cd784a0..75f2605 100644
public abstract class MinecraftServer implements Runnable, ICommandListener, IAsyncTaskHandler, IMojangStatistics {
public static final Logger LOGGER = LogManager.getLogger();
@@ -113,6 +118,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -118,6 +123,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
public final Thread primaryThread;
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
public int autosavePeriod;
@ -170,7 +170,7 @@ index cd784a0..75f2605 100644
// CraftBukkit end
public MinecraftServer(OptionSet options, Proxy proxy, DataConverterManager dataconvertermanager, YggdrasilAuthenticationService yggdrasilauthenticationservice, MinecraftSessionService minecraftsessionservice, GameProfileRepository gameprofilerepository, UserCache usercache) {
@@ -760,6 +766,34 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -765,6 +771,34 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
this.methodProfiler.b();
this.methodProfiler.b();
@ -206,10 +206,10 @@ index cd784a0..75f2605 100644
co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 3b84e27..1793995 100644
index 362df8f..77cfd3f 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -379,7 +379,17 @@ public abstract class World implements IBlockAccess {
@@ -384,7 +384,17 @@ public abstract class World implements IBlockAccess {
} else {
if (iblockdata.c() != iblockdata1.c() || iblockdata.d() != iblockdata1.d()) {
this.methodProfiler.a("checkLight");
@ -229,5 +229,5 @@ index 3b84e27..1793995 100644
}
--
2.8.1
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 172822275bb7cf1ea56a306a5d08b4daa652e8bb Mon Sep 17 00:00:00 2001
From e5bd40dc6bc3827203da24f8214cfb76b7caf653 Mon Sep 17 00:00:00 2001
From: DoctorDark <doctordark11@gmail.com>
Date: Wed, 16 Mar 2016 02:21:39 -0500
Subject: [PATCH] Configurable end credits
@ -20,26 +20,26 @@ index 8e3a0f3..2e88385 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 3e33f49..8d04c82 100644
index a54f09c..48376e8 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -508,6 +508,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -504,6 +504,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
return this.world.pvpMode;
}
+ /**
+ * Paper - Give "theEnd2" achievement if the player doesn't already have it
+ */
+
+ // Paper start - Give "theEnd2" achievement if the player doesn't already have it
+ private void giveTheEnd2() {
+ if (!this.a(AchievementList.D)) {
+ this.b(AchievementList.D);
+ }
+ }
+ // Paper end
+
@Nullable
public Entity c(int i) {
//this.cj = true; // CraftBukkit - Moved down and into PlayerList#changeDimension
if (this.dimension == 1 && i == 1) {
@@ -515,7 +524,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
//this.ck = true; // CraftBukkit - Moved down and into PlayerList#changeDimension
@@ -512,7 +521,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.world.kill(this);
if (!this.viewingCredits) {
this.viewingCredits = true;
@ -52,5 +52,5 @@ index 3e33f49..8d04c82 100644
} else {
this.b((Statistic) AchievementList.D);
--
2.7.4
2.8.2

Datei anzeigen

@ -1,11 +1,11 @@
From 7db30b2993803a75446a250e1c11713a84da3f1a Mon Sep 17 00:00:00 2001
From 8d02e85a56780af5db186431c81995fa4eb0fdbd Mon Sep 17 00:00:00 2001
From: Iceee <andrew@opticgaming.tv>
Date: Wed, 2 Mar 2016 01:39:52 -0600
Subject: [PATCH] Fix lag from explosions processing dead entities
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
index 69720e8..ae49403 100644
index 77ed4a7..de74fb7 100644
--- a/src/main/java/net/minecraft/server/Explosion.java
+++ b/src/main/java/net/minecraft/server/Explosion.java
@@ -103,7 +103,14 @@ public class Explosion {
@ -14,7 +14,7 @@ index 69720e8..ae49403 100644
int k1 = MathHelper.floor(this.posZ + (double) f3 + 1.0D);
- List list = this.world.getEntities(this.source, new AxisAlignedBB((double) i, (double) l, (double) j1, (double) j, (double) i1, (double) k1));
+ // Paper start - Fix lag from explosions processing dead entities
+ List list = this.world.a(this.source, new AxisAlignedBB((double) i, (double) l, (double) j1, (double) j, (double) i1, (double) k1), new com.google.common.base.Predicate<Entity>() {
+ List list = this.world.getEntities(this.source, new AxisAlignedBB((double) i, (double) l, (double) j1, (double) j, (double) i1, (double) k1), new com.google.common.base.Predicate<Entity>() {
+ @Override
+ public boolean apply(Entity entity) {
+ return IEntitySelector.d.apply(entity) && !entity.dead;
@ -25,5 +25,5 @@ index 69720e8..ae49403 100644
for (int l1 = 0; l1 < list.size(); ++l1) {
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From b3cf4f737279693fbcdbd2dd992cdcbc7389adea Mon Sep 17 00:00:00 2001
From c4c7414c6f7f2475be2d17d0389f13d082a8f9a5 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 02:17:54 -0600
Subject: [PATCH] Generator Settings
@ -38,10 +38,10 @@ index 2e88385..af2491e 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java
index 5ca8125..e321a89 100644
index 36952ae..6b84ece 100644
--- a/src/main/java/net/minecraft/server/BiomeBase.java
+++ b/src/main/java/net/minecraft/server/BiomeBase.java
@@ -174,7 +174,7 @@ public abstract class BiomeBase {
@@ -178,7 +178,7 @@ public abstract class BiomeBase {
BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition();
for (int l1 = 255; l1 >= 0; --l1) {
@ -64,10 +64,10 @@ index 3ce22aa..336fa16 100644
} else {
IBlockData iblockdata2 = chunksnapshot.a(l, l1, k);
diff --git a/src/main/java/net/minecraft/server/ChunkProviderFlat.java b/src/main/java/net/minecraft/server/ChunkProviderFlat.java
index 17e0b8e..89a33fd 100644
index aa35a24..ea6a00e 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderFlat.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderFlat.java
@@ -25,7 +25,7 @@ public class ChunkProviderFlat implements ChunkGenerator {
@@ -26,7 +26,7 @@ public class ChunkProviderFlat implements ChunkGenerator {
if (flag) {
Map map = this.d.b();
@ -76,7 +76,7 @@ index 17e0b8e..89a33fd 100644
Map map1 = (Map) map.get("village");
if (!map1.containsKey("size")) {
@@ -35,19 +35,19 @@ public class ChunkProviderFlat implements ChunkGenerator {
@@ -36,19 +36,19 @@ public class ChunkProviderFlat implements ChunkGenerator {
this.e.add(new WorldGenVillage(map1));
}
@ -100,7 +100,7 @@ index 17e0b8e..89a33fd 100644
this.e.add(new WorldGenMonument((Map) map.get("oceanmonument")));
}
}
@@ -60,7 +60,7 @@ public class ChunkProviderFlat implements ChunkGenerator {
@@ -61,7 +61,7 @@ public class ChunkProviderFlat implements ChunkGenerator {
this.i = new WorldGenLakes(Blocks.LAVA);
}
@ -110,10 +110,10 @@ index 17e0b8e..89a33fd 100644
int k = 0;
boolean flag1 = true;
diff --git a/src/main/java/net/minecraft/server/ChunkProviderGenerate.java b/src/main/java/net/minecraft/server/ChunkProviderGenerate.java
index 88d0374..168d071 100644
index 415b8d0..926f32d 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderGenerate.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderGenerate.java
@@ -157,32 +157,32 @@ public class ChunkProviderGenerate implements ChunkGenerator {
@@ -158,32 +158,32 @@ public class ChunkProviderGenerate implements ChunkGenerator {
this.a(i, j, chunksnapshot);
this.C = this.n.getWorldChunkManager().getBiomeBlock(this.C, i * 16, j * 16, 16, 16);
this.a(i, j, chunksnapshot, this.C);
@ -153,7 +153,7 @@ index 88d0374..168d071 100644
this.B.a(this.n, i, j, chunksnapshot);
}
}
@@ -319,23 +319,23 @@ public class ChunkProviderGenerate implements ChunkGenerator {
@@ -320,23 +320,23 @@ public class ChunkProviderGenerate implements ChunkGenerator {
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i, j);
if (this.o) {
@ -182,7 +182,7 @@ index 88d0374..168d071 100644
this.B.a(this.n, this.i, chunkcoordintpair);
}
}
@@ -360,7 +360,7 @@ public class ChunkProviderGenerate implements ChunkGenerator {
@@ -361,7 +361,7 @@ public class ChunkProviderGenerate implements ChunkGenerator {
}
}
@ -191,7 +191,7 @@ index 88d0374..168d071 100644
for (k1 = 0; k1 < this.s.t; ++k1) {
l1 = this.i.nextInt(16) + 8;
i2 = this.i.nextInt(256);
@@ -424,23 +424,23 @@ public class ChunkProviderGenerate implements ChunkGenerator {
@@ -426,23 +426,23 @@ public class ChunkProviderGenerate implements ChunkGenerator {
public void recreateStructures(Chunk chunk, int i, int j) {
if (this.o) {
@ -221,10 +221,10 @@ index 88d0374..168d071 100644
}
}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderHell.java b/src/main/java/net/minecraft/server/ChunkProviderHell.java
index 0150efd..d17a6fd 100644
index d758625..1420b14 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderHell.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderHell.java
@@ -148,7 +148,10 @@ public class ChunkProviderHell implements ChunkGenerator {
@@ -149,7 +149,10 @@ public class ChunkProviderHell implements ChunkGenerator {
IBlockData iblockdata1 = ChunkProviderHell.b;
for (int l1 = 127; l1 >= 0; --l1) {
@ -236,7 +236,7 @@ index 0150efd..d17a6fd 100644
IBlockData iblockdata2 = chunksnapshot.a(i1, l1, l);
if (iblockdata2.getBlock() != null && iblockdata2.getMaterial() != Material.AIR) {
@@ -364,6 +367,6 @@ public class ChunkProviderHell implements ChunkGenerator {
@@ -366,6 +369,6 @@ public class ChunkProviderHell implements ChunkGenerator {
}
public void recreateStructures(Chunk chunk, int i, int j) {
@ -245,10 +245,10 @@ index 0150efd..d17a6fd 100644
}
}
diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java
index 22d96e9..83d9509 100644
index 4b4cf89..4b7e34c 100644
--- a/src/main/java/net/minecraft/server/StructureGenerator.java
+++ b/src/main/java/net/minecraft/server/StructureGenerator.java
@@ -90,6 +90,7 @@ public abstract class StructureGenerator extends WorldGenBase {
@@ -89,6 +89,7 @@ public abstract class StructureGenerator extends WorldGenBase {
}
public boolean b(BlockPosition blockposition) {
@ -256,14 +256,14 @@ index 22d96e9..83d9509 100644
this.a(this.g);
return this.c(blockposition) != null;
}
@@ -117,6 +118,7 @@ public abstract class StructureGenerator extends WorldGenBase {
@@ -116,6 +117,7 @@ public abstract class StructureGenerator extends WorldGenBase {
}
public boolean b(World world, BlockPosition blockposition) {
public synchronized boolean b(World world, BlockPosition blockposition) { // CraftBukkit - synchronized
+ if (this.g == null) return false; // Paper
this.a(world);
Iterator iterator = this.c.values().iterator();
--
2.7.4
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 5fbcaa4e972f9256ae7660441955f23a98148ee1 Mon Sep 17 00:00:00 2001
From f537cf6b939037c60801e039483949925bf390c5 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 11:59:48 -0600
Subject: [PATCH] Optimize explosions
@ -25,7 +25,7 @@ index af2491e..54e31ca 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
index ae49403..7e99b7d 100644
index de74fb7..8e225a5 100644
--- a/src/main/java/net/minecraft/server/Explosion.java
+++ b/src/main/java/net/minecraft/server/Explosion.java
@@ -129,7 +129,7 @@ public class Explosion {
@ -124,10 +124,10 @@ index ae49403..7e99b7d 100644
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 75f2605..d515dcb 100644
index fcc1214..5925e2c 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -898,6 +898,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -903,6 +903,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
worldserver.getTracker().updatePlayers();
this.methodProfiler.b();
this.methodProfiler.b();
@ -136,10 +136,10 @@ index 75f2605..d515dcb 100644
// this.i[i][this.ticks % 100] = System.nanoTime() - j; // CraftBukkit
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 1793995..a9cda67 100644
index 77cfd3f..71159b4 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -16,6 +16,7 @@ import java.util.concurrent.Callable;
@@ -16,6 +16,7 @@ import javax.annotation.Nullable;
// CraftBukkit start
import com.google.common.collect.Maps;
@ -156,5 +156,5 @@ index 1793995..a9cda67 100644
public CraftWorld getWorld() {
return this.world;
--
2.8.1
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 83f33bd21ad4907eed1e0903875bdb7e2b3b0a2a Mon Sep 17 00:00:00 2001
From 772d424160249d441b16bf2be8fb59d5f607c182 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 12:20:52 -0600
Subject: [PATCH] Fast draining
@ -21,7 +21,7 @@ index 54e31ca..f2babb1 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/BlockFlowing.java b/src/main/java/net/minecraft/server/BlockFlowing.java
index 1f07f82..517c1e8 100644
index 9e88d2d..de10bc4 100644
--- a/src/main/java/net/minecraft/server/BlockFlowing.java
+++ b/src/main/java/net/minecraft/server/BlockFlowing.java
@@ -74,7 +74,7 @@ public class BlockFlowing extends BlockFluids {
@ -42,16 +42,28 @@ index 1f07f82..517c1e8 100644
world.setAir(blockposition);
} else {
iblockdata = iblockdata.set(BlockFlowing.LEVEL, Integer.valueOf(i1));
@@ -288,4 +288,52 @@ public class BlockFlowing extends BlockFluids {
@@ -275,6 +275,7 @@ public class BlockFlowing extends BlockFluids {
}
+ // Paper start
/**
* Paper - Get flow speed. Throttle if its water and flowing adjacent to lava
*/
@@ -288,4 +289,57 @@ public class BlockFlowing extends BlockFluids {
}
return super.a(world);
}
+
+ private int getFluidLevel(IBlockAccess iblockaccess, BlockPosition blockposition) {
+ return iblockaccess.getType(blockposition).getMaterial() == this.material ? iblockaccess.getType(blockposition).get(BlockFluids.LEVEL) : -1;
+ }
+
+ /**
+ * Paper - Data check method for fast draining
+ */
+ public int getData(World world, BlockPosition position) {
+ int data = this.c((IBlockAccess) world, position);
+ int data = this.getFluidLevel((IBlockAccess) world, position);
+ return data < 8 ? data : 0;
+ }
+
@ -94,7 +106,8 @@ index 1f07f82..517c1e8 100644
+ }
+ return result;
+ }
+ // Paper end
}
--
2.7.4
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 29936727db751db597a05c48da18d19e272bad05 Mon Sep 17 00:00:00 2001
From 068efa1fbc02bc6da886f9d426d21109166ee9cd Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 12:27:07 -0600
Subject: [PATCH] Configurable lava flow speed
@ -21,10 +21,10 @@ index f2babb1..ba7184f 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/BlockFlowing.java b/src/main/java/net/minecraft/server/BlockFlowing.java
index 517c1e8..51b80cb 100644
index de10bc4..2eb8622 100644
--- a/src/main/java/net/minecraft/server/BlockFlowing.java
+++ b/src/main/java/net/minecraft/server/BlockFlowing.java
@@ -279,6 +279,9 @@ public class BlockFlowing extends BlockFluids {
@@ -280,6 +280,9 @@ public class BlockFlowing extends BlockFluids {
* Paper - Get flow speed. Throttle if its water and flowing adjacent to lava
*/
public int getFlowSpeed(World world, BlockPosition blockposition) {
@ -35,5 +35,5 @@ index 517c1e8..51b80cb 100644
world.getType(blockposition.north(1)).getBlock().material == Material.LAVA ||
world.getType(blockposition.south(1)).getBlock().material == Material.LAVA ||
--
2.7.4
2.8.2

Datei anzeigen

@ -1,14 +1,14 @@
From a957633c889b9135b6f3a6fc0c9cf28d30beeb4a Mon Sep 17 00:00:00 2001
From 515d4a8639a67827a06af6b0d6d8dacb9f19d653 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 14:35:27 -0600
Subject: [PATCH] Add player view distance API
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index dffc6d9..184b9c2 100644
index 48376e8..032c514 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -53,6 +53,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -54,6 +54,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public boolean f;
public int ping;
public boolean viewingCredits;
@ -25,10 +25,10 @@ index dffc6d9..184b9c2 100644
// CraftBukkit start
public String displayName;
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 8ef7eb2..d7cbe31 100644
index b0249ff..77e9187 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -43,7 +43,7 @@ public class PlayerChunkMap {
@@ -46,7 +46,7 @@ public class PlayerChunkMap {
private final List<PlayerChunk> g = Lists.newLinkedList();
private final List<PlayerChunk> h = Lists.newLinkedList();
private final List<PlayerChunk> i = Lists.newArrayList();
@ -37,7 +37,7 @@ index 8ef7eb2..d7cbe31 100644
private long k;
private boolean l = true;
private boolean m = true;
@@ -284,8 +284,11 @@ public class PlayerChunkMap {
@@ -288,8 +288,11 @@ public class PlayerChunkMap {
int i = (int) entityplayer.d >> 4;
int j = (int) entityplayer.e >> 4;
@ -48,10 +48,10 @@ index 8ef7eb2..d7cbe31 100644
+ for (int k = i - viewDistance; k <= i + viewDistance; ++k) {
+ for (int l = j - viewDistance; l <= j + viewDistance; ++l) {
+ // Paper end
PlayerChunk playerchunk = this.b(k, l);
PlayerChunk playerchunk = this.getChunk(k, l);
if (playerchunk != null) {
@@ -315,7 +318,9 @@ public class PlayerChunkMap {
@@ -319,7 +322,9 @@ public class PlayerChunkMap {
if (d2 >= 64.0D) {
int k = (int) entityplayer.d >> 4;
int l = (int) entityplayer.e >> 4;
@ -62,7 +62,7 @@ index 8ef7eb2..d7cbe31 100644
int j1 = i - k;
int k1 = j - l;
@@ -324,7 +329,7 @@ public class PlayerChunkMap {
@@ -328,7 +333,7 @@ public class PlayerChunkMap {
if (j1 != 0 || k1 != 0) {
for (int l1 = i - i1; l1 <= i + i1; ++l1) {
for (int i2 = j - i1; i2 <= j + i1; ++i2) {
@ -71,7 +71,7 @@ index 8ef7eb2..d7cbe31 100644
// this.c(l1, i2).a(entityplayer);
chunksToLoad.add(new ChunkCoordIntPair(l1, i2)); // CraftBukkit
}
@@ -471,4 +476,42 @@ public class PlayerChunkMap {
@@ -480,4 +485,20 @@ public class PlayerChunkMap {
}
}
// CraftBukkit end
@ -81,44 +81,22 @@ index 8ef7eb2..d7cbe31 100644
+ final int oldViewDistance = player.getViewDistance();
+
+ int viewDistance = MathHelper.clamp(toSet, 3, 32);
+ if (viewDistance != oldViewDistance) {
+ int cx = (int) player.locX >> 4;
+ int cz = (int) player.locZ >> 4;
+
+ if (viewDistance - oldViewDistance > 0) {
+ for (int x = cx - viewDistance; x <= cx + viewDistance; ++x) {
+ for (int z = cz - viewDistance; z <= cz + viewDistance; ++z) {
+ PlayerChunk playerchunkmap_playerchunk = this.c(x, z);
+
+ if (!playerchunkmap_playerchunk.c.contains(player)) {
+ playerchunkmap_playerchunk.a(player);
+ }
+ }
+ }
+ } else {
+ for (int x = cx - oldViewDistance; x <= cx + oldViewDistance; ++x) {
+ for (int z = cz - oldViewDistance; z <= cz + oldViewDistance; ++z) {
+ if (!this.a(x, z, cx, cz, viewDistance)) {
+ this.c(x, z).b(player);
+ }
+ }
+ }
+ }
+
+ player.setViewDistance(viewDistance);
+ if (toSet < 0) {
+ viewDistance = -1;
+ }
+
+ if (toSet == -1) {
+ player.setViewDistance(-1);
+ if (viewDistance != oldViewDistance) {
+ removePlayer(player);
+ player.setViewDistance(viewDistance);
+ addPlayer(player);
+ }
+ }
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 64bd053..4abf441 100644
index 5515958..9770c99 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1416,6 +1416,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1419,6 +1419,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.getHandle().affectsSpawning;
}
@ -136,5 +114,5 @@ index 64bd053..4abf441 100644
private final Player.Spigot spigot = new Player.Spigot()
{
--
2.8.1
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 3581a2e5e5939c6c04e3fc2d933c69bc9b80913b Mon Sep 17 00:00:00 2001
From 9fa5a8960f44a4e590ecc89bb30ee7e27559d2e3 Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 14:48:03 -0600
Subject: [PATCH] Disable explosion knockback
@ -19,10 +19,10 @@ index ba7184f..2626f81 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index e6f59da..017377e 100644
index 4d7be74..7fd8585 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -861,12 +861,14 @@ public abstract class EntityLiving extends Entity {
@@ -864,12 +864,14 @@ public abstract class EntityLiving extends Entity {
}
}
@ -37,17 +37,17 @@ index e6f59da..017377e 100644
this.world.broadcastEntityEffect(this, (byte) 2);
}
@@ -890,6 +892,8 @@ public abstract class EntityLiving extends Entity {
@@ -893,6 +895,8 @@ public abstract class EntityLiving extends Entity {
}
}
+ if (knockbackCancelled) this.world.broadcastEntityEffect(this, (byte) 2); // Paper - Disable explosion knockback
+
if (this.getHealth() <= 0.0F) {
SoundEffect soundeffect = this.bS();
SoundEffect soundeffect = this.bT();
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
index 7e99b7d..91540c7 100644
index 8e225a5..28261c5 100644
--- a/src/main/java/net/minecraft/server/Explosion.java
+++ b/src/main/java/net/minecraft/server/Explosion.java
@@ -145,7 +145,7 @@ public class Explosion {
@ -69,5 +69,5 @@ index 7e99b7d..91540c7 100644
}
}
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From be317dc17fede314dc8eb7272dad275a5d1bffd8 Mon Sep 17 00:00:00 2001
From ea9b69cddde0863bd7aedf3d4166380c99708377 Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 14:52:43 -0600
Subject: [PATCH] Disable thunder
@ -19,10 +19,10 @@ index 2626f81..1a341d8 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 433ed2a..1a615e5 100644
index 4980c7a..bef2dab 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -421,7 +421,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -423,7 +423,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
int l;
BlockPosition blockposition;
@ -33,5 +33,5 @@ index 433ed2a..1a615e5 100644
l = this.l >> 2;
blockposition = this.a(new BlockPosition(j + (l & 15), 0, k + (l >> 8 & 15)));
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 83193b8f541bf99bcd90315d922aba757d865f34 Mon Sep 17 00:00:00 2001
From 36e96a6be9ba5842cc48f7693975aa1f9463fea6 Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 14:57:24 -0600
Subject: [PATCH] Disable ice and snow
@ -19,10 +19,10 @@ index 1a341d8..d8bc932 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 1a615e5..c5b08f9 100644
index bef2dab..c7e5226 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -445,7 +445,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -447,7 +447,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
}
this.methodProfiler.c("iceandsnow");
@ -32,5 +32,5 @@ index 1a615e5..c5b08f9 100644
l = this.l >> 2;
blockposition = this.p(new BlockPosition(j + (l & 15), 0, k + (l >> 8 & 15)));
--
2.8.0
2.8.2

Datei anzeigen

@ -1,319 +0,0 @@
From 47c10005c1cb4d456fedc26eaf6d8c4747204527 Mon Sep 17 00:00:00 2001
From: Iceee <andrew@opticgaming.tv>
Date: Wed, 2 Mar 2016 23:00:53 -0600
Subject: [PATCH] Configurable TNT cannon fix
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 7028730..abed8ea 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -231,4 +231,10 @@ public class PaperWorldConfig {
private void mobSpawnerTickRate() {
mobSpawnerTickRate = getInt("mob-spawner-tick-rate", 1);
}
+
+ public boolean fixCannons;
+ private void fixCannons() {
+ fixCannons = getBoolean("fix-cannons", false);
+ log("Fix TNT cannons: " + fixCannons);
+ }
}
diff --git a/src/main/java/net/minecraft/server/BlockDiodeAbstract.java b/src/main/java/net/minecraft/server/BlockDiodeAbstract.java
index ffc07cd..64aaba4 100644
--- a/src/main/java/net/minecraft/server/BlockDiodeAbstract.java
+++ b/src/main/java/net/minecraft/server/BlockDiodeAbstract.java
@@ -76,6 +76,17 @@ public abstract class BlockDiodeAbstract extends BlockFacingHorizontal {
} else {
this.b(world, blockposition, iblockdata, 0);
world.setAir(blockposition);
+ // Paper start - Fix cannons
+ if (world.paperConfig.fixCannons) {
+ world.applyPhysics(blockposition.shift(EnumDirection.EAST), this);
+ world.applyPhysics(blockposition.shift(EnumDirection.WEST), this);
+ world.applyPhysics(blockposition.shift(EnumDirection.SOUTH), this);
+ world.applyPhysics(blockposition.shift(EnumDirection.NORTH), this);
+ world.applyPhysics(blockposition.shift(EnumDirection.DOWN), this);
+ world.applyPhysics(blockposition.shift(EnumDirection.UP), this);
+ return;
+ }
+ // Paper end
EnumDirection[] aenumdirection = EnumDirection.values();
int i = aenumdirection.length;
@@ -173,6 +184,17 @@ public abstract class BlockDiodeAbstract extends BlockFacingHorizontal {
public void postBreak(World world, BlockPosition blockposition, IBlockData iblockdata) {
if (this.d) {
+ // Paper start - Fix cannons
+ if (world.paperConfig.fixCannons) {
+ world.applyPhysics(blockposition.shift(EnumDirection.EAST), this);
+ world.applyPhysics(blockposition.shift(EnumDirection.WEST), this);
+ world.applyPhysics(blockposition.shift(EnumDirection.NORTH), this);
+ world.applyPhysics(blockposition.shift(EnumDirection.SOUTH), this);
+ world.applyPhysics(blockposition.shift(EnumDirection.DOWN), this);
+ world.applyPhysics(blockposition.shift(EnumDirection.UP), this);
+ return;
+ }
+ // Paper end
EnumDirection[] aenumdirection = EnumDirection.values();
int i = aenumdirection.length;
diff --git a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java
index cce1cd7..7f5a112 100644
--- a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java
+++ b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java
@@ -52,6 +52,17 @@ public class BlockRedstoneTorch extends BlockTorch {
public void onPlace(World world, BlockPosition blockposition, IBlockData iblockdata) {
if (this.isOn) {
+ // Paper start - Fix cannons
+ if (world.paperConfig.fixCannons) {
+ world.applyPhysics(blockposition.shift(EnumDirection.DOWN), this);
+ world.applyPhysics(blockposition.shift(EnumDirection.UP), this);
+ world.applyPhysics(blockposition.shift(EnumDirection.WEST), this);
+ world.applyPhysics(blockposition.shift(EnumDirection.EAST), this);
+ world.applyPhysics(blockposition.shift(EnumDirection.SOUTH), this);
+ world.applyPhysics(blockposition.shift(EnumDirection.NORTH), this);
+ return;
+ }
+ // Paper end
EnumDirection[] aenumdirection = EnumDirection.values();
int i = aenumdirection.length;
@@ -66,6 +77,17 @@ public class BlockRedstoneTorch extends BlockTorch {
public void remove(World world, BlockPosition blockposition, IBlockData iblockdata) {
if (this.isOn) {
+ // Paper start - Fix cannons
+ if (world.paperConfig.fixCannons) {
+ world.applyPhysics(blockposition.shift(EnumDirection.DOWN), this);
+ world.applyPhysics(blockposition.shift(EnumDirection.UP), this);
+ world.applyPhysics(blockposition.shift(EnumDirection.WEST), this);
+ world.applyPhysics(blockposition.shift(EnumDirection.EAST), this);
+ world.applyPhysics(blockposition.shift(EnumDirection.SOUTH), this);
+ world.applyPhysics(blockposition.shift(EnumDirection.NORTH), this);
+ return;
+ }
+ // Paper end
EnumDirection[] aenumdirection = EnumDirection.values();
int i = aenumdirection.length;
diff --git a/src/main/java/net/minecraft/server/BlockRedstoneWire.java b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
index 1a133d9..f4f9be6 100644
--- a/src/main/java/net/minecraft/server/BlockRedstoneWire.java
+++ b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
@@ -184,6 +184,17 @@ public class BlockRedstoneWire extends Block {
}
this.B.add(blockposition);
+ // Paper start - Fix cannons
+ if (world.paperConfig.fixCannons) {
+ this.B.add(blockposition.shift(EnumDirection.WEST));
+ this.B.add(blockposition.shift(EnumDirection.EAST));
+ this.B.add(blockposition.shift(EnumDirection.DOWN));
+ this.B.add(blockposition.shift(EnumDirection.UP));
+ this.B.add(blockposition.shift(EnumDirection.NORTH));
+ this.B.add(blockposition.shift(EnumDirection.SOUTH));
+ return iblockdata;
+ }
+ // Paper end
EnumDirection[] aenumdirection = EnumDirection.values();
int i1 = aenumdirection.length;
@@ -200,6 +211,17 @@ public class BlockRedstoneWire extends Block {
private void b(World world, BlockPosition blockposition) {
if (world.getType(blockposition).getBlock() == this) {
world.applyPhysics(blockposition, this);
+ // Paper start - Fix cannons
+ if (world.paperConfig.fixCannons) {
+ world.applyPhysics(blockposition.shift(EnumDirection.WEST), this);
+ world.applyPhysics(blockposition.shift(EnumDirection.EAST), this);
+ world.applyPhysics(blockposition.shift(EnumDirection.NORTH), this);
+ world.applyPhysics(blockposition.shift(EnumDirection.SOUTH), this);
+ world.applyPhysics(blockposition.shift(EnumDirection.DOWN), this);
+ world.applyPhysics(blockposition.shift(EnumDirection.UP), this);
+ return;
+ }
+ // Paper end
EnumDirection[] aenumdirection = EnumDirection.values();
int i = aenumdirection.length;
diff --git a/src/main/java/net/minecraft/server/BlockTNT.java b/src/main/java/net/minecraft/server/BlockTNT.java
index 3b799bf..e6c0ffb 100644
--- a/src/main/java/net/minecraft/server/BlockTNT.java
+++ b/src/main/java/net/minecraft/server/BlockTNT.java
@@ -29,7 +29,11 @@ public class BlockTNT extends Block {
public void wasExploded(World world, BlockPosition blockposition, Explosion explosion) {
if (!world.isClientSide) {
- EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double) ((float) blockposition.getX() + 0.5F), (double) blockposition.getY(), (double) ((float) blockposition.getZ() + 0.5F), explosion.getSource());
+ // Paper start - Fix cannons
+ double y = blockposition.getY();
+ if (!world.paperConfig.fixCannons) y += 0.5;
+ EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double) ((float) blockposition.getX() + 0.5F), y, (double) ((float) blockposition.getZ() + 0.5F), explosion.getSource());
+ // Paper end
entitytntprimed.setFuseTicks((short) (world.random.nextInt(entitytntprimed.getFuseTicks() / 4) + entitytntprimed.getFuseTicks() / 8));
world.addEntity(entitytntprimed);
@@ -43,7 +47,11 @@ public class BlockTNT extends Block {
public void a(World world, BlockPosition blockposition, IBlockData iblockdata, EntityLiving entityliving) {
if (!world.isClientSide) {
if (((Boolean) iblockdata.get(BlockTNT.EXPLODE)).booleanValue()) {
- EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double) ((float) blockposition.getX() + 0.5F), (double) blockposition.getY(), (double) ((float) blockposition.getZ() + 0.5F), entityliving);
+ // Paper start - Fix cannons
+ double y = blockposition.getY();
+ if (!world.paperConfig.fixCannons) y += 0.5;
+ EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double) ((float) blockposition.getX() + 0.5F), y, (double) ((float) blockposition.getZ() + 0.5F), entityliving);
+ // Paper end
world.addEntity(entitytntprimed);
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 392e2fa..a93a990 100644
--- a/src/main/java/net/minecraft/server/DispenserRegistry.java
+++ b/src/main/java/net/minecraft/server/DispenserRegistry.java
@@ -497,7 +497,11 @@ public class DispenserRegistry {
org.bukkit.block.Block block = world.getWorld().getBlockAt(isourceblock.getBlockPosition().getX(), isourceblock.getBlockPosition().getY(), isourceblock.getBlockPosition().getZ());
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
- BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector((double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D));
+ // Paper start - Fix cannons
+ double y = blockposition.getY();
+ if (!world.paperConfig.fixCannons) y += 0.5;
+ BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector((double) blockposition.getX() + 0.5D, y, (double) blockposition.getZ() + 0.5D));
+ // Paper end
if (!BlockDispenser.eventFired) {
world.getServer().getPluginManager().callEvent(event);
}
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
index 8f2b253..23fb154 100644
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
@@ -274,4 +274,22 @@ public class EntityFallingBlock extends Entity {
public boolean br() {
return true;
}
+
+ // Paper start - Fix cannons
+ @Override
+ public double f(double d0, double d1, double d2) {
+ if (!world.paperConfig.fixCannons) return super.f(d0, d1, d2);
+
+ double d3 = this.locX - d0;
+ double d4 = this.locY + this.getHeadHeight() - d1;
+ double d5 = this.locZ - d2;
+
+ return (double) MathHelper.sqrt(d3 * d3 + d4 * d4 + d5 * d5);
+ }
+
+ @Override
+ public float getHeadHeight() {
+ return world.paperConfig.fixCannons ? this.length / 2 : super.getHeadHeight();
+ }
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index 1113b1c..12feacf 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -30,6 +30,7 @@ public class EntityTNTPrimed extends Entity {
this.lastY = d1;
this.lastZ = d2;
this.source = entityliving;
+ if (world.paperConfig.fixCannons) this.motX = this.motZ = 0.0F; // Paper - Fix cannons
}
protected void i() {
@@ -118,9 +119,66 @@ public class EntityTNTPrimed extends Entity {
return this.source;
}
+ // Paper start - Fix cannons
+ @Override
+ public double f(double d0, double d1, double d2) {
+ if (!world.paperConfig.fixCannons) return super.f(d0, d1, d2);
+
+ double d3 = this.locX - d0;
+ double d4 = this.locY + this.getHeadHeight() - d1;
+ double d5 = this.locZ - d2;
+
+ return (double) MathHelper.sqrt(d3 * d3 + d4 * d4 + d5 * d5);
+ }
+
+ @Override
+ public boolean bd() {
+ return !world.paperConfig.fixCannons && super.bd();
+ }
+
+ @Override
public float getHeadHeight() {
- return 0.0F;
+ return world.paperConfig.fixCannons ? this.length / 2 : 0.0F;
+ }
+
+ /**
+ * Author: Jedediah Smith <jedediah@silencegreys.com>
+ */
+ @Override
+ public boolean aj() {
+ if (!world.paperConfig.fixCannons) return super.aj();
+
+ // Preserve velocity while calling the super method
+ double oldMotX = this.motX;
+ double oldMotY = this.motY;
+ double oldMotZ = this.motZ;
+
+ super.aj();
+
+ this.motX = oldMotX;
+ this.motY = oldMotY;
+ this.motZ = oldMotZ;
+
+ if (this.inWater) {
+ // Send position and velocity updates to nearby players on every tick while the TNT is in water.
+ // This does pretty well at keeping their clients in sync with the server.
+ EntityTrackerEntry ete = ((WorldServer) this.getWorld()).getTracker().trackedEntities.get(this.getId());
+ if (ete != null) {
+ PacketPlayOutEntityVelocity velocityPacket = new PacketPlayOutEntityVelocity(this);
+ PacketPlayOutEntityTeleport positionPacket = new PacketPlayOutEntityTeleport(this);
+
+ for (EntityPlayer viewer : ete.trackedPlayers) {
+ if ((viewer.locX - this.locX) * (viewer.locY - this.locY) * (viewer.locZ - this.locZ) < 16 * 16) {
+ viewer.playerConnection.sendPacket(velocityPacket);
+ viewer.playerConnection.sendPacket(positionPacket);
+ }
+ }
+ }
+ }
+
+ return this.inWater;
}
+ // Paper end
public void setFuseTicks(int i) {
this.datawatcher.set(EntityTNTPrimed.FUSE_TICKS, Integer.valueOf(i));
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
index 91540c7..209b470 100644
--- a/src/main/java/net/minecraft/server/Explosion.java
+++ b/src/main/java/net/minecraft/server/Explosion.java
@@ -148,9 +148,16 @@ public class Explosion {
d14 = entity instanceof EntityHuman && world.paperConfig.disableExplosionKnockback ? 0 : EnchantmentProtection.a((EntityLiving) entity, d13); // Paper - Disable explosion knockback
}
+ // Paper start - Fix cannons
+ /*
entity.motX += d8 * d14;
entity.motY += d9 * d14;
entity.motZ += d10 * d14;
+ */
+ // This impulse method sets the dirty flag, so clients will get an immediate velocity update
+ entity.g(d8 * d14, d9 * d14, d10 * d14);
+ // Paper end
+
if (entity instanceof EntityHuman) {
EntityHuman entityhuman = (EntityHuman) entity;
--
2.7.4

Datei anzeigen

@ -1,11 +1,11 @@
From 4cb89212841a3259484ca781c652b0245884f5a2 Mon Sep 17 00:00:00 2001
From 1d7c79814eac0930e924fa43fb4f023faf315b96 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Wed, 2 Mar 2016 23:13:07 -0600
Subject: [PATCH] Send absolute position the first time an entity is seen
diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
index f8570a8..1602dff 100644
index d820ba8..6c8da79 100644
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
@@ -41,7 +41,12 @@ public class EntityTrackerEntry {
@ -93,5 +93,5 @@ index f8570a8..1602dff 100644
entityplayer.playerConnection.sendPacket(packet);
--
2.8.0
2.8.2

Datei anzeigen

@ -1,14 +1,14 @@
From e1c0beb6e759e4ba5f108b9f1ac5f9c3fdd4b154 Mon Sep 17 00:00:00 2001
From 44536adaf25c092b8223739374361ebc14b260bf Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 23:30:53 -0600
Subject: [PATCH] Add BeaconEffectEvent
diff --git a/src/main/java/net/minecraft/server/TileEntityBeacon.java b/src/main/java/net/minecraft/server/TileEntityBeacon.java
index ed5b374..85b1441 100644
index bb771c1..77170aa 100644
--- a/src/main/java/net/minecraft/server/TileEntityBeacon.java
+++ b/src/main/java/net/minecraft/server/TileEntityBeacon.java
@@ -13,6 +13,15 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity;
@@ -14,6 +14,15 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity;
import org.bukkit.entity.HumanEntity;
// CraftBukkit end
@ -24,7 +24,7 @@ index ed5b374..85b1441 100644
public class TileEntityBeacon extends TileEntityContainer implements ITickable, IWorldInventory {
public static final MobEffectList[][] a = new MobEffectList[][] { { MobEffects.FASTER_MOVEMENT, MobEffects.FASTER_DIG}, { MobEffects.RESISTANCE, MobEffects.JUMP}, { MobEffects.INCREASE_DAMAGE}, { MobEffects.REGENERATION}};
@@ -85,17 +94,33 @@ public class TileEntityBeacon extends TileEntityContainer implements ITickable,
@@ -88,17 +97,33 @@ public class TileEntityBeacon extends TileEntityContainer implements ITickable,
EntityHuman entityhuman;

Datei anzeigen

@ -1,16 +1,16 @@
From 76e860a49ebe0052a395fbbc5d908147fbdd123a Mon Sep 17 00:00:00 2001
From cf030fd51a742b785df6b038a2a66591fdb5b5b8 Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 23:34:44 -0600
Subject: [PATCH] Configurable container update tick rate
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index abed8ea..8b76052 100644
index 7028730..12440dc 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -237,4 +237,9 @@ public class PaperWorldConfig {
fixCannons = getBoolean("fix-cannons", false);
log("Fix TNT cannons: " + fixCannons);
@@ -231,4 +231,9 @@ public class PaperWorldConfig {
private void mobSpawnerTickRate() {
mobSpawnerTickRate = getInt("mob-spawner-tick-rate", 1);
}
+
+ public int containerUpdateTickRate;
@ -19,10 +19,10 @@ index abed8ea..8b76052 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 184b9c2..4bf8344 100644
index 032c514..723d40c 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -62,6 +62,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -63,6 +63,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.viewDistance = viewDistance;
}
// Paper end
@ -30,7 +30,7 @@ index 184b9c2..4bf8344 100644
// CraftBukkit start
public String displayName;
@@ -207,7 +208,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -208,7 +209,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
--this.noDamageTicks;
}
@ -45,5 +45,5 @@ index 184b9c2..4bf8344 100644
this.closeInventory();
this.activeContainer = this.defaultContainer;
--
2.8.1
2.8.2

Datei anzeigen

@ -1,14 +1,14 @@
From dd8cd2c8b782274b95bb4a1318b35823783594fb Mon Sep 17 00:00:00 2001
From d9bae1b188028fa421ed5f26e207ba39a8202049 Mon Sep 17 00:00:00 2001
From: Iceee <andrew@opticgaming.tv>
Date: Wed, 2 Mar 2016 23:38:52 -0600
Subject: [PATCH] Fix lava/water some times creating air instead of cobblestone
diff --git a/src/main/java/net/minecraft/server/BlockFluids.java b/src/main/java/net/minecraft/server/BlockFluids.java
index cdbb7a4..c5f052a 100644
index a076f4d..93bfd53 100644
--- a/src/main/java/net/minecraft/server/BlockFluids.java
+++ b/src/main/java/net/minecraft/server/BlockFluids.java
@@ -166,7 +166,7 @@ public abstract class BlockFluids extends Block {
@@ -169,7 +169,7 @@ public abstract class BlockFluids extends Block {
return true;
}
@ -18,5 +18,5 @@ index cdbb7a4..c5f052a 100644
this.fizz(world, blockposition);
return true;
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 29fa1b0750cdafb845d8155c40148f595ec36495 Mon Sep 17 00:00:00 2001
From 12a6ea83e2f556fbff99c3704d30b3251d382824 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com>
Date: Wed, 2 Mar 2016 23:42:37 -0600
Subject: [PATCH] Use UserCache for player heads
@ -32,5 +32,5 @@ index 2abca0c..7d83bbe 100644
return true;
--
2.8.0
2.8.2

Datei anzeigen

@ -1,14 +1,14 @@
From 0011716db31efd84a96342fabf79e81347b27e8c Mon Sep 17 00:00:00 2001
From be1c32e1306b4b5713bc1046bdc234f3827f7407 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 a9cda67..af43a87 100644
index 71159b4..5adc297 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1423,10 +1423,10 @@ public abstract class World implements IBlockAccess {
@@ -1428,10 +1428,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 a9cda67..af43a87 100644
tickPosition = (tickPosition < entityList.size()) ? tickPosition : 0;
entity = (Entity) this.entityList.get(this.tickPosition);
// CraftBukkit end
@@ -1491,9 +1491,7 @@ public abstract class World implements IBlockAccess {
@@ -1496,9 +1496,7 @@ public abstract class World implements IBlockAccess {
// Spigot start
// Iterator iterator = this.tileEntityListTick.iterator();
int tilesThisCycle = 0;
@ -35,5 +35,5 @@ index a9cda67..af43a87 100644
TileEntity tileentity = (TileEntity) this.tileEntityListTick.get(tileTickPosition);
// Spigot start
--
2.8.0
2.8.2

Datei anzeigen

@ -1,11 +1,11 @@
From cfb5df1da603ebc43de33db270bf0ec32836ee3c Mon Sep 17 00:00:00 2001
From 2a6a8a92552ab6784e8995cfca8f38973f10064a Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Wed, 2 Mar 2016 23:46:57 -0600
Subject: [PATCH] Configurable Chunk IO Thread Base Count
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index f75b758..1b8165c 100644
index f9a4bf4..1ea409d 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -192,4 +192,9 @@ public class PaperConfig {

Datei anzeigen

@ -1,4 +1,4 @@
From d97d5c88e8438283e42818c51ea7d68c1102e28a Mon Sep 17 00:00:00 2001
From a6f71203988b2af1497b585b28018f1b7bbed9c1 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 2 Mar 2016 23:51:51 -0600
Subject: [PATCH] Don't create Region File's when checking if chunk exists
@ -7,10 +7,10 @@ Plugins like Dynmap can end up creating tons of emtpy Region Files
when using chunkExists.
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 5d77c92..eb13bc9 100644
index f6e286f..da7d7fe 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -38,7 +38,10 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
@@ -39,7 +39,10 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
}
}
@ -49,5 +49,5 @@ index 5528019..01a08d4 100644
file1.mkdirs();
}
--
2.8.0
2.8.2

Datei anzeigen

@ -1,20 +1,20 @@
From 953114a5206b9fffd1d9b46aae12c9a520e53add Mon Sep 17 00:00:00 2001
From 0241d5c821cff01bc4ad9d4b1b3611338228a68a Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 2 Mar 2016 23:55:20 -0600
Subject: [PATCH] Don't create a chunk just to unload it
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 02ff463..dfa7e73 100644
index 898316f..46648bf 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -209,7 +209,13 @@ public class CraftWorld implements World {
@@ -213,7 +213,13 @@ public class CraftWorld implements World {
}
private boolean unloadChunk0(int x, int z, boolean save, boolean safe) {
- net.minecraft.server.Chunk chunk = world.getChunkProviderServer().getChunkAt(x, z);
+ // Paper start - Don't create a chunk just to unload it
+ net.minecraft.server.Chunk chunk = world.getChunkProviderServer().getChunkIfLoaded(x, z);
+ net.minecraft.server.Chunk chunk = world.getChunkProviderServer().getLoadedChunkAt(x, z);
+ if (chunk == null) {
+ return false;
+ }
@ -24,5 +24,5 @@ index 02ff463..dfa7e73 100644
save = true;
}
--
2.8.0.windows.1
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 4950c89748beaefcc27691878b089964e324068d Mon Sep 17 00:00:00 2001
From 36b56f93ab5dc09bea513f84f44b4f3c7e5ddcd3 Mon Sep 17 00:00:00 2001
From: Steve Anton <anxuiz.nx@gmail.com>
Date: Thu, 3 Mar 2016 00:09:38 -0600
Subject: [PATCH] Add PlayerInitialSpawnEvent
@ -6,10 +6,10 @@ Subject: [PATCH] Add PlayerInitialSpawnEvent
For modifying a player's initial spawn location as they join the server
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 52bece0..a6a4671 100644
index 13fa79f..a3c0b10 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -99,6 +99,21 @@ public abstract class PlayerList {
@@ -100,6 +100,21 @@ public abstract class PlayerList {
}
// CraftBukkit end
@ -32,5 +32,5 @@ index 52bece0..a6a4671 100644
entityplayer.playerInteractManager.a((WorldServer) entityplayer.world);
String s1 = "local";
--
2.8.0
2.8.2

Datei anzeigen

@ -1,14 +1,14 @@
From 1d96d8947dd9dcc848e7c9be4fb685d68cd04ddf Mon Sep 17 00:00:00 2001
From 89bf06e23661104544cf99f5fc23fe97abb1024e Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 01:13:45 -0600
Subject: [PATCH] Disable chest cat detection
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 8b76052..7fe2ab0 100644
index 12440dc..84dac97 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -242,4 +242,9 @@ public class PaperWorldConfig {
@@ -236,4 +236,9 @@ public class PaperWorldConfig {
private void containerUpdateTickRate() {
containerUpdateTickRate = getInt("container-update-tick-rate", 1);
}
@ -19,10 +19,10 @@ index 8b76052..7fe2ab0 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java
index 2fb9c76..5143d9e 100644
index 21be295..a5f2fc0 100644
--- a/src/main/java/net/minecraft/server/BlockChest.java
+++ b/src/main/java/net/minecraft/server/BlockChest.java
@@ -396,6 +396,11 @@ public class BlockChest extends BlockTileEntity {
@@ -399,6 +399,11 @@ public class BlockChest extends BlockTileEntity {
}
private boolean j(World world, BlockPosition blockposition) {
@ -35,5 +35,5 @@ index 2fb9c76..5143d9e 100644
EntityOcelot entityocelot;
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From dc3f5c3a2b42709931b94412de62e201ea099943 Mon Sep 17 00:00:00 2001
From 49a93c12b64029ade8efbe041717bfd6505976db Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 01:17:12 -0600
Subject: [PATCH] Ensure commands are not ran async
@ -14,10 +14,10 @@ big slowdown in execution but throwing an exception at same time to raise awaren
that it is happening so that plugin authors can fix their code to stop executing commands async.
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 3199c66..42456b6 100644
index 0c2c151..2cde490 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1265,6 +1265,29 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1264,6 +1264,29 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
}
if (!async && s.startsWith("/")) {
@ -82,5 +82,5 @@ index 14e5647..c6cee80 100644
return true;
}
--
2.8.0
2.8.2

Datei anzeigen

@ -1,14 +1,14 @@
From 727a1539c7a36c542d38491f6e6df38a63df04ae Mon Sep 17 00:00:00 2001
From 968d090e257dda79487473e2b8a264f676efa117 Mon Sep 17 00:00:00 2001
From: vemacs <d@nkmem.es>
Date: Thu, 3 Mar 2016 01:19:22 -0600
Subject: [PATCH] All chunks are slime spawn chunks toggle
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 7fe2ab0..0e03d9a 100644
index 84dac97..2b7a4dd 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -247,4 +247,9 @@ public class PaperWorldConfig {
@@ -241,4 +241,9 @@ public class PaperWorldConfig {
private void disableChestCatDetection() {
disableChestCatDetection = getBoolean("game-mechanics.disable-chest-cat-detection", false);
}
@ -19,19 +19,19 @@ index 7fe2ab0..0e03d9a 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java
index fbefa3e..da73220 100644
index 2fae2a9..170cb8a 100644
--- a/src/main/java/net/minecraft/server/EntitySlime.java
+++ b/src/main/java/net/minecraft/server/EntitySlime.java
@@ -243,7 +243,8 @@ public class EntitySlime extends EntityInsentient implements IMonster {
return super.cF();
@@ -245,7 +245,8 @@ public class EntitySlime extends EntityInsentient implements IMonster {
return super.cG();
}
- if (this.random.nextInt(10) == 0 && chunk.a(987234911L).nextInt(10) == 0 && this.locY < 40.0D) {
+ boolean isSlimeChunk = world.paperConfig.allChunksAreSlimeChunks || chunk.a(987234911L).nextInt(10) == 0;
+ if (this.random.nextInt(10) == 0 && isSlimeChunk && this.locY < 40.0D) {
return super.cF();
+ boolean isSlimeChunk = world.paperConfig.allChunksAreSlimeChunks || chunk.a(987234911L).nextInt(10) == 0; // Paper
+ if (this.random.nextInt(10) == 0 && isSlimeChunk && this.locY < 40.0D) { // Paper
return super.cG();
}
}
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From b8ff86f276a84f71244e65081715bac5e4e8375b Mon Sep 17 00:00:00 2001
From 098cb462c9c959f5b015dd13058fbb76619829d0 Mon Sep 17 00:00:00 2001
From: DemonWav <demonwav@gmail.com>
Date: Thu, 3 Mar 2016 01:44:39 -0600
Subject: [PATCH] Add Location support to tab completers (vanilla feature
@ -6,10 +6,10 @@ Subject: [PATCH] Add Location support to tab completers (vanilla feature
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 0e03d9a..a73542d 100644
index 2b7a4dd..246f3d9 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -252,4 +252,9 @@ public class PaperWorldConfig {
@@ -246,4 +246,9 @@ public class PaperWorldConfig {
private void allChunksAreSlimeChunks() {
allChunksAreSlimeChunks = getBoolean("all-chunks-are-slime-chunks", false);
}
@ -20,10 +20,10 @@ index 0e03d9a..a73542d 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index d515dcb..3420b8b 100644
index 5925e2c..f5e26df 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1184,7 +1184,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -1189,7 +1189,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
return arraylist;
}
*/
@ -151,5 +151,5 @@ index 100d84a..a40218c 100644
public static CommandSender lastSender = null; // Nasty :(
--
2.8.1
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 4657a4ff4a1209fd56404f3768f6a566c0c27bc6 Mon Sep 17 00:00:00 2001
From 992e43398a309df8c25659b1d0d0881a6b327a09 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 02:02:07 -0600
Subject: [PATCH] Optimize Pathfinding
@ -7,10 +7,10 @@ Prevents pathfinding from spamming failures for things such as
arrow attacks.
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
index 7cfe0af..9687785 100644
index 31e574c..61c0f55 100644
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
@@ -118,10 +118,26 @@ public abstract class NavigationAbstract {
@@ -123,10 +123,26 @@ public abstract class NavigationAbstract {
}
public boolean a(Entity entity, double d0) {
@ -36,9 +36,9 @@ index 7cfe0af..9687785 100644
+ private int pathfindFailures = 0;
+ // Paper end
public boolean a(PathEntity pathentity, double d0) {
public boolean a(@Nullable PathEntity pathentity, double d0) {
if (pathentity == null) {
@@ -254,6 +270,7 @@ public abstract class NavigationAbstract {
@@ -260,6 +276,7 @@ public abstract class NavigationAbstract {
}
public void o() {
@ -47,5 +47,5 @@ index 7cfe0af..9687785 100644
}
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 1d994e981c808ec7253ff3ed4f4020b41829510b Mon Sep 17 00:00:00 2001
From 7b8fd6c09c65c9bafae7bd58364797691be50cad Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 02:07:55 -0600
Subject: [PATCH] Optimize getBlockData
@ -6,10 +6,10 @@ Subject: [PATCH] Optimize getBlockData
Hot method, so reduce # of instructions for the method.
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 3b5e8c2..42fedb7 100644
index 3bcbbb9..08525d6 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -403,8 +403,15 @@ public class Chunk {
@@ -404,8 +404,15 @@ public class Chunk {
return this.a(i, j, k).c();
}
@ -27,5 +27,5 @@ index 3b5e8c2..42fedb7 100644
public IBlockData a(final int i, final int j, final int k) {
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From ffe9aada565efa029e3c8ebaed7c5e94b286dbe9 Mon Sep 17 00:00:00 2001
From c78c930892a7b03ed80dcf843aedb632fb1a8b4d Mon Sep 17 00:00:00 2001
From: CullanP <cullanpage@gmail.com>
Date: Thu, 3 Mar 2016 02:13:38 -0600
Subject: [PATCH] Avoid hopper searches if there are no items
@ -14,10 +14,10 @@ And since minecart hoppers are used _very_ rarely near we can avoid alot of sear
Combined, this adds up a lot.
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 42fedb7..13d43d5 100644
index 08525d6..300d625 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -46,6 +46,13 @@ public class Chunk {
@@ -47,6 +47,13 @@ public class Chunk {
protected gnu.trove.map.hash.TObjectIntHashMap<Class> entityCount = new gnu.trove.map.hash.TObjectIntHashMap<Class>(); // Spigot
public int lightUpdates; // Paper - Number of queued light updates for this chunk
@ -31,7 +31,7 @@ index 42fedb7..13d43d5 100644
// CraftBukkit start - Neighbor loaded cache for chunk lighting and entity ticking
private int neighbors = 0x1 << 12;
@@ -653,6 +660,13 @@ public class Chunk {
@@ -655,6 +662,13 @@ public class Chunk {
entity.ac = k;
entity.ad = this.locZ;
this.entitySlices[k].add(entity);
@ -45,7 +45,7 @@ index 42fedb7..13d43d5 100644
// Spigot start - increment creature type count
// Keep this synced up with World.a(Class)
if (entity instanceof EntityInsentient) {
@@ -685,6 +699,13 @@ public class Chunk {
@@ -687,6 +701,13 @@ public class Chunk {
}
this.entitySlices[i].remove(entity);
@ -59,7 +59,7 @@ index 42fedb7..13d43d5 100644
// Spigot start - decrement creature type count
// Keep this synced up with World.a(Class)
if (entity instanceof EntityInsentient) {
@@ -874,6 +895,15 @@ public class Chunk {
@@ -878,6 +899,15 @@ public class Chunk {
if (!this.entitySlices[k].isEmpty()) {
Iterator iterator = this.entitySlices[k].iterator();
@ -75,7 +75,7 @@ index 42fedb7..13d43d5 100644
while (iterator.hasNext()) {
Entity entity1 = (Entity) iterator.next();
@@ -906,7 +936,18 @@ public class Chunk {
@@ -910,7 +940,18 @@ public class Chunk {
i = MathHelper.clamp(i, 0, this.entitySlices.length - 1);
j = MathHelper.clamp(j, 0, this.entitySlices.length - 1);

Datei anzeigen

@ -1,4 +1,4 @@
From bd9643d3d3db14bda339720f3d3cebdf85c7dfed Mon Sep 17 00:00:00 2001
From ae2a2c8c665502da7624f701485c21920fdfec0f Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Thu, 3 Mar 2016 02:15:57 -0600
Subject: [PATCH] Expose server CommandMap
@ -17,5 +17,5 @@ index 3a288bd..794a2c9 100644
return commandMap;
}
--
2.8.0
2.8.2

Datei anzeigen

@ -1,11 +1,11 @@
From 198a36dc466f7b186affe2c3dc4bb79cf9704f18 Mon Sep 17 00:00:00 2001
From d161119c1c5608813fb96a56afc6ab967c087faf Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Thu, 3 Mar 2016 02:18:39 -0600
Subject: [PATCH] Be a bit more informative in maxHealth exception
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 8aa8686..aed3e4f 100644
index e662e4a..f13ca63 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -92,7 +92,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@ -21,5 +21,5 @@ index 8aa8686..aed3e4f 100644
if (entity instanceof EntityPlayer && health == 0) {
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 9299fe5f4a331e55ad997054df153d7b0545a354 Mon Sep 17 00:00:00 2001
From 7711f8c30afc2a1a0cc61786f5fe5ca087e3b1ad Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Thu, 3 Mar 2016 02:21:58 -0600
Subject: [PATCH] Graduate bungeecord chat API from spigot subclasses
@ -28,7 +28,7 @@ index 794a2c9..b6be0d7 100644
@Deprecated
public OfflinePlayer getOfflinePlayer(String name) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 202085b..7e70c71 100644
index 9770c99..bd1b74c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -156,6 +156,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -56,5 +56,5 @@ index 202085b..7e70c71 100644
public String getDisplayName() {
return getHandle().displayName;
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 964288fa89c51ce6bbbb01d45e162cad746f1af0 Mon Sep 17 00:00:00 2001
From 20ea4296fe6b89252bd5f5a83c4e0ef88736454e Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com>
Date: Thu, 3 Mar 2016 02:32:10 -0600
Subject: [PATCH] Player Tab List and Title APIs
@ -40,10 +40,10 @@ index 5f5b382..242efb0 100644
public void a(PacketListenerPlayOut packetlistenerplayout) {
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutTitle.java b/src/main/java/net/minecraft/server/PacketPlayOutTitle.java
index 2286c9e..169a03c 100644
index 31a2b21..8a0839c 100644
--- a/src/main/java/net/minecraft/server/PacketPlayOutTitle.java
+++ b/src/main/java/net/minecraft/server/PacketPlayOutTitle.java
@@ -10,6 +10,18 @@ public class PacketPlayOutTitle implements Packet<PacketListenerPlayOut> {
@@ -11,6 +11,18 @@ public class PacketPlayOutTitle implements Packet<PacketListenerPlayOut> {
private int d;
private int e;
@ -62,7 +62,7 @@ index 2286c9e..169a03c 100644
public PacketPlayOutTitle() {}
public PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction packetplayouttitle_enumtitleaction, IChatBaseComponent ichatbasecomponent) {
@@ -45,7 +57,13 @@ public class PacketPlayOutTitle implements Packet<PacketListenerPlayOut> {
@@ -46,7 +58,13 @@ public class PacketPlayOutTitle implements Packet<PacketListenerPlayOut> {
public void b(PacketDataSerializer packetdataserializer) throws IOException {
packetdataserializer.a((Enum) this.a);
if (this.a == PacketPlayOutTitle.EnumTitleAction.TITLE || this.a == PacketPlayOutTitle.EnumTitleAction.SUBTITLE) {
@ -78,7 +78,7 @@ index 2286c9e..169a03c 100644
if (this.a == PacketPlayOutTitle.EnumTitleAction.TIMES) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 7e70c71..a2459da 100644
index bd1b74c..fdbad7d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1,5 +1,6 @@
@ -173,5 +173,5 @@ index 7e70c71..a2459da 100644
@Override
--
2.8.0
2.8.2

Datei anzeigen

@ -1,14 +1,14 @@
From 582fe24787f872e73de369a7bca5b2a8d3fe0bbf Mon Sep 17 00:00:00 2001
From 6d362e1d7af4414e3819f600af7dd740719561ae Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 02:33:53 -0600
Subject: [PATCH] Ensure inv drag is in bounds
diff --git a/src/main/java/net/minecraft/server/Container.java b/src/main/java/net/minecraft/server/Container.java
index 000b4db..3114027 100644
index f9ff5cc..fd226f1 100644
--- a/src/main/java/net/minecraft/server/Container.java
+++ b/src/main/java/net/minecraft/server/Container.java
@@ -138,7 +138,7 @@ public abstract class Container {
@@ -142,7 +142,7 @@ public abstract class Container {
this.d();
}
} else if (this.g == 1) {
@ -18,5 +18,5 @@ index 000b4db..3114027 100644
if (slot != null && a(slot, playerinventory.getCarried(), true) && slot.isAllowed(playerinventory.getCarried()) && playerinventory.getCarried().count > this.h.size() && this.b(slot)) {
this.h.add(slot);
--
2.8.0
2.8.2

Datei anzeigen

@ -1,16 +1,16 @@
From 29c4559ebd61234ff7e07ea49d2f014572cc7434 Mon Sep 17 00:00:00 2001
From 582cdbf4397d60d944fb6c56443b5eb1c49c10fb 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/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 782abd6..df49185 100644
index 751e07d..c6fe888 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -119,9 +119,9 @@ public abstract class Entity implements ICommandListener {
private static final DataWatcherObject<Boolean> aA = DataWatcher.a(Entity.class, DataWatcherRegistry.h);
private static final DataWatcherObject<Boolean> aB = DataWatcher.a(Entity.class, DataWatcherRegistry.h);
private static final DataWatcherObject<Boolean> aC = DataWatcher.a(Entity.class, DataWatcherRegistry.h);
public boolean aa;
- public int ab;
- public int ac;
@ -22,7 +22,7 @@ index 782abd6..df49185 100644
public boolean impulse;
public int portalCooldown;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index af43a87..074d80d 100644
index 5adc297..e56f705 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -31,6 +31,11 @@ import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
@ -51,7 +51,7 @@ index af43a87..074d80d 100644
public final List<EntityHuman> players = Lists.newArrayList();
public final List<Entity> j = Lists.newArrayList();
protected final IntHashMap<Entity> entitiesById = new IntHashMap();
@@ -1395,19 +1400,20 @@ public abstract class World implements IBlockAccess {
@@ -1400,19 +1405,20 @@ public abstract class World implements IBlockAccess {
int j;
@ -81,5 +81,5 @@ index af43a87..074d80d 100644
this.f.clear();
this.l();
--
2.8.0
2.8.2

Datei anzeigen

@ -1,14 +1,14 @@
From b1c322aa34ad6d5802705dbcd0613330bd0da7cd Mon Sep 17 00:00:00 2001
From cef04d9da593e1217f0a9c12402bd5deb054c047 Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 02:46:17 -0600
Subject: [PATCH] Add configurable portal search radius
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index a73542d..f1ffe7b 100644
index 246f3d9..0aef69d 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -257,4 +257,9 @@ public class PaperWorldConfig {
@@ -251,4 +251,9 @@ public class PaperWorldConfig {
private void allowBlockLocationTabCompletion() {
allowBlockLocationTabCompletion = getBoolean("allow-block-location-tab-completion", true);
}
@ -19,18 +19,18 @@ index a73542d..f1ffe7b 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/PortalTravelAgent.java b/src/main/java/net/minecraft/server/PortalTravelAgent.java
index 519d27c..3f35303 100644
index 6bb68c0..b731b53 100644
--- a/src/main/java/net/minecraft/server/PortalTravelAgent.java
+++ b/src/main/java/net/minecraft/server/PortalTravelAgent.java
@@ -11,7 +11,7 @@ import java.util.Random;
@@ -12,7 +12,7 @@ import org.bukkit.util.Vector;
public class PortalTravelAgent {
- private final WorldServer world;
+ protected final WorldServer world; // Paper - private -> protected
private final Random b;
private final LongHashMap<PortalTravelAgent.ChunkCoordinatesPortal> c = new LongHashMap();
private final List<Long> d = Lists.newArrayList();
private final Long2ObjectMap<PortalTravelAgent.ChunkCoordinatesPortal> c = new Long2ObjectOpenHashMap(4096);
@@ -92,7 +92,7 @@ public class PortalTravelAgent {
public boolean b(Entity entity, float f) {
@ -54,5 +54,5 @@ index 1d5dce1..7ca2617 100644
private boolean canCreatePortal = true;
--
2.8.0
2.8.2

Datei anzeigen

@ -1,11 +1,11 @@
From 757a12b52c7aaab1cb9482e27ccc2c0b794707ca Mon Sep 17 00:00:00 2001
From 128717a58ad4dd6c56d60049de3c8e2c546c6e04 Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 02:48:12 -0600
Subject: [PATCH] Add velocity warnings
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index f61f6cd..5934be1 100644
index a6c0b45..485e204 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -204,6 +204,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@ -22,5 +22,5 @@ index f61f6cd..5934be1 100644
entity.motY = vel.getY();
entity.motZ = vel.getZ();
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From cf7e3abb7603715b6e7580ac89fe45bd1bfbaa94 Mon Sep 17 00:00:00 2001
From 4089dcc3abddf4073495eb7db420aea17bbe59a0 Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com>
Date: Thu, 3 Mar 2016 02:50:31 -0600
Subject: [PATCH] Fix inter-world teleportation glitches
@ -11,10 +11,10 @@ Example setup to perform the glitch: http://puu.sh/ng3PC/cf072dcbdb.png
The wanted destination was on top of the emerald block however the player ended on top of the diamond block. This only is the case if the player is teleporting between worlds.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index f1ffe7b..c6f12a1 100644
index 0aef69d..37d58ee 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -262,4 +262,9 @@ public class PaperWorldConfig {
@@ -256,4 +256,9 @@ public class PaperWorldConfig {
private void portalSearchRadius() {
portalSearchRadius = getInt("portal-search-radius", 128);
}
@ -25,10 +25,10 @@ index f1ffe7b..c6f12a1 100644
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index a2459da..0f081b5 100644
index fdbad7d..ef6e9a6 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -554,7 +554,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -557,7 +557,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (fromWorld == toWorld) {
entity.playerConnection.teleport(to);
} else {
@ -39,5 +39,5 @@ index a2459da..0f081b5 100644
return true;
}
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From d54ccf5e32ba24202f54270f93c2fc760144844b Mon Sep 17 00:00:00 2001
From 6716cfabe2cb44666f1c9fa5d7ccf68d95224f3c 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
@ -50,7 +50,7 @@ index 0000000..9339718
+}
\ No newline at end of file
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 806e499..8b11266 100644
index 300d625..eb60455 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -1,5 +1,6 @@
@ -68,7 +68,7 @@ index 806e499..8b11266 100644
public class Chunk {
@@ -789,10 +791,15 @@ public class Chunk {
@@ -793,10 +795,15 @@ public class Chunk {
this.tileEntities.remove(blockposition);
// Paper end
} else {
@ -89,18 +89,18 @@ index 806e499..8b11266 100644
}
}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 54c83f3..969ae9d 100644
index 20dccfb..32b71c6 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -4,6 +4,7 @@ import java.io.IOException;
import java.util.Iterator;
@@ -11,6 +11,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.Set;
import javax.annotation.Nullable;
+import com.destroystokyo.paper.exception.ServerInternalException;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -224,7 +225,11 @@ public class ChunkProviderServer implements IChunkProvider {
@@ -203,7 +204,11 @@ public class ChunkProviderServer implements IChunkProvider {
return chunk;
} catch (Exception exception) {
@ -113,7 +113,7 @@ index 54c83f3..969ae9d 100644
return null;
}
}
@@ -233,7 +238,11 @@ public class ChunkProviderServer implements IChunkProvider {
@@ -212,7 +217,11 @@ public class ChunkProviderServer implements IChunkProvider {
try {
this.chunkLoader.b(this.world, chunk);
} catch (Exception exception) {
@ -126,7 +126,7 @@ index 54c83f3..969ae9d 100644
}
}
@@ -243,9 +252,14 @@ public class ChunkProviderServer implements IChunkProvider {
@@ -222,9 +231,14 @@ public class ChunkProviderServer implements IChunkProvider {
chunk.setLastSaved(this.world.getTime());
this.chunkLoader.a(this.world, chunk);
} catch (IOException ioexception) {
@ -144,7 +144,7 @@ index 54c83f3..969ae9d 100644
}
diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
index c527b3f..6aad092 100644
index 0906bf7..1d0890d 100644
--- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
+++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
@@ -1,5 +1,6 @@
@ -154,7 +154,7 @@ index c527b3f..6aad092 100644
import com.google.common.base.Charsets;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterators;
@@ -360,6 +361,7 @@ public class NameReferencingFileConverter {
@@ -361,6 +362,7 @@ public class NameReferencingFileConverter {
root = NBTCompressedStreamTools.a(new java.io.FileInputStream(file1));
} catch (Exception exception) {
exception.printStackTrace();
@ -162,7 +162,7 @@ index c527b3f..6aad092 100644
}
if (root != null) {
@@ -373,6 +375,7 @@ public class NameReferencingFileConverter {
@@ -374,6 +376,7 @@ public class NameReferencingFileConverter {
NBTCompressedStreamTools.a(root, new java.io.FileOutputStream(file2));
} catch (Exception exception) {
exception.printStackTrace();
@ -171,7 +171,7 @@ index c527b3f..6aad092 100644
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/PersistentCollection.java b/src/main/java/net/minecraft/server/PersistentCollection.java
index 6f013eb..054cf63 100644
index c221a22..57a892c 100644
--- a/src/main/java/net/minecraft/server/PersistentCollection.java
+++ b/src/main/java/net/minecraft/server/PersistentCollection.java
@@ -1,5 +1,6 @@
@ -181,7 +181,7 @@ index 6f013eb..054cf63 100644
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import java.io.DataInputStream;
@@ -51,6 +52,7 @@ public class PersistentCollection {
@@ -53,6 +54,7 @@ public class PersistentCollection {
}
} catch (Exception exception1) {
exception1.printStackTrace();
@ -189,7 +189,7 @@ index 6f013eb..054cf63 100644
}
}
@@ -103,6 +105,7 @@ public class PersistentCollection {
@@ -102,6 +104,7 @@ public class PersistentCollection {
}
} catch (Exception exception) {
exception.printStackTrace();
@ -244,7 +244,7 @@ index 01a08d4..5eb01c3 100644
}
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index 588377c..e15cc1a 100644
index 852bdf8..5fa35f3 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -5,6 +5,7 @@ import java.util.List;
@ -272,7 +272,7 @@ index 588377c..e15cc1a 100644
}
diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java
index 320e52e..d40257f 100644
index 26d7d12..fcd2ddf 100644
--- a/src/main/java/net/minecraft/server/VillageSiege.java
+++ b/src/main/java/net/minecraft/server/VillageSiege.java
@@ -1,5 +1,7 @@
@ -282,8 +282,8 @@ index 320e52e..d40257f 100644
+
import java.util.Iterator;
import java.util.List;
@@ -136,6 +138,7 @@ public class VillageSiege {
import javax.annotation.Nullable;
@@ -137,6 +139,7 @@ public class VillageSiege {
entityzombie.clearVillagerType();
} catch (Exception exception) {
exception.printStackTrace();
@ -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 074d80d..f811cd2 100644
index e56f705..21ba235 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 074d80d..f811cd2 100644
import com.google.common.base.Function;
import com.google.common.base.Objects;
import com.google.common.base.Predicate;
@@ -1455,8 +1457,10 @@ public abstract class World implements IBlockAccess {
@@ -1460,8 +1462,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 074d80d..f811cd2 100644
entity.dead = true;
continue;
// Paper end
@@ -1520,8 +1524,10 @@ public abstract class World implements IBlockAccess {
@@ -1525,8 +1529,10 @@ public abstract class World implements IBlockAccess {
this.methodProfiler.b();
} catch (Throwable throwable2) {
// Paper start - Prevent tile entity and entity crashes
@ -328,7 +328,7 @@ index 074d80d..f811cd2 100644
this.tileEntityListTick.remove(tileTickPosition--);
continue;
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index 44e057c..cf0bd0c 100644
index 2a22697..d82dddf 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -14,6 +14,9 @@ import java.util.concurrent.atomic.AtomicInteger;
@ -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.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 2c51fa98a30040a704cb0bd0c25b90a2e97a9b65 Mon Sep 17 00:00:00 2001
From af2b7145d1158096496c253ccbfd616eb2fb9118 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Tue, 8 Mar 2016 18:28:43 -0800
Subject: [PATCH] Don't nest if we don't need to when cerealising text
@ -26,5 +26,5 @@ index c0e1199..bc6c054 100644
packetdataserializer.a(this.a);
}
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 418f131fc4357962762b01fc1fe80f982ec5ae57 Mon Sep 17 00:00:00 2001
From 4e264597fc3622e07e76a1cb118288cb2549c867 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 8 Mar 2016 23:25:45 -0500
Subject: [PATCH] Disable Scoreboards for non players by default
@ -11,10 +11,10 @@ So avoid looking up scoreboards and short circuit to the "not on a team"
logic which is most likely to be true.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index c6f12a1..b813a9b 100644
index 37d58ee..b0bcea0 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -267,4 +267,9 @@ public class PaperWorldConfig {
@@ -261,4 +261,9 @@ public class PaperWorldConfig {
private void disableTeleportationSuffocationCheck() {
disableTeleportationSuffocationCheck = getBoolean("disable-teleportation-suffocation-check", false);
}
@ -25,29 +25,29 @@ index c6f12a1..b813a9b 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/CommandScoreboard.java b/src/main/java/net/minecraft/server/CommandScoreboard.java
index b044f33..1758a56 100644
index 989721b..6b2a1a0 100644
--- a/src/main/java/net/minecraft/server/CommandScoreboard.java
+++ b/src/main/java/net/minecraft/server/CommandScoreboard.java
@@ -490,6 +490,7 @@ public class CommandScoreboard extends CommandAbstract {
@@ -491,6 +491,7 @@ public class CommandScoreboard extends CommandAbstract {
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
+ if (!entity.world.paperConfig.nonPlayerEntitiesOnScoreboards && !(entity instanceof EntityHuman)) { continue; } // Paper
String s2 = e(minecraftserver, icommandlistener, entity.getUniqueID().toString());
String s2 = e(minecraftserver, icommandlistener, entity.bd());
if (scoreboard.addPlayerToTeam(s2, s)) {
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index df49185..26f83a4 100644
index c6fe888..035dd20 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1845,6 +1845,7 @@ public abstract class Entity implements ICommandListener {
}
@@ -1853,6 +1853,7 @@ public abstract class Entity implements ICommandListener {
@Nullable
public ScoreboardTeamBase aO() {
+ if (!this.world.paperConfig.nonPlayerEntitiesOnScoreboards && !(this instanceof EntityHuman)) { return null; } // Paper
return this.world.getScoreboard().getPlayerTeam(this.getUniqueID().toString());
return this.world.getScoreboard().getPlayerTeam(this.bd());
}
--
2.8.0
2.8.2

Datei anzeigen

@ -1,223 +0,0 @@
From 625ae497ed404e57797c88a005ca4fc2246312c7 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com>
Date: Mon, 7 Mar 2016 12:51:01 -0700
Subject: [PATCH] Speedup BlockPos by fixing inlining
Normally the JVM can inline virtual getters by having two sets of code, one is the 'optimized' code and the other is the 'deoptimized' code.
If a single type is used 99% of the time, then its worth it to inline, and to revert to 'deoptimized' the 1% of the time we encounter other types.
But if two types are encountered commonly, then the JVM can't inline them both, and the call overhead remains.
This scenario also occurs with BlockPos and MutableBlockPos.
The variables in BlockPos are final, so MutableBlockPos can't modify them.
MutableBlockPos fixes this by adding custom mutable variables, and overriding the getters to access them.
This approach with utility methods that operate on MutableBlockPos and BlockPos.
Specific examples are BlockPosition.up(), and World.isValidLocation().
It makes these simple methods much slower than they need to be.
This should result in an across the board speedup in anything that accesses blocks or does logic with positions.
This is based upon conclusions drawn from inspecting the assenmbly generated bythe JIT compiler on my mircorbenchmarks.
They had 'callq' (invoke) instead of 'mov' (get from memory) instructions.
diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java
index 47c9f69..c5b6a34 100644
--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java
+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java
@@ -5,9 +5,11 @@ import com.google.common.base.Objects;
public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
public static final BaseBlockPosition ZERO = new BaseBlockPosition(0, 0, 0);
- private final int a;
- private final int c;
- private final int d;
+ // Paper start - make mutable and protected for MutableBlockPos and PooledBlockPos
+ protected int a;
+ protected int c;
+ protected int d;
+ // Paper end
public BaseBlockPosition(int i, int j, int k) {
this.a = i;
@@ -39,17 +41,19 @@ public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
return this.getY() == baseblockposition.getY() ? (this.getZ() == baseblockposition.getZ() ? this.getX() - baseblockposition.getX() : this.getZ() - baseblockposition.getZ()) : this.getY() - baseblockposition.getY();
}
- public int getX() {
+ // Paper start - Only allow one implementation of these methods (make final)
+ public final int getX() {
return this.a;
}
- public int getY() {
+ public final int getY() {
return this.c;
}
- public int getZ() {
+ public final int getZ() {
return this.d;
}
+ // Paper end
public BaseBlockPosition d(BaseBlockPosition baseblockposition) {
return new BaseBlockPosition(this.getY() * baseblockposition.getZ() - this.getZ() * baseblockposition.getY(), this.getZ() * baseblockposition.getX() - this.getX() * baseblockposition.getZ(), this.getX() * baseblockposition.getY() - this.getY() * baseblockposition.getX());
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
index e7a95f3..2d56f02 100644
--- a/src/main/java/net/minecraft/server/BlockPosition.java
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
@@ -207,9 +207,10 @@ public class BlockPosition extends BaseBlockPosition {
++k;
}
- this.b.c = i;
- this.b.d = j;
- this.b.e = k;
+ // Paper start - modify base position variables
+ ((BaseBlockPosition) this.b).a = i;
+ ((BaseBlockPosition) this.b).c = j;
+ ((BaseBlockPosition) this.b).d = k;
return this.b;
}
}
@@ -228,17 +229,23 @@ public class BlockPosition extends BaseBlockPosition {
public static final class PooledBlockPosition extends BlockPosition {
+ // Paper start - remove variables
+ /*
private int c;
private int d;
private int e;
+ */
+ // Paper end
private boolean f;
private static final List<BlockPosition.PooledBlockPosition> g = Lists.newArrayList();
private PooledBlockPosition(int i, int j, int k) {
super(0, 0, 0);
- this.c = i;
- this.d = j;
- this.e = k;
+ // Paper start - modify base position variables
+ ((BaseBlockPosition) this).a = i;
+ ((BaseBlockPosition) this).c = j;
+ ((BaseBlockPosition) this).d = k;
+ // Paper end
}
public static BlockPosition.PooledBlockPosition s() {
@@ -279,6 +286,8 @@ public class BlockPosition extends BaseBlockPosition {
}
}
+ // Paper start - use superclass methods
+ /*
public int getX() {
return this.c;
}
@@ -290,6 +299,8 @@ public class BlockPosition extends BaseBlockPosition {
public int getZ() {
return this.e;
}
+ */
+ // Paper end
public BlockPosition.PooledBlockPosition d(int i, int j, int k) {
if (this.f) {
@@ -297,9 +308,11 @@ public class BlockPosition extends BaseBlockPosition {
this.f = false;
}
- this.c = i;
- this.d = j;
- this.e = k;
+ // Paper start - modify base position variables
+ ((BaseBlockPosition) this).a = i;
+ ((BaseBlockPosition) this).c = j;
+ ((BaseBlockPosition) this).d = k;
+ // Paper end
return this;
}
@@ -312,7 +325,7 @@ public class BlockPosition extends BaseBlockPosition {
}
public BlockPosition.PooledBlockPosition c(EnumDirection enumdirection) {
- return this.d(this.c + enumdirection.getAdjacentX(), this.d + enumdirection.getAdjacentY(), this.e + enumdirection.getAdjacentZ());
+ return this.d(this.getX() + enumdirection.getAdjacentX(), this.getY() + enumdirection.getAdjacentY(), this.getZ() + enumdirection.getAdjacentZ()); // Paper - use getters
}
public BaseBlockPosition d(BaseBlockPosition baseblockposition) {
@@ -322,9 +335,13 @@ public class BlockPosition extends BaseBlockPosition {
public static final class MutableBlockPosition extends BlockPosition {
+ // Paper start - remove variables
+ /*
private int c;
private int d;
private int e;
+ */
+ // Paper end
public MutableBlockPosition() {
this(0, 0, 0);
@@ -336,11 +353,15 @@ public class BlockPosition extends BaseBlockPosition {
public MutableBlockPosition(int i, int j, int k) {
super(0, 0, 0);
- this.c = i;
- this.d = j;
- this.e = k;
+ // Paper start - modify base position variables
+ ((BaseBlockPosition) this).a = i;
+ ((BaseBlockPosition) this).c = j;
+ ((BaseBlockPosition) this).d = k;
+ // Paper end
}
+ // Paper start - use superclass methods
+ /*
public int getX() {
return this.c;
}
@@ -352,22 +373,28 @@ public class BlockPosition extends BaseBlockPosition {
public int getZ() {
return this.e;
}
+ */
+ // Paper end
public BlockPosition.MutableBlockPosition c(int i, int j, int k) {
- this.c = i;
- this.d = j;
- this.e = k;
+ // Paper start - modify base position variables
+ ((BaseBlockPosition) this).a = i;
+ ((BaseBlockPosition) this).c = j;
+ ((BaseBlockPosition) this).d = k;
+ // Paper end
return this;
}
public void c(EnumDirection enumdirection) {
- this.c += enumdirection.getAdjacentX();
- this.d += enumdirection.getAdjacentY();
- this.e += enumdirection.getAdjacentZ();
+ // Paper start - modify base position variables
+ ((BaseBlockPosition) this).a += enumdirection.getAdjacentX();
+ ((BaseBlockPosition) this).c += enumdirection.getAdjacentY();
+ ((BaseBlockPosition) this).d += enumdirection.getAdjacentZ();
+ // Paper end
}
public void p(int i) {
- this.d = i;
+ ((BaseBlockPosition) this).c = i; // Paper - modify base variable
}
public BlockPosition h() {
--
2.8.0

Datei anzeigen

@ -1,19 +1,19 @@
From d558be34000c9c6dd375cfca27aeb4a46d9719f0 Mon Sep 17 00:00:00 2001
From e1870e7610f50cc6024f509c899d00ab7fb198d8 Mon Sep 17 00:00:00 2001
From: mrapple <tony@oc.tc>
Date: Sun, 25 Nov 2012 13:43:39 -0600
Subject: [PATCH] Add methods for working with arrows stuck in living entities
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 342fcb7..d0e0285 100644
index 7fd8585..b151c13 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -1279,10 +1279,12 @@ public abstract class EntityLiving extends Entity {
@@ -1284,10 +1284,12 @@ public abstract class EntityLiving extends Entity {
return (float) this.getAttributeInstance(GenericAttributes.maxHealth).getValue();
}
+ public final int getStuckArrows() { return this.bX(); } // Paper - deobfuscation helper
public final int bX() {
+ public final int getStuckArrows() { return this.bY(); } // Paper // OBFHELPER
public final int bY() {
return ((Integer) this.datawatcher.get(EntityLiving.h)).intValue();
}
@ -22,7 +22,7 @@ index 342fcb7..d0e0285 100644
this.datawatcher.set(EntityLiving.h, Integer.valueOf(i));
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index aed3e4f..0502593 100644
index f13ca63..16da1c9 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -553,4 +553,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@ -43,5 +43,5 @@ index aed3e4f..0502593 100644
+ // Paper end
}
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 5518d351aa3f9110c4c57fd5869cb88105a37d02 Mon Sep 17 00:00:00 2001
From 468dbbaec486911373e779b6f9349066777ef3d7 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sat, 4 Apr 2015 23:17:52 -0400
Subject: [PATCH] Complete resource pack API
@ -18,10 +18,10 @@ index 04e52d2..2a14e1a 100644
public PacketPlayInResourcePackStatus() {}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 79448eb..3837f64 100644
index 2cde490..dba953f 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1026,7 +1026,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1025,7 +1025,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
// CraftBukkit start
public void a(PacketPlayInResourcePackStatus packetplayinresourcepackstatus) {
@ -37,7 +37,7 @@ index 79448eb..3837f64 100644
// CraftBukkit end
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 0f081b5..9da0797 100644
index ef6e9a6..c018773 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -72,6 +72,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -51,7 +51,7 @@ index 0f081b5..9da0797 100644
public CraftPlayer(CraftServer server, EntityPlayer entity) {
super(server, entity);
@@ -1522,6 +1526,33 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1525,6 +1529,33 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
((WorldServer) getHandle().world).getPlayerChunkMap().updateViewDistance(getHandle(), viewDistance);
}
@ -86,5 +86,5 @@ index 0f081b5..9da0797 100644
private final Player.Spigot spigot = new Player.Spigot()
{
--
2.8.0
2.8.2

Datei anzeigen

@ -1,14 +1,14 @@
From cae272d18fd6dd6b36b9c1181c9ed71437cbf049 Mon Sep 17 00:00:00 2001
From 40ac20134bcce4386091db2a60b3a493979ac879 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Sat, 12 Mar 2016 13:37:50 -0600
Subject: [PATCH] Re-add Spigot's hopper-check feature
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index b813a9b..9e91991 100644
index b0bcea0..593256c 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -272,4 +272,9 @@ public class PaperWorldConfig {
@@ -266,4 +266,9 @@ public class PaperWorldConfig {
private void nonPlayerEntitiesOnScoreboards() {
nonPlayerEntitiesOnScoreboards = getBoolean("allow-non-player-entities-on-scoreboards", false);
}
@ -19,10 +19,10 @@ index b813a9b..9e91991 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java
index b2f0c18..243da36 100644
index 76e2351..de458c8 100644
--- a/src/main/java/net/minecraft/server/TileEntityHopper.java
+++ b/src/main/java/net/minecraft/server/TileEntityHopper.java
@@ -178,6 +178,12 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
@@ -183,6 +183,12 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
this.update();
return true;
}
@ -36,5 +36,5 @@ index b2f0c18..243da36 100644
return false;
} else {
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 17b1f57e1719cd6af86da1d40a7664c7911f9bb1 Mon Sep 17 00:00:00 2001
From eb5a4b0fec91f8e10fa250db93b854bc758e781e Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 4 Mar 2016 18:18:37 -0600
Subject: [PATCH] Chunk save queue improvements
@ -26,7 +26,7 @@ Then finally, Sleeping will by default be removed, but due to known issues with
But if sleeps are to remain enabled, we at least lower the sleep interval so it doesn't have as much negative impact.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 1b8165c..bde642a 100644
index 1ea409d..34e0426 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -197,4 +197,10 @@ public class PaperConfig {
@ -41,20 +41,20 @@ index 1b8165c..bde642a 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index eb13bc9..cbbf95f 100644
index da7d7fe..a5c4e95 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -11,14 +11,17 @@ import java.util.List;
import java.util.Map;
@@ -12,14 +12,17 @@ import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import javax.annotation.Nullable;
+import java.util.concurrent.ConcurrentLinkedQueue; // Paper
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
+ private ConcurrentLinkedQueue<QueuedChunk> queue = new ConcurrentLinkedQueue<QueuedChunk>(); // Paper - Chunk queue improvements
+ private ConcurrentLinkedQueue<QueuedChunk> queue = new ConcurrentLinkedQueue<>(); // Paper - Chunk queue improvements
+ private final Object lock = new Object(); // Paper - Chunk queue improvements
private static final Logger a = LogManager.getLogger();
private Map<ChunkCoordIntPair, NBTTagCompound> b = new ConcurrentHashMap();
@ -63,7 +63,7 @@ index eb13bc9..cbbf95f 100644
private final File d;
private final DataConverterManager e;
private boolean f = false;
@@ -32,11 +35,11 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
@@ -33,11 +36,11 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
public boolean chunkExists(World world, int i, int j) {
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i, j);
@ -77,7 +77,7 @@ index eb13bc9..cbbf95f 100644
// Paper start - Don't create region files when checking that they exist
final RegionFile region = RegionFileCache.a(this.d, i, j, false);
@@ -139,28 +142,32 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
@@ -141,28 +144,32 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
}
protected void a(ChunkCoordIntPair chunkcoordintpair, NBTTagCompound nbttagcompound) {
@ -115,7 +115,7 @@ index eb13bc9..cbbf95f 100644
if (nbttagcompound != null) {
try {
@@ -169,10 +176,11 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
@@ -171,10 +178,11 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
ChunkRegionLoader.a.error("Failed to save chunk", exception);
}
}
@ -128,7 +128,7 @@ index eb13bc9..cbbf95f 100644
}
return flag;
@@ -503,4 +511,16 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
@@ -508,4 +516,16 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
return entity;
}
}

Datei anzeigen

@ -1,4 +1,4 @@
From 5e3ee00d4e1e65831e2356ea1f002592eaca235c Mon Sep 17 00:00:00 2001
From 0e0ec1d44114445a752f0a8fcee7a5e44fcf20d8 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 4 Mar 2013 23:46:10 -0500
Subject: [PATCH] Chunk Save Reattempt
@ -6,10 +6,10 @@ Subject: [PATCH] Chunk Save Reattempt
We commonly have "Stream Closed" errors on chunk saving, so this code should re-try to save the chunk in the event of failure and hopefully prevent rollbacks.
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index cbbf95f..778f8f5 100644
index a5c4e95..be0a565 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -170,11 +170,16 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
@@ -172,11 +172,16 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
NBTTagCompound nbttagcompound = chunk.compound; // Paper - Chunk queue improvements
if (nbttagcompound != null) {
@ -42,5 +42,5 @@ index 2ca94a4..68dd17d 100644
}
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 8bf415cb5fed2d039ae388e2dd4330e81b5972a5 Mon Sep 17 00:00:00 2001
From c2eb5b571398d8cabe2e4fb957d5f2f1960ebe95 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 18 Mar 2016 13:17:38 -0400
Subject: [PATCH] Default loading permissions.yml before plugins
@ -16,7 +16,7 @@ modify that. Under the previous logic, plugins were unable (cleanly) override pe
A config option has been added for those who depend on the previous behavior, but I don't expect that.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index bde642a..c1d50ee 100644
index 34e0426..770866f 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -203,4 +203,9 @@ public class PaperConfig {

Datei anzeigen

@ -1,4 +1,4 @@
From 72b98822da639bded14883f59a498781b64b9b0a Mon Sep 17 00:00:00 2001
From 56e2e0cd842f4fa51efdc32e33d90a384c49ef52 Mon Sep 17 00:00:00 2001
From: William <admin@domnian.com>
Date: Fri, 18 Mar 2016 03:30:17 -0400
Subject: [PATCH] Allow Reloading of Custom Permissions
@ -32,5 +32,5 @@ index 5b91630..20a8ef7 100644
+ // Paper end
}
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 96f359acc90ad1aaa25693823ede270720e1536b Mon Sep 17 00:00:00 2001
From 78032f81e6af76e2a40e2acbbc1de025b4a0bd90 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 18 Mar 2016 13:50:14 -0400
Subject: [PATCH] Remove Metadata on reload
@ -26,5 +26,5 @@ index 20a8ef7..e957ed0 100644
commandMap.clearCommands();
resetRecipes();
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 5cd56ddfbdeb8580836f02e4d2772b4178b2808e Mon Sep 17 00:00:00 2001
From f9bc08b80ea7df56b143ea9bc8857cc4b3343b22 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 18 Mar 2016 14:19:19 -0400
Subject: [PATCH] Undead horse leashing
@ -6,10 +6,10 @@ Subject: [PATCH] Undead horse leashing
default false to match vanilla, but option to allow undead horse types to be leashed.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 9e91991..03dd637 100644
index 593256c..8875559 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -277,4 +277,9 @@ public class PaperWorldConfig {
@@ -271,4 +271,9 @@ public class PaperWorldConfig {
private void useHopperCheck() {
useHopperCheck = getBoolean("use-hopper-check", false);
}
@ -20,10 +20,10 @@ index 9e91991..03dd637 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityHorse.java b/src/main/java/net/minecraft/server/EntityHorse.java
index a81bf3b..8367458 100644
index 25d788f..dfe1fa5 100644
--- a/src/main/java/net/minecraft/server/EntityHorse.java
+++ b/src/main/java/net/minecraft/server/EntityHorse.java
@@ -167,6 +167,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener, IJu
@@ -170,6 +170,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener, IJu
}
public boolean a(EntityHuman entityhuman) {
@ -32,5 +32,5 @@ index a81bf3b..8367458 100644
}
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From c133d093e615cd8f520eede3730556d0f5b9de2d Mon Sep 17 00:00:00 2001
From 583a58098469f47ebaedf45582208c066cb759b7 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 18 Mar 2016 14:24:53 -0400
Subject: [PATCH] Fix Furnace cook time bug
@ -9,10 +9,10 @@ cook in the expected amount of time as the cook time was not decremented correct
This patch ensures that furnaces cook to the correct wall time expectation.
diff --git a/src/main/java/net/minecraft/server/TileEntityFurnace.java b/src/main/java/net/minecraft/server/TileEntityFurnace.java
index 1b17ca6..0a20cec 100644
index 94c69be..b908110 100644
--- a/src/main/java/net/minecraft/server/TileEntityFurnace.java
+++ b/src/main/java/net/minecraft/server/TileEntityFurnace.java
@@ -163,7 +163,7 @@ public class TileEntityFurnace extends TileEntityContainer implements ITickable,
@@ -168,7 +168,7 @@ public class TileEntityFurnace extends TileEntityContainer implements ITickable,
if (this.isBurning() && this.canBurn()) {
this.cookTime += elapsedTicks;
if (this.cookTime >= this.cookTimeTotal) {
@ -22,5 +22,5 @@ index 1b17ca6..0a20cec 100644
this.burn();
flag1 = true;
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 34c1a61289abe53d331216702a4539b603cd087f Mon Sep 17 00:00:00 2001
From efe987511bfe705324b10de5ff214193c4e5a7e5 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 28 May 2015 23:00:19 -0400
Subject: [PATCH] Handle Item Meta Inconsistencies
@ -293,5 +293,5 @@ index 22cc267..94f2ba0 100644
private final Spigot spigot = new Spigot()
{
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 28d8d3671fcdb920d2db55fb577165fa4744485b Mon Sep 17 00:00:00 2001
From 16c55fb0b6c3638b99225963274e14d316f6e411 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 18 Mar 2016 15:12:22 -0400
Subject: [PATCH] Configurable Non Player Arrow Despawn Rate
@ -6,10 +6,10 @@ Subject: [PATCH] Configurable Non Player Arrow Despawn Rate
Can set a much shorter despawn rate for arrows that players can not pick up.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 03dd637..26c1b72 100644
index 8875559..50e891f 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -282,4 +282,13 @@ public class PaperWorldConfig {
@@ -276,4 +276,13 @@ public class PaperWorldConfig {
private void allowLeashingUndeadHorse() {
allowLeashingUndeadHorse = getBoolean("allow-leashing-undead-horse", false);
}
@ -24,18 +24,18 @@ index 03dd637..26c1b72 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
index 7a4f56d..a073e6c 100644
index 29b6f16..c2ee9ce 100644
--- a/src/main/java/net/minecraft/server/EntityArrow.java
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
@@ -144,7 +144,7 @@ public abstract class EntityArrow extends Entity implements IProjectile {
@@ -145,7 +145,7 @@ public abstract class EntityArrow extends Entity implements IProjectile {
if (block == this.au && i == this.av) {
++this.aw;
- if (this.aw >= world.spigotConfig.arrowDespawnRate) { // Spigot - First int after shooter
+ if (this.aw >= (fromPlayer != PickupStatus.DISALLOWED ? world.spigotConfig.arrowDespawnRate : world.paperConfig.nonPlayerArrowDespawnRate)) { // Spigot - First int after shooter
if (block == this.av && i == this.aw) {
++this.ax;
- if (this.ax >= world.spigotConfig.arrowDespawnRate) { // Spigot - First int after shooter
+ if (this.ax >= (fromPlayer != PickupStatus.DISALLOWED ? world.spigotConfig.arrowDespawnRate : world.paperConfig.nonPlayerArrowDespawnRate)) { // Spigot - First int after shooter // Paper
this.die();
}
} else {
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From c419a39f39a2a3da3d3577732389060d61da3e2d Mon Sep 17 00:00:00 2001
From a9bec1c0266a2ed770f99dd1288b88a71b997aba Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 18 Mar 2016 20:16:03 -0400
Subject: [PATCH] Add World Util Methods
@ -6,7 +6,7 @@ Subject: [PATCH] Add World Util Methods
Methods that can be used for other patches to help improve logic.
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index f811cd2..c6f15b8 100644
index 21ba235..3bdf072 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -153,6 +153,12 @@ public abstract class World implements IBlockAccess {
@ -20,9 +20,9 @@ index f811cd2..c6f15b8 100644
+ // Paper end
+
public Chunk getChunkIfLoaded(int x, int z) {
return ((ChunkProviderServer) this.chunkProvider).getChunkIfLoaded(x, z);
return ((ChunkProviderServer) this.chunkProvider).getLoadedChunkAt(x, z);
}
@@ -635,6 +641,41 @@ public abstract class World implements IBlockAccess {
@@ -640,6 +646,41 @@ public abstract class World implements IBlockAccess {
}
}
@ -64,7 +64,7 @@ index f811cd2..c6f15b8 100644
public int getLightLevel(BlockPosition blockposition) {
return this.c(blockposition, true);
}
@@ -749,6 +790,27 @@ public abstract class World implements IBlockAccess {
@@ -755,6 +796,27 @@ public abstract class World implements IBlockAccess {
return this.worldProvider.n()[this.getLightLevel(blockposition)];
}
@ -93,5 +93,5 @@ index f811cd2..c6f15b8 100644
// CraftBukkit start - tree generation
if (captureTreeGeneration) {
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 04e183d8f5d331f32c94cc1ac26403ce75021c40 Mon Sep 17 00:00:00 2001
From 351015662bd35f4fe257743ee2c65ebf0709b70a Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 18 Mar 2016 21:22:56 -0400
Subject: [PATCH] Optimized Light Level Comparisons
@ -8,10 +8,10 @@ Use an optimized method to test if a block position meets a desired light level.
This method benefits from returning as soon as the desired light level matches.
diff --git a/src/main/java/net/minecraft/server/BlockCrops.java b/src/main/java/net/minecraft/server/BlockCrops.java
index 5f8bffe..ab8d18e 100644
index 7d44039..4ede2cf 100644
--- a/src/main/java/net/minecraft/server/BlockCrops.java
+++ b/src/main/java/net/minecraft/server/BlockCrops.java
@@ -48,7 +48,7 @@ public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement
@@ -49,7 +49,7 @@ public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement
public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
super.b(world, blockposition, iblockdata, random);
@ -21,10 +21,10 @@ index 5f8bffe..ab8d18e 100644
if (i < this.g()) {
diff --git a/src/main/java/net/minecraft/server/BlockGrass.java b/src/main/java/net/minecraft/server/BlockGrass.java
index fe55848..8fc736d 100644
index 11d9d3f..21e722d 100644
--- a/src/main/java/net/minecraft/server/BlockGrass.java
+++ b/src/main/java/net/minecraft/server/BlockGrass.java
@@ -29,7 +29,8 @@ public class BlockGrass extends Block implements IBlockFragilePlantElement {
@@ -30,7 +30,8 @@ public class BlockGrass extends Block implements IBlockFragilePlantElement {
public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
if (!world.isClientSide) {
@ -34,7 +34,7 @@ index fe55848..8fc736d 100644
// CraftBukkit start
// world.setTypeUpdate(blockposition, Blocks.DIRT.getBlockData());
org.bukkit.World bworld = world.getWorld();
@@ -44,18 +45,25 @@ public class BlockGrass extends Block implements IBlockFragilePlantElement {
@@ -45,18 +46,25 @@ public class BlockGrass extends Block implements IBlockFragilePlantElement {
}
// CraftBukkit end
} else {
@ -78,10 +78,10 @@ index 76b13a3..b7776fb 100644
world.captureTreeGeneration = true;
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/BlockStem.java b/src/main/java/net/minecraft/server/BlockStem.java
index 73e68d8..439a77e 100644
index d378ea4..1185100 100644
--- a/src/main/java/net/minecraft/server/BlockStem.java
+++ b/src/main/java/net/minecraft/server/BlockStem.java
@@ -47,7 +47,7 @@ public class BlockStem extends BlockPlant implements IBlockFragilePlantElement {
@@ -48,7 +48,7 @@ public class BlockStem extends BlockPlant implements IBlockFragilePlantElement {
public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
super.b(world, blockposition, iblockdata, random);
@ -91,7 +91,7 @@ index 73e68d8..439a77e 100644
if (random.nextInt((int) ((100.0F / (this == Blocks.PUMPKIN_STEM ? world.spigotConfig.pumpkinModifier : world.spigotConfig.melonModifier)) * (25.0F / f)) + 1) == 0) { // Spigot
diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java
index f477036..23826fe 100644
index 2b79c28..ec00edf 100644
--- a/src/main/java/net/minecraft/server/EntityMonster.java
+++ b/src/main/java/net/minecraft/server/EntityMonster.java
@@ -118,17 +118,17 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
@ -118,10 +118,10 @@ index f477036..23826fe 100644
}
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
index 28fed1f..e3cce4c 100644
index 774d773..0aeda93 100644
--- a/src/main/java/net/minecraft/server/EntityZombie.java
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
@@ -194,7 +194,7 @@ public class EntityZombie extends EntityMonster {
@@ -195,7 +195,7 @@ public class EntityZombie extends EntityMonster {
int j1 = j + MathHelper.nextInt(this.random, 7, 40) * MathHelper.nextInt(this.random, -1, 1);
int k1 = k + MathHelper.nextInt(this.random, 7, 40) * MathHelper.nextInt(this.random, -1, 1);
@ -131,5 +131,5 @@ index 28fed1f..e3cce4c 100644
if (!this.world.isPlayerNearby((double) i1, (double) j1, (double) k1, 7.0D, EntityHuman.affectsSpawningFilter()) && this.world.a(entityzombie.getBoundingBox(), (Entity) entityzombie) && this.world.getCubes(entityzombie, entityzombie.getBoundingBox()).isEmpty() && !this.world.containsLiquid(entityzombie.getBoundingBox())) { // Paper - affectsSpawning filter
this.world.addEntity(entityzombie, CreatureSpawnEvent.SpawnReason.REINFORCEMENTS); // CraftBukkit
--
2.8.0
2.8.2

Datei anzeigen

@ -1,45 +0,0 @@
From 814a896e78a4fe3b368da81bcc802d4d5a8c3475 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 18 Mar 2016 19:15:44 -0400
Subject: [PATCH] Optimize BlockStateList/BlockData
Mojang included some sanity checks on arguments passed to the BlockData.
This code results in the Hash look up occuring twice per call, one to test if it exists
and another to retrieve the result.
This code should ideally never be hit, unless mojang released a bad build. We can discover bugs with this as furthur code that never expects a null
would then NPE, so it would not result in hidden issues.
This is super hot code, so removing those checks should give decent gains.
diff --git a/src/main/java/net/minecraft/server/BlockStateList.java b/src/main/java/net/minecraft/server/BlockStateList.java
index 19ea22f..43ecf3b 100644
--- a/src/main/java/net/minecraft/server/BlockStateList.java
+++ b/src/main/java/net/minecraft/server/BlockStateList.java
@@ -151,21 +151,11 @@ public class BlockStateList {
}
public <T extends Comparable<T>> T get(IBlockState<T> iblockstate) {
- 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)); // Paper - decompile fix
- }
+ return iblockstate.b().cast(this.b.get(iblockstate)); // Paper
}
public <T extends Comparable<T>, V extends T> IBlockData set(IBlockState<T> iblockstate, V v0) {
- if (!this.b.containsKey(iblockstate)) {
- throw new IllegalArgumentException("Cannot set property " + iblockstate + " as it does not exist in " + this.a.t());
- } else if (!iblockstate.c().contains(v0)) {
- throw new IllegalArgumentException("Cannot set property " + iblockstate + " to " + v0 + " on block " + Block.REGISTRY.b(this.a) + ", it is not an allowed value");
- } else {
- return (IBlockData) (this.b.get(iblockstate) == v0 ? this : (IBlockData) this.c.get(iblockstate, v0));
- }
+ return this.b.get(iblockstate) == v0 ? this : this.c.get(iblockstate, v0); // Paper
}
public ImmutableMap<IBlockState<?>, Comparable<?>> s() {
--
2.8.0

Datei anzeigen

@ -1,4 +1,4 @@
From dc0d3dd73071c17da61f90d233b070cca91d1896 Mon Sep 17 00:00:00 2001
From 4d271a1256717859ffd1692a3bbc5481644b0f8e Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 19 Mar 2016 15:16:54 -0400
Subject: [PATCH] Pass world to Village creation
@ -6,7 +6,7 @@ Subject: [PATCH] Pass world to Village creation
fixes NPE bug #95
diff --git a/src/main/java/net/minecraft/server/PersistentVillage.java b/src/main/java/net/minecraft/server/PersistentVillage.java
index 107f582..140b14b 100644
index a285639..22ee682 100644
--- a/src/main/java/net/minecraft/server/PersistentVillage.java
+++ b/src/main/java/net/minecraft/server/PersistentVillage.java
@@ -236,7 +236,7 @@ public class PersistentVillage extends PersistentBase {
@ -19,7 +19,7 @@ index 107f582..140b14b 100644
village.a(nbttagcompound1);
this.villages.add(village);
diff --git a/src/main/java/net/minecraft/server/Village.java b/src/main/java/net/minecraft/server/Village.java
index 932eeb7..06a06ea 100644
index e674cf9..2624abf 100644
--- a/src/main/java/net/minecraft/server/Village.java
+++ b/src/main/java/net/minecraft/server/Village.java
@@ -22,7 +22,7 @@ public class Village {
@ -41,5 +41,5 @@ index 932eeb7..06a06ea 100644
if (gameprofile != null) {
--
2.8.0
2.8.2

Datei anzeigen

@ -1,15 +1,15 @@
From 4511d316f0f42453229c665f35314a0f6f326844 Mon Sep 17 00:00:00 2001
From 7ec96efff6416cfbc3799decabe316e6594ceaec Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sun, 21 Jun 2015 15:07:20 -0400
Subject: [PATCH] Custom replacement for eaten items
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index d0e0285..f6d615d 100644
index b151c13..d11e01b 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2223,12 +2223,25 @@ public abstract class EntityLiving extends Entity {
ItemStack itemstack = (craftItem.equals(event.getItem())) ? this.bm.a(this.world, this) : CraftItemStack.asNMSCopy(event.getItem()).a(world, this);
@@ -2232,12 +2232,25 @@ public abstract class EntityLiving extends Entity {
ItemStack itemstack = (craftItem.equals(event.getItem())) ? this.bn.a(this.world, this) : CraftItemStack.asNMSCopy(event.getItem()).a(world, this);
// CraftBukkit end
+ // Paper start - save the default replacement item and change it if necessary
@ -23,8 +23,8 @@ index d0e0285..f6d615d 100644
itemstack = null;
}
this.a(this.ct(), itemstack);
this.cz();
this.a(this.cu(), itemstack);
this.cA();
+
+ // Paper start - if the replacement is anything but the default, update the client inventory
+ if (this instanceof EntityPlayer && !com.google.common.base.Objects.equal(defaultReplacement, itemstack)) {
@ -35,5 +35,5 @@ index d0e0285..f6d615d 100644
}
--
2.8.0
2.8.2

Datei anzeigen

@ -1,11 +1,11 @@
From 286d75e4bf74686f7cdf38e80148ca3c8065142c Mon Sep 17 00:00:00 2001
From 89b9ff23e310a5075ffd1bd9d7b3d9ac4a1ad396 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sun, 19 Jul 2015 16:51:38 -0400
Subject: [PATCH] Set health before death event
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index c1d50ee..a643acc 100644
index 770866f..de1717a 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -208,4 +208,9 @@ public class PaperConfig {
@ -19,7 +19,7 @@ index c1d50ee..a643acc 100644
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 0502593..3a0d338 100644
index 16da1c9..b1e63f0 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -98,11 +98,21 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {

Datei anzeigen

@ -1,14 +1,14 @@
From 9b89e5288e36a7a809bc9e9b40d03d86064145af Mon Sep 17 00:00:00 2001
From 80095f37e49793ab660d09206d3bf6155a6115c5 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 27 Sep 2015 01:18:02 -0400
Subject: [PATCH] handle NaN health/absorb values and repair bad data
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index f6d615d..41b63ce 100644
index d11e01b..df4d8d8 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -464,7 +464,13 @@ public abstract class EntityLiving extends Entity {
@@ -465,7 +465,13 @@ public abstract class EntityLiving extends Entity {
}
public void a(NBTTagCompound nbttagcompound) {
@ -23,7 +23,7 @@ index f6d615d..41b63ce 100644
if (nbttagcompound.hasKeyOfType("Attributes", 9) && this.world != null && !this.world.isClientSide) {
GenericAttributes.a(this.getAttributeMap(), nbttagcompound.getList("Attributes", 10));
}
@@ -749,6 +755,10 @@ public abstract class EntityLiving extends Entity {
@@ -752,6 +758,10 @@ public abstract class EntityLiving extends Entity {
}
public void setHealth(float f) {
@ -34,7 +34,7 @@ index f6d615d..41b63ce 100644
// CraftBukkit start - Handle scaled health
if (this instanceof EntityPlayer) {
org.bukkit.craftbukkit.entity.CraftPlayer player = ((EntityPlayer) this).getBukkitEntity();
@@ -2093,7 +2103,7 @@ public abstract class EntityLiving extends Entity {
@@ -2102,7 +2112,7 @@ public abstract class EntityLiving extends Entity {
}
public void setAbsorptionHearts(float f) {
@ -44,10 +44,10 @@ index f6d615d..41b63ce 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 9da0797..eb88228 100644
index c018773..2b555c9 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1372,6 +1372,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1375,6 +1375,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
public void setRealHealth(double health) {
@ -56,5 +56,5 @@ index 9da0797..eb88228 100644
}
--
2.8.0
2.8.2

Datei anzeigen

@ -1,14 +1,14 @@
From 5771cd988dda8603f0a922e5c61648c6ff2f6b6e Mon Sep 17 00:00:00 2001
From 72728a688b1a601363b2d8d47a5c6d9ea29edaf5 Mon Sep 17 00:00:00 2001
From: Daniel Ennis <dennis@icontact.com>
Date: Sun, 20 Mar 2016 15:22:42 -0400
Subject: [PATCH] Catch Async PlayerChunkMap operations
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index d7cbe31..17d0c81 100644
index 77e9187..6c95e50 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -418,10 +418,12 @@ public class PlayerChunkMap {
@@ -422,10 +422,12 @@ public class PlayerChunkMap {
}
public void a(PlayerChunk playerchunk) {
@ -22,5 +22,5 @@ index d7cbe31..17d0c81 100644
long i = d(chunkcoordintpair.x, chunkcoordintpair.z);
--
2.8.1
2.8.2

Datei anzeigen

@ -1,14 +1,14 @@
From 56776fc29d5d9123c509a475dd48816f146a12fb Mon Sep 17 00:00:00 2001
From 99d32a59893bfefda1c1463698b99ad4cf0f9b76 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 21 Mar 2016 00:19:18 -0500
Subject: [PATCH] Support offline mode in whitelist command as well
diff --git a/src/main/java/net/minecraft/server/CommandWhitelist.java b/src/main/java/net/minecraft/server/CommandWhitelist.java
index b52bf74..8da137e 100644
index 95ba9c3..ba1cc1b 100644
--- a/src/main/java/net/minecraft/server/CommandWhitelist.java
+++ b/src/main/java/net/minecraft/server/CommandWhitelist.java
@@ -43,24 +43,35 @@ public class CommandWhitelist extends CommandAbstract {
@@ -44,24 +44,35 @@ public class CommandWhitelist extends CommandAbstract {
throw new ExceptionUsage("commands.whitelist.add.usage", new Object[0]);
}
@ -44,7 +44,7 @@ index b52bf74..8da137e 100644
a(icommandlistener, (ICommand) this, "commands.whitelist.remove.success", new Object[] { astring[1]});
} else if (astring[0].equals("reload")) {
minecraftserver.getPlayerList().reloadWhitelist();
@@ -88,4 +99,43 @@ public class CommandWhitelist extends CommandAbstract {
@@ -89,4 +100,43 @@ public class CommandWhitelist extends CommandAbstract {
return Collections.emptyList();
}
}
@ -89,5 +89,5 @@ index b52bf74..8da137e 100644
+ // Paper end
}
--
2.8.0
2.8.2

Datei anzeigen

@ -1,14 +1,14 @@
From fa8ed798c503fad1bf1923b8aeae5600b0f5ffb4 Mon Sep 17 00:00:00 2001
From 4ab03fbd5648e5d5d8ffd5711a88ed34e80d3ad6 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 5 Jan 2016 21:48:24 -0500
Subject: [PATCH] Fix SkullCache case bug
diff --git a/src/main/java/net/minecraft/server/TileEntitySkull.java b/src/main/java/net/minecraft/server/TileEntitySkull.java
index 7eecc6c..3c20ef3 100644
index 8aafd36..49ab25b 100644
--- a/src/main/java/net/minecraft/server/TileEntitySkull.java
+++ b/src/main/java/net/minecraft/server/TileEntitySkull.java
@@ -186,7 +186,7 @@ public class TileEntitySkull extends TileEntity implements ITickable {
@@ -191,7 +191,7 @@ public class TileEntitySkull extends TileEntity implements ITickable {
} else if (MinecraftServer.getServer() == null) {
callback.apply(gameprofile);
} else {
@ -18,5 +18,5 @@ index 7eecc6c..3c20ef3 100644
callback.apply(profile);
} else {
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 5ffcb31f77910f978176bfe04aebadca9bce086b Mon Sep 17 00:00:00 2001
From 3bc455877e340f5305c1ef2a7280a3066f07a09f Mon Sep 17 00:00:00 2001
From: Gabscap <sonstige.netzwerke@gabriel-paradzik.de>
Date: Sat, 19 Mar 2016 22:25:11 +0100
Subject: [PATCH] Waving banner workaround
@ -33,5 +33,5 @@ index c5c3f40..3ed2356 100644
public void a(PacketDataSerializer packetdataserializer) throws IOException {
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 88fc0caa74e98940c4eba838d38edc280fa70c3b Mon Sep 17 00:00:00 2001
From b9b51e7c1c6d31352a01ba0444623f88cc404f31 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 22 Mar 2016 00:33:47 -0400
Subject: [PATCH] Use a Shared Random for Entities
@ -6,7 +6,7 @@ Subject: [PATCH] Use a Shared Random for Entities
Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created.
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 26f83a4..8484557 100644
index 035dd20..06840ec 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -44,6 +44,7 @@ public abstract class Entity implements ICommandListener {
@ -17,15 +17,15 @@ index 26f83a4..8484557 100644
static boolean isLevelAtLeast(NBTTagCompound tag, int level) {
return tag.hasKey("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level;
}
@@ -159,7 +160,7 @@ public abstract class Entity implements ICommandListener {
@@ -160,7 +161,7 @@ public abstract class Entity implements ICommandListener {
this.width = 0.6F;
this.length = 1.8F;
this.av = 1;
this.aw = 1;
- this.random = new Random();
+ this.random = SHARED_RANDOM; // Paper
this.maxFireTicks = 1;
this.justCreated = true;
this.uniqueID = MathHelper.a(this.random);
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 5dcb2f283bcc67ce8651bebcdda425b7f0ca54af Mon Sep 17 00:00:00 2001
From 64f7efffc2eef965370eb5fdcc15a00fb0847fed Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 22 Mar 2016 00:55:23 -0400
Subject: [PATCH] Don't teleport dead entities
@ -7,10 +7,10 @@ Had some issue with this in past, and this is the vanilla logic.
Potentially an old CB change that's no longer needed.
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 8484557..c0b0a26 100644
index 06840ec..b03e9ee 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2095,7 +2095,7 @@ public abstract class Entity implements ICommandListener {
@@ -2103,7 +2103,7 @@ public abstract class Entity implements ICommandListener {
}
public Entity teleportTo(Location exit, boolean portal) {
@ -20,5 +20,5 @@ index 8484557..c0b0a26 100644
WorldServer worldserver1 = ((CraftWorld) exit.getWorld()).getHandle();
int i = worldserver1.dimension;
--
2.8.0
2.8.2

Datei anzeigen

@ -1,364 +0,0 @@
From 98038d95d620e9e2b39bc0ee44ee99062e4cfc89 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 18 Mar 2016 17:57:25 -0400
Subject: [PATCH] Optimize Chunk Unload Queue
Removing chunks from the unload queue when performing chunk lookups is a costly activity.
It drastically slows down server performance as many methods call getChunkAt, resulting in a bandaid
to skip removing chunks from the unload queue.
This patch optimizes the unload queue to instead use a boolean on the Chunk object itself to mark
if the chunk is active, and then insert into a LinkedList queue.
The benefits here is that all chunk unload queue actions are now O(1) constant time.
A LinkedList will never need to resize, and can be removed from in constant time when
used in a queue like method.
We mark the chunk as active in many places that notify it is still being used, so that
when the chunk unload queue reaches that chunk, and sees the chunk became active again,
it will skip it and move to next.
Also optimize EAR to use these methods.
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 8b11266..ac35cf4 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -53,6 +53,8 @@ public class Chunk {
// Keep this synced with entitySlices.add() and entitySlices.remove()
private final int[] itemCounts = new int[16];
private final int[] inventoryEntityCounts = new int[16];
+ public boolean isChunkActive = true;
+ public boolean isInUnloadQueue = false;
// Paper end
// CraftBukkit start - Neighbor loaded cache for chunk lighting and entity ticking
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 969ae9d..4d0653c 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -21,7 +21,7 @@ import org.bukkit.event.world.ChunkUnloadEvent;
public class ChunkProviderServer implements IChunkProvider {
private static final Logger a = LogManager.getLogger();
- public final LongHashSet unloadQueue = new LongHashSet(); // CraftBukkit - LongHashSet
+ public final ChunkUnloadQueue unloadQueue = new ChunkUnloadQueue(); // CraftBukkit - LongHashSet // Paper -> ChunkUnloadQueue
public final ChunkGenerator chunkGenerator; // CraftBukkit - public
private final IChunkLoader chunkLoader;
public LongObjectHashMap<Chunk> chunks = new LongObjectHashMap<Chunk>(); // CraftBukkit
@@ -77,14 +77,24 @@ public class ChunkProviderServer implements IChunkProvider {
return (chunk == null) ? getChunkAt(x, z) : chunk;
}
- public Chunk getChunkIfLoaded(int x, int z) {
- return chunks.get(LongHash.toLong(x, z));
+ // Paper start
+ public Chunk getLoadedChunkAtWithoutMarkingActive(int i, int j) {
+ return chunks.get(LongHash.toLong(i, j));
}
+ // getChunkIfLoaded -> getChunkIfActive
+ // this is only used by CraftBukkit now, and plugins shouldnt mark things active
+ public Chunk getChunkIfActive(int x, int z) {
+ Chunk chunk = chunks.get(LongHash.toLong(x, z));
+ return (chunk != null && chunk.isChunkActive) ? chunk : null;
+ }
+ // Paper end
+
public Chunk getLoadedChunkAt(int i, int j) {
Chunk chunk = chunks.get(LongHash.toLong(i, j)); // CraftBukkit
- this.unloadQueue.remove(i, j); // CraftBukkit
+ //this.unloadQueue.remove(i, j); // CraftBukkit // Paper
+ markChunkActive(chunk); // Paper
return chunk;
}
@@ -112,6 +122,7 @@ public class ChunkProviderServer implements IChunkProvider {
// CraftBukkit end
}
+ markChunkActive(chunk); // Paper
return chunk;
}
@@ -124,7 +135,8 @@ public class ChunkProviderServer implements IChunkProvider {
}
public Chunk getChunkAt(int i, int j, Runnable runnable, boolean generate) {
- unloadQueue.remove(i, j);
+ //unloadQueue.remove(i, j); // Paper
+
Chunk chunk = chunks.get(LongHash.toLong(i, j));
ChunkRegionLoader loader = null;
@@ -148,12 +160,13 @@ public class ChunkProviderServer implements IChunkProvider {
if (runnable != null) {
runnable.run();
}
+ markChunkActive(chunk); // Paper
return chunk;
}
public Chunk originalGetChunkAt(int i, int j) {
- this.unloadQueue.remove(i, j);
+ //this.unloadQueue.remove(i, j); // Paper
Chunk chunk = this.chunks.get(LongHash.toLong(i, j));
boolean newChunk = false;
// CraftBukkit end
@@ -199,7 +212,7 @@ public class ChunkProviderServer implements IChunkProvider {
continue;
}
- Chunk neighbor = this.getChunkIfLoaded(chunk.locX + x, chunk.locZ + z);
+ Chunk neighbor = this.getLoadedChunkAtWithoutMarkingActive(chunk.locX + x, chunk.locZ + z); // Paper
if (neighbor != null) {
neighbor.setNeighborLoaded(-x, -z);
chunk.setNeighborLoaded(x, z);
@@ -210,6 +223,7 @@ public class ChunkProviderServer implements IChunkProvider {
chunk.loadNearby(this, this.chunkGenerator);
world.timings.syncChunkLoadTimer.stopTiming(); // Spigot
}
+ markChunkActive(chunk); // Paper
return chunk;
}
@@ -298,10 +312,17 @@ public class ChunkProviderServer implements IChunkProvider {
if (!this.world.savingDisabled) {
// CraftBukkit start
Server server = this.world.getServer();
- for (int i = 0; i < 100 && !this.unloadQueue.isEmpty(); ++i) {
- long chunkcoordinates = this.unloadQueue.popFirst();
- Chunk chunk = this.chunks.get(chunkcoordinates);
- if (chunk == null) continue;
+ // Paper start
+ final Iterator<Chunk> iterator = this.unloadQueue.iterator();
+ for (int i = 0; i < 100 && iterator.hasNext(); ++i) {
+ Chunk chunk = iterator.next();
+ iterator.remove();
+ long chunkcoordinates = LongHash.toLong(chunk.locX, chunk.locZ);
+ chunk.isInUnloadQueue = false;
+ if (chunk.isChunkActive) {
+ continue;
+ }
+ // Paper end
if (chunk.hasLightUpdates()) continue; // Paper - Don't unload chunks with pending light updates.
ChunkUnloadEvent event = new ChunkUnloadEvent(chunk.bukkitChunk);
@@ -324,13 +345,18 @@ public class ChunkProviderServer implements IChunkProvider {
continue;
}
- Chunk neighbor = this.getChunkIfLoaded(chunk.locX + x, chunk.locZ + z);
+ Chunk neighbor = this.getLoadedChunkAtWithoutMarkingActive(chunk.locX + x, chunk.locZ + z); // Paper
if (neighbor != null) {
neighbor.setNeighborUnloaded(-x, -z);
chunk.setNeighborUnloaded(x, z);
}
}
}
+ // Paper start
+ } else {
+ // Unload event is cancelled, make sure this chunk is marked active
+ markChunkActive(chunk);
+ // Paper end
}
}
// CraftBukkit end
@@ -366,4 +392,69 @@ public class ChunkProviderServer implements IChunkProvider {
public boolean e(int i, int j) {
return this.chunks.containsKey(LongHash.toLong(i, j)); // CraftBukkit
}
+
+ // Paper start
+ public static void markChunkActive(Chunk chunk) {
+ if (chunk != null) {
+ chunk.isChunkActive = true;
+ }
+ }
+ public class ChunkUnloadQueue extends LongHashSet { // Provide compat with NMS plugins
+ private java.util.LinkedList<Chunk> unloadQueue = new java.util.LinkedList<Chunk>();
+
+ @Override
+ public boolean isEmpty() {
+ return unloadQueue.isEmpty();
+ }
+
+ @Override
+ public boolean contains(long value) {
+ throw new UnsupportedOperationException("contains on unload queue");
+ }
+
+ @Override
+ public boolean add(long value) {
+ throw new UnsupportedOperationException("add on unload queue");
+ }
+
+ @Override
+ public boolean remove(long value) {
+ throw new UnsupportedOperationException("remove on unload queue");
+ }
+
+ @Override
+ public int size() {
+ return unloadQueue.size();
+ }
+
+ @Override
+ public Iterator iterator() {
+ return unloadQueue.iterator();
+ }
+
+ @Override
+ public boolean contains(int x, int z) {
+ final Chunk chunk = chunks.get(LongHash.toLong(x, z));
+ return (chunk != null && chunk.isInUnloadQueue);
+ }
+
+ public void remove(int x, int z) {
+ final Chunk chunk = chunks.get(LongHash.toLong(x, z));
+ if (chunk != null) {
+ chunk.isChunkActive = true;
+ }
+ }
+ public boolean add(int x, int z) {
+ final Chunk chunk = chunks.get(LongHash.toLong(x, z));
+ if (chunk != null) {
+ chunk.isChunkActive = false;
+ if (!chunk.isInUnloadQueue) {
+ chunk.isInUnloadQueue = true;
+ return unloadQueue.add(chunk);
+ }
+ }
+ return false;
+ }
+ }
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index e15cc1a..dc7c17c 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -28,7 +28,7 @@ public final class SpawnerCreature {
Long coord = it.next();
int x = LongHash.msw( coord );
int z = LongHash.lsw( coord );
- if ( !((ChunkProviderServer)server.chunkProvider).unloadQueue.contains( coord ) && server.isChunkLoaded( x, z, true ) )
+ if ( server.isChunkLoaded( x, z, true ) ) // Paper
{
i += server.getChunkAt( x, z ).entityCount.get( oClass );
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index c6f15b8..b223847 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -160,9 +160,15 @@ public abstract class World implements IBlockAccess {
// Paper end
public Chunk getChunkIfLoaded(int x, int z) {
- return ((ChunkProviderServer) this.chunkProvider).getChunkIfLoaded(x, z);
+ return ((ChunkProviderServer) this.chunkProvider).getLoadedChunkAtWithoutMarkingActive(x, z); // Paper - This is added by CB, and will not mark as active. Simply an alias
}
+ // Paper start
+ public Chunk getChunkIfActive(int x, int z) {
+ return ((ChunkProviderServer) this.chunkProvider).getChunkIfActive(x, z);
+ }
+ // Paper end
+
protected World(IDataManager idatamanager, WorldData worlddata, WorldProvider worldprovider, MethodProfiler methodprofiler, boolean flag, ChunkGenerator gen, org.bukkit.World.Environment env) {
this.spigotConfig = new org.spigotmc.SpigotWorldConfig( worlddata.getName() ); // Spigot
this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(worlddata.getName(), this.spigotConfig); // Paper
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index dfa7e73..922ebaf 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -210,7 +210,7 @@ public class CraftWorld implements World {
private boolean unloadChunk0(int x, int z, boolean save, boolean safe) {
// Paper start - Don't create a chunk just to unload it
- net.minecraft.server.Chunk chunk = world.getChunkProviderServer().getChunkIfLoaded(x, z);
+ net.minecraft.server.Chunk chunk = world.getChunkProviderServer().getChunkIfActive(x, z); // Paper
if (chunk == null) {
return false;
}
@@ -237,7 +237,7 @@ public class CraftWorld implements World {
continue;
}
- net.minecraft.server.Chunk neighbor = world.getChunkProviderServer().getChunkIfLoaded(chunk.locX + x, chunk.locZ + z);
+ net.minecraft.server.Chunk neighbor = world.getChunkProviderServer().getLoadedChunkAtWithoutMarkingActive(chunk.locX + x, chunk.locZ + z); // Paper
if (neighbor != null) {
neighbor.setNeighborUnloaded(-xx, -zz);
chunk.setNeighborUnloaded(xx, zz);
@@ -299,6 +299,7 @@ public class CraftWorld implements World {
// Use the default variant of loadChunk when generate == true.
return world.getChunkProviderServer().getChunkAt(x, z) != null;
}
+ if (true) { return world.getChunkProviderServer().getOrLoadChunkAt(x, z) != null; } // Paper
world.getChunkProviderServer().unloadQueue.remove(x, z);
net.minecraft.server.Chunk chunk = world.getChunkProviderServer().chunks.get(LongHash.toLong(x, z));
@@ -324,7 +325,7 @@ public class CraftWorld implements World {
continue;
}
- net.minecraft.server.Chunk neighbor = world.getChunkProviderServer().getChunkIfLoaded(chunk.locX + x, chunk.locZ + z);
+ net.minecraft.server.Chunk neighbor = world.getChunkProviderServer().getLoadedChunkAtWithoutMarkingActive(chunk.locX + x, chunk.locZ + z); // Paper
if (neighbor != null) {
neighbor.setNeighborLoaded(-x, -z);
chunk.setNeighborLoaded(x, z);
@@ -1541,7 +1542,7 @@ public class CraftWorld implements World {
}
// Already unloading?
- if (cps.unloadQueue.contains(chunk.locX, chunk.locZ)) {
+ if (chunk.isInUnloadQueue) { // Paper
continue;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
index 482af17..a1a6d5a 100644
--- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
+++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
@@ -62,7 +62,7 @@ class ChunkIOProvider implements AsynchronousExecutor.CallBackProvider<QueuedChu
continue;
}
- Chunk neighbor = queuedChunk.provider.getChunkIfLoaded(chunk.locX + x, chunk.locZ + z);
+ Chunk neighbor = queuedChunk.provider.getLoadedChunkAtWithoutMarkingActive(chunk.locX + x, chunk.locZ + z); // Paper
if (neighbor != null) {
neighbor.setNeighborLoaded(-x, -z);
chunk.setNeighborLoaded(x, z);
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index f0d3a19..c32b805 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -126,9 +126,9 @@ public class ActivationRange
{
for ( int j1 = k; j1 <= l; ++j1 )
{
- if ( world.getWorld().isChunkLoaded( i1, j1 ) )
- {
- activateChunkEntities( world.getChunkAt( i1, j1 ) );
+ Chunk chunk = world.getChunkIfActive(i1, j1); // Paper
+ if (chunk != null) { // Paper
+ activateChunkEntities( chunk ); // Paper
}
}
}
@@ -276,7 +276,7 @@ public class ActivationRange
int x = MathHelper.floor( entity.locX );
int z = MathHelper.floor( entity.locZ );
// Make sure not on edge of unloaded chunk
- Chunk chunk = entity.world.getChunkIfLoaded( x >> 4, z >> 4 );
+ Chunk chunk = isActive ? entity.world.getChunkIfActive( x >> 4, z >> 4 ) : null; // Paper
if ( isActive && !( chunk != null && chunk.areNeighborsLoaded( 1 ) ) )
{
isActive = false;
--
2.8.0

Datei anzeigen

@ -1,4 +1,4 @@
From 244e2b525225427d739ef28b12dbe63c819e1d38 Mon Sep 17 00:00:00 2001
From 1917871be3d7d048b496022ef54eaf230ff2a900 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 27 Aug 2015 01:15:02 -0400
Subject: [PATCH] Optimize Chunk Access
@ -9,18 +9,18 @@ getChunkAt is called for the same chunk multiple times in a row, often from getT
Optimize this look up by using a Last Access cache.
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index ac35cf4..6e3d17b 100644
index eb60455..22e4728 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -30,6 +30,7 @@ public class Chunk {
private boolean i;
private boolean j;
public final World world;
public final int[] heightMap;
+ public final long chunkKey; // Paper
public final int locX;
public final int locZ;
private boolean l;
@@ -97,6 +98,7 @@ public class Chunk {
private boolean m;
@@ -96,6 +97,7 @@ public class Chunk {
this.world = world;
this.locX = i;
this.locZ = j;
@ -29,17 +29,18 @@ index ac35cf4..6e3d17b 100644
for (int k = 0; k < this.entitySlices.length; ++k) {
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 4d0653c..9863126 100644
index 32b71c6..3d36d7a 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -24,7 +24,26 @@ public class ChunkProviderServer implements IChunkProvider {
public final ChunkUnloadQueue unloadQueue = new ChunkUnloadQueue(); // CraftBukkit - LongHashSet // Paper -> ChunkUnloadQueue
public final ChunkGenerator chunkGenerator; // CraftBukkit - public
@@ -27,7 +27,27 @@ public class ChunkProviderServer implements IChunkProvider {
public final Set<Long> unloadQueue = Sets.newHashSet(); // PAIL: private -> public
public final ChunkGenerator chunkGenerator;
private final IChunkLoader chunkLoader;
- public LongObjectHashMap<Chunk> chunks = new LongObjectHashMap<Chunk>(); // CraftBukkit
- public final Long2ObjectMap<Chunk> chunks = new Long2ObjectOpenHashMap(8192);
+ // Paper start
+ protected Chunk lastChunkByPos = null;
+ public LongObjectHashMap<Chunk> chunks = new LongObjectHashMap<Chunk>() {
+ public Long2ObjectOpenHashMap<Chunk> chunks = new Long2ObjectOpenHashMap<Chunk>(8192) {
+
+ @Override
+ public Chunk get(long key) {
+ if (lastChunkByPos != null && key == lastChunkByPos.chunkKey) {
@ -57,9 +58,9 @@ index 4d0653c..9863126 100644
+ }
+ }; // CraftBukkit
+ // Paper end
// private final LongHashMap<Chunk> chunks = new LongHashMap();
// private final List<Chunk> chunkList = Lists.newArrayList();
public final WorldServer world;
public ChunkProviderServer(WorldServer worldserver, IChunkLoader ichunkloader, ChunkGenerator chunkgenerator) {
--
2.8.0
2.8.2

Datei anzeigen

@ -1,14 +1,14 @@
From c9189373d0a6be8feecbbf1ce54c9ba3c893d538 Mon Sep 17 00:00:00 2001
From da7add4567d101a8d875e6a43a74263680b77fbd Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 22 Mar 2016 12:04:28 -0500
Subject: [PATCH] Configurable spawn chances for skeleton horses
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 26c1b72..55b211e 100644
index 50e891f..cdb1766 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -291,4 +291,9 @@ public class PaperWorldConfig {
@@ -285,4 +285,9 @@ public class PaperWorldConfig {
}
log("Non Player Arrow Despawn Rate: " + nonPlayerArrowDespawnRate);
}
@ -19,10 +19,10 @@ index 26c1b72..55b211e 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index c5b08f9..7239f99 100644
index c7e5226..6447d7b 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -429,7 +429,10 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -431,7 +431,10 @@ public class WorldServer extends World implements IAsyncTaskHandler {
if (this.isRainingAt(blockposition)) {
DifficultyDamageScaler difficultydamagescaler = this.D(blockposition);
@ -35,5 +35,5 @@ index c5b08f9..7239f99 100644
entityhorse.setType(EnumHorseType.SKELETON);
--
2.8.0
2.8.2

Datei anzeigen

@ -0,0 +1,79 @@
From e678b0cd49904fd62192a607e2444dd4c8eae5d4 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
Move test to the blockPosition class so that it can access local variables.
Replace all calls to the new place to the unnecessary forward.
diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java
index d60e755..9114388 100644
--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java
+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java
@@ -10,6 +10,11 @@ public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
private final int a;
private final int b;
private final int c;
+ // Paper start
+ public boolean isValidLocation() {
+ return a >= -30000000 && c >= -30000000 && a < 30000000 && c < 30000000 && b >= 0 && b < 256;
+ }
+ // Paper end
public BaseBlockPosition(int i, int j, int k) {
this.a = i;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 3bdf072..ecf3a38 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -274,8 +274,8 @@ public abstract class World implements IBlockAccess {
return this.getType(blockposition1);
}
- private boolean isValidLocation(BlockPosition blockposition) {
- return !this.E(blockposition) && blockposition.getX() >= -30000000 && blockposition.getZ() >= -30000000 && blockposition.getX() < 30000000 && blockposition.getZ() < 30000000;
+ private static boolean isValidLocation(BlockPosition blockposition) { // Paper
+ return blockposition.isValidLocation(); // Paper
}
private boolean E(BlockPosition blockposition) {
@@ -649,7 +649,7 @@ public abstract class World implements IBlockAccess {
// Paper start - test if meets light level, return faster
// logic copied from below
public boolean isLightLevel(BlockPosition blockposition, int level) {
- if (isValidLocation(blockposition)) {
+ if (blockposition.isValidLocation()) {
if (this.getType(blockposition).f()) {
if (this.c(blockposition.up(), false) >= level) {
return true;
@@ -763,7 +763,7 @@ public abstract class World implements IBlockAccess {
blockposition = new BlockPosition(blockposition.getX(), 0, blockposition.getZ());
}
- if (!this.isValidLocation(blockposition)) {
+ if (!blockposition.isValidLocation()) { // Paper
return enumskyblock.c;
} else if (!this.isLoaded(blockposition)) {
return enumskyblock.c;
@@ -775,7 +775,7 @@ public abstract class World implements IBlockAccess {
}
public void a(EnumSkyBlock enumskyblock, BlockPosition blockposition, int i) {
- if (this.isValidLocation(blockposition)) {
+ if (blockposition.isValidLocation()) { // Paper
if (this.isLoaded(blockposition)) {
Chunk chunk = this.getChunkAtWorldCoords(blockposition);
@@ -811,7 +811,7 @@ public abstract class World implements IBlockAccess {
// CraftBukkit end
Chunk chunk = this.getChunkIfLoaded(blockposition);
if (chunk != null) {
- return this.isValidLocation(blockposition) ? chunk.getBlockData(blockposition) : Blocks.AIR.getBlockData();
+ return blockposition.isValidLocation() ? chunk.getBlockData(blockposition) : Blocks.AIR.getBlockData();
}
return null;
}
--
2.8.2

Datei anzeigen

@ -1,14 +1,14 @@
From 7441dbd863529b28257040f5842f9b623ca10518 Mon Sep 17 00:00:00 2001
From 9ed5eb00e14ac2cc32809189cb1b1a890f91702a Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Tue, 22 Mar 2016 16:00:16 -0400
Subject: [PATCH] Use correct item in arrow pickup event
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
index a073e6c..6749898 100644
index c2ee9ce..f6b7453 100644
--- a/src/main/java/net/minecraft/server/EntityArrow.java
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
@@ -430,7 +430,7 @@ public abstract class EntityArrow extends Entity implements IProjectile {
@@ -432,7 +432,7 @@ public abstract class EntityArrow extends Entity implements IProjectile {
public void d(EntityHuman entityhuman) {
if (!this.world.isClientSide && this.inGround && this.shake <= 0) {
// CraftBukkit start
@ -17,7 +17,7 @@ index a073e6c..6749898 100644
if (this.fromPlayer == PickupStatus.ALLOWED && entityhuman.inventory.canHold(itemstack) > 0) {
EntityItem item = new EntityItem(this.world, this.locX, this.locY, this.locZ, itemstack);
@@ -445,7 +445,7 @@ public abstract class EntityArrow extends Entity implements IProjectile {
@@ -447,7 +447,7 @@ public abstract class EntityArrow extends Entity implements IProjectile {
// CraftBukkit end
boolean flag = this.fromPlayer == EntityArrow.PickupStatus.ALLOWED || this.fromPlayer == EntityArrow.PickupStatus.CREATIVE_ONLY && entityhuman.abilities.canInstantlyBuild;
@ -27,5 +27,5 @@ index a073e6c..6749898 100644
}
--
2.8.0
2.8.2

Datei anzeigen

@ -1,4 +1,4 @@
From 1cdeef4af311224fad86305e246823361b0c0bd3 Mon Sep 17 00:00:00 2001
From fe1a030a5b040dc3d90799ec669e6866d208aa0b Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Tue, 1 Mar 2016 04:32:08 -0500
Subject: [PATCH] Fix cooked fish legacy import
@ -18,5 +18,5 @@ index 87b82eb..a7c71f4 100644
DataConverterMaterialId.a[352] = "minecraft:bone";
DataConverterMaterialId.a[353] = "minecraft:sugar";
--
2.8.0
2.8.2

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen