3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 11:00:06 +01:00

NOT FINISHED!!! Current Progress on 1.13-pre7 update

This work is 100% unfinished. I am pushing it up so that we as a team
can work on this update.

Do not try to use this branch. You will fail.
Dieser Commit ist enthalten in:
Aikar 2018-07-14 21:53:17 -04:00
Ursprung a8c28e1920
Commit 5b6dfb3463
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 401ADFC9891FAAFE
234 geänderte Dateien mit 3554 neuen und 5857 gelöschten Zeilen

Datei anzeigen

@ -1,14 +1,14 @@
From 19a0ed42ec75273fa4ccab45bb726f5d1a90c4c2 Mon Sep 17 00:00:00 2001
From 7439e7e3c94eb559415193440a9e1515335819c7 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 00:16:08 +0100
Subject: [PATCH] POM changes
diff --git a/pom.xml b/pom.xml
index 99ff13b3..cc8fca48 100644
index 3e6c8707..c2d0651e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,13 +3,19 @@
@@ -3,29 +3,35 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
@ -20,9 +20,8 @@ index 99ff13b3..cc8fca48 100644
+ <version>dev-SNAPSHOT</version>
+ </parent>
+
+ <groupId>com.destroystokyo.paper</groupId>
+ <artifactId>paper-api</artifactId>
<version>1.13-pre5-R0.1-SNAPSHOT</version>
<version>1.13-pre7-R0.1-SNAPSHOT</version>
<packaging>jar</packaging>
- <name>Spigot-API</name>
@ -32,7 +31,13 @@ index 99ff13b3..cc8fca48 100644
<description>An enhanced plugin API for Minecraft servers.</description>
<properties>
@@ -20,12 +26,12 @@
- <maven.compiler.source>1.7</maven.compiler.source>
- <maven.compiler.target>1.7</maven.compiler.target>
+ <!-- Paper - #Logic -->
+ <maven.compiler.source>1.8</maven.compiler.source>
+ <maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<distributionManagement>
<repository>
@ -111,7 +116,7 @@ index 99ff13b3..cc8fca48 100644
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>animal-sniffer-maven-plugin</artifactId>
- <version>1.16</version>
- <version>1.17</version>
- <executions>
- <execution>
- <phase>process-classes</phase>
@ -123,7 +128,7 @@ index 99ff13b3..cc8fca48 100644
- <configuration>
- <signature>
- <groupId>org.codehaus.mojo.signature</groupId>
- <artifactId>java18</artifactId>
- <artifactId>java17</artifactId>
- <version>1.0</version>
- </signature>
- </configuration>

Datei anzeigen

@ -1,4 +1,4 @@
From 53fb6f06b531517937c55be04dc33916403c6c5c Mon Sep 17 00:00:00 2001
From 0845d92e6aa2ddf0d67519da4af0713f77e9eed0 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 29 Feb 2016 18:48:17 -0600
Subject: [PATCH] Timings v2
@ -3529,10 +3529,10 @@ index bba914d7..00000000
- // Spigot end
-}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 86eca9e1..116a1e7a 100644
index 115c5b0b..90b22bcc 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1541,6 +1541,11 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
@@ -1535,6 +1535,11 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
public void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) {
throw new UnsupportedOperationException("Not supported yet.");
}
@ -3602,7 +3602,7 @@ index 8b130abb..80c152ba 100644
}
}
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
index 80c6a72e..759c4617 100644
index 113b899c..81b42822 100644
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
@@ -40,7 +40,6 @@ import org.bukkit.plugin.PluginLoader;
@ -3621,7 +3621,7 @@ index 80c6a72e..759c4617 100644
/**
* This class was not meant to be constructed explicitly
@@ -289,26 +287,20 @@ public final class JavaPluginLoader implements PluginLoader {
@@ -291,26 +289,20 @@ public final class JavaPluginLoader implements PluginLoader {
}
}

Datei anzeigen

@ -1,4 +1,4 @@
From 2964c90dcc4e0304b7c77475523c9a7eab2ea98b Mon Sep 17 00:00:00 2001
From 6930a5ac9c5a9fba958a9d72769f6be40c406fd0 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Mon, 29 Feb 2016 17:50:31 -0600
Subject: [PATCH] Entity Origin API
@ -25,10 +25,10 @@ index 28b169d2..9b0f97f1 100644
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/entity/FallingBlock.java b/src/main/java/org/bukkit/entity/FallingBlock.java
index 0b5c062f..48d6c951 100644
index 9d34e691..b0b1defc 100644
--- a/src/main/java/org/bukkit/entity/FallingBlock.java
+++ b/src/main/java/org/bukkit/entity/FallingBlock.java
@@ -50,4 +50,15 @@ public interface FallingBlock extends Entity {
@@ -52,4 +52,15 @@ public interface FallingBlock extends Entity {
* @param hurtEntities whether entities will be damaged by this block.
*/
void setHurtEntities(boolean hurtEntities);

Datei anzeigen

@ -1,14 +1,14 @@
From 90e6868ac669e61bc3b0e176b452181dcf078c2c Mon Sep 17 00:00:00 2001
From a550e7f0f5f00bea6d9b453614818877a470ebb6 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 29 Feb 2016 19:45:21 -0600
Subject: [PATCH] Automatically disable plugins that fail to load
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
index 759c461..d8b9c24 100644
index 81b42822..3af99b5b 100644
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
@@ -329,6 +329,10 @@ public final class JavaPluginLoader implements PluginLoader {
@@ -331,6 +331,10 @@ public final class JavaPluginLoader implements PluginLoader {
jPlugin.setEnabled(true);
} catch (Throwable ex) {
server.getLogger().log(Level.SEVERE, "Error occurred while enabling " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex);
@ -20,5 +20,5 @@ index 759c461..d8b9c24 100644
// Perhaps abort here, rather than continue going, but as it stands,
--
2.10.0.windows.1
2.18.0

Datei anzeigen

@ -1,14 +1,14 @@
From 983f39e99a72d696cce6d90cd3688cbffbf5bf22 Mon Sep 17 00:00:00 2001
From 627bc079ead8a9849e8b0046a4045aa8ff3a69f8 Mon Sep 17 00:00:00 2001
From: mrapple <tony@oc.tc>
Date: Sun, 25 Nov 2012 13:47:27 -0600
Subject: [PATCH] Add methods for working with arrows stuck in living entities
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 5a30fa93..be51e389 100644
index 97c2172b..f6ae0a6d 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -360,4 +360,19 @@ public interface LivingEntity extends Attributable, Entity, Damageable, Projecti
@@ -376,4 +376,19 @@ public interface LivingEntity extends Attributable, Entity, Damageable, Projecti
* @return collision status
*/
boolean isCollidable();
@ -29,5 +29,5 @@ index 5a30fa93..be51e389 100644
+ // Paper end
}
--
2.13.3.windows.1
2.18.0

Datei anzeigen

@ -1,11 +1,11 @@
From 38ccae5eed9ac184d71461d0b9fce2b7659bb80e Mon Sep 17 00:00:00 2001
From 25ab827755fbe15e9f3c4165140a16be9689ed81 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sat, 4 Apr 2015 22:59:54 -0400
Subject: [PATCH] Complete resource pack API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 5955b20c..f1876a05 100644
index 1837a14c..5638a077 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1206,7 +1206,9 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
@ -77,30 +77,34 @@ index 5955b20c..f1876a05 100644
public class Spigot extends Entity.Spigot
{
diff --git a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java b/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java
index 4c498016..4c838519 100644
index 4c498016..aa18a766 100644
--- a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java
@@ -10,13 +10,28 @@ import org.bukkit.event.HandlerList;
@@ -10,13 +10,32 @@ import org.bukkit.event.HandlerList;
public class PlayerResourcePackStatusEvent extends PlayerEvent {
private static final HandlerList handlers = new HandlerList();
+ @Deprecated
+ private final String hash; // Paper
private final Status status;
+ @Deprecated // Paper
public PlayerResourcePackStatusEvent(final Player who, Status resourcePackStatus) {
super(who);
+ this.hash = null; // Paper
this.status = resourcePackStatus;
}
+ // Paper start
+ @Deprecated // Paper
+ public PlayerResourcePackStatusEvent(final Player who, Status resourcePackStatus, String hash) {
+ super(who);
+ this.hash = hash; // Paper
+ this.status = resourcePackStatus;
+ }
+
+ @Deprecated
+ /**
+ * @deprecated Hash does not seem to ever be set
+ */
+ public String getHash() {
+ return this.hash;
+ }

Datei anzeigen

@ -1,4 +1,4 @@
From e3d8a0f30c3e83f2308268ca6221478f46a82008 Mon Sep 17 00:00:00 2001
From 39bd1036ea8a04cd417c8bab59421ef5e7ba6e0c Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com>
Date: Thu, 3 Mar 2016 13:20:33 -0700
Subject: [PATCH] Use ASM for event executors.
@ -6,7 +6,7 @@ Subject: [PATCH] Use ASM for event executors.
Uses method handles for private or static methods.
diff --git a/pom.xml b/pom.xml
index f5e8d49d..dfc6c9b5 100644
index 5e2024ca..bd9146dd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -127,6 +127,17 @@
@ -401,10 +401,10 @@ index 3b2c99ea..b45b6c1c 100644
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
index d8b9c244..40fd71dc 100644
index 3af99b5b..72d506d1 100644
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
@@ -287,20 +287,7 @@ public final class JavaPluginLoader implements PluginLoader {
@@ -289,20 +289,7 @@ public final class JavaPluginLoader implements PluginLoader {
}
}

Datei anzeigen

@ -1,11 +1,11 @@
From e859235a5d23ac1232b75122a23aa4dc605a3d1c Mon Sep 17 00:00:00 2001
From 08d440055e45edea4106415945fcfe5b7c3d1318 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 20 Dec 2016 15:55:55 -0500
Subject: [PATCH] Add String based Action Bar API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index f1876a05..d06f26b9 100644
index 5638a077..bc2f9621 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -394,6 +394,26 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
@ -47,7 +47,7 @@ index f1876a05..d06f26b9 100644
public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) {
spigot().sendMessage(position, components);
}
@@ -1749,9 +1771,11 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
@@ -1743,9 +1765,11 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
/**
* Sends the component to the specified screen position of this player
*
@ -59,7 +59,7 @@ index f1876a05..d06f26b9 100644
public void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent component) {
throw new UnsupportedOperationException("Not supported yet.");
}
@@ -1759,9 +1783,11 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
@@ -1753,9 +1777,11 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
/**
* Sends an array of components as a single message to the specified screen position of this player
*

Datei anzeigen

@ -1,4 +1,4 @@
From 569e6283060854cef2140d7a3ad0b2690911215b Mon Sep 17 00:00:00 2001
From bc65fcc9a464b4c8d7b28758d6fad8d98eefa05d Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 10 Jun 2017 16:59:40 -0500
Subject: [PATCH] Fix upstream javadoc warnings and errors
@ -6,10 +6,10 @@ Subject: [PATCH] Fix upstream javadoc warnings and errors
Upstream still refuses to use Java 8 with the API so they are likely unaware these are even issues.
diff --git a/src/main/java/org/bukkit/NamespacedKey.java b/src/main/java/org/bukkit/NamespacedKey.java
index 19632d17..de1b1112 100644
index 1ed8f7e4..bd5238ce 100644
--- a/src/main/java/org/bukkit/NamespacedKey.java
+++ b/src/main/java/org/bukkit/NamespacedKey.java
@@ -27,8 +27,8 @@ public final class NamespacedKey {
@@ -38,8 +38,8 @@ public final class NamespacedKey {
/**
* Create a key in a specific namespace.
*
@ -21,10 +21,10 @@ index 19632d17..de1b1112 100644
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 65156e80..6417cefa 100644
index 1e980d2d..4cc70326 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -1365,6 +1365,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -1376,6 +1376,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param count the number of particles
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
@ -32,7 +32,7 @@ index 65156e80..6417cefa 100644
*/
public <T> void spawnParticle(Particle particle, Location location, int count, T data);
@@ -1380,6 +1381,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -1391,6 +1392,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param count the number of particles
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
@ -40,7 +40,7 @@ index 65156e80..6417cefa 100644
*/
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, T data);
@@ -1429,6 +1431,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -1440,6 +1442,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param offsetZ the maximum random offset on the Z axis
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
@ -48,7 +48,7 @@ index 65156e80..6417cefa 100644
*/
public <T> void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, T data);
@@ -1448,6 +1451,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -1459,6 +1462,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param offsetZ the maximum random offset on the Z axis
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
@ -56,7 +56,7 @@ index 65156e80..6417cefa 100644
*/
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, T data);
@@ -1503,6 +1507,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -1514,6 +1518,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* particle used (normally speed)
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
@ -64,7 +64,7 @@ index 65156e80..6417cefa 100644
*/
public <T> void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data);
@@ -1524,6 +1529,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -1535,6 +1540,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* particle used (normally speed)
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
@ -112,7 +112,7 @@ index cfce8fa5..8660070b 100644
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index d06f26b9..5c29c11e 100644
index bc2f9621..47a12d71 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -409,7 +409,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline

Datei anzeigen

@ -1,47 +0,0 @@
From 3fe26d396837d1f3aad927133722332e4d1f7b51 Mon Sep 17 00:00:00 2001
From: willies952002 <admin@domnian.com>
Date: Thu, 20 Jul 2017 18:05:36 -0400
Subject: [PATCH] Allow Changing of Player Sample in ServerListPingEvent
diff --git a/src/main/java/org/bukkit/event/server/ServerListPingEvent.java b/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
index 3c38d857..cb8d0fcd 100644
--- a/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
+++ b/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
@@ -2,6 +2,7 @@ package org.bukkit.event.server;
import java.net.InetAddress;
import java.util.Iterator;
+import java.util.List;
import org.apache.commons.lang.Validate;
import org.bukkit.entity.Player;
@@ -145,4 +146,25 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
public Iterator<Player> iterator() throws UnsupportedOperationException {
throw new UnsupportedOperationException();
}
+
+ // Paper start
+ private java.util.List<String> sample;
+
+ /**
+ * @deprecated Will be replaced in 1.13
+ */
+ @Deprecated
+ public void setSampleText(java.util.List<String> sample) {
+ this.sample = sample;
+ }
+
+ /**
+ * @deprecated Will be replaced in 1.13
+ */
+ @Deprecated
+ public java.util.List<String> getSampleText() {
+ return sample;
+ }
+ // Paper end
+
}
--
2.15.1

Datei anzeigen

@ -1,4 +1,4 @@
From 5b40b7e3f882c44f18249d89dbbeb93298af3535 Mon Sep 17 00:00:00 2001
From d64ec328014274efa75dfacaf6b37cb11f642f69 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 10 Dec 2016 16:12:48 -0500
Subject: [PATCH] Improve the Saddle API for Horses
@ -78,5 +78,5 @@ index 00000000..7944f26a
+
+public interface SaddledHorseInventory extends AbstractHorseInventory {}
--
2.16.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From 575bbab52d06b324acd9b8758d454d74a859c8d0 Mon Sep 17 00:00:00 2001
From ac29eaf3c0dc567bfbe8e20a323cdfaefd6242b8 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 4 May 2016 23:55:48 -0400
Subject: [PATCH] ensureServerConversions API
@ -7,7 +7,7 @@ This will take a Bukkit ItemStack and run it through any conversions a server pr
to ensure it meets latest minecraft expectations.
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
index f74f8ae9..ab33e09e 100644
index 762c43d6..045c26d9 100644
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
@@ -134,4 +134,16 @@ public interface ItemFactory {

Datei anzeigen

@ -1,4 +1,4 @@
From 83009175cba71dcdd63ac621aeb5453073fe2c7f Mon Sep 17 00:00:00 2001
From b2d5adef80eed3964ab16df2c98789763d150fd7 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 4 May 2016 23:55:48 -0400
Subject: [PATCH] Add getI18NDisplayName API
@ -8,7 +8,7 @@ Currently the server only supports the English language. To override this,
You must replace the language file embedded in the server jar.
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
index ab33e09e..061954f9 100644
index 045c26d9..47bbc0f9 100644
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
@@ -145,5 +145,15 @@ public interface ItemFactory {

Datei anzeigen

@ -1,4 +1,4 @@
From 69a0afed643918933b0ad8f6d81780dafa33cf6b Mon Sep 17 00:00:00 2001
From 1dfa87d569f72303f04c3a29130145c91f25f506 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 3 Jul 2017 18:11:34 -0500
Subject: [PATCH] ProfileWhitelistVerifyEvent
@ -134,5 +134,5 @@ index 00000000..662e79e3
+ }
+}
--
2.15.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From 665b880ec9616fbc2aea0aee0d2d2dbf2a3613e8 Mon Sep 17 00:00:00 2001
From 86390176ccf85c98f464e5ff6bb90f27952ae60a Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Mon, 31 Jul 2017 02:08:55 -0500
Subject: [PATCH] Make /plugins list alphabetical
@ -50,5 +50,5 @@ index e40b03a7..b1d384e8 100644
}
}
--
2.15.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From ac9baf5c2739f255205d959cc519be2db01773da Mon Sep 17 00:00:00 2001
From 7963cbbdb5c04bb9f749576c89573aaf1c2279bb Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Mon, 31 Jul 2017 01:49:43 -0500
Subject: [PATCH] LivingEntity#setKiller

Datei anzeigen

@ -1,4 +1,4 @@
From f27a613d49050d6941376ec69d0efa182cab743c Mon Sep 17 00:00:00 2001
From 99c169a9b437e6bd0088d70cb74c81a221808521 Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Thu, 21 Sep 2017 16:14:13 +0200
Subject: [PATCH] Handle plugin prefixes in implementation logging
@ -40,5 +40,5 @@ index 16b1eb37..0abad9ad 100644
/**
--
2.15.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From 8ae719b2fa6b1e3a270d8cdc7ecea48d8137f2a4 Mon Sep 17 00:00:00 2001
From 78649d9322cf676aeca08d8f43053600d34a619d Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Thu, 21 Sep 2017 16:33:12 +0200
Subject: [PATCH] Allow plugins to use SLF4J for logging
@ -14,7 +14,7 @@ it without having to shade it in the plugin and going through
several layers of logging abstraction.
diff --git a/pom.xml b/pom.xml
index e1a39bfe..db9a57b0 100644
index 44a8b2a5..c176dd7b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -121,6 +121,14 @@

Datei anzeigen

@ -1,4 +1,4 @@
From 4c8bb1fd1597ec5da47cec0832b705ee68572209 Mon Sep 17 00:00:00 2001
From 0f5f1f61e5e6128993289722564719846613ed1b Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Thu, 21 Sep 2017 19:41:20 +0200
Subject: [PATCH] Add workaround for plugins modifying the parent of the plugin

Datei anzeigen

@ -1,4 +1,4 @@
From 01c9b5fa055b84a9b62c60cc067cbe2cdd35d18f Mon Sep 17 00:00:00 2001
From cb37a11f62d5ad49044c57e9364911f5914708d9 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Thu, 28 Sep 2017 17:21:32 -0400
Subject: [PATCH] Add PlayerJumpEvent
@ -112,5 +112,5 @@ index 00000000..dd24f9b0
+ }
+}
--
2.15.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From d40adbcb5398dc21486b6b6c8817d751fe9ced12 Mon Sep 17 00:00:00 2001
From e3792c13f6e712593072cb31dc951110ff1e6632 Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Tue, 10 Oct 2017 18:44:42 +0200
Subject: [PATCH] Expose client protocol version and virtual host
@ -55,7 +55,7 @@ index 00000000..9072e384
+
+}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 5c29c11e..60cdd620 100644
index 47a12d71..362467e5 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -31,7 +31,7 @@ import org.bukkit.scoreboard.Scoreboard;

Datei anzeigen

@ -1,4 +1,4 @@
From 62575a75cec03d048cabfce9933dc35c93532832 Mon Sep 17 00:00:00 2001
From a19dc4df4d2e6230616f78cc0eec847092cded18 Mon Sep 17 00:00:00 2001
From: pkt77 <parkerkt77@gmail.com>
Date: Fri, 10 Nov 2017 23:45:59 -0500
Subject: [PATCH] Add PlayerArmorChangeEvent

Datei anzeigen

@ -1,4 +1,4 @@
From e0beaa49adfc67cd4d5144e22f2c3e3c20f13b3b Mon Sep 17 00:00:00 2001
From 5b78e31d0aeb0cfcf2d3e108326c660d3cfd7aa1 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 6 Nov 2017 21:10:01 -0500
Subject: [PATCH] API to get a BlockState without a snapshot
@ -9,7 +9,7 @@ on the real tile entity.
This is useful for where performance is needed
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
index bda9900e..d5d0e255 100644
index 1aa3373f..9aab043c 100644
--- a/src/main/java/org/bukkit/block/Block.java
+++ b/src/main/java/org/bukkit/block/Block.java
@@ -242,6 +242,15 @@ public interface Block extends Metadatable {

Datei anzeigen

@ -1,4 +1,4 @@
From ce5e52c29872bfca3e47d91777b075db4ce21d20 Mon Sep 17 00:00:00 2001
From 2fe82eb2c39bc39aa0264a02db45e8bf643d1d26 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 26 Nov 2017 13:17:09 -0500
Subject: [PATCH] AsyncTabCompleteEvent
@ -247,5 +247,5 @@ index 6ac437d5..df6eb53d 100644
@Override
--
2.15.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From 252d7dcf7c5531b482ea92f756a6847d9b26ad84 Mon Sep 17 00:00:00 2001
From 92fba1efc29b3550577a18bcf74cb41327f59019 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 9 Dec 2017 12:40:25 -0500
Subject: [PATCH] Display warning on deprecated recipe API
@ -34,5 +34,5 @@ index ca5c09b8..f2dd46f2 100644
}
--
2.15.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From 1dcc1f273169ef66f371e8d44ae5133bc314b7df Mon Sep 17 00:00:00 2001
From 6acec34388a520536f958b9c92c632892c2cef27 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 19 Dec 2017 22:00:41 -0500
Subject: [PATCH] PlayerPickupExperienceEvent
@ -88,5 +88,5 @@ index 00000000..f9ef95cd
+ }
+}
--
2.17.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From 796e5d95f60258b2f2c2e8d665f09c5d01fb9823 Mon Sep 17 00:00:00 2001
From 51c1f56626683e98d9c9728d6ebc399e0123a91b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 19 Dec 2017 22:56:24 -0500
Subject: [PATCH] ExperienceOrbMergeEvent
@ -96,5 +96,5 @@ index 00000000..fb5b4b86
+ }
+}
--
2.17.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From 3fda9a76e026397bae881455bd5ec05d774be252 Mon Sep 17 00:00:00 2001
From 468f4768ac979bb546fe16cc286ed533ac26e04e Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 20 Dec 2017 17:38:07 -0500
Subject: [PATCH] Ability to apply mending to XP API
@ -10,7 +10,7 @@ of giving the player experience points.
Both an API To standalone mend, and apply mending logic to .giveExp has been added.
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 60cdd620..32ead009 100644
index 362467e5..6709168b 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -916,12 +916,33 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline

Datei anzeigen

@ -1,4 +1,4 @@
From 3c047d4917be9616b971aa725a2682d45f814b6d Mon Sep 17 00:00:00 2001
From 4171ce67cc2901442e728da492533f9fec795711 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 14 Jan 2018 16:59:43 -0500
Subject: [PATCH] PreCreatureSpawnEvent
@ -119,5 +119,5 @@ index 00000000..bac1cef3
+ }
+}
--
2.17.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From 54bc8edf2d329bbfeb5e48fda52d44bf6fe8a47e Mon Sep 17 00:00:00 2001
From ce4a90e4f24108e85f7c66050711c1b5667085bb Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 14 Jan 2018 17:31:37 -0500
Subject: [PATCH] PlayerNaturallySpawnCreaturesEvent
@ -76,5 +76,5 @@ index 00000000..7c6953a7
+ }
+}
--
2.17.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From 96d8312552c442c8489d6dbb914f0623ad74b66b Mon Sep 17 00:00:00 2001
From fd43f9fb69c2e0792c33ee16e007134728a3df2d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 19 Jan 2018 00:29:28 -0500
Subject: [PATCH] Add SkullMeta.setPlayerProfile API
@ -7,22 +7,21 @@ This allows you to create already filled textures on Skulls to avoid texture loo
which commonly cause rate limit issues with Mojang API
diff --git a/src/main/java/org/bukkit/inventory/meta/SkullMeta.java b/src/main/java/org/bukkit/inventory/meta/SkullMeta.java
index c60860e1..3eea5909 100644
index 15c1dfd9..a458000f 100644
--- a/src/main/java/org/bukkit/inventory/meta/SkullMeta.java
+++ b/src/main/java/org/bukkit/inventory/meta/SkullMeta.java
@@ -1,8 +1,11 @@
@@ -1,7 +1,10 @@
package org.bukkit.inventory.meta;
+import com.destroystokyo.paper.profile.PlayerProfile;
import org.bukkit.Material;
+import javax.annotation.Nullable;
import org.bukkit.OfflinePlayer;
+import javax.annotation.Nullable;
+
/**
* Represents a skull ({@link Material#SKULL_ITEM}) that can have an owner.
* Represents a skull that can have an owner.
*/
@@ -37,6 +40,20 @@ public interface SkullMeta extends ItemMeta {
@@ -36,6 +39,20 @@ public interface SkullMeta extends ItemMeta {
@Deprecated
boolean setOwner(String owner);
@ -44,5 +43,5 @@ index c60860e1..3eea5909 100644
* Gets the owner of the skull.
*
--
2.17.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From 6411e77da00dacbe848850db4660c86130fda955 Mon Sep 17 00:00:00 2001
From f932e1e9c552db09887c010fbb179ddf05d4a416 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 2 Jan 2018 00:31:08 -0500
Subject: [PATCH] Fill Profile Property Events
@ -169,5 +169,5 @@ index 00000000..aba0c087
+ }
+}
--
2.17.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From afa05f7fef0d3337d684319325143b4d441cea16 Mon Sep 17 00:00:00 2001
From b19e61438f5405ee5e004322bed0fea411f18924 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Fri, 19 Jan 2018 08:15:14 -0600
Subject: [PATCH] PlayerAdvancementCriterionGrantEvent
@ -69,5 +69,5 @@ index 00000000..b65ee9e5
+ }
+}
--
2.17.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From f8f9ee57846ba4838769c0eb20ef870dc14cb793 Mon Sep 17 00:00:00 2001
From 68d7994d386398bd6ad0a51efbb58f1d1357ba0d Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 27 Jan 2018 17:06:24 -0500
Subject: [PATCH] Add ArmorStand Item Meta
@ -95,5 +95,5 @@ index 00000000..7e4acfff
+ void setMarker(boolean marker);
+}
--
2.17.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From cd7a3c2d083750dfd3c520841072a4b7ed8c469b Mon Sep 17 00:00:00 2001
From 3d903c7ed998ce99c37f5b392021b982b9283955 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 18 Jan 2018 01:00:27 -0500
Subject: [PATCH] Optimize Hoppers
@ -38,5 +38,5 @@ index 06ec99ae..b44cc45b 100644
}
--
2.17.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From 3ff6fc393591f3a29c98ae084e1c67be2eacdee6 Mon Sep 17 00:00:00 2001
From bc63e16534cb5f723604669f5acb8b70ad600eab Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 24 Feb 2018 00:55:52 -0500
Subject: [PATCH] Tameable#getOwnerUniqueId API
@ -33,5 +33,5 @@ index 44497aa3..0987c1e8 100644
*/
public AnimalTamer getOwner();
--
2.17.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From 41c7e4edd8c9d6e23f7a546ccee245eea652f073 Mon Sep 17 00:00:00 2001
From c438100df0d0e3f2210c8a932e596c0dd327ca29 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 18 Mar 2018 11:43:30 -0400
Subject: [PATCH] Ability to change PlayerProfile in AsyncPreLoginEvent
@ -51,5 +51,5 @@ index 1d571889..0c16128e 100644
this.message = "";
this.name = name;
--
2.17.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From d2e267fceb2a1990a2a95c57fd50e653212e5260 Mon Sep 17 00:00:00 2001
From cbeaccc81b0cf819614ee7f57c7ec2f63aa3477f Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Wed, 11 Oct 2017 15:55:38 +0200
Subject: [PATCH] Add extended PaperServerListPingEvent
@ -366,5 +366,5 @@ index 04804706..44563482 100644
+ // Paper end
}
--
2.17.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From 8ccc5f587f1e755b7136c87160b2134637905d98 Mon Sep 17 00:00:00 2001
From dff56416f41aa3ed9bfe8eb38174279b2c189ac4 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 18 Mar 2018 12:28:55 -0400
Subject: [PATCH] Player.setPlayerProfile API
@ -6,7 +6,7 @@ Subject: [PATCH] Player.setPlayerProfile API
This can be useful for changing name or skins after a player has logged in.
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 32ead009..cd82ff64 100644
index 6709168b..99080b27 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3,6 +3,7 @@ package org.bukkit.entity;

Datei anzeigen

@ -1,77 +0,0 @@
From d35e326f5e55fa14cdf9b1eacba970704ddcc16e Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Mon, 27 Nov 2017 16:21:19 +0100
Subject: [PATCH] Implement deprecated player sample API
diff --git a/src/main/java/com/destroystokyo/paper/event/server/PaperServerListPingEvent.java b/src/main/java/com/destroystokyo/paper/event/server/PaperServerListPingEvent.java
index dd1deafd..db992df2 100644
--- a/src/main/java/com/destroystokyo/paper/event/server/PaperServerListPingEvent.java
+++ b/src/main/java/com/destroystokyo/paper/event/server/PaperServerListPingEvent.java
@@ -4,6 +4,7 @@ import static java.util.Objects.requireNonNull;
import com.destroystokyo.paper.network.StatusClient;
import com.destroystokyo.paper.profile.PlayerProfile;
+import com.google.common.base.Strings;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
@@ -316,4 +317,25 @@ public class PaperServerListPingEvent extends ServerListPingEvent implements Can
}
}
+ // TODO: Remove in 1.13
+
+ @Override
+ @Deprecated
+ public List<String> getSampleText() {
+ List<String> sampleText = new ArrayList<>();
+ for (PlayerProfile profile : getPlayerSample()) {
+ sampleText.add(Strings.nullToEmpty(profile.getName()));
+ }
+ return sampleText;
+ }
+
+ @Override
+ @Deprecated
+ public void setSampleText(List<String> sample) {
+ getPlayerSample().clear();
+ for (String name : sample) {
+ getPlayerSample().add(Bukkit.createProfile(name));
+ }
+ }
+
}
diff --git a/src/main/java/org/bukkit/event/server/ServerListPingEvent.java b/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
index cb8d0fcd..116d7c7a 100644
--- a/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
+++ b/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
@@ -4,6 +4,7 @@ import java.net.InetAddress;
import java.util.Iterator;
import java.util.List;
+import com.destroystokyo.paper.event.server.PaperServerListPingEvent;
import org.apache.commons.lang.Validate;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
@@ -151,7 +152,7 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
private java.util.List<String> sample;
/**
- * @deprecated Will be replaced in 1.13
+ * @deprecated Will be removed in 1.13, use {@link PaperServerListPingEvent#getPlayerSample()}
*/
@Deprecated
public void setSampleText(java.util.List<String> sample) {
@@ -159,7 +160,7 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
}
/**
- * @deprecated Will be replaced in 1.13
+ * @deprecated Will be removed in 1.13, use {@link PaperServerListPingEvent#getPlayerSample()}
*/
@Deprecated
public java.util.List<String> getSampleText() {
--
2.17.1

Datei anzeigen

@ -1,4 +1,4 @@
From 154ed7732b789705984e91d137eb41bd27e6857e Mon Sep 17 00:00:00 2001
From 9a6d0e5ca85f0cc9a82b7eaa2dc4435cffc6c3d7 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 22 Mar 2018 01:39:28 -0400
Subject: [PATCH] getPlayerUniqueId API

Datei anzeigen

@ -1,4 +1,4 @@
From b37f3ff8e0ccb80a8f8b5931561cb6b022ac4f41 Mon Sep 17 00:00:00 2001
From 9889b9a859949be8666d55e15aeff843c5a80d2b Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Wed, 11 Oct 2017 19:30:20 +0200
Subject: [PATCH] Add legacy ping support to PaperServerListPingEvent
@ -29,5 +29,5 @@ index 517d1523..ffda9f6a 100644
+
}
--
2.17.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From 184976102b7c58792c87b7092f76f9ed9a4c5d4e Mon Sep 17 00:00:00 2001
From c8afd6a6b8a7485805ed3eab9cd3b5faf59f6b28 Mon Sep 17 00:00:00 2001
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
Date: Sun, 1 Apr 2018 02:28:43 +0300
Subject: [PATCH] Add method to open already placed sign
@ -23,5 +23,5 @@ index 3939d4af..dd95773e 100644
+ // Paper end
}
--
2.17.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From 2b7db879b8f87e7539717559348c34dfcee58f70 Mon Sep 17 00:00:00 2001
From df28e17f5f2d148f78f8ae0c03a3a7b51da7b081 Mon Sep 17 00:00:00 2001
From: Kyle Wood <demonwav@gmail.com>
Date: Thu, 1 Mar 2018 19:37:52 -0600
Subject: [PATCH] Add version history to version command
@ -197,5 +197,5 @@ index 044361af..c45faf4c 100644
PluginDescriptionFile desc = plugin.getDescription();
sender.sendMessage(ChatColor.GREEN + desc.getName() + ChatColor.WHITE + " version " + ChatColor.GREEN + desc.getVersion());
--
2.17.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From 68981606bad552b49cd120b84b751263dd27c5dc Mon Sep 17 00:00:00 2001
From 78be1ecf7b7a0c39cef11e710ab52f7257805913 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 28 Apr 2018 10:28:50 -0400
Subject: [PATCH] Add Ban Methods to Player Objects
@ -69,7 +69,7 @@ index 3ab2e4c7..8daf2ddc 100644
/**
* Checks if this player is whitelisted or not
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index cd82ff64..2dd9ecfb 100644
index 99080b27..59c6a097 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1,10 +1,14 @@

Datei anzeigen

@ -1,4 +1,4 @@
From 83671e59f09544a3abe88beef5ed74eb454489f9 Mon Sep 17 00:00:00 2001
From a76bc604a4fc380fd9fbadf1c30959c6724bc8e0 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 30 Apr 2018 13:14:30 -0400
Subject: [PATCH] EndermanEscapeEvent
@ -96,5 +96,5 @@ index 00000000..0d15a8ab
+ }
+}
--
2.17.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From 285b525bcd3fb261160e811c4174086878e58d58 Mon Sep 17 00:00:00 2001
From ae31d989fe8cdbe48cb5f36db3e9fd7e1a913a97 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 30 Apr 2018 13:29:15 -0400
Subject: [PATCH] Enderman.teleportRandomly()
@ -6,7 +6,7 @@ Subject: [PATCH] Enderman.teleportRandomly()
Ability to trigger the vanilla "teleport randomly" mechanic of an enderman.
diff --git a/src/main/java/org/bukkit/entity/Enderman.java b/src/main/java/org/bukkit/entity/Enderman.java
index c8b4efde..bc2df752 100644
index ab827f83..459ec0c9 100644
--- a/src/main/java/org/bukkit/entity/Enderman.java
+++ b/src/main/java/org/bukkit/entity/Enderman.java
@@ -8,6 +8,17 @@ import org.bukkit.material.MaterialData;
@ -25,7 +25,7 @@ index c8b4efde..bc2df752 100644
+ // Paper end
+
/**
* Get the id and data of the block that the Enderman is carrying.
* Gets the id and data of the block that the Enderman is carrying.
*
--
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From b2de08cdbc2ad955bf2f000aa9377b6c23d82b8b Mon Sep 17 00:00:00 2001
From 5dbaacdda092901a3fbc3dc89d42fa53f9869cfe Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 30 Apr 2018 17:55:28 -0400
Subject: [PATCH] Additional world.getNearbyEntities API's
@ -6,7 +6,7 @@ Subject: [PATCH] Additional world.getNearbyEntities API's
Provides more methods to get nearby entities, and filter by types and predicates
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 6417cefa..9b49ed38 100644
index 4cc70326..97badc63 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -2,11 +2,14 @@ package org.bukkit;
@ -24,7 +24,7 @@ index 6417cefa..9b49ed38 100644
import org.bukkit.block.Biome;
import org.bukkit.block.Block;
@@ -492,6 +495,205 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -503,6 +506,205 @@ public interface World extends PluginMessageRecipient, Metadatable {
*/
public Collection<Entity> getEntitiesByClasses(Class<?>... classes);

Datei anzeigen

@ -1,4 +1,4 @@
From fab29e96a141caa798cc94404c6625cee93401c8 Mon Sep 17 00:00:00 2001
From 35e2de767d021fbac9df464ada1422955342bfd6 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 30 Apr 2018 19:27:31 -0400
Subject: [PATCH] Location.isChunkLoaded() API
@ -17,5 +17,5 @@ index 5c3d42cc..1ddebf3c 100644
public boolean equals(Object obj) {
if (obj == null) {
--
2.17.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From 571654be037ad2ec4d0457f75787e01209855415 Mon Sep 17 00:00:00 2001
From c6a4a37ea77dbc070c7c5297f41a2331a519968a Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 29 Aug 2017 23:58:48 -0400
Subject: [PATCH] Expand World.spawnParticle API and add Builder
@ -410,10 +410,10 @@ index 4d0acaf5..0ae85d85 100644
* Options which can be applied to redstone dust particles - a particle
* color and size.
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 9b49ed38..cc74cf53 100644
index 97badc63..a22e47ea 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -1733,7 +1733,31 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -1744,7 +1744,31 @@ public interface World extends PluginMessageRecipient, Metadatable {
* the type of this depends on {@link Particle#getDataType()}
* @param <T> Type
*/

Datei anzeigen

@ -1,4 +1,4 @@
From e92bcc778ef8292d527034e43d8621ce6759eb4c Mon Sep 17 00:00:00 2001
From 954a377e0960f18820e9ef8a3098d5f0358a284d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 1 May 2018 20:17:44 -0400
Subject: [PATCH] EndermanAttackPlayerEvent
@ -106,5 +106,5 @@ index 00000000..55912659
+ }
+}
--
2.17.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From 13d2ed50d6346f5c8eb7833dd99f7c61e8fd0b29 Mon Sep 17 00:00:00 2001
From 9e505b4488cc6cb5a94d213092c949a2895c7cad Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 1 May 2018 21:33:35 -0400
Subject: [PATCH] Close Plugin Class Loaders on Disable
@ -100,10 +100,10 @@ index bd0588a2..cb2b0b9c 100644
lookupNames.clear();
HandlerList.unregisterAll();
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
index 40fd71dc..3e87c3dd 100644
index 72d506d1..3cff01b6 100644
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
@@ -317,7 +317,7 @@ public final class JavaPluginLoader implements PluginLoader {
@@ -319,7 +319,7 @@ public final class JavaPluginLoader implements PluginLoader {
} catch (Throwable ex) {
server.getLogger().log(Level.SEVERE, "Error occurred while enabling " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex);
// Paper start - Disable plugins that fail to load
@ -112,7 +112,7 @@ index 40fd71dc..3e87c3dd 100644
return;
// Paper end
}
@@ -328,7 +328,13 @@ public final class JavaPluginLoader implements PluginLoader {
@@ -330,7 +330,13 @@ public final class JavaPluginLoader implements PluginLoader {
}
}
@ -126,7 +126,7 @@ index 40fd71dc..3e87c3dd 100644
Validate.isTrue(plugin instanceof JavaPlugin, "Plugin is not associated with this PluginLoader");
if (plugin.isEnabled()) {
@@ -355,6 +361,16 @@ public final class JavaPluginLoader implements PluginLoader {
@@ -357,6 +363,16 @@ public final class JavaPluginLoader implements PluginLoader {
for (String name : names) {
removeClass(name);
}
@ -144,5 +144,5 @@ index 40fd71dc..3e87c3dd 100644
}
}
--
2.17.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From 7afba907835ff028bc6df4bbc8a61c721913e328 Mon Sep 17 00:00:00 2001
From be2efe30ca0ea347d901f873e416d2e9b4973156 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 16 May 2018 20:26:16 -0400
Subject: [PATCH] WitchConsumePotionEvent
@ -115,5 +115,5 @@ index 00000000..6ef6367b
+ }
+}
--
2.17.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From 56bcd520031264156557ee37406ad31801e4615e Mon Sep 17 00:00:00 2001
From 4b9da1b2e0d668e73dba9a673984af7d0be648cd Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 16 May 2018 20:39:09 -0400
Subject: [PATCH] WitchThrowPotionEvent
@ -79,5 +79,5 @@ index 6ef6367b..77487e28 100644
@Override
--
2.17.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From b3a03a0fef09bf81b68cda7d9bbeca9fbe0620f8 Mon Sep 17 00:00:00 2001
From fedd7fd91d2e697183c38f16f58ba29791a4ab28 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 24 May 2018 21:01:13 -0400
Subject: [PATCH] Location.toBlockLocation/toCenterLocation()
@ -40,5 +40,5 @@ index 1ddebf3c..916238c4 100644
public boolean equals(Object obj) {
if (obj == null) {
--
2.17.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From 65451a70d7b009c6be27094e4bce37b1fa9e0055 Mon Sep 17 00:00:00 2001
From c6aee3dcccadea3bd3d205b5a57976282695ffd6 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 3 Jun 2018 04:10:13 -0400
Subject: [PATCH] PotionEffect clone methods
@ -40,5 +40,5 @@ index e7b86f85..53fb428f 100644
int type = getInt(map, TYPE);
PotionEffectType effect = PotionEffectType.getById(type);
--
2.17.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From 2f1e07e1372f23f43228dfa883f7c68b3693efc0 Mon Sep 17 00:00:00 2001
From 22191113338e641960b5fa666940463514f187cb Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 5 Jun 2018 22:47:08 -0400
Subject: [PATCH] WitchReadyPotionEvent
@ -83,5 +83,5 @@ index 00000000..5082662a
+ }
+}
--
2.17.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From bcf7365a6ac997f6b7e3276a64c010a244d5d642 Mon Sep 17 00:00:00 2001
From a51daa61f1e96d6ddce2e5a205da53be66293ba2 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 5 Jun 2018 22:59:50 -0400
Subject: [PATCH] ItemStack#getMaxItemUseDuration

Datei anzeigen

@ -1,4 +1,4 @@
From 68c89dbfd099490e99b0c394d263cb6f7ca05c7e Mon Sep 17 00:00:00 2001
From 15c16def63477471b46d0e8620061f60a87afb9e Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sat, 9 Jun 2018 13:08:21 +0100
Subject: [PATCH] Add EntityTeleportEndGatewayEvent
@ -40,5 +40,5 @@ index 00000000..80899ecb
+
+}
--
2.17.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From 80cc0c18e993c665f6aaf581b65e6c627a4a5805 Mon Sep 17 00:00:00 2001
From 3945a9c95cb03bb2b784ca479a563e7c58dcfeb8 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 16 Jun 2018 13:41:00 -0400
Subject: [PATCH] Add SentientNPC Interface to Entities
@ -152,17 +152,6 @@ index 0d87d203..d4eee19c 100644
/**
* @return The size of the slime
diff --git a/src/main/java/org/bukkit/entity/WaterMob.java b/src/main/java/org/bukkit/entity/WaterMob.java
index 3e89ca0c..8d105e72 100644
--- a/src/main/java/org/bukkit/entity/WaterMob.java
+++ b/src/main/java/org/bukkit/entity/WaterMob.java
@@ -3,4 +3,5 @@ package org.bukkit.entity;
/**
* Represents a Water Mob
*/
-public interface WaterMob extends LivingEntity {}
+public interface WaterMob extends LivingEntity, com.destroystokyo.paper.entity.SentientNPC { // Paper
+}
--
2.18.0

Datei anzeigen

@ -1,14 +1,14 @@
From cfe3f366cacec9477b3f69fdf9da3e70c11d1b09 Mon Sep 17 00:00:00 2001
From 118e1b69d8392749b045d2022d9acc9ccef3de5e Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sat, 16 Jun 2018 01:17:39 -0500
Subject: [PATCH] Make shield blocking delay configurable
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 42cf95e1..5921c952 100644
index 700ed29f..7ea7ccf0 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -385,5 +385,19 @@ public interface LivingEntity extends Attributable, Entity, Damageable, Projecti
@@ -401,5 +401,19 @@ public interface LivingEntity extends Attributable, Entity, Damageable, Projecti
* @param arrows Number of arrows to stick in this entity
*/
void setArrowsStuck(int arrows);
@ -29,5 +29,5 @@ index 42cf95e1..5921c952 100644
// Paper end
}
--
2.17.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From 700930b99045dbef4f1c65e7edda7d67edb3680c Mon Sep 17 00:00:00 2001
From c80d0e0381e3d1b215422e47bb2d3006a14eaf92 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 15 Jun 2013 19:52:04 -0400
Subject: [PATCH] EntityShootBowEvent consumeArrow and getArrowItem API
@ -39,5 +39,5 @@ index f8c91a13..c9eb75aa 100644
this.projectile = projectile;
this.force = force;
--
2.17.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From 8dae21e28f695e73fa04d18e1bdc00d2436cbf22 Mon Sep 17 00:00:00 2001
From a709f75d9481442be8e2c93a1aea4d952ae0ea0b Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Mon, 18 Jun 2018 00:41:46 -0500
Subject: [PATCH] Add "getNearbyXXX" methods to Location
@ -220,5 +220,5 @@ index 916238c4..c1689168 100644
@Override
public boolean equals(Object obj) {
--
2.17.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From 464e3985e5e2c29198f15414c94c9abb75d8aed3 Mon Sep 17 00:00:00 2001
From 92facfd2330948fd4cce26393a114a210833044c Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 18 Jun 2018 01:09:27 -0400
Subject: [PATCH] PlayerReadyArrowEvent
@ -101,5 +101,5 @@ index 00000000..c6add1b1
+ }
+}
--
2.17.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From ec1d10299d09e368cbafa5917ea3f34d11ad6ef5 Mon Sep 17 00:00:00 2001
From 09c65738e9deb67f2f09af03f8fdf7e55030239a Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de>
Date: Mon, 18 Jun 2018 15:40:39 +0200
Subject: [PATCH] Add EntityKnockbackByEntityEvent
@ -78,5 +78,5 @@ index 00000000..99f7ef70
+ }
+}
--
2.16.1.windows.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From 8e19f89eca90b5ea616a877f3a0d9c2379a42bda Mon Sep 17 00:00:00 2001
From fecce987f570eaaf23ffd3482a77dd263e98060f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 19 Dec 2017 16:24:42 -0500
Subject: [PATCH] Expand Explosions API
@ -95,10 +95,10 @@ index c1689168..d0d86e1a 100644
@Override
public boolean equals(Object obj) {
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index cc74cf53..2c1056d1 100644
index a22e47ea..04c174f7 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -914,6 +914,99 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -925,6 +925,99 @@ public interface World extends PluginMessageRecipient, Metadatable {
*/
public boolean createExplosion(Location loc, float power, boolean setFire);

Datei anzeigen

@ -1,4 +1,4 @@
From 4de5eaeaa68379e316e7c851d6e6e66f2ccdd996 Mon Sep 17 00:00:00 2001
From 88883a05c172e4fcf52f583bee5640675156df5b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 22 Jun 2018 22:59:18 -0400
Subject: [PATCH] ItemStack API additions for quantity/flags/lore

Datei anzeigen

@ -1,4 +1,4 @@
From d76f522b7f164a56a7f9651170e439739ef6e015 Mon Sep 17 00:00:00 2001
From b438ad8c47194fc97e310672e407a79feeee73dd Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 29 Jun 2018 00:19:19 -0400
Subject: [PATCH] LivingEntity Hand Raised/Item Use API
@ -6,7 +6,7 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API
How long an entity has raised hands to charge an attack or use an item
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 5921c952..5ccb8ef3 100644
index 7ea7ccf0..fea831e6 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -10,6 +10,7 @@ import org.bukkit.Material;
@ -17,7 +17,7 @@ index 5921c952..5ccb8ef3 100644
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
import org.bukkit.projectiles.ProjectileSource;
@@ -399,5 +400,27 @@ public interface LivingEntity extends Attributable, Entity, Damageable, Projecti
@@ -415,5 +416,27 @@ public interface LivingEntity extends Attributable, Entity, Damageable, Projecti
* @param delay Delay in ticks
*/
void setShieldBlockingDelay(int delay);

Datei anzeigen

@ -1,4 +1,4 @@
From d2a1657e1c25dc241d143ee6486513c024a5695b Mon Sep 17 00:00:00 2001
From c803b354f0aafbc01e813d8c2c1dae0c933251ba Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 26 Jun 2018 21:34:40 -0400
Subject: [PATCH] RangedEntity API

Datei anzeigen

@ -1,4 +1,4 @@
From 664f399ae92f6c74e4dd132d24c7abe3181c9fc6 Mon Sep 17 00:00:00 2001
From 24a9e71e950ac0ff3a753f35aed71fa638f71290 Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de>
Date: Sat, 30 Jun 2018 05:45:04 +0200
Subject: [PATCH] Improve ProjectileHitEvent to include the BlockFace where the
@ -53,5 +53,5 @@ index 35f4148b..db105e76 100644
* Gets the entity that was hit, if it was an entity that was hit.
*
--
2.16.1.windows.1
2.18.0

Datei anzeigen

@ -1,14 +1,14 @@
From 0db5338a2f3a427e6341c3e7bef58f9ec644a1e7 Mon Sep 17 00:00:00 2001
From e4c6eec43f3bdf6061fd52063aeb259f0de63da2 Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de>
Date: Tue, 3 Jul 2018 16:07:16 +0200
Subject: [PATCH] Add World.getEntity(UUID) API
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 2c1056d1..c98349cc 100644
index 04c174f7..121033e9 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -714,6 +714,16 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -725,6 +725,16 @@ public interface World extends PluginMessageRecipient, Metadatable {
*/
public Collection<Entity> getNearbyEntities(Location location, double x, double y, double z);

Datei anzeigen

@ -1,4 +1,4 @@
From eeec38e29cc2041734e18b87f80400f63fa7734c Mon Sep 17 00:00:00 2001
From 97af6ce4d4a8a8b3fdf945fb6c9b7e474def6c4c Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 3 Jul 2018 21:52:52 -0400
Subject: [PATCH] InventoryCloseEvent Reason API

Datei anzeigen

@ -1,4 +1,4 @@
From 99dd52878fbaede269af3c5cf38c179688506099 Mon Sep 17 00:00:00 2001
From 094ab21aca5c9ccbd61e95bf8f247a7f51526c03 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 4 Jul 2018 02:25:48 -0400
Subject: [PATCH] Entity#getChunk API

Datei anzeigen

@ -1,4 +1,4 @@
From 02a5c50ac1f88560d7555bc299b4d785f9aa63a4 Mon Sep 17 00:00:00 2001
From b906caf7828cd434767fed31635d853b077d7d09 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 4 Jul 2018 15:29:21 -0400
Subject: [PATCH] Vex#getOwner API

Datei anzeigen

@ -1,11 +1,11 @@
From 5258658fb54ee446f0043988e56a589b2e9ffdae Mon Sep 17 00:00:00 2001
From 05b70bbd7bf543c94832d486d58987b490016c8d Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 20:40:33 -0600
Subject: [PATCH] POM Changes
diff --git a/pom.xml b/pom.xml
index 1278c628e..4abf8dde7 100644
index 958eb763a..17bc80776 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,12 +1,12 @@
@ -17,7 +17,7 @@ index 1278c628e..4abf8dde7 100644
+ <groupId>com.destroystokyo.paper</groupId>
+ <artifactId>paper</artifactId>
<packaging>jar</packaging>
<version>1.12.2-R0.1-SNAPSHOT</version>
<version>1.13-pre7-R0.1-SNAPSHOT</version>
- <name>Spigot</name>
- <url>http://www.spigotmc.org</url>
+ <name>Paper</name>
@ -25,7 +25,7 @@ index 1278c628e..4abf8dde7 100644
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -21,8 +21,8 @@
@@ -21,16 +21,16 @@
</properties>
<parent>
@ -36,9 +36,8 @@ index 1278c628e..4abf8dde7 100644
<version>dev-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -36,8 +36,8 @@
<scope>compile</scope>
</dependency>
<dependencies>
<dependency>
- <groupId>org.spigotmc</groupId>
- <artifactId>spigot-api</artifactId>
@ -47,7 +46,7 @@ index 1278c628e..4abf8dde7 100644
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
@@ -108,34 +108,22 @@
@@ -101,34 +101,22 @@
<!-- This builds a completely 'ready to start' jar with all dependencies inside -->
<build>
@ -93,9 +92,9 @@ index 1278c628e..4abf8dde7 100644
</goals>
</execution>
</executions>
@@ -145,11 +133,12 @@
@@ -138,11 +126,12 @@
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<version>2.4</version>
<configuration>
+ <forceCreation>true</forceCreation> <!-- Required to prevent shading the jar multiple times -->
<archive>
@ -107,7 +106,7 @@ index 1278c628e..4abf8dde7 100644
<Implementation-Vendor>${maven.build.timestamp}</Implementation-Vendor>
<Specification-Title>Bukkit</Specification-Title>
<Specification-Version>${api.version}</Specification-Version>
@@ -189,19 +178,22 @@
@@ -182,19 +171,22 @@
<goal>shade</goal>
</goals>
<configuration>
@ -138,7 +137,7 @@ index 1278c628e..4abf8dde7 100644
<relocation>
<pattern>org.bukkit.craftbukkit</pattern>
<shadedPattern>org.bukkit.craftbukkit.v${minecraft_version}</shadedPattern>
@@ -227,18 +219,6 @@
@@ -220,18 +212,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
@ -157,7 +156,7 @@ index 1278c628e..4abf8dde7 100644
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -258,6 +238,11 @@
@@ -250,6 +230,11 @@
<profiles>
<profile>
<id>development</id>
@ -183,5 +182,5 @@ index 93046379d..674096cab 100644
if (stream != null) {
--
2.15.0
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From ea90973fc4de71ac189efc820005ea00590223b5 Mon Sep 17 00:00:00 2001
From 95d232b2294d238a0e77279b32e6870003ab28ba Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 21:02:09 -0600
Subject: [PATCH] Paper config files
@ -6,12 +6,15 @@ Subject: [PATCH] Paper config files
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
new file mode 100644
index 00000000..ecd1c65a
index 000000000..e8f7b7292
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
@@ -0,0 +1,193 @@
@@ -0,0 +1,237 @@
+package com.destroystokyo.paper;
+
+import com.google.common.base.Functions;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import net.minecraft.server.*;
+import org.apache.commons.lang3.tuple.MutablePair;
@ -44,20 +47,61 @@ index 00000000..ecd1c65a
+ @Override
+ public List<String> tabComplete(CommandSender sender, String alias, String[] args, Location location) throws IllegalArgumentException {
+ if (args.length <= 1)
+ return CommandAbstract.getListMatchingLast(args, "heap", "entity", "reload", "version");
+ return getListMatchingLast(args, "heap", "entity", "reload", "version");
+
+ switch (args[0].toLowerCase(Locale.ENGLISH))
+ {
+ case "entity":
+ if (args.length == 2)
+ return CommandAbstract.getListMatchingLast(args, "help", "list");
+ return getListMatchingLast(args, "help", "list");
+ if (args.length == 3)
+ return CommandAbstract.getListMatchingLast(args, EntityTypes.getEntityNameList().stream().map(MinecraftKey::toString).sorted().toArray(String[]::new));
+ return getListMatchingLast(args, EntityTypes.getEntityNameList().stream().map(MinecraftKey::toString).sorted().toArray(String[]::new));
+ break;
+ }
+ return Collections.emptyList();
+ }
+
+ // Code from Mojang - copyright them
+ public static List<String> getListMatchingLast(String[] args, String... matches) {
+ return getListMatchingLast(args, (Collection) Arrays.asList(matches));
+ }
+
+ public static boolean matches(String s, String s1) {
+ return s1.regionMatches(true, 0, s, 0, s.length());
+ }
+
+ public static List<String> getListMatchingLast(String[] strings, Collection<?> collection) {
+ String last = strings[strings.length - 1];
+ ArrayList<String> results = Lists.newArrayList();
+
+ if (!collection.isEmpty()) {
+ Iterator iterator = Iterables.transform(collection, Functions.toStringFunction()).iterator();
+
+ while (iterator.hasNext()) {
+ String s1 = (String) iterator.next();
+
+ if (matches(last, s1)) {
+ results.add(s1);
+ }
+ }
+
+ if (results.isEmpty()) {
+ iterator = collection.iterator();
+
+ while (iterator.hasNext()) {
+ Object object = iterator.next();
+
+ if (object instanceof MinecraftKey && matches(last, ((MinecraftKey) object).getKey())) {
+ results.add(String.valueOf(object));
+ }
+ }
+ }
+ }
+
+ return results;
+ }
+ // end copy stuff
+
+ @Override
+ public boolean execute(CommandSender sender, String commandLabel, String[] args) {
+ if (!testPermission(sender)) return true;
@ -139,7 +183,7 @@ index 00000000..ecd1c65a
+
+ List<Entity> entities = world.entityList;
+ entities.forEach(e -> {
+ MinecraftKey key = EntityTypes.getKey(e);
+ MinecraftKey key = new MinecraftKey(""); // TODO: update in next patch
+
+ MutablePair<Integer, Map<ChunkCoordIntPair, Integer>> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap()));
+ ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.getChunkX(), e.getChunkZ());
@ -205,7 +249,7 @@ index 00000000..ecd1c65a
+}
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
new file mode 100644
index 00000000..3d8ee9ed
index 000000000..3d8ee9ed3
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -0,0 +1,173 @@
@ -384,7 +428,7 @@ index 00000000..3d8ee9ed
+}
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
new file mode 100644
index 00000000..621bf705
index 000000000..621bf7051
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -0,0 +1,66 @@
@ -454,23 +498,11 @@ index 00000000..621bf705
+ return config.getString("world-settings." + worldName + "." + path, config.getString("world-settings.default." + path));
+ }
+}
diff --git a/src/main/java/net/minecraft/server/CommandAbstract.java b/src/main/java/net/minecraft/server/CommandAbstract.java
index 76501e29..76bf04f5 100644
--- a/src/main/java/net/minecraft/server/CommandAbstract.java
+++ b/src/main/java/net/minecraft/server/CommandAbstract.java
@@ -634,6 +634,7 @@ public abstract class CommandAbstract implements ICommand {
return s1.regionMatches(true, 0, s, 0, s.length());
}
+ public static List<String> getListMatchingLast(String[] args, String... matches) { return a(args, matches); } // Paper - OBFHELPER
public static List<String> a(String[] astring, String... astring1) {
return a(astring, (Collection) Arrays.asList(astring1));
}
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 8c5361d6..e1cb96a8 100644
index 8563712d9..9155aa727 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -184,6 +184,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -192,6 +192,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
org.spigotmc.SpigotConfig.init((File) options.valueOf("spigot-settings"));
org.spigotmc.SpigotConfig.registerCommands();
// Spigot end
@ -482,47 +514,51 @@ index 8c5361d6..e1cb96a8 100644
DedicatedServer.LOGGER.info("Generating keypair");
this.a(MinecraftEncryption.b());
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index b944be5c..40f06c5b 100644
index 015959b9f..f3f8b65be 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -122,9 +122,9 @@ public abstract class Entity implements ICommandListener {
private static final DataWatcherObject<Boolean> aD = DataWatcher.a(Entity.class, DataWatcherRegistry.h);
private static final DataWatcherObject<Boolean> aE = DataWatcher.a(Entity.class, DataWatcherRegistry.h);
public boolean aa;
- public int ab;
- public int ac;
- public int ad;
+ public int ab; public int getChunkX() { return ab; } // Paper - OBFHELPER
+ public int ac; public int getChunkY() { return ac; } // Paper - OBFHELPER
+ public int ad; public int getChunkZ() { return ad; } // Paper - OBFHELPER
public boolean ah;
@@ -134,9 +134,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
private static final DataWatcherObject<Boolean> aG = DataWatcher.a(Entity.class, DataWatcherRegistry.i);
private static final DataWatcherObject<Boolean> aH = DataWatcher.a(Entity.class, DataWatcherRegistry.i);
public boolean inChunk;
- public int ae;
- public int af;
- public int ag;
+ public int ae; public int getChunkX() { return ae; } // Paper - OBFHELPER
+ public int af; public int getChunkY() { return af; } // Paper - OBFHELPER
+ public int ag; public int getChunkZ() { return ag; } // Paper - OBFHELPER
public boolean ak;
public boolean impulse;
public int portalCooldown;
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
index eb6a955e..77b81a57 100644
index a0c701f35..557a3f97f 100644
--- a/src/main/java/net/minecraft/server/EntityTypes.java
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
@@ -21,6 +21,7 @@ public class EntityTypes {
public static final Set<MinecraftKey> d = Sets.newHashSet();
private static final List<String> g = Lists.newArrayList();
@@ -2,6 +2,8 @@ package net.minecraft.server;
+ @Nullable public static MinecraftKey getKey(Entity entity) { return a(entity); } // Paper - OBFHELPER
@Nullable
public static MinecraftKey a(Entity entity) {
return getName(entity.getClass());
@@ -78,6 +79,7 @@ public class EntityTypes {
return entity;
import com.mojang.datafixers.DataFixUtils;
import com.mojang.datafixers.types.Type;
+
+import java.util.Set;
import java.util.UUID;
import java.util.function.Function;
import javax.annotation.Nullable;
@@ -323,4 +325,10 @@ public class EntityTypes<T extends Entity> {
return new EntityTypes(this.a, this.b, this.c, this.d, type);
}
+ public static Set<MinecraftKey> getEntityNameList() { return a(); } // Paper - OBFHELPER
public static Set<MinecraftKey> a() {
return EntityTypes.d;
}
+
+ // Paper start
+ public static Set<MinecraftKey> getEntityNameList() {
+ return REGISTRY.keySet();
+ }
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 740633d9..843320ff 100644
index c7f5cba2d..330ea4e72 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -129,6 +129,8 @@ public abstract class World implements IBlockAccess {
@@ -127,6 +127,8 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
private int tickPosition;
public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot
@ -531,7 +567,7 @@ index 740633d9..843320ff 100644
public final SpigotTimings.WorldTimingsHandler timings; // Spigot
private boolean guardEntityList; // Spigot
public static boolean haveWeSilencedAPhysicsCrash;
@@ -151,6 +153,7 @@ public abstract class World implements IBlockAccess {
@@ -149,6 +151,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
protected World(IDataManager idatamanager, WorldData worlddata, WorldProvider worldprovider, MethodProfiler methodprofiler, boolean flag, ChunkGenerator gen, org.bukkit.World.Environment env) {
this.spigotConfig = new org.spigotmc.SpigotWorldConfig( worlddata.getName() ); // Spigot
@ -540,10 +576,10 @@ index 740633d9..843320ff 100644
this.world = new CraftWorld((WorldServer) this, gen, env);
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
index 0d320baa..b2bbccb5 100644
index 8b118e81e..dad2dc959 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -699,6 +699,7 @@ public final class CraftServer implements Server {
@@ -742,6 +742,7 @@ public final class CraftServer implements Server {
}
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
@ -551,7 +587,7 @@ index 0d320baa..b2bbccb5 100644
for (WorldServer world : console.worlds) {
world.worldData.setDifficulty(difficulty);
world.setSpawnFlags(monsters, animals);
@@ -714,6 +715,7 @@ public final class CraftServer implements Server {
@@ -757,6 +758,7 @@ public final class CraftServer implements Server {
world.ticksPerMonsterSpawns = this.getTicksPerMonsterSpawns();
}
world.spigotConfig.init(); // Spigot
@ -559,15 +595,15 @@ index 0d320baa..b2bbccb5 100644
}
pluginManager.clearPlugins();
@@ -721,6 +723,7 @@ public final class CraftServer implements Server {
@@ -764,6 +766,7 @@ public final class CraftServer implements Server {
resetRecipes();
reloadData();
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
+ com.destroystokyo.paper.PaperConfig.registerCommands(); // Paper
overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*");
ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions");
int pollCount = 0;
@@ -1783,4 +1786,26 @@ public final class CraftServer implements Server {
@@ -1879,4 +1882,26 @@ public final class CraftServer implements Server {
{
return spigot;
}
@ -595,7 +631,7 @@ index 0d320baa..b2bbccb5 100644
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index a151451d..0c5862a3 100644
index c234b8749..5e49bca8a 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -126,6 +126,14 @@ public class Main {
@ -614,7 +650,7 @@ index a151451d..0c5862a3 100644
};
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
index 01e73eb8..0b66f5e3 100644
index 9128f7754..7b1a9a8a0 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -39,31 +39,31 @@ public class SpigotWorldConfig
@ -655,5 +691,5 @@ index 01e73eb8..0b66f5e3 100644
config.addDefault( "world-settings.default." + path, def );
return config.getString( "world-settings." + worldName + "." + path, config.getString( "world-settings.default." + path ) );
--
2.15.1.windows.2
2.18.0

Datei anzeigen

@ -1,256 +1,19 @@
From f4214b8d94c5a9690fa2e41f7b547545dec26549 Mon Sep 17 00:00:00 2001
From 79ef4326d4c33e7ce3ee139aa0ed5c101762af81 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 30 Mar 2016 19:36:20 -0400
Subject: [PATCH] MC Dev fixes
diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java
index d4f412742..d55e180d7 100644
--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java
+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java
@@ -89,7 +89,7 @@ public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
return MoreObjects.toStringHelper(this).add("x", this.getX()).add("y", this.getY()).add("z", this.getZ()).toString();
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
index e8f7b7292..a0ebc1eaa 100644
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
@@ -234,4 +234,5 @@ public class PaperCommand extends Command {
Command.broadcastCommandMessage(sender, ChatColor.GREEN + "Paper config reload complete.");
}
- public int compareTo(Object object) {
+ public int compareTo(BaseBlockPosition object) { // Paper - decompile fix
return this.l((BaseBlockPosition) object);
+
}
}
diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java
index 62a9c92f8..1b7599769 100644
--- a/src/main/java/net/minecraft/server/BiomeBase.java
+++ b/src/main/java/net/minecraft/server/BiomeBase.java
@@ -46,7 +46,7 @@ public abstract class BiomeBase {
protected List<BiomeBase.BiomeMeta> w;
public static int a(BiomeBase biomebase) {
- return BiomeBase.REGISTRY_ID.a((Object) biomebase);
+ return BiomeBase.REGISTRY_ID.a(biomebase); // Paper - decompile fix
}
@Nullable
diff --git a/src/main/java/net/minecraft/server/CommandAbstract.java b/src/main/java/net/minecraft/server/CommandAbstract.java
index 76bf04f56..a99d0f870 100644
--- a/src/main/java/net/minecraft/server/CommandAbstract.java
+++ b/src/main/java/net/minecraft/server/CommandAbstract.java
@@ -231,7 +231,7 @@ public abstract class CommandAbstract implements ICommand {
}
if (object != null && oclass.isAssignableFrom(object.getClass())) {
- return (Entity) object;
+ return (T) object; // Paper - fix decompile error
} else {
throw new ExceptionEntityNotFound(s);
}
@@ -448,7 +448,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 {
@@ -541,7 +541,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) {
@@ -693,7 +693,7 @@ public abstract class CommandAbstract implements ICommand {
return this.getCommand().compareTo(icommand.getCommand());
}
- public int compareTo(Object object) {
+ public int compareTo(ICommand object) { // Paper - fix decompile error
return this.a((ICommand) object);
}
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
index 77b81a575..ba461ad48 100644
--- a/src/main/java/net/minecraft/server/EntityTypes.java
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
@@ -34,7 +34,7 @@ public class EntityTypes {
@Nullable
public static String b(Entity entity) {
- int i = EntityTypes.b.a((Object) entity.getClass());
+ int i = EntityTypes.b.a(entity.getClass()); // Paper - Decompile fix
return i == -1 ? null : (String) EntityTypes.g.get(i);
}
@@ -254,7 +254,7 @@ public class EntityTypes {
EntityTypes.d.add(minecraftkey);
while (EntityTypes.g.size() <= i) {
- EntityTypes.g.add((Object) null);
+ EntityTypes.g.add(null); // Paper - Decompile fix
}
EntityTypes.g.set(i, s1);
diff --git a/src/main/java/net/minecraft/server/LotoSelectorEntry.java b/src/main/java/net/minecraft/server/LotoSelectorEntry.java
index a540167d6..b2860555d 100644
--- a/src/main/java/net/minecraft/server/LotoSelectorEntry.java
+++ b/src/main/java/net/minecraft/server/LotoSelectorEntry.java
@@ -85,11 +85,11 @@ public abstract class LotoSelectorEntry {
return jsonobject;
}
- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) {
+ public JsonElement serialize(LotoSelectorEntry object, Type type, JsonSerializationContext jsonserializationcontext) {
return this.a((LotoSelectorEntry) object, type, jsonserializationcontext);
}
- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
+ public LotoSelectorEntry deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
return this.a(jsonelement, type, jsondeserializationcontext);
}
}
diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java
index 58f47d0de..8860a0129 100644
--- a/src/main/java/net/minecraft/server/RegistryBlockID.java
+++ b/src/main/java/net/minecraft/server/RegistryBlockID.java
@@ -8,7 +8,7 @@ import java.util.Iterator;
import java.util.List;
import javax.annotation.Nullable;
-public class RegistryBlockID<T> implements Registry<T> {
+public class RegistryBlockID<T> implements Registry { // Paper - Fix decompile error
private final IdentityHashMap<T, Integer> a;
private final List<T> b;
@@ -26,7 +26,7 @@ public class RegistryBlockID<T> implements Registry<T> {
this.a.put(t0, Integer.valueOf(i));
while (this.b.size() <= i) {
- this.b.add((Object) null);
+ this.b.add(null); // Paper - Fix decompile error
}
this.b.set(i, t0);
diff --git a/src/main/java/net/minecraft/server/ServerPing.java b/src/main/java/net/minecraft/server/ServerPing.java
index 2179664a0..981582212 100644
--- a/src/main/java/net/minecraft/server/ServerPing.java
+++ b/src/main/java/net/minecraft/server/ServerPing.java
@@ -57,7 +57,8 @@ public class ServerPing {
public Serializer() {}
- public ServerPing a(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
+ // Paper - decompile fix
+ public ServerPing deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
JsonObject jsonobject = ChatDeserializer.m(jsonelement, "status");
ServerPing serverping = new ServerPing();
@@ -80,7 +81,8 @@ public class ServerPing {
return serverping;
}
- public JsonElement a(ServerPing serverping, Type type, JsonSerializationContext jsonserializationcontext) {
+ // Paper - decompile fix
+ public JsonElement serialize(ServerPing serverping, Type type, JsonSerializationContext jsonserializationcontext) {
JsonObject jsonobject = new JsonObject();
if (serverping.a() != null) {
@@ -101,14 +103,6 @@ public class ServerPing {
return jsonobject;
}
-
- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) {
- return this.a((ServerPing) object, type, jsonserializationcontext);
- }
-
- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
- return this.a(jsonelement, type, jsondeserializationcontext);
- }
}
public static class ServerData {
@@ -133,27 +127,21 @@ public class ServerPing {
public Serializer() {}
- public ServerPing.ServerData a(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
+ // Paper - decompile fix
+ public ServerPing.ServerData deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
JsonObject jsonobject = ChatDeserializer.m(jsonelement, "version");
return new ServerPing.ServerData(ChatDeserializer.h(jsonobject, "name"), ChatDeserializer.n(jsonobject, "protocol"));
}
- public JsonElement a(ServerPing.ServerData serverping_serverdata, Type type, JsonSerializationContext jsonserializationcontext) {
+ // Paper - decompile fix
+ public JsonElement serialize(ServerPing.ServerData serverping_serverdata, Type type, JsonSerializationContext jsonserializationcontext) {
JsonObject jsonobject = new JsonObject();
jsonobject.addProperty("name", serverping_serverdata.a());
jsonobject.addProperty("protocol", Integer.valueOf(serverping_serverdata.getProtocolVersion()));
return jsonobject;
}
-
- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) {
- return this.a((ServerPing.ServerData) object, type, jsonserializationcontext);
- }
-
- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
- return this.a(jsonelement, type, jsondeserializationcontext);
- }
}
}
@@ -188,7 +176,8 @@ public class ServerPing {
public Serializer() {}
- public ServerPing.ServerPingPlayerSample a(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
+ // Paper - decompile fix
+ public ServerPing.ServerPingPlayerSample deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
JsonObject jsonobject = ChatDeserializer.m(jsonelement, "players");
ServerPing.ServerPingPlayerSample serverping_serverpingplayersample = new ServerPing.ServerPingPlayerSample(ChatDeserializer.n(jsonobject, "max"), ChatDeserializer.n(jsonobject, "online"));
@@ -212,7 +201,8 @@ public class ServerPing {
return serverping_serverpingplayersample;
}
- public JsonElement a(ServerPing.ServerPingPlayerSample serverping_serverpingplayersample, Type type, JsonSerializationContext jsonserializationcontext) {
+ // Paper - decompile fix
+ public JsonElement serialize(ServerPing.ServerPingPlayerSample serverping_serverpingplayersample, Type type, JsonSerializationContext jsonserializationcontext) {
JsonObject jsonobject = new JsonObject();
jsonobject.addProperty("max", Integer.valueOf(serverping_serverpingplayersample.a()));
@@ -234,14 +224,6 @@ public class ServerPing {
return jsonobject;
}
-
- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) {
- return this.a((ServerPing.ServerPingPlayerSample) object, type, jsonserializationcontext);
- }
-
- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
- return this.a(jsonelement, type, jsondeserializationcontext);
- }
}
}
}
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java
index f5bcbdbe1..3190cadfc 100644
--- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java
@@ -20,7 +20,7 @@ public class ItemFactoryTest extends AbstractTestingBase {
@Test
public void testKnownAttributes() throws Throwable {
- final ZipInputStream nmsZipStream = new ZipInputStream(CommandAbstract.class/* Magic class that isn't imported! */.getProtectionDomain().getCodeSource().getLocation().openStream());
+ final ZipInputStream nmsZipStream = new ZipInputStream(net.minecraft.server.HttpUtilities.class/* Magic class that isn't imported! */.getProtectionDomain().getCodeSource().getLocation().openStream()); // Paper
final Collection<String> names = new HashSet<String>();
for (ZipEntry clazzEntry; (clazzEntry = nmsZipStream.getNextEntry()) != null; ) {
final String entryName = clazzEntry.getName();
--
2.17.1
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From 41ab68c2065785eadb3187c52f0f1711df713537 Mon Sep 17 00:00:00 2001
From c6779cede78872af84c68078b5c44deff9b32089 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Fri, 24 Mar 2017 23:56:01 -0500
Subject: [PATCH] Paper Metrics
@ -671,10 +671,10 @@ index 3d8ee9ed3..5ab2cf6ee 100644
static void readConfig(Class<?> clazz, Object instance) {
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index 1b5158c0d..9ce3e1365 100644
index ac36ea08e..09100408e 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -83,6 +83,7 @@ public class SpigotConfig
@@ -84,6 +84,7 @@ public class SpigotConfig
MinecraftServer.getServer().server.getCommandMap().register( entry.getKey(), "Spigot", entry.getValue() );
}
@ -682,7 +682,7 @@ index 1b5158c0d..9ce3e1365 100644
if ( metrics == null )
{
try
@@ -94,6 +95,7 @@ public class SpigotConfig
@@ -95,6 +96,7 @@ public class SpigotConfig
Bukkit.getServer().getLogger().log( Level.SEVERE, "Could not start metrics service", ex );
}
}
@ -691,5 +691,5 @@ index 1b5158c0d..9ce3e1365 100644
static void readConfig(Class<?> clazz, Object instance)
--
2.17.1
2.18.0

Datei anzeigen

@ -1,30 +1,70 @@
From 471ff10805ee8ef1b93d19bd05a91b9f372417c9 Mon Sep 17 00:00:00 2001
From a0f2f840d13536973078d4e2700e65ceff320081 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 4 Jul 2018 01:40:13 -0400
Subject: [PATCH] Add MinecraftKey Information to Objects
Stores the reference to the objects respective MinecraftKey
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
index a0ebc1eaa..e4c771a39 100644
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
@@ -171,7 +171,7 @@ public class PaperCommand extends Command {
List<Entity> entities = world.entityList;
entities.forEach(e -> {
- MinecraftKey key = new MinecraftKey(""); // TODO: update in next patch
+ MinecraftKey key = e.getMinecraftKey();
MutablePair<Integer, Map<ChunkCoordIntPair, Integer>> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap()));
ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.getChunkX(), e.getChunkZ());
@@ -234,5 +234,5 @@ public class PaperCommand extends Command {
Command.broadcastCommandMessage(sender, ChatColor.GREEN + "Paper config reload complete.");
}
-
+
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index ed39b122e..3a8902bf1 100644
index 515c9d875..53fc37088 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -41,7 +41,7 @@ import org.bukkit.event.entity.EntityPortalEvent;
@@ -45,7 +45,7 @@ import org.bukkit.event.entity.EntityPortalEvent;
import org.bukkit.plugin.PluginManager;
// CraftBukkit end
-public abstract class Entity implements ICommandListener {
+public abstract class Entity implements ICommandListener, KeyedObject { // Paper
-public abstract class Entity implements INamableTileEntity, ICommandListener {
+public abstract class Entity implements INamableTileEntity, ICommandListener, KeyedObject { // Paper
// CraftBukkit start
private static final int CURRENT_LEVEL = 2;
@@ -1702,11 +1702,23 @@ public abstract class Entity implements ICommandListener {
@@ -73,7 +73,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
private static final AxisAlignedBB b = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
private static double c = 1.0D;
private static int entityCount;
- private final EntityTypes<?> g;
+ private final EntityTypes<?> g; public EntityTypes<?> getEntityType() { return g; } // Paper - OBFHELPER
private int id;
public boolean j;
public final List<Entity> passengers;
@@ -197,6 +197,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
} else {
this.defaultActivationState = false;
}
+ // Paper start
+ this.entityKey = EntityTypes.getName(entitytypes);
+ this.entityKeyString = this.entityKey != null ? this.entityKey.toString() : null;
+ // Paper end
// Spigot end
this.datawatcher = new DataWatcher(this);
@@ -1781,12 +1785,24 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
return true;
}
+ // Paper start
+ public final MinecraftKey entityKey = EntityTypes.getKey(this);
+ public final String entityKeyString = entityKey != null ? entityKey.toString() : null;
+ public final MinecraftKey entityKey;
+ public final String entityKeyString;
+
+ @Override
+ public MinecraftKey getMinecraftKey() {
@ -37,14 +77,28 @@ index ed39b122e..3a8902bf1 100644
+ }
@Nullable
public final String getSaveID() {
- MinecraftKey minecraftkey = EntityTypes.a(this);
- EntityTypes entitytypes = this.P();
- MinecraftKey minecraftkey = EntityTypes.getName(entitytypes);
-
- return minecraftkey == null ? null : minecraftkey.toString();
+ return entityKeyString;
- return entitytypes.a() && minecraftkey != null ? minecraftkey.toString() : null;
+ EntityTypes type = this.getEntityType();
+ return type != null && type.isPersistable() ? entityKeyString : null;
+ // Paper end
}
protected abstract void a(NBTTagCompound nbttagcompound);
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
index 557a3f97f..97cfd6695 100644
--- a/src/main/java/net/minecraft/server/EntityTypes.java
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
@@ -226,6 +226,7 @@ public class EntityTypes<T extends Entity> {
}
}
+ public boolean isPersistable() { return a(); } // Paper - OBFHELPER
public boolean a() {
return this.aV;
}
diff --git a/src/main/java/net/minecraft/server/KeyedObject.java b/src/main/java/net/minecraft/server/KeyedObject.java
new file mode 100644
index 000000000..61c2b993c
@ -60,10 +114,10 @@ index 000000000..61c2b993c
+ }
+}
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 5a5a588e7..672ba3134 100644
index 093e7eb7f..b09325097 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -7,7 +7,7 @@ import org.apache.logging.log4j.Logger;
@@ -7,11 +7,11 @@ import org.apache.logging.log4j.Logger;
import org.spigotmc.CustomTimingsHandler; // Spigot
import org.bukkit.inventory.InventoryHolder; // CraftBukkit
@ -72,15 +126,22 @@ index 5a5a588e7..672ba3134 100644
public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot
private static final Logger a = LogManager.getLogger();
@@ -27,8 +27,21 @@ public abstract class TileEntity {
TileEntity.f.a(new MinecraftKey(s), oclass);
- private final TileEntityTypes<?> e;
+ private final TileEntityTypes<?> e; public TileEntityTypes getTileEntityType() { return e; } // Paper - OBFHELPER
protected World world;
protected BlockPosition position;
protected boolean d;
@@ -21,8 +21,25 @@ public abstract class TileEntity {
public TileEntity(TileEntityTypes<?> tileentitytypes) {
this.position = BlockPosition.ZERO;
this.e = tileentitytypes;
+ // Paper start
+ this.tileEntityKey = TileEntityTypes.a(tileentitytypes);
+ this.tileEntityKeyString = tileEntityKey != null ? tileEntityKey.toString() : null;
}
- @Nullable
- public static MinecraftKey a(Class<? extends TileEntity> oclass) {
+ // Paper start
+ public final MinecraftKey tileEntityKey = getKey(this.getClass());
+ public final String tileEntityKeyString = tileEntityKey != null ? tileEntityKey.toString() : null;
+ public final MinecraftKey tileEntityKey;
+ public final String tileEntityKeyString;
+
+ @Override
+ public MinecraftKey getMinecraftKey() {
@ -91,11 +152,11 @@ index 5a5a588e7..672ba3134 100644
+ public String getMinecraftKeyString() {
+ return tileEntityKeyString;
+ }
+ @Nullable public static MinecraftKey getKey(Class<? extends TileEntity> oclass) { return a(oclass); } // Paper - OBFHELPER
+ @Nullable public static MinecraftKey a(Class<? extends TileEntity> oclass) {
return (MinecraftKey) TileEntity.f.b(oclass);
}
+ // Paper end
+
@Nullable
public World getWorld() {
return this.world;
--
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From 8613a4e2ae9a4bb6faef75b90d69728a88692dc1 Mon Sep 17 00:00:00 2001
From 9f15dcf160d9412793b5069dfa9d92e692ac1abc Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 4 Jul 2018 02:10:36 -0400
Subject: [PATCH] Store reference to current Chunk for Entity and Block
@ -8,22 +8,22 @@ This enables us a fast reference to the entities current chunk instead
of having to look it up by hashmap lookups.
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 4bbebb25a..68008fe6a 100644
index 9500c456d..120e66c78 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -25,7 +25,7 @@ public class Chunk {
private final byte[] g;
private final int[] h;
private final boolean[] i;
@@ -33,7 +33,7 @@ public class Chunk implements IChunkAccess {
private final BiomeBase[] g;
private final boolean[] h;
private final Map<BlockPosition, NBTTagCompound> i;
- private boolean j;
+ private boolean j; public boolean isLoaded() { return j; } // Paper - OBFHELPER
public final World world;
public final int[] heightMap;
public final Map<HeightMap.Type, HeightMap> heightMap;
public final int locX;
@@ -33,6 +33,30 @@ public class Chunk {
private boolean m;
public final Map<BlockPosition, TileEntity> tileEntities;
public final List<Entity>[] entitySlices; // Spigot
@@ -63,7 +63,30 @@ public class Chunk implements IChunkAccess {
// CraftBukkit start - Neighbor loaded cache for chunk lighting and entity ticking
private int neighbors = 0x1 << 12;
public long chunkKey;
+ // Paper start
+ private class TileEntityHashMap extends java.util.HashMap<BlockPosition, TileEntity> {
+ @Override
@ -37,7 +37,7 @@ index 4bbebb25a..68008fe6a 100644
+ }
+ return replaced;
+ }
+
+ @Override
+ public TileEntity remove(Object key) {
+ TileEntity removed = super.remove(key);
@ -48,46 +48,52 @@ index 4bbebb25a..68008fe6a 100644
+ }
+ }
+ // Paper end
private boolean done;
private boolean lit;
private boolean r;
@@ -80,7 +104,7 @@ public class Chunk {
this.g = new byte[256];
this.h = new int[256];
this.i = new boolean[256];
public boolean areNeighborsLoaded(final int radius) {
switch (radius) {
case 2:
@@ -94,7 +117,7 @@ public class Chunk implements IChunkAccess {
this.h = new boolean[256];
this.i = Maps.newHashMap();
this.heightMap = Maps.newHashMap();
- this.tileEntities = Maps.newHashMap();
+ this.tileEntities = new TileEntityHashMap(); // Paper
this.x = 4096;
this.y = Queues.newConcurrentLinkedQueue();
this.entitySlices = (List[]) (new List[16]); // Spigot
@@ -624,6 +648,9 @@ public class Chunk {
this.entityCount.adjustOrPutValue( creatureType.a(), 1, 1 );
}
}
this.q = Maps.newHashMap();
this.r = Maps.newHashMap();
this.s = new ShortList[16];
@@ -646,6 +669,9 @@ public class Chunk implements IChunkAccess {
entity.af = k;
entity.ag = this.locZ;
this.entitySlices[k].add(entity);
+ // Paper start
+ entity.setCurrentChunk(this);
+ // Paper end
// Spigot end
}
@@ -656,6 +683,9 @@ public class Chunk {
this.entityCount.adjustValue( creatureType.a(), -1 );
}
public void a(HeightMap.Type heightmap_type, long[] along) {
@@ -664,8 +690,12 @@ public class Chunk implements IChunkAccess {
if (i >= this.entitySlices.length) {
i = this.entitySlices.length - 1;
}
-
- this.entitySlices[i].remove(entity);
+ // Paper start
+ if (!this.entitySlices[i].remove(entity)) {
+ return;
+ }
+ entity.setCurrentChunk(null);
+ // Paper end
// Spigot end
}
public boolean c(BlockPosition blockposition) {
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 3a8902bf1..4af566b36 100644
index 53fc37088..1ef52cc6d 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1703,6 +1703,38 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper
@@ -1786,6 +1786,40 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
}
// Paper start
+
+ private java.lang.ref.WeakReference<Chunk> currentChunk = null;
+
+ public void setCurrentChunk(Chunk chunk) {
@ -120,17 +126,19 @@ index 3a8902bf1..4af566b36 100644
+ public Chunk getChunkAtLocation() {
+ return getCurrentChunkAt((int)Math.floor(locX) >> 4, (int)Math.floor(locZ) >> 4);
+ }
public final MinecraftKey entityKey = EntityTypes.getKey(this);
public final String entityKeyString = entityKey != null ? entityKey.toString() : null;
+
public final MinecraftKey entityKey;
public final String entityKeyString;
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 672ba3134..d7132c3c0 100644
index b09325097..b992360ac 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -28,6 +28,14 @@ public abstract class TileEntity implements KeyedObject {
@@ -38,6 +38,15 @@ public abstract class TileEntity implements KeyedObject {
public String getMinecraftKeyString() {
return tileEntityKeyString;
}
// Paper start
+
+ private java.lang.ref.WeakReference<Chunk> currentChunk = null;
+ public Chunk getCurrentChunk() {
+ final Chunk chunk = currentChunk != null ? currentChunk.get() : world.getChunkIfLoaded(position.getX() >> 4, position.getZ() >> 4);
@ -139,11 +147,11 @@ index 672ba3134..d7132c3c0 100644
+ public void setCurrentChunk(Chunk chunk) {
+ this.currentChunk = chunk != null ? new java.lang.ref.WeakReference<>(chunk) : null;
+ }
public final MinecraftKey tileEntityKey = getKey(this.getClass());
public final String tileEntityKeyString = tileEntityKey != null ? tileEntityKey.toString() : null;
// Paper end
@Nullable
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index c5a194ffe..833e3111d 100644
index 70143c4d3..1e3675e4f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -9,6 +9,7 @@ import java.util.UUID;
@ -154,7 +162,7 @@ index c5a194ffe..833e3111d 100644
import org.bukkit.EntityEffect;
import org.bukkit.Location;
import org.bukkit.Server;
@@ -39,6 +40,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@@ -40,6 +41,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
this.entity = entity;
}

Datei anzeigen

@ -1,4 +1,4 @@
From 9638089fa0dcff84f21fc77d17a984b430eb3423 Mon Sep 17 00:00:00 2001
From fd0ed98b73db46e809681e54d3b823d7b710b507 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 4 Jul 2018 02:13:59 -0400
Subject: [PATCH] Store counts for each Entity/Block Entity Type
@ -6,12 +6,12 @@ Subject: [PATCH] Store counts for each Entity/Block Entity Type
Opens door for future patches to optimize performance
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index b40e60942..952c96c0c 100644
index 120e66c78..0ae780c8e 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -34,15 +34,19 @@ public class Chunk {
public final Map<BlockPosition, TileEntity> tileEntities;
public final List<Entity>[] entitySlices; // Spigot
@@ -64,15 +64,19 @@ public class Chunk implements IChunkAccess {
private int neighbors = 0x1 << 12;
public long chunkKey;
// Paper start
+ public final co.aikar.util.Counter<String> entityCounts = new co.aikar.util.Counter<>();
+ public final co.aikar.util.Counter<String> tileEntityCounts = new co.aikar.util.Counter<>();
@ -29,7 +29,7 @@ index b40e60942..952c96c0c 100644
}
return replaced;
}
@@ -52,6 +56,7 @@ public class Chunk {
@@ -82,6 +86,7 @@ public class Chunk implements IChunkAccess {
TileEntity removed = super.remove(key);
if (removed != null) {
removed.setCurrentChunk(null);
@ -37,22 +37,22 @@ index b40e60942..952c96c0c 100644
}
return removed;
}
@@ -650,6 +655,7 @@ public class Chunk {
}
@@ -671,6 +676,7 @@ public class Chunk implements IChunkAccess {
this.entitySlices[k].add(entity);
// Paper start
entity.setCurrentChunk(this);
+ entityCounts.increment(entity.entityKeyString);
// Paper end
// Spigot end
}
@@ -685,6 +691,7 @@ public class Chunk {
@@ -695,6 +701,7 @@ public class Chunk implements IChunkAccess {
return;
}
// Paper start
entity.setCurrentChunk(null);
+ entityCounts.decrement(entity.entityKeyString);
// Paper end
// Spigot end
}
--
2.18.0

Datei anzeigen

@ -1,24 +1,24 @@
From 5e79bbc7dee8f1a2e42930e6899b7cf8e928b548 Mon Sep 17 00:00:00 2001
From d39477408cd88601ee08c0c33ba9a3e56a588f8b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 20:55:47 -0400
Subject: [PATCH] MC Utils
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 952c96c0c..cbb1f2cae 100644
index 0ae780c8e..3b97981bc 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -20,7 +20,7 @@ import org.bukkit.Server; // CraftBukkit
public class Chunk {
@@ -28,7 +28,7 @@ import com.google.common.collect.Lists; // CraftBukkit
public class Chunk implements IChunkAccess {
private static final Logger e = LogManager.getLogger();
- public static final ChunkSection a = null;
+ public static final ChunkSection a = null; public static final ChunkSection EMPTY_CHUNK_SECTION = Chunk.a; // Paper - OBFHELPER
private final ChunkSection[] sections;
private final byte[] g;
private final int[] h;
@@ -712,6 +712,7 @@ public class Chunk {
return !block.isTileEntity() ? null : ((ITileEntity) block).a(this.world, iblockdata.getBlock().toLegacyData(iblockdata));
private final BiomeBase[] g;
private final boolean[] h;
@@ -730,6 +730,7 @@ public class Chunk implements IChunkAccess {
return this.a(blockposition, Chunk.EnumTileEntityState.CHECK);
}
+ @Nullable public final TileEntity getTileEntityImmediately(BlockPosition pos) { return this.a(pos, EnumTileEntityState.IMMEDIATE); } // Paper - OBFHELPER
@ -26,11 +26,11 @@ index 952c96c0c..cbb1f2cae 100644
public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) {
// CraftBukkit start
diff --git a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
index 239440888..aafd23beb 100644
index 00a530c51..2947d9ff6 100644
--- a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
+++ b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
@@ -15,6 +15,8 @@ public class ChunkCoordIntPair {
this.z = blockposition.getZ() >> 4;
@@ -24,6 +24,8 @@ public class ChunkCoordIntPair {
return a(this.x, this.z);
}
+ public static long asLong(final BlockPosition pos) { return a(pos.getX() >> 4, pos.getZ() >> 4); } // Paper - OBFHELPER
@ -38,49 +38,51 @@ index 239440888..aafd23beb 100644
public static long a(int i, int j) {
return (long) i & 4294967295L | ((long) j & 4294967295L) << 32;
}
diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java
index 1f2fe87b6..2cb462b8e 100644
--- a/src/main/java/net/minecraft/server/DataPaletteBlock.java
+++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java
@@ -5,7 +5,7 @@ import javax.annotation.Nullable;
public class DataPaletteBlock implements DataPaletteExpandable {
private static final DataPalette d = new DataPaletteGlobal();
- protected static final IBlockData a = Blocks.AIR.getBlockData();
+ protected static final IBlockData a = Blocks.AIR.getBlockData(); public static final IBlockData DEFAULT_BLOCK_DATA = DataPaletteBlock.a; // Paper - OBFHELPER
protected DataBits b;
protected DataPalette c;
private int e;
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
index ba461ad48..2359b31f4 100644
index 97cfd6695..05ed0abe7 100644
--- a/src/main/java/net/minecraft/server/EntityTypes.java
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
@@ -13,6 +13,11 @@ import org.apache.logging.log4j.Logger;
@@ -3,6 +3,7 @@ package net.minecraft.server;
import com.mojang.datafixers.DataFixUtils;
import com.mojang.datafixers.types.Type;
public class EntityTypes {
+import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.util.function.Function;
@@ -121,9 +122,17 @@ public class EntityTypes<T extends Entity> {
public static <T extends Entity> EntityTypes<T> a(String s, EntityTypes.a<T> entitytypes_a) {
EntityTypes entitytypes = entitytypes_a.a(s);
- EntityTypes.REGISTRY.a(new MinecraftKey(s), entitytypes);
+ // Paper start
+ MinecraftKey key = new MinecraftKey(s);
+ Class<? extends T> entityClass = entitytypes_a.getEntityClass();
+ EntityTypes.REGISTRY.a(key, entitytypes);
+ clsToKeyMap.put(entityClass, key);
+ clsToTypeMap.put(entityClass, org.bukkit.entity.EntityType.fromName(s));
return entitytypes;
}
+ public static Map<Class<? extends Entity>, MinecraftKey> clsToKeyMap = new java.util.HashMap<>();
+ public static Map<Class<? extends Entity>, org.bukkit.entity.EntityType> clsToTypeMap = new java.util.HashMap<>();
+ // Paper end
+
public static final MinecraftKey a = new MinecraftKey("lightning_bolt");
private static final MinecraftKey e = new MinecraftKey("player");
private static final Logger f = LogManager.getLogger();
@@ -252,6 +257,8 @@ public class EntityTypes {
EntityTypes.b.a(i, minecraftkey, oclass);
EntityTypes.d.add(minecraftkey);
+ clsToKeyMap.put(oclass, minecraftkey); // Paper
+ clsToTypeMap.put(oclass, org.bukkit.entity.EntityType.fromName(s)); // Paper
@Nullable
public static MinecraftKey getName(EntityTypes<?> entitytypes) {
@@ -278,7 +287,7 @@ public class EntityTypes<T extends Entity> {
while (EntityTypes.g.size() <= i) {
EntityTypes.g.add(null); // Paper - Decompile fix
public static class a<T extends Entity> {
- private final Class<? extends T> a;
+ private final Class<? extends T> a; public Class<? extends T> getEntityClass() { return a; } // Paper - OBFHELPER
private final Function<? super World, ? extends T> b;
private boolean c = true;
private boolean d = true;
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index 76bfbaa81..82d72ea15 100644
index cc96294f4..7f249a975 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -14,6 +14,7 @@ import org.bukkit.Location;
@@ -25,6 +25,7 @@ import org.bukkit.Location;
import org.bukkit.TreeType;
import org.bukkit.block.BlockState;
import org.bukkit.craftbukkit.block.CraftBlockState;
@ -88,8 +90,8 @@ index 76bfbaa81..82d72ea15 100644
import org.bukkit.craftbukkit.util.CraftMagicNumbers;
import org.bukkit.entity.Player;
import org.bukkit.event.world.StructureGrowEvent;
@@ -583,6 +584,17 @@ public final class ItemStack {
return this.tag != null ? this.tag.getList("ench", 10) : new NBTTagList();
@@ -547,6 +548,17 @@ public final class ItemStack {
return this.tag != null ? this.tag.getList("Enchantments", 10) : new NBTTagList();
}
+ // Paper start - (this is just a good no conflict location)
@ -314,19 +316,19 @@ index 000000000..a4b0901cf
+ }
+}
diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java
index aa1ca6d91..e15c23367 100644
index 7fc9b5ff3..e658816c2 100644
--- a/src/main/java/net/minecraft/server/NBTTagCompound.java
+++ b/src/main/java/net/minecraft/server/NBTTagCompound.java
@@ -22,7 +22,7 @@ public class NBTTagCompound extends NBTBase {
@@ -24,7 +24,7 @@ public class NBTTagCompound implements NBTBase {
private static final Logger b = LogManager.getLogger();
private static final Pattern c = Pattern.compile("[A-Za-z0-9._+-]+");
private static final Logger f = LogManager.getLogger();
private static final Pattern g = Pattern.compile("[A-Za-z0-9._+-]+");
- private final Map<String, NBTBase> map = Maps.newHashMap();
+ public final Map<String, NBTBase> map = Maps.newHashMap(); // Paper
public NBTTagCompound() {}
@@ -94,11 +94,13 @@ public class NBTTagCompound extends NBTBase {
@@ -96,11 +96,13 @@ public class NBTTagCompound implements NBTBase {
this.map.put(s, new NBTTagLong(i));
}
@ -340,24 +342,54 @@ index aa1ca6d91..e15c23367 100644
@Nullable
public UUID a(String s) {
return new UUID(this.getLong(s + "Most"), this.getLong(s + "Least"));
@@ -492,8 +494,4 @@ public class NBTTagCompound implements NBTBase {
return chatcomponenttext;
}
}
-
- public NBTBase clone() {
- return this.clone();
- }
}
diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java
index e0cb6aa6e..bc6383669 100644
index b3c944d70..e56d4836d 100644
--- a/src/main/java/net/minecraft/server/NBTTagList.java
+++ b/src/main/java/net/minecraft/server/NBTTagList.java
@@ -13,7 +13,7 @@ import org.apache.logging.log4j.Logger;
public class NBTTagList extends NBTBase {
@@ -14,7 +14,7 @@ import org.apache.logging.log4j.Logger;
public class NBTTagList extends NBTList<NBTBase> {
private static final Logger b = LogManager.getLogger();
private static final Logger f = LogManager.getLogger();
- private List<NBTBase> list = Lists.newArrayList();
+ public List<NBTBase> list = Lists.newArrayList(); // Paper
private byte type = 0;
public NBTTagList() {}
@@ -297,20 +297,4 @@ public class NBTTagList extends NBTList<NBTBase> {
public NBTBase clone() {
return this.c();
}
-
- public Object remove(int i) {
- return this.remove(i);
- }
-
- public Object set(int i, Object object) {
- return this.set(i, (NBTBase) object);
- }
-
- public Object get(int i) {
- return this.get(i);
- }
-
- public boolean add(Object object) {
- return this.add((NBTBase) object);
- }
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 8cede938a..cd2d58bfb 100644
index 3cb868299..227bc857e 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -65,9 +65,9 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -66,9 +66,9 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
private final MinecraftServer minecraftServer;
public EntityPlayer player;
private int e;
@ -370,14 +402,6 @@ index 8cede938a..cd2d58bfb 100644
// CraftBukkit start - multithreaded fields
private volatile int chatThrottle;
private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle");
@@ -2158,6 +2158,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
}
+ private long getCurrentMillis() { return d(); } // Paper - OBFHELPER
private long d() {
return System.nanoTime() / 1000000L;
}
--
2.18.0

Datei-Diff unterdrückt, da er zu groß ist Diff laden

Datei anzeigen

@ -1,4 +1,4 @@
From 1f84a29839c470f5bdc16ac91c21a3dccd8650eb Mon Sep 17 00:00:00 2001
From 40b2ff991bc8a48ef7f31000cd11b4f705aea329 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 13:02:51 -0600
Subject: [PATCH] Configurable cactus and reed natural growth heights
@ -23,10 +23,10 @@ index 621bf7051..4a692ac1b 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java
index 64b7d08fa..d8fb87f7a 100644
index 54685157f..83fb53643 100644
--- a/src/main/java/net/minecraft/server/BlockCactus.java
+++ b/src/main/java/net/minecraft/server/BlockCactus.java
@@ -28,7 +28,7 @@ public class BlockCactus extends Block {
@@ -29,7 +29,7 @@ public class BlockCactus extends Block {
;
}
@ -36,10 +36,10 @@ index 64b7d08fa..d8fb87f7a 100644
if (j >= (byte) range(3, ((100.0F / world.spigotConfig.cactusModifier) * 15) + 0.5F, 15)) { // Spigot
diff --git a/src/main/java/net/minecraft/server/BlockReed.java b/src/main/java/net/minecraft/server/BlockReed.java
index 57f24f55d..d19dce839 100644
index 313821d52..c4e7f318d 100644
--- a/src/main/java/net/minecraft/server/BlockReed.java
+++ b/src/main/java/net/minecraft/server/BlockReed.java
@@ -28,7 +28,7 @@ public class BlockReed extends Block {
@@ -25,7 +25,7 @@ public class BlockReed extends Block {
;
}

Datei anzeigen

@ -1,4 +1,4 @@
From 7204f6dc262ca2d75ae865a2a27ea9a89cbd2b86 Mon Sep 17 00:00:00 2001
From b9f4abe2c78d9c5499c1249747e038186fb27393 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 13:09:16 -0600
Subject: [PATCH] Configurable baby zombie movement speed
@ -20,27 +20,27 @@ index 4a692ac1b..d44cacc7e 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
index 11c0f24f1..277f1414a 100644
index b24e73f2c..268e4d57b 100644
--- a/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 {
@@ -17,7 +17,7 @@ public class EntityZombie extends EntityMonster {
protected static final IAttribute a = (new AttributeRanged((IAttribute) null, "zombie.spawnReinforcements", 0.0D, 0.0D, 1.0D)).a("Spawn Reinforcements Chance");
private static final UUID b = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836");
- private static final AttributeModifier c = new AttributeModifier(EntityZombie.b, "Baby speed boost", 0.5D, 1);
+ private final AttributeModifier c = new AttributeModifier(EntityZombie.b, "Baby speed boost", world.paperConfig.babyZombieMovementSpeed, 1); // Paper - Remove static - Make baby speed configurable
private static final DataWatcherObject<Boolean> bx = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.h);
private static final DataWatcherObject<Integer> by = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.b);
private static final DataWatcherObject<Boolean> bz = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.h);
@@ -102,9 +102,9 @@ public class EntityZombie extends EntityMonster {
protected static final IAttribute c = (new AttributeRanged((IAttribute) null, "zombie.spawnReinforcements", 0.0D, 0.0D, 1.0D)).a("Spawn Reinforcements Chance");
private static final UUID a = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836");
- private static final AttributeModifier b = new AttributeModifier(EntityZombie.a, "Baby speed boost", 0.5D, 1);
+ private final AttributeModifier babyModifier = new AttributeModifier(EntityZombie.a, "Baby speed boost", world.paperConfig.babyZombieMovementSpeed, 1); // Paper - Remove static - Make baby speed configurable
private static final DataWatcherObject<Boolean> bC = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i);
private static final DataWatcherObject<Integer> bD = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.b);
private static final DataWatcherObject<Boolean> bE = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i);
@@ -127,9 +127,9 @@ public class EntityZombie extends EntityMonster {
if (this.world != null && !this.world.isClientSide) {
AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED);
- attributeinstance.c(EntityZombie.c);
+ attributeinstance.c(this.c);
- attributeinstance.c(EntityZombie.b);
+ attributeinstance.c(this.babyModifier); // Paper
if (flag) {
- attributeinstance.b(EntityZombie.c);
+ attributeinstance.b(this.c);
- attributeinstance.b(EntityZombie.b);
+ attributeinstance.b(this.babyModifier); // Paper
}
}

Datei anzeigen

@ -1,4 +1,4 @@
From 00a626d4786a4294acd9328c2b5c05e257f262dc Mon Sep 17 00:00:00 2001
From 4d52eec46bc302c6dfccc2548eaa454640a703fb Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 13:14:11 -0600
Subject: [PATCH] Configurable fishing time ranges
@ -22,16 +22,16 @@ index d44cacc7e..45bddf3f4 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
index b4d3bcb41..339d1f1b1 100644
index 2512ad353..866f41980 100644
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
@@ -381,7 +381,7 @@ public class EntityFishingHook extends Entity {
this.at = MathHelper.nextInt(this.random, 20, 80);
@@ -386,7 +386,7 @@ public class EntityFishingHook extends Entity {
this.aw = MathHelper.nextInt(this.random, 20, 80);
}
} else {
- this.h = MathHelper.nextInt(this.random, 100, 600);
+ this.h = MathHelper.nextInt(this.random, world.paperConfig.fishingMinTicks, world.paperConfig.fishingMaxTicks); // Paper
this.h -= this.ax * 20 * 5;
this.h -= this.aA * 20 * 5;
}
}
--

Datei anzeigen

@ -1,4 +1,4 @@
From 0e0640641bbc9a2e2089ae1846e2d7899bcd9e5e Mon Sep 17 00:00:00 2001
From 505cb60061caae705dbb6fccad730e81f9634672 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 13:24:16 -0600
Subject: [PATCH] Allow nerfed mobs to jump
@ -19,7 +19,7 @@ index 45bddf3f4..1d9dd0e0b 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/ControllerJump.java b/src/main/java/net/minecraft/server/ControllerJump.java
index 4f2fa59ac..8af52a61f 100644
index 4ed5192c6..489beed26 100644
--- a/src/main/java/net/minecraft/server/ControllerJump.java
+++ b/src/main/java/net/minecraft/server/ControllerJump.java
@@ -13,6 +13,7 @@ public class ControllerJump {
@ -28,21 +28,21 @@ index 4f2fa59ac..8af52a61f 100644
+ public void jumpIfSet() { this.b(); } // Paper - OBFHELPER
public void b() {
this.b.l(this.a);
this.b.o(this.a);
this.a = false;
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 3c48d9463..7b02b253c 100644
index 5de20721c..27b01d1ee 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -46,6 +46,7 @@ public abstract class EntityInsentient extends EntityLiving {
private boolean bE;
private Entity leashHolder;
private NBTTagCompound bG;
@@ -32,6 +32,7 @@ public abstract class EntityInsentient extends EntityLiving {
private final EntityAIBodyControl b;
protected NavigationAbstract navigation;
public PathfinderGoalSelector goalSelector;
+ @Nullable public PathfinderGoalFloat goalFloat; // Paper
public EntityInsentient(World world) {
super(world);
@@ -651,6 +652,12 @@ public abstract class EntityInsentient extends EntityLiving {
public PathfinderGoalSelector targetSelector;
private EntityLiving goalTarget;
private final EntitySenses bC;
@@ -641,6 +642,12 @@ public abstract class EntityInsentient extends EntityLiving {
// Spigot Start
if ( this.fromMobSpawner )
{
@ -56,7 +56,7 @@ index 3c48d9463..7b02b253c 100644
}
// Spigot End
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
index b3b303b3b..fc6c3bf71 100644
index 4d8876cae..2cb9d1b5a 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
@@ -6,6 +6,7 @@ public class PathfinderGoalFloat extends PathfinderGoal {
@ -73,7 +73,7 @@ index b3b303b3b..fc6c3bf71 100644
+ public boolean validConditions() { return this.a(); } // Paper - OBFHELPER
public boolean a() {
return this.a.isInWater() || this.a.au();
return this.a.isInWater() || this.a.ax();
}
+ public void update() { this.e(); } // Paper - OBFHELPER

Datei anzeigen

@ -1,4 +1,4 @@
From 454d4de322b765150a71a124e972aa3853dcb2d5 Mon Sep 17 00:00:00 2001
From 48f4ebe1a46124663d68afc009c623f0be3b87df Mon Sep 17 00:00:00 2001
From: Suddenly <suddenly@suddenly.coffee>
Date: Tue, 1 Mar 2016 13:51:54 -0600
Subject: [PATCH] Add configurable despawn distances for living entities
@ -30,10 +30,10 @@ index 1d9dd0e0b..22c1113a1 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 7b02b253c..94967e6b6 100644
index 27b01d1ee..c8c191667 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -630,13 +630,13 @@ public abstract class EntityInsentient extends EntityLiving {
@@ -620,13 +620,13 @@ public abstract class EntityInsentient extends EntityLiving {
double d2 = entityhuman.locZ - this.locZ;
double d3 = d0 * d0 + d1 * d1 + d2 * d2;

Datei anzeigen

@ -1,4 +1,4 @@
From 84cf59e1a2697bfa6e9319344d57f2363e4a6b25 Mon Sep 17 00:00:00 2001
From 9a9d8af54bf1def19ceb5c483f07e8dbf8654f52 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Thu, 3 Mar 2016 03:53:43 -0600
Subject: [PATCH] Allow for toggling of spawn chunks
@ -20,10 +20,10 @@ index 22c1113a1..0094d1a87 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index d902e2630..759964b0f 100644
index e6b916a5d..05d363171 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -202,6 +202,7 @@ public abstract class World implements IBlockAccess {
@@ -199,6 +199,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
this.getServer().addWorld(this.world);
// CraftBukkit end
timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings

Datei anzeigen

@ -1,4 +1,4 @@
From 3aa7c3bb231295a68bf403ab34f4b0dcc9e2696d Mon Sep 17 00:00:00 2001
From 4f9c5ca52e2e58476694f0cacdb66b2669e552ab Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Tue, 1 Mar 2016 14:14:15 -0600
Subject: [PATCH] Drop falling block and tnt entities at the specified height
@ -24,11 +24,11 @@ index 0094d1a87..4da846719 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 4540bf9f9..d358ab26a 100644
index a5d0ae1de..12b86ab75 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1794,6 +1794,7 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper
return this.a(new ItemStack(item, i, 0), f);
@@ -1885,6 +1885,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
return this.a(itemstack, 0.0F);
}
+ @Nullable public final EntityItem dropItem(ItemStack itemstack, float offset) { return this.a(itemstack, offset); } // Paper - OBFHELPER
@ -36,10 +36,10 @@ index 4540bf9f9..d358ab26a 100644
public EntityItem a(ItemStack itemstack, float f) {
if (itemstack.isEmpty()) {
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
index 579e51a0a..2ba5d51a5 100644
index 850436d42..7aa12c3b4 100644
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
@@ -84,6 +84,17 @@ public class EntityFallingBlock extends Entity {
@@ -86,6 +86,17 @@ public class EntityFallingBlock extends Entity {
}
this.move(EnumMoveType.SELF, this.motX, this.motY, this.motZ);
@ -56,9 +56,9 @@ index 579e51a0a..2ba5d51a5 100644
+
if (!this.world.isClientSide) {
blockposition = new BlockPosition(this);
boolean flag = this.block.getBlock() == Blocks.dS;
boolean flag = this.block.getBlock() instanceof BlockConcretePowder;
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index 44b2d4735..0d70dd1d2 100644
index 7edc02852..5ceb3f206 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -57,6 +57,13 @@ public class EntityTNTPrimed extends Entity {

Datei anzeigen

@ -1,4 +1,4 @@
From 52755667f1f619ec704fc039220647e7d105956d Mon Sep 17 00:00:00 2001
From 7bcfdec2f367b97a5459b023661911495b573125 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 14:32:43 -0600
Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
@ -6,24 +6,29 @@ Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
diff --git a/src/main/java/net/minecraft/server/EULA.java b/src/main/java/net/minecraft/server/EULA.java
index 8361888c2..3623751bf 100644
index 220ca7bca..eb4b08be4 100644
--- a/src/main/java/net/minecraft/server/EULA.java
+++ b/src/main/java/net/minecraft/server/EULA.java
@@ -51,7 +51,8 @@ public class EULA {
@@ -52,13 +52,12 @@ public class EULA {
fileoutputstream = new FileOutputStream(this.b);
properties.setProperty("eula", "false");
- properties.store(fileoutputstream, "By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula).");
+ properties.store(fileoutputstream, "By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula)." +
+ "\nand also agreeing that tacos are tasty."); // Paper - fix lag
+ properties.store(fileoutputstream, "By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula).\nYou also agree that tacos are tasty, and the best food in the world."); // Paper - fix lag);
} catch (Exception exception) {
EULA.a.warn("Failed to save {}", this.b, exception);
} finally {
IOUtils.closeQuietly(fileoutputstream);
}
-
}
}
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 8d08b536a..92d480251 100644
index 590eb507c..4889a82a2 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1049,7 +1049,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
@@ -1151,7 +1151,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
}
public String getServerModName() {
@ -33,24 +38,24 @@ index 8d08b536a..92d480251 100644
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
index 9042deed6..33b40ffc2 100644
index 88ea651ba..28f6cdf96 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -136,7 +136,7 @@ import org.bukkit.event.server.TabCompleteEvent;
@@ -152,7 +152,7 @@ import org.bukkit.event.server.TabCompleteEvent;
import net.md_5.bungee.api.chat.BaseComponent;
public final class CraftServer implements Server {
- private final String serverName = "CraftBukkit";
+ private final String serverName = "Paper";
+ private final String serverName = "Paper"; // Paper
private final String serverVersion;
private final String bukkitVersion = Versioning.getBukkitVersion();
private final Logger logger = Logger.getLogger("Minecraft");
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 96585fb24..f95da9e26 100644
index 5e49bca8a..d9059129d 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -192,7 +192,7 @@ public class Main {
deadline.add(Calendar.DAY_OF_YEAR, -14);
@@ -198,7 +198,7 @@ public class Main {
deadline.add(Calendar.DAY_OF_YEAR, -3);
if (buildDate.before(deadline.getTime())) {
System.err.println("*** Error, this build is outdated ***");
- System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/ ***");

Datei anzeigen

@ -1,26 +1,28 @@
From 355aa45c1307053a37e07c9024e2953df1fe01b4 Mon Sep 17 00:00:00 2001
From fd20af56dbf1982c04406fcd9a0360b54568d965 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 c374efd79..467c5bf1a 100644
index 40efd6c60..1aa32bf11 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -64,6 +64,7 @@ public abstract class EntityHuman extends EntityLiving {
private final ItemCooldown bW;
@@ -72,6 +72,9 @@ public abstract class EntityHuman extends EntityLiving {
private final ItemCooldown ce;
@Nullable
public EntityFishingHook hookedFish;
+ // Paper start
+ public boolean affectsSpawning = true;
+ // Paper end
// CraftBukkit start
public boolean fauxSleeping;
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 94967e6b6..5ea9f3097 100644
index c8c191667..d29364b01 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -624,7 +624,7 @@ public abstract class EntityInsentient extends EntityLiving {
@@ -614,7 +614,7 @@ public abstract class EntityInsentient extends EntityLiving {
} else {
EntityHuman entityhuman = this.world.findNearbyPlayer(this, -1.0D);
@ -30,56 +32,64 @@ index 94967e6b6..5ea9f3097 100644
double d1 = entityhuman.locY - this.locY;
double d2 = entityhuman.locZ - this.locZ;
diff --git a/src/main/java/net/minecraft/server/EntitySilverfish.java b/src/main/java/net/minecraft/server/EntitySilverfish.java
index 50bca48bf..57552c522 100644
index 6cb4f889c..a1ebf5c68 100644
--- a/src/main/java/net/minecraft/server/EntitySilverfish.java
+++ b/src/main/java/net/minecraft/server/EntitySilverfish.java
@@ -99,8 +99,7 @@ public class EntitySilverfish extends EntityMonster {
public boolean P() {
if (super.P()) {
EntityHuman entityhuman = this.world.b(this, 5.0D);
-
@@ -96,7 +96,7 @@ public class EntitySilverfish extends EntityMonster {
if (super.a(generatoraccess)) {
EntityHuman entityhuman = generatoraccess.b(this, 5.0D);
- return entityhuman == null;
+ return !(entityhuman != null && !entityhuman.affectsSpawning) && entityhuman == null; // Paper - Affects Spawning API
} else {
return false;
}
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index a599a043d..1c7c187c7 100644
index 44fb75c6f..aec9cdae5 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 {
@@ -37,7 +37,7 @@ public final class SpawnerCreature {
while (iterator.hasNext()) {
EntityHuman entityhuman = (EntityHuman) iterator.next();
- if (!entityhuman.isSpectator()) {
+ if (!entityhuman.isSpectator() && entityhuman.affectsSpawning) {
+ if (!entityhuman.isSpectator() && entityhuman.affectsSpawning) { // Paper
int l = MathHelper.floor(entityhuman.locX / 16.0D);
j = MathHelper.floor(entityhuman.locZ / 16.0D);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 759964b0f..26d4bd690 100644
index 05d363171..fd64b75ed 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -2727,7 +2727,7 @@ public abstract class World implements IBlockAccess {
@@ -28,6 +28,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
import org.bukkit.craftbukkit.event.CraftEventFactory;
import org.bukkit.craftbukkit.util.CraftMagicNumbers;
import org.bukkit.craftbukkit.util.LongHashSet; // Paper
+import org.bukkit.entity.Player;
import org.bukkit.event.block.BlockCanBuildEvent;
import org.bukkit.event.block.BlockPhysicsEvent;
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
@@ -2407,7 +2408,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
for (int i = 0; i < this.players.size(); ++i) {
EntityHuman entityhuman = (EntityHuman) this.players.get(i);
- if (IEntitySelector.e.apply(entityhuman)) {
+ if (IEntitySelector.e.apply(entityhuman) && entityhuman.affectsSpawning) { // Paper - Affects Spawning API
- if (IEntitySelector.e.test(entityhuman)) {
+ if (IEntitySelector.e.test(entityhuman) && entityhuman.affectsSpawning) { // Paper - Affects Spawning API
double d4 = entityhuman.d(d0, d1, d2);
if (d3 < 0.0D || d4 < d3 * d3) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index cd99801ff..a0c86d0e0 100644
index fad258f11..c67137a80 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1540,6 +1540,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1585,7 +1585,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public String getLocale() {
return getHandle().locale;
+
+ }
+
+ // Paper start
+ public void setAffectsSpawning(boolean affects) {
+ this.getHandle().affectsSpawning = affects;
+ }
@ -88,8 +98,10 @@ index cd99801ff..a0c86d0e0 100644
+ public boolean getAffectsSpawning() {
+ return this.getHandle().affectsSpawning;
}
+ // Paper end
// Spigot start
private final Player.Spigot spigot = new Player.Spigot()
--
2.18.0

Datei anzeigen

@ -1,15 +1,15 @@
From f468cbcfc4e7e05e67215e55bb021f4fb1ef1007 Mon Sep 17 00:00:00 2001
From 7bff1557c12e7c7c67a4901f488a7ff95605603e Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Tue, 1 Mar 2016 15:08:03 -0600
Subject: [PATCH] Remove invalid mob spawner tile entities
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index ca5a42377..50113c303 100644
index 3b97981bc..36ea4ad47 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -759,6 +759,10 @@ public class Chunk {
tileentity.A();
@@ -777,6 +777,10 @@ public class Chunk implements IChunkAccess {
tileentity.z();
this.tileEntities.put(blockposition, tileentity);
// CraftBukkit start
+ // Paper start - Remove invalid mob spawner tile entities
@ -18,7 +18,7 @@ index ca5a42377..50113c303 100644
+ // Paper end
} else {
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!");
+ " (" + getType(blockposition) + ") where there was no entity tile!");
--
2.18.0

Datei anzeigen

@ -0,0 +1,139 @@
From b7e91c371fc4c629af5440e38cd70bfd2a59b293 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 22:01:19 -0600
Subject: [PATCH] Optimize TileEntity Ticking
diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java
index de06bd59a..9b54cbfdc 100644
--- a/src/main/java/net/minecraft/server/TileEntityChest.java
+++ b/src/main/java/net/minecraft/server/TileEntityChest.java
@@ -7,7 +7,7 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity;
import org.bukkit.entity.HumanEntity;
// CraftBukkit end
-public class TileEntityChest extends TileEntityLootable implements ITickable {
+public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITickable
private NonNullList<ItemStack> items;
protected float a;
@@ -113,9 +113,15 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
int k = this.position.getZ();
++this.k;
+ // Paper start
+ }
+ private void doOpenLogic() {
float f;
-
- if (!this.world.isClientSide && this.f != 0 && (this.k + i + j + k) % 200 == 0) {
+ int i = this.position.getX();
+ int j = this.position.getY();
+ int k = this.position.getZ();
+ if (!this.world.isClientSide && this.f != 0 /*&& (this.k + i + j + k) % 200 == 0*/) { // Paper - comment out tick rate limiter
+ // Paper end
this.f = 0;
f = 5.0F;
List list = this.world.a(EntityHuman.class, new AxisAlignedBB((double) ((float) i - 5.0F), (double) ((float) j - 5.0F), (double) ((float) k - 5.0F), (double) ((float) (i + 1) + 5.0F), (double) ((float) (j + 1) + 5.0F), (double) ((float) (k + 1) + 5.0F)));
@@ -134,11 +140,14 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
}
}
- this.e = this.a;
- f = 0.1F;
if (this.f > 0 && this.a == 0.0F) {
this.a(SoundEffects.BLOCK_CHEST_OPEN);
}
+ // Paper start
+ }
+ private void doCloseLogic() {
+ this.e = this.a;
+ // Paper end
if (this.f == 0 && this.a > 0.0F || this.f > 0 && this.a < 1.0F) {
float f1 = this.a;
@@ -203,6 +212,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
++this.f;
if (this.world == null) return; // CraftBukkit
+ doOpenLogic(); // Paper
// CraftBukkit start - Call redstone event
if (this.getBlock() == Blocks.TRAPPED_CHEST) {
@@ -224,6 +234,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
--this.f;
// CraftBukkit start - Call redstone event
+ doCloseLogic(); // Paper
if (this.getBlock() == Blocks.TRAPPED_CHEST) {
int newPower = Math.max(0, Math.min(15, this.f));
diff --git a/src/main/java/net/minecraft/server/TileEntityEnderChest.java b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
index f275fd1c3..7d7628b04 100644
--- a/src/main/java/net/minecraft/server/TileEntityEnderChest.java
+++ b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
@@ -1,6 +1,6 @@
package net.minecraft.server;
-public class TileEntityEnderChest extends TileEntity implements ITickable {
+public class TileEntityEnderChest extends TileEntity { // Paper - Remove ITickable
public float a;
public float e;
@@ -17,19 +17,37 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
}
this.e = this.a;
+ // Paper start
+ /*
int i = this.position.getX();
int j = this.position.getY();
int k = this.position.getZ();
float f = 0.1F;
double d0;
-
+ */
+ // Paper start
+ }
+ private void doOpenLogic() {
+ int i = this.position.getX();
+ int j = this.position.getY();
+ int k = this.position.getZ();
+ double d0;
+ // Paper end
if (this.f > 0 && this.a == 0.0F) {
double d1 = (double) i + 0.5D;
d0 = (double) k + 0.5D;
this.world.a((EntityHuman) null, d1, (double) j + 0.5D, d0, SoundEffects.BLOCK_ENDER_CHEST_OPEN, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
}
-
+ // Paper start
+ }
+ private void doCloseLogic() {
+ int i = this.position.getX();
+ int j = this.position.getY();
+ int k = this.position.getZ();
+ this.e = this.a;
+ double d0;
+ // Paper end
if (this.f == 0 && this.a > 0.0F || this.f > 0 && this.a < 1.0F) {
float f1 = this.a;
@@ -76,11 +94,13 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
public void c() {
++this.f;
this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.f);
+ doOpenLogic(); // Paper
}
public void d() {
--this.f;
this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.f);
+ doCloseLogic(); // Paper
}
public boolean a(EntityHuman entityhuman) {
--
2.18.0

Datei anzeigen

@ -1,4 +1,4 @@
From 1e6e7ab651008e3a1077dd86e7ff04563ce9cc97 Mon Sep 17 00:00:00 2001
From 3d481b7c47b3781e9ee6bd3badaf44de6eae33df Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 1 Mar 2016 23:09:29 -0600
Subject: [PATCH] Further improve server tick loop
@ -12,10 +12,10 @@ Previous implementation did not calculate TPS correctly.
Switch to a realistic rolling average and factor in std deviation as an extra reporting variable
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 92d480251..47fe9262a 100644
index 4889a82a2..2e691b9f6 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -114,16 +114,12 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
@@ -141,17 +141,13 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
public org.bukkit.command.ConsoleCommandSender console;
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
public ConsoleReader reader;
@ -24,6 +24,7 @@ index 92d480251..47fe9262a 100644
public final Thread primaryThread;
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
public int autosavePeriod;
public File bukkitDataPackFolder;
// CraftBukkit end
// Spigot start
- public static final int TPS = 20;
@ -33,7 +34,7 @@ index 92d480251..47fe9262a 100644
public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant();
// Spigot end
@@ -534,12 +530,54 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
@@ -637,12 +633,54 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
this.isRunning = false;
}
@ -93,7 +94,7 @@ index 92d480251..47fe9262a 100644
public void run() {
try {
@@ -553,24 +591,41 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
@@ -654,24 +692,41 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
// Spigot start
Arrays.fill( recentTps, 20 );
@ -147,10 +148,10 @@ index 92d480251..47fe9262a 100644
}
lastTick = curTime;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 33b40ffc2..bfddd1685 100644
index 28f6cdf96..2055bf7de 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1753,6 +1753,17 @@ public final class CraftServer implements Server {
@@ -1849,6 +1849,17 @@ public final class CraftServer implements Server {
return CraftMagicNumbers.INSTANCE;
}

Datei anzeigen

@ -1,190 +0,0 @@
From 38c9fb6874ea9a6a93dcb74babdf31dccacb9fde Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 22:01:19 -0600
Subject: [PATCH] Optimize TileEntity Ticking
diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java
index 3b5af473d..631304122 100644
--- a/src/main/java/net/minecraft/server/TileEntityChest.java
+++ b/src/main/java/net/minecraft/server/TileEntityChest.java
@@ -8,17 +8,17 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity;
import org.bukkit.entity.HumanEntity;
// CraftBukkit end
-public class TileEntityChest extends TileEntityLootable implements ITickable {
+public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITickable
private NonNullList<ItemStack> items;
public boolean a;
- public TileEntityChest f;
- public TileEntityChest g;
- public TileEntityChest h;
- public TileEntityChest i;
- public float j;
+ public TileEntityChest f; // Paper - Adjacent Chest Z Neg
+ public TileEntityChest g; // Paper - Adjacent Chest X Pos
+ public TileEntityChest h; // Paper - Adjacent Chest X Neg
+ public TileEntityChest i; // Paper - Adjacent Chest Z Pos
+ public float j; // Paper - lid angle
public float k;
- public int l;
+ public int l; // Paper - Number of viewers
private int q;
private BlockChest.Type r;
@@ -190,6 +190,8 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
}
public void e() {
+ // Paper - Disable all of this, just in case this does get ticked
+ /*
this.o();
int i = this.position.getX();
int j = this.position.getY();
@@ -270,7 +272,8 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
this.j = 0.0F;
}
}
-
+ */
+ // Paper end
}
public boolean c(int i, int j) {
@@ -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
++this.l;
+
+ // Paper start - Move chest open sound out of the tick loop
+ this.o();
+
+ if (this.l > 0 && this.j == 0.0F && this.f == null && this.h == null) {
+ this.j = 0.7F;
+
+ double d0 = (double) this.position.getZ() + 0.5D;
+ double d1 = (double) this.position.getX() + 0.5D;
+
+ if (this.i != null) {
+ d0 += 0.5D;
+ }
+
+ if (this.g != null) {
+ d1 += 0.5D;
+ }
+
+ this.world.a((EntityHuman) null, d1, (double) this.position.getY() + 0.5D, d0, SoundEffects.ac, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
+ }
+ // Paper end
+
if (this.world == null) return; // CraftBukkit
this.world.playBlockAction(this.position, this.getBlock(), 1, this.l);
@@ -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
--this.l;
+
+ // 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) {
+ float f = 0.1F;
+
+ if (this.l > 0) {
+ this.j += f;
+ } else {
+ this.j -= f;
+ }
+
+ double d0 = (double) this.getPosition().getX() + 0.5D;
+ double d2 = (double) this.getPosition().getZ() + 0.5D;
+ int yLoc = this.position.getY();
+
+ if (this.i != null) {
+ d2 += 0.5D;
+ }
+
+ if (this.g != null) {
+ d0 += 0.5D;
+ }
+
+ this.world.a((EntityHuman) null, d0, (double) yLoc + 0.5D, d2, SoundEffects.aa, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
+ this.j = 0.0F;
+ }
+ // Paper end
+
this.world.playBlockAction(this.position, this.getBlock(), 1, this.l);
this.world.applyPhysics(this.position, this.getBlock(), false);
diff --git a/src/main/java/net/minecraft/server/TileEntityEnderChest.java b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
index 31585757b..1c1741c56 100644
--- a/src/main/java/net/minecraft/server/TileEntityEnderChest.java
+++ b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
@@ -1,15 +1,17 @@
package net.minecraft.server;
-public class TileEntityEnderChest extends TileEntity implements ITickable {
+public class TileEntityEnderChest extends TileEntity { // Paper - Remove ITickable
- public float a;
+ public float a; // Paper - lid angle
public float f;
- public int g;
+ public int g; // Paper - Number of viewers
private int h;
public TileEntityEnderChest() {}
public void e() {
+ // Paper start - Disable all of this, just in case this does get ticked
+ /*
if (++this.h % 20 * 4 == 0) {
this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.g);
}
@@ -54,6 +56,8 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
this.a = 0.0F;
}
}
+ */
+ // Paper end
}
@@ -73,11 +77,34 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
public void a() {
++this.g;
+
+ // Paper start - Move enderchest open sounds out of the tick loop
+ if (this.g > 0 && this.a == 0.0F) {
+ this.a = 0.7F;
+
+ double d1 = (double) this.getPosition().getX() + 0.5D;
+ double d0 = (double) this.getPosition().getZ() + 0.5D;
+
+ this.world.a((EntityHuman) null, d1, (double) this.getPosition().getY() + 0.5D, d0, SoundEffects.aT, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
+ }
+ // Paper end
+
this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.g);
}
public void f() {
--this.g;
+
+ // Paper start - Move enderchest close sounds out of the tick loop
+ if (this.g == 0 && this.a > 0.0F || this.g > 0 && this.a < 1.0F) {
+ double d0 = (double) this.getPosition().getX() + 0.5D;
+ double d2 = (double) this.getPosition().getZ() + 0.5D;
+
+ this.world.a((EntityHuman) null, d0, (double) this.getPosition().getY() + 0.5D, d2, SoundEffects.aS, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
+ this.a = 0.0F;
+ }
+ // Paper end
+
this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.g);
}
--
2.18.0

Datei anzeigen

@ -1,14 +1,14 @@
From ab130b09cf07883b904852ed5d8cc5b791e13772 Mon Sep 17 00:00:00 2001
From 87f57e185916a66a14dec3bb7ec0c33f24a45bc9 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 23:12:03 -0600
Subject: [PATCH] Only refresh abilities if needed
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index a0c86d0e0..e3ad45aa8 100644
index c67137a80..79223dfa6 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1240,12 +1240,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1285,12 +1285,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void setFlying(boolean value) {

Datei anzeigen

@ -1,14 +1,14 @@
From c3014cb73ff60881596d4127dfbc32e58a3e07a2 Mon Sep 17 00:00:00 2001
From cfeda276a4e161703f02b62d97e39a1ddd65193f Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 23:19:01 -0600
Subject: [PATCH] Add async chunk load API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index ef8165da4..01fc193db 100644
index 0b2a9d09d..4df849eef 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -134,6 +134,26 @@ public class CraftWorld implements World {
@@ -133,6 +133,26 @@ public class CraftWorld implements World {
}
}

Datei anzeigen

@ -1,14 +1,14 @@
From eb34ce2535e4e16447bb108f92ca70742ff00a66 Mon Sep 17 00:00:00 2001
From d97bed2c5c938d245595b74e0cdda94a68a6bc27 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Tue, 1 Mar 2016 23:45:08 -0600
Subject: [PATCH] Entity Origin API
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index d358ab26a..011cf59c0 100644
index 12b86ab75..2288df268 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -149,6 +149,7 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper
@@ -160,6 +160,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
public org.bukkit.projectiles.ProjectileSource projectileSource; // For projectiles only
public boolean forceExplosionKnockback; // SPIGOT-949
public Timing tickTimer = MinecraftTimings.getEntityTimings(this); // Paper
@ -16,7 +16,7 @@ index d358ab26a..011cf59c0 100644
// Spigot start
public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
public final boolean defaultActivationState;
@@ -1545,6 +1546,11 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper
@@ -1629,6 +1630,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
}
}
@ -28,7 +28,7 @@ index d358ab26a..011cf59c0 100644
return nbttagcompound;
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT");
@@ -1688,6 +1694,13 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper
@@ -1771,6 +1777,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
}
// CraftBukkit end
@ -42,7 +42,7 @@ index d358ab26a..011cf59c0 100644
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded");
@@ -1756,6 +1769,7 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper
@@ -1842,6 +1855,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
protected abstract void b(NBTTagCompound nbttagcompound);
@ -51,10 +51,10 @@ index d358ab26a..011cf59c0 100644
NBTTagList nbttaglist = new NBTTagList();
double[] adouble1 = adouble;
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
index 2ba5d51a5..abdc2dea9 100644
index 7aa12c3b4..1d4a7b64d 100644
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
@@ -267,6 +267,14 @@ public class EntityFallingBlock extends Entity {
@@ -249,6 +249,14 @@ public class EntityFallingBlock extends Entity {
this.block = Blocks.SAND.getBlockData();
}
@ -70,7 +70,7 @@ index 2ba5d51a5..abdc2dea9 100644
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
index 0d70dd1d2..bb0904f86 100644
index 5ceb3f206..87f3205f8 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -109,6 +109,14 @@ public class EntityTNTPrimed extends Entity {
@ -89,22 +89,22 @@ index 0d70dd1d2..bb0904f86 100644
@Nullable
diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java
index bc6383669..ca9eb2f3b 100644
index e56d4836d..0bf8d15d7 100644
--- a/src/main/java/net/minecraft/server/NBTTagList.java
+++ b/src/main/java/net/minecraft/server/NBTTagList.java
@@ -153,6 +153,7 @@ public class NBTTagList extends NBTBase {
@@ -182,6 +182,7 @@ public class NBTTagList extends NBTList<NBTBase> {
return new int[0];
}
+ public final double getDoubleAt(int i) { return this.f(i); } // Paper - OBFHELPER
public double f(int i) {
+ public final double getDoubleAt(int i) { return this.k(i); } // Paper - OBFHELPER
public double k(int i) {
if (i >= 0 && i < this.list.size()) {
NBTBase nbtbase = (NBTBase) this.list.get(i);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 26d4bd690..31b765dea 100644
index fd64b75ed..3f0b6ac26 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1071,6 +1071,12 @@ public abstract class World implements IBlockAccess {
@@ -940,6 +940,12 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
int j = MathHelper.floor(entity.locZ / 16.0D);
boolean flag = entity.attachedToPlayer;
@ -118,10 +118,10 @@ index 26d4bd690..31b765dea 100644
flag = true;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 833e3111d..6c23e88a5 100644
index 1e3675e4f..0daa15f1b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -761,4 +761,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@@ -781,4 +781,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return spigot;
}
// Spigot end

Datei anzeigen

@ -1,32 +1,32 @@
From a949306e1efe3b5ba7ae41b9ea584778b59a5265 Mon Sep 17 00:00:00 2001
From c25380700dff93018c14a133e3b1ab252516d495 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 1 Mar 2016 23:52:34 -0600
Subject: [PATCH] Prevent tile entity and entity crashes
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 15f18ba1d..33e245e4c 100644
index 5b7f6ca84..8cab71c0e 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -196,7 +196,12 @@ public abstract class TileEntity implements KeyedObject {
}
@@ -175,7 +175,12 @@ public abstract class TileEntity implements KeyedObject {
return TileEntityTypes.a.b(this.C()) + " // " + this.getClass().getCanonicalName();
});
if (this.world != null) {
- CrashReportSystemDetails.a(crashreportsystemdetails, this.position, this.getBlock(), this.v());
- CrashReportSystemDetails.a(crashreportsystemdetails, this.position, this.getBlock());
+ // Paper start - Prevent TileEntity and Entity crashes
+ Block block = this.getBlock();
+ IBlockData block = this.getBlock();
+ if (block != null) {
+ CrashReportSystemDetails.a(crashreportsystemdetails, this.position, this.getBlock(), this.v());
+ CrashReportSystemDetails.a(crashreportsystemdetails, this.position, block);
+ }
+ // Paper end
crashreportsystemdetails.a("Actual block type", new CrashReportCallable() {
public String a() throws Exception {
int i = Block.getId(TileEntity.this.world.getType(TileEntity.this.position).getBlock());
CrashReportSystemDetails.a(crashreportsystemdetails, this.position, this.world.getType(this.position));
}
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 31b765dea..fd5f8102a 100644
index 3f0b6ac26..c605d7e52 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1449,10 +1449,12 @@ public abstract class World implements IBlockAccess {
@@ -1166,10 +1166,12 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
entity.tickTimer.stopTiming(); // Paper
} catch (Throwable throwable1) {
entity.tickTimer.stopTiming();
@ -43,9 +43,9 @@ index 31b765dea..fd5f8102a 100644
}
}
@@ -1515,10 +1517,13 @@ public abstract class World implements IBlockAccess {
((ITickable) tileentity).e();
this.methodProfiler.b();
@@ -1232,10 +1234,13 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
((ITickable) tileentity).X_();
this.methodProfiler.e();
} catch (Throwable throwable2) {
- crashreport1 = CrashReport.a(throwable2, "Ticking block entity");
- crashreportsystemdetails1 = crashreport1.a("Block entity being ticked");

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