Update Paper to MC 1.11

This commit is contained in:
Zach Brown 2016-11-16 20:23:38 -06:00
parent 6c1880847f
commit a6d146a939
No known key found for this signature in database
GPG Key ID: CC9DA35FC5450B76
193 changed files with 1635 additions and 1846 deletions

View File

@ -1,11 +1,11 @@
From d2964723ffed5f0bbf1fef361f554666b43d53e7 Mon Sep 17 00:00:00 2001 From b3731bee34a4bb6ddd06bc47e1b0c9631aabcec9 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 17:16:08 -0600 Date: Mon, 29 Feb 2016 17:16:08 -0600
Subject: [PATCH] POM changes Subject: [PATCH] POM changes
diff --git a/pom.xml b/pom.xml diff --git a/pom.xml b/pom.xml
index 217ce0b..8f0fb79 100644 index 2ccc205..1ce6a91 100644
--- a/pom.xml --- a/pom.xml
+++ b/pom.xml +++ b/pom.xml
@@ -4,35 +4,37 @@ @@ -4,35 +4,37 @@
@ -24,7 +24,7 @@ index 217ce0b..8f0fb79 100644
- <artifactId>spigot-api</artifactId> - <artifactId>spigot-api</artifactId>
+ <groupId>com.destroystokyo.paper</groupId> + <groupId>com.destroystokyo.paper</groupId>
+ <artifactId>paper-api</artifactId> + <artifactId>paper-api</artifactId>
<version>1.10.2-R0.1-SNAPSHOT</version> <version>1.11-R0.1-SNAPSHOT</version>
<packaging>jar</packaging> <packaging>jar</packaging>
- <name>Spigot-API</name> - <name>Spigot-API</name>
@ -101,7 +101,7 @@ index 217ce0b..8f0fb79 100644
<plugin> <plugin>
- <groupId>org.codehaus.mojo</groupId> - <groupId>org.codehaus.mojo</groupId>
- <artifactId>animal-sniffer-maven-plugin</artifactId> - <artifactId>animal-sniffer-maven-plugin</artifactId>
- <version>1.14</version> - <version>1.15</version>
- <executions> - <executions>
- <execution> - <execution>
- <phase>process-classes</phase> - <phase>process-classes</phase>
@ -121,7 +121,7 @@ index 217ce0b..8f0fb79 100644
- <plugin> - <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId> <artifactId>maven-shade-plugin</artifactId>
<version>2.4.1</version> <version>2.4.3</version>
-- --
2.10.2 2.10.2

View File

@ -1,4 +1,4 @@
From 3a72f5e0b411d51cf5ec7263a22466214012d08f Mon Sep 17 00:00:00 2001 From 814fcd79c37cf32b74eb3a231ba4ff8e71d58c0a Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Mon, 29 Feb 2016 18:48:17 -0600 Date: Mon, 29 Feb 2016 18:48:17 -0600
Subject: [PATCH] Timings v2 Subject: [PATCH] Timings v2
@ -2888,7 +2888,7 @@ index 0000000..3a288d2
+ } + }
+} +}
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index dc2c9d1..85fd9a8 100644 index 5d8422e..ac8b0f5 100644
--- a/src/main/java/org/bukkit/Bukkit.java --- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java
@@ -537,7 +537,6 @@ public final class Bukkit { @@ -537,7 +537,6 @@ public final class Bukkit {
@ -2900,10 +2900,10 @@ index dc2c9d1..85fd9a8 100644
/** /**
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 69720e9..f82cbaf 100644 index c5c3506..3cc741b 100644
--- a/src/main/java/org/bukkit/Server.java --- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java
@@ -942,12 +942,27 @@ public interface Server extends PluginMessageRecipient { @@ -925,12 +925,27 @@ public interface Server extends PluginMessageRecipient {
public class Spigot public class Spigot
{ {
@ -2933,7 +2933,7 @@ index 69720e9..f82cbaf 100644
* Sends the component to the player * Sends the component to the player
* *
diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java
index ffbe5dd..4c86694 100644 index 08a9739..347d218 100644
--- a/src/main/java/org/bukkit/command/Command.java --- a/src/main/java/org/bukkit/command/Command.java
+++ b/src/main/java/org/bukkit/command/Command.java +++ b/src/main/java/org/bukkit/command/Command.java
@@ -32,7 +32,8 @@ public abstract class Command { @@ -32,7 +32,8 @@ public abstract class Command {
@ -2954,7 +2954,7 @@ index ffbe5dd..4c86694 100644
} }
/** /**
@@ -250,7 +250,6 @@ public abstract class Command { @@ -235,7 +235,6 @@ public abstract class Command {
public boolean setLabel(String name) { public boolean setLabel(String name) {
this.nextLabel = name; this.nextLabel = name;
if (!isRegistered()) { if (!isRegistered()) {
@ -3656,5 +3656,5 @@ index 8d98297..7e89b97 100644
- } - }
} }
-- --
2.10.0.windows.1 2.10.2

View File

@ -1,14 +1,14 @@
From 5c2caa3ee27bbd84914df4a001cfb7bcb528b3a2 Mon Sep 17 00:00:00 2001 From 10486c5a17f63eecf703a772acd168b74c0f6d40 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Mon, 29 Feb 2016 17:24:57 -0600 Date: Mon, 29 Feb 2016 17:24:57 -0600
Subject: [PATCH] Add getTPS method Subject: [PATCH] Add getTPS method
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 85fd9a8..8d602a3 100644 index ac8b0f5..86102a6 100644
--- a/src/main/java/org/bukkit/Bukkit.java --- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1140,6 +1140,14 @@ public final class Bukkit { @@ -1121,6 +1121,14 @@ public final class Bukkit {
} }
/** /**
@ -24,10 +24,10 @@ index 85fd9a8..8d602a3 100644
* @return the unsafe values instance * @return the unsafe values instance
*/ */
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index f82cbaf..6e23b0c 100644 index 3cc741b..1e65835 100644
--- a/src/main/java/org/bukkit/Server.java --- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java
@@ -934,6 +934,13 @@ public interface Server extends PluginMessageRecipient { @@ -917,6 +917,13 @@ public interface Server extends PluginMessageRecipient {
BossBar createBossBar(String title, BarColor color, BarStyle style, BarFlag ...flags); BossBar createBossBar(String title, BarColor color, BarStyle style, BarFlag ...flags);
/** /**
@ -42,5 +42,5 @@ index f82cbaf..6e23b0c 100644
* @return the unsafe values instance * @return the unsafe values instance
*/ */
-- --
2.9.2.windows.1 2.10.2

View File

@ -1,11 +1,11 @@
From e4b1bdd2b710c3c09c0ba4946bf8a313c4f4296d Mon Sep 17 00:00:00 2001 From a6fae8f6ab073c9006b14b039aebbf7e1d64e242 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc> From: kashike <kashike@vq.lc>
Date: Mon, 29 Feb 2016 19:48:59 -0600 Date: Mon, 29 Feb 2016 19:48:59 -0600
Subject: [PATCH] Expose server CommandMap Subject: [PATCH] Expose server CommandMap
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 8d602a3..b6a0b40 100644 index 86102a6..5b0441a 100644
--- a/src/main/java/org/bukkit/Bukkit.java --- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java
@@ -17,10 +17,7 @@ import org.bukkit.boss.BarColor; @@ -17,10 +17,7 @@ import org.bukkit.boss.BarColor;
@ -20,7 +20,7 @@ index 8d602a3..b6a0b40 100644
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.inventory.InventoryType; import org.bukkit.event.inventory.InventoryType;
@@ -1156,6 +1153,17 @@ public final class Bukkit { @@ -1137,6 +1134,17 @@ public final class Bukkit {
return server.getUnsafe(); return server.getUnsafe();
} }
@ -39,7 +39,7 @@ index 8d602a3..b6a0b40 100644
{ {
return server.spigot(); return server.spigot();
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 6e23b0c..a1ce356 100644 index 1e65835..de22136 100644
--- a/src/main/java/org/bukkit/Server.java --- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java
@@ -17,10 +17,7 @@ import org.bukkit.boss.BarColor; @@ -17,10 +17,7 @@ import org.bukkit.boss.BarColor;
@ -54,7 +54,7 @@ index 6e23b0c..a1ce356 100644
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.inventory.InventoryType; import org.bukkit.event.inventory.InventoryType;
@@ -940,6 +937,14 @@ public interface Server extends PluginMessageRecipient { @@ -923,6 +920,14 @@ public interface Server extends PluginMessageRecipient {
*/ */
public double[] getTPS(); public double[] getTPS();
@ -70,5 +70,5 @@ index 6e23b0c..a1ce356 100644
* @see UnsafeValues * @see UnsafeValues
* @return the unsafe values instance * @return the unsafe values instance
-- --
2.9.2.windows.1 2.10.2

View File

@ -1,4 +1,4 @@
From f0041900182f286ab91e23bd1c3dac326d165510 Mon Sep 17 00:00:00 2001 From 8674a30c6579a14d5b0be4b545d2fb296eb9a3eb Mon Sep 17 00:00:00 2001
From: William <admin@domnian.com> From: William <admin@domnian.com>
Date: Fri, 18 Mar 2016 03:28:07 -0400 Date: Fri, 18 Mar 2016 03:28:07 -0400
Subject: [PATCH] Add command to reload permissions.yml and require confirm to Subject: [PATCH] Add command to reload permissions.yml and require confirm to
@ -6,10 +6,10 @@ Subject: [PATCH] Add command to reload permissions.yml and require confirm to
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 5b37396..b01cd7d 100644 index 5265d68..28a54fd 100644
--- a/src/main/java/org/bukkit/Bukkit.java --- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1182,6 +1182,13 @@ public final class Bukkit { @@ -1163,6 +1163,13 @@ public final class Bukkit {
public static CommandMap getCommandMap() { public static CommandMap getCommandMap() {
return server.getCommandMap(); return server.getCommandMap();
} }
@ -24,10 +24,10 @@ index 5b37396..b01cd7d 100644
public static Server.Spigot spigot() public static Server.Spigot spigot()
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 309fa3f..b527372 100644 index c8d209e..4d82c6f 100644
--- a/src/main/java/org/bukkit/Server.java --- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java
@@ -1018,4 +1018,6 @@ public interface Server extends PluginMessageRecipient { @@ -1001,4 +1001,6 @@ public interface Server extends PluginMessageRecipient {
} }
Spigot spigot(); Spigot spigot();
@ -105,5 +105,5 @@ index 1302773..9ce0a5d 100644
+ +
} }
-- --
2.10.1.windows.1 2.10.2

View File

@ -1,14 +1,14 @@
From 1ec57a41072c805aeeb8efb10cac8b4738cb4aab Mon Sep 17 00:00:00 2001 From 2ab72f61fd122921fba37d85ee45181482a8b1bc Mon Sep 17 00:00:00 2001
From: DemonWav <demonwav@gmail.com> From: DemonWav <demonwav@gmail.com>
Date: Wed, 30 Mar 2016 01:19:51 -0500 Date: Wed, 30 Mar 2016 01:19:51 -0500
Subject: [PATCH] Add getEntity by UUID API Subject: [PATCH] Add getEntity by UUID API
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index b01cd7d..3161b87 100644 index 28a54fd..152f1d1 100644
--- a/src/main/java/org/bukkit/Bukkit.java --- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1189,6 +1189,16 @@ public final class Bukkit { @@ -1170,6 +1170,16 @@ public final class Bukkit {
public static void reloadPermissions() { public static void reloadPermissions() {
server.reloadPermissions(); server.reloadPermissions();
} }
@ -26,10 +26,10 @@ index b01cd7d..3161b87 100644
public static Server.Spigot spigot() public static Server.Spigot spigot()
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index b527372..edf0d04 100644 index 4d82c6f..4b56131 100644
--- a/src/main/java/org/bukkit/Server.java --- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java
@@ -1020,4 +1020,12 @@ public interface Server extends PluginMessageRecipient { @@ -1003,4 +1003,12 @@ public interface Server extends PluginMessageRecipient {
Spigot spigot(); Spigot spigot();
void reloadPermissions(); // Paper void reloadPermissions(); // Paper
@ -43,5 +43,5 @@ index b527372..edf0d04 100644
+ Entity getEntity(UUID uuid); // Paper + Entity getEntity(UUID uuid); // Paper
} }
-- --
2.9.2.windows.1 2.10.2

View File

@ -1,24 +1,19 @@
From e9878408be4b8c493c04fa5adcd9c2c7fcd4297c Mon Sep 17 00:00:00 2001 From eb18a4b30a1eabbbac206684cb0fe901ce78a5c0 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Fri, 22 Apr 2016 01:43:11 -0500 Date: Fri, 22 Apr 2016 01:43:11 -0500
Subject: [PATCH] EntityRegainHealthEvent isFastRegen API Subject: [PATCH] EntityRegainHealthEvent isFastRegen API
diff --git a/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java b/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java diff --git a/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java b/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java
index a7b3517..703520f 100644 index c7e9ba6..3ffc727 100644
--- a/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java --- a/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java
+++ b/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java +++ b/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java
@@ -13,6 +13,7 @@ public class EntityRegainHealthEvent extends EntityEvent implements Cancellable @@ -13,12 +13,31 @@ public class EntityRegainHealthEvent extends EntityEvent implements Cancellable
private boolean cancelled; private boolean cancelled;
private double amount; private double amount;
private final RegainReason regainReason; private final RegainReason regainReason;
+ private final boolean isFastRegen; // Paper + private final boolean isFastRegen; // Paper
@Deprecated
public EntityRegainHealthEvent(final Entity entity, final int amount, final RegainReason regainReason) {
@@ -20,10 +21,28 @@ public class EntityRegainHealthEvent extends EntityEvent implements Cancellable
}
public EntityRegainHealthEvent(final Entity entity, final double amount, final RegainReason regainReason) { public EntityRegainHealthEvent(final Entity entity, final double amount, final RegainReason regainReason) {
+ // Paper start - Forward + // Paper start - Forward
+ this(entity, amount, regainReason, false); + this(entity, amount, regainReason, false);
@ -46,5 +41,5 @@ index a7b3517..703520f 100644
/** /**
* Gets the amount of regained health * Gets the amount of regained health
-- --
2.9.2.windows.1 2.10.2

View File

@ -1,11 +1,11 @@
From 888d6c40c7160d46ca8a0f64c5c0eda4129a841a Mon Sep 17 00:00:00 2001 From ef4a8ce2c0397b24187bd98015ccc83c33f14062 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 20:40:33 -0600 Date: Mon, 29 Feb 2016 20:40:33 -0600
Subject: [PATCH] POM Changes Subject: [PATCH] POM Changes
diff --git a/pom.xml b/pom.xml diff --git a/pom.xml b/pom.xml
index 5dfa5b6..4ae34c8 100644 index 165863b..87f438c 100644
--- a/pom.xml --- a/pom.xml
+++ b/pom.xml +++ b/pom.xml
@@ -1,12 +1,12 @@ @@ -1,12 +1,12 @@
@ -17,7 +17,7 @@ index 5dfa5b6..4ae34c8 100644
+ <groupId>com.destroystokyo.paper</groupId> + <groupId>com.destroystokyo.paper</groupId>
+ <artifactId>paper</artifactId> + <artifactId>paper</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<version>1.10.2-R0.1-SNAPSHOT</version> <version>1.11-R0.1-SNAPSHOT</version>
- <name>Spigot</name> - <name>Spigot</name>
- <url>http://www.spigotmc.org</url> - <url>http://www.spigotmc.org</url>
+ <name>Paper</name> + <name>Paper</name>
@ -25,10 +25,10 @@ index 5dfa5b6..4ae34c8 100644
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -15,21 +15,22 @@ @@ -16,21 +16,22 @@
<minecraft_version>1_10_R1</minecraft_version>
<buildtag.prefix>git-Bukkit-</buildtag.prefix> <buildtag.prefix>git-Bukkit-</buildtag.prefix>
<buildtag.suffix></buildtag.suffix> <buildtag.suffix></buildtag.suffix>
<maven.build.timestamp.format>yyyyMMdd-HHmm</maven.build.timestamp.format>
- <maven.compiler.source>1.6</maven.compiler.source> - <maven.compiler.source>1.6</maven.compiler.source>
- <maven.compiler.target>1.6</maven.compiler.target> - <maven.compiler.target>1.6</maven.compiler.target>
+ <!--Paper - Bump to 1.8 - This will haunt me --> + <!--Paper - Bump to 1.8 - This will haunt me -->
@ -54,7 +54,7 @@ index 5dfa5b6..4ae34c8 100644
<version>${project.version}</version> <version>${project.version}</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
@@ -93,34 +94,22 @@ @@ -94,34 +95,22 @@
<!-- This builds a completely 'ready to start' jar with all dependencies inside --> <!-- This builds a completely 'ready to start' jar with all dependencies inside -->
<build> <build>
@ -100,9 +100,9 @@ index 5dfa5b6..4ae34c8 100644
</goals> </goals>
</execution> </execution>
</executions> </executions>
@@ -130,11 +119,12 @@ @@ -131,11 +120,12 @@
<artifactId>maven-jar-plugin</artifactId> <artifactId>maven-jar-plugin</artifactId>
<version>2.6</version> <version>3.0.2</version>
<configuration> <configuration>
+ <forceCreation>true</forceCreation> <!-- Required to prevent shading the jar multiple times --> + <forceCreation>true</forceCreation> <!-- Required to prevent shading the jar multiple times -->
<archive> <archive>
@ -111,16 +111,16 @@ index 5dfa5b6..4ae34c8 100644
<Implementation-Title>CraftBukkit</Implementation-Title> <Implementation-Title>CraftBukkit</Implementation-Title>
- <Implementation-Version>${spigot.desc}${craftbukkit.desc}</Implementation-Version> - <Implementation-Version>${spigot.desc}${craftbukkit.desc}</Implementation-Version>
+ <Implementation-Version>${describe}</Implementation-Version> + <Implementation-Version>${describe}</Implementation-Version>
<Implementation-Vendor>Bukkit Team</Implementation-Vendor> <Implementation-Vendor>${maven.build.timestamp}</Implementation-Vendor>
<Specification-Title>Bukkit</Specification-Title> <Specification-Title>Bukkit</Specification-Title>
<Specification-Version>${api.version}</Specification-Version> <Specification-Version>${api.version}</Specification-Version>
@@ -164,26 +154,6 @@ @@ -165,26 +155,6 @@
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
- <groupId>org.codehaus.mojo</groupId> - <groupId>org.codehaus.mojo</groupId>
- <artifactId>animal-sniffer-maven-plugin</artifactId> - <artifactId>animal-sniffer-maven-plugin</artifactId>
- <version>1.14</version> - <version>1.15</version>
- <executions> - <executions>
- <execution> - <execution>
- <phase>process-classes</phase> - <phase>process-classes</phase>
@ -140,8 +140,8 @@ index 5dfa5b6..4ae34c8 100644
- <plugin> - <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId> <artifactId>maven-shade-plugin</artifactId>
<version>2.4.1</version> <version>2.4.3</version>
@@ -194,11 +164,13 @@ @@ -195,11 +165,13 @@
<goal>shade</goal> <goal>shade</goal>
</goals> </goals>
<configuration> <configuration>
@ -159,7 +159,7 @@ index 5dfa5b6..4ae34c8 100644
<relocation> <relocation>
<pattern>jline</pattern> <pattern>jline</pattern>
<shadedPattern>org.bukkit.craftbukkit.libs.jline</shadedPattern> <shadedPattern>org.bukkit.craftbukkit.libs.jline</shadedPattern>
@@ -232,20 +204,6 @@ @@ -238,20 +210,6 @@
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<!-- versions after this appear to be broken --> <!-- versions after this appear to be broken -->
<version>3.1</version> <version>3.1</version>
@ -194,5 +194,5 @@ index 9304637..674096c 100644
if (stream != null) { if (stream != null) {
-- --
2.9.0 2.10.2

View File

@ -1,4 +1,4 @@
From ad312eb4160456b4bef80ad7b7984b4cdb9d609c Mon Sep 17 00:00:00 2001 From ec03a27e95b1f53a612f33a4223a818ad61226fa Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 21:02:09 -0600 Date: Mon, 29 Feb 2016 21:02:09 -0600
Subject: [PATCH] Paper config files Subject: [PATCH] Paper config files
@ -253,10 +253,10 @@ index 0000000..dae60dc
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 109d0e8..11a49a3 100644 index 954e0f3..f01bd35 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java --- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -182,6 +182,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -183,6 +183,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
org.spigotmc.SpigotConfig.init((File) options.valueOf("spigot-settings")); org.spigotmc.SpigotConfig.init((File) options.valueOf("spigot-settings"));
org.spigotmc.SpigotConfig.registerCommands(); org.spigotmc.SpigotConfig.registerCommands();
// Spigot end // Spigot end
@ -268,7 +268,7 @@ index 109d0e8..11a49a3 100644
DedicatedServer.LOGGER.info("Generating keypair"); DedicatedServer.LOGGER.info("Generating keypair");
this.a(MinecraftEncryption.b()); this.a(MinecraftEncryption.b());
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index fcd90be..e649435 100644 index a912719..8bd0250 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/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 { @@ -125,6 +125,8 @@ public abstract class World implements IBlockAccess {
@ -289,7 +289,7 @@ index fcd90be..e649435 100644
this.world = new CraftWorld((WorldServer) this, gen, env); this.world = new CraftWorld((WorldServer) this, gen, env);
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 0658647..e7e9941 100644 index 6f31b47..d306f62 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -694,6 +694,7 @@ public final class CraftServer implements Server { @@ -694,6 +694,7 @@ public final class CraftServer implements Server {
@ -316,10 +316,10 @@ index 0658647..e7e9941 100644
overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*"); overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*");
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 337aa29..979adad 100644 index f7637a9..11bc824 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -122,6 +122,14 @@ public class Main { @@ -126,6 +126,14 @@ public class Main {
.defaultsTo(new File("spigot.yml")) .defaultsTo(new File("spigot.yml"))
.describedAs("Yml file"); .describedAs("Yml file");
// Spigot End // Spigot End
@ -335,5 +335,5 @@ index 337aa29..979adad 100644
}; };
-- --
2.10.0.windows.1 2.10.2

View File

@ -1,4 +1,4 @@
From bd8f9fe1de9b9e80ac852d851b6f7d58aecfec55 Mon Sep 17 00:00:00 2001 From 3feb3accfd0afbeb9d2896bf9f1561dab0959fb7 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Wed, 30 Mar 2016 19:36:20 -0400 Date: Wed, 30 Mar 2016 19:36:20 -0400
Subject: [PATCH] MC Dev fixes Subject: [PATCH] MC Dev fixes
@ -18,7 +18,7 @@ index f02fc60..d60e755 100644
} }
} }
diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java
index 059c96f..ab04f9c 100644 index e62df5c..62a338e 100644
--- a/src/main/java/net/minecraft/server/BiomeBase.java --- a/src/main/java/net/minecraft/server/BiomeBase.java
+++ b/src/main/java/net/minecraft/server/BiomeBase.java +++ b/src/main/java/net/minecraft/server/BiomeBase.java
@@ -49,7 +49,7 @@ public abstract class BiomeBase { @@ -49,7 +49,7 @@ public abstract class BiomeBase {
@ -44,19 +44,37 @@ index 71524f2..288c52c 100644
} }
diff --git a/src/main/java/net/minecraft/server/CommandAbstract.java b/src/main/java/net/minecraft/server/CommandAbstract.java diff --git a/src/main/java/net/minecraft/server/CommandAbstract.java b/src/main/java/net/minecraft/server/CommandAbstract.java
index 7876457..20572d4 100644 index fe74068..b669884 100644
--- a/src/main/java/net/minecraft/server/CommandAbstract.java --- a/src/main/java/net/minecraft/server/CommandAbstract.java
+++ b/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 { @@ -223,7 +223,7 @@ public abstract class CommandAbstract implements ICommand {
} }
if (object != null && oclass.isAssignableFrom(object.getClass())) { if (object != null && oclass.isAssignableFrom(object.getClass())) {
- return (Entity) object; - return (Entity) object;
+ return (T) object; // Paper - fix decompile error + return (T) object; // Paper - fix decompile error
} else { } else {
throw new ExceptionEntityNotFound(); throw new ExceptionEntityNotFound(s);
} }
@@ -554,7 +554,7 @@ public abstract class CommandAbstract implements ICommand { @@ -440,7 +440,7 @@ public abstract class CommandAbstract implements ICommand {
}
private static <T extends Comparable<T>> IBlockData a(IBlockData iblockdata, IBlockState<T> iblockstate, Comparable<?> comparable) {
- return iblockdata.set(iblockstate, comparable);
+ return iblockdata.set(iblockstate, (T) comparable); // Paper - fix decompiler error
}
public static Predicate<IBlockData> b(final Block block, String s) throws ExceptionInvalidBlockState {
@@ -533,7 +533,7 @@ public abstract class CommandAbstract implements ICommand {
@Nullable
private static <T extends Comparable<T>> T a(IBlockState<T> iblockstate, String s) {
- return (Comparable) iblockstate.b(s).orNull();
+ return iblockstate.b(s).orNull(); // Paper - fix decompiler error
}
public static String a(Object[] aobject) {
@@ -684,7 +684,7 @@ public abstract class CommandAbstract implements ICommand {
return this.getCommand().compareTo(icommand.getCommand()); return this.getCommand().compareTo(icommand.getCommand());
} }
@ -65,6 +83,66 @@ index 7876457..20572d4 100644
return this.a((ICommand) object); return this.a((ICommand) object);
} }
diff --git a/src/main/java/net/minecraft/server/IEntitySelector.java b/src/main/java/net/minecraft/server/IEntitySelector.java
index dc0ffd8..ec75cf3 100644
--- a/src/main/java/net/minecraft/server/IEntitySelector.java
+++ b/src/main/java/net/minecraft/server/IEntitySelector.java
@@ -61,7 +61,7 @@ public final class IEntitySelector {
}
public boolean apply(@Nullable Object object) {
- return this.a((Entity) object);
+ return this.a((T) object); // Paper - Fix decompile error
}
};
}
@@ -71,7 +71,7 @@ public final class IEntitySelector {
final ScoreboardTeamBase.EnumTeamPush scoreboardteambase_enumteampush = scoreboardteambase == null ? ScoreboardTeamBase.EnumTeamPush.ALWAYS : scoreboardteambase.getCollisionRule();
return scoreboardteambase_enumteampush == ScoreboardTeamBase.EnumTeamPush.NEVER ? Predicates.alwaysFalse() : Predicates.and(IEntitySelector.e, new Predicate() {
- public boolean a(@Nullable Entity entity) {
+ public boolean a(@Nullable Entity entity1) { // Paper - fix decompile error
if (!entity.isCollidable()) {
return false;
} else if (entity1.world.isClientSide && (!(entity instanceof EntityHuman) || !((EntityHuman) entity).cR())) {
@@ -83,9 +83,10 @@ public final class IEntitySelector {
if (scoreboardteambase_enumteampush == ScoreboardTeamBase.EnumTeamPush.NEVER) {
return false;
} else {
- boolean flag = scoreboardteambase1 != null && scoreboardteambase1.isAlly(scoreboardteambase);
+ boolean flag = scoreboardteambase != null && scoreboardteambase.isAlly(scoreboardteambase); // Paper - fix decompile error
- return (scoreboardteambase_enumteampush1 == ScoreboardTeamBase.EnumTeamPush.HIDE_FOR_OWN_TEAM || scoreboardteambase_enumteampush == ScoreboardTeamBase.EnumTeamPush.HIDE_FOR_OWN_TEAM) && flag ? false : scoreboardteambase_enumteampush1 != ScoreboardTeamBase.EnumTeamPush.HIDE_FOR_OTHER_TEAMS && scoreboardteambase_enumteampush != ScoreboardTeamBase.EnumTeamPush.HIDE_FOR_OTHER_TEAMS || flag;
+ // Paper - fix decompiler error
+ return (scoreboardteambase_enumteampush == ScoreboardTeamBase.EnumTeamPush.HIDE_FOR_OWN_TEAM || scoreboardteambase_enumteampush == ScoreboardTeamBase.EnumTeamPush.HIDE_FOR_OWN_TEAM) && flag ? false : scoreboardteambase_enumteampush != ScoreboardTeamBase.EnumTeamPush.HIDE_FOR_OTHER_TEAMS && scoreboardteambase_enumteampush != ScoreboardTeamBase.EnumTeamPush.HIDE_FOR_OTHER_TEAMS || flag;
}
}
}
@@ -98,10 +99,12 @@ public final class IEntitySelector {
public static Predicate<Entity> b(final Entity entity) {
return new Predicate() {
- public boolean a(@Nullable Entity entity) {
+ public boolean a(@Nullable Entity entity1) { // Paper - fix decompile error
while (true) {
- if (entity.isPassenger()) {
- entity = entity.bB();
+ // Paper start - fix decompile error - entity -> entity1 - double check this
+ if (entity1.isPassenger()) {
+ entity1 = entity.bB();
+ // Paper end
if (entity != entity1) {
continue;
}
@@ -139,7 +142,7 @@ public final class IEntitySelector {
}
}
- public boolean apply(@Nullable Object object) {
+ public boolean apply(@Nullable Entity object) {
return this.a((Entity) object);
}
}
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java
index f5bcbdb..3190cad 100644 index f5bcbdb..3190cad 100644
--- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java
@ -79,5 +157,5 @@ index f5bcbdb..3190cad 100644
for (ZipEntry clazzEntry; (clazzEntry = nmsZipStream.getNextEntry()) != null; ) { for (ZipEntry clazzEntry; (clazzEntry = nmsZipStream.getNextEntry()) != null; ) {
final String entryName = clazzEntry.getName(); final String entryName = clazzEntry.getName();
-- --
2.7.4 (Apple Git-66) 2.10.2

View File

@ -1,14 +1,14 @@
From cc65e1b66b14dc2f2ef8ee68689bdee6201c1fd0 Mon Sep 17 00:00:00 2001 From 8c8e0a712b18892ec8be649e2833253515115a00 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 04:00:11 -0600 Date: Thu, 3 Mar 2016 04:00:11 -0600
Subject: [PATCH] Timings v2 Subject: [PATCH] Timings v2
diff --git a/pom.xml b/pom.xml diff --git a/pom.xml b/pom.xml
index 4ae34c8..63aaa7a 100644 index cb22454..0de362d 100644
--- a/pom.xml --- a/pom.xml
+++ b/pom.xml +++ b/pom.xml
@@ -65,6 +65,12 @@ @@ -66,6 +66,12 @@
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
@ -143,7 +143,7 @@ index 0000000..29838de
+} +}
diff --git a/src/main/java/co/aikar/timings/TimedChunkGenerator.java b/src/main/java/co/aikar/timings/TimedChunkGenerator.java diff --git a/src/main/java/co/aikar/timings/TimedChunkGenerator.java b/src/main/java/co/aikar/timings/TimedChunkGenerator.java
new file mode 100644 new file mode 100644
index 0000000..2bf5b66 index 0000000..b79f1be
--- /dev/null --- /dev/null
+++ b/src/main/java/co/aikar/timings/TimedChunkGenerator.java +++ b/src/main/java/co/aikar/timings/TimedChunkGenerator.java
@@ -0,0 +1,126 @@ @@ -0,0 +1,126 @@
@ -262,8 +262,8 @@ index 0000000..2bf5b66
+ +
+ @Override + @Override
+ @Nullable + @Nullable
+ public BlockPosition findNearestMapFeature(World world, String s, BlockPosition blockposition) { + public BlockPosition findNearestMapFeature(World world, String s, BlockPosition blockposition, boolean flag) {
+ return timedGenerator.findNearestMapFeature(world, s, blockposition); + return timedGenerator.findNearestMapFeature(world, s, blockposition, flag);
+ } + }
+ +
+ @Override + @Override
@ -425,10 +425,10 @@ index 3d0a005..f509bed 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index a106e44..d17160a 100644 index 9d14403..da86874 100644
--- a/src/main/java/net/minecraft/server/Block.java --- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java
@@ -33,6 +33,15 @@ public class Block { @@ -35,6 +35,15 @@ public class Block {
protected final BlockStateList blockStateList; protected final BlockStateList blockStateList;
private IBlockData blockData; private IBlockData blockData;
private String name; private String name;
@ -445,7 +445,7 @@ index a106e44..d17160a 100644
public static int getId(Block block) { public static int getId(Block block) {
return Block.REGISTRY.a(block); // CraftBukkit - decompile error return Block.REGISTRY.a(block); // CraftBukkit - decompile error
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index b651edc..5807bb8 100644 index 81fc04e..bd3b160 100644
--- a/src/main/java/net/minecraft/server/Chunk.java --- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -900,7 +900,7 @@ public class Chunk { @@ -900,7 +900,7 @@ public class Chunk {
@ -493,10 +493,10 @@ index b651edc..5807bb8 100644
private void z() { private void z() {
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 5682f03..1380815 100644 index b39937f..17d39bb 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -194,7 +194,7 @@ public class ChunkProviderServer implements IChunkProvider { @@ -195,7 +195,7 @@ public class ChunkProviderServer implements IChunkProvider {
} }
public void saveChunkNOP(Chunk chunk) { public void saveChunkNOP(Chunk chunk) {
@ -505,7 +505,7 @@ index 5682f03..1380815 100644
this.chunkLoader.b(this.world, chunk); this.chunkLoader.b(this.world, chunk);
} catch (Exception exception) { } catch (Exception exception) {
ChunkProviderServer.a.error("Couldn\'t save entities", exception); ChunkProviderServer.a.error("Couldn\'t save entities", exception);
@@ -203,7 +203,7 @@ public class ChunkProviderServer implements IChunkProvider { @@ -204,7 +204,7 @@ public class ChunkProviderServer implements IChunkProvider {
} }
public void saveChunk(Chunk chunk) { public void saveChunk(Chunk chunk) {
@ -515,10 +515,10 @@ index 5682f03..1380815 100644
this.chunkLoader.a(this.world, chunk); this.chunkLoader.a(this.world, chunk);
} catch (IOException ioexception) { } catch (IOException ioexception) {
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index f604639..17dd7bb 100644 index 15969b1..ca33899 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -394,7 +394,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -402,7 +402,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
public void loadEntities(Chunk chunk, NBTTagCompound nbttagcompound, World world) { public void loadEntities(Chunk chunk, NBTTagCompound nbttagcompound, World world) {
// CraftBukkit end // CraftBukkit end
@ -526,18 +526,18 @@ index f604639..17dd7bb 100644
+ world.timings.syncChunkLoadNBTTimer.startTiming(); // Spigot + world.timings.syncChunkLoadNBTTimer.startTiming(); // Spigot
NBTTagList nbttaglist1 = nbttagcompound.getList("Entities", 10); NBTTagList nbttaglist1 = nbttagcompound.getList("Entities", 10);
if (nbttaglist1 != null) { for (int l = 0; l < nbttaglist1.size(); ++l) {
@@ -405,8 +405,6 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -411,8 +411,6 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
a(nbttagcompound2, world, chunk);
chunk.g(true); chunk.g(true);
} }
}
- world.timings.syncChunkLoadEntitiesTimer.stopTiming(); // Spigot - world.timings.syncChunkLoadEntitiesTimer.stopTiming(); // Spigot
- world.timings.syncChunkLoadTileEntitiesTimer.startTiming(); // Spigot - world.timings.syncChunkLoadTileEntitiesTimer.startTiming(); // Spigot
NBTTagList nbttaglist2 = nbttagcompound.getList("TileEntities", 10); NBTTagList nbttaglist2 = nbttagcompound.getList("TileEntities", 10);
if (nbttaglist2 != null) { for (int i1 = 0; i1 < nbttaglist2.size(); ++i1) {
@@ -419,8 +417,6 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -423,8 +421,6 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
} chunk.a(tileentity);
} }
} }
- world.timings.syncChunkLoadTileEntitiesTimer.stopTiming(); // Spigot - world.timings.syncChunkLoadTileEntitiesTimer.stopTiming(); // Spigot
@ -545,8 +545,8 @@ index f604639..17dd7bb 100644
if (nbttagcompound.hasKeyOfType("TileTicks", 9)) { if (nbttagcompound.hasKeyOfType("TileTicks", 9)) {
NBTTagList nbttaglist3 = nbttagcompound.getList("TileTicks", 10); NBTTagList nbttaglist3 = nbttagcompound.getList("TileTicks", 10);
@@ -440,7 +436,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -442,7 +438,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
} world.b(new BlockPosition(nbttagcompound4.getInt("x"), nbttagcompound4.getInt("y"), nbttagcompound4.getInt("z")), block, nbttagcompound4.getInt("t"), nbttagcompound4.getInt("p"));
} }
} }
- world.timings.syncChunkLoadTileTicksTimer.stopTiming(); // Spigot - world.timings.syncChunkLoadTileTicksTimer.stopTiming(); // Spigot
@ -555,7 +555,7 @@ index f604639..17dd7bb 100644
// return chunk; // CraftBukkit // return chunk; // CraftBukkit
} }
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 11a49a3..e70d5c5 100644 index f01bd35..51d6b3e 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java --- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -23,7 +23,7 @@ import java.io.PrintStream; @@ -23,7 +23,7 @@ import java.io.PrintStream;
@ -567,16 +567,16 @@ index 11a49a3..e70d5c5 100644
import org.bukkit.event.server.ServerCommandEvent; import org.bukkit.event.server.ServerCommandEvent;
import org.bukkit.craftbukkit.util.Waitable; import org.bukkit.craftbukkit.util.Waitable;
import org.bukkit.event.server.RemoteServerCommandEvent; 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() { public void aM() {
- SpigotTimings.serverCommandTimer.startTiming(); // Spigot - SpigotTimings.serverCommandTimer.startTiming(); // Spigot
+ MinecraftTimings.serverCommandTimer.startTiming(); // Spigot + MinecraftTimings.serverCommandTimer.startTiming(); // Spigot
while (!this.serverCommandQueue.isEmpty()) { while (!this.serverCommandQueue.isEmpty()) {
ServerCommand servercommand = (ServerCommand) this.serverCommandQueue.remove(0); 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 // CraftBukkit end
} }
@ -586,7 +586,7 @@ index 11a49a3..e70d5c5 100644
public boolean aa() { public boolean aa() {
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 6434566..1409faa 100644 index e148e37..e0276a6 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/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; @@ -24,7 +24,8 @@ import org.bukkit.block.BlockFace;
@ -599,7 +599,7 @@ index 6434566..1409faa 100644
import org.bukkit.event.entity.EntityCombustByEntityEvent; import org.bukkit.event.entity.EntityCombustByEntityEvent;
import org.bukkit.event.hanging.HangingBreakByEntityEvent; import org.bukkit.event.hanging.HangingBreakByEntityEvent;
import org.bukkit.event.vehicle.VehicleBlockCollisionEvent; import org.bukkit.event.vehicle.VehicleBlockCollisionEvent;
@@ -143,7 +144,7 @@ public abstract class Entity implements ICommandListener { @@ -142,7 +143,7 @@ public abstract class Entity implements ICommandListener {
public boolean valid; // CraftBukkit public boolean valid; // CraftBukkit
public org.bukkit.projectiles.ProjectileSource projectileSource; // CraftBukkit - For projectiles only public org.bukkit.projectiles.ProjectileSource projectileSource; // CraftBukkit - For projectiles only
public boolean forceExplosionKnockback; // CraftBukkit - SPIGOT-949 public boolean forceExplosionKnockback; // CraftBukkit - SPIGOT-949
@ -608,15 +608,15 @@ index 6434566..1409faa 100644
// Spigot start // Spigot start
public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
public final boolean defaultActivationState; public final boolean defaultActivationState;
@@ -467,7 +468,6 @@ public abstract class Entity implements ICommandListener { @@ -471,7 +472,6 @@ public abstract class Entity implements ICommandListener {
} }
public void move(double d0, double d1, double d2) { public void move(EnumMoveType enummovetype, double d0, double d1, double d2) {
- org.bukkit.craftbukkit.SpigotTimings.entityMoveTimer.startTiming(); // Spigot - org.bukkit.craftbukkit.SpigotTimings.entityMoveTimer.startTiming(); // Spigot
if (this.noclip) { if (this.noclip) {
this.a(this.getBoundingBox().c(d0, d1, d2)); this.a(this.getBoundingBox().d(d0, d1, d2));
this.recalcPosition(); this.recalcPosition();
@@ -805,7 +805,6 @@ public abstract class Entity implements ICommandListener { @@ -820,7 +820,6 @@ public abstract class Entity implements ICommandListener {
this.world.methodProfiler.b(); this.world.methodProfiler.b();
} }
@ -625,10 +625,10 @@ index 6434566..1409faa 100644
public void recalcPosition() { public void recalcPosition() {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 365b61d..0a583bc 100644 index 0fbec05..c19bf3a 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java --- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -26,7 +26,7 @@ import org.bukkit.event.entity.EntityTeleportEvent; @@ -31,7 +31,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
import org.bukkit.event.player.PlayerItemConsumeEvent; import org.bukkit.event.player.PlayerItemConsumeEvent;
// CraftBukkit end // CraftBukkit end
@ -637,15 +637,15 @@ index 365b61d..0a583bc 100644
public abstract class EntityLiving extends Entity { public abstract class EntityLiving extends Entity {
@@ -1740,7 +1740,6 @@ public abstract class EntityLiving extends Entity { @@ -1812,7 +1812,6 @@ public abstract class EntityLiving extends Entity {
} }
public void m() { public void A_() {
- SpigotTimings.timerEntityBaseTick.startTiming(); // Spigot - SpigotTimings.timerEntityBaseTick.startTiming(); // Spigot
super.m(); super.A_();
this.cz(); this.cA();
if (!this.world.isClientSide) { if (!this.world.isClientSide) {
@@ -1813,9 +1812,7 @@ public abstract class EntityLiving extends Entity { @@ -1885,9 +1884,7 @@ public abstract class EntityLiving extends Entity {
} }
} }
@ -655,24 +655,24 @@ index 365b61d..0a583bc 100644
double d0 = this.locX - this.lastX; double d0 = this.locX - this.lastX;
double d1 = this.locZ - this.lastZ; double d1 = this.locZ - this.lastZ;
float f = (float) (d0 * d0 + d1 * d1); float f = (float) (d0 * d0 + d1 * d1);
@@ -1884,8 +1881,6 @@ public abstract class EntityLiving extends Entity { @@ -1956,8 +1953,6 @@ public abstract class EntityLiving extends Entity {
} else { } else {
this.bq = 0; this.bp = 0;
} }
- -
- SpigotTimings.timerEntityTickRest.stopTiming(); // Spigot - SpigotTimings.timerEntityTickRest.stopTiming(); // Spigot
} }
protected float h(float f, float f1) { protected float h(float f, float f1) {
@@ -1950,7 +1945,6 @@ public abstract class EntityLiving extends Entity { @@ -2022,7 +2017,6 @@ public abstract class EntityLiving extends Entity {
} }
this.world.methodProfiler.a("ai"); this.world.methodProfiler.a("ai");
- SpigotTimings.timerEntityAI.startTiming(); // Spigot - SpigotTimings.timerEntityAI.startTiming(); // Spigot
if (this.cj()) { if (this.isFrozen()) {
this.be = false; this.bd = false;
this.bf = 0.0F; this.be = 0.0F;
@@ -1961,7 +1955,6 @@ public abstract class EntityLiving extends Entity { @@ -2033,7 +2027,6 @@ public abstract class EntityLiving extends Entity {
this.doTick(); this.doTick();
this.world.methodProfiler.b(); this.world.methodProfiler.b();
} }
@ -680,26 +680,26 @@ index 365b61d..0a583bc 100644
this.world.methodProfiler.b(); this.world.methodProfiler.b();
this.world.methodProfiler.a("jump"); this.world.methodProfiler.a("jump");
@@ -1984,14 +1977,10 @@ public abstract class EntityLiving extends Entity { @@ -2056,14 +2049,10 @@ public abstract class EntityLiving extends Entity {
this.bg *= 0.98F; this.bf *= 0.98F;
this.bh *= 0.9F; this.bg *= 0.9F;
this.r(); this.r();
- SpigotTimings.timerEntityAIMove.startTiming(); // Spigot - SpigotTimings.timerEntityAIMove.startTiming(); // Spigot
this.g(this.bf, this.bg); this.g(this.be, this.bf);
- SpigotTimings.timerEntityAIMove.stopTiming(); // Spigot - SpigotTimings.timerEntityAIMove.stopTiming(); // Spigot
this.world.methodProfiler.b(); this.world.methodProfiler.b();
this.world.methodProfiler.a("push"); this.world.methodProfiler.a("push");
- SpigotTimings.timerEntityAICollision.startTiming(); // Spigot - SpigotTimings.timerEntityAICollision.startTiming(); // Spigot
this.cs(); this.ct();
- SpigotTimings.timerEntityAICollision.stopTiming(); // Spigot - SpigotTimings.timerEntityAICollision.stopTiming(); // Spigot
this.world.methodProfiler.b(); this.world.methodProfiler.b();
} }
diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java
index 5432e70..72cd51a 100644 index 347a2b6..aceb08c 100644
--- a/src/main/java/net/minecraft/server/EntityTracker.java --- a/src/main/java/net/minecraft/server/EntityTracker.java
+++ b/src/main/java/net/minecraft/server/EntityTracker.java +++ b/src/main/java/net/minecraft/server/EntityTracker.java
@@ -171,7 +171,7 @@ public class EntityTracker { @@ -175,7 +175,7 @@ public class EntityTracker {
public void updatePlayers() { public void updatePlayers() {
ArrayList arraylist = Lists.newArrayList(); ArrayList arraylist = Lists.newArrayList();
Iterator iterator = this.c.iterator(); Iterator iterator = this.c.iterator();
@ -708,7 +708,7 @@ index 5432e70..72cd51a 100644
while (iterator.hasNext()) { while (iterator.hasNext()) {
EntityTrackerEntry entitytrackerentry = (EntityTrackerEntry) iterator.next(); EntityTrackerEntry entitytrackerentry = (EntityTrackerEntry) iterator.next();
@@ -184,7 +184,9 @@ public class EntityTracker { @@ -188,7 +188,9 @@ public class EntityTracker {
} }
} }
} }
@ -718,7 +718,7 @@ index 5432e70..72cd51a 100644
for (int i = 0; i < arraylist.size(); ++i) { for (int i = 0; i < arraylist.size(); ++i) {
EntityPlayer entityplayer = (EntityPlayer) arraylist.get(i); EntityPlayer entityplayer = (EntityPlayer) arraylist.get(i);
Iterator iterator1 = this.c.iterator(); Iterator iterator1 = this.c.iterator();
@@ -197,6 +199,7 @@ public class EntityTracker { @@ -201,6 +203,7 @@ public class EntityTracker {
} }
} }
} }
@ -727,10 +727,10 @@ index 5432e70..72cd51a 100644
} }
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 26f8467..4814643 100644 index 0b790ab..81a69e8 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -45,7 +45,7 @@ import org.bukkit.Bukkit; @@ -47,7 +47,7 @@ import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.Main; import org.bukkit.craftbukkit.Main;
// CraftBukkit end // CraftBukkit end
@ -739,7 +739,7 @@ index 26f8467..4814643 100644
public abstract class MinecraftServer implements Runnable, ICommandListener, IAsyncTaskHandler, IMojangStatistics { public abstract class MinecraftServer implements Runnable, ICommandListener, IAsyncTaskHandler, IMojangStatistics {
@@ -450,6 +450,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -457,6 +457,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
} }
// CraftBukkit end // CraftBukkit end
MinecraftServer.LOGGER.info("Stopping server"); MinecraftServer.LOGGER.info("Stopping server");
@ -747,7 +747,7 @@ index 26f8467..4814643 100644
// CraftBukkit start // CraftBukkit start
if (this.server != null) { if (this.server != null) {
this.server.disablePlugins(); this.server.disablePlugins();
@@ -654,7 +655,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -661,7 +662,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
public void B() {} public void B() {}
protected void C() throws ExceptionWorldConflict { // CraftBukkit - added throws protected void C() throws ExceptionWorldConflict { // CraftBukkit - added throws
@ -756,7 +756,7 @@ index 26f8467..4814643 100644
long i = System.nanoTime(); long i = System.nanoTime();
++this.ticks; ++this.ticks;
@@ -681,7 +682,6 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -688,7 +689,6 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
} }
if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit
@ -764,7 +764,7 @@ index 26f8467..4814643 100644
this.methodProfiler.a("save"); this.methodProfiler.a("save");
this.v.savePlayers(); this.v.savePlayers();
// Spigot Start // Spigot Start
@@ -696,7 +696,6 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -703,7 +703,6 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
// this.saveChunks(true); // this.saveChunks(true);
// Spigot End // Spigot End
this.methodProfiler.b(); this.methodProfiler.b();
@ -772,7 +772,7 @@ index 26f8467..4814643 100644
} }
this.methodProfiler.a("tallying"); this.methodProfiler.a("tallying");
@@ -713,15 +712,16 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -720,15 +719,16 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
this.methodProfiler.b(); this.methodProfiler.b();
this.methodProfiler.b(); this.methodProfiler.b();
@ -793,7 +793,7 @@ index 26f8467..4814643 100644
this.methodProfiler.a("jobs"); this.methodProfiler.a("jobs");
Queue queue = this.j; Queue queue = this.j;
@@ -732,22 +732,23 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -739,22 +739,23 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
SystemUtils.a(entry, MinecraftServer.LOGGER); SystemUtils.a(entry, MinecraftServer.LOGGER);
} }
// Spigot end // Spigot end
@ -822,7 +822,7 @@ index 26f8467..4814643 100644
// Send time updates to everyone, it will get the right time from the world the player is in. // Send time updates to everyone, it will get the right time from the world the player is in.
if (this.ticks % 20 == 0) { if (this.ticks % 20 == 0) {
for (int i = 0; i < this.getPlayerList().players.size(); ++i) { for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
@@ -755,7 +756,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -762,7 +763,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 entityplayer.playerConnection.sendPacket(new PacketPlayOutUpdateTime(entityplayer.world.getTime(), entityplayer.getPlayerTime(), entityplayer.world.getGameRules().getBoolean("doDaylightCycle"))); // Add support for per player time
} }
} }
@ -831,7 +831,7 @@ index 26f8467..4814643 100644
int i; int i;
@@ -812,9 +813,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -819,9 +820,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
this.methodProfiler.b(); this.methodProfiler.b();
this.methodProfiler.a("tracker"); this.methodProfiler.a("tracker");
@ -841,13 +841,13 @@ index 26f8467..4814643 100644
this.methodProfiler.b(); this.methodProfiler.b();
this.methodProfiler.b(); this.methodProfiler.b();
// } // CraftBukkit // } // CraftBukkit
@@ -823,20 +822,20 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -830,20 +829,20 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
} }
this.methodProfiler.c("connection"); this.methodProfiler.c("connection");
- SpigotTimings.connectionTimer.startTiming(); // Spigot - SpigotTimings.connectionTimer.startTiming(); // Spigot
+ MinecraftTimings.connectionTimer.startTiming(); // Spigot + MinecraftTimings.connectionTimer.startTiming(); // Spigot
this.am().c(); this.an().c();
- SpigotTimings.connectionTimer.stopTiming(); // Spigot - SpigotTimings.connectionTimer.stopTiming(); // Spigot
+ MinecraftTimings.connectionTimer.stopTiming(); // Spigot + MinecraftTimings.connectionTimer.stopTiming(); // Spigot
this.methodProfiler.c("players"); this.methodProfiler.c("players");
@ -861,7 +861,7 @@ index 26f8467..4814643 100644
- SpigotTimings.tickablesTimer.startTiming(); // Spigot - SpigotTimings.tickablesTimer.startTiming(); // Spigot
+ MinecraftTimings.tickablesTimer.startTiming(); // Spigot + MinecraftTimings.tickablesTimer.startTiming(); // Spigot
for (i = 0; i < this.o.size(); ++i) { for (i = 0; i < this.o.size(); ++i) {
((ITickable) this.o.get(i)).E_(); ((ITickable) this.o.get(i)).F_();
} }
- SpigotTimings.tickablesTimer.stopTiming(); // Spigot - SpigotTimings.tickablesTimer.stopTiming(); // Spigot
+ MinecraftTimings.tickablesTimer.stopTiming(); // Spigot + MinecraftTimings.tickablesTimer.stopTiming(); // Spigot
@ -869,7 +869,7 @@ index 26f8467..4814643 100644
this.methodProfiler.b(); this.methodProfiler.b();
} }
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index b0249ff..797a84f 100644 index ae427b4..ce3390c 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
@ -969,10 +969,10 @@ index b0249ff..797a84f 100644
} }
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 29f0062..d910c41 100644 index 4c2e13f..a5aa755 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -57,6 +57,7 @@ import org.bukkit.inventory.CraftingInventory; @@ -56,6 +56,7 @@ import org.bukkit.inventory.CraftingInventory;
import org.bukkit.inventory.EquipmentSlot; import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.InventoryView; import org.bukkit.inventory.InventoryView;
import org.bukkit.util.NumberConversions; import org.bukkit.util.NumberConversions;
@ -980,7 +980,7 @@ index 29f0062..d910c41 100644
// CraftBukkit end // CraftBukkit end
public class PlayerConnection implements PacketListenerPlayIn, ITickable { public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1339,7 +1340,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -1316,7 +1317,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
// CraftBukkit end // CraftBukkit end
private void handleCommand(String s) { private void handleCommand(String s) {
@ -989,7 +989,7 @@ index 29f0062..d910c41 100644
// CraftBukkit start - whole method // CraftBukkit start - whole method
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
this.LOGGER.info(this.player.getName() + " issued server command: " + s); this.LOGGER.info(this.player.getName() + " issued server command: " + s);
@@ -1350,22 +1351,22 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -1327,22 +1328,22 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
this.server.getPluginManager().callEvent(event); this.server.getPluginManager().callEvent(event);
if (event.isCancelled()) { if (event.isCancelled()) {
@ -1017,7 +1017,7 @@ index 29f0062..d910c41 100644
// CraftBukkit end // CraftBukkit end
} }
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 7090262..2e418a7 100644 index 5d6cadc..e40268b 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java --- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
@ -1027,7 +1027,7 @@ index 7090262..2e418a7 100644
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
@@ -1167,10 +1168,11 @@ public abstract class PlayerList { @@ -1165,10 +1166,11 @@ public abstract class PlayerList {
} }
public void savePlayers() { public void savePlayers() {
@ -1041,7 +1041,7 @@ index 7090262..2e418a7 100644
public void addWhitelist(GameProfile gameprofile) { public void addWhitelist(GameProfile gameprofile) {
diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java
index 8dd434c..c965af1 100644 index f1f2065..fb350c4 100644
--- a/src/main/java/net/minecraft/server/StructureGenerator.java --- a/src/main/java/net/minecraft/server/StructureGenerator.java
+++ b/src/main/java/net/minecraft/server/StructureGenerator.java +++ b/src/main/java/net/minecraft/server/StructureGenerator.java
@@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@ -1051,8 +1051,8 @@ index 8dd434c..c965af1 100644
+import co.aikar.timings.Timing; +import co.aikar.timings.Timing;
import it.unimi.dsi.fastutil.longs.Long2ObjectMap; import it.unimi.dsi.fastutil.longs.Long2ObjectMap;
import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap; import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap;
import java.util.Iterator; import it.unimi.dsi.fastutil.objects.ObjectIterator;
@@ -8,11 +10,13 @@ import java.util.Random; @@ -9,11 +11,13 @@ import javax.annotation.Nullable;
public abstract class StructureGenerator extends WorldGenBase { public abstract class StructureGenerator extends WorldGenBase {
@ -1066,7 +1066,7 @@ index 8dd434c..c965af1 100644
public abstract String a(); public abstract String a();
protected final synchronized void a(World world, final int i, final int j, int k, int l, ChunkSnapshot chunksnapshot) { protected final synchronized void a(World world, final int i, final int j, int k, int l, ChunkSnapshot chunksnapshot) {
@@ -68,6 +72,7 @@ public abstract class StructureGenerator extends WorldGenBase { @@ -69,6 +73,7 @@ public abstract class StructureGenerator extends WorldGenBase {
} }
public synchronized boolean a(World world, Random random, ChunkCoordIntPair chunkcoordintpair) { public synchronized boolean a(World world, Random random, ChunkCoordIntPair chunkcoordintpair) {
@ -1074,7 +1074,7 @@ index 8dd434c..c965af1 100644
this.a(world); this.a(world);
int i = (chunkcoordintpair.x << 4) + 8; int i = (chunkcoordintpair.x << 4) + 8;
int j = (chunkcoordintpair.z << 4) + 8; int j = (chunkcoordintpair.z << 4) + 8;
@@ -84,6 +89,7 @@ public abstract class StructureGenerator extends WorldGenBase { @@ -85,6 +90,7 @@ public abstract class StructureGenerator extends WorldGenBase {
this.a(structurestart.e(), structurestart.f(), structurestart); this.a(structurestart.e(), structurestart.f(), structurestart);
} }
} }
@ -1083,10 +1083,10 @@ index 8dd434c..c965af1 100644
return flag; return flag;
} }
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 42f37df..2b82312 100644 index 8d54eb3..0f505ed 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java --- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -6,12 +6,13 @@ import javax.annotation.Nullable; @@ -4,12 +4,13 @@ import javax.annotation.Nullable;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
@ -1100,10 +1100,10 @@ index 42f37df..2b82312 100644
- public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot - public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot
+ public Timing tickTimer = MinecraftTimings.getTileEntityTimings(this); // Paper + public Timing tickTimer = MinecraftTimings.getTileEntityTimings(this); // Paper
private static final Logger a = LogManager.getLogger(); private static final Logger a = LogManager.getLogger();
private static final Map<String, Class<? extends TileEntity>> f = Maps.newHashMap(); private static final RegistryMaterials<MinecraftKey, Class<? extends TileEntity>> f = new RegistryMaterials();
private static final Map<Class<? extends TileEntity>, String> g = Maps.newHashMap(); protected World world;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index e649435..b73f64e 100644 index 8bd0250..78b5a3c 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/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; @@ -18,11 +18,11 @@ import com.google.common.collect.Maps;
@ -1137,7 +1137,7 @@ index e649435..b73f64e 100644
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime); this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime); this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
} }
@@ -1379,6 +1379,7 @@ public abstract class World implements IBlockAccess { @@ -1402,6 +1402,7 @@ public abstract class World implements IBlockAccess {
} }
this.methodProfiler.c("remove"); this.methodProfiler.c("remove");
@ -1145,7 +1145,7 @@ index e649435..b73f64e 100644
this.entityList.removeAll(this.f); this.entityList.removeAll(this.f);
int j; int j;
@@ -1399,6 +1400,7 @@ public abstract class World implements IBlockAccess { @@ -1422,6 +1423,7 @@ public abstract class World implements IBlockAccess {
this.f.clear(); this.f.clear();
this.l(); this.l();
@ -1153,7 +1153,7 @@ index e649435..b73f64e 100644
this.methodProfiler.c("regular"); this.methodProfiler.c("regular");
CrashReportSystemDetails crashreportsystemdetails1; CrashReportSystemDetails crashreportsystemdetails1;
@@ -1408,6 +1410,7 @@ public abstract class World implements IBlockAccess { @@ -1431,6 +1433,7 @@ public abstract class World implements IBlockAccess {
timings.entityTick.startTiming(); // Spigot timings.entityTick.startTiming(); // Spigot
guardEntityList = true; // Spigot guardEntityList = true; // Spigot
// CraftBukkit start - Use field for loop variable // CraftBukkit start - Use field for loop variable
@ -1161,7 +1161,7 @@ index e649435..b73f64e 100644
int entitiesThisCycle = 0; int entitiesThisCycle = 0;
if (tickPosition < 0) tickPosition = 0; if (tickPosition < 0) tickPosition = 0;
for (entityLimiter.initTick(); for (entityLimiter.initTick();
@@ -1429,10 +1432,11 @@ public abstract class World implements IBlockAccess { @@ -1452,10 +1455,11 @@ public abstract class World implements IBlockAccess {
this.methodProfiler.a("tick"); this.methodProfiler.a("tick");
if (!entity.dead && !(entity instanceof EntityPlayer)) { if (!entity.dead && !(entity instanceof EntityPlayer)) {
try { try {
@ -1175,7 +1175,7 @@ index e649435..b73f64e 100644
crashreport1 = CrashReport.a(throwable1, "Ticking entity"); crashreport1 = CrashReport.a(throwable1, "Ticking entity");
crashreportsystemdetails1 = crashreport1.a("Entity being ticked"); crashreportsystemdetails1 = crashreport1.a("Entity being ticked");
entity.appendEntityCrashDetails(crashreportsystemdetails1); entity.appendEntityCrashDetails(crashreportsystemdetails1);
@@ -1565,6 +1569,7 @@ public abstract class World implements IBlockAccess { @@ -1588,6 +1592,7 @@ public abstract class World implements IBlockAccess {
} }
timings.tileEntityPending.stopTiming(); // Spigot timings.tileEntityPending.stopTiming(); // Spigot
@ -1183,7 +1183,7 @@ index e649435..b73f64e 100644
this.methodProfiler.b(); this.methodProfiler.b();
this.methodProfiler.b(); this.methodProfiler.b();
} }
@@ -1617,7 +1622,6 @@ public abstract class World implements IBlockAccess { @@ -1640,7 +1645,6 @@ public abstract class World implements IBlockAccess {
entity.ticksLived++; entity.ticksLived++;
entity.inactiveTick(); entity.inactiveTick();
} else { } else {
@ -1191,15 +1191,15 @@ index e649435..b73f64e 100644
// CraftBukkit end // CraftBukkit end
entity.M = entity.locX; entity.M = entity.locX;
entity.N = entity.locY; entity.N = entity.locY;
@@ -1626,6 +1630,7 @@ public abstract class World implements IBlockAccess { @@ -1649,6 +1653,7 @@ public abstract class World implements IBlockAccess {
entity.lastPitch = entity.pitch; entity.lastPitch = entity.pitch;
if (flag && entity.ab) { if (flag && entity.aa) {
++entity.ticksLived; ++entity.ticksLived;
+ ++co.aikar.timings.TimingHistory.activatedEntityTicks; // Paper + ++co.aikar.timings.TimingHistory.activatedEntityTicks; // Paper
if (entity.isPassenger()) { if (entity.isPassenger()) {
entity.aw(); entity.aw();
} else { } else {
@@ -1684,8 +1689,6 @@ public abstract class World implements IBlockAccess { @@ -1707,8 +1712,6 @@ public abstract class World implements IBlockAccess {
} }
} }
} }
@ -1209,7 +1209,7 @@ index e649435..b73f64e 100644
} }
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 50fad7c..3d98392 100644 index 695bb42..6afcf7c 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -246,13 +246,13 @@ public class WorldServer extends World implements IAsyncTaskHandler { @@ -246,13 +246,13 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@ -1230,7 +1230,7 @@ index 50fad7c..3d98392 100644
this.methodProfiler.c("chunkMap"); this.methodProfiler.c("chunkMap");
timings.doChunkMap.startTiming(); // Spigot timings.doChunkMap.startTiming(); // Spigot
this.manager.flush(); this.manager.flush();
@@ -484,7 +484,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { @@ -486,7 +486,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
} }
} }
@ -1239,7 +1239,7 @@ index 50fad7c..3d98392 100644
if (i > 0) { if (i > 0) {
ChunkSection[] achunksection = chunk.getSections(); ChunkSection[] achunksection = chunk.getSections();
int i1 = achunksection.length; int i1 = achunksection.length;
@@ -512,6 +512,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { @@ -514,6 +514,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
} }
} }
} }
@ -1247,7 +1247,7 @@ index 50fad7c..3d98392 100644
} }
this.methodProfiler.b(); this.methodProfiler.b();
@@ -707,6 +708,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { @@ -709,6 +710,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
this.methodProfiler.a("cleaning"); this.methodProfiler.a("cleaning");
@ -1255,7 +1255,7 @@ index 50fad7c..3d98392 100644
NextTickListEntry nextticklistentry; NextTickListEntry nextticklistentry;
for (int j = 0; j < i; ++j) { for (int j = 0; j < i; ++j) {
@@ -720,9 +722,11 @@ public class WorldServer extends World implements IAsyncTaskHandler { @@ -722,9 +724,11 @@ public class WorldServer extends World implements IAsyncTaskHandler {
// this.nextTickListHash.remove(nextticklistentry); // this.nextTickListHash.remove(nextticklistentry);
this.U.add(nextticklistentry); this.U.add(nextticklistentry);
} }
@ -1267,7 +1267,7 @@ index 50fad7c..3d98392 100644
Iterator iterator = this.U.iterator(); Iterator iterator = this.U.iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
@@ -732,6 +736,8 @@ public class WorldServer extends World implements IAsyncTaskHandler { @@ -734,6 +738,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
if (this.areChunksLoadedBetween(nextticklistentry.a.a(0, 0, 0), nextticklistentry.a.a(0, 0, 0))) { if (this.areChunksLoadedBetween(nextticklistentry.a.a(0, 0, 0), nextticklistentry.a.a(0, 0, 0))) {
IBlockData iblockdata = this.getType(nextticklistentry.a); IBlockData iblockdata = this.getType(nextticklistentry.a);
@ -1276,7 +1276,7 @@ index 50fad7c..3d98392 100644
if (iblockdata.getMaterial() != Material.AIR && Block.a(iblockdata.getBlock(), nextticklistentry.a())) { if (iblockdata.getMaterial() != Material.AIR && Block.a(iblockdata.getBlock(), nextticklistentry.a())) {
try { try {
@@ -744,10 +750,12 @@ public class WorldServer extends World implements IAsyncTaskHandler { @@ -746,10 +752,12 @@ public class WorldServer extends World implements IAsyncTaskHandler {
throw new ReportedException(crashreport); throw new ReportedException(crashreport);
} }
} }
@ -1289,7 +1289,7 @@ index 50fad7c..3d98392 100644
this.methodProfiler.b(); this.methodProfiler.b();
this.U.clear(); this.U.clear();
@@ -843,7 +851,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { @@ -845,7 +853,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
gen = new org.bukkit.craftbukkit.generator.NormalChunkGenerator(this, this.getSeed()); gen = new org.bukkit.craftbukkit.generator.NormalChunkGenerator(this, this.getSeed());
} }
@ -1298,7 +1298,7 @@ index 50fad7c..3d98392 100644
// CraftBukkit end // CraftBukkit end
} }
@@ -1007,6 +1015,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { @@ -1010,6 +1018,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
if (chunkproviderserver.e()) { if (chunkproviderserver.e()) {
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit
@ -1306,7 +1306,7 @@ index 50fad7c..3d98392 100644
if (iprogressupdate != null) { if (iprogressupdate != null) {
iprogressupdate.a("Saving level"); iprogressupdate.a("Saving level");
} }
@@ -1016,7 +1025,9 @@ public class WorldServer extends World implements IAsyncTaskHandler { @@ -1019,7 +1028,9 @@ public class WorldServer extends World implements IAsyncTaskHandler {
iprogressupdate.c("Saving chunks"); iprogressupdate.c("Saving chunks");
} }
@ -1316,7 +1316,7 @@ index 50fad7c..3d98392 100644
// CraftBukkit - ArrayList -> Collection // CraftBukkit - ArrayList -> Collection
Collection arraylist = chunkproviderserver.a(); Collection arraylist = chunkproviderserver.a();
Iterator iterator = arraylist.iterator(); Iterator iterator = arraylist.iterator();
@@ -1028,7 +1039,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { @@ -1031,7 +1042,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
chunkproviderserver.unload(chunk); chunkproviderserver.unload(chunk);
} }
} }
@ -1325,7 +1325,7 @@ index 50fad7c..3d98392 100644
} }
} }
@@ -1041,6 +1052,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { @@ -1044,6 +1055,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
} }
protected void a() throws ExceptionWorldConflict { protected void a() throws ExceptionWorldConflict {
@ -1333,7 +1333,7 @@ index 50fad7c..3d98392 100644
this.checkSession(); this.checkSession();
WorldServer[] aworldserver = this.server.worldServer; WorldServer[] aworldserver = this.server.worldServer;
int i = aworldserver.length; int i = aworldserver.length;
@@ -1070,6 +1082,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { @@ -1073,6 +1085,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
this.worldData.e(this.getWorldBorder().i()); this.worldData.e(this.getWorldBorder().i());
this.dataManager.saveWorldData(this.worldData, this.server.getPlayerList().t()); this.dataManager.saveWorldData(this.worldData, this.server.getPlayerList().t());
this.worldMaps.a(); this.worldMaps.a();
@ -1342,10 +1342,10 @@ index 50fad7c..3d98392 100644
// CraftBukkit start // CraftBukkit start
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index e7e9941..5f2a9b0 100644 index d306f62..9460486 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1727,6 +1727,7 @@ public final class CraftServer implements Server { @@ -1722,6 +1722,7 @@ public final class CraftServer implements Server {
private final Spigot spigot = new Spigot() private final Spigot spigot = new Spigot()
{ {
@ -1353,7 +1353,7 @@ index e7e9941..5f2a9b0 100644
@Override @Override
public YamlConfiguration getConfig() public YamlConfiguration getConfig()
{ {
@@ -1734,6 +1735,24 @@ public final class CraftServer implements Server { @@ -1729,6 +1730,24 @@ public final class CraftServer implements Server {
} }
@Override @Override
@ -1602,7 +1602,7 @@ index 3a95b44..b5efb9c 100644
public void callStage3(QueuedChunk queuedChunk, Chunk chunk, Runnable runnable) throws RuntimeException { public void callStage3(QueuedChunk queuedChunk, Chunk chunk, Runnable runnable) throws RuntimeException {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 4e3b8fc..8ee4fc4 100644 index e83f56f..3784c32 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/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; @@ -37,15 +37,9 @@ import org.bukkit.configuration.serialization.DelegateDeserialization;
@ -1771,7 +1771,7 @@ index e52ef47..3d90b34 100644
this.value = value; this.value = value;
} }
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index 30efc99..eb30abe 100644 index c32d44d..5c2fb00 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java --- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -29,7 +29,7 @@ import net.minecraft.server.EntityWither; @@ -29,7 +29,7 @@ import net.minecraft.server.EntityWither;
@ -1818,8 +1818,8 @@ index 30efc99..eb30abe 100644
{ {
- SpigotTimings.checkIfActiveTimer.startTiming(); - SpigotTimings.checkIfActiveTimer.startTiming();
// Never safe to skip fireworks or entities not yet added to chunk // Never safe to skip fireworks or entities not yet added to chunk
// PAIL: inChunk // PAIL: inChunk - boolean under datawatchers
if ( !entity.ab || entity instanceof EntityFireworks ) { if ( !entity.aa || entity instanceof EntityFireworks ) {
- SpigotTimings.checkIfActiveTimer.stopTiming(); - SpigotTimings.checkIfActiveTimer.stopTiming();
return true; return true;
} }
@ -1833,5 +1833,5 @@ index 30efc99..eb30abe 100644
} }
} }
-- --
2.9.3 2.10.2

View File

@ -1,14 +1,14 @@
From e5ce005823f066b5c88dfc06184f878f7d301501 Mon Sep 17 00:00:00 2001 From 70093c6d868924d6d2947cd7a5e952144c9cb44d Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 21:20:21 -0600 Date: Mon, 29 Feb 2016 21:20:21 -0600
Subject: [PATCH] Vanished players don't have rights 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 diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
index 8d52140..ccbf47e 100644 index ca84d92..287566c 100644
--- a/src/main/java/net/minecraft/server/EntityArrow.java --- a/src/main/java/net/minecraft/server/EntityArrow.java
+++ b/src/main/java/net/minecraft/server/EntityArrow.java +++ b/src/main/java/net/minecraft/server/EntityArrow.java
@@ -189,6 +189,14 @@ public abstract class EntityArrow extends Entity implements IProjectile { @@ -190,6 +190,14 @@ public abstract class EntityArrow extends Entity implements IProjectile {
} }
} }
@ -24,13 +24,14 @@ index 8d52140..ccbf47e 100644
this.a(movingobjectposition); this.a(movingobjectposition);
} }
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
index 5a62881..da4eaf1 100644 index 0b28c88..91702f2 100644
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java --- a/src/main/java/net/minecraft/server/EntityFishingHook.java
+++ b/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 { @@ -224,6 +224,15 @@ public class EntityFishingHook extends Entity {
movingobjectposition = new MovingObjectPosition(entity);
}
vec3d = new Vec3D(this.locX, this.locY, this.locZ);
vec3d1 = new Vec3D(this.locX + this.motX, this.locY + this.motY, this.locZ + this.motZ);
+
+ // Paper start - Allow fishing hooks to fly through vanished players the shooter can't see + // Paper start - Allow fishing hooks to fly through vanished players the shooter can't see
+ if (movingobjectposition != null && movingobjectposition.entity instanceof EntityPlayer && owner != null && owner instanceof EntityPlayer) { + if (movingobjectposition != null && movingobjectposition.entity instanceof EntityPlayer && owner != null && owner instanceof EntityPlayer) {
+ if (!((EntityPlayer) owner).getBukkitEntity().canSee(((EntityPlayer) movingobjectposition.entity).getBukkitEntity())) { + if (!((EntityPlayer) owner).getBukkitEntity().canSee(((EntityPlayer) movingobjectposition.entity).getBukkitEntity())) {
@ -41,9 +42,9 @@ index 5a62881..da4eaf1 100644
+ +
if (movingobjectposition != null) { if (movingobjectposition != null) {
org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this); // Craftbukkit - Call event org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this); // Craftbukkit - Call event
if (movingobjectposition.entity != null) { vec3d1 = new Vec3D(movingobjectposition.pos.x, movingobjectposition.pos.y, movingobjectposition.pos.z);
diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java
index 07dc5cc..770f130 100644 index 40ac335..3d5548f 100644
--- a/src/main/java/net/minecraft/server/EntityProjectile.java --- a/src/main/java/net/minecraft/server/EntityProjectile.java
+++ b/src/main/java/net/minecraft/server/EntityProjectile.java +++ b/src/main/java/net/minecraft/server/EntityProjectile.java
@@ -160,6 +160,14 @@ public abstract class EntityProjectile extends Entity implements IProjectile { @@ -160,6 +160,14 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
@ -62,23 +63,23 @@ index 07dc5cc..770f130 100644
if (movingobjectposition.type == MovingObjectPosition.EnumMovingObjectType.BLOCK && this.world.getType(movingobjectposition.a()).getBlock() == Blocks.PORTAL) { if (movingobjectposition.type == MovingObjectPosition.EnumMovingObjectType.BLOCK && this.world.getType(movingobjectposition.a()).getBlock() == Blocks.PORTAL) {
this.e(movingobjectposition.a()); this.e(movingobjectposition.a());
diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java
index 3b6feb7..1450483 100644 index eb32871..58ec8b5 100644
--- a/src/main/java/net/minecraft/server/ItemBlock.java --- a/src/main/java/net/minecraft/server/ItemBlock.java
+++ b/src/main/java/net/minecraft/server/ItemBlock.java +++ b/src/main/java/net/minecraft/server/ItemBlock.java
@@ -23,7 +23,7 @@ public class ItemBlock extends Item { @@ -20,7 +20,7 @@ public class ItemBlock extends Item {
blockposition = blockposition.shift(enumdirection);
}
- if (itemstack.count != 0 && entityhuman.a(blockposition, enumdirection, itemstack) && world.a(this.a, blockposition, false, enumdirection, (Entity) null, itemstack)) { ItemStack itemstack = entityhuman.b(enumhand);
+ if (itemstack.count != 0 && entityhuman.a(blockposition, enumdirection, itemstack) && world.a(this.a, blockposition, false, enumdirection, entityhuman, itemstack)) { // Paper - Pass entityhuman instead of null
- if (!itemstack.isEmpty() && entityhuman.a(blockposition, enumdirection, itemstack) && world.a(this.a, blockposition, false, enumdirection, (Entity) null)) {
+ if (!itemstack.isEmpty() && entityhuman.a(blockposition, enumdirection, itemstack) && world.a(this.a, blockposition, false, enumdirection, entityhuman)) { // Paper - Pass entityhuman instead of null
int i = this.filterData(itemstack.getData()); int i = this.filterData(itemstack.getData());
IBlockData iblockdata1 = this.a.getPlacedState(world, blockposition, enumdirection, f, f1, f2, i, entityhuman); 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 diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index b73f64e..932e826 100644 index 78b5a3c..2a38b1c 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java
@@ -1702,6 +1702,14 @@ public abstract class World implements IBlockAccess { @@ -1725,6 +1725,14 @@ public abstract class World implements IBlockAccess {
for (int i = 0; i < list.size(); ++i) { for (int i = 0; i < list.size(); ++i) {
Entity entity1 = (Entity) list.get(i); Entity entity1 = (Entity) list.get(i);
@ -94,5 +95,5 @@ index b73f64e..932e826 100644
return false; return false;
} }
-- --
2.9.0 2.10.2

View File

@ -1,4 +1,4 @@
From d28a7aa05ce6180aeb5248aeb987ba08a6ab42b7 Mon Sep 17 00:00:00 2001 From e460bd961a9d020f64b2e0cb59b9e0991e1361e9 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 12:45:11 -0600 Date: Tue, 1 Mar 2016 12:45:11 -0600
Subject: [PATCH] Configurable squid spawn ranges Subject: [PATCH] Configurable squid spawn ranges
@ -22,19 +22,18 @@ index dae60dc..c74c8a7 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java
index c5ac670..85aebc0 100644 index 9f88e44..56f7ca8 100644
--- a/src/main/java/net/minecraft/server/EntitySquid.java --- a/src/main/java/net/minecraft/server/EntitySquid.java
+++ b/src/main/java/net/minecraft/server/EntitySquid.java +++ b/src/main/java/net/minecraft/server/EntitySquid.java
@@ -145,7 +145,8 @@ public class EntitySquid extends EntityWaterAnimal { @@ -141,7 +141,7 @@ public class EntitySquid extends EntityWaterAnimal {
} }
public boolean cK() { public boolean cM() {
- return this.locY > 45.0D && this.locY < (double) this.world.K() && super.cK(); - return this.locY > 45.0D && this.locY < (double) this.world.K() && super.cM();
+ // Paper - Configurable squid spawn height range + return this.locY > world.paperConfig.squidMinSpawnHeight && this.locY < world.paperConfig.squidMaxSpawnHeight && super.cM(); // Paper - Configurable squid spawn height range
+ return this.locY > world.paperConfig.squidMinSpawnHeight && this.locY < world.paperConfig.squidMaxSpawnHeight && super.cK();
} }
public void b(float f, float f1, float f2) { public void b(float f, float f1, float f2) {
-- --
2.8.3 2.10.2

View File

@ -1,4 +1,4 @@
From f88c8fd4582df133bd04083eda03b8015e62db30 Mon Sep 17 00:00:00 2001 From 4913d3438af4ad594d6c8022d5e343ec0f03bcc7 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 13:09:16 -0600 Date: Tue, 1 Mar 2016 13:09:16 -0600
Subject: [PATCH] Configurable baby zombie movement speed Subject: [PATCH] Configurable baby zombie movement speed
@ -20,7 +20,7 @@ index 8d9c322..ae3d0e4 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
index c2913d6..3145bdc 100644 index 497d559..897882c 100644
--- a/src/main/java/net/minecraft/server/EntityZombie.java --- a/src/main/java/net/minecraft/server/EntityZombie.java
+++ b/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java
@@ -16,7 +16,7 @@ public class EntityZombie extends EntityMonster { @@ -16,7 +16,7 @@ public class EntityZombie extends EntityMonster {
@ -29,10 +29,10 @@ index c2913d6..3145bdc 100644
private static final UUID b = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836"); 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 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 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> bx = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.h); private static final DataWatcherObject<Boolean> bw = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.h);
private static final DataWatcherObject<Integer> by = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.b); private static final DataWatcherObject<Integer> bx = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.b);
private static final DataWatcherObject<Boolean> bz = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.h); private static final DataWatcherObject<Boolean> by = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.h);
@@ -106,9 +106,9 @@ public class EntityZombie extends EntityMonster { @@ -102,9 +102,9 @@ public class EntityZombie extends EntityMonster {
if (this.world != null && !this.world.isClientSide) { if (this.world != null && !this.world.isClientSide) {
AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED); AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED);
@ -45,5 +45,5 @@ index c2913d6..3145bdc 100644
} }
-- --
2.8.3 2.10.2

View File

@ -1,11 +1,11 @@
From 34e9632195c39d7e3a6e49b75c945b67b5f92cae Mon Sep 17 00:00:00 2001 From d1e7170b9d3d73895ed986db6751a0897443c488 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 13:14:11 -0600 Date: Tue, 1 Mar 2016 13:14:11 -0600
Subject: [PATCH] Configurable fishing time ranges Subject: [PATCH] Configurable fishing time ranges
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index ae3d0e4..9a72ef7 100644 index ae3d0e4..7b2b95d 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -92,4 +92,12 @@ public class PaperWorldConfig { @@ -92,4 +92,12 @@ public class PaperWorldConfig {
@ -17,23 +17,23 @@ index ae3d0e4..9a72ef7 100644
+ public int fishingMaxTicks; + public int fishingMaxTicks;
+ private void fishingTickRange() { + private void fishingTickRange() {
+ fishingMinTicks = getInt("fishing-time-range.MinimumTicks", 100); + fishingMinTicks = getInt("fishing-time-range.MinimumTicks", 100);
+ fishingMaxTicks = getInt("fishing-time-range.MaximumTicks", 900); + fishingMaxTicks = getInt("fishing-time-range.MaximumTicks", 600);
+ log("Fishing time ranges are between " + fishingMinTicks +" and " + fishingMaxTicks + " ticks"); + log("Fishing time ranges are between " + fishingMinTicks +" and " + fishingMaxTicks + " ticks");
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
index da4eaf1..9b71cdd 100644 index 91702f2..e0475ce 100644
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java --- a/src/main/java/net/minecraft/server/EntityFishingHook.java
+++ b/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 { @@ -380,7 +380,7 @@ public class EntityFishingHook extends Entity {
this.aw = MathHelper.nextInt(this.random, 20, 80); this.at = MathHelper.nextInt(this.random, 20, 80);
} }
} else { } else {
- this.av = MathHelper.nextInt(this.random, 100, 900); - this.h = MathHelper.nextInt(this.random, 100, 600);
+ this.av = MathHelper.nextInt(this.random, world.paperConfig.fishingMinTicks, world.paperConfig.fishingMaxTicks); // Paper - Configurable fishing time range + this.h = MathHelper.nextInt(this.random, world.paperConfig.fishingMinTicks, world.paperConfig.fishingMaxTicks); // Paper - Configurable fishing time range
this.av -= EnchantmentManager.g(this.owner) * 20 * 5; this.h -= EnchantmentManager.g(this.owner) * 20 * 5;
} }
} }
-- --
2.8.3 2.10.2

View File

@ -1,15 +1,15 @@
From 61f10185ed47a235d07f9c59ff107cc23818d2cc Mon Sep 17 00:00:00 2001 From 910207ffbebc1c4e2b75815e1be168f7379a0233 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 13:24:16 -0600 Date: Tue, 1 Mar 2016 13:24:16 -0600
Subject: [PATCH] Allow nerfed mobs to jump Subject: [PATCH] Allow nerfed mobs to jump
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 9a72ef7..a44bbed 100644 index 7b2b95d..021c01b 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -100,4 +100,9 @@ public class PaperWorldConfig { @@ -100,4 +100,9 @@ public class PaperWorldConfig {
fishingMaxTicks = getInt("fishing-time-range.MaximumTicks", 900); fishingMaxTicks = getInt("fishing-time-range.MaximumTicks", 600);
log("Fishing time ranges are between " + fishingMinTicks +" and " + fishingMaxTicks + " ticks"); log("Fishing time ranges are between " + fishingMinTicks +" and " + fishingMaxTicks + " ticks");
} }
+ +
@ -19,18 +19,19 @@ index 9a72ef7..a44bbed 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index d600fd7..bbf7f02 100644 index 0dabbaa..50b29c0 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java --- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -44,6 +44,7 @@ public abstract class EntityInsentient extends EntityLiving { @@ -44,6 +44,8 @@ public abstract class EntityInsentient extends EntityLiving {
private boolean bE; private boolean bD;
private Entity leashHolder; private Entity leashHolder;
private NBTTagCompound bG; private NBTTagCompound bF;
+ private NBTTagCompound bG;
+ public PathfinderGoalFloat goalFloat; // Paper + public PathfinderGoalFloat goalFloat; // Paper
public EntityInsentient(World world) { public EntityInsentient(World world) {
super(world); super(world);
@@ -654,6 +655,12 @@ public abstract class EntityInsentient extends EntityLiving { @@ -643,6 +645,12 @@ public abstract class EntityInsentient extends EntityLiving {
// Spigot Start // Spigot Start
if ( this.fromMobSpawner ) if ( this.fromMobSpawner )
{ {
@ -56,5 +57,5 @@ index e3b4058..c16ad2c 100644
((Navigation) entityinsentient.getNavigation()).c(true); ((Navigation) entityinsentient.getNavigation()).c(true);
} }
-- --
2.8.3 2.10.2

View File

@ -1,16 +1,16 @@
From 0765aaedfd591133840b85dd8399cedb173a3b46 Mon Sep 17 00:00:00 2001 From c44fba6cdb89433a896e92ea32ab56a25ab58a20 Mon Sep 17 00:00:00 2001
From: Suddenly <suddenly@suddenly.coffee> From: Suddenly <suddenly@suddenly.coffee>
Date: Tue, 1 Mar 2016 13:51:54 -0600 Date: Tue, 1 Mar 2016 13:51:54 -0600
Subject: [PATCH] Add configurable despawn distances for living entities Subject: [PATCH] Add configurable despawn distances for living entities
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index b1d712f..402dbe7 100644 index 021c01b..92f38a4 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -114,4 +114,20 @@ public class PaperWorldConfig { @@ -105,4 +105,20 @@ public class PaperWorldConfig {
log("Player exhaustion penalty for breaking blocks is " + blockBreakExhaustion); private void nerfedMobsShouldJump() {
log("Player exhaustion penalty for swimming is " + playerSwimmingExhaustion); nerfedMobsShouldJump = getBoolean("spawner-nerfed-mobs-should-jump", false);
} }
+ +
+ public int softDespawnDistance; + public int softDespawnDistance;
@ -30,10 +30,10 @@ index b1d712f..402dbe7 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index bbf7f02..85d4b81 100644 index 50b29c0..3f7eae1 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java --- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -633,13 +633,13 @@ public abstract class EntityInsentient extends EntityLiving { @@ -623,13 +623,13 @@ public abstract class EntityInsentient extends EntityLiving {
double d2 = entityhuman.locZ - this.locZ; double d2 = entityhuman.locZ - this.locZ;
double d3 = d0 * d0 + d1 * d1 + d2 * d2; double d3 = d0 * d0 + d1 * d1 + d2 * d2;
@ -51,5 +51,5 @@ index bbf7f02..85d4b81 100644
} }
} }
-- --
2.10.0.windows.1 2.10.2

View File

@ -1,60 +0,0 @@
From da91460fe9c232759f9523b67a9f656cf4a2a854 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
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index a44bbed..b1d712f 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -105,4 +105,13 @@ public class PaperWorldConfig {
private void nerfedMobsShouldJump() {
nerfedMobsShouldJump = getBoolean("spawner-nerfed-mobs-should-jump", false);
}
+
+ public float blockBreakExhaustion;
+ public float playerSwimmingExhaustion;
+ public void exhaustionValues() {
+ blockBreakExhaustion = getFloat("player-exhaustion.block-break", 0.025F);
+ playerSwimmingExhaustion = getFloat("player-exhaustion.swimming", 0.015F);
+ log("Player exhaustion penalty for breaking blocks is " + blockBreakExhaustion);
+ log("Player exhaustion penalty for swimming is " + playerSwimmingExhaustion);
+ }
}
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index d17160a..f7cf12f 100644
--- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java
@@ -455,7 +455,7 @@ public class Block {
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
if (this.o() && EnchantmentManager.getEnchantmentLevel(Enchantments.SILK_TOUCH, itemstack) > 0) {
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 30c5116..ffcc235 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -1464,13 +1464,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);
- this.applyExhaustion(0.015F * (float) i * 0.01F);
+ this.applyExhaustion(world.paperConfig.playerSwimmingExhaustion); // Paper - Configurable swimming exhaustion
}
} else if (this.isInWater()) {
i = Math.round(MathHelper.sqrt(d0 * d0 + d2 * d2) * 100.0F);
if (i > 0) {
this.a(StatisticList.m, i);
- this.applyExhaustion(0.015F * (float) i * 0.01F);
+ this.applyExhaustion(world.paperConfig.playerSwimmingExhaustion); // Paper - Configurable swimming exhaustion
}
} else if (this.m_()) {
if (d1 > 0.0D) {
--
2.10.0.windows.1

View File

@ -1,14 +1,14 @@
From 2a60bdf1a9f93a1969dfe37d9e6a73fd27dddb2f Mon Sep 17 00:00:00 2001 From c445404785a2d57072675ac79855742923a32331 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Thu, 3 Mar 2016 03:53:43 -0600 Date: Thu, 3 Mar 2016 03:53:43 -0600
Subject: [PATCH] Allow for toggling of spawn chunks Subject: [PATCH] Allow for toggling of spawn chunks
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 402dbe7..78dcf26 100644 index 92f38a4..c2c488a 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -130,4 +130,10 @@ public class PaperWorldConfig { @@ -121,4 +121,10 @@ public class PaperWorldConfig {
softDespawnDistance = softDespawnDistance*softDespawnDistance; softDespawnDistance = softDespawnDistance*softDespawnDistance;
hardDespawnDistance = hardDespawnDistance*hardDespawnDistance; hardDespawnDistance = hardDespawnDistance*hardDespawnDistance;
} }
@ -20,7 +20,7 @@ index 402dbe7..78dcf26 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 932e826..3e79e02 100644 index 2a38b1c..52171a3 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java
@@ -198,6 +198,7 @@ public abstract class World implements IBlockAccess { @@ -198,6 +198,7 @@ public abstract class World implements IBlockAccess {
@ -32,5 +32,5 @@ index 932e826..3e79e02 100644
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime); this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
} }
-- --
2.10.0.windows.1 2.10.2

View File

@ -1,14 +1,14 @@
From 2180a0f774d1077f684fbee8360b9f9db2c84be2 Mon Sep 17 00:00:00 2001 From 93b9b2bae96d5f54b99cfd0765ec3ce98b413cbd Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net> From: Byteflux <byte@byteflux.net>
Date: Tue, 1 Mar 2016 14:14:15 -0600 Date: Tue, 1 Mar 2016 14:14:15 -0600
Subject: [PATCH] Drop falling block and tnt entities at the specified height Subject: [PATCH] Drop falling block and tnt entities at the specified height
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 78dcf26..f19ae97 100644 index c2c488a..d44fdae 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -136,4 +136,14 @@ public class PaperWorldConfig { @@ -127,4 +127,14 @@ public class PaperWorldConfig {
keepSpawnInMemory = getBoolean("keep-spawn-loaded", true); keepSpawnInMemory = getBoolean("keep-spawn-loaded", true);
log("Keep spawn chunk loaded: " + keepSpawnInMemory); log("Keep spawn chunk loaded: " + keepSpawnInMemory);
} }
@ -24,13 +24,13 @@ index 78dcf26..f19ae97 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
index b8449fe..dbcda27 100644 index bce4c3c..2ed1fb1 100644
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java --- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java +++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
@@ -80,6 +80,17 @@ public class EntityFallingBlock extends Entity { @@ -80,6 +80,16 @@ public class EntityFallingBlock extends Entity {
} }
this.move(this.motX, this.motY, this.motZ); this.move(EnumMoveType.SELF, this.motX, this.motY, this.motZ);
+ +
+ // Paper start - Configurable EntityFallingBlock height nerf + // Paper start - Configurable EntityFallingBlock height nerf
+ if (this.world.paperConfig.fallingBlockHeightNerf != 0 && this.locY > this.world.paperConfig.fallingBlockHeightNerf) { + if (this.world.paperConfig.fallingBlockHeightNerf != 0 && this.locY > this.world.paperConfig.fallingBlockHeightNerf) {
@ -41,18 +41,17 @@ index b8449fe..dbcda27 100644
+ this.die(); + this.die();
+ } + }
+ // Paper end + // Paper end
+
this.motX *= 0.9800000190734863D; this.motX *= 0.9800000190734863D;
this.motY *= 0.9800000190734863D; this.motY *= 0.9800000190734863D;
this.motZ *= 0.9800000190734863D; this.motZ *= 0.9800000190734863D;
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index 0ed3f89..2745c49 100644 index 0fbdbd6..fd07356 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java --- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java +++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -54,6 +54,13 @@ public class EntityTNTPrimed extends Entity { @@ -56,6 +56,13 @@ public class EntityTNTPrimed extends Entity {
} }
this.move(this.motX, this.motY, this.motZ); this.move(EnumMoveType.SELF, this.motX, this.motY, this.motZ);
+ +
+ // Paper start - Configurable TNT entity height nerf + // Paper start - Configurable TNT entity height nerf
+ if (this.world.paperConfig.entityTNTHeightNerf != 0 && this.locY > this.world.paperConfig.entityTNTHeightNerf) { + if (this.world.paperConfig.entityTNTHeightNerf != 0 && this.locY > this.world.paperConfig.entityTNTHeightNerf) {
@ -64,5 +63,5 @@ index 0ed3f89..2745c49 100644
this.motY *= 0.9800000190734863D; this.motY *= 0.9800000190734863D;
this.motZ *= 0.9800000190734863D; this.motZ *= 0.9800000190734863D;
-- --
2.10.0.windows.1 2.10.2

View File

@ -1,14 +1,14 @@
From 1cf26e0671905c3572a05a55b68d4c04d934fb4b Mon Sep 17 00:00:00 2001 From eac74f310db6273e941e40504ba31fab0bbad29c Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net> From: Byteflux <byte@byteflux.net>
Date: Tue, 1 Mar 2016 14:27:13 -0600 Date: Tue, 1 Mar 2016 14:27:13 -0600
Subject: [PATCH] Configurable speed for water flowing over lava Subject: [PATCH] Configurable speed for water flowing over lava
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index f19ae97..8fc2f6c 100644 index d44fdae..06d1527 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -146,4 +146,10 @@ public class PaperWorldConfig { @@ -137,4 +137,10 @@ public class PaperWorldConfig {
if (fallingBlockHeightNerf != 0) log("Falling Block Height Limit set to Y: " + fallingBlockHeightNerf); if (fallingBlockHeightNerf != 0) log("Falling Block Height Limit set to Y: " + fallingBlockHeightNerf);
if (entityTNTHeightNerf != 0) log("TNT Entity Height Limit set to Y: " + entityTNTHeightNerf); if (entityTNTHeightNerf != 0) log("TNT Entity Height Limit set to Y: " + entityTNTHeightNerf);
} }
@ -20,7 +20,7 @@ index f19ae97..8fc2f6c 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/BlockFlowing.java b/src/main/java/net/minecraft/server/BlockFlowing.java diff --git a/src/main/java/net/minecraft/server/BlockFlowing.java b/src/main/java/net/minecraft/server/BlockFlowing.java
index c0f4961..b00865e 100644 index 40c7b55..e9f73cd 100644
--- a/src/main/java/net/minecraft/server/BlockFlowing.java --- a/src/main/java/net/minecraft/server/BlockFlowing.java
+++ b/src/main/java/net/minecraft/server/BlockFlowing.java +++ b/src/main/java/net/minecraft/server/BlockFlowing.java
@@ -35,7 +35,7 @@ public class BlockFlowing extends BlockFluids { @@ -35,7 +35,7 @@ public class BlockFlowing extends BlockFluids {
@ -57,5 +57,5 @@ index c0f4961..b00865e 100644
+ } + }
} }
-- --
2.10.0.windows.1 2.10.2

View File

@ -1,4 +1,4 @@
From c7b09e1fe02118a64de6d2a35558912e0278aea1 Mon Sep 17 00:00:00 2001 From 6c8a2f785dd53582ad864a4413e44c2ac8564f18 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 14:32:43 -0600 Date: Tue, 1 Mar 2016 14:32:43 -0600
Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
@ -20,10 +20,10 @@ index a8b5079..ebbc1fc 100644
EULA.a.warn("Failed to save {}", new Object[] { this.b, exception}); EULA.a.warn("Failed to save {}", new Object[] { this.b, exception});
} finally { } finally {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 4814643..41f560f 100644 index 81a69e8..c8c6959 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1028,7 +1028,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -1035,7 +1035,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
} }
public String getServerModName() { public String getServerModName() {
@ -33,7 +33,7 @@ index 4814643..41f560f 100644
public CrashReport b(CrashReport crashreport) { public CrashReport b(CrashReport crashreport) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 5f2a9b0..4ac573f 100644 index 9460486..e782a80 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -132,7 +132,7 @@ import net.md_5.bungee.api.chat.BaseComponent; @@ -132,7 +132,7 @@ import net.md_5.bungee.api.chat.BaseComponent;
@ -80,5 +80,5 @@ index 94a3d42..3ed983c 100644
log.log( Level.SEVERE, "------------------------------" ); log.log( Level.SEVERE, "------------------------------" );
// //
-- --
2.9.3 2.10.2

View File

@ -0,0 +1,75 @@
From 3c03eaa436c6bba260c5bde3eb2acaf58476e1ef 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 9f115d1..ae86ebc 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -63,6 +63,7 @@ public abstract class EntityHuman extends EntityLiving {
private final ItemCooldown bV;
@Nullable
public EntityFishingHook hookedFish;
+ public boolean affectsSpawning = true; // Paper - AffectsSpawning API
// CraftBukkit start
public boolean fauxSleeping;
diff --git a/src/main/java/net/minecraft/server/IEntitySelector.java b/src/main/java/net/minecraft/server/IEntitySelector.java
index dc0ffd8..f04aecb 100644
--- a/src/main/java/net/minecraft/server/IEntitySelector.java
+++ b/src/main/java/net/minecraft/server/IEntitySelector.java
@@ -44,13 +44,14 @@ public final class IEntitySelector {
};
public static final Predicate<Entity> e = new Predicate() {
public boolean a(@Nullable Entity entity) {
- return !(entity instanceof EntityHuman) || !((EntityHuman) entity).isSpectator();
+ return !(entity instanceof EntityHuman) || !((EntityHuman) entity).isSpectator() || !((EntityHuman) entity).affectsSpawning; // Paper - Affects Spawning API
}
public boolean apply(@Nullable Object object) {
return this.a((Entity) object);
}
};
+ public static final Predicate<Entity> CAN_MOBS_TARGET = e; // Paper - OBFHELPER
public static <T extends Entity> Predicate<T> a(final double d0, final double d1, final double d2, double d3) {
final double d4 = d3 * d3;
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index bec25e4..171410e 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -52,7 +52,7 @@ public final class SpawnerCreature {
while (iterator.hasNext()) {
EntityHuman entityhuman = (EntityHuman) iterator.next();
- if (!entityhuman.isSpectator()) {
+ if (!entityhuman.isSpectator() && entityhuman.affectsSpawning) { // Paper - AffectsSpawning API
int l = MathHelper.floor(entityhuman.locX / 16.0D);
j = MathHelper.floor(entityhuman.locZ / 16.0D);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 3784c32..3bda255 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1427,6 +1427,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
+ @Override
+ public void setAffectsSpawning(boolean affects) {
+ this.getHandle().affectsSpawning = affects;
+ }
+
+ @Override
+ public boolean getAffectsSpawning() {
+ return this.getHandle().affectsSpawning;
+ }
+
// Spigot start
private final Player.Spigot spigot = new Player.Spigot()
{
--
2.10.2

View File

@ -1,4 +1,4 @@
From d8a42f222d0f8146e852a3895d3a7eb0e9c267c2 Mon Sep 17 00:00:00 2001 From 1764a472a3a6830464ebe4136e6c8ebb9b3b4b1f Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 14:54:32 -0600 Date: Tue, 1 Mar 2016 14:54:32 -0600
Subject: [PATCH] Metrics Subject: [PATCH] Metrics
@ -18,5 +18,5 @@ index a5fd59d..680283c 100644
String pluginVersion = (Metrics.class.getPackage().getImplementationVersion() != null) ? Metrics.class.getPackage().getImplementationVersion() : "unknown"; String pluginVersion = (Metrics.class.getPackage().getImplementationVersion() != null) ? Metrics.class.getPackage().getImplementationVersion() : "unknown";
String serverVersion = Bukkit.getVersion(); String serverVersion = Bukkit.getVersion();
-- --
2.10.0.windows.1 2.10.2

View File

@ -1,209 +0,0 @@
From 97bbce71d023974e57cfae01c96b05e7086e2d77 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 ffcc235..35f4647 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -1,6 +1,7 @@
package net.minecraft.server;
import com.google.common.base.Charsets;
+import com.google.common.base.Predicate; // Paper
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 bW = this.l();
public EntityFishingHook hookedFish;
+ // Paper start - affectsSpawning API
+ public boolean affectsSpawning = true;
+
+ public static Predicate<EntityHuman> affectsSpawningFilter() {
+ return new Predicate<EntityHuman>() {
+ @Override
+ public boolean apply(EntityHuman entityHuman) {
+ return entityHuman.affectsSpawning;
+ }
+ };
+ }
+ // Paper end
+
// CraftBukkit start
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 85d4b81..74aaba2 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -625,7 +625,7 @@ public abstract class EntityInsentient extends EntityLiving {
if (this.persistent) {
this.ticksFarFromPlayer = 0;
} else {
- EntityHuman entityhuman = this.world.findNearbyPlayer(this, -1.0D);
+ EntityHuman entityhuman = this.world.findNearbyPlayer(this, -1.0D, EntityHuman.affectsSpawningFilter()); // Paper - affectsSpawning filter
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 78dbf79..e4d3ba4 100644
--- a/src/main/java/net/minecraft/server/EntitySilverfish.java
+++ b/src/main/java/net/minecraft/server/EntitySilverfish.java
@@ -93,7 +93,7 @@ public class EntitySilverfish extends EntityMonster {
public boolean cK() {
if (super.cK()) {
- 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 3145bdc..6981185 100644
--- a/src/main/java/net/minecraft/server/EntityZombie.java
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
@@ -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);
- if (!this.world.isPlayerNearby((double) i1, (double) j1, (double) k1, 7.0D) && this.world.a(entityzombie.getBoundingBox(), (Entity) entityzombie) && this.world.getCubes(entityzombie, entityzombie.getBoundingBox()).isEmpty() && !this.world.containsLiquid(entityzombie.getBoundingBox())) {
+ 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
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 7bae42a..f040775 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 {
private boolean h() {
BlockPosition blockposition = this.b();
- return this.a().isPlayerNearby((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, (double) this.requiredPlayerRange);
+ return this.a().isPlayerNearby((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, (double) this.requiredPlayerRange, EntityHuman.affectsSpawningFilter()); // Paper - affectsSpawning filter
}
public void c() {
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index 9e86aa2..fb0830d 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -52,6 +52,8 @@ public final class SpawnerCreature {
while (iterator.hasNext()) {
EntityHuman entityhuman = (EntityHuman) iterator.next();
+ if (!entityhuman.affectsSpawning) continue; // Paper - affectsSpawning check
+
if (!entityhuman.isSpectator()) {
int l = MathHelper.floor(entityhuman.locX / 16.0D);
@@ -162,7 +164,7 @@ public final class SpawnerCreature {
float f = (float) j3 + 0.5F;
float f1 = (float) l3 + 0.5F;
- if (!worldserver.isPlayerNearby((double) f, (double) k3, (double) f1, 24.0D) && blockposition.distanceSquared((double) f, (double) k3, (double) f1) >= 576.0D) {
+ if (!worldserver.isPlayerNearby((double) f, (double) k3, (double) f1, 24.0D, EntityHuman.affectsSpawningFilter()) && blockposition.distanceSquared((double) f, (double) k3, (double) f1) >= 576.0D) { // Paper - affectsSpawning filter
if (biomebase_biomemeta == null) {
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 3e79e02..e3d971c 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -3,6 +3,7 @@
import com.google.common.base.Function;
import com.google.common.base.Objects;
import com.google.common.base.Predicate;
+import com.google.common.base.Predicates; // Paper
import com.google.common.collect.Lists;
import java.util.ArrayList;
import java.util.Calendar;
@@ -2713,16 +2714,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
+ return findNearbyPlayer(entity, d0, Predicates.<EntityHuman>alwaysTrue());
+ }
+
+ public EntityHuman findNearbyPlayer(Entity entity, double d0, Predicate<EntityHuman> filter) {
+ 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());
+ }
+
+ public EntityHuman findNearbyPlayerNotInCreativeMode(Entity entity, double d0, Predicate<EntityHuman> filter) {
+ 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());
+ }
+
+ public EntityHuman findNearbyPlayer(double d0, double d1, double d2, double d3, boolean flag, Predicate<EntityHuman> filter) {
+ // FYI the flag means "exclude creative mode players"
+ // Paper end
double d4 = -1.0D;
EntityHuman entityhuman = null;
@@ -2734,6 +2750,8 @@ public abstract class World implements IBlockAccess {
}
// CraftBukkit end
+ if (!filter.apply(entityhuman1)) continue; // Paper - check filter
+
if ((IEntitySelector.d.apply(entityhuman1) || !flag) && (IEntitySelector.e.apply(entityhuman1) || flag)) {
double d5 = entityhuman1.e(d0, d1, d2);
@@ -2748,9 +2766,17 @@ public abstract class World implements IBlockAccess {
}
public boolean isPlayerNearby(double d0, double d1, double d2, double d3) {
+ // Paper start - add filter parameter
+ return isPlayerNearby(d0, d1, d2, d3, Predicates.<EntityHuman>alwaysTrue());
+ }
+
+ public boolean isPlayerNearby(double d0, double d1, double d2, double d3, Predicate<EntityHuman> filter) {
+ // Paper end
for (int i = 0; i < this.players.size(); ++i) {
EntityHuman entityhuman = (EntityHuman) this.players.get(i);
+ if (!filter.apply(entityhuman)) continue; // Paper - check filter
+
if (IEntitySelector.e.apply(entityhuman)) {
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 5874554..95cdbab 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1427,6 +1427,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
+ @Override
+ public void setAffectsSpawning(boolean affects) {
+ this.getHandle().affectsSpawning = affects;
+ }
+
+ @Override
+ public boolean getAffectsSpawning() {
+ return this.getHandle().affectsSpawning;
+ }
+
// Spigot start
private final Player.Spigot spigot = new Player.Spigot()
{
--
2.10.0.windows.1

View File

@ -1,15 +1,15 @@
From f4ee8852de88f04a10452efeadde65721090b7a2 Mon Sep 17 00:00:00 2001 From 6fa172fd0c691f25c4f2bde7223513232b35ab32 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net> From: Byteflux <byte@byteflux.net>
Date: Tue, 1 Mar 2016 15:08:03 -0600 Date: Tue, 1 Mar 2016 15:08:03 -0600
Subject: [PATCH] Remove invalid mob spawner tile entities 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 diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 5807bb8..445419f 100644 index bd3b160..1c0108e 100644
--- a/src/main/java/net/minecraft/server/Chunk.java --- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -722,6 +722,10 @@ public class Chunk { @@ -722,6 +722,10 @@ public class Chunk {
tileentity.z(); tileentity.A();
this.tileEntities.put(blockposition, tileentity); this.tileEntities.put(blockposition, tileentity);
// CraftBukkit start // CraftBukkit start
+ // Paper start - Remove invalid mob spawner tile entities + // Paper start - Remove invalid mob spawner tile entities
@ -20,5 +20,5 @@ index 5807bb8..445419f 100644
System.out.println("Attempted to place a tile entity (" + tileentity + ") at " + tileentity.position.getX() + "," + tileentity.position.getY() + "," + tileentity.position.getZ() 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!"); + " (" + org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(getBlockData(blockposition).getBlock()) + ") where there was no entity tile!");
-- --
2.10.0.windows.1 2.10.2

View File

@ -1,21 +1,21 @@
From acf62d273a781fa52762156b98d76d0f27e28a4d Mon Sep 17 00:00:00 2001 From f2bbe33ed075142f13f0c6d51b67f5e2d62f7a31 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 22:01:19 -0600 Date: Tue, 1 Mar 2016 22:01:19 -0600
Subject: [PATCH] Optimize TileEntity Ticking 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 diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java
index 5014903..81db929 100644 index 28a514a..60452e8 100644
--- a/src/main/java/net/minecraft/server/TileEntityChest.java --- a/src/main/java/net/minecraft/server/TileEntityChest.java
+++ b/src/main/java/net/minecraft/server/TileEntityChest.java +++ b/src/main/java/net/minecraft/server/TileEntityChest.java
@@ -9,17 +9,17 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity; @@ -8,17 +8,17 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity;
import org.bukkit.entity.HumanEntity; import org.bukkit.entity.HumanEntity;
// CraftBukkit end // CraftBukkit end
-public class TileEntityChest extends TileEntityLootable implements ITickable, IInventory { -public class TileEntityChest extends TileEntityLootable implements ITickable {
+public class TileEntityChest extends TileEntityLootable implements IInventory { // Paper - Remove ITickable +public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITickable
private ItemStack[] items = new ItemStack[27]; private NonNullList<ItemStack> items;
public boolean a; public boolean a;
- public TileEntityChest f; - public TileEntityChest f;
- public TileEntityChest g; - public TileEntityChest g;
@ -30,19 +30,19 @@ index 5014903..81db929 100644
public float k; public float k;
- public int l; - public int l;
+ public int l; // Paper - Number of viewers + public int l; // Paper - Number of viewers
private int p; private int q;
private BlockChest.Type q; private BlockChest.Type r;
private String r;
@@ -241,6 +241,8 @@ public class TileEntityChest extends TileEntityLootable implements ITickable, II @@ -190,6 +190,8 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
} }
public void E_() { public void F_() {
+ // Paper - Disable all of this, just in case this does get ticked + // Paper - Disable all of this, just in case this does get ticked
+ /* + /*
this.m(); this.o();
int i = this.position.getX(); int i = this.position.getX();
int j = this.position.getY(); int j = this.position.getY();
@@ -321,7 +323,8 @@ public class TileEntityChest extends TileEntityLootable implements ITickable, II @@ -270,7 +272,8 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
this.j = 0.0F; this.j = 0.0F;
} }
} }
@ -52,13 +52,13 @@ index 5014903..81db929 100644
} }
public boolean c(int i, int j) { public boolean c(int i, int j) {
@@ -341,6 +344,28 @@ public class TileEntityChest extends TileEntityLootable implements ITickable, II @@ -290,6 +293,28 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
int oldPower = Math.max(0, Math.min(15, this.l)); // CraftBukkit - Get power before new viewer is added int oldPower = Math.max(0, Math.min(15, this.l)); // CraftBukkit - Get power before new viewer is added
++this.l; ++this.l;
+ +
+ // Paper start - Move chest open sound out of the tick loop + // Paper start - Move chest open sound out of the tick loop
+ this.m(); + this.o();
+ +
+ if (this.l > 0 && this.j == 0.0F && this.f == null && this.h == null) { + if (this.l > 0 && this.j == 0.0F && this.f == null && this.h == null) {
+ this.j = 0.7F; + this.j = 0.7F;
@ -74,17 +74,17 @@ index 5014903..81db929 100644
+ d1 += 0.5D; + d1 += 0.5D;
+ } + }
+ +
+ this.world.a((EntityHuman) null, d1, (double) this.position.getY() + 0.5D, d0, SoundEffects.X, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F); + this.world.a((EntityHuman) null, d1, (double) this.position.getY() + 0.5D, d0, SoundEffects.Z, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
+ } + }
+ // Paper end + // Paper end
+ +
if (this.world == null) return; // CraftBukkit if (this.world == null) return; // CraftBukkit
this.world.playBlockAction(this.position, this.getBlock(), 1, this.l); this.world.playBlockAction(this.position, this.getBlock(), 1, this.l);
@@ -364,6 +389,34 @@ public class TileEntityChest extends TileEntityLootable implements ITickable, II @@ -314,6 +339,34 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
if (!entityhuman.isSpectator() && this.getBlock() instanceof BlockChest) {
int oldPower = Math.max(0, Math.min(15, this.l)); // CraftBukkit - Get power before new viewer is added int oldPower = Math.max(0, Math.min(15, this.l)); // CraftBukkit - Get power before new viewer is added
--this.l; --this.l;
if (this.world == null) return; // CraftBukkit
+ +
+ // Paper start - Move chest close sound out of the tick loop + // Paper start - Move chest close sound out of the tick loop
+ if (this.l == 0 && this.j > 0.0F || this.l > 0 && this.j < 1.0F) { + if (this.l == 0 && this.j > 0.0F || this.l > 0 && this.j < 1.0F) {
@ -108,16 +108,16 @@ index 5014903..81db929 100644
+ d0 += 0.5D; + d0 += 0.5D;
+ } + }
+ +
+ this.world.a((EntityHuman) null, d0, (double) yLoc + 0.5D, d2, SoundEffects.V, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F); + this.world.a((EntityHuman) null, d0, (double) yLoc + 0.5D, d2, SoundEffects.X, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
+ this.j = 0.0F; + this.j = 0.0F;
+ } + }
+ // Paper end + // Paper end
+ +
this.world.playBlockAction(this.position, this.getBlock(), 1, this.l); this.world.playBlockAction(this.position, this.getBlock(), 1, this.l);
this.world.applyPhysics(this.position, this.getBlock(), false);
// 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 diff --git a/src/main/java/net/minecraft/server/TileEntityEnderChest.java b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
index d5f0d61..b257bc4 100644 index 3d61c2d..586ceaa 100644
--- a/src/main/java/net/minecraft/server/TileEntityEnderChest.java --- a/src/main/java/net/minecraft/server/TileEntityEnderChest.java
+++ b/src/main/java/net/minecraft/server/TileEntityEnderChest.java +++ b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
@@ -1,15 +1,17 @@ @@ -1,15 +1,17 @@
@ -135,7 +135,7 @@ index d5f0d61..b257bc4 100644
public TileEntityEnderChest() {} public TileEntityEnderChest() {}
public void E_() { public void F_() {
+ // Paper start - Disable all of this, just in case this does get ticked + // Paper start - Disable all of this, just in case this does get ticked
+ /* + /*
if (++this.h % 20 * 4 == 0) { if (++this.h % 20 * 4 == 0) {
@ -152,7 +152,7 @@ index d5f0d61..b257bc4 100644
@@ -73,11 +77,34 @@ public class TileEntityEnderChest extends TileEntity implements ITickable { @@ -73,11 +77,34 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
public void d() { public void a() {
++this.g; ++this.g;
+ +
+ // Paper start - Move enderchest open sounds out of the tick loop + // Paper start - Move enderchest open sounds out of the tick loop
@ -162,7 +162,7 @@ index d5f0d61..b257bc4 100644
+ double d1 = (double) this.getPosition().getX() + 0.5D; + double d1 = (double) this.getPosition().getX() + 0.5D;
+ double d0 = (double) this.getPosition().getZ() + 0.5D; + double d0 = (double) this.getPosition().getZ() + 0.5D;
+ +
+ this.world.a((EntityHuman) null, d1, (double) this.getPosition().getY() + 0.5D, d0, SoundEffects.aN, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F); + this.world.a((EntityHuman) null, d1, (double) this.getPosition().getY() + 0.5D, d0, SoundEffects.aQ, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
+ } + }
+ // Paper end + // Paper end
+ +
@ -177,7 +177,7 @@ index d5f0d61..b257bc4 100644
+ double d0 = (double) this.getPosition().getX() + 0.5D; + double d0 = (double) this.getPosition().getX() + 0.5D;
+ double d2 = (double) this.getPosition().getZ() + 0.5D; + double d2 = (double) this.getPosition().getZ() + 0.5D;
+ +
+ this.world.a((EntityHuman) null, d0, (double) this.getPosition().getY() + 0.5D, d2, SoundEffects.aM, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F); + this.world.a((EntityHuman) null, d0, (double) this.getPosition().getY() + 0.5D, d2, SoundEffects.aP, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
+ this.a = 0.0F; + this.a = 0.0F;
+ } + }
+ // Paper end + // Paper end
@ -186,5 +186,5 @@ index d5f0d61..b257bc4 100644
} }
-- --
2.10.0.windows.1 2.10.2

View File

@ -1,4 +1,4 @@
From 01d6f991f6f4b263e38da7878cad63b7a7cd7b1b Mon Sep 17 00:00:00 2001 From 5cb731aebea389dbd75eaf4cb77841f9672baa62 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Tue, 1 Mar 2016 23:09:29 -0600 Date: Tue, 1 Mar 2016 23:09:29 -0600
Subject: [PATCH] Further improve server tick loop 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 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 diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 062cfd6..1363472 100644 index c8c6959..127d11c 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/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 @@ -112,17 +112,11 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
public org.bukkit.command.ConsoleCommandSender console; public org.bukkit.command.ConsoleCommandSender console;
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole; public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
public ConsoleReader reader; public ConsoleReader reader;
@ -34,7 +34,7 @@ index 062cfd6..1363472 100644
public MinecraftServer(OptionSet options, Proxy proxy, DataConverterManager dataconvertermanager, YggdrasilAuthenticationService yggdrasilauthenticationservice, MinecraftSessionService minecraftsessionservice, GameProfileRepository gameprofilerepository, UserCache usercache) { public MinecraftServer(OptionSet options, Proxy proxy, DataConverterManager dataconvertermanager, YggdrasilAuthenticationService yggdrasilauthenticationservice, MinecraftSessionService minecraftsessionservice, GameProfileRepository gameprofilerepository, UserCache usercache) {
io.netty.util.ResourceLeakDetector.setEnabled( false ); // Spigot - disable io.netty.util.ResourceLeakDetector.setEnabled( false ); // Spigot - disable
@@ -524,12 +518,54 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -531,12 +525,54 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
this.isRunning = false; this.isRunning = false;
} }
@ -94,7 +94,7 @@ index 062cfd6..1363472 100644
public void run() { public void run() {
try { try {
@@ -543,24 +579,41 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -550,24 +586,41 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
// Spigot start // Spigot start
Arrays.fill( recentTps, 20 ); Arrays.fill( recentTps, 20 );
@ -148,10 +148,10 @@ index 062cfd6..1363472 100644
} }
lastTick = curTime; lastTick = curTime;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 4ac573f..b5132cd 100644 index e782a80..494c61a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1724,6 +1724,17 @@ public final class CraftServer implements Server { @@ -1719,6 +1719,17 @@ public final class CraftServer implements Server {
return CraftMagicNumbers.INSTANCE; return CraftMagicNumbers.INSTANCE;
} }
@ -211,5 +211,5 @@ index be2e31d..6d21c32 100644
return ( ( tps > 18.0 ) ? ChatColor.GREEN : ( tps > 16.0 ) ? ChatColor.YELLOW : ChatColor.RED ).toString() 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 ); + ( ( tps > 20.0 ) ? "*" : "" ) + Math.min( Math.round( tps * 100.0 ) / 100.0, 20.0 );
-- --
2.10.0.windows.1 2.10.2

View File

@ -1,11 +1,11 @@
From 52edc592b137c32d87f8ead08ea7b011614b406e Mon Sep 17 00:00:00 2001 From b9c6bdb7d61d314397dc9f1426d80b23b8f43eee Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 23:12:03 -0600 Date: Tue, 1 Mar 2016 23:12:03 -0600
Subject: [PATCH] Only refresh abilities if needed 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 95cdbab..3b0e58b 100644 index 3bda255..0267e50 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1151,12 +1151,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1151,12 +1151,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -24,5 +24,5 @@ index 95cdbab..3b0e58b 100644
@Override @Override
-- --
2.10.0.windows.1 2.10.2

View File

@ -1,11 +1,11 @@
From c4f8d2a04dc43344dc465aeee0ad81a67677ea1e Mon Sep 17 00:00:00 2001 From 72530f8a0121d4f72bd4b24f9164512ed285288f Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 23:19:01 -0600 Date: Tue, 1 Mar 2016 23:19:01 -0600
Subject: [PATCH] Add async chunk load API 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 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index b1e4026..9ef8fc1 100644 index bc214af..c507858 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -125,6 +125,26 @@ public class CraftWorld implements World { @@ -125,6 +125,26 @@ public class CraftWorld implements World {
@ -36,5 +36,5 @@ index b1e4026..9ef8fc1 100644
return this.world.getChunkProviderServer().getChunkAt(x, z).bukkitChunk; return this.world.getChunkProviderServer().getChunkAt(x, z).bukkitChunk;
} }
-- --
2.10.0.windows.1 2.10.2

View File

@ -1,14 +1,14 @@
From 3febea393a161f09bef588e1b62c721860f1b0ec Mon Sep 17 00:00:00 2001 From d67a5caa6bb6004252668cda3001ccd9180c5e5a Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net> From: Byteflux <byte@byteflux.net>
Date: Tue, 1 Mar 2016 23:45:08 -0600 Date: Tue, 1 Mar 2016 23:45:08 -0600
Subject: [PATCH] Entity Origin API 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 diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 1409faa..cf08a0e 100644 index e0276a6..6766166 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -145,6 +145,7 @@ public abstract class Entity implements ICommandListener { @@ -144,6 +144,7 @@ public abstract class Entity implements ICommandListener {
public org.bukkit.projectiles.ProjectileSource projectileSource; // CraftBukkit - For projectiles only public org.bukkit.projectiles.ProjectileSource projectileSource; // CraftBukkit - For projectiles only
public boolean forceExplosionKnockback; // CraftBukkit - SPIGOT-949 public boolean forceExplosionKnockback; // CraftBukkit - SPIGOT-949
public Timing tickTimer = MinecraftTimings.getEntityTimings(this); // Paper public Timing tickTimer = MinecraftTimings.getEntityTimings(this); // Paper
@ -16,7 +16,7 @@ index 1409faa..cf08a0e 100644
// Spigot start // Spigot start
public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
public final boolean defaultActivationState; public final boolean defaultActivationState;
@@ -1373,6 +1374,11 @@ public abstract class Entity implements ICommandListener { @@ -1416,6 +1417,11 @@ public abstract class Entity implements ICommandListener {
} }
} }
@ -28,7 +28,7 @@ index 1409faa..cf08a0e 100644
return nbttagcompound; return nbttagcompound;
} catch (Throwable throwable) { } catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT"); CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT");
@@ -1517,6 +1523,13 @@ public abstract class Entity implements ICommandListener { @@ -1560,6 +1566,13 @@ public abstract class Entity implements ICommandListener {
} }
// CraftBukkit end // CraftBukkit end
@ -42,7 +42,7 @@ index 1409faa..cf08a0e 100644
} catch (Throwable throwable) { } catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT"); CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded");
@@ -1538,6 +1551,7 @@ public abstract class Entity implements ICommandListener { @@ -1584,6 +1597,7 @@ public abstract class Entity implements ICommandListener {
protected abstract void b(NBTTagCompound nbttagcompound); protected abstract void b(NBTTagCompound nbttagcompound);
@ -51,10 +51,10 @@ index 1409faa..cf08a0e 100644
NBTTagList nbttaglist = new NBTTagList(); NBTTagList nbttaglist = new NBTTagList();
double[] adouble1 = adouble; double[] adouble1 = adouble;
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
index dbcda27..a1392d6 100644 index 2ed1fb1..042670b 100644
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java --- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java +++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
@@ -246,6 +246,14 @@ public class EntityFallingBlock extends Entity { @@ -247,6 +247,14 @@ public class EntityFallingBlock extends Entity {
this.block = Blocks.SAND.getBlockData(); this.block = Blocks.SAND.getBlockData();
} }
@ -70,10 +70,10 @@ index dbcda27..a1392d6 100644
public void a(boolean flag) { public void a(boolean flag) {
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index 2745c49..86f3f1f 100644 index fd07356..25e471d 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java --- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java +++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -107,6 +107,14 @@ public class EntityTNTPrimed extends Entity { @@ -108,6 +108,14 @@ public class EntityTNTPrimed extends Entity {
protected void a(NBTTagCompound nbttagcompound) { protected void a(NBTTagCompound nbttagcompound) {
this.setFuseTicks(nbttagcompound.getShort("Fuse")); this.setFuseTicks(nbttagcompound.getShort("Fuse"));
@ -87,12 +87,12 @@ index 2745c49..86f3f1f 100644
+ // Paper end + // Paper end
} }
public EntityLiving getSource() { @Nullable
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index e3d971c..5b3e50c 100644 index 52171a3..4db969b 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java
@@ -962,6 +962,12 @@ public abstract class World implements IBlockAccess { @@ -1021,6 +1021,12 @@ public abstract class World implements IBlockAccess {
int j = MathHelper.floor(entity.locZ / 16.0D); int j = MathHelper.floor(entity.locZ / 16.0D);
boolean flag = entity.attachedToPlayer; boolean flag = entity.attachedToPlayer;
@ -106,10 +106,10 @@ index e3d971c..5b3e50c 100644
flag = true; flag = true;
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 09523de..a24efd9 100644 index 72fd019..f8aabe2 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -650,4 +650,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -672,4 +672,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return spigot; return spigot;
} }
// Spigot end // Spigot end
@ -122,11 +122,11 @@ index 09523de..a24efd9 100644
+ } + }
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingSand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingSand.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java
index ad4eb39..f6dad02 100644 index b0a7f63..56666f1 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingSand.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingSand.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java
@@ -65,4 +65,11 @@ public class CraftFallingSand extends CraftEntity implements FallingSand { @@ -65,4 +65,11 @@ public class CraftFallingBlock extends CraftEntity implements FallingBlock {
// Second field for EntityFallingBlock // Second field for EntityFallingBlock
getHandle().ticksLived = value; getHandle().ticksLived = value;
} }

View File

@ -1,32 +1,32 @@
From 9180cb4c79c197a377028ff0066f36a57010f7e3 Mon Sep 17 00:00:00 2001 From 7fbd0b2351a7a6e38cf85611cbcb5caa1fc5cbf0 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Tue, 1 Mar 2016 23:52:34 -0600 Date: Tue, 1 Mar 2016 23:52:34 -0600
Subject: [PATCH] Prevent tile entity and entity crashes 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 diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 2b82312..9fa93ed 100644 index 0f505ed..1f3e89b 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java --- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -177,7 +177,12 @@ public abstract class TileEntity { @@ -175,7 +175,12 @@ public abstract class TileEntity {
} }
}); });
if (this.world != null) { if (this.world != null) {
- CrashReportSystemDetails.a(crashreportsystemdetails, this.position, this.getBlock(), this.u()); - CrashReportSystemDetails.a(crashreportsystemdetails, this.position, this.getBlock(), this.v());
+ // Paper start - Prevent TileEntity and Entity crashes + // Paper start - Prevent TileEntity and Entity crashes
+ Block block = this.getBlock(); + Block block = this.getBlock();
+ if (block != null) { + if (block != null) {
+ CrashReportSystemDetails.a(crashreportsystemdetails, this.position, block, this.u()); + CrashReportSystemDetails.a(crashreportsystemdetails, this.position, this.getBlock(), this.v());
+ } + }
+ // Paper end + // Paper end
crashreportsystemdetails.a("Actual block type", new CrashReportCallable() { crashreportsystemdetails.a("Actual block type", new CrashReportCallable() {
public String a() throws Exception { public String a() throws Exception {
int i = Block.getId(TileEntity.this.world.getType(TileEntity.this.position).getBlock()); 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 diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 5b3e50c..8fb8176 100644 index 4db969b..20cc5ff 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java
@@ -1445,10 +1445,12 @@ public abstract class World implements IBlockAccess { @@ -1467,10 +1467,12 @@ public abstract class World implements IBlockAccess {
entity.tickTimer.stopTiming(); // Paper entity.tickTimer.stopTiming(); // Paper
} catch (Throwable throwable1) { } catch (Throwable throwable1) {
entity.tickTimer.stopTiming(); entity.tickTimer.stopTiming();
@ -43,8 +43,8 @@ index 5b3e50c..8fb8176 100644
} }
} }
@@ -1511,10 +1513,13 @@ public abstract class World implements IBlockAccess { @@ -1533,10 +1535,13 @@ public abstract class World implements IBlockAccess {
((ITickable) tileentity).E_(); ((ITickable) tileentity).F_();
this.methodProfiler.b(); this.methodProfiler.b();
} catch (Throwable throwable2) { } catch (Throwable throwable2) {
- crashreport1 = CrashReport.a(throwable2, "Ticking block entity"); - crashreport1 = CrashReport.a(throwable2, "Ticking block entity");
@ -62,5 +62,5 @@ index 5b3e50c..8fb8176 100644
// Spigot start // Spigot start
finally { finally {
-- --
2.10.0.windows.1 2.10.2

View File

@ -1,14 +1,14 @@
From a926366fca50262a094af3fe90e733f386d83b7c Mon Sep 17 00:00:00 2001 From 94a01cae0a4766334b1efdb05a4410a02a84a401 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 23:58:50 -0600 Date: Tue, 1 Mar 2016 23:58:50 -0600
Subject: [PATCH] Configurable top of nether void damage Subject: [PATCH] Configurable top of nether void damage
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 8fc2f6c..d78b688 100644 index 06d1527..2767ffb 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -152,4 +152,10 @@ public class PaperWorldConfig { @@ -143,4 +143,10 @@ public class PaperWorldConfig {
waterOverLavaFlowSpeed = getInt("water-over-lava-flow-speed", 5); waterOverLavaFlowSpeed = getInt("water-over-lava-flow-speed", 5);
log("Water over lava flow speed: " + waterOverLavaFlowSpeed); log("Water over lava flow speed: " + waterOverLavaFlowSpeed);
} }
@ -20,10 +20,10 @@ index 8fc2f6c..d78b688 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 38df1c6..fd51ecb 100644 index 6766166..40398ca 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -386,9 +386,15 @@ public abstract class Entity implements ICommandListener { @@ -390,9 +390,15 @@ public abstract class Entity implements ICommandListener {
this.fallDistance *= 0.5F; this.fallDistance *= 0.5F;
} }
@ -39,7 +39,7 @@ index 38df1c6..fd51ecb 100644
if (!this.world.isClientSide) { if (!this.world.isClientSide) {
this.setFlag(0, this.fireTicks > 0); this.setFlag(0, this.fireTicks > 0);
@@ -398,6 +404,18 @@ public abstract class Entity implements ICommandListener { @@ -402,6 +408,18 @@ public abstract class Entity implements ICommandListener {
this.world.methodProfiler.b(); this.world.methodProfiler.b();
} }
@ -58,7 +58,7 @@ index 38df1c6..fd51ecb 100644
protected void H() { protected void H() {
if (this.portalCooldown > 0) { if (this.portalCooldown > 0) {
--this.portalCooldown; --this.portalCooldown;
@@ -454,6 +472,7 @@ public abstract class Entity implements ICommandListener { @@ -458,6 +476,7 @@ public abstract class Entity implements ICommandListener {
this.fireTicks = 0; this.fireTicks = 0;
} }
@ -67,10 +67,10 @@ index 38df1c6..fd51ecb 100644
this.die(); this.die();
} }
diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
index 36ef2da..4438d83 100644 index fdacb6d..ec75bab 100644
--- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java --- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
+++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java +++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
@@ -210,9 +210,15 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT @@ -206,9 +206,15 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT
this.setDamage(this.getDamage() - 1.0F); this.setDamage(this.getDamage() - 1.0F);
} }
@ -87,5 +87,5 @@ index 36ef2da..4438d83 100644
int i; int i;
-- --
2.10.0.windows.1 2.10.2

View File

@ -1,14 +1,14 @@
From 1f849507582b5b1dae133b05b73c29aa78ef9d14 Mon Sep 17 00:00:00 2001 From 44c07ef0621492638973ef6e53b42a04e87c7bee Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Wed, 2 Mar 2016 00:03:55 -0600 Date: Wed, 2 Mar 2016 00:03:55 -0600
Subject: [PATCH] Check online mode before converting and renaming player data 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 diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java
index 75e2338..f077398 100644 index b6cb918..7c4c599 100644
--- a/src/main/java/net/minecraft/server/WorldNBTStorage.java --- a/src/main/java/net/minecraft/server/WorldNBTStorage.java
+++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java +++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java
@@ -165,7 +165,7 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData { @@ -166,7 +166,7 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData {
File file = new File(this.playerDir, entityhuman.bf() + ".dat"); File file = new File(this.playerDir, entityhuman.bf() + ".dat");
// Spigot Start // Spigot Start
boolean usingWrongFile = false; boolean usingWrongFile = false;
@ -18,5 +18,5 @@ index 75e2338..f077398 100644
file = new File( this.playerDir, UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + entityhuman.getName() ).getBytes( "UTF-8" ) ).toString() + ".dat"); file = new File( this.playerDir, UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + entityhuman.getName() ).getBytes( "UTF-8" ) ).toString() + ".dat");
if ( file.exists() ) if ( file.exists() )
-- --
2.10.0.windows.1 2.10.2

View File

@ -1,11 +1,11 @@
From 67763518c9084c592b734afd2bd4118da9127b92 Mon Sep 17 00:00:00 2001 From 2a837acc0906c9c21810efbe5aa68b66d4866d3a Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Wed, 2 Mar 2016 00:32:25 -0600 Date: Wed, 2 Mar 2016 00:32:25 -0600
Subject: [PATCH] Always tick falling blocks Subject: [PATCH] Always tick falling blocks
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index eb30abe..c4ed64a 100644 index 5c2fb00..c411ce8 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java --- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -13,6 +13,7 @@ import net.minecraft.server.EntityCreature; @@ -13,6 +13,7 @@ import net.minecraft.server.EntityCreature;
@ -25,5 +25,5 @@ index eb30abe..c4ed64a 100644
|| entity instanceof EntityFireworks ) || entity instanceof EntityFireworks )
{ {
-- --
2.10.0.windows.1 2.10.2

View File

@ -1,4 +1,4 @@
From fa2e0c1e868ffb94b3748ffbd75b60a5b6ce38fc Mon Sep 17 00:00:00 2001 From de8891c221aadfd9a15b896d964d0d41367c5c44 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net> From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 00:52:31 -0600 Date: Wed, 2 Mar 2016 00:52:31 -0600
Subject: [PATCH] Lighting Queue Subject: [PATCH] Lighting Queue
@ -27,10 +27,10 @@ index e778911..f90f5bf 100644
} }
} }
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index d78b688..158db3a 100644 index 2767ffb..f7a0c18 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -158,4 +158,10 @@ public class PaperWorldConfig { @@ -149,4 +149,10 @@ public class PaperWorldConfig {
netherVoidTopDamage = getBoolean( "nether-ceiling-void-damage", false ); netherVoidTopDamage = getBoolean( "nether-ceiling-void-damage", false );
log("Top of the nether void damage: " + netherVoidTopDamage); log("Top of the nether void damage: " + netherVoidTopDamage);
} }
@ -42,7 +42,7 @@ index d78b688..158db3a 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 445419f..76130c9 100644 index 1c0108e..b80f951 100644
--- a/src/main/java/net/minecraft/server/Chunk.java --- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -33,6 +33,7 @@ public class Chunk { @@ -33,6 +33,7 @@ public class Chunk {
@ -85,10 +85,10 @@ index 445419f..76130c9 100644
TileEntity tileentity; TileEntity tileentity;
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 1380815..466cd49 100644 index 17d39bb..df3ce72 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -279,6 +279,7 @@ public class ChunkProviderServer implements IChunkProvider { @@ -280,6 +280,7 @@ public class ChunkProviderServer implements IChunkProvider {
return false; return false;
} }
save = event.isSaveChunk(); save = event.isSaveChunk();
@ -97,10 +97,10 @@ index 1380815..466cd49 100644
// Update neighbor counts // Update neighbor counts
for (int x = -2; x < 3; x++) { for (int x = -2; x < 3; x++) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 029a6c3..f0dcb9f 100644 index 127d11c..2e72b8c 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -709,7 +709,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -716,7 +716,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
protected void C() throws ExceptionWorldConflict { // CraftBukkit - added throws protected void C() throws ExceptionWorldConflict { // CraftBukkit - added throws
co.aikar.timings.TimingsManager.FULL_SERVER_TICK.startTiming(); // Paper co.aikar.timings.TimingsManager.FULL_SERVER_TICK.startTiming(); // Paper
@ -108,8 +108,8 @@ index 029a6c3..f0dcb9f 100644
+ long i = System.nanoTime(); long startTime = i; // Paper + long i = System.nanoTime(); long startTime = i; // Paper
++this.ticks; ++this.ticks;
if (this.S) { if (this.T) {
@@ -767,6 +767,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -774,6 +774,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
this.methodProfiler.b(); this.methodProfiler.b();
org.spigotmc.WatchdogThread.tick(); // Spigot org.spigotmc.WatchdogThread.tick(); // Spigot
@ -222,10 +222,10 @@ index 0000000..2350fe3
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 8fb8176..672167a 100644 index 20cc5ff..abe11ad 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java
@@ -384,7 +384,7 @@ public abstract class World implements IBlockAccess { @@ -387,7 +387,7 @@ public abstract class World implements IBlockAccess {
} else { } else {
if (iblockdata.c() != iblockdata1.c() || iblockdata.d() != iblockdata1.d()) { if (iblockdata.c() != iblockdata1.c() || iblockdata.d() != iblockdata1.d()) {
this.methodProfiler.a("checkLight"); this.methodProfiler.a("checkLight");
@ -235,5 +235,5 @@ index 8fb8176..672167a 100644
} }
-- --
2.10.1 2.10.2

View File

@ -1,14 +1,14 @@
From 40b69207b686437a0b1414c9f46ad9c3d11f5d6f Mon Sep 17 00:00:00 2001 From ee64101f6764c9f72a0c602568c0a27a872adeae Mon Sep 17 00:00:00 2001
From: DoctorDark <doctordark11@gmail.com> From: DoctorDark <doctordark11@gmail.com>
Date: Wed, 16 Mar 2016 02:21:39 -0500 Date: Wed, 16 Mar 2016 02:21:39 -0500
Subject: [PATCH] Configurable end credits Subject: [PATCH] Configurable end credits
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 158db3a..e4e5487 100644 index f7a0c18..31503e7 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -164,4 +164,10 @@ public class PaperWorldConfig { @@ -155,4 +155,10 @@ public class PaperWorldConfig {
queueLightUpdates = getBoolean("queue-light-updates", false); queueLightUpdates = getBoolean("queue-light-updates", false);
log("Lighting Queue enabled: " + queueLightUpdates); log("Lighting Queue enabled: " + queueLightUpdates);
} }
@ -20,10 +20,10 @@ index 158db3a..e4e5487 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 37c94f8..522c7f2 100644 index 29e33da..a400062 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -511,6 +511,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -495,6 +495,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
return this.world.pvpMode; return this.world.pvpMode;
} }
@ -39,7 +39,7 @@ index 37c94f8..522c7f2 100644
@Nullable @Nullable
public Entity c(int i) { public Entity c(int i) {
// this.worldChangeInvuln = true; // CraftBukkit - Moved down and into PlayerList#changeDimension // this.worldChangeInvuln = true; // CraftBukkit - Moved down and into PlayerList#changeDimension
@@ -519,7 +528,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -503,7 +512,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.world.kill(this); this.world.kill(this);
if (!this.viewingCredits) { if (!this.viewingCredits) {
this.viewingCredits = true; this.viewingCredits = true;
@ -52,5 +52,5 @@ index 37c94f8..522c7f2 100644
} else { } else {
this.b((Statistic) AchievementList.D); this.b((Statistic) AchievementList.D);
-- --
2.10.0.windows.1 2.10.2

View File

@ -1,14 +1,14 @@
From 8bd58b6f24a637fc603a703b2d20cc4208c564ac Mon Sep 17 00:00:00 2001 From f20f61e14a0f0ce21e1f6a4dafe533125e40bf0d Mon Sep 17 00:00:00 2001
From: Iceee <andrew@opticgaming.tv> From: Iceee <andrew@opticgaming.tv>
Date: Wed, 2 Mar 2016 01:39:52 -0600 Date: Wed, 2 Mar 2016 01:39:52 -0600
Subject: [PATCH] Fix lag from explosions processing dead entities 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 diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
index acbf7a8..f4765d3 100644 index 904bee8..4e05bcd 100644
--- a/src/main/java/net/minecraft/server/Explosion.java --- a/src/main/java/net/minecraft/server/Explosion.java
+++ b/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java
@@ -103,7 +103,14 @@ public class Explosion { @@ -104,7 +104,14 @@ public class Explosion {
int i1 = MathHelper.floor(this.posY + (double) f3 + 1.0D); int i1 = MathHelper.floor(this.posY + (double) f3 + 1.0D);
int j1 = MathHelper.floor(this.posZ - (double) f3 - 1.0D); int j1 = MathHelper.floor(this.posZ - (double) f3 - 1.0D);
int k1 = MathHelper.floor(this.posZ + (double) f3 + 1.0D); int k1 = MathHelper.floor(this.posZ + (double) f3 + 1.0D);
@ -25,5 +25,5 @@ index acbf7a8..f4765d3 100644
for (int l1 = 0; l1 < list.size(); ++l1) { for (int l1 = 0; l1 < list.size(); ++l1) {
-- --
2.10.0.windows.1 2.10.2

View File

@ -1,28 +0,0 @@
From 06168b7a4b64d23e90503435a82258588871d586 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 00:55:24 -0600
Subject: [PATCH] Optimize draining
diff --git a/src/main/java/net/minecraft/server/BlockFlowing.java b/src/main/java/net/minecraft/server/BlockFlowing.java
index b00865e..72654df 100644
--- a/src/main/java/net/minecraft/server/BlockFlowing.java
+++ b/src/main/java/net/minecraft/server/BlockFlowing.java
@@ -88,7 +88,13 @@ public class BlockFlowing extends BlockFluids {
iblockdata = iblockdata.set(BlockFlowing.LEVEL, Integer.valueOf(i1));
world.setTypeAndData(blockposition, iblockdata, 2);
world.a(blockposition, (Block) this, j);
- world.applyPhysics(blockposition, this);
+ // Paper start - Optimize draining
+ world.e(blockposition.west(), this);
+ world.e(blockposition.east(), this);
+ world.e(blockposition.up(), this);
+ world.e(blockposition.north(), this);
+ world.e(blockposition.south(), this);
+ // Paper end
}
}
} else {
--
2.10.0.windows.1

View File

@ -1,14 +1,14 @@
From 614348db3e370b5ac7e74b6c805d2003280a27f8 Mon Sep 17 00:00:00 2001 From 19f118c6124003316d9f50b1a2f08e90d0b72a8f Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net> From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 02:17:54 -0600 Date: Wed, 2 Mar 2016 02:17:54 -0600
Subject: [PATCH] Generator Settings Subject: [PATCH] Generator Settings
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index e4e5487..7525bcb 100644 index 31503e7..bc50289 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -170,4 +170,28 @@ public class PaperWorldConfig { @@ -161,4 +161,28 @@ public class PaperWorldConfig {
disableEndCredits = getBoolean("game-mechanics.disable-end-credits", false); disableEndCredits = getBoolean("game-mechanics.disable-end-credits", false);
log("End credits disabled: " + disableEndCredits); log("End credits disabled: " + disableEndCredits);
} }
@ -38,10 +38,10 @@ index e4e5487..7525bcb 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java
index ab04f9c..bf4f06c 100644 index 62a338e..d3f1dce 100644
--- a/src/main/java/net/minecraft/server/BiomeBase.java --- a/src/main/java/net/minecraft/server/BiomeBase.java
+++ b/src/main/java/net/minecraft/server/BiomeBase.java +++ b/src/main/java/net/minecraft/server/BiomeBase.java
@@ -178,7 +178,7 @@ public abstract class BiomeBase { @@ -179,7 +179,7 @@ public abstract class BiomeBase {
BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(); BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition();
for (int l1 = 255; l1 >= 0; --l1) { for (int l1 = 255; l1 >= 0; --l1) {
@ -51,20 +51,20 @@ index ab04f9c..bf4f06c 100644
} else { } else {
IBlockData iblockdata2 = chunksnapshot.a(k1, l1, j1); IBlockData iblockdata2 = chunksnapshot.a(k1, l1, j1);
diff --git a/src/main/java/net/minecraft/server/BiomeMesa.java b/src/main/java/net/minecraft/server/BiomeMesa.java diff --git a/src/main/java/net/minecraft/server/BiomeMesa.java b/src/main/java/net/minecraft/server/BiomeMesa.java
index 8bcc0f3..62abbbd 100644 index 3d0a60b..1214193 100644
--- a/src/main/java/net/minecraft/server/BiomeMesa.java --- a/src/main/java/net/minecraft/server/BiomeMesa.java
+++ b/src/main/java/net/minecraft/server/BiomeMesa.java +++ b/src/main/java/net/minecraft/server/BiomeMesa.java
@@ -103,7 +103,7 @@ public class BiomeMesa extends BiomeBase { @@ -99,7 +99,7 @@ public class BiomeMesa extends BiomeBase {
chunksnapshot.a(l, i2, k, BiomeMesa.a); chunksnapshot.a(l, i2, k, BiomeMesa.a);
} }
- if (i2 <= random.nextInt(5)) { - if (i2 <= random.nextInt(5)) {
+ if (i2 <= (world.paperConfig.generateFlatBedrock ? 0 : random.nextInt(5))) { // Paper - Configurable flat bedrock + if (i2 <= (world.paperConfig.generateFlatBedrock ? 0 : random.nextInt(5))) { // Paper - Configurable flat bedrock
chunksnapshot.a(l, i2, k, BiomeMesa.c); chunksnapshot.a(l, i2, k, BiomeMesa.c);
} else if (l1 < 15) { } else if (l1 < 15 || this.J) {
IBlockData iblockdata2 = chunksnapshot.a(l, i2, k); IBlockData iblockdata2 = chunksnapshot.a(l, i2, k);
diff --git a/src/main/java/net/minecraft/server/ChunkProviderFlat.java b/src/main/java/net/minecraft/server/ChunkProviderFlat.java diff --git a/src/main/java/net/minecraft/server/ChunkProviderFlat.java b/src/main/java/net/minecraft/server/ChunkProviderFlat.java
index aa35a24..ea6a00e 100644 index d958a66..f8a9f49 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderFlat.java --- a/src/main/java/net/minecraft/server/ChunkProviderFlat.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderFlat.java +++ b/src/main/java/net/minecraft/server/ChunkProviderFlat.java
@@ -26,7 +26,7 @@ public class ChunkProviderFlat implements ChunkGenerator { @@ -26,7 +26,7 @@ public class ChunkProviderFlat implements ChunkGenerator {
@ -77,27 +77,27 @@ index aa35a24..ea6a00e 100644
if (!map1.containsKey("size")) { if (!map1.containsKey("size")) {
@@ -36,19 +36,19 @@ public class ChunkProviderFlat implements ChunkGenerator { @@ -36,19 +36,19 @@ public class ChunkProviderFlat implements ChunkGenerator {
this.e.add(new WorldGenVillage(map1)); this.e.put("Village", new WorldGenVillage(map1));
} }
- if (map.containsKey("biome_1")) { - if (map.containsKey("biome_1")) {
+ if (map.containsKey("biome_1") && world.paperConfig.generateTemple) { // Paper + if (map.containsKey("biome_1") && world.paperConfig.generateTemple) { // Paper
this.e.add(new WorldGenLargeFeature((Map) map.get("biome_1"))); this.e.put("Temple", new WorldGenLargeFeature((Map) map.get("biome_1")));
} }
- if (map.containsKey("mineshaft")) { - if (map.containsKey("mineshaft")) {
+ if (map.containsKey("mineshaft") && world.paperConfig.generateMineshaft) { // Paper + if (map.containsKey("mineshaft") && world.paperConfig.generateMineshaft) { // Paper
this.e.add(new WorldGenMineshaft((Map) map.get("mineshaft"))); this.e.put("Mineshaft", new WorldGenMineshaft((Map) map.get("mineshaft")));
} }
- if (map.containsKey("stronghold")) { - if (map.containsKey("stronghold")) {
+ if (map.containsKey("stronghold") && world.paperConfig.generateStronghold) { // Paper + if (map.containsKey("stronghold") && world.paperConfig.generateStronghold) { // Paper
this.e.add(new WorldGenStronghold((Map) map.get("stronghold"))); this.e.put("Stronghold", new WorldGenStronghold((Map) map.get("stronghold")));
} }
- if (map.containsKey("oceanmonument")) { - if (map.containsKey("oceanmonument")) {
+ if (map.containsKey("oceanmonument") && world.paperConfig.generateMonument) { // Paper + if (map.containsKey("oceanmonument") && world.paperConfig.generateMonument) { // Paper
this.e.add(new WorldGenMonument((Map) map.get("oceanmonument"))); this.e.put("Monument", new WorldGenMonument((Map) map.get("oceanmonument")));
} }
} }
@@ -61,7 +61,7 @@ public class ChunkProviderFlat implements ChunkGenerator { @@ -61,7 +61,7 @@ public class ChunkProviderFlat implements ChunkGenerator {
@ -110,20 +110,20 @@ index aa35a24..ea6a00e 100644
int k = 0; int k = 0;
boolean flag1 = true; boolean flag1 = true;
diff --git a/src/main/java/net/minecraft/server/ChunkProviderGenerate.java b/src/main/java/net/minecraft/server/ChunkProviderGenerate.java diff --git a/src/main/java/net/minecraft/server/ChunkProviderGenerate.java b/src/main/java/net/minecraft/server/ChunkProviderGenerate.java
index ac990af..0722956 100644 index a8fc857..0530501 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderGenerate.java --- a/src/main/java/net/minecraft/server/ChunkProviderGenerate.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderGenerate.java +++ b/src/main/java/net/minecraft/server/ChunkProviderGenerate.java
@@ -158,32 +158,32 @@ public class ChunkProviderGenerate implements ChunkGenerator { @@ -160,32 +160,32 @@ public class ChunkProviderGenerate implements ChunkGenerator {
this.a(i, j, chunksnapshot); this.a(i, j, chunksnapshot);
this.C = this.n.getWorldChunkManager().getBiomeBlock(this.C, i * 16, j * 16, 16, 16); this.D = this.n.getWorldChunkManager().getBiomeBlock(this.D, i * 16, j * 16, 16, 16);
this.a(i, j, chunksnapshot, this.C); this.a(i, j, chunksnapshot, this.D);
- if (this.s.r) { - if (this.s.r) {
+ if (this.s.r && this.n.paperConfig.generateCaves) { // Paper + if (this.s.r && this.n.paperConfig.generateCaves) { // Paper
this.v.a(this.n, i, j, chunksnapshot); this.v.a(this.n, i, j, chunksnapshot);
} }
- if (this.s.z) { - if (this.s.A) {
+ if (this.s.z && this.n.paperConfig.generateCanyon) { // Paper + if (this.s.A && this.n.paperConfig.generateCanyon) { // Paper
this.A.a(this.n, i, j, chunksnapshot); this.A.a(this.n, i, j, chunksnapshot);
} }
@ -152,8 +152,8 @@ index ac990af..0722956 100644
+ if (this.s.y && this.n.paperConfig.generateMonument) { // Paper + if (this.s.y && this.n.paperConfig.generateMonument) { // Paper
this.B.a(this.n, i, j, chunksnapshot); this.B.a(this.n, i, j, chunksnapshot);
} }
}
@@ -323,23 +323,23 @@ public class ChunkProviderGenerate implements ChunkGenerator { @@ -329,23 +329,23 @@ public class ChunkProviderGenerate implements ChunkGenerator {
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i, j); ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i, j);
if (this.o) { if (this.o) {
@ -181,8 +181,8 @@ index ac990af..0722956 100644
+ if (this.s.y && this.n.paperConfig.generateMonument) { // Paper + if (this.s.y && this.n.paperConfig.generateMonument) { // Paper
this.B.a(this.n, this.i, chunkcoordintpair); this.B.a(this.n, this.i, chunkcoordintpair);
} }
}
@@ -364,7 +364,7 @@ public class ChunkProviderGenerate implements ChunkGenerator { @@ -374,7 +374,7 @@ public class ChunkProviderGenerate implements ChunkGenerator {
} }
} }
@ -191,7 +191,7 @@ index ac990af..0722956 100644
for (k1 = 0; k1 < this.s.t; ++k1) { for (k1 = 0; k1 < this.s.t; ++k1) {
l1 = this.i.nextInt(16) + 8; l1 = this.i.nextInt(16) + 8;
i2 = this.i.nextInt(256); i2 = this.i.nextInt(256);
@@ -429,23 +429,23 @@ public class ChunkProviderGenerate implements ChunkGenerator { @@ -439,23 +439,23 @@ public class ChunkProviderGenerate implements ChunkGenerator {
public void recreateStructures(Chunk chunk, int i, int j) { public void recreateStructures(Chunk chunk, int i, int j) {
if (this.o) { if (this.o) {
@ -219,9 +219,9 @@ index ac990af..0722956 100644
+ if (this.s.y && this.n.paperConfig.generateMonument) { // Paper + if (this.s.y && this.n.paperConfig.generateMonument) { // Paper
this.B.a(this.n, i, j, (ChunkSnapshot) null); this.B.a(this.n, i, j, (ChunkSnapshot) null);
} }
}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderHell.java b/src/main/java/net/minecraft/server/ChunkProviderHell.java diff --git a/src/main/java/net/minecraft/server/ChunkProviderHell.java b/src/main/java/net/minecraft/server/ChunkProviderHell.java
index 6e6ecd8..e95175e 100644 index f9519d7..ca64ae0 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderHell.java --- a/src/main/java/net/minecraft/server/ChunkProviderHell.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderHell.java +++ b/src/main/java/net/minecraft/server/ChunkProviderHell.java
@@ -151,7 +151,10 @@ public class ChunkProviderHell implements ChunkGenerator { @@ -151,7 +151,10 @@ public class ChunkProviderHell implements ChunkGenerator {
@ -245,10 +245,10 @@ index 6e6ecd8..e95175e 100644
} }
} }
diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java
index c965af1..3ce4449 100644 index fb350c4..9c1605b 100644
--- a/src/main/java/net/minecraft/server/StructureGenerator.java --- a/src/main/java/net/minecraft/server/StructureGenerator.java
+++ b/src/main/java/net/minecraft/server/StructureGenerator.java +++ b/src/main/java/net/minecraft/server/StructureGenerator.java
@@ -95,6 +95,7 @@ public abstract class StructureGenerator extends WorldGenBase { @@ -96,6 +96,7 @@ public abstract class StructureGenerator extends WorldGenBase {
} }
public boolean b(BlockPosition blockposition) { public boolean b(BlockPosition blockposition) {
@ -256,14 +256,14 @@ index c965af1..3ce4449 100644
this.a(this.g); this.a(this.g);
return this.c(blockposition) != null; return this.c(blockposition) != null;
} }
@@ -122,6 +123,7 @@ public abstract class StructureGenerator extends WorldGenBase { @@ -124,6 +125,7 @@ public abstract class StructureGenerator extends WorldGenBase {
} }
public synchronized boolean b(World world, BlockPosition blockposition) { // CraftBukkit - synchronized public boolean a(World world, BlockPosition blockposition) {
+ if (this.g == null) return false; // Paper + if (this.g == null) return false; // Paper
this.a(world); this.a(world);
Iterator iterator = this.c.values().iterator(); ObjectIterator objectiterator = this.c.values().iterator();
-- --
2.9.3 2.10.2

View File

@ -1,4 +1,4 @@
From 515eed54a3ee0c2bcc5e03d27f522fc6c650f7e8 Mon Sep 17 00:00:00 2001 From 28e05719f8e0a3f399db8c129b780df4fc2984e7 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net> From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 11:59:48 -0600 Date: Wed, 2 Mar 2016 11:59:48 -0600
Subject: [PATCH] Optimize explosions Subject: [PATCH] Optimize explosions
@ -10,10 +10,10 @@ This patch adds a per-tick cache that is used for storing and retrieving
an entity's exposure during an explosion. an entity's exposure during an explosion.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 7525bcb..ca0ac9b 100644 index bc50289..356265e 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -194,4 +194,10 @@ public class PaperWorldConfig { @@ -185,4 +185,10 @@ public class PaperWorldConfig {
generateVillage = getBoolean("generator-settings.village", true); generateVillage = getBoolean("generator-settings.village", true);
generateFlatBedrock = getBoolean("generator-settings.flat-bedrock", false); generateFlatBedrock = getBoolean("generator-settings.flat-bedrock", false);
} }
@ -25,10 +25,10 @@ index 7525bcb..ca0ac9b 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
index f4765d3..caf29c7 100644 index 4e05bcd..49fc95e 100644
--- a/src/main/java/net/minecraft/server/Explosion.java --- a/src/main/java/net/minecraft/server/Explosion.java
+++ b/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java
@@ -129,7 +129,7 @@ public class Explosion { @@ -130,7 +130,7 @@ public class Explosion {
d8 /= d11; d8 /= d11;
d9 /= d11; d9 /= d11;
d10 /= d11; d10 /= d11;
@ -37,7 +37,7 @@ index f4765d3..caf29c7 100644
double d13 = (1.0D - d7) * d12; double d13 = (1.0D - d7) * d12;
// CraftBukkit start // CraftBukkit start
@@ -296,4 +296,85 @@ public class Explosion { @@ -298,4 +298,85 @@ public class Explosion {
public List<BlockPosition> getBlocks() { public List<BlockPosition> getBlocks() {
return this.blocks; return this.blocks;
} }
@ -124,10 +124,10 @@ index f4765d3..caf29c7 100644
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index f0dcb9f..885fc80 100644 index 2e72b8c..a872e76 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -870,6 +870,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -877,6 +877,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
worldserver.getTracker().updatePlayers(); worldserver.getTracker().updatePlayers();
this.methodProfiler.b(); this.methodProfiler.b();
this.methodProfiler.b(); this.methodProfiler.b();
@ -136,10 +136,10 @@ index f0dcb9f..885fc80 100644
// this.i[i][this.ticks % 100] = System.nanoTime() - j; // CraftBukkit // 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 diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 672167a..e8cfe2b 100644 index abe11ad..1248a9f 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java
@@ -16,6 +16,7 @@ import javax.annotation.Nullable; @@ -15,6 +15,7 @@ import javax.annotation.Nullable;
// CraftBukkit start // CraftBukkit start
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
@ -147,7 +147,7 @@ index 672167a..e8cfe2b 100644
import java.util.Map; import java.util.Map;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.block.BlockState; import org.bukkit.block.BlockState;
@@ -135,6 +136,7 @@ public abstract class World implements IBlockAccess { @@ -134,6 +135,7 @@ public abstract class World implements IBlockAccess {
private org.spigotmc.TickLimiter entityLimiter; private org.spigotmc.TickLimiter entityLimiter;
private org.spigotmc.TickLimiter tileLimiter; private org.spigotmc.TickLimiter tileLimiter;
private int tileTickPosition; private int tileTickPosition;
@ -156,5 +156,5 @@ index 672167a..e8cfe2b 100644
public CraftWorld getWorld() { public CraftWorld getWorld() {
return this.world; return this.world;
-- --
2.9.3 2.10.2

View File

@ -1,14 +1,14 @@
From dac6bac6e17684e8b5b4b0fa5e51fe76f0f5b92f Mon Sep 17 00:00:00 2001 From fb7f9985a6e06097d8a35efff62d104649223bdd Mon Sep 17 00:00:00 2001
From: Iceee <andrew@opticgaming.tv> From: Iceee <andrew@opticgaming.tv>
Date: Wed, 2 Mar 2016 12:03:23 -0600 Date: Wed, 2 Mar 2016 12:03:23 -0600
Subject: [PATCH] Stop updating flowing block if material has changed Subject: [PATCH] Stop updating flowing block if material has changed
diff --git a/src/main/java/net/minecraft/server/BlockFlowing.java b/src/main/java/net/minecraft/server/BlockFlowing.java diff --git a/src/main/java/net/minecraft/server/BlockFlowing.java b/src/main/java/net/minecraft/server/BlockFlowing.java
index 72654df..def694a 100644 index e9f73cd..83433e8 100644
--- a/src/main/java/net/minecraft/server/BlockFlowing.java --- a/src/main/java/net/minecraft/server/BlockFlowing.java
+++ b/src/main/java/net/minecraft/server/BlockFlowing.java +++ b/src/main/java/net/minecraft/server/BlockFlowing.java
@@ -101,6 +101,7 @@ public class BlockFlowing extends BlockFluids { @@ -95,6 +95,7 @@ public class BlockFlowing extends BlockFluids {
this.f(world, blockposition, iblockdata); this.f(world, blockposition, iblockdata);
} }
@ -17,5 +17,5 @@ index 72654df..def694a 100644
if (this.h(world, blockposition.down(), iblockdata2)) { if (this.h(world, blockposition.down(), iblockdata2)) {
-- --
2.10.0.windows.1 2.10.2

View File

@ -1,14 +1,14 @@
From 678a7464e92867731d118c7beea8f565e5ad6c69 Mon Sep 17 00:00:00 2001 From d51651300f04706da2dbeb17dbf7ddcb63bca70b Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net> From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 12:20:52 -0600 Date: Wed, 2 Mar 2016 12:20:52 -0600
Subject: [PATCH] Fast draining Subject: [PATCH] Fast draining
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index ca0ac9b..f8b90e3 100644 index 356265e..2ec5068 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -200,4 +200,11 @@ public class PaperWorldConfig { @@ -191,4 +191,11 @@ public class PaperWorldConfig {
optimizeExplosions = getBoolean("optimize-explosions", false); optimizeExplosions = getBoolean("optimize-explosions", false);
log("Optimize explosions: " + optimizeExplosions); log("Optimize explosions: " + optimizeExplosions);
} }
@ -21,7 +21,7 @@ index ca0ac9b..f8b90e3 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/BlockFlowing.java b/src/main/java/net/minecraft/server/BlockFlowing.java diff --git a/src/main/java/net/minecraft/server/BlockFlowing.java b/src/main/java/net/minecraft/server/BlockFlowing.java
index def694a..0b5bc19 100644 index 83433e8..2b21aec 100644
--- a/src/main/java/net/minecraft/server/BlockFlowing.java --- a/src/main/java/net/minecraft/server/BlockFlowing.java
+++ b/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 { @@ -74,7 +74,7 @@ public class BlockFlowing extends BlockFluids {
@ -42,7 +42,7 @@ index def694a..0b5bc19 100644
world.setAir(blockposition); world.setAir(blockposition);
} else { } else {
iblockdata = iblockdata.set(BlockFlowing.LEVEL, Integer.valueOf(i1)); iblockdata = iblockdata.set(BlockFlowing.LEVEL, Integer.valueOf(i1));
@@ -275,6 +275,7 @@ public class BlockFlowing extends BlockFluids { @@ -269,6 +269,7 @@ public class BlockFlowing extends BlockFluids {
} }
@ -50,7 +50,7 @@ index def694a..0b5bc19 100644
/** /**
* Paper - Get flow speed. Throttle if its water and flowing adjacent to lava * Paper - Get flow speed. Throttle if its water and flowing adjacent to lava
*/ */
@@ -288,4 +289,57 @@ public class BlockFlowing extends BlockFluids { @@ -282,4 +283,57 @@ public class BlockFlowing extends BlockFluids {
} }
return super.a(world); return super.a(world);
} }
@ -109,5 +109,5 @@ index def694a..0b5bc19 100644
+ // Paper end + // Paper end
} }
-- --
2.10.0.windows.1 2.10.2

View File

@ -1,14 +1,14 @@
From 2ce25ad8cfc444a0f5bf7e327e99ce0f05618bfe Mon Sep 17 00:00:00 2001 From 5f8b909ecc7f3564eaf77b9591ad02940d086f55 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net> From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 12:27:07 -0600 Date: Wed, 2 Mar 2016 12:27:07 -0600
Subject: [PATCH] Configurable lava flow speed Subject: [PATCH] Configurable lava flow speed
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index f8b90e3..004d4c0 100644 index 2ec5068..b5a106d 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -207,4 +207,11 @@ public class PaperWorldConfig { @@ -198,4 +198,11 @@ public class PaperWorldConfig {
fastDrainLava = getBoolean("fast-drain.lava", false); fastDrainLava = getBoolean("fast-drain.lava", false);
fastDrainWater = getBoolean("fast-drain.water", false); fastDrainWater = getBoolean("fast-drain.water", false);
} }
@ -21,10 +21,10 @@ index f8b90e3..004d4c0 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/BlockFlowing.java b/src/main/java/net/minecraft/server/BlockFlowing.java diff --git a/src/main/java/net/minecraft/server/BlockFlowing.java b/src/main/java/net/minecraft/server/BlockFlowing.java
index 0b5bc19..0336b9c 100644 index 2b21aec..3174326 100644
--- a/src/main/java/net/minecraft/server/BlockFlowing.java --- a/src/main/java/net/minecraft/server/BlockFlowing.java
+++ b/src/main/java/net/minecraft/server/BlockFlowing.java +++ b/src/main/java/net/minecraft/server/BlockFlowing.java
@@ -280,6 +280,9 @@ public class BlockFlowing extends BlockFluids { @@ -274,6 +274,9 @@ public class BlockFlowing extends BlockFluids {
* Paper - Get flow speed. Throttle if its water and flowing adjacent to lava * Paper - Get flow speed. Throttle if its water and flowing adjacent to lava
*/ */
public int getFlowSpeed(World world, BlockPosition blockposition) { public int getFlowSpeed(World world, BlockPosition blockposition) {
@ -35,5 +35,5 @@ index 0b5bc19..0336b9c 100644
world.getType(blockposition.north(1)).getBlock().material == Material.LAVA || world.getType(blockposition.north(1)).getBlock().material == Material.LAVA ||
world.getType(blockposition.south(1)).getBlock().material == Material.LAVA || world.getType(blockposition.south(1)).getBlock().material == Material.LAVA ||
-- --
2.10.0.windows.1 2.10.2

View File

@ -1,11 +1,11 @@
From 47bf3a4b1683d16807ed8e5af8ac10fae61beb57 Mon Sep 17 00:00:00 2001 From f6252bf66202b9b23dada7c611dd52c534537efb Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net> From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 14:35:27 -0600 Date: Wed, 2 Mar 2016 14:35:27 -0600
Subject: [PATCH] Add player view distance API 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 diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 522c7f2..4950db4 100644 index a400062..635aad7 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -56,6 +56,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -56,6 +56,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@ -25,7 +25,7 @@ index 522c7f2..4950db4 100644
// CraftBukkit start // CraftBukkit start
public String displayName; public String displayName;
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 797a84f..fcd0186 100644 index ce3390c..5db113c 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -47,7 +47,7 @@ public class PlayerChunkMap { @@ -47,7 +47,7 @@ public class PlayerChunkMap {
@ -194,7 +194,7 @@ index 797a84f..fcd0186 100644
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 3b0e58b..75c7ece 100644 index 0267e50..2a577d5 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1438,6 +1438,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1438,6 +1438,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -215,5 +215,5 @@ index 3b0e58b..75c7ece 100644
private final Player.Spigot spigot = new Player.Spigot() private final Player.Spigot spigot = new Player.Spigot()
{ {
-- --
2.10.0.windows.1 2.10.2

View File

@ -1,14 +1,14 @@
From b17bd30962bd0c8bf018b8e06301ccb0670b0dfa Mon Sep 17 00:00:00 2001 From ea9f6345fab166ab7678c9e5212b78f2fc18618d Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com> From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 14:48:03 -0600 Date: Wed, 2 Mar 2016 14:48:03 -0600
Subject: [PATCH] Disable explosion knockback Subject: [PATCH] Disable explosion knockback
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 004d4c0..87979dd 100644 index b5a106d..fcbf8a2 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -214,4 +214,9 @@ public class PaperWorldConfig { @@ -205,4 +205,9 @@ public class PaperWorldConfig {
lavaFlowSpeedNormal = getInt("lava-flow-speed.normal", 30); lavaFlowSpeedNormal = getInt("lava-flow-speed.normal", 30);
lavaFlowSpeedNether = getInt("lava-flow-speed.nether", 10); lavaFlowSpeedNether = getInt("lava-flow-speed.nether", 10);
} }
@ -19,10 +19,10 @@ index 004d4c0..87979dd 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 0a583bc..8aaab9e 100644 index 3267357..87a8a3e 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java --- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -872,12 +872,14 @@ public abstract class EntityLiving extends Entity { @@ -892,12 +892,14 @@ public abstract class EntityLiving extends Entity {
} }
} }
@ -37,21 +37,21 @@ index 0a583bc..8aaab9e 100644
this.world.broadcastEntityEffect(this, (byte) 2); this.world.broadcastEntityEffect(this, (byte) 2);
} }
@@ -901,6 +903,8 @@ public abstract class EntityLiving extends Entity { @@ -921,6 +923,8 @@ public abstract class EntityLiving extends Entity {
} }
} }
+ if (knockbackCancelled) this.world.broadcastEntityEffect(this, (byte) 2); // Paper - Disable explosion knockback + if (knockbackCancelled) this.world.broadcastEntityEffect(this, (byte) 2); // Paper - Disable explosion knockback
+ +
if (this.getHealth() <= 0.0F) { if (this.getHealth() <= 0.0F) {
SoundEffect soundeffect = this.bW(); if (!this.d(damagesource)) {
SoundEffect soundeffect = this.bX();
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
index caf29c7..6cdc3a3 100644 index 49fc95e..d7bc6a0 100644
--- a/src/main/java/net/minecraft/server/Explosion.java --- a/src/main/java/net/minecraft/server/Explosion.java
+++ b/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java
@@ -145,7 +145,7 @@ public class Explosion { @@ -146,7 +146,7 @@ public class Explosion {
double d14 = 1.0D; double d14 = d13;
if (entity instanceof EntityLiving) { if (entity instanceof EntityLiving) {
- d14 = EnchantmentProtection.a((EntityLiving) entity, d13); - d14 = EnchantmentProtection.a((EntityLiving) entity, d13);
@ -59,7 +59,7 @@ index caf29c7..6cdc3a3 100644
} }
entity.motX += d8 * d14; entity.motX += d8 * d14;
@@ -154,7 +154,7 @@ public class Explosion { @@ -155,7 +155,7 @@ public class Explosion {
if (entity instanceof EntityHuman) { if (entity instanceof EntityHuman) {
EntityHuman entityhuman = (EntityHuman) entity; EntityHuman entityhuman = (EntityHuman) entity;
@ -69,5 +69,5 @@ index caf29c7..6cdc3a3 100644
} }
} }
-- --
2.10.0.windows.1 2.10.2

View File

@ -1,14 +1,14 @@
From e6e691810c2713ab5be6850b337d662a33067458 Mon Sep 17 00:00:00 2001 From 6ca8b0e340f4ec99543cf6b3f700bb290f49d05c Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com> From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 14:52:43 -0600 Date: Wed, 2 Mar 2016 14:52:43 -0600
Subject: [PATCH] Disable thunder Subject: [PATCH] Disable thunder
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 87979dd..076fcbb 100644 index fcbf8a2..b52e5c5 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -219,4 +219,9 @@ public class PaperWorldConfig { @@ -210,4 +210,9 @@ public class PaperWorldConfig {
private void disableExplosionKnockback(){ private void disableExplosionKnockback(){
disableExplosionKnockback = getBoolean("disable-explosion-knockback", false); disableExplosionKnockback = getBoolean("disable-explosion-knockback", false);
} }
@ -19,10 +19,10 @@ index 87979dd..076fcbb 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 769d55b..5b9e2c1 100644 index 6afcf7c..ca74db6 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -424,7 +424,8 @@ public class WorldServer extends World implements IAsyncTaskHandler { @@ -427,7 +427,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
int l; int l;
BlockPosition blockposition; BlockPosition blockposition;
@ -33,5 +33,5 @@ index 769d55b..5b9e2c1 100644
l = this.l >> 2; l = this.l >> 2;
blockposition = this.a(new BlockPosition(j + (l & 15), 0, k + (l >> 8 & 15))); blockposition = this.a(new BlockPosition(j + (l & 15), 0, k + (l >> 8 & 15)));
-- --
2.10.1 2.10.2

View File

@ -1,14 +1,14 @@
From 19fc676defe5633053a5242c6c7ab76f759f6f3b Mon Sep 17 00:00:00 2001 From b8fb8297e40abe3791a77426cbdb2a690e39801b Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com> From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 14:57:24 -0600 Date: Wed, 2 Mar 2016 14:57:24 -0600
Subject: [PATCH] Disable ice and snow Subject: [PATCH] Disable ice and snow
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 076fcbb..9018df5 100644 index b52e5c5..a6afdd3 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -224,4 +224,9 @@ public class PaperWorldConfig { @@ -215,4 +215,9 @@ public class PaperWorldConfig {
private void disableThunder() { private void disableThunder() {
disableThunder = getBoolean("disable-thunder", false); disableThunder = getBoolean("disable-thunder", false);
} }
@ -19,10 +19,10 @@ index 076fcbb..9018df5 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 5b9e2c1..c2c0b5e 100644 index ca74db6..c84121c 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -448,7 +448,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { @@ -450,7 +450,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
} }
this.methodProfiler.c("iceandsnow"); this.methodProfiler.c("iceandsnow");
@ -32,5 +32,5 @@ index 5b9e2c1..c2c0b5e 100644
l = this.l >> 2; l = this.l >> 2;
blockposition = this.p(new BlockPosition(j + (l & 15), 0, k + (l >> 8 & 15))); blockposition = this.p(new BlockPosition(j + (l & 15), 0, k + (l >> 8 & 15)));
-- --
2.10.1 2.10.2

View File

@ -1,14 +1,14 @@
From 8515d9b08aa94851190b4db7d33556486959394f Mon Sep 17 00:00:00 2001 From d83f4a1d0a54a8c3e7c06b042e8bd56899562124 Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com> From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 15:03:53 -0600 Date: Wed, 2 Mar 2016 15:03:53 -0600
Subject: [PATCH] Configurable mob spawner tick rate Subject: [PATCH] Configurable mob spawner tick rate
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 9018df5..5a139e2 100644 index a6afdd3..57480f5 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -229,4 +229,9 @@ public class PaperWorldConfig { @@ -220,4 +220,9 @@ public class PaperWorldConfig {
private void disableIceAndSnow(){ private void disableIceAndSnow(){
disableIceAndSnow = getBoolean("disable-ice-and-snow", false); disableIceAndSnow = getBoolean("disable-ice-and-snow", false);
} }
@ -19,10 +19,10 @@ index 9018df5..5a139e2 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
index f040775..f17aea4 100644 index 5b41955..e523267 100644
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java --- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
@@ -18,6 +18,7 @@ public abstract class MobSpawnerAbstract { @@ -20,6 +20,7 @@ public abstract class MobSpawnerAbstract {
private int maxNearbyEntities = 6; private int maxNearbyEntities = 6;
private int requiredPlayerRange = 16; private int requiredPlayerRange = 16;
private int spawnRange = 4; private int spawnRange = 4;
@ -30,7 +30,7 @@ index f040775..f17aea4 100644
public MobSpawnerAbstract() {} public MobSpawnerAbstract() {}
@@ -36,6 +37,10 @@ public abstract class MobSpawnerAbstract { @@ -45,6 +46,10 @@ public abstract class MobSpawnerAbstract {
} }
public void c() { public void c() {
@ -41,7 +41,7 @@ index f040775..f17aea4 100644
if (!this.h()) { if (!this.h()) {
this.e = this.d; this.e = this.d;
} else { } else {
@@ -49,18 +54,18 @@ public abstract class MobSpawnerAbstract { @@ -58,18 +63,18 @@ public abstract class MobSpawnerAbstract {
this.a().addParticle(EnumParticle.SMOKE_NORMAL, d0, d1, d2, 0.0D, 0.0D, 0.0D, new int[0]); this.a().addParticle(EnumParticle.SMOKE_NORMAL, d0, d1, d2, 0.0D, 0.0D, 0.0D, new int[0]);
this.a().addParticle(EnumParticle.FLAME, d0, d1, d2, 0.0D, 0.0D, 0.0D, new int[0]); this.a().addParticle(EnumParticle.FLAME, d0, d1, d2, 0.0D, 0.0D, 0.0D, new int[0]);
if (this.spawnDelay > 0) { if (this.spawnDelay > 0) {
@ -64,5 +64,5 @@ index f040775..f17aea4 100644
} }
-- --
2.10.0.windows.1 2.10.2

View File

@ -1,11 +1,11 @@
From dd7e4e1f6e09b5ca1cd4fec140922e502897e0b5 Mon Sep 17 00:00:00 2001 From 609427e7e62088cfde2ec8cf8026a4a1faf6520d Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com> From: Jedediah Smith <jedediah@silencegreys.com>
Date: Wed, 2 Mar 2016 23:13:07 -0600 Date: Wed, 2 Mar 2016 23:13:07 -0600
Subject: [PATCH] Send absolute position the first time an entity is seen 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 diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
index af32116..413925e 100644 index b688e99..370cb9c 100644
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java --- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java +++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
@@ -41,7 +41,12 @@ public class EntityTrackerEntry { @@ -41,7 +41,12 @@ public class EntityTrackerEntry {
@ -76,5 +76,5 @@ index af32116..413925e 100644
entityplayer.playerConnection.sendPacket(packet); entityplayer.playerConnection.sendPacket(packet);
-- --
2.10.0.windows.1 2.10.2

View File

@ -1,11 +1,11 @@
From 22b4e5883590e2eaf7bc9b74535c121415f700e2 Mon Sep 17 00:00:00 2001 From 64d0dc145be3cbadee1c880bd14d7f12a416b163 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net> From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 23:30:53 -0600 Date: Wed, 2 Mar 2016 23:30:53 -0600
Subject: [PATCH] Add BeaconEffectEvent Subject: [PATCH] Add BeaconEffectEvent
diff --git a/src/main/java/net/minecraft/server/TileEntityBeacon.java b/src/main/java/net/minecraft/server/TileEntityBeacon.java diff --git a/src/main/java/net/minecraft/server/TileEntityBeacon.java b/src/main/java/net/minecraft/server/TileEntityBeacon.java
index 48f8793..9b0a1c4 100644 index 6f2fcd2..71ecc54 100644
--- a/src/main/java/net/minecraft/server/TileEntityBeacon.java --- a/src/main/java/net/minecraft/server/TileEntityBeacon.java
+++ b/src/main/java/net/minecraft/server/TileEntityBeacon.java +++ b/src/main/java/net/minecraft/server/TileEntityBeacon.java
@@ -16,6 +16,14 @@ import org.bukkit.entity.HumanEntity; @@ -16,6 +16,14 @@ import org.bukkit.entity.HumanEntity;
@ -23,7 +23,7 @@ index 48f8793..9b0a1c4 100644
public class TileEntityBeacon extends TileEntityContainer implements ITickable, IWorldInventory { 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}}; public static final MobEffectList[][] a = new MobEffectList[][] { { MobEffects.FASTER_MOVEMENT, MobEffects.FASTER_DIG}, { MobEffects.RESISTANCE, MobEffects.JUMP}, { MobEffects.INCREASE_DAMAGE}, { MobEffects.REGENERATION}};
@@ -114,14 +122,30 @@ public class TileEntityBeacon extends TileEntityContainer implements ITickable, @@ -116,14 +124,30 @@ public class TileEntityBeacon extends TileEntityContainer implements ITickable,
} }
private void applyEffect(List list, MobEffectList effects, int i, int b0) { private void applyEffect(List list, MobEffectList effects, int i, int b0) {
@ -55,19 +55,19 @@ index 48f8793..9b0a1c4 100644
} }
} }
} }
@@ -143,10 +167,10 @@ public class TileEntityBeacon extends TileEntityContainer implements ITickable, @@ -145,10 +169,10 @@ public class TileEntityBeacon extends TileEntityContainer implements ITickable,
int i = getLevel(); int i = getLevel();
List list = getHumansInRange(); List list = getHumansInRange();
- applyEffect(list, this.l, i, b0); - applyEffect(list, this.primaryEffect, i, b0);
+ applyEffect(list, this.l, i, b0, true); // Paper - BeaconEffectEvent + applyEffect(list, this.primaryEffect, i, b0, true); // Paper - BeaconEffectEvent
if (hasSecondaryEffect()) { if (hasSecondaryEffect()) {
- applyEffect(list, this.m, i, 0); - applyEffect(list, this.secondaryEffect, i, 0);
+ applyEffect(list, this.m, i, 0, false); // Paper - BeaconEffectEvent + applyEffect(list, this.secondaryEffect, i, 0, false); // Paper - BeaconEffectEvent
} }
} }
-- --
2.10.0.windows.1 2.10.2

View File

@ -1,14 +1,14 @@
From e808b68be47b3f1ce457b049edda796ef093895c Mon Sep 17 00:00:00 2001 From 0aaf35605b0cf4b1c71d3678308de74f272958f4 Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com> From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 23:34:44 -0600 Date: Wed, 2 Mar 2016 23:34:44 -0600
Subject: [PATCH] Configurable container update tick rate 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 diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 5a139e2..e182e48 100644 index 57480f5..b2b94b8 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -234,4 +234,9 @@ public class PaperWorldConfig { @@ -225,4 +225,9 @@ public class PaperWorldConfig {
private void mobSpawnerTickRate() { private void mobSpawnerTickRate() {
mobSpawnerTickRate = getInt("mob-spawner-tick-rate", 1); mobSpawnerTickRate = getInt("mob-spawner-tick-rate", 1);
} }
@ -19,7 +19,7 @@ index 5a139e2..e182e48 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 4950db4..e9baaa2 100644 index 635aad7..feb07a3 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -65,6 +65,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -65,6 +65,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@ -45,5 +45,5 @@ index 4950db4..e9baaa2 100644
this.closeInventory(); this.closeInventory();
this.activeContainer = this.defaultContainer; this.activeContainer = this.defaultContainer;
-- --
2.10.0.windows.1 2.10.2

View File

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

View File

@ -1,14 +1,14 @@
From 26bf3e047c9296e044b1168e569fe474ae7b4f72 Mon Sep 17 00:00:00 2001 From 1aeba86f37f8a1f7228c43dcd534c58e60e813cb Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Wed, 2 Mar 2016 23:45:17 -0600 Date: Wed, 2 Mar 2016 23:45:17 -0600
Subject: [PATCH] Disable spigot tick limiters 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 diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index e8cfe2b..5881ffb 100644 index 1248a9f..0b76735 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java
@@ -1422,10 +1422,10 @@ public abstract class World implements IBlockAccess { @@ -1444,10 +1444,10 @@ public abstract class World implements IBlockAccess {
// CraftBukkit start - Use field for loop variable // CraftBukkit start - Use field for loop variable
co.aikar.timings.TimingHistory.entityTicks += this.entityList.size(); // Paper co.aikar.timings.TimingHistory.entityTicks += this.entityList.size(); // Paper
int entitiesThisCycle = 0; int entitiesThisCycle = 0;
@ -23,7 +23,7 @@ index e8cfe2b..5881ffb 100644
tickPosition = (tickPosition < entityList.size()) ? tickPosition : 0; tickPosition = (tickPosition < entityList.size()) ? tickPosition : 0;
entity = (Entity) this.entityList.get(this.tickPosition); entity = (Entity) this.entityList.get(this.tickPosition);
// CraftBukkit end // CraftBukkit end
@@ -1491,9 +1491,7 @@ public abstract class World implements IBlockAccess { @@ -1513,9 +1513,7 @@ public abstract class World implements IBlockAccess {
// Spigot start // Spigot start
// Iterator iterator = this.tileEntityListTick.iterator(); // Iterator iterator = this.tileEntityListTick.iterator();
int tilesThisCycle = 0; int tilesThisCycle = 0;
@ -35,5 +35,5 @@ index e8cfe2b..5881ffb 100644
TileEntity tileentity = (TileEntity) this.tileEntityListTick.get(tileTickPosition); TileEntity tileentity = (TileEntity) this.tileEntityListTick.get(tileTickPosition);
// Spigot start // Spigot start
-- --
2.9.3 2.10.2

View File

@ -1,4 +1,4 @@
From 4e2d1396a2ffd7c6b4a51e4ab1fc1dfae123240f Mon Sep 17 00:00:00 2001 From 99225c7a0f8aae8fd2a853fe687d026b79b68b2a Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Wed, 2 Mar 2016 23:46:57 -0600 Date: Wed, 2 Mar 2016 23:46:57 -0600
Subject: [PATCH] Configurable Chunk IO Thread Base Count Subject: [PATCH] Configurable Chunk IO Thread Base Count
@ -39,5 +39,5 @@ index e4fd9bc..7b7a3d0 100644
private static final AsynchronousExecutor<QueuedChunk, Chunk, Runnable, RuntimeException> instance = new AsynchronousExecutor<QueuedChunk, Chunk, Runnable, RuntimeException>(new ChunkIOProvider(), BASE_THREADS); private static final AsynchronousExecutor<QueuedChunk, Chunk, Runnable, RuntimeException> instance = new AsynchronousExecutor<QueuedChunk, Chunk, Runnable, RuntimeException>(new ChunkIOProvider(), BASE_THREADS);
-- --
2.9.3 2.10.2

View File

@ -1,4 +1,4 @@
From 357d59ccd264fde423f99502fe7d00776940003f Mon Sep 17 00:00:00 2001 From 6baf075a94cb42c637f90740d46550f578b01a4a Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Wed, 2 Mar 2016 23:51:51 -0600 Date: Wed, 2 Mar 2016 23:51:51 -0600
Subject: [PATCH] Don't create Region File's when checking if chunk exists Subject: [PATCH] Don't create Region File's when checking if chunk exists
@ -7,7 +7,7 @@ Plugins like Dynmap can end up creating tons of emtpy Region Files
when using chunkExists. when using chunkExists.
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 17dd7bb..162cdd6 100644 index ca33899..8828275 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -39,7 +39,10 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -39,7 +39,10 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
@ -23,7 +23,7 @@ index 17dd7bb..162cdd6 100644
// CraftBukkit end // CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java
index 01b54e7..49fa5e4 100644 index f234298..933934f 100644
--- a/src/main/java/net/minecraft/server/RegionFileCache.java --- a/src/main/java/net/minecraft/server/RegionFileCache.java
+++ b/src/main/java/net/minecraft/server/RegionFileCache.java +++ b/src/main/java/net/minecraft/server/RegionFileCache.java
@@ -12,7 +12,13 @@ public class RegionFileCache { @@ -12,7 +12,13 @@ public class RegionFileCache {
@ -49,5 +49,5 @@ index 01b54e7..49fa5e4 100644
file1.mkdirs(); file1.mkdirs();
} }
-- --
2.9.3 2.10.2

View File

@ -1,4 +1,4 @@
From c40aebbb665afe2c501b86344eead5f784e19bfe Mon Sep 17 00:00:00 2001 From ec663ae69ae0571c06d0b99020c30b63b1455223 Mon Sep 17 00:00:00 2001
From: Steve Anton <anxuiz.nx@gmail.com> From: Steve Anton <anxuiz.nx@gmail.com>
Date: Thu, 3 Mar 2016 00:09:38 -0600 Date: Thu, 3 Mar 2016 00:09:38 -0600
Subject: [PATCH] Add PlayerInitialSpawnEvent Subject: [PATCH] Add PlayerInitialSpawnEvent
@ -6,7 +6,7 @@ Subject: [PATCH] Add PlayerInitialSpawnEvent
For modifying a player's initial spawn location as they join the server 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 diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 1b2cc01..28bcef8 100644 index e40268b..6e02044 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java --- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -101,6 +101,21 @@ public abstract class PlayerList { @@ -101,6 +101,21 @@ public abstract class PlayerList {
@ -32,5 +32,5 @@ index 1b2cc01..28bcef8 100644
entityplayer.playerInteractManager.a((WorldServer) entityplayer.world); entityplayer.playerInteractManager.a((WorldServer) entityplayer.world);
String s1 = "local"; String s1 = "local";
-- --
2.9.3 2.10.2

View File

@ -1,14 +1,14 @@
From 77d6b5b4dd0caf2cee41b75af28b077b23b06421 Mon Sep 17 00:00:00 2001 From e5e333c8fb98fadbd22786c882eb57256559d107 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 01:13:45 -0600 Date: Thu, 3 Mar 2016 01:13:45 -0600
Subject: [PATCH] Disable chest cat detection 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 diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index e182e48..c89ab0c 100644 index b2b94b8..97265b9 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -239,4 +239,9 @@ public class PaperWorldConfig { @@ -230,4 +230,9 @@ public class PaperWorldConfig {
private void containerUpdateTickRate() { private void containerUpdateTickRate() {
containerUpdateTickRate = getInt("container-update-tick-rate", 1); containerUpdateTickRate = getInt("container-update-tick-rate", 1);
} }
@ -19,7 +19,7 @@ index e182e48..c89ab0c 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java
index 21be295..a5f2fc0 100644 index d919d78..9d4c15f 100644
--- a/src/main/java/net/minecraft/server/BlockChest.java --- a/src/main/java/net/minecraft/server/BlockChest.java
+++ b/src/main/java/net/minecraft/server/BlockChest.java +++ b/src/main/java/net/minecraft/server/BlockChest.java
@@ -399,6 +399,11 @@ public class BlockChest extends BlockTileEntity { @@ -399,6 +399,11 @@ public class BlockChest extends BlockTileEntity {
@ -35,5 +35,5 @@ index 21be295..a5f2fc0 100644
EntityOcelot entityocelot; EntityOcelot entityocelot;
-- --
2.9.3 2.10.2

View File

@ -1,4 +1,4 @@
From 9da75049cbc87364d2765429847b1b7dd298abc9 Mon Sep 17 00:00:00 2001 From ae88d4726bd36fdf6f523d427a86890011d7e48f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 01:17:12 -0600 Date: Thu, 3 Mar 2016 01:17:12 -0600
Subject: [PATCH] Ensure commands are not ran async 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. 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 diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index d910c41..b2339e9 100644 index a5aa755..bc35bc5 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1272,6 +1272,29 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -1249,6 +1249,29 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
} }
if (!async && s.startsWith("/")) { if (!async && s.startsWith("/")) {
@ -48,7 +48,7 @@ index d910c41..b2339e9 100644
} else if (this.player.getChatFlags() == EntityHuman.EnumChatVisibility.SYSTEM) { } else if (this.player.getChatFlags() == EntityHuman.EnumChatVisibility.SYSTEM) {
// Do nothing, this is coming from a plugin // Do nothing, this is coming from a plugin
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index b5132cd..8e501b6 100644 index 494c61a..1d1d45b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -644,6 +644,29 @@ public final class CraftServer implements Server { @@ -644,6 +644,29 @@ public final class CraftServer implements Server {
@ -82,5 +82,5 @@ index b5132cd..8e501b6 100644
return true; return true;
} }
-- --
2.9.3 2.10.2

View File

@ -1,14 +1,14 @@
From d2f97a1dd265b66d592257dda42959bfccb6b9b4 Mon Sep 17 00:00:00 2001 From af6c0fa076b068aeee801ed17492e52d8dc528cf Mon Sep 17 00:00:00 2001
From: vemacs <d@nkmem.es> From: vemacs <d@nkmem.es>
Date: Thu, 3 Mar 2016 01:19:22 -0600 Date: Thu, 3 Mar 2016 01:19:22 -0600
Subject: [PATCH] All chunks are slime spawn chunks toggle 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 diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index c89ab0c..b302cb7 100644 index 97265b9..b2c45c8 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -244,4 +244,9 @@ public class PaperWorldConfig { @@ -235,4 +235,9 @@ public class PaperWorldConfig {
private void disableChestCatDetection() { private void disableChestCatDetection() {
disableChestCatDetection = getBoolean("game-mechanics.disable-chest-cat-detection", false); disableChestCatDetection = getBoolean("game-mechanics.disable-chest-cat-detection", false);
} }
@ -19,19 +19,19 @@ index c89ab0c..b302cb7 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java
index 334505f..616c2e8 100644 index 91ed719..950f07d 100644
--- a/src/main/java/net/minecraft/server/EntitySlime.java --- a/src/main/java/net/minecraft/server/EntitySlime.java
+++ b/src/main/java/net/minecraft/server/EntitySlime.java +++ b/src/main/java/net/minecraft/server/EntitySlime.java
@@ -249,7 +249,8 @@ public class EntitySlime extends EntityInsentient implements IMonster { @@ -252,7 +252,8 @@ public class EntitySlime extends EntityInsentient implements IMonster {
return super.cK(); return super.cM();
} }
- if (this.random.nextInt(10) == 0 && chunk.a(987234911L).nextInt(10) == 0 && this.locY < 40.0D) { - 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; // Paper + boolean isSlimeChunk = world.paperConfig.allChunksAreSlimeChunks || chunk.a(987234911L).nextInt(10) == 0; // Paper
+ if (this.random.nextInt(10) == 0 && isSlimeChunk && this.locY < 40.0D) { + if (this.random.nextInt(10) == 0 && isSlimeChunk && this.locY < 40.0D) {
return super.cK(); return super.cM();
} }
} }
-- --
2.9.3 2.10.2

View File

@ -1,4 +1,4 @@
From 19676f2dbe9c77faf790b31c6d488bc1e722c7e7 Mon Sep 17 00:00:00 2001 From 65c8b392d267976d2e7592777f581170493eb311 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 02:02:07 -0600 Date: Thu, 3 Mar 2016 02:02:07 -0600
Subject: [PATCH] Optimize Pathfinding Subject: [PATCH] Optimize Pathfinding
@ -7,7 +7,7 @@ Prevents pathfinding from spamming failures for things such as
arrow attacks. arrow attacks.
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
index c9cfe3f..b1a90c1 100644 index 4f28b88..43b2be5 100644
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java --- a/src/main/java/net/minecraft/server/NavigationAbstract.java
+++ b/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 { @@ -118,10 +118,26 @@ public abstract class NavigationAbstract {
@ -47,5 +47,5 @@ index c9cfe3f..b1a90c1 100644
} }
-- --
2.9.3 2.10.2

View File

@ -1,4 +1,4 @@
From e9d8ddfae7bf982be80e3feee2addc9f9adb71ea Mon Sep 17 00:00:00 2001 From 315637d90a175804eb0576eb881d06a37c81dacb Mon Sep 17 00:00:00 2001
From: CullanP <cullanpage@gmail.com> From: CullanP <cullanpage@gmail.com>
Date: Thu, 3 Mar 2016 02:13:38 -0600 Date: Thu, 3 Mar 2016 02:13:38 -0600
Subject: [PATCH] Avoid hopper searches if there are no items Subject: [PATCH] Avoid hopper searches if there are no items
@ -14,7 +14,7 @@ And since minecart hoppers are used _very_ rarely near we can avoid alot of sear
Combined, this adds up a lot. 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 diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 76130c9..989d510 100644 index b80f951..e1fc4ea 100644
--- a/src/main/java/net/minecraft/server/Chunk.java --- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -47,6 +47,13 @@ public class Chunk { @@ -47,6 +47,13 @@ public class Chunk {
@ -32,8 +32,8 @@ index 76130c9..989d510 100644
private int neighbors = 0x1 << 12; private int neighbors = 0x1 << 12;
public long chunkKey; public long chunkKey;
@@ -618,6 +625,13 @@ public class Chunk { @@ -618,6 +625,13 @@ public class Chunk {
entity.ad = k; entity.ac = k;
entity.ae = this.locZ; entity.ad = this.locZ;
this.entitySlices[k].add(entity); this.entitySlices[k].add(entity);
+ // Paper start - update count + // Paper start - update count
+ if (entity instanceof EntityItem) { + if (entity instanceof EntityItem) {
@ -95,5 +95,5 @@ index 76130c9..989d510 100644
while (iterator.hasNext()) { while (iterator.hasNext()) {
-- --
2.9.3 2.10.2

View File

@ -1,14 +1,14 @@
From 86a453e62a7489c982b7f0a6887c08e1a742417a Mon Sep 17 00:00:00 2001 From f5f6483d38eddfd97e1f94e93645e9e2c7eaf4ec Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc> From: kashike <kashike@vq.lc>
Date: Thu, 3 Mar 2016 02:15:57 -0600 Date: Thu, 3 Mar 2016 02:15:57 -0600
Subject: [PATCH] Expose server CommandMap Subject: [PATCH] Expose server CommandMap
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 8e501b6..c7cd3f7 100644 index 1d1d45b..8e00881 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1564,6 +1564,7 @@ public final class CraftServer implements Server { @@ -1559,6 +1559,7 @@ public final class CraftServer implements Server {
return helpMap; return helpMap;
} }
@ -17,5 +17,5 @@ index 8e501b6..c7cd3f7 100644
return commandMap; return commandMap;
} }
-- --
2.9.3 2.10.2

View File

@ -1,11 +1,11 @@
From ae8a24ed319533757b937d8608efe6cf9c1078c2 Mon Sep 17 00:00:00 2001 From 959189247bab3064b63c69bafee372afd8d85f30 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc> From: kashike <kashike@vq.lc>
Date: Thu, 3 Mar 2016 02:18:39 -0600 Date: Thu, 3 Mar 2016 02:18:39 -0600
Subject: [PATCH] Be a bit more informative in maxHealth exception 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index cffa778..a123d5e 100644 index 4641e3d..aaea4e8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/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 { @@ -92,7 +92,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@ -21,5 +21,5 @@ index cffa778..a123d5e 100644
if (health == 0) { if (health == 0) {
-- --
2.9.3 2.10.2

View File

@ -1,14 +1,14 @@
From 5423c45e57cb9c46f271c7e80074460ef3438bad Mon Sep 17 00:00:00 2001 From 6fd537ae42b766ced6401fcaabe0c0ac6a1133e8 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Thu, 3 Mar 2016 02:21:58 -0600 Date: Thu, 3 Mar 2016 02:21:58 -0600
Subject: [PATCH] Graduate bungeecord chat API from spigot subclasses Subject: [PATCH] Graduate bungeecord chat API from spigot subclasses
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index c7cd3f7..b44808f 100644 index 8e00881..7dfe30b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1317,6 +1317,18 @@ public final class CraftServer implements Server { @@ -1312,6 +1312,18 @@ public final class CraftServer implements Server {
return count; return count;
} }
@ -28,7 +28,7 @@ index c7cd3f7..b44808f 100644
@Deprecated @Deprecated
public OfflinePlayer getOfflinePlayer(String name) { 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index b05f111..70da218 100644 index 2a577d5..e0ec47f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/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 { @@ -156,6 +156,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -56,5 +56,5 @@ index b05f111..70da218 100644
public String getDisplayName() { public String getDisplayName() {
return getHandle().displayName; return getHandle().displayName;
-- --
2.9.3 2.10.2

View File

@ -1,4 +1,4 @@
From 34b016ca45ecc45c0754865c4ab1ba51d664b1fc Mon Sep 17 00:00:00 2001 From fcc4f1380b80f58a3e9e50569e048c994076ef03 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com> From: Techcable <Techcable@outlook.com>
Date: Thu, 3 Mar 2016 02:32:10 -0600 Date: Thu, 3 Mar 2016 02:32:10 -0600
Subject: [PATCH] Player Tab List and Title APIs Subject: [PATCH] Player Tab List and Title APIs
@ -40,10 +40,10 @@ index 5f5b382..242efb0 100644
public void a(PacketListenerPlayOut packetlistenerplayout) { 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 diff --git a/src/main/java/net/minecraft/server/PacketPlayOutTitle.java b/src/main/java/net/minecraft/server/PacketPlayOutTitle.java
index 31a2b21..8a0839c 100644 index 7bcafa8..4f6c1c2 100644
--- a/src/main/java/net/minecraft/server/PacketPlayOutTitle.java --- a/src/main/java/net/minecraft/server/PacketPlayOutTitle.java
+++ b/src/main/java/net/minecraft/server/PacketPlayOutTitle.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutTitle.java
@@ -11,6 +11,18 @@ public class PacketPlayOutTitle implements Packet<PacketListenerPlayOut> { @@ -12,6 +12,18 @@ public class PacketPlayOutTitle implements Packet<PacketListenerPlayOut> {
private int d; private int d;
private int e; private int e;
@ -62,10 +62,10 @@ index 31a2b21..8a0839c 100644
public PacketPlayOutTitle() {} public PacketPlayOutTitle() {}
public PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction packetplayouttitle_enumtitleaction, IChatBaseComponent ichatbasecomponent) { public PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction packetplayouttitle_enumtitleaction, IChatBaseComponent ichatbasecomponent) {
@@ -46,7 +58,13 @@ public class PacketPlayOutTitle implements Packet<PacketListenerPlayOut> { @@ -47,7 +59,13 @@ public class PacketPlayOutTitle implements Packet<PacketListenerPlayOut> {
public void b(PacketDataSerializer packetdataserializer) throws IOException { public void b(PacketDataSerializer packetdataserializer) throws IOException {
packetdataserializer.a((Enum) this.a); packetdataserializer.a((Enum) this.a);
if (this.a == PacketPlayOutTitle.EnumTitleAction.TITLE || this.a == PacketPlayOutTitle.EnumTitleAction.SUBTITLE) { if (this.a == PacketPlayOutTitle.EnumTitleAction.TITLE || this.a == PacketPlayOutTitle.EnumTitleAction.SUBTITLE || this.a == PacketPlayOutTitle.EnumTitleAction.ACTIONBAR) {
- packetdataserializer.a(this.b); - packetdataserializer.a(this.b);
+ // Paper start + // Paper start
+ if (this.components != null) { + if (this.components != null) {
@ -78,7 +78,7 @@ index 31a2b21..8a0839c 100644
if (this.a == PacketPlayOutTitle.EnumTitleAction.TIMES) { 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 70da218..eb72f46 100644 index e0ec47f..ab467d8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
@ -173,5 +173,5 @@ index 70da218..eb72f46 100644
@Override @Override
-- --
2.9.3 2.10.2

View File

@ -1,22 +1,22 @@
From 459767453fa25a930e55592350f58f60c44abe83 Mon Sep 17 00:00:00 2001 From a8af90e7ba90ef632cabe8587805da77dd2f62fd Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io> From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 02:33:53 -0600 Date: Thu, 3 Mar 2016 02:33:53 -0600
Subject: [PATCH] Ensure inv drag is in bounds 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 diff --git a/src/main/java/net/minecraft/server/Container.java b/src/main/java/net/minecraft/server/Container.java
index 02b1fb1..d39ffbe 100644 index 69f93d6..0ef93c6 100644
--- a/src/main/java/net/minecraft/server/Container.java --- a/src/main/java/net/minecraft/server/Container.java
+++ b/src/main/java/net/minecraft/server/Container.java +++ b/src/main/java/net/minecraft/server/Container.java
@@ -142,7 +142,7 @@ public abstract class Container { @@ -141,7 +141,7 @@ public abstract class Container {
this.d(); this.d();
} }
} else if (this.g == 1) { } else if (this.g == 1) {
- Slot slot = (Slot) this.c.get(i); - Slot slot = (Slot) this.c.get(i);
+ Slot slot = i < this.c.size() ? this.c.get(i) : null; // Paper - Ensure drag in bounds + Slot slot = i < this.c.size() ? this.c.get(i) : null; // Paper - Ensure drag in bounds
if (slot != null && a(slot, playerinventory.getCarried(), true) && slot.isAllowed(playerinventory.getCarried()) && playerinventory.getCarried().count > this.h.size() && this.b(slot)) { itemstack1 = playerinventory.getCarried();
this.h.add(slot); if (slot != null && a(slot, itemstack1, true) && slot.isAllowed(itemstack1) && (this.dragType == 2 || itemstack1.getCount() > this.h.size()) && this.b(slot)) {
-- --
2.9.3 2.10.2

View File

@ -1,33 +1,33 @@
From 9d5997b7ae5e8b6e070387f8d61a14affa7036e1 Mon Sep 17 00:00:00 2001 From 006b38a4cab58583721baed2bb4adff90d8ef3ec Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io> From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 02:39:54 -0600 Date: Thu, 3 Mar 2016 02:39:54 -0600
Subject: [PATCH] Change implementation of (tile)entity removal list 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 diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index bbbe951..4e333e0 100644 index 40398ca..10eb818 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -120,10 +120,10 @@ public abstract class Entity implements ICommandListener { @@ -120,10 +120,10 @@ public abstract class Entity implements ICommandListener {
private static final DataWatcherObject<Boolean> aB = 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); private static final DataWatcherObject<Boolean> aC = DataWatcher.a(Entity.class, DataWatcherRegistry.h);
private static final DataWatcherObject<Boolean> aD = DataWatcher.a(Entity.class, DataWatcherRegistry.h); private static final DataWatcherObject<Boolean> aD = DataWatcher.a(Entity.class, DataWatcherRegistry.h);
- public boolean ab; - public boolean aa;
- public int ab;
- public int ac; - public int ac;
- public int ad; - public int ad;
- public int ae; + public boolean aa; public boolean isAddedToChunk() { return aa; } // Paper - OBFHELPER
+ public boolean ab; public boolean isAddedToChunk() { return ab; } // Paper - OBFHELPER + public int ab; public int getChunkX() { return ab; } // Paper - OBFHELPER
+ public int ac; public int getChunkX() { return ac; } // Paper - OBFHELPER + public int ac; public int getChunkY() { return ac; } // Paper - OBFHELPER
+ public int ad; public int getChunkY() { return ad; } // Paper - OBFHELPER + public int ad; public int getChunkZ() { return ad; } // Paper - OBFHELPER
+ public int ae; public int getChunkZ() { return ae; } // Paper - OBFHELPER public boolean ah;
public boolean ai;
public boolean impulse; public boolean impulse;
public int portalCooldown; public int portalCooldown;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 5881ffb..a905ff9 100644 index 0b76735..c8a0ae6 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/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; @@ -30,6 +30,11 @@ import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
import org.bukkit.generator.ChunkGenerator; import org.bukkit.generator.ChunkGenerator;
// CraftBukkit end // CraftBukkit end
@ -39,7 +39,7 @@ index 5881ffb..a905ff9 100644
public abstract class World implements IBlockAccess { public abstract class World implements IBlockAccess {
private int a = 63; private int a = 63;
@@ -61,11 +66,11 @@ public abstract class World implements IBlockAccess { @@ -60,11 +65,11 @@ public abstract class World implements IBlockAccess {
} }
}; };
// Spigot end // Spigot end
@ -53,7 +53,7 @@ index 5881ffb..a905ff9 100644
public final List<EntityHuman> players = Lists.newArrayList(); public final List<EntityHuman> players = Lists.newArrayList();
public final List<Entity> j = Lists.newArrayList(); public final List<Entity> j = Lists.newArrayList();
protected final IntHashMap<Entity> entitiesById = new IntHashMap(); protected final IntHashMap<Entity> entitiesById = new IntHashMap();
@@ -1393,20 +1398,20 @@ public abstract class World implements IBlockAccess { @@ -1415,20 +1420,20 @@ public abstract class World implements IBlockAccess {
this.entityList.removeAll(this.f); this.entityList.removeAll(this.f);
int j; int j;
@ -64,10 +64,10 @@ index 5881ffb..a905ff9 100644
- for (i = 0; i < this.f.size(); ++i) { - for (i = 0; i < this.f.size(); ++i) {
- entity = (Entity) this.f.get(i); - entity = (Entity) this.f.get(i);
- int k = entity.ac; - int k = entity.ab;
- -
- j = entity.ae; - j = entity.ad;
- if (entity.ab && this.isChunkLoaded(k, j, true)) { - if (entity.aa && this.isChunkLoaded(k, j, true)) {
- this.getChunkAt(k, j).b(entity); - this.getChunkAt(k, j).b(entity);
+ if (e.isAddedToChunk() && this.isChunkLoaded(k, j, true)) { + if (e.isAddedToChunk() && this.isChunkLoaded(k, j, true)) {
+ this.getChunkAt(k, j).b(e); + this.getChunkAt(k, j).b(e);
@ -84,5 +84,5 @@ index 5881ffb..a905ff9 100644
this.f.clear(); this.f.clear();
this.l(); this.l();
-- --
2.9.3 2.10.2

View File

@ -1,14 +1,14 @@
From f906fb0fd68b9cb4683a22cc4361193ef1ad86fd Mon Sep 17 00:00:00 2001 From b20c7db532ff71e74c17adeb96fe16d1d83ef5f9 Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io> From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 02:46:17 -0600 Date: Thu, 3 Mar 2016 02:46:17 -0600
Subject: [PATCH] Add configurable portal search radius 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 diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index b302cb7..086cab0 100644 index b2c45c8..ed63854 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -249,4 +249,9 @@ public class PaperWorldConfig { @@ -240,4 +240,9 @@ public class PaperWorldConfig {
private void allChunksAreSlimeChunks() { private void allChunksAreSlimeChunks() {
allChunksAreSlimeChunks = getBoolean("all-chunks-are-slime-chunks", false); allChunksAreSlimeChunks = getBoolean("all-chunks-are-slime-chunks", false);
} }
@ -19,7 +19,7 @@ index b302cb7..086cab0 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/PortalTravelAgent.java b/src/main/java/net/minecraft/server/PortalTravelAgent.java diff --git a/src/main/java/net/minecraft/server/PortalTravelAgent.java b/src/main/java/net/minecraft/server/PortalTravelAgent.java
index f93a95f..ee1ac7d 100644 index 4455c2c..fbf7cff 100644
--- a/src/main/java/net/minecraft/server/PortalTravelAgent.java --- a/src/main/java/net/minecraft/server/PortalTravelAgent.java
+++ b/src/main/java/net/minecraft/server/PortalTravelAgent.java +++ b/src/main/java/net/minecraft/server/PortalTravelAgent.java
@@ -12,7 +12,7 @@ import org.bukkit.util.Vector; @@ -12,7 +12,7 @@ import org.bukkit.util.Vector;
@ -54,5 +54,5 @@ index 1d5dce1..7ca2617 100644
private boolean canCreatePortal = true; private boolean canCreatePortal = true;
-- --
2.9.3 2.10.2

View File

@ -1,14 +1,14 @@
From 2daf3853eab89e487449f8ac82368b77e85f13e5 Mon Sep 17 00:00:00 2001 From fe5e6dc3ec8448a373edc77718f64fc51654b95d Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io> From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 02:48:12 -0600 Date: Thu, 3 Mar 2016 02:48:12 -0600
Subject: [PATCH] Add velocity warnings 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index c8435a3..f2693eb 100644 index f8aabe2..6d39f6b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -205,6 +205,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -227,6 +227,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
} }
public void setVelocity(Vector vel) { public void setVelocity(Vector vel) {
@ -22,5 +22,5 @@ index c8435a3..f2693eb 100644
entity.motY = vel.getY(); entity.motY = vel.getY();
entity.motZ = vel.getZ(); entity.motZ = vel.getZ();
-- --
2.9.3 2.10.2

View File

@ -1,4 +1,4 @@
From df8665db4ceaae7b28139f87849d746e086a8ecc Mon Sep 17 00:00:00 2001 From f695528c786fa0ba4446cf32c56068fb474f9982 Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com> From: Sudzzy <originmc@outlook.com>
Date: Thu, 3 Mar 2016 02:50:31 -0600 Date: Thu, 3 Mar 2016 02:50:31 -0600
Subject: [PATCH] Fix inter-world teleportation glitches 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. 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 diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 086cab0..aabd629 100644 index ed63854..7005d69 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -254,4 +254,9 @@ public class PaperWorldConfig { @@ -245,4 +245,9 @@ public class PaperWorldConfig {
private void portalSearchRadius() { private void portalSearchRadius() {
portalSearchRadius = getInt("portal-search-radius", 128); portalSearchRadius = getInt("portal-search-radius", 128);
} }
@ -25,7 +25,7 @@ index 086cab0..aabd629 100644
+ } + }
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index eb72f46..98cbc02 100644 index ab467d8..1f5746a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -572,7 +572,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -572,7 +572,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -39,5 +39,5 @@ index eb72f46..98cbc02 100644
return true; return true;
} }
-- --
2.9.3 2.10.2

View File

@ -1,4 +1,4 @@
From ef48b1d4a4d529417c0f69b5558ad4132302dca2 Mon Sep 17 00:00:00 2001 From 191114236c8aa8add618bbfbc2546ce8fbee3399 Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io> From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 03:15:41 -0600 Date: Thu, 3 Mar 2016 03:15:41 -0600
Subject: [PATCH] Add exception reporting event Subject: [PATCH] Add exception reporting event
@ -50,7 +50,7 @@ index 0000000..9339718
+} +}
\ No newline at end of file \ 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 diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 989d510..9118e4d 100644 index e1fc4ea..8f1a68d 100644
--- a/src/main/java/net/minecraft/server/Chunk.java --- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
@ -89,10 +89,10 @@ index 989d510..9118e4d 100644
} }
} }
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 466cd49..cbc93a8 100644 index df3ce72..54ca738 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -11,6 +11,7 @@ import java.util.Iterator; @@ -12,6 +12,7 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@ -100,7 +100,7 @@ index 466cd49..cbc93a8 100644
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
@@ -188,7 +189,11 @@ public class ChunkProviderServer implements IChunkProvider { @@ -189,7 +190,11 @@ public class ChunkProviderServer implements IChunkProvider {
return chunk; return chunk;
} catch (Exception exception) { } catch (Exception exception) {
@ -113,7 +113,7 @@ index 466cd49..cbc93a8 100644
return null; return null;
} }
} }
@@ -197,7 +202,11 @@ public class ChunkProviderServer implements IChunkProvider { @@ -198,7 +203,11 @@ public class ChunkProviderServer implements IChunkProvider {
try (co.aikar.timings.Timing timed = world.timings.chunkSaveNop.startTiming()) { try (co.aikar.timings.Timing timed = world.timings.chunkSaveNop.startTiming()) {
this.chunkLoader.b(this.world, chunk); this.chunkLoader.b(this.world, chunk);
} catch (Exception exception) { } catch (Exception exception) {
@ -126,7 +126,7 @@ index 466cd49..cbc93a8 100644
} }
} }
@@ -207,9 +216,14 @@ public class ChunkProviderServer implements IChunkProvider { @@ -208,9 +217,14 @@ public class ChunkProviderServer implements IChunkProvider {
chunk.setLastSaved(this.world.getTime()); chunk.setLastSaved(this.world.getTime());
this.chunkLoader.a(this.world, chunk); this.chunkLoader.a(this.world, chunk);
} catch (IOException ioexception) { } catch (IOException ioexception) {
@ -144,7 +144,7 @@ index 466cd49..cbc93a8 100644
} }
diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
index d1c83d1..e21a8c4 100644 index 016c64e..2ff8a6d 100644
--- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java --- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
+++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java +++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
@ -198,7 +198,7 @@ index 936d6c6..50056f4 100644
} }
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
index 19fea50..c9bd856 100644 index b0279ac..be13c11 100644
--- a/src/main/java/net/minecraft/server/RegionFile.java --- a/src/main/java/net/minecraft/server/RegionFile.java
+++ b/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
@ -208,7 +208,7 @@ index 19fea50..c9bd856 100644
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import java.io.BufferedInputStream; import java.io.BufferedInputStream;
import java.io.BufferedOutputStream; import java.io.BufferedOutputStream;
@@ -81,6 +82,7 @@ public class RegionFile { @@ -82,6 +83,7 @@ public class RegionFile {
} }
} catch (IOException ioexception) { } catch (IOException ioexception) {
ioexception.printStackTrace(); ioexception.printStackTrace();
@ -216,8 +216,8 @@ index 19fea50..c9bd856 100644
} }
} }
@@ -245,6 +247,7 @@ public class RegionFile { @@ -248,6 +250,7 @@ public class RegionFile {
this.b(i, j, (int) (MinecraftServer.av() / 1000L)); this.b(i, j, (int) (MinecraftServer.aw() / 1000L));
} catch (IOException ioexception) { } catch (IOException ioexception) {
ioexception.printStackTrace(); ioexception.printStackTrace();
+ ServerInternalException.reportInternalException(ioexception); // Paper + ServerInternalException.reportInternalException(ioexception); // Paper
@ -225,7 +225,7 @@ index 19fea50..c9bd856 100644
} }
diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java
index 49fa5e4..2121e84 100644 index 933934f..19fbf9b 100644
--- a/src/main/java/net/minecraft/server/RegionFileCache.java --- a/src/main/java/net/minecraft/server/RegionFileCache.java
+++ b/src/main/java/net/minecraft/server/RegionFileCache.java +++ b/src/main/java/net/minecraft/server/RegionFileCache.java
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
@ -235,7 +235,7 @@ index 49fa5e4..2121e84 100644
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import java.io.DataInputStream; import java.io.DataInputStream;
import java.io.DataOutputStream; import java.io.DataOutputStream;
@@ -54,6 +55,7 @@ public class RegionFileCache { @@ -75,6 +76,7 @@ public class RegionFileCache {
} }
} catch (IOException ioexception) { } catch (IOException ioexception) {
ioexception.printStackTrace(); ioexception.printStackTrace();
@ -244,7 +244,7 @@ index 49fa5e4..2121e84 100644
} }
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index fb0830d..b3edaee 100644 index 171410e..8c35cab 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java --- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -7,6 +7,7 @@ import java.util.Random; @@ -7,6 +7,7 @@ import java.util.Random;
@ -255,7 +255,7 @@ index fb0830d..b3edaee 100644
import org.bukkit.craftbukkit.util.LongHash; import org.bukkit.craftbukkit.util.LongHash;
import org.bukkit.craftbukkit.util.LongHashSet; import org.bukkit.craftbukkit.util.LongHashSet;
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
@@ -179,6 +180,7 @@ public final class SpawnerCreature { @@ -177,6 +178,7 @@ public final class SpawnerCreature {
entityinsentient = (EntityInsentient) biomebase_biomemeta.b.getConstructor(new Class[] { World.class}).newInstance(new Object[] { worldserver}); entityinsentient = (EntityInsentient) biomebase_biomemeta.b.getConstructor(new Class[] { World.class}).newInstance(new Object[] { worldserver});
} catch (Exception exception) { } catch (Exception exception) {
exception.printStackTrace(); exception.printStackTrace();
@ -263,7 +263,7 @@ index fb0830d..b3edaee 100644
return j1; return j1;
} }
@@ -286,6 +288,7 @@ public final class SpawnerCreature { @@ -284,6 +286,7 @@ public final class SpawnerCreature {
entityinsentient = (EntityInsentient) biomebase_biomemeta.b.getConstructor(new Class[] { World.class}).newInstance(new Object[] { world}); entityinsentient = (EntityInsentient) biomebase_biomemeta.b.getConstructor(new Class[] { World.class}).newInstance(new Object[] { world});
} catch (Exception exception) { } catch (Exception exception) {
exception.printStackTrace(); exception.printStackTrace();
@ -272,7 +272,7 @@ index fb0830d..b3edaee 100644
} }
diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java
index e40fd93..d1458aa 100644 index 7af5b7d..2b49802 100644
--- a/src/main/java/net/minecraft/server/VillageSiege.java --- a/src/main/java/net/minecraft/server/VillageSiege.java
+++ b/src/main/java/net/minecraft/server/VillageSiege.java +++ b/src/main/java/net/minecraft/server/VillageSiege.java
@@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@ -283,8 +283,8 @@ index e40fd93..d1458aa 100644
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@@ -137,6 +139,7 @@ public class VillageSiege { @@ -136,6 +138,7 @@ public class VillageSiege {
entityzombie.setVillagerType(EnumZombieType.NORMAL); entityzombie.prepare(this.a.D(new BlockPosition(entityzombie)), (GroupDataEntity) null);
} catch (Exception exception) { } catch (Exception exception) {
exception.printStackTrace(); exception.printStackTrace();
+ ServerInternalException.reportInternalException(exception); // Paper + ServerInternalException.reportInternalException(exception); // Paper
@ -292,7 +292,7 @@ index e40fd93..d1458aa 100644
} }
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index a905ff9..48c0e14 100644 index c8a0ae6..8272d89 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java
@@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@ -303,7 +303,7 @@ index a905ff9..48c0e14 100644
import com.google.common.base.Function; import com.google.common.base.Function;
import com.google.common.base.Objects; import com.google.common.base.Objects;
import com.google.common.base.Predicate; import com.google.common.base.Predicate;
@@ -1453,8 +1455,10 @@ public abstract class World implements IBlockAccess { @@ -1475,8 +1477,10 @@ public abstract class World implements IBlockAccess {
} catch (Throwable throwable1) { } catch (Throwable throwable1) {
entity.tickTimer.stopTiming(); entity.tickTimer.stopTiming();
// Paper start - Prevent tile entity and entity crashes // Paper start - Prevent tile entity and entity crashes
@ -315,7 +315,7 @@ index a905ff9..48c0e14 100644
entity.dead = true; entity.dead = true;
continue; continue;
// Paper end // Paper end
@@ -1519,8 +1523,10 @@ public abstract class World implements IBlockAccess { @@ -1541,8 +1545,10 @@ public abstract class World implements IBlockAccess {
this.methodProfiler.b(); this.methodProfiler.b();
} catch (Throwable throwable2) { } catch (Throwable throwable2) {
// Paper start - Prevent tile entity and entity crashes // Paper start - Prevent tile entity and entity crashes
@ -372,5 +372,5 @@ index 198c37c..cdb836a 100644
// (async tasks must live with race-conditions if they attempt to cancel between these few lines of code) // (async tasks must live with race-conditions if they attempt to cancel between these few lines of code)
} }
-- --
2.9.3 2.10.2

View File

@ -1,4 +1,4 @@
From 58ca250bf5e3c9d321d550f6cbf729f20884459b Mon Sep 17 00:00:00 2001 From 54384862cb8a34c0892bf94a4e77660c531d6dc2 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc> From: kashike <kashike@vq.lc>
Date: Tue, 8 Mar 2016 18:28:43 -0800 Date: Tue, 8 Mar 2016 18:28:43 -0800
Subject: [PATCH] Don't nest if we don't need to when cerealising text Subject: [PATCH] Don't nest if we don't need to when cerealising text
@ -6,7 +6,7 @@ Subject: [PATCH] Don't nest if we don't need to when cerealising text
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutChat.java b/src/main/java/net/minecraft/server/PacketPlayOutChat.java diff --git a/src/main/java/net/minecraft/server/PacketPlayOutChat.java b/src/main/java/net/minecraft/server/PacketPlayOutChat.java
index c0e1199..bc6c054 100644 index 9fc83c4..b3b13ba 100644
--- a/src/main/java/net/minecraft/server/PacketPlayOutChat.java --- a/src/main/java/net/minecraft/server/PacketPlayOutChat.java
+++ b/src/main/java/net/minecraft/server/PacketPlayOutChat.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutChat.java
@@ -27,7 +27,14 @@ public class PacketPlayOutChat implements Packet<PacketListenerPlayOut> { @@ -27,7 +27,14 @@ public class PacketPlayOutChat implements Packet<PacketListenerPlayOut> {
@ -26,5 +26,5 @@ index c0e1199..bc6c054 100644
packetdataserializer.a(this.a); packetdataserializer.a(this.a);
} }
-- --
2.9.3 2.10.2

View File

@ -1,4 +1,4 @@
From 0e29b3cf3ecf0e998cd8d3c65b38e7ab881cce2a Mon Sep 17 00:00:00 2001 From 9d9f39fa78bdfe32ca8c538d05c840470d9ce5ae Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Tue, 8 Mar 2016 23:25:45 -0500 Date: Tue, 8 Mar 2016 23:25:45 -0500
Subject: [PATCH] Disable Scoreboards for non players by default 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. 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 diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index aabd629..047fa5f 100644 index 7005d69..b3678da 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -259,4 +259,9 @@ public class PaperWorldConfig { @@ -250,4 +250,9 @@ public class PaperWorldConfig {
private void disableTeleportationSuffocationCheck() { private void disableTeleportationSuffocationCheck() {
disableTeleportationSuffocationCheck = getBoolean("disable-teleportation-suffocation-check", false); disableTeleportationSuffocationCheck = getBoolean("disable-teleportation-suffocation-check", false);
} }
@ -25,10 +25,10 @@ index aabd629..047fa5f 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/CommandScoreboard.java b/src/main/java/net/minecraft/server/CommandScoreboard.java diff --git a/src/main/java/net/minecraft/server/CommandScoreboard.java b/src/main/java/net/minecraft/server/CommandScoreboard.java
index 5f579bc..8e5419d 100644 index 7af5d0a..ab9aa13 100644
--- a/src/main/java/net/minecraft/server/CommandScoreboard.java --- a/src/main/java/net/minecraft/server/CommandScoreboard.java
+++ b/src/main/java/net/minecraft/server/CommandScoreboard.java +++ b/src/main/java/net/minecraft/server/CommandScoreboard.java
@@ -491,6 +491,7 @@ public class CommandScoreboard extends CommandAbstract { @@ -492,6 +492,7 @@ public class CommandScoreboard extends CommandAbstract {
while (iterator.hasNext()) { while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next(); Entity entity = (Entity) iterator.next();
@ -37,10 +37,10 @@ index 5f579bc..8e5419d 100644
if (scoreboard.addPlayerToTeam(s2, s)) { 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 diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 4e333e0..5a4b5bc 100644 index 10eb818..875dcc8 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1895,6 +1895,7 @@ public abstract class Entity implements ICommandListener { @@ -1950,6 +1950,7 @@ public abstract class Entity implements ICommandListener {
@Nullable @Nullable
public ScoreboardTeamBase aQ() { public ScoreboardTeamBase aQ() {
@ -49,5 +49,5 @@ index 4e333e0..5a4b5bc 100644
} }
-- --
2.9.3 2.10.2

View File

@ -1,28 +1,28 @@
From a8dd83849bf5f467be31c0f8a1a49a002b0511e3 Mon Sep 17 00:00:00 2001 From 1f97c9460dc9da319a81d4abae1ed9e7b5773949 Mon Sep 17 00:00:00 2001
From: mrapple <tony@oc.tc> From: mrapple <tony@oc.tc>
Date: Sun, 25 Nov 2012 13:43:39 -0600 Date: Sun, 25 Nov 2012 13:43:39 -0600
Subject: [PATCH] Add methods for working with arrows stuck in living entities 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 diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 8aaab9e..89e6ef5 100644 index 87a8a3e..97eac7a 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java --- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -1307,10 +1307,12 @@ public abstract class EntityLiving extends Entity { @@ -1376,10 +1376,12 @@ public abstract class EntityLiving extends Entity {
return (float) this.getAttributeInstance(GenericAttributes.maxHealth).getValue(); return (float) this.getAttributeInstance(GenericAttributes.maxHealth).getValue();
} }
+ public final int getStuckArrows() { return this.cb(); } // Paper - OBFHELPER + public final int getStuckArrows() { return this.cc(); } // Paper - OBFHELPER
public final int cb() { public final int cc() {
return ((Integer) this.datawatcher.get(EntityLiving.h)).intValue(); return ((Integer) this.datawatcher.get(EntityLiving.bq)).intValue();
} }
+ public final void setStuckArrows(int arrows) { this.f(arrows); } // Paper - OBFHELPER + public final void setStuckArrows(int arrows) { this.f(arrows); } // Paper - OBFHELPER
public final void f(int i) { public final void f(int i) {
this.datawatcher.set(EntityLiving.h, Integer.valueOf(i)); this.datawatcher.set(EntityLiving.bq, 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index a123d5e..79d60a6 100644 index aaea4e8..2a77cd4 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -559,4 +559,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -559,4 +559,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@ -43,5 +43,5 @@ index a123d5e..79d60a6 100644
+ // Paper end + // Paper end
} }
-- --
2.9.3 2.10.2

View File

@ -1,14 +1,14 @@
From 7ad7edb70e7183fe0cf057c6ac2483f8a1d3e5fa Mon Sep 17 00:00:00 2001 From af11a3d45c195c64f6141c4bb0a496fc3c9c0cc5 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com> From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sat, 4 Apr 2015 23:17:52 -0400 Date: Sat, 4 Apr 2015 23:17:52 -0400
Subject: [PATCH] Complete resource pack API Subject: [PATCH] Complete resource pack API
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index b2339e9..5e9eca1 100644 index bc35bc5..724b9ad 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1033,7 +1033,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -1010,7 +1010,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
// CraftBukkit start // CraftBukkit start
public void a(PacketPlayInResourcePackStatus packetplayinresourcepackstatus) { public void a(PacketPlayInResourcePackStatus packetplayinresourcepackstatus) {
@ -24,7 +24,7 @@ index b2339e9..5e9eca1 100644
// CraftBukkit end // CraftBukkit end
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 98cbc02..515d0cd 100644 index 1f5746a..f6b791b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/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 { @@ -72,6 +72,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -72,5 +72,5 @@ index 98cbc02..515d0cd 100644
private final Player.Spigot spigot = new Player.Spigot() private final Player.Spigot spigot = new Player.Spigot()
{ {
-- --
2.9.3 2.10.2

View File

@ -1,4 +1,4 @@
From a4161bf83b718e0ae8b6bfe8689d36ad6faba27e Mon Sep 17 00:00:00 2001 From 88988bc9d659401547d7d18f14f246d99dafd814 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Fri, 4 Mar 2016 18:18:37 -0600 Date: Fri, 4 Mar 2016 18:18:37 -0600
Subject: [PATCH] Chunk save queue improvements Subject: [PATCH] Chunk save queue improvements
@ -41,7 +41,7 @@ index 259e3b7..c1a8243 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 162cdd6..e6e7626 100644 index 8828275..996e57f 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -12,14 +12,17 @@ import java.util.Map; @@ -12,14 +12,17 @@ import java.util.Map;
@ -77,7 +77,7 @@ index 162cdd6..e6e7626 100644
// Paper start - Don't create region files when checking that they exist // Paper start - Don't create region files when checking that they exist
final RegionFile region = RegionFileCache.a(this.d, i, j, false); final RegionFile region = RegionFileCache.a(this.d, i, j, false);
@@ -143,35 +146,32 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -151,35 +154,32 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
} }
protected void a(ChunkCoordIntPair chunkcoordintpair, NBTTagCompound nbttagcompound) { protected void a(ChunkCoordIntPair chunkcoordintpair, NBTTagCompound nbttagcompound) {
@ -122,7 +122,7 @@ index 162cdd6..e6e7626 100644
if (nbttagcompound != null) { if (nbttagcompound != null) {
try { try {
@@ -180,10 +180,11 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -188,10 +188,11 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
ChunkRegionLoader.a.error("Failed to save chunk", exception); ChunkRegionLoader.a.error("Failed to save chunk", exception);
} }
} }
@ -135,7 +135,7 @@ index 162cdd6..e6e7626 100644
} }
return flag; return flag;
@@ -554,4 +555,16 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -556,4 +557,16 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
return entity; return entity;
} }
} }
@ -177,5 +177,5 @@ index acfdd52..fdbaf5f 100644
if (this.b.isEmpty()) { if (this.b.isEmpty()) {
-- --
2.9.3 2.10.2

View File

@ -1,4 +1,4 @@
From 8ae77c2eeaf9244ce0aed3f8f49c24b5de26b3e3 Mon Sep 17 00:00:00 2001 From 5b78b518b5c1eb3c2699e94e7ea20c74cd91dc94 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Mon, 4 Mar 2013 23:46:10 -0500 Date: Mon, 4 Mar 2013 23:46:10 -0500
Subject: [PATCH] Chunk Save Reattempt 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. 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 diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index e6e7626..854fbd7 100644 index 996e57f..e2dd95b 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -174,11 +174,16 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -182,11 +182,16 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
NBTTagCompound nbttagcompound = chunk.compound; // Paper - Chunk queue improvements NBTTagCompound nbttagcompound = chunk.compound; // Paper - Chunk queue improvements
if (nbttagcompound != null) { if (nbttagcompound != null) {
@ -28,12 +28,12 @@ index e6e7626..854fbd7 100644
synchronized (lock) { if (this.b.get(chunkcoordintpair) == nbttagcompound) { this.b.remove(chunkcoordintpair); } }// Paper - This will not equal if a newer version is still pending synchronized (lock) { if (this.b.get(chunkcoordintpair) == nbttagcompound) { this.b.remove(chunkcoordintpair); } }// Paper - This will not equal if a newer version is still pending
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
index c9bd856..1fe5019 100644 index be13c11..9cfc46b 100644
--- a/src/main/java/net/minecraft/server/RegionFile.java --- a/src/main/java/net/minecraft/server/RegionFile.java
+++ b/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java
@@ -246,8 +246,7 @@ public class RegionFile { @@ -249,8 +249,7 @@ public class RegionFile {
this.b(i, j, (int) (MinecraftServer.av() / 1000L)); this.b(i, j, (int) (MinecraftServer.aw() / 1000L));
} catch (IOException ioexception) { } catch (IOException ioexception) {
- ioexception.printStackTrace(); - ioexception.printStackTrace();
- ServerInternalException.reportInternalException(ioexception); // Paper - ServerInternalException.reportInternalException(ioexception); // Paper
@ -42,5 +42,5 @@ index c9bd856..1fe5019 100644
} }
-- --
2.9.3 2.10.2

View File

@ -1,4 +1,4 @@
From 7e04eeade0c87fbd241b0945a72839c849630703 Mon Sep 17 00:00:00 2001 From 3adb29de0003d6c0b2d33e1712d60e68f7ee26fd Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Fri, 18 Mar 2016 13:17:38 -0400 Date: Fri, 18 Mar 2016 13:17:38 -0400
Subject: [PATCH] Default loading permissions.yml before plugins Subject: [PATCH] Default loading permissions.yml before plugins
@ -30,7 +30,7 @@ index c1a8243..88b6778 100644
+ } + }
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index b44808f..034f8ed 100644 index 7dfe30b..33b74cd 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -314,6 +314,7 @@ public final class CraftServer implements Server { @@ -314,6 +314,7 @@ public final class CraftServer implements Server {
@ -51,5 +51,5 @@ index b44808f..034f8ed 100644
CraftDefaultPermissions.registerCorePermissions(); CraftDefaultPermissions.registerCorePermissions();
helpMap.initializeCommands(); helpMap.initializeCommands();
-- --
2.9.3 2.10.2

View File

@ -1,4 +1,4 @@
From 6eaa65221aa494db575fcce21960db12252d7645 Mon Sep 17 00:00:00 2001 From 49e079c8034062024c738a0be37c44e24d9e45db Mon Sep 17 00:00:00 2001
From: William <admin@domnian.com> From: William <admin@domnian.com>
Date: Fri, 18 Mar 2016 03:30:17 -0400 Date: Fri, 18 Mar 2016 03:30:17 -0400
Subject: [PATCH] Allow Reloading of Custom Permissions Subject: [PATCH] Allow Reloading of Custom Permissions
@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Custom Permissions
https://github.com/PaperMC/Paper/issues/49 https://github.com/PaperMC/Paper/issues/49
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 034f8ed..1609b07 100644 index 33b74cd..bb2ab84 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1824,4 +1824,21 @@ public final class CraftServer implements Server { @@ -1819,4 +1819,21 @@ public final class CraftServer implements Server {
{ {
return spigot; return spigot;
} }
@ -32,5 +32,5 @@ index 034f8ed..1609b07 100644
+ // Paper end + // Paper end
} }
-- --
2.9.3 2.10.2

View File

@ -1,4 +1,4 @@
From 5b51439720d9c51313f081977743a6bd40300e5b Mon Sep 17 00:00:00 2001 From 0ab3c7ee6304633f72b94f77cd2e789da522555d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Fri, 18 Mar 2016 13:50:14 -0400 Date: Fri, 18 Mar 2016 13:50:14 -0400
Subject: [PATCH] Remove Metadata on reload Subject: [PATCH] Remove Metadata on reload
@ -7,7 +7,7 @@ Metadata is not meant to persist reload as things break badly with non primitive
This will remove metadata on reload so it does not crash everything if a plugin uses it. This will remove metadata on reload so it does not crash everything if a plugin uses it.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 1609b07..15bef42 100644 index bb2ab84..afefbc3 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -737,6 +737,14 @@ public final class CraftServer implements Server { @@ -737,6 +737,14 @@ public final class CraftServer implements Server {
@ -26,5 +26,5 @@ index 1609b07..15bef42 100644
commandMap.clearCommands(); commandMap.clearCommands();
resetRecipes(); resetRecipes();
-- --
2.9.3 2.10.2

View File

@ -1,4 +1,4 @@
From e0459fc81fe3aabc2592519f150c1ea2406332c0 Mon Sep 17 00:00:00 2001 From 39c79a5582c9b90c852330cb1dd78452af1096a9 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Fri, 18 Mar 2016 14:19:19 -0400 Date: Fri, 18 Mar 2016 14:19:19 -0400
Subject: [PATCH] Undead horse leashing 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. 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 diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 047fa5f..d136807 100644 index b3678da..029eb39 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -264,4 +264,9 @@ public class PaperWorldConfig { @@ -255,4 +255,9 @@ public class PaperWorldConfig {
private void nonPlayerEntitiesOnScoreboards() { private void nonPlayerEntitiesOnScoreboards() {
nonPlayerEntitiesOnScoreboards = getBoolean("allow-non-player-entities-on-scoreboards", false); nonPlayerEntitiesOnScoreboards = getBoolean("allow-non-player-entities-on-scoreboards", false);
} }
@ -19,18 +19,19 @@ index 047fa5f..d136807 100644
+ allowLeashingUndeadHorse = getBoolean("allow-leashing-undead-horse", false); + allowLeashingUndeadHorse = getBoolean("allow-leashing-undead-horse", false);
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/EntityHorse.java b/src/main/java/net/minecraft/server/EntityHorse.java diff --git a/src/main/java/net/minecraft/server/EntityHorseAbstract.java b/src/main/java/net/minecraft/server/EntityHorseAbstract.java
index ef429c1..38c4f61 100644 index da95a59..67f66fd 100644
--- a/src/main/java/net/minecraft/server/EntityHorse.java --- a/src/main/java/net/minecraft/server/EntityHorseAbstract.java
+++ b/src/main/java/net/minecraft/server/EntityHorse.java +++ b/src/main/java/net/minecraft/server/EntityHorseAbstract.java
@@ -169,6 +169,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener, IJu @@ -115,7 +115,7 @@ public abstract class EntityHorseAbstract extends EntityAnimal implements IInven
} }
public boolean a(EntityHuman entityhuman) { public boolean a(EntityHuman entityhuman) {
+ if (world.paperConfig.allowLeashingUndeadHorse) { return super.a(entityhuman); } // Paper - return super.a(entityhuman) && this.getMonsterType() != EnumMonsterType.UNDEAD;
return !this.getType().h() && super.a(entityhuman); + return world.paperConfig.allowLeashingUndeadHorse ? super.a(entityhuman) : super.a(entityhuman) && this.getMonsterType() != EnumMonsterType.UNDEAD; // Paper
} }
protected void q(float f) {
-- --
2.9.3 2.10.2

View File

@ -1,4 +1,4 @@
From f5db69e0fe71b3198265c7c204af1d2ab5515530 Mon Sep 17 00:00:00 2001 From f2abce9bbd30a3db0b929462ffc7cd2f6d44c80d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Fri, 18 Mar 2016 14:24:53 -0400 Date: Fri, 18 Mar 2016 14:24:53 -0400
Subject: [PATCH] Fix Furnace cook time bug Subject: [PATCH] Fix Furnace cook time bug
@ -9,18 +9,18 @@ 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. 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 diff --git a/src/main/java/net/minecraft/server/TileEntityFurnace.java b/src/main/java/net/minecraft/server/TileEntityFurnace.java
index fd6c246..db235c3 100644 index 93a610a..661716d 100644
--- a/src/main/java/net/minecraft/server/TileEntityFurnace.java --- a/src/main/java/net/minecraft/server/TileEntityFurnace.java
+++ b/src/main/java/net/minecraft/server/TileEntityFurnace.java +++ b/src/main/java/net/minecraft/server/TileEntityFurnace.java
@@ -172,7 +172,7 @@ public class TileEntityFurnace extends TileEntityContainer implements ITickable, @@ -165,7 +165,7 @@ public class TileEntityFurnace extends TileEntityContainer implements ITickable,
if (this.isBurning() && this.canBurn()) { if (this.isBurning() && this.canBurn()) {
this.cookTime += elapsedTicks; this.cookTime += elapsedTicks;
if (this.cookTime >= this.cookTimeTotal) { if (this.cookTime >= this.cookTimeTotal) {
- this.cookTime = 0; - this.cookTime = 0;
+ this.cookTime -= this.a(this.items[0]); // Paper + this.cookTime -= this.a(this.items.get(0)); // Paper
this.cookTimeTotal = this.a(this.items[0]); this.cookTimeTotal = this.a((ItemStack) this.items.get(0));
this.burn(); this.burn();
flag1 = true; flag1 = true;
-- --
2.9.3 2.10.2

View File

@ -1,4 +1,4 @@
From 961e07249cb9356c6cede5583713f8f10621daaa Mon Sep 17 00:00:00 2001 From 532022b01bd12414fe58ce5f93a919ac47a59667 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Thu, 28 May 2015 23:00:19 -0400 Date: Thu, 28 May 2015 23:00:19 -0400
Subject: [PATCH] Handle Item Meta Inconsistencies Subject: [PATCH] Handle Item Meta Inconsistencies
@ -18,7 +18,7 @@ For consistency, the old API methods now forward to use the
ItemMeta API equivalents, and should deprecate the old API's. ItemMeta API equivalents, and should deprecate the old API's.
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index 6f5dcbd..88f0292 100644 index 866e54d..46baf00 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -4,6 +4,7 @@ import static org.bukkit.craftbukkit.inventory.CraftMetaItem.ENCHANTMENTS; @@ -4,6 +4,7 @@ import static org.bukkit.craftbukkit.inventory.CraftMetaItem.ENCHANTMENTS;
@ -29,7 +29,7 @@ index 6f5dcbd..88f0292 100644
import java.util.Map; import java.util.Map;
import net.minecraft.server.EnchantmentManager; import net.minecraft.server.EnchantmentManager;
@@ -184,28 +185,11 @@ public final class CraftItemStack extends ItemStack { @@ -180,28 +181,11 @@ public final class CraftItemStack extends ItemStack {
public void addUnsafeEnchantment(Enchantment ench, int level) { public void addUnsafeEnchantment(Enchantment ench, int level) {
Validate.notNull(ench, "Cannot add null enchantment"); Validate.notNull(ench, "Cannot add null enchantment");
@ -63,7 +63,7 @@ index 6f5dcbd..88f0292 100644
} }
static boolean makeTag(net.minecraft.server.ItemStack item) { static boolean makeTag(net.minecraft.server.ItemStack item) {
@@ -222,66 +206,34 @@ public final class CraftItemStack extends ItemStack { @@ -218,66 +202,34 @@ public final class CraftItemStack extends ItemStack {
@Override @Override
public boolean containsEnchantment(Enchantment ench) { public boolean containsEnchantment(Enchantment ench) {
@ -293,5 +293,5 @@ index 22cc267..94f2ba0 100644
private final Spigot spigot = new Spigot() private final Spigot spigot = new Spigot()
{ {
-- --
2.9.3 2.10.2

View File

@ -1,4 +1,4 @@
From 3c0e3ac83a120387568efcb5acc1572e0ed94a31 Mon Sep 17 00:00:00 2001 From 745dd2c92706e3e70d9e4eeed52e40e0670b473f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Fri, 18 Mar 2016 15:12:22 -0400 Date: Fri, 18 Mar 2016 15:12:22 -0400
Subject: [PATCH] Configurable Non Player Arrow Despawn Rate 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. 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 diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index d136807..b701e5e 100644 index 029eb39..9cce672 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -269,4 +269,13 @@ public class PaperWorldConfig { @@ -260,4 +260,13 @@ public class PaperWorldConfig {
private void allowLeashingUndeadHorse() { private void allowLeashingUndeadHorse() {
allowLeashingUndeadHorse = getBoolean("allow-leashing-undead-horse", false); allowLeashingUndeadHorse = getBoolean("allow-leashing-undead-horse", false);
} }
@ -24,18 +24,18 @@ index d136807..b701e5e 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
index ccbf47e..b7ac5f7 100644 index 287566c..bb332b3 100644
--- a/src/main/java/net/minecraft/server/EntityArrow.java --- a/src/main/java/net/minecraft/server/EntityArrow.java
+++ b/src/main/java/net/minecraft/server/EntityArrow.java +++ b/src/main/java/net/minecraft/server/EntityArrow.java
@@ -149,7 +149,7 @@ public abstract class EntityArrow extends Entity implements IProjectile { @@ -157,7 +157,7 @@ public abstract class EntityArrow extends Entity implements IProjectile {
this.ay = 0;
if (block == this.aw && i == this.ax) { } else {
++this.ay; ++this.ax;
- if (this.ay >= world.spigotConfig.arrowDespawnRate) { // Spigot - First int after shooter - if (this.ax >= world.spigotConfig.arrowDespawnRate) { // Spigot - First int after shooter
+ if (this.ay >= (fromPlayer != PickupStatus.DISALLOWED ? world.spigotConfig.arrowDespawnRate : world.paperConfig.nonPlayerArrowDespawnRate)) { // Spigot - First int after shooter // Paper + if (this.ax >= (fromPlayer != PickupStatus.DISALLOWED ? world.spigotConfig.arrowDespawnRate : world.paperConfig.nonPlayerArrowDespawnRate)) { // Spigot - First int after shooter // Paper
this.die(); this.die();
} }
} else { }
-- --
2.9.3 2.10.2

View File

@ -1,4 +1,4 @@
From f5f8a0ee2325f6721a28b61713cdf4f41f8a330b Mon Sep 17 00:00:00 2001 From 890c1645cb95a10a2b3269ed85cb463e3e424b05 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Fri, 18 Mar 2016 20:16:03 -0400 Date: Fri, 18 Mar 2016 20:16:03 -0400
Subject: [PATCH] Add World Util Methods Subject: [PATCH] Add World Util Methods
@ -6,10 +6,10 @@ Subject: [PATCH] Add World Util Methods
Methods that can be used for other patches to help improve logic. 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 diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 48c0e14..a3bce9a 100644 index 8272d89..223250f 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/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 { @@ -152,6 +152,12 @@ public abstract class World implements IBlockAccess {
return (CraftServer) Bukkit.getServer(); return (CraftServer) Bukkit.getServer();
} }
@ -22,7 +22,7 @@ index 48c0e14..a3bce9a 100644
public Chunk getChunkIfLoaded(int x, int z) { public Chunk getChunkIfLoaded(int x, int z) {
return ((ChunkProviderServer) this.chunkProvider).getChunkIfLoaded(x, z); return ((ChunkProviderServer) this.chunkProvider).getChunkIfLoaded(x, z);
} }
@@ -630,6 +636,41 @@ public abstract class World implements IBlockAccess { @@ -682,6 +688,41 @@ public abstract class World implements IBlockAccess {
} }
} }
@ -64,8 +64,8 @@ index 48c0e14..a3bce9a 100644
public int getLightLevel(BlockPosition blockposition) { public int getLightLevel(BlockPosition blockposition) {
return this.c(blockposition, true); return this.c(blockposition, true);
} }
@@ -749,6 +790,27 @@ public abstract class World implements IBlockAccess { @@ -801,6 +842,27 @@ public abstract class World implements IBlockAccess {
return this.worldProvider.n()[this.getLightLevel(blockposition)]; return this.worldProvider.o()[this.getLightLevel(blockposition)];
} }
+ // Paper start - reduces need to do isLoaded before getType + // Paper start - reduces need to do isLoaded before getType
@ -93,5 +93,5 @@ index 48c0e14..a3bce9a 100644
// CraftBukkit start - tree generation // CraftBukkit start - tree generation
if (captureTreeGeneration) { if (captureTreeGeneration) {
-- --
2.9.3 2.10.2

View File

@ -1,4 +1,4 @@
From 03a68a2ee994ecbd5a66f33c93ec973405b13d33 Mon Sep 17 00:00:00 2001 From b2ed021cc393f2627735d38208e87c972ff5dcd1 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Fri, 18 Mar 2016 21:22:56 -0400 Date: Fri, 18 Mar 2016 21:22:56 -0400
Subject: [PATCH] Optimized Light Level Comparisons Subject: [PATCH] Optimized Light Level Comparisons
@ -8,23 +8,23 @@ 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. 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 diff --git a/src/main/java/net/minecraft/server/BlockCrops.java b/src/main/java/net/minecraft/server/BlockCrops.java
index 7d44039..4ede2cf 100644 index e9c5d14..9015aff 100644
--- a/src/main/java/net/minecraft/server/BlockCrops.java --- a/src/main/java/net/minecraft/server/BlockCrops.java
+++ b/src/main/java/net/minecraft/server/BlockCrops.java +++ b/src/main/java/net/minecraft/server/BlockCrops.java
@@ -49,7 +49,7 @@ public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement @@ -48,7 +48,7 @@ public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement
public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) { public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
super.b(world, blockposition, iblockdata, random); super.b(world, blockposition, iblockdata, random);
- if (world.getLightLevel(blockposition.up()) >= 9) { - if (world.getLightLevel(blockposition.up()) >= 9) {
+ if (world.isLightLevel(blockposition.up(), 9)) { // Paper + if (world.isLightLevel(blockposition.up(), 9)) { // Paper
int i = this.x(iblockdata); int i = this.z(iblockdata);
if (i < this.g()) { if (i < this.g()) {
diff --git a/src/main/java/net/minecraft/server/BlockGrass.java b/src/main/java/net/minecraft/server/BlockGrass.java diff --git a/src/main/java/net/minecraft/server/BlockGrass.java b/src/main/java/net/minecraft/server/BlockGrass.java
index 11d9d3f..21e722d 100644 index fb1bf80..8b43e60 100644
--- a/src/main/java/net/minecraft/server/BlockGrass.java --- a/src/main/java/net/minecraft/server/BlockGrass.java
+++ b/src/main/java/net/minecraft/server/BlockGrass.java +++ b/src/main/java/net/minecraft/server/BlockGrass.java
@@ -30,7 +30,8 @@ public class BlockGrass extends Block implements IBlockFragilePlantElement { @@ -29,7 +29,8 @@ public class BlockGrass extends Block implements IBlockFragilePlantElement {
public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) { public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
if (!world.isClientSide) { if (!world.isClientSide) {
@ -34,7 +34,7 @@ index 11d9d3f..21e722d 100644
// CraftBukkit start // CraftBukkit start
// world.setTypeUpdate(blockposition, Blocks.DIRT.getBlockData()); // world.setTypeUpdate(blockposition, Blocks.DIRT.getBlockData());
org.bukkit.World bworld = world.getWorld(); org.bukkit.World bworld = world.getWorld();
@@ -45,18 +46,25 @@ public class BlockGrass extends Block implements IBlockFragilePlantElement { @@ -44,18 +45,25 @@ public class BlockGrass extends Block implements IBlockFragilePlantElement {
} }
// CraftBukkit end // CraftBukkit end
} else { } else {
@ -65,7 +65,7 @@ index 11d9d3f..21e722d 100644
// world.setTypeUpdate(blockposition1, Blocks.GRASS.getBlockData()); // world.setTypeUpdate(blockposition1, Blocks.GRASS.getBlockData());
org.bukkit.World bworld = world.getWorld(); org.bukkit.World bworld = world.getWorld();
diff --git a/src/main/java/net/minecraft/server/BlockSapling.java b/src/main/java/net/minecraft/server/BlockSapling.java diff --git a/src/main/java/net/minecraft/server/BlockSapling.java b/src/main/java/net/minecraft/server/BlockSapling.java
index 4118fd1..97784f1 100644 index f463b71..89458cd 100644
--- a/src/main/java/net/minecraft/server/BlockSapling.java --- a/src/main/java/net/minecraft/server/BlockSapling.java
+++ b/src/main/java/net/minecraft/server/BlockSapling.java +++ b/src/main/java/net/minecraft/server/BlockSapling.java
@@ -34,7 +34,7 @@ public class BlockSapling extends BlockPlant implements IBlockFragilePlantElemen @@ -34,7 +34,7 @@ public class BlockSapling extends BlockPlant implements IBlockFragilePlantElemen
@ -78,7 +78,7 @@ index 4118fd1..97784f1 100644
world.captureTreeGeneration = true; world.captureTreeGeneration = true;
// CraftBukkit end // CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/BlockStem.java b/src/main/java/net/minecraft/server/BlockStem.java diff --git a/src/main/java/net/minecraft/server/BlockStem.java b/src/main/java/net/minecraft/server/BlockStem.java
index d378ea4..1185100 100644 index c74b628..bb96e16 100644
--- a/src/main/java/net/minecraft/server/BlockStem.java --- a/src/main/java/net/minecraft/server/BlockStem.java
+++ b/src/main/java/net/minecraft/server/BlockStem.java +++ b/src/main/java/net/minecraft/server/BlockStem.java
@@ -48,7 +48,7 @@ public class BlockStem extends BlockPlant implements IBlockFragilePlantElement { @@ -48,7 +48,7 @@ public class BlockStem extends BlockPlant implements IBlockFragilePlantElement {
@ -91,11 +91,11 @@ index d378ea4..1185100 100644
if (random.nextInt((int) ((100.0F / (this == Blocks.PUMPKIN_STEM ? world.spigotConfig.pumpkinModifier : world.spigotConfig.melonModifier)) * (25.0F / f)) + 1) == 0) { // Spigot 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 diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java
index 1aef91a..733fec7 100644 index b5c5437..a281957 100644
--- a/src/main/java/net/minecraft/server/EntityMonster.java --- a/src/main/java/net/minecraft/server/EntityMonster.java
+++ b/src/main/java/net/minecraft/server/EntityMonster.java +++ b/src/main/java/net/minecraft/server/EntityMonster.java
@@ -122,17 +122,17 @@ public abstract class EntityMonster extends EntityCreature implements IMonster { @@ -118,17 +118,17 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
if (this.world.b(EnumSkyBlock.SKY, blockposition) > this.random.nextInt(32)) { if (this.world.getBrightness(EnumSkyBlock.SKY, blockposition) > this.random.nextInt(32)) {
return false; return false;
} else { } else {
- int i = this.world.getLightLevel(blockposition); - int i = this.world.getLightLevel(blockposition);
@ -118,18 +118,18 @@ index 1aef91a..733fec7 100644
} }
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
index 6981185..798b9c5 100644 index 897882c..970fabf 100644
--- a/src/main/java/net/minecraft/server/EntityZombie.java --- a/src/main/java/net/minecraft/server/EntityZombie.java
+++ b/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java
@@ -195,7 +195,7 @@ public class EntityZombie extends EntityMonster { @@ -178,7 +178,7 @@ public class EntityZombie extends EntityMonster {
int j1 = j + MathHelper.nextInt(this.random, 7, 40) * MathHelper.nextInt(this.random, -1, 1); 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); int k1 = k + MathHelper.nextInt(this.random, 7, 40) * MathHelper.nextInt(this.random, -1, 1);
- if (this.world.getType(new BlockPosition(i1, j1 - 1, k1)).q() && this.world.getLightLevel(new BlockPosition(i1, j1, k1)) < 10) { - if (this.world.getType(new BlockPosition(i1, j1 - 1, k1)).r() && this.world.getLightLevel(new BlockPosition(i1, j1, k1)) < 10) {
+ if (this.world.getType(new BlockPosition(i1, j1 - 1, k1)).q() && !this.world.isLightLevel(new BlockPosition(i1, j1, k1), 10)) { // Paper + if (this.world.getType(new BlockPosition(i1, j1 - 1, k1)).r() && !this.world.isLightLevel(new BlockPosition(i1, j1, k1), 10)) { // Paper
entityzombie.setPosition((double) i1, (double) j1, (double) k1); entityzombie.setPosition((double) i1, (double) j1, (double) k1);
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 if (!this.world.isPlayerNearby((double) i1, (double) j1, (double) k1, 7.0D) && this.world.a(entityzombie.getBoundingBox(), (Entity) entityzombie) && this.world.getCubes(entityzombie, entityzombie.getBoundingBox()).isEmpty() && !this.world.containsLiquid(entityzombie.getBoundingBox())) {
this.world.addEntity(entityzombie, CreatureSpawnEvent.SpawnReason.REINFORCEMENTS); // CraftBukkit this.world.addEntity(entityzombie, CreatureSpawnEvent.SpawnReason.REINFORCEMENTS); // CraftBukkit
-- --
2.9.3 2.10.2

View File

@ -1,4 +1,4 @@
From 4cfd8b339c0ad3fe7a143d724408b5a60049ece6 Mon Sep 17 00:00:00 2001 From aa4add7106265a50c2756dcd8dbc5b6912ffc116 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sat, 19 Mar 2016 15:16:54 -0400 Date: Sat, 19 Mar 2016 15:16:54 -0400
Subject: [PATCH] Pass world to Village creation Subject: [PATCH] Pass world to Village creation
@ -6,10 +6,10 @@ Subject: [PATCH] Pass world to Village creation
fixes NPE bug #95 fixes NPE bug #95
diff --git a/src/main/java/net/minecraft/server/PersistentVillage.java b/src/main/java/net/minecraft/server/PersistentVillage.java diff --git a/src/main/java/net/minecraft/server/PersistentVillage.java b/src/main/java/net/minecraft/server/PersistentVillage.java
index 75dc674..2a9444e 100644 index a5b79ec..01f7cee 100644
--- a/src/main/java/net/minecraft/server/PersistentVillage.java --- a/src/main/java/net/minecraft/server/PersistentVillage.java
+++ b/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 { @@ -238,7 +238,7 @@ public class PersistentVillage extends PersistentBase {
for (int i = 0; i < nbttaglist.size(); ++i) { for (int i = 0; i < nbttaglist.size(); ++i) {
NBTTagCompound nbttagcompound1 = nbttaglist.get(i); NBTTagCompound nbttagcompound1 = nbttaglist.get(i);
@ -19,10 +19,10 @@ index 75dc674..2a9444e 100644
village.a(nbttagcompound1); village.a(nbttagcompound1);
this.villages.add(village); this.villages.add(village);
diff --git a/src/main/java/net/minecraft/server/Village.java b/src/main/java/net/minecraft/server/Village.java diff --git a/src/main/java/net/minecraft/server/Village.java b/src/main/java/net/minecraft/server/Village.java
index 1fa7cb2..fc3a6ab 100644 index 2ab381d..817c836 100644
--- a/src/main/java/net/minecraft/server/Village.java --- a/src/main/java/net/minecraft/server/Village.java
+++ b/src/main/java/net/minecraft/server/Village.java +++ b/src/main/java/net/minecraft/server/Village.java
@@ -22,7 +22,7 @@ public class Village { @@ -24,7 +24,7 @@ public class Village {
private final List<Village.Aggressor> k; private final List<Village.Aggressor> k;
private int l; private int l;
@ -30,7 +30,7 @@ index 1fa7cb2..fc3a6ab 100644
+ private Village() { // Paper - Nothing should call this - world needs to be set. + private Village() { // Paper - Nothing should call this - world needs to be set.
this.c = BlockPosition.ZERO; this.c = BlockPosition.ZERO;
this.d = BlockPosition.ZERO; this.d = BlockPosition.ZERO;
this.j = new TreeMap(); this.j = Maps.newHashMap();
-- --
2.9.3 2.10.2

View File

@ -1,17 +1,18 @@
From 2ffc2bf91c0006ca2a77e6be164fbeabac4721c6 Mon Sep 17 00:00:00 2001 From 7ef822ff5f73057b05d269b49105de4dfa773c86 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com> From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sun, 21 Jun 2015 15:07:20 -0400 Date: Sun, 21 Jun 2015 15:07:20 -0400
Subject: [PATCH] Custom replacement for eaten items 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 diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 89e6ef5..ad320c2 100644 index 97eac7a..4cc89ec 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java --- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2261,12 +2261,24 @@ public abstract class EntityLiving extends Entity { @@ -2337,7 +2337,20 @@ public abstract class EntityLiving extends Entity {
ItemStack itemstack = (craftItem.equals(event.getItem())) ? this.bo.a(this.world, this) : CraftItemStack.asNMSCopy(event.getItem()).a(world, this); ItemStack itemstack = (craftItem.equals(event.getItem())) ? this.activeItem.a(this.world, this) : CraftItemStack.asNMSCopy(event.getItem()).a(world, this);
this.a(this.cz(), itemstack);
// CraftBukkit end // CraftBukkit end
+
+ // Paper start - save the default replacement item and change it if necessary + // Paper start - save the default replacement item and change it if necessary
+ final ItemStack defaultReplacement = itemstack; + final ItemStack defaultReplacement = itemstack;
+ if (event.getReplacement() != null) { + if (event.getReplacement() != null) {
@ -19,12 +20,7 @@ index 89e6ef5..ad320c2 100644
+ } + }
+ // Paper end + // Paper end
+ +
if (itemstack != null && itemstack.count == 0) { this.cF();
itemstack = null;
}
this.a(this.cy(), itemstack);
this.cE();
+ +
+ // Paper start - if the replacement is anything but the default, update the client inventory + // 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)) { + if (this instanceof EntityPlayer && !com.google.common.base.Objects.equal(defaultReplacement, itemstack)) {
@ -34,5 +30,5 @@ index 89e6ef5..ad320c2 100644
} }
-- --
2.9.3 2.10.2

View File

@ -1,4 +1,4 @@
From db119eed768bbd60a42cca20e2a1fefaada86f81 Mon Sep 17 00:00:00 2001 From 6c7006b595785c4b8b0435af3bd7055fcf019576 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com> From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sun, 19 Jul 2015 16:51:38 -0400 Date: Sun, 19 Jul 2015 16:51:38 -0400
Subject: [PATCH] Set health before death event Subject: [PATCH] Set health before death event
@ -19,7 +19,7 @@ index 88b6778..a60aee6 100644
+ } + }
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 79d60a6..b807a3f 100644 index 2a77cd4..0493c1b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -98,11 +98,20 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -98,11 +98,20 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@ -45,5 +45,5 @@ index 79d60a6..b807a3f 100644
public double getMaxHealth() { public double getMaxHealth() {
-- --
2.9.3 2.10.2

View File

@ -1,14 +1,14 @@
From c17c58addb833ca7e763f73bc5d7395e5c262d2f Mon Sep 17 00:00:00 2001 From fa2c964cc53890971c8a61c71ba4056ed2cd289c Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sun, 27 Sep 2015 01:18:02 -0400 Date: Sun, 27 Sep 2015 01:18:02 -0400
Subject: [PATCH] handle NaN health/absorb values and repair bad data 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 diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index ad320c2..d66e766 100644 index 4cc89ec..7a96447 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java --- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -468,7 +468,13 @@ public abstract class EntityLiving extends Entity { @@ -481,7 +481,13 @@ public abstract class EntityLiving extends Entity {
} }
public void a(NBTTagCompound nbttagcompound) { public void a(NBTTagCompound nbttagcompound) {
@ -23,7 +23,7 @@ index ad320c2..d66e766 100644
if (nbttagcompound.hasKeyOfType("Attributes", 9) && this.world != null && !this.world.isClientSide) { if (nbttagcompound.hasKeyOfType("Attributes", 9) && this.world != null && !this.world.isClientSide) {
GenericAttributes.a(this.getAttributeMap(), nbttagcompound.getList("Attributes", 10)); GenericAttributes.a(this.getAttributeMap(), nbttagcompound.getList("Attributes", 10));
} }
@@ -759,6 +765,10 @@ public abstract class EntityLiving extends Entity { @@ -779,6 +785,10 @@ public abstract class EntityLiving extends Entity {
} }
public void setHealth(float f) { public void setHealth(float f) {
@ -34,7 +34,7 @@ index ad320c2..d66e766 100644
// CraftBukkit start - Handle scaled health // CraftBukkit start - Handle scaled health
if (this instanceof EntityPlayer) { if (this instanceof EntityPlayer) {
org.bukkit.craftbukkit.entity.CraftPlayer player = ((EntityPlayer) this).getBukkitEntity(); org.bukkit.craftbukkit.entity.CraftPlayer player = ((EntityPlayer) this).getBukkitEntity();
@@ -2131,7 +2141,7 @@ public abstract class EntityLiving extends Entity { @@ -2207,7 +2217,7 @@ public abstract class EntityLiving extends Entity {
} }
public void setAbsorptionHearts(float f) { public void setAbsorptionHearts(float f) {
@ -44,7 +44,7 @@ index ad320c2..d66e766 100644
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 515d0cd..d3f4c3f 100644 index f6b791b..486ba73 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1390,6 +1390,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1390,6 +1390,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -56,5 +56,5 @@ index 515d0cd..d3f4c3f 100644
} }
-- --
2.9.3 2.10.2

View File

@ -1,11 +1,11 @@
From 4a6f7ee5118173e4e65e1a1fcdb72ed0e2c1b194 Mon Sep 17 00:00:00 2001 From 38d42c576439460df8d23272448c30342f72997a Mon Sep 17 00:00:00 2001
From: Daniel Ennis <dennis@icontact.com> From: Daniel Ennis <dennis@icontact.com>
Date: Sun, 20 Mar 2016 15:22:42 -0400 Date: Sun, 20 Mar 2016 15:22:42 -0400
Subject: [PATCH] Catch Async PlayerChunkMap operations 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 diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index fcd0186..c9d48ac 100644 index 5db113c..8f6f3a0 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -461,10 +461,12 @@ public class PlayerChunkMap { @@ -461,10 +461,12 @@ public class PlayerChunkMap {
@ -22,5 +22,5 @@ index fcd0186..c9d48ac 100644
long i = d(chunkcoordintpair.x, chunkcoordintpair.z); long i = d(chunkcoordintpair.x, chunkcoordintpair.z);
-- --
2.9.3 2.10.2

View File

@ -1,4 +1,4 @@
From d73723c415b3c4477fa8935e54b57317a120ed57 Mon Sep 17 00:00:00 2001 From 43d4f73060153a5e017db795dfdcee5e42f00bab Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 21 Mar 2016 00:19:18 -0500 Date: Mon, 21 Mar 2016 00:19:18 -0500
Subject: [PATCH] Support offline mode in whitelist command as well Subject: [PATCH] Support offline mode in whitelist command as well
@ -89,5 +89,5 @@ index c74d1d2..0f4237d 100644
+ // Paper end + // Paper end
} }
-- --
2.9.3 2.10.2

View File

@ -1,11 +1,11 @@
From d6d1dc0c6e2103a1569f0347817be71316faaf8c Mon Sep 17 00:00:00 2001 From 8f8a9fef6f5ec940e55af3abcfa351eb280db615 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Tue, 5 Jan 2016 21:48:24 -0500 Date: Tue, 5 Jan 2016 21:48:24 -0500
Subject: [PATCH] Fix SkullCache case bug 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 diff --git a/src/main/java/net/minecraft/server/TileEntitySkull.java b/src/main/java/net/minecraft/server/TileEntitySkull.java
index 654b51d..a8adbcb 100644 index 91ca4a2..edd6fb6 100644
--- a/src/main/java/net/minecraft/server/TileEntitySkull.java --- a/src/main/java/net/minecraft/server/TileEntitySkull.java
+++ b/src/main/java/net/minecraft/server/TileEntitySkull.java +++ b/src/main/java/net/minecraft/server/TileEntitySkull.java
@@ -191,7 +191,7 @@ public class TileEntitySkull extends TileEntity implements ITickable { @@ -191,7 +191,7 @@ public class TileEntitySkull extends TileEntity implements ITickable {
@ -18,5 +18,5 @@ index 654b51d..a8adbcb 100644
callback.apply(profile); callback.apply(profile);
} else { } else {
-- --
2.9.3 2.10.2

View File

@ -1,4 +1,4 @@
From 989047b666c933de551cbd7e336883f1b5948923 Mon Sep 17 00:00:00 2001 From 428f579770b2aa61fc95a85a5561c3a9ac77d184 Mon Sep 17 00:00:00 2001
From: Gabscap <sonstige.netzwerke@gabriel-paradzik.de> From: Gabscap <sonstige.netzwerke@gabriel-paradzik.de>
Date: Sat, 19 Mar 2016 22:25:11 +0100 Date: Sat, 19 Mar 2016 22:25:11 +0100
Subject: [PATCH] Waving banner workaround Subject: [PATCH] Waving banner workaround
@ -34,5 +34,5 @@ index c5c3f40..6413f76 100644
public void a(PacketDataSerializer packetdataserializer) throws IOException { public void a(PacketDataSerializer packetdataserializer) throws IOException {
-- --
2.9.3 2.10.2

View File

@ -1,4 +1,4 @@
From a70bb2d71e2a418d5029efa646fc13012f61a01f Mon Sep 17 00:00:00 2001 From 554f7c012ab7cb05dbaf758c2a6b70b15dc2f634 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Tue, 22 Mar 2016 00:33:47 -0400 Date: Tue, 22 Mar 2016 00:33:47 -0400
Subject: [PATCH] Use a Shared Random for Entities 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. 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 diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 5a4b5bc..91eb036 100644 index 875dcc8..ae16663 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -45,6 +45,7 @@ public abstract class Entity implements ICommandListener { @@ -45,6 +45,7 @@ public abstract class Entity implements ICommandListener {
@ -17,15 +17,15 @@ index 5a4b5bc..91eb036 100644
static boolean isLevelAtLeast(NBTTagCompound tag, int level) { static boolean isLevelAtLeast(NBTTagCompound tag, int level) {
return tag.hasKey("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level; return tag.hasKey("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level;
} }
@@ -162,7 +163,7 @@ public abstract class Entity implements ICommandListener { @@ -160,7 +161,7 @@ public abstract class Entity implements ICommandListener {
this.width = 0.6F; this.width = 0.6F;
this.length = 1.8F; this.length = 1.8F;
this.ax = 1; this.ax = 1;
- this.random = new Random(); - this.random = new Random();
+ this.random = SHARED_RANDOM; // Paper + this.random = SHARED_RANDOM; // Paper
this.maxFireTicks = 1; this.fireTicks = -this.getMaxFireTicks();
this.justCreated = true; this.justCreated = true;
this.uniqueID = MathHelper.a(this.random); this.uniqueID = MathHelper.a(this.random);
-- --
2.9.3 2.10.2

View File

@ -1,4 +1,4 @@
From ee395eb0157df61aaaa7672ef5e9cf4ba5859950 Mon Sep 17 00:00:00 2001 From 04db83c72b0dd6425fd8d800822a51dcd56e6d5c Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Tue, 22 Mar 2016 00:55:23 -0400 Date: Tue, 22 Mar 2016 00:55:23 -0400
Subject: [PATCH] Don't teleport dead entities 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. 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 diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 91eb036..7696998 100644 index ae16663..d8ebe11 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2151,7 +2151,7 @@ public abstract class Entity implements ICommandListener { @@ -2216,7 +2216,7 @@ public abstract class Entity implements ICommandListener {
} }
public Entity teleportTo(Location exit, boolean portal) { public Entity teleportTo(Location exit, boolean portal) {
@ -20,5 +20,5 @@ index 91eb036..7696998 100644
WorldServer worldserver1 = ((CraftWorld) exit.getWorld()).getHandle(); WorldServer worldserver1 = ((CraftWorld) exit.getWorld()).getHandle();
int i = worldserver1.dimension; int i = worldserver1.dimension;
-- --
2.9.3 2.10.2

View File

@ -1,4 +1,4 @@
From 5e1f9c486154c325334770e1d3771eb85fcd352e Mon Sep 17 00:00:00 2001 From 77c802f0bbd04aeeb2dece18e0efc00950c987ec Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Thu, 27 Aug 2015 01:15:02 -0400 Date: Thu, 27 Aug 2015 01:15:02 -0400
Subject: [PATCH] Optimize Chunk Access Subject: [PATCH] Optimize Chunk Access
@ -9,10 +9,10 @@ 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. Optimize this look up by using a Last Access cache.
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index cbc93a8..ad94c5a 100644 index 54ca738..902f9ac 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -26,7 +26,27 @@ public class ChunkProviderServer implements IChunkProvider { @@ -27,7 +27,27 @@ public class ChunkProviderServer implements IChunkProvider {
public final Set<Long> unloadQueue = Sets.newHashSet(); public final Set<Long> unloadQueue = Sets.newHashSet();
public final ChunkGenerator chunkGenerator; public final ChunkGenerator chunkGenerator;
private final IChunkLoader chunkLoader; private final IChunkLoader chunkLoader;
@ -42,5 +42,5 @@ index cbc93a8..ad94c5a 100644
public ChunkProviderServer(WorldServer worldserver, IChunkLoader ichunkloader, ChunkGenerator chunkgenerator) { public ChunkProviderServer(WorldServer worldserver, IChunkLoader ichunkloader, ChunkGenerator chunkgenerator) {
-- --
2.9.3 2.10.2

View File

@ -1,39 +1,36 @@
From 2d4c48e2d7b719b5aef60d4d1264776f9e9e71c9 Mon Sep 17 00:00:00 2001 From 49d53ee95df9d1cad58e78621fd5a342062e9e09 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 22 Mar 2016 12:04:28 -0500 Date: Tue, 22 Mar 2016 12:04:28 -0500
Subject: [PATCH] Configurable spawn chances for skeleton horses 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 diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index b701e5e..d29f2a4 100644 index 9cce672..d92ccc7 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -278,4 +278,12 @@ public class PaperWorldConfig { @@ -269,4 +269,9 @@ public class PaperWorldConfig {
} }
log("Non Player Arrow Despawn Rate: " + nonPlayerArrowDespawnRate); log("Non Player Arrow Despawn Rate: " + nonPlayerArrowDespawnRate);
} }
+ +
+ public double skeleHorseSpawnChance; + public double skeleHorseSpawnChance;
+ private void skeleHorseSpawnChance() { + private void skeleHorseSpawnChance() {
+ skeleHorseSpawnChance = getDouble("skeleton-horse-thunder-spawn-chance", -1.0D); // -1.0D represents a "vanilla" state + skeleHorseSpawnChance = getDouble("skeleton-horse-thunder-spawn-chance", 0.01D); // -1.0D represents a "vanilla" state
+ if (skeleHorseSpawnChance < 0) {
+ skeleHorseSpawnChance = 0.05D; // Vanilla
+ }
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index a5f8d93..c2a8bdf 100644 index c84121c..04f61e9 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -432,7 +432,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { @@ -435,7 +435,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
if (this.isRainingAt(blockposition)) { if (this.isRainingAt(blockposition)) {
DifficultyDamageScaler difficultydamagescaler = this.D(blockposition); DifficultyDamageScaler difficultydamagescaler = this.D(blockposition);
- if (this.random.nextDouble() < (double) difficultydamagescaler.b() * 0.05D) { - if (this.getGameRules().getBoolean("doMobSpawning") && this.random.nextDouble() < (double) difficultydamagescaler.b() * 0.01D) {
+ if (this.random.nextDouble() < difficultydamagescaler.b() * paperConfig.skeleHorseSpawnChance) { // Paper - Configurable skeleton horse spawn chance + if (this.getGameRules().getBoolean("doMobSpawning") && this.random.nextDouble() < (double) difficultydamagescaler.b() * paperConfig.skeleHorseSpawnChance) {
EntityHorse entityhorse = new EntityHorse(this); EntityHorseSkeleton entityhorseskeleton = new EntityHorseSkeleton(this);
entityhorse.setType(EnumHorseType.SKELETON); entityhorseskeleton.p(true);
-- --
2.9.3 2.10.2

View File

@ -1,4 +1,4 @@
From 9c40285ed71d8220215e2a1b191d2d299764e757 Mon Sep 17 00:00:00 2001 From 0c1d747df007846e209ed5f0531dd51d59fad7fc Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 02:07:55 -0600 Date: Thu, 3 Mar 2016 02:07:55 -0600
Subject: [PATCH] Optimize isValidLocation, getType and getBlockData for inling Subject: [PATCH] Optimize isValidLocation, getType and getBlockData for inling
@ -31,10 +31,10 @@ index d60e755..f772c7c 100644
public BaseBlockPosition(int i, int j, int k) { public BaseBlockPosition(int i, int j, int k) {
this.a = i; this.a = i;
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
index 8603d83..704faa9 100644 index 5cea6f1..1852972 100644
--- a/src/main/java/net/minecraft/server/BlockPosition.java --- a/src/main/java/net/minecraft/server/BlockPosition.java
+++ b/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java
@@ -326,6 +326,16 @@ public class BlockPosition extends BaseBlockPosition { @@ -343,6 +343,16 @@ public class BlockPosition extends BaseBlockPosition {
protected int b; protected int b;
protected int c; protected int c;
protected int d; protected int d;
@ -52,7 +52,7 @@ index 8603d83..704faa9 100644
public MutableBlockPosition() { public MutableBlockPosition() {
this(0, 0, 0); this(0, 0, 0);
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 9118e4d..63e11aa 100644 index 8f1a68d..736fa1f 100644
--- a/src/main/java/net/minecraft/server/Chunk.java --- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -406,11 +406,26 @@ public class Chunk { @@ -406,11 +406,26 @@ public class Chunk {
@ -98,10 +98,10 @@ index 3d784d0..afdc4a7 100644
private NibbleArray skyLight; private NibbleArray skyLight;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index a3bce9a..b683c3e 100644 index 223250f..14ac6d2 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java
@@ -274,12 +274,12 @@ public abstract class World implements IBlockAccess { @@ -273,12 +273,12 @@ public abstract class World implements IBlockAccess {
return this.getType(blockposition1); return this.getType(blockposition1);
} }
@ -118,7 +118,7 @@ index a3bce9a..b683c3e 100644
} }
public boolean isEmpty(BlockPosition blockposition) { public boolean isEmpty(BlockPosition blockposition) {
@@ -371,7 +371,7 @@ public abstract class World implements IBlockAccess { @@ -374,7 +374,7 @@ public abstract class World implements IBlockAccess {
return true; return true;
} }
// CraftBukkit end // CraftBukkit end
@ -127,7 +127,7 @@ index a3bce9a..b683c3e 100644
return false; return false;
} else if (!this.isClientSide && this.worldData.getType() == WorldType.DEBUG_ALL_BLOCK_STATES) { } else if (!this.isClientSide && this.worldData.getType() == WorldType.DEBUG_ALL_BLOCK_STATES) {
return false; return false;
@@ -639,7 +639,7 @@ public abstract class World implements IBlockAccess { @@ -691,7 +691,7 @@ public abstract class World implements IBlockAccess {
// Paper start - test if meets light level, return faster // Paper start - test if meets light level, return faster
// logic copied from below // logic copied from below
public boolean isLightLevel(BlockPosition blockposition, int level) { public boolean isLightLevel(BlockPosition blockposition, int level) {
@ -136,7 +136,7 @@ index a3bce9a..b683c3e 100644
if (this.getType(blockposition).f()) { if (this.getType(blockposition).f()) {
if (this.c(blockposition.up(), false) >= level) { if (this.c(blockposition.up(), false) >= level) {
return true; return true;
@@ -757,7 +757,7 @@ public abstract class World implements IBlockAccess { @@ -809,7 +809,7 @@ public abstract class World implements IBlockAccess {
blockposition = new BlockPosition(blockposition.getX(), 0, blockposition.getZ()); blockposition = new BlockPosition(blockposition.getX(), 0, blockposition.getZ());
} }
@ -145,7 +145,7 @@ index a3bce9a..b683c3e 100644
return enumskyblock.c; return enumskyblock.c;
} else if (!this.isLoaded(blockposition)) { } else if (!this.isLoaded(blockposition)) {
return enumskyblock.c; return enumskyblock.c;
@@ -769,7 +769,7 @@ public abstract class World implements IBlockAccess { @@ -821,7 +821,7 @@ public abstract class World implements IBlockAccess {
} }
public void a(EnumSkyBlock enumskyblock, BlockPosition blockposition, int i) { public void a(EnumSkyBlock enumskyblock, BlockPosition blockposition, int i) {
@ -154,7 +154,7 @@ index a3bce9a..b683c3e 100644
if (this.isLoaded(blockposition)) { if (this.isLoaded(blockposition)) {
Chunk chunk = this.getChunkAtWorldCoords(blockposition); Chunk chunk = this.getChunkAtWorldCoords(blockposition);
@@ -793,19 +793,19 @@ public abstract class World implements IBlockAccess { @@ -845,19 +845,19 @@ public abstract class World implements IBlockAccess {
// Paper start - reduces need to do isLoaded before getType // Paper start - reduces need to do isLoaded before getType
public IBlockData getTypeIfLoaded(BlockPosition blockposition) { public IBlockData getTypeIfLoaded(BlockPosition blockposition) {
// CraftBukkit start - tree generation // CraftBukkit start - tree generation
@ -182,7 +182,7 @@ index a3bce9a..b683c3e 100644
} }
return null; return null;
} }
@@ -813,24 +813,33 @@ public abstract class World implements IBlockAccess { @@ -865,24 +865,33 @@ public abstract class World implements IBlockAccess {
public IBlockData getType(BlockPosition blockposition) { public IBlockData getType(BlockPosition blockposition) {
// CraftBukkit start - tree generation // CraftBukkit start - tree generation
@ -227,7 +227,7 @@ index a3bce9a..b683c3e 100644
public boolean B() { public boolean B() {
return this.J < 4; return this.J < 4;
@@ -2058,7 +2067,7 @@ public abstract class World implements IBlockAccess { @@ -2045,7 +2054,7 @@ public abstract class World implements IBlockAccess {
public Map<BlockPosition, TileEntity> capturedTileEntities = Maps.newHashMap(); public Map<BlockPosition, TileEntity> capturedTileEntities = Maps.newHashMap();
@Nullable @Nullable
public TileEntity getTileEntity(BlockPosition blockposition) { public TileEntity getTileEntity(BlockPosition blockposition) {
@ -236,16 +236,16 @@ index a3bce9a..b683c3e 100644
return null; return null;
} else { } else {
// CraftBukkit start // CraftBukkit start
@@ -2099,7 +2108,7 @@ public abstract class World implements IBlockAccess { @@ -2086,7 +2095,7 @@ public abstract class World implements IBlockAccess {
} }
public void setTileEntity(BlockPosition blockposition, @Nullable TileEntity tileentity) { public void setTileEntity(BlockPosition blockposition, @Nullable TileEntity tileentity) {
- if (!this.E(blockposition)) { - if (!this.E(blockposition)) {
+ if (!blockposition.isInvalidYLocation()) { // Paper + if (!blockposition.isInvalidYLocation()) {
if (tileentity != null && !tileentity.x()) { if (tileentity != null && !tileentity.y()) {
// CraftBukkit start // CraftBukkit start
if (captureBlockStates) { if (captureBlockStates) {
@@ -2162,7 +2171,7 @@ public abstract class World implements IBlockAccess { @@ -2149,7 +2158,7 @@ public abstract class World implements IBlockAccess {
} }
public boolean d(BlockPosition blockposition, boolean flag) { public boolean d(BlockPosition blockposition, boolean flag) {
@ -255,5 +255,5 @@ index a3bce9a..b683c3e 100644
} else { } else {
Chunk chunk = this.chunkProvider.getLoadedChunkAt(blockposition.getX() >> 4, blockposition.getZ() >> 4); Chunk chunk = this.chunkProvider.getLoadedChunkAt(blockposition.getX() >> 4, blockposition.getZ() >> 4);
-- --
2.9.3 2.10.2

Some files were not shown because too many files have changed in this diff Show More