Aim towards real 1.14

This commit is contained in:
Shane Freeder 2019-04-25 07:53:51 +01:00
parent ab34e2751e
commit 7e6db27085
35 changed files with 351 additions and 272 deletions

View File

@ -1,11 +1,11 @@
From 37ba5cd5b415edd8e09513708652069efc410ddf Mon Sep 17 00:00:00 2001 From b8ddb776d61410ee76eb2bad75c5f904ff8cce5d Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 00:16:08 +0100 Date: Tue, 1 Mar 2016 00:16:08 +0100
Subject: [PATCH] POM changes Subject: [PATCH] POM changes
diff --git a/pom.xml b/pom.xml diff --git a/pom.xml b/pom.xml
index 4118252f..0a61b4d9 100644 index 75681af7..ec6e4d14 100644
--- a/pom.xml --- a/pom.xml
+++ b/pom.xml +++ b/pom.xml
@@ -3,33 +3,29 @@ @@ -3,33 +3,29 @@
@ -22,7 +22,7 @@ index 4118252f..0a61b4d9 100644
+ +
+ <groupId>com.destroystokyo.paper</groupId> + <groupId>com.destroystokyo.paper</groupId>
+ <artifactId>paper-api</artifactId> + <artifactId>paper-api</artifactId>
<version>1.14-pre5-SNAPSHOT</version> <version>1.14-R0.1-SNAPSHOT</version>
<packaging>jar</packaging> <packaging>jar</packaging>
- <name>Spigot-API</name> - <name>Spigot-API</name>

View File

@ -1,11 +1,11 @@
From 8b6209091a2f9f450324bb0ea704277985d61686 Mon Sep 17 00:00:00 2001 From f754c4b64a90c21d79e2cfa1dc797acd66be8d59 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 20:40:33 -0600 Date: Mon, 29 Feb 2016 20:40:33 -0600
Subject: [PATCH] POM Changes Subject: [PATCH] POM Changes
diff --git a/pom.xml b/pom.xml diff --git a/pom.xml b/pom.xml
index 3b89529f28..9d5a4ce991 100644 index 982ac22e8e..099d7218c9 100644
--- a/pom.xml --- a/pom.xml
+++ b/pom.xml +++ b/pom.xml
@@ -1,15 +1,14 @@ @@ -1,15 +1,14 @@
@ -16,9 +16,9 @@ index 3b89529f28..9d5a4ce991 100644
- <artifactId>spigot</artifactId> - <artifactId>spigot</artifactId>
+ <artifactId>paper</artifactId> + <artifactId>paper</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<version>1.14-pre5-SNAPSHOT</version> <version>1.14-R0.1-SNAPSHOT</version>
- <name>Spigot</name> - <name>Spigot</name>
- <url>http://www.spigotmc.org</url> - <url>https://www.spigotmc.org/</url>
+ <name>Paper</name> + <name>Paper</name>
+ <url>https://papermc.io</url> + <url>https://papermc.io</url>
@ -27,7 +27,7 @@ index 3b89529f28..9d5a4ce991 100644
+ <!-- <skipTests>true</skipTests> Paper - This [was] not going to end well --> + <!-- <skipTests>true</skipTests> Paper - This [was] not going to end well -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<api.version>unknown</api.version> <api.version>unknown</api.version>
<minecraft.version>1.14-pre5</minecraft.version> <minecraft.version>1.14</minecraft.version>
@@ -22,16 +21,16 @@ @@ -22,16 +21,16 @@
</properties> </properties>

View File

@ -1,4 +1,4 @@
From c94a16a6e4f1498e7bc54b2043915211a590b586 Mon Sep 17 00:00:00 2001 From 3772a276f6566458d67baefb11a255c09b8ad02d Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 21:02:09 -0600 Date: Mon, 29 Feb 2016 21:02:09 -0600
Subject: [PATCH] Paper config files Subject: [PATCH] Paper config files
@ -535,10 +535,10 @@ index e1ba833f3e..b60956218d 100644
this.setSpawnAnimals(dedicatedserverproperties.spawnAnimals); this.setSpawnAnimals(dedicatedserverproperties.spawnAnimals);
this.setSpawnNPCs(dedicatedserverproperties.spawnNpcs); this.setSpawnNPCs(dedicatedserverproperties.spawnNpcs);
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 43dc487eaa..cec990f357 100644 index bc9894f84e..0819f56a62 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -132,9 +132,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { @@ -131,9 +131,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
private static final DataWatcherObject<Boolean> aC = DataWatcher.a(Entity.class, DataWatcherRegistry.i); private static final DataWatcherObject<Boolean> aC = DataWatcher.a(Entity.class, DataWatcherRegistry.i);
protected static final DataWatcherObject<EntityPose> X = DataWatcher.a(Entity.class, DataWatcherRegistry.s); protected static final DataWatcherObject<EntityPose> X = DataWatcher.a(Entity.class, DataWatcherRegistry.s);
public boolean inChunk; public boolean inChunk;
@ -552,7 +552,7 @@ index 43dc487eaa..cec990f357 100644
public boolean impulse; public boolean impulse;
public int portalCooldown; public int portalCooldown;
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
index e2a844c786..2ee4069173 100644 index ee43aa24d2..01d9ed69c5 100644
--- a/src/main/java/net/minecraft/server/EntityTypes.java --- a/src/main/java/net/minecraft/server/EntityTypes.java
+++ b/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java
@@ -4,6 +4,7 @@ import com.mojang.datafixers.DataFixUtils; @@ -4,6 +4,7 @@ import com.mojang.datafixers.DataFixUtils;
@ -575,7 +575,7 @@ index e2a844c786..2ee4069173 100644
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index f31f407fa1..28fa346b7f 100644 index 84155573df..83fdea893c 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java
@@ -86,6 +86,8 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose @@ -86,6 +86,8 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@ -596,7 +596,7 @@ index f31f407fa1..28fa346b7f 100644
this.world = new CraftWorld((WorldServer) this, gen, env); this.world = new CraftWorld((WorldServer) this, gen, env);
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 83ab4245da..93246f464b 100644 index dcdd3b002d..9021ab34fa 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -751,6 +751,7 @@ public final class CraftServer implements Server { @@ -751,6 +751,7 @@ public final class CraftServer implements Server {
@ -651,7 +651,7 @@ index 83ab4245da..93246f464b 100644
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index b61c06e32a..e34abd0c1f 100644 index ae320c2bb1..fd02ba1916 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -127,6 +127,14 @@ public class Main { @@ -127,6 +127,14 @@ public class Main {

View File

@ -1,11 +1,11 @@
From ea2cb0f4f240fb9536382b71b44f412193744ebc Mon Sep 17 00:00:00 2001 From 4718559989fd4efabfb66513b7755d6f262bee1b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Wed, 30 Mar 2016 19:36:20 -0400 Date: Wed, 30 Mar 2016 19:36:20 -0400
Subject: [PATCH] MC Dev fixes Subject: [PATCH] MC Dev fixes
diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java
index 8f640f0c24..2831c03a69 100644 index 26fa6e7b64..9a839d6540 100644
--- a/src/main/java/net/minecraft/server/BiomeBase.java --- a/src/main/java/net/minecraft/server/BiomeBase.java
+++ b/src/main/java/net/minecraft/server/BiomeBase.java +++ b/src/main/java/net/minecraft/server/BiomeBase.java
@@ -42,7 +42,7 @@ public abstract class BiomeBase { @@ -42,7 +42,7 @@ public abstract class BiomeBase {
@ -27,18 +27,9 @@ index 8f640f0c24..2831c03a69 100644
public List<WorldGenFeatureConfigured<?>> e() { public List<WorldGenFeatureConfigured<?>> e() {
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
index dc823e88a5..3745f66de5 100644 index f0ff70980d..dd47e9cbe4 100644
--- a/src/main/java/net/minecraft/server/BlockPosition.java --- a/src/main/java/net/minecraft/server/BlockPosition.java
+++ b/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java
@@ -18,7 +18,7 @@ import org.apache.logging.log4j.Logger;
@Immutable
public class BlockPosition extends BaseBlockPosition implements MinecraftSerializable {
- private static final Logger b = LogManager.getLogger();
+ //private static final Logger b = LogManager.getLogger(); // Paper - variable name conflict, logger isn't used
public static final BlockPosition ZERO = new BlockPosition(0, 0, 0);
private static final int c = 1 + MathHelper.e(MathHelper.c(30000000));
private static final int d = BlockPosition.c;
@@ -57,12 +57,12 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali @@ -57,12 +57,12 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
OfInt ofint = dynamic.asIntStream().spliterator(); OfInt ofint = dynamic.asIntStream().spliterator();
int[] aint = new int[3]; int[] aint = new int[3];
@ -149,7 +140,7 @@ index 4cb78c6a3f..e15d286710 100644
this.f = 0; this.f = 0;
diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java
index 096277de1c..d484e626d2 100644 index b251a1d7d9..3c5b3fe101 100644
--- a/src/main/java/net/minecraft/server/WorldPersistentData.java --- a/src/main/java/net/minecraft/server/WorldPersistentData.java
+++ b/src/main/java/net/minecraft/server/WorldPersistentData.java +++ b/src/main/java/net/minecraft/server/WorldPersistentData.java
@@ -37,7 +37,7 @@ public class WorldPersistentData { @@ -37,7 +37,7 @@ public class WorldPersistentData {

View File

@ -1,4 +1,4 @@
From 134acc6c6f13c7533bbf99adc73fc208aec957e9 Mon Sep 17 00:00:00 2001 From 377267c02ec794832c8ccf0ba2f3608a5b9a9207 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 20:55:47 -0400 Date: Mon, 28 Mar 2016 20:55:47 -0400
Subject: [PATCH] MC Utils Subject: [PATCH] MC Utils
@ -20,7 +20,7 @@ index 2f2b103641..b1900ba364 100644
void b(UUID uuid); void b(UUID uuid);
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
index 3745f66de5..01061f219f 100644 index dd47e9cbe4..c927d524a8 100644
--- a/src/main/java/net/minecraft/server/BlockPosition.java --- a/src/main/java/net/minecraft/server/BlockPosition.java
+++ b/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java
@@ -120,6 +120,7 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali @@ -120,6 +120,7 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
@ -57,13 +57,13 @@ index 3745f66de5..01061f219f 100644
return this.d(MathHelper.floor(d0), MathHelper.floor(d1), MathHelper.floor(d2)); return this.d(MathHelper.floor(d0), MathHelper.floor(d1), MathHelper.floor(d2));
} }
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 2d40f03b1a..0f031e862b 100644 index fc54888fa0..8f789c91f7 100644
--- a/src/main/java/net/minecraft/server/Chunk.java --- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -32,7 +32,7 @@ import org.bukkit.event.entity.CreatureSpawnEvent; @@ -32,7 +32,7 @@ import org.bukkit.event.entity.CreatureSpawnEvent;
public class Chunk implements IChunkAccess { public class Chunk implements IChunkAccess {
private static final Logger b = LogManager.getLogger(); private static final Logger LOGGER = LogManager.getLogger();
- public static final ChunkSection a = null; - public static final ChunkSection a = null;
+ public static final ChunkSection a = null; public static final ChunkSection EMPTY_CHUNK_SECTION = Chunk.a; // Paper - OBFHELPER + public static final ChunkSection a = null; public static final ChunkSection EMPTY_CHUNK_SECTION = Chunk.a; // Paper - OBFHELPER
private final ChunkSection[] sections; private final ChunkSection[] sections;
@ -189,7 +189,7 @@ index 4720632641..afa03ce6f2 100644
// CraftBukkit start - fire event // CraftBukkit start - fire event
setGoalTarget(entityliving, EntityTargetEvent.TargetReason.UNKNOWN, true); setGoalTarget(entityliving, EntityTargetEvent.TargetReason.UNKNOWN, true);
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 3e16632e24..d31c1c989c 100644 index c1bb7a88ae..f86e6a4c51 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java --- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -126,6 +126,7 @@ public abstract class EntityLiving extends Entity { @@ -126,6 +126,7 @@ public abstract class EntityLiving extends Entity {
@ -213,7 +213,7 @@ index 6ab4c78b35..76142d5dc2 100644
super(entitytypes, world); super(entitytypes, world);
this.f = 5; this.f = 5;
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
index 2ee4069173..0f2604a3d5 100644 index 01d9ed69c5..65ad9243f8 100644
--- a/src/main/java/net/minecraft/server/EntityTypes.java --- a/src/main/java/net/minecraft/server/EntityTypes.java
+++ b/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java
@@ -5,6 +5,7 @@ import com.mojang.datafixers.types.Type; @@ -5,6 +5,7 @@ import com.mojang.datafixers.types.Type;
@ -225,13 +225,13 @@ index 2ee4069173..0f2604a3d5 100644
import java.util.function.Function; import java.util.function.Function;
import java.util.stream.Stream; import java.util.stream.Stream;
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index cc9851edbc..80a2da51da 100644 index e975265a28..aa6a58dd88 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java --- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -37,10 +37,19 @@ import org.bukkit.event.world.StructureGrowEvent; @@ -37,10 +37,19 @@ import org.bukkit.event.world.StructureGrowEvent;
public final class ItemStack { public final class ItemStack {
private static final Logger c = LogManager.getLogger(); private static final Logger LOGGER = LogManager.getLogger();
- public static final ItemStack a = new ItemStack((Item) null); - public static final ItemStack a = new ItemStack((Item) null);
+ public static final ItemStack a = new ItemStack((Item) null);public static final ItemStack NULL_ITEM = a; // Paper - OBFHELPER + public static final ItemStack a = new ItemStack((Item) null);public static final ItemStack NULL_ITEM = a; // Paper - OBFHELPER
public static final DecimalFormat b = F(); public static final DecimalFormat b = F();
@ -249,7 +249,7 @@ index cc9851edbc..80a2da51da 100644
@Deprecated @Deprecated
private Item item; private Item item;
private NBTTagCompound tag; private NBTTagCompound tag;
@@ -588,6 +597,17 @@ public final class ItemStack { @@ -591,6 +600,17 @@ public final class ItemStack {
return this.tag != null ? this.tag.getList("Enchantments", 10) : new NBTTagList(); return this.tag != null ? this.tag.getList("Enchantments", 10) : new NBTTagList();
} }
@ -267,7 +267,7 @@ index cc9851edbc..80a2da51da 100644
public void setTag(@Nullable NBTTagCompound nbttagcompound) { public void setTag(@Nullable NBTTagCompound nbttagcompound) {
this.tag = nbttagcompound; this.tag = nbttagcompound;
} }
@@ -672,6 +692,7 @@ public final class ItemStack { @@ -675,6 +695,7 @@ public final class ItemStack {
return this.tag != null && this.tag.hasKeyOfType("Enchantments", 9) ? !this.tag.getList("Enchantments", 10).isEmpty() : false; return this.tag != null && this.tag.hasKeyOfType("Enchantments", 9) ? !this.tag.getList("Enchantments", 10).isEmpty() : false;
} }
@ -275,7 +275,7 @@ index cc9851edbc..80a2da51da 100644
public void a(String s, NBTBase nbtbase) { public void a(String s, NBTBase nbtbase) {
this.getOrCreateTag().set(s, nbtbase); this.getOrCreateTag().set(s, nbtbase);
} }
@@ -745,6 +766,7 @@ public final class ItemStack { @@ -748,6 +769,7 @@ public final class ItemStack {
// CraftBukkit start // CraftBukkit start
@Deprecated @Deprecated
public void setItem(Item item) { public void setItem(Item item) {
@ -606,12 +606,12 @@ index 0000000000..c97e116aaf
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java
index dfa33f0336..cc25ea7401 100644 index e16a579b55..3f6d2676e7 100644
--- a/src/main/java/net/minecraft/server/NBTTagCompound.java --- a/src/main/java/net/minecraft/server/NBTTagCompound.java
+++ b/src/main/java/net/minecraft/server/NBTTagCompound.java +++ b/src/main/java/net/minecraft/server/NBTTagCompound.java
@@ -23,7 +23,7 @@ public class NBTTagCompound implements NBTBase { @@ -23,7 +23,7 @@ public class NBTTagCompound implements NBTBase {
private static final Logger f = LogManager.getLogger(); private static final Logger LOGGER = LogManager.getLogger();
private static final Pattern g = Pattern.compile("[A-Za-z0-9._+-]+"); private static final Pattern g = Pattern.compile("[A-Za-z0-9._+-]+");
- private final Map<String, NBTBase> map = Maps.newHashMap(); - private final Map<String, NBTBase> map = Maps.newHashMap();
+ public final Map<String, NBTBase> map = Maps.newHashMap(); // Paper + public final Map<String, NBTBase> map = Maps.newHashMap(); // Paper
@ -635,7 +635,7 @@ index dfa33f0336..cc25ea7401 100644
return new UUID(this.getLong(s + "Most"), this.getLong(s + "Least")); return new UUID(this.getLong(s + "Most"), this.getLong(s + "Least"));
} }
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
index 94e6a3db4c..fca496a00a 100644 index fe6854d0e4..2db7229e91 100644
--- a/src/main/java/net/minecraft/server/NetworkManager.java --- a/src/main/java/net/minecraft/server/NetworkManager.java
+++ b/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java
@@ -43,7 +43,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> { @@ -43,7 +43,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
@ -688,13 +688,13 @@ index db2fe836c2..0d67676f7d 100644
for (int j = 1; j < 5; ++j) { for (int j = 1; j < 5; ++j) {
if ((i & -1 << j * 7) == 0) { if ((i & -1 << j * 7) == 0) {
diff --git a/src/main/java/net/minecraft/server/PacketEncoder.java b/src/main/java/net/minecraft/server/PacketEncoder.java diff --git a/src/main/java/net/minecraft/server/PacketEncoder.java b/src/main/java/net/minecraft/server/PacketEncoder.java
index d54177bdcc..2aa805eef1 100644 index 90223deae3..63c4dbd327 100644
--- a/src/main/java/net/minecraft/server/PacketEncoder.java --- a/src/main/java/net/minecraft/server/PacketEncoder.java
+++ b/src/main/java/net/minecraft/server/PacketEncoder.java +++ b/src/main/java/net/minecraft/server/PacketEncoder.java
@@ -42,6 +42,7 @@ public class PacketEncoder extends MessageToByteEncoder<Packet<?>> { @@ -42,6 +42,7 @@ public class PacketEncoder extends MessageToByteEncoder<Packet<?>> {
packet.b(packetdataserializer); packet.b(packetdataserializer);
} catch (Throwable throwable) { } catch (Throwable throwable) {
PacketEncoder.a.error(throwable); PacketEncoder.LOGGER.error(throwable);
+ throwable.printStackTrace(); // Paper - WHAT WAS IT? WHO DID THIS TO YOU? WHAT DID YOU SEE? + throwable.printStackTrace(); // Paper - WHAT WAS IT? WHO DID THIS TO YOU? WHAT DID YOU SEE?
if (packet.a()) { if (packet.a()) {
throw new SkipEncodeException(throwable); throw new SkipEncodeException(throwable);
@ -784,7 +784,7 @@ index 4efcb8b595..60948afa4e 100644
return this.b.size(); return this.b.size();
} }
diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java
index ea90a01830..59e7d907ef 100644 index 41a5d1dc29..7060402126 100644
--- a/src/main/java/net/minecraft/server/SystemUtils.java --- a/src/main/java/net/minecraft/server/SystemUtils.java
+++ b/src/main/java/net/minecraft/server/SystemUtils.java +++ b/src/main/java/net/minecraft/server/SystemUtils.java
@@ -45,8 +45,8 @@ public class SystemUtils { @@ -45,8 +45,8 @@ public class SystemUtils {

View File

@ -1,4 +1,4 @@
From 46fe3ad03c1a6e865b265c93a1d00dc98c5e7be4 Mon Sep 17 00:00:00 2001 From aeb013fd8fa88372a085b1e30e1c081c87db0298 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Wed, 4 Jul 2018 01:40:13 -0400 Date: Wed, 4 Jul 2018 01:40:13 -0400
Subject: [PATCH] Add MinecraftKey Information to Objects Subject: [PATCH] Add MinecraftKey Information to Objects
@ -19,10 +19,10 @@ index 2e79b0b5ff..f38179e983 100644
MutablePair<Integer, Map<ChunkCoordIntPair, Integer>> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap())); MutablePair<Integer, Map<ChunkCoordIntPair, Integer>> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap()));
ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.getChunkX(), e.getChunkZ()); ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.getChunkX(), e.getChunkZ());
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index cec990f357..d636965800 100644 index 0819f56a62..89e54089c2 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -47,7 +47,7 @@ import org.bukkit.event.entity.EntityPortalEvent; @@ -46,7 +46,7 @@ import org.bukkit.event.entity.EntityPortalEvent;
import org.bukkit.plugin.PluginManager; import org.bukkit.plugin.PluginManager;
// CraftBukkit end // CraftBukkit end
@ -31,7 +31,7 @@ index cec990f357..d636965800 100644
// CraftBukkit start // CraftBukkit start
private static final int CURRENT_LEVEL = 2; private static final int CURRENT_LEVEL = 2;
@@ -1664,12 +1664,31 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { @@ -1663,12 +1663,31 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
return true; return true;
} }
@ -65,7 +65,7 @@ index cec990f357..d636965800 100644
protected abstract void a(NBTTagCompound nbttagcompound); 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 diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
index 0f2604a3d5..fae259ac70 100644 index 65ad9243f8..9aed0d6b82 100644
--- a/src/main/java/net/minecraft/server/EntityTypes.java --- a/src/main/java/net/minecraft/server/EntityTypes.java
+++ b/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java
@@ -238,6 +238,7 @@ public class EntityTypes<T extends Entity> { @@ -238,6 +238,7 @@ public class EntityTypes<T extends Entity> {
@ -92,7 +92,7 @@ index 0000000000..743142d030
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index df46dbcacc..319be67501 100644 index 888c9605c8..94fbf228d2 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java --- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -7,11 +7,11 @@ import org.apache.logging.log4j.Logger; @@ -7,11 +7,11 @@ import org.apache.logging.log4j.Logger;
@ -103,7 +103,7 @@ index df46dbcacc..319be67501 100644
+public abstract class TileEntity implements KeyedObject { // Paper +public abstract class TileEntity implements KeyedObject { // Paper
public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot
private static final Logger a = LogManager.getLogger(); private static final Logger LOGGER = LogManager.getLogger();
- private final TileEntityTypes<?> b; - private final TileEntityTypes<?> b;
+ private final TileEntityTypes<?> b; public TileEntityTypes getTileEntityType() { return b; } // Paper - OBFHELPER + private final TileEntityTypes<?> b; public TileEntityTypes getTileEntityType() { return b; } // Paper - OBFHELPER
@Nullable @Nullable

View File

@ -1,4 +1,4 @@
From 117ce0bb3764d81b944e8a9455f9da22c01d732c Mon Sep 17 00:00:00 2001 From 48e532b68eaeb75a39035b463d664c258fe0b005 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Wed, 4 Jul 2018 02:10:36 -0400 Date: Wed, 4 Jul 2018 02:10:36 -0400
Subject: [PATCH] Store reference to current Chunk for Entity and Block Subject: [PATCH] Store reference to current Chunk for Entity and Block
@ -8,7 +8,7 @@ This enables us a fast reference to the entities current chunk instead
of having to look it up by hashmap lookups. 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 diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 0f031e862b..7fa141f52c 100644 index 8f789c91f7..15be6bb33f 100644
--- a/src/main/java/net/minecraft/server/Chunk.java --- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -36,7 +36,7 @@ public class Chunk implements IChunkAccess { @@ -36,7 +36,7 @@ public class Chunk implements IChunkAccess {
@ -93,10 +93,10 @@ index 0f031e862b..7fa141f52c 100644
@Override @Override
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index d636965800..e2b37ed1a0 100644 index 89e54089c2..53f8e6811a 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -131,7 +131,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -130,7 +130,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
private static final DataWatcherObject<Boolean> aB = DataWatcher.a(Entity.class, DataWatcherRegistry.i); private static final DataWatcherObject<Boolean> aB = DataWatcher.a(Entity.class, DataWatcherRegistry.i);
private static final DataWatcherObject<Boolean> aC = DataWatcher.a(Entity.class, DataWatcherRegistry.i); private static final DataWatcherObject<Boolean> aC = DataWatcher.a(Entity.class, DataWatcherRegistry.i);
protected static final DataWatcherObject<EntityPose> X = DataWatcher.a(Entity.class, DataWatcherRegistry.s); protected static final DataWatcherObject<EntityPose> X = DataWatcher.a(Entity.class, DataWatcherRegistry.s);
@ -105,7 +105,7 @@ index d636965800..e2b37ed1a0 100644
public int chunkX; public int getChunkX() { return chunkX; } // Paper - OBFHELPER public int chunkX; public int getChunkX() { return chunkX; } // Paper - OBFHELPER
public int chunkY; public int getChunkY() { return chunkY; } // Paper - OBFHELPER public int chunkY; public int getChunkY() { return chunkY; } // Paper - OBFHELPER
public int chunkZ; public int getChunkZ() { return chunkZ; } // Paper - OBFHELPER public int chunkZ; public int getChunkZ() { return chunkZ; } // Paper - OBFHELPER
@@ -1665,6 +1665,39 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -1664,6 +1664,39 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
} }
// Paper start // Paper start
@ -146,7 +146,7 @@ index d636965800..e2b37ed1a0 100644
private String entityKeyString; private String entityKeyString;
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 319be67501..12f359a6ba 100644 index 94fbf228d2..42303f5b39 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java --- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -42,6 +42,15 @@ public abstract class TileEntity implements KeyedObject { // Paper @@ -42,6 +42,15 @@ public abstract class TileEntity implements KeyedObject { // Paper

View File

@ -1,4 +1,4 @@
From acaccffc57a71f1aa4ecc97947903de8ad5b238b Mon Sep 17 00:00:00 2001 From fbc132e334e42bb567b29510dc0827ab0f16521d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 04:00:11 -0600 Date: Thu, 3 Mar 2016 04:00:11 -0600
Subject: [PATCH] Timings v2 Subject: [PATCH] Timings v2
@ -299,7 +299,7 @@ index 5518ec1e54..7691409f6c 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index c6d536226b..15dac7b94e 100644 index 8b91e27c66..fd23d45346 100644
--- a/src/main/java/net/minecraft/server/Block.java --- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java
@@ -24,6 +24,15 @@ public class Block implements IMaterial { @@ -24,6 +24,15 @@ public class Block implements IMaterial {
@ -319,7 +319,7 @@ index c6d536226b..15dac7b94e 100644
private final float frictionFactor; private final float frictionFactor;
protected final BlockStateList<Block, IBlockData> blockStateList; protected final BlockStateList<Block, IBlockData> blockStateList;
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 2b29fe837b..89bce93c61 100644 index 9cce929c3e..1a2cc0258a 100644
--- a/src/main/java/net/minecraft/server/Chunk.java --- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -89,6 +89,29 @@ public class Chunk implements IChunkAccess { @@ -89,6 +89,29 @@ public class Chunk implements IChunkAccess {
@ -369,7 +369,7 @@ index 2b29fe837b..89bce93c61 100644
} }
} }
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 416f8e080c..5ee9824ba2 100644 index 845ad7427b..4f0fbe4a0d 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -186,7 +186,9 @@ public class ChunkProviderServer extends IChunkProvider { @@ -186,7 +186,9 @@ public class ChunkProviderServer extends IChunkProvider {
@ -406,7 +406,7 @@ index 416f8e080c..5ee9824ba2 100644
@Override @Override
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index c91347c644..8ac0e67e35 100644 index d084d24a01..0fed039f34 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
@ -480,7 +480,7 @@ index 46e7737ca3..a3ef943066 100644
return this.b; return this.b;
} }
diff --git a/src/main/java/net/minecraft/server/CustomFunctionData.java b/src/main/java/net/minecraft/server/CustomFunctionData.java diff --git a/src/main/java/net/minecraft/server/CustomFunctionData.java b/src/main/java/net/minecraft/server/CustomFunctionData.java
index ed4b189d7e..2d2a4c9825 100644 index 42e01136d9..b7c1d7671e 100644
--- a/src/main/java/net/minecraft/server/CustomFunctionData.java --- a/src/main/java/net/minecraft/server/CustomFunctionData.java
+++ b/src/main/java/net/minecraft/server/CustomFunctionData.java +++ b/src/main/java/net/minecraft/server/CustomFunctionData.java
@@ -100,7 +100,7 @@ public class CustomFunctionData implements IResourcePackListener { @@ -100,7 +100,7 @@ public class CustomFunctionData implements IResourcePackListener {
@ -546,10 +546,10 @@ index b60956218d..19e2df3098 100644
return waitable.get(); return waitable.get();
} catch (java.util.concurrent.ExecutionException e) { } catch (java.util.concurrent.ExecutionException e) {
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index e2b37ed1a0..2d07bfa879 100644 index 53f8e6811a..114a851f0f 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -30,7 +30,8 @@ import org.bukkit.command.CommandSender; @@ -29,7 +29,8 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Hanging; import org.bukkit.entity.Hanging;
import org.bukkit.entity.LivingEntity; import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Vehicle; import org.bukkit.entity.Vehicle;
@ -559,7 +559,7 @@ index e2b37ed1a0..2d07bfa879 100644
import org.bukkit.event.entity.EntityCombustByEntityEvent; import org.bukkit.event.entity.EntityCombustByEntityEvent;
import org.bukkit.event.hanging.HangingBreakByEntityEvent; import org.bukkit.event.hanging.HangingBreakByEntityEvent;
import org.bukkit.event.vehicle.VehicleBlockCollisionEvent; import org.bukkit.event.vehicle.VehicleBlockCollisionEvent;
@@ -159,7 +160,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -158,7 +159,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
public boolean valid; public boolean valid;
public org.bukkit.projectiles.ProjectileSource projectileSource; // For projectiles only public org.bukkit.projectiles.ProjectileSource projectileSource; // For projectiles only
public boolean forceExplosionKnockback; // SPIGOT-949 public boolean forceExplosionKnockback; // SPIGOT-949
@ -568,7 +568,7 @@ index e2b37ed1a0..2d07bfa879 100644
// Spigot start // Spigot start
public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
public final boolean defaultActivationState; public final boolean defaultActivationState;
@@ -475,7 +476,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -474,7 +475,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
} }
public void move(EnumMoveType enummovetype, Vec3D vec3d) { public void move(EnumMoveType enummovetype, Vec3D vec3d) {
@ -576,7 +576,7 @@ index e2b37ed1a0..2d07bfa879 100644
if (this.noclip) { if (this.noclip) {
this.a(this.getBoundingBox().b(vec3d)); this.a(this.getBoundingBox().b(vec3d));
this.recalcPosition(); this.recalcPosition();
@@ -640,7 +640,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -639,7 +639,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
this.world.getMethodProfiler().exit(); this.world.getMethodProfiler().exit();
} }
@ -585,7 +585,7 @@ index e2b37ed1a0..2d07bfa879 100644
protected Vec3D a(Vec3D vec3d, EnumMoveType enummovetype) { protected Vec3D a(Vec3D vec3d, EnumMoveType enummovetype) {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index d31c1c989c..d89dbf1745 100644 index f86e6a4c51..85567a7072 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java --- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -35,7 +35,7 @@ import org.bukkit.event.entity.EntityTeleportEvent; @@ -35,7 +35,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
@ -661,7 +661,7 @@ index d31c1c989c..d89dbf1745 100644
} }
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index e35d4808bf..7b102e155d 100644 index 741105fb6c..277fa64e24 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@ -789,7 +789,7 @@ index e35d4808bf..7b102e155d 100644
this.methodProfiler.exit(); this.methodProfiler.exit();
} }
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 95ba254479..5d13e7ad36 100644 index 4d8491c760..c08a1a6e51 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -1,6 +1,8 @@ @@ -1,6 +1,8 @@
@ -850,7 +850,7 @@ index 95ba254479..5d13e7ad36 100644
// CraftBukkit start // CraftBukkit start
if (event == null) { if (event == null) {
this.saveChunk(ichunkaccess); this.saveChunk(ichunkaccess);
@@ -418,7 +455,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -424,7 +461,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}); });
return completablefuture.thenComposeAsync((either) -> { return completablefuture.thenComposeAsync((either) -> {
@ -859,7 +859,7 @@ index 95ba254479..5d13e7ad36 100644
try { try {
CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> completablefuture1 = chunkstatus.a(this.world, this.chunkGenerator, this.definedStructureManager, this.lightEngine, (ichunkaccess) -> { CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> completablefuture1 = chunkstatus.a(this.world, this.chunkGenerator, this.definedStructureManager, this.lightEngine, (ichunkaccess) -> {
return this.b(playerchunk); return this.b(playerchunk);
@@ -898,6 +935,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -904,6 +941,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
PlayerChunkMap.EntityTracker playerchunkmap_entitytracker; PlayerChunkMap.EntityTracker playerchunkmap_entitytracker;
ObjectIterator objectiterator; ObjectIterator objectiterator;
@ -867,7 +867,7 @@ index 95ba254479..5d13e7ad36 100644
for (objectiterator = this.trackedEntities.values().iterator(); objectiterator.hasNext(); playerchunkmap_entitytracker.trackerEntry.a()) { for (objectiterator = this.trackedEntities.values().iterator(); objectiterator.hasNext(); playerchunkmap_entitytracker.trackerEntry.a()) {
playerchunkmap_entitytracker = (PlayerChunkMap.EntityTracker) objectiterator.next(); playerchunkmap_entitytracker = (PlayerChunkMap.EntityTracker) objectiterator.next();
@@ -915,9 +953,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -921,9 +959,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
playerchunkmap_entitytracker.e = sectionposition1; playerchunkmap_entitytracker.e = sectionposition1;
} }
} }
@ -961,7 +961,7 @@ index c8d2c81c58..aefc3eb19c 100644
throw CancelledPacketHandleException.INSTANCE; throw CancelledPacketHandleException.INSTANCE;
} }
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 993306e8e7..e6c03908cb 100644 index b0c6b1385d..7939208a5a 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java --- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
@ -971,7 +971,7 @@ index 993306e8e7..e6c03908cb 100644
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
@@ -888,10 +889,11 @@ public abstract class PlayerList { @@ -892,10 +893,11 @@ public abstract class PlayerList {
} }
public void savePlayers() { public void savePlayers() {
@ -1038,7 +1038,7 @@ index 537e610797..b48e5b51a0 100644
} }
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 12f359a6ba..b5e0ba3909 100644 index 42303f5b39..456afbf079 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java --- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -4,12 +4,13 @@ import javax.annotation.Nullable; @@ -4,12 +4,13 @@ import javax.annotation.Nullable;
@ -1054,11 +1054,11 @@ index 12f359a6ba..b5e0ba3909 100644
- public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot - public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot
+ public Timing tickTimer = MinecraftTimings.getTileEntityTimings(this); // Paper + public Timing tickTimer = MinecraftTimings.getTileEntityTimings(this); // Paper
private static final Logger a = LogManager.getLogger(); private static final Logger LOGGER = LogManager.getLogger();
private final TileEntityTypes<?> b; public TileEntityTypes getTileEntityType() { return b; } // Paper - OBFHELPER private final TileEntityTypes<?> b; public TileEntityTypes getTileEntityType() { return b; } // Paper - OBFHELPER
@Nullable @Nullable
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 28fa346b7f..eabcab0244 100644 index 83fdea893c..738d9da8ce 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java
@@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@ -1122,7 +1122,7 @@ index 28fa346b7f..eabcab0244 100644
// Spigot end // Spigot end
} }
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 1ec8272ff3..4fdbb8cd57 100644 index 20900593af..d54d58e1ee 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@ -1154,7 +1154,7 @@ index 1ec8272ff3..4fdbb8cd57 100644
this.I = Sets.newHashSet(); this.I = Sets.newHashSet();
this.siegeManager = new VillageSiege(this); this.siegeManager = new VillageSiege(this);
this.J = new ObjectLinkedOpenHashSet(); this.J = new ObjectLinkedOpenHashSet();
@@ -442,6 +443,7 @@ public class WorldServer extends World { @@ -327,6 +328,7 @@ public class WorldServer extends World {
org.spigotmc.ActivationRange.activateEntities(this); // Spigot org.spigotmc.ActivationRange.activateEntities(this); // Spigot
timings.entityTick.startTiming(); // Spigot timings.entityTick.startTiming(); // Spigot
@ -1162,7 +1162,7 @@ index 1ec8272ff3..4fdbb8cd57 100644
while (objectiterator.hasNext()) { while (objectiterator.hasNext()) {
Entry<Entity> entry = (Entry) objectiterator.next(); Entry<Entity> entry = (Entry) objectiterator.next();
Entity entity1 = (Entity) entry.getValue(); Entity entity1 = (Entity) entry.getValue();
@@ -545,6 +547,7 @@ public class WorldServer extends World { @@ -430,6 +432,7 @@ public class WorldServer extends World {
} }
gameprofilerfiller.exitEnter("tickBlocks"); gameprofilerfiller.exitEnter("tickBlocks");
@ -1170,7 +1170,7 @@ index 1ec8272ff3..4fdbb8cd57 100644
if (i > 0) { if (i > 0) {
ChunkSection[] achunksection = chunk.getSections(); ChunkSection[] achunksection = chunk.getSections();
int l = achunksection.length; int l = achunksection.length;
@@ -576,7 +579,7 @@ public class WorldServer extends World { @@ -461,7 +464,7 @@ public class WorldServer extends World {
} }
} }
} }
@ -1179,7 +1179,7 @@ index 1ec8272ff3..4fdbb8cd57 100644
gameprofilerfiller.exit(); gameprofilerfiller.exit();
} }
@@ -869,6 +872,7 @@ public class WorldServer extends World { @@ -754,6 +757,7 @@ public class WorldServer extends World {
if (!flag1) { if (!flag1) {
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit
@ -1187,7 +1187,7 @@ index 1ec8272ff3..4fdbb8cd57 100644
if (iprogressupdate != null) { if (iprogressupdate != null) {
iprogressupdate.a(new ChatMessage("menu.savingLevel", new Object[0])); iprogressupdate.a(new ChatMessage("menu.savingLevel", new Object[0]));
} }
@@ -878,7 +882,10 @@ public class WorldServer extends World { @@ -763,7 +767,10 @@ public class WorldServer extends World {
iprogressupdate.c(new ChatMessage("menu.savingChunks", new Object[0])); iprogressupdate.c(new ChatMessage("menu.savingChunks", new Object[0]));
} }
@ -1199,7 +1199,7 @@ index 1ec8272ff3..4fdbb8cd57 100644
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 93246f464b..95d0075d57 100644 index 9021ab34fa..672a647960 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1922,12 +1922,31 @@ public final class CraftServer implements Server { @@ -1922,12 +1922,31 @@ public final class CraftServer implements Server {

View File

@ -1,4 +1,4 @@
From 658e764bcd49c33fd09b0bcf5cc42014f7599b19 Mon Sep 17 00:00:00 2001 From 4c5ba563e76ce1ad1703efc25ef3952b56e373e6 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net> From: Byteflux <byte@byteflux.net>
Date: Tue, 1 Mar 2016 14:14:15 -0600 Date: Tue, 1 Mar 2016 14:14:15 -0600
Subject: [PATCH] Drop falling block and tnt entities at the specified height Subject: [PATCH] Drop falling block and tnt entities at the specified height
@ -24,10 +24,10 @@ index 3f734327c0..1ed58f4bba 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 2d07bfa879..7191861e81 100644 index 114a851f0f..ca21afc199 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1770,6 +1770,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -1769,6 +1769,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
return this.a(itemstack, 0.0F); return this.a(itemstack, 0.0F);
} }

View File

@ -1,4 +1,4 @@
From d054764b7c89587e26af504433d4ce408277a3be Mon Sep 17 00:00:00 2001 From d6da37cf3560528b02e72e0b5c08747103db3fcf Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 14:32:43 -0600 Date: Tue, 1 Mar 2016 14:32:43 -0600
Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
@ -6,7 +6,7 @@ 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 diff --git a/src/main/java/net/minecraft/server/EULA.java b/src/main/java/net/minecraft/server/EULA.java
index d05fee962a..61c02c530b 100644 index 3f35a28ba1..cf00f35a5b 100644
--- a/src/main/java/net/minecraft/server/EULA.java --- a/src/main/java/net/minecraft/server/EULA.java
+++ b/src/main/java/net/minecraft/server/EULA.java +++ b/src/main/java/net/minecraft/server/EULA.java
@@ -70,7 +70,7 @@ public class EULA { @@ -70,7 +70,7 @@ public class EULA {
@ -19,7 +19,7 @@ index d05fee962a..61c02c530b 100644
throwable = throwable1; throwable = throwable1;
throw throwable1; throw throwable1;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 7b102e155d..89ad19e59c 100644 index 277fa64e24..33e8030def 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1264,7 +1264,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas @@ -1264,7 +1264,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -32,7 +32,7 @@ index 7b102e155d..89ad19e59c 100644
public CrashReport b(CrashReport crashreport) { public CrashReport b(CrashReport crashreport) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 95d0075d57..a750d8ab5b 100644 index 672a647960..07e052b649 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -196,7 +196,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; @@ -196,7 +196,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
@ -45,11 +45,11 @@ index 95d0075d57..a750d8ab5b 100644
private final String bukkitVersion = Versioning.getBukkitVersion(); private final String bukkitVersion = Versioning.getBukkitVersion();
private final Logger logger = Logger.getLogger("Minecraft"); 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 diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index e34abd0c1f..74dd85fac8 100644 index fd02ba1916..a96c144fca 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -199,12 +199,25 @@ public class Main { @@ -199,12 +199,25 @@ public class Main {
deadline.add(Calendar.DAY_OF_YEAR, -21); deadline.add(Calendar.DAY_OF_YEAR, -3);
if (buildDate.before(deadline.getTime())) { if (buildDate.before(deadline.getTime())) {
System.err.println("*** Error, this build is outdated ***"); System.err.println("*** Error, this build is outdated ***");
- System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***"); - System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***");

View File

@ -1,4 +1,4 @@
From 2b197fb4121fb5e528c4c58ee63df0b43f40966f Mon Sep 17 00:00:00 2001 From c0f630db178f498a793777ac2084016fa9b5e453 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Tue, 1 Mar 2016 23:09:29 -0600 Date: Tue, 1 Mar 2016 23:09:29 -0600
Subject: [PATCH] Further improve server tick loop Subject: [PATCH] Further improve server tick loop
@ -12,7 +12,7 @@ Previous implementation did not calculate TPS correctly.
Switch to a realistic rolling average and factor in std deviation as an extra reporting variable Switch to a realistic rolling average and factor in std deviation as an extra reporting variable
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 89ad19e59c..7dfe1f0a3c 100644 index 33e8030def..48286867fe 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -150,7 +150,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas @@ -150,7 +150,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -160,13 +160,13 @@ index 89ad19e59c..7dfe1f0a3c 100644
} }
private boolean canSleepForTick() { private boolean canSleepForTick() {
- return this.bg() || SystemUtils.getMonotonicMillis() < (this.ac ? this.ab : this.nextTick); - return this.isEntered() || SystemUtils.getMonotonicMillis() < (this.ac ? this.ab : this.nextTick);
+ return System.nanoTime() - lastTick + catchupTime < TICK_TIME; // Paper - improved "are we lagging" check to match our own + return System.nanoTime() - lastTick + catchupTime < TICK_TIME; // Paper - improved "are we lagging" check to match our own
} }
protected void sleepForTick() { protected void sleepForTick() {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index a750d8ab5b..423cbd558e 100644 index 07e052b649..de592ae851 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1919,6 +1919,17 @@ public final class CraftServer implements Server { @@ -1919,6 +1919,17 @@ public final class CraftServer implements Server {

View File

@ -1,14 +1,14 @@
From cd1b38a03518343b566b13fa07feab35e3dea428 Mon Sep 17 00:00:00 2001 From 9ce6c64ce6774a54002489191fab5795f70b1567 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net> From: Byteflux <byte@byteflux.net>
Date: Tue, 1 Mar 2016 23:45:08 -0600 Date: Tue, 1 Mar 2016 23:45:08 -0600
Subject: [PATCH] Entity Origin API Subject: [PATCH] Entity Origin API
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 7191861e81..c813b59af5 100644 index ca21afc199..af019fc3f1 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -161,6 +161,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -160,6 +160,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
public org.bukkit.projectiles.ProjectileSource projectileSource; // For projectiles only public org.bukkit.projectiles.ProjectileSource projectileSource; // For projectiles only
public boolean forceExplosionKnockback; // SPIGOT-949 public boolean forceExplosionKnockback; // SPIGOT-949
public Timing tickTimer = MinecraftTimings.getEntityTimings(this); // Paper public Timing tickTimer = MinecraftTimings.getEntityTimings(this); // Paper
@ -16,7 +16,7 @@ index 7191861e81..c813b59af5 100644
// Spigot start // Spigot start
public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
public final boolean defaultActivationState; public final boolean defaultActivationState;
@@ -1529,6 +1530,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -1528,6 +1529,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
} }
} }
@ -28,7 +28,7 @@ index 7191861e81..c813b59af5 100644
return nbttagcompound; return nbttagcompound;
} catch (Throwable throwable) { } catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT"); CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT");
@@ -1650,6 +1656,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -1649,6 +1655,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
} }
// CraftBukkit end // CraftBukkit end
@ -42,7 +42,7 @@ index 7191861e81..c813b59af5 100644
} catch (Throwable throwable) { } catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT"); CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded");
@@ -1727,6 +1740,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -1726,6 +1739,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
protected abstract void b(NBTTagCompound nbttagcompound); protected abstract void b(NBTTagCompound nbttagcompound);

View File

@ -1,4 +1,4 @@
From ff3266a66baaf6940a31d4a26742cf8cf7479b79 Mon Sep 17 00:00:00 2001 From 1ab46ee6d9339d3bcd0aeb14a5bf5167779f3bda Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 23:58:50 -0600 Date: Tue, 1 Mar 2016 23:58:50 -0600
Subject: [PATCH] Configurable top of nether void damage Subject: [PATCH] Configurable top of nether void damage
@ -29,10 +29,10 @@ index 1ed58f4bba..a797a57671 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index c813b59af5..494c6cb4aa 100644 index af019fc3f1..49245b5c5f 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -385,9 +385,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -384,9 +384,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
this.fallDistance *= 0.5F; this.fallDistance *= 0.5F;
} }
@ -48,7 +48,7 @@ index c813b59af5..494c6cb4aa 100644
if (!this.world.isClientSide) { if (!this.world.isClientSide) {
this.setFlag(0, this.fireTicks > 0); this.setFlag(0, this.fireTicks > 0);
@@ -397,6 +403,17 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -396,6 +402,17 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
this.world.getMethodProfiler().exit(); this.world.getMethodProfiler().exit();
} }
@ -66,7 +66,7 @@ index c813b59af5..494c6cb4aa 100644
protected void E() { protected void E() {
if (this.portalCooldown > 0) { if (this.portalCooldown > 0) {
--this.portalCooldown; --this.portalCooldown;
@@ -464,6 +481,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -463,6 +480,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
this.fireTicks = 0; this.fireTicks = 0;
} }

View File

@ -1,14 +1,14 @@
From cf24658d7888f1e4ca7faa4fa85c90cf87f3da29 Mon Sep 17 00:00:00 2001 From 8f2350f0a8682976968073072d82217c8b358034 Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com> From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 14:48:03 -0600 Date: Wed, 2 Mar 2016 14:48:03 -0600
Subject: [PATCH] Disable explosion knockback Subject: [PATCH] Disable explosion knockback
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index a39451c69a..65a99b2a4b 100644 index a5ec0bc0e0..6a307d5dd6 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -159,4 +159,9 @@ public class PaperWorldConfig { @@ -151,4 +151,9 @@ public class PaperWorldConfig {
optimizeExplosions = getBoolean("optimize-explosions", false); optimizeExplosions = getBoolean("optimize-explosions", false);
log("Optimize explosions: " + optimizeExplosions); log("Optimize explosions: " + optimizeExplosions);
} }
@ -19,10 +19,10 @@ index a39451c69a..65a99b2a4b 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index b092b0fa23..c5cc0b471b 100644 index 85567a7072..d85172e728 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java --- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -1006,6 +1006,7 @@ public abstract class EntityLiving extends Entity { @@ -1112,6 +1112,7 @@ public abstract class EntityLiving extends Entity {
} }
} }
@ -30,7 +30,7 @@ index b092b0fa23..c5cc0b471b 100644
if (flag1) { if (flag1) {
if (flag) { if (flag) {
this.world.broadcastEntityEffect(this, (byte) 29); this.world.broadcastEntityEffect(this, (byte) 29);
@@ -1022,6 +1023,7 @@ public abstract class EntityLiving extends Entity { @@ -1130,6 +1131,7 @@ public abstract class EntityLiving extends Entity {
b0 = 2; b0 = 2;
} }
@ -38,20 +38,20 @@ index b092b0fa23..c5cc0b471b 100644
this.world.broadcastEntityEffect(this, b0); this.world.broadcastEntityEffect(this, b0);
} }
@@ -1045,6 +1047,8 @@ public abstract class EntityLiving extends Entity { @@ -1153,6 +1155,8 @@ public abstract class EntityLiving extends Entity {
} }
} }
+ if (knockbackCancelled) this.world.broadcastEntityEffect(this, (byte) 2); // Paper - Disable explosion knockback + if (knockbackCancelled) this.world.broadcastEntityEffect(this, (byte) 2); // Paper - Disable explosion knockback
+ +
if (this.getHealth() <= 0.0F) { if (this.getHealth() <= 0.0F) {
if (!this.e(damagesource)) { if (!this.f(damagesource)) {
SoundEffect soundeffect = this.cs(); SoundEffect soundeffect = this.getSoundDeath();
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
index 3e44b2d549..5591ccb3b0 100644 index bcff117619..6eeff4ce59 100644
--- a/src/main/java/net/minecraft/server/Explosion.java --- a/src/main/java/net/minecraft/server/Explosion.java
+++ b/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java
@@ -153,7 +153,7 @@ public class Explosion { @@ -188,14 +188,14 @@ public class Explosion {
double d14 = d13; double d14 = d13;
if (entity instanceof EntityLiving) { if (entity instanceof EntityLiving) {
@ -59,13 +59,12 @@ index 3e44b2d549..5591ccb3b0 100644
+ d14 = entity instanceof EntityHuman && world.paperConfig.disableExplosionKnockback ? 0 : EnchantmentProtection.a((EntityLiving) entity, d13); // Paper - Disable explosion knockback + d14 = entity instanceof EntityHuman && world.paperConfig.disableExplosionKnockback ? 0 : EnchantmentProtection.a((EntityLiving) entity, d13); // Paper - Disable explosion knockback
} }
entity.motX += d8 * d14; entity.setMot(entity.getMot().add(d8 * d14, d9 * d14, d10 * d14));
@@ -162,7 +162,7 @@ public class Explosion {
if (entity instanceof EntityHuman) { if (entity instanceof EntityHuman) {
EntityHuman entityhuman = (EntityHuman) entity; EntityHuman entityhuman = (EntityHuman) entity;
- if (!entityhuman.isSpectator() && (!entityhuman.u() || !entityhuman.abilities.isFlying)) { - if (!entityhuman.isSpectator() && (!entityhuman.isCreative() || !entityhuman.abilities.isFlying)) {
+ if (!entityhuman.isSpectator() && (!entityhuman.u() && !world.paperConfig.disableExplosionKnockback || !entityhuman.abilities.isFlying)) { // Paper - Disable explosion knockback + if (!entityhuman.isSpectator() && (!entityhuman.isCreative() && !world.paperConfig.disableExplosionKnockback || !entityhuman.abilities.isFlying)) { // Paper - Disable explosion knockback
this.l.put(entityhuman, new Vec3D(d8 * d13, d9 * d13, d10 * d13)); this.l.put(entityhuman, new Vec3D(d8 * d13, d9 * d13, d10 * d13));
} }
} }

View File

@ -1,14 +1,14 @@
From 51dcc0bca12b8920ea29368566fd594a27f02dd8 Mon Sep 17 00:00:00 2001 From 8f5a51d97b15c8de7f1074f14eeb26e09ad4effe Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com> From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 14:52:43 -0600 Date: Wed, 2 Mar 2016 14:52:43 -0600
Subject: [PATCH] Disable thunder Subject: [PATCH] Disable thunder
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 65a99b2a4b..0ba604ffcf 100644 index 6a307d5dd6..bf0cd6a8b4 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -164,4 +164,9 @@ public class PaperWorldConfig { @@ -156,4 +156,9 @@ public class PaperWorldConfig {
private void disableExplosionKnockback(){ private void disableExplosionKnockback(){
disableExplosionKnockback = getBoolean("disable-explosion-knockback", false); disableExplosionKnockback = getBoolean("disable-explosion-knockback", false);
} }
@ -19,18 +19,18 @@ index 65a99b2a4b..0ba604ffcf 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 5a7087c758..716c3ddb8c 100644 index d54d58e1ee..3b90e8b613 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -474,7 +474,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { @@ -393,7 +393,7 @@ public class WorldServer extends World {
int l; gameprofilerfiller.enter("thunder");
BlockPosition blockposition; BlockPosition blockposition;
- if (flag && flag1 && this.random.nextInt(100000) == 0) { - if (flag && this.U() && this.random.nextInt(100000) == 0) {
+ if (!this.paperConfig.disableThunder && flag && flag1 && this.random.nextInt(100000) == 0) { // Paper - Disable thunder + if (!this.paperConfig.disableThunder && flag && this.U() && this.random.nextInt(100000) == 0) { // Paper - Disable thunder
this.m = this.m * 3 + 1013904223; blockposition = this.a(this.a(j, 0, k, 15));
l = this.m >> 2; if (this.isRainingAt(blockposition)) {
blockposition = this.a(new BlockPosition(j + (l & 15), 0, k + (l >> 8 & 15))); DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition);
-- --
2.21.0 2.21.0

View File

@ -1,14 +1,14 @@
From c5a235ad0ea3ac72b8ec52709c4501dc9e484467 Mon Sep 17 00:00:00 2001 From cad96100cef4ebf55c54ec59470634f0af438a13 Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com> From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 14:57:24 -0600 Date: Wed, 2 Mar 2016 14:57:24 -0600
Subject: [PATCH] Disable ice and snow Subject: [PATCH] Disable ice and snow
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 0ba604ffcf..8b3c7b05c3 100644 index bf0cd6a8b4..8db5c3f3fe 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -169,4 +169,9 @@ public class PaperWorldConfig { @@ -161,4 +161,9 @@ public class PaperWorldConfig {
private void disableThunder() { private void disableThunder() {
disableThunder = getBoolean("disable-thunder", false); disableThunder = getBoolean("disable-thunder", false);
} }
@ -19,18 +19,18 @@ index 0ba604ffcf..8b3c7b05c3 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 716c3ddb8c..ed6f3afcfe 100644 index 3b90e8b613..e176c63fed 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -496,7 +496,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { @@ -413,7 +413,7 @@ public class WorldServer extends World {
} }
this.methodProfiler.exitEnter("iceandsnow"); gameprofilerfiller.exitEnter("iceandsnow");
- if (this.random.nextInt(16) == 0) { - if (this.random.nextInt(16) == 0) {
+ if (!this.paperConfig.disableIceAndSnow && this.random.nextInt(16) == 0) { // Paper - Disable ice and snow + if (!this.paperConfig.disableIceAndSnow && this.random.nextInt(16) == 0) { // Paper - Disable ice and snow
this.m = this.m * 3 + 1013904223; blockposition = this.getHighestBlockYAt(HeightMap.Type.MOTION_BLOCKING, this.a(j, 0, k, 15));
l = this.m >> 2; BlockPosition blockposition1 = blockposition.down();
blockposition = this.getHighestBlockYAt(HeightMap.Type.MOTION_BLOCKING, new BlockPosition(j + (l & 15), 0, k + (l >> 8 & 15))); BiomeBase biomebase = this.getBiome(blockposition);
-- --
2.21.0 2.21.0

View File

@ -1,14 +1,14 @@
From 0debd2105cbb41e08ad37942d0b964e14b8d703d Mon Sep 17 00:00:00 2001 From 7b29308aadabc42681f9c94fba7ac381947d1f01 Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com> From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 15:03:53 -0600 Date: Wed, 2 Mar 2016 15:03:53 -0600
Subject: [PATCH] Configurable mob spawner tick rate Subject: [PATCH] Configurable mob spawner tick rate
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 8b3c7b05c3..7c16ec9970 100644 index 8db5c3f3fe..e4e00e2e1c 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -174,4 +174,9 @@ public class PaperWorldConfig { @@ -166,4 +166,9 @@ public class PaperWorldConfig {
private void disableIceAndSnow(){ private void disableIceAndSnow(){
disableIceAndSnow = getBoolean("disable-ice-and-snow", false); disableIceAndSnow = getBoolean("disable-ice-and-snow", false);
} }
@ -19,10 +19,10 @@ index 8b3c7b05c3..7c16ec9970 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
index cc0371b4aa..ce43b4bc52 100644 index 4db5fd641f..6499d27e63 100644
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java --- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
@@ -22,6 +22,7 @@ public abstract class MobSpawnerAbstract { @@ -23,6 +23,7 @@ public abstract class MobSpawnerAbstract {
public int maxNearbyEntities = 6; public int maxNearbyEntities = 6;
public int requiredPlayerRange = 16; public int requiredPlayerRange = 16;
public int spawnRange = 4; public int spawnRange = 4;
@ -30,7 +30,7 @@ index cc0371b4aa..ce43b4bc52 100644
public MobSpawnerAbstract() {} public MobSpawnerAbstract() {}
@@ -51,6 +52,10 @@ public abstract class MobSpawnerAbstract { @@ -52,6 +53,10 @@ public abstract class MobSpawnerAbstract {
} }
public void c() { public void c() {
@ -41,9 +41,9 @@ index cc0371b4aa..ce43b4bc52 100644
if (!this.h()) { if (!this.h()) {
this.f = this.e; this.f = this.e;
} else { } else {
@@ -64,18 +69,18 @@ public abstract class MobSpawnerAbstract { @@ -66,18 +71,18 @@ public abstract class MobSpawnerAbstract {
this.a().addParticle(Particles.M, d0, d1, d2, 0.0D, 0.0D, 0.0D); world.addParticle(Particles.SMOKE, d0, d1, d2, 0.0D, 0.0D, 0.0D);
this.a().addParticle(Particles.y, d0, d1, d2, 0.0D, 0.0D, 0.0D); world.addParticle(Particles.FLAME, d0, d1, d2, 0.0D, 0.0D, 0.0D);
if (this.spawnDelay > 0) { if (this.spawnDelay > 0) {
- --this.spawnDelay; - --this.spawnDelay;
+ this.spawnDelay -= tickDelay; // Paper + this.spawnDelay -= tickDelay; // Paper

View File

@ -0,0 +1,111 @@
From 76aeea2b3b5c1bbedf0aa2793199f6c5d3a23769 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Wed, 2 Mar 2016 23:13:07 -0600
Subject: [PATCH] Send absolute position the first time an entity is seen
diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
index 315c3d9165..aaf3a54b08 100644
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
@@ -2,6 +2,7 @@ package net.minecraft.server;
import java.util.Collection;
import java.util.Collections;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
@@ -21,7 +22,7 @@ public class EntityTrackerEntry {
private final Entity tracker;
private final int d;
private final boolean e;
- private final Consumer<Packet<?>> f;
+ private final Consumer<Packet<?>> f; private Consumer<Packet<?>> getPacketConsumer() { return f; } // Paper - OBFHELPER
private long xLoc;
private long yLoc;
private long zLoc;
@@ -36,8 +37,23 @@ public class EntityTrackerEntry {
private boolean r;
// CraftBukkit start
private final Set<EntityPlayer> trackedPlayers;
+ // Paper start
+ private java.util.Map<EntityPlayer, Boolean> trackedPlayerMap = null;
+
+ /**
+ * Requested in https://github.com/PaperMC/Paper/issues/1537 to allow intercepting packets
+ */
+ public void sendPlayerPacket(EntityPlayer player, Packet packet) {
+ player.playerConnection.sendPacket(packet);
+ }
+
+ public EntityTrackerEntry(WorldServer worldserver, Entity entity, int i, boolean flag, Consumer<Packet<?>> consumer, java.util.Map<EntityPlayer, Boolean> trackedPlayers) {
+ this(worldserver, entity, i, flag, consumer, trackedPlayers.keySet());
+ trackedPlayerMap = trackedPlayers;
+ }
public EntityTrackerEntry(WorldServer worldserver, Entity entity, int i, boolean flag, Consumer<Packet<?>> consumer, Set<EntityPlayer> trackedPlayers) {
+ // Paper end
this.trackedPlayers = trackedPlayers;
// CraftBukkit end
this.m = Vec3D.a;
@@ -159,7 +175,25 @@ public class EntityTrackerEntry {
}
if (packet1 != null) {
- this.f.accept(packet1);
+ // paper start
+ if (trackedPlayerMap == null || packet1 instanceof PacketPlayOutEntityTeleport) {
+ this.f.accept((packet1));
+ } else {
+ PacketPlayOutEntityTeleport teleportPacket = null;
+
+ for (java.util.Map.Entry<EntityPlayer, Boolean> viewer : trackedPlayerMap.entrySet()) {
+ if (viewer.getValue()) {
+ viewer.setValue(false);
+ if (teleportPacket == null) {
+ teleportPacket = new PacketPlayOutEntityTeleport(this.tracker);
+ }
+ sendPlayerPacket(viewer.getKey(), teleportPacket);
+ } else {
+ sendPlayerPacket(viewer.getKey(), packet1);
+ }
+ }
+ }
+ // Paper end
}
this.c();
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index c08a1a6e51..528d0f0cd2 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -1056,10 +1056,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
private final Entity tracker;
private final int trackingDistance;
private SectionPosition e;
- public final Set<EntityPlayer> trackedPlayers = Sets.newHashSet();
+ // Paper start
+ // Replace trackedPlayers Set with a Map. The value is true until the player receives
+ // their first update (which is forced to have absolute coordinates), false afterward.
+ public java.util.Map<EntityPlayer, Boolean> trackedPlayerMap = new java.util.HashMap<>();
+ public Set<EntityPlayer> trackedPlayers = trackedPlayerMap.keySet();
public EntityTracker(Entity entity, int i, int j, boolean flag) {
- this.trackerEntry = new EntityTrackerEntry(PlayerChunkMap.this.world, entity, j, flag, this::broadcast, trackedPlayers); // CraftBukkit
+ this.trackerEntry = new EntityTrackerEntry(PlayerChunkMap.this.world, entity, j, flag, this::broadcast, trackedPlayerMap); // CraftBukkit // Paper
this.tracker = entity;
this.trackingDistance = i;
this.e = SectionPosition.a(entity);
@@ -1141,7 +1145,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
entityplayer.removeQueue.remove(Integer.valueOf(this.tracker.getId()));
// CraftBukkit end
- if (flag1 && this.trackedPlayers.add(entityplayer)) {
+ if (flag1 && this.trackedPlayerMap.put(entityplayer, true) == null) { // Paper
this.trackerEntry.b(entityplayer);
}
} else if (this.trackedPlayers.remove(entityplayer)) {
--
2.21.0

View File

@ -1,27 +1,26 @@
From fc85165d72c6b28d04036eaf70235f61b59f55e7 Mon Sep 17 00:00:00 2001 From bcf9690c17928aade39c3cf8769f9cdbd33b7cc3 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net> From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 23:30:53 -0600 Date: Wed, 2 Mar 2016 23:30:53 -0600
Subject: [PATCH] Add BeaconEffectEvent Subject: [PATCH] Add BeaconEffectEvent
diff --git a/src/main/java/net/minecraft/server/TileEntityBeacon.java b/src/main/java/net/minecraft/server/TileEntityBeacon.java diff --git a/src/main/java/net/minecraft/server/TileEntityBeacon.java b/src/main/java/net/minecraft/server/TileEntityBeacon.java
index fecd65ddb8..c6bd54a2c9 100644 index 8837dc4542..87f77bb86b 100644
--- a/src/main/java/net/minecraft/server/TileEntityBeacon.java --- a/src/main/java/net/minecraft/server/TileEntityBeacon.java
+++ b/src/main/java/net/minecraft/server/TileEntityBeacon.java +++ b/src/main/java/net/minecraft/server/TileEntityBeacon.java
@@ -15,6 +15,12 @@ import org.bukkit.entity.HumanEntity; @@ -14,6 +14,11 @@ import org.bukkit.craftbukkit.potion.CraftPotionUtil;
import org.bukkit.entity.HumanEntity;
import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffect;
// CraftBukkit end // CraftBukkit end
+// Paper start +// Paper start
+import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.craftbukkit.event.CraftEventFactory;
+import org.bukkit.entity.Player; +import org.bukkit.entity.Player;
+import com.destroystokyo.paper.event.block.BeaconEffectEvent; +import com.destroystokyo.paper.event.block.BeaconEffectEvent;
+// Paper end +// Paper end
+
public class TileEntityBeacon extends TileEntityContainer implements IWorldInventory, ITickable {
public static final MobEffectList[][] a = new MobEffectList[][] { { MobEffects.FASTER_MOVEMENT, MobEffects.FASTER_DIG}, { MobEffects.RESISTANCE, MobEffects.JUMP}, { MobEffects.INCREASE_DAMAGE}, { MobEffects.REGENERATION}}; public class TileEntityBeacon extends TileEntity implements ITileInventory, ITickable {
@@ -129,14 +135,31 @@ public class TileEntityBeacon extends TileEntityContainer implements IWorldInven
@@ -235,14 +240,31 @@ public class TileEntityBeacon extends TileEntity implements ITileInventory, ITic
} }
private void applyEffect(List list, MobEffectList effects, int i, int b0) { private void applyEffect(List list, MobEffectList effects, int i, int b0) {
@ -54,7 +53,7 @@ index fecd65ddb8..c6bd54a2c9 100644
} }
} }
} }
@@ -158,10 +181,10 @@ public class TileEntityBeacon extends TileEntityContainer implements IWorldInven @@ -265,10 +287,10 @@ public class TileEntityBeacon extends TileEntity implements ITileInventory, ITic
int i = getLevel(); int i = getLevel();
List list = getHumansInRange(); List list = getHumansInRange();

View File

@ -1,14 +1,14 @@
From c016580d4adc343720538d924999686d912bb2f2 Mon Sep 17 00:00:00 2001 From 0e0cdbb47aad3fb40ef01d000940577277963df4 Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com> From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 23:34:44 -0600 Date: Wed, 2 Mar 2016 23:34:44 -0600
Subject: [PATCH] Configurable container update tick rate Subject: [PATCH] Configurable container update tick rate
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 7c16ec9970..4266a87fe3 100644 index e4e00e2e1c..d663b15ceb 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -179,4 +179,9 @@ public class PaperWorldConfig { @@ -171,4 +171,9 @@ public class PaperWorldConfig {
private void mobSpawnerTickRate() { private void mobSpawnerTickRate() {
mobSpawnerTickRate = getInt("mob-spawner-tick-rate", 1); mobSpawnerTickRate = getInt("mob-spawner-tick-rate", 1);
} }
@ -19,25 +19,25 @@ index 7c16ec9970..4266a87fe3 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index c4a55c6a1f..2665faa6c5 100644 index fbde752052..dbb9a9a694 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -68,6 +68,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -71,6 +71,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public boolean f; public boolean e;
public int ping; public int ping;
public boolean viewingCredits; public boolean viewingCredits;
+ private int containerUpdateDelay; // Paper + private int containerUpdateDelay; // Paper
// CraftBukkit start // CraftBukkit start
public String displayName; public String displayName;
@@ -332,7 +333,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -348,7 +349,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
--this.noDamageTicks; --this.noDamageTicks;
} }
- this.activeContainer.b(); - this.activeContainer.c();
+ // Paper start - Configurable container update tick rate + // Paper start - Configurable container update tick rate
+ if (--containerUpdateDelay <= 0) { + if (--containerUpdateDelay <= 0) {
+ this.activeContainer.b(); + this.activeContainer.c();
+ containerUpdateDelay = world.paperConfig.containerUpdateTickRate; + containerUpdateDelay = world.paperConfig.containerUpdateTickRate;
+ } + }
+ // Paper end + // Paper end

View File

@ -1,29 +1,21 @@
From db5b2b692a6b6ca59d07f50beca322e56c5ee3dc Mon Sep 17 00:00:00 2001 From f21af7ce096c13e137b69a2704cf76b7a80ae5b4 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com> From: Techcable <Techcable@outlook.com>
Date: Wed, 2 Mar 2016 23:42:37 -0600 Date: Wed, 2 Mar 2016 23:42:37 -0600
Subject: [PATCH] Use UserCache for player heads Subject: [PATCH] Use UserCache for player heads
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
index 210c10b317..2ad3acf43b 100644 index 63ec8d06e4..f270532763 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
@@ -6,6 +6,7 @@ import net.minecraft.server.GameProfileSerializer; @@ -152,7 +152,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
import net.minecraft.server.NBTBase;
import net.minecraft.server.NBTTagCompound;
import net.minecraft.server.TileEntitySkull;
+import net.minecraft.server.*;
import org.bukkit.Bukkit;
import org.bukkit.Material;
@@ -155,7 +156,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
if (name == null) { if (name == null) {
profile = null; profile = null;
} else { } else {
- profile = new GameProfile(null, name); - profile = new GameProfile(null, name);
+ // Paper start - Use Online Players Skull + // Paper start - Use Online Players Skull
+ GameProfile newProfile = null; + GameProfile newProfile = null;
+ EntityPlayer player = MinecraftServer.getServer().getPlayerList().getPlayer(name); + net.minecraft.server.EntityPlayer player = net.minecraft.server.MinecraftServer.getServer().getPlayerList().getPlayer(name);
+ if (player != null) newProfile = player.getProfile(); + if (player != null) newProfile = player.getProfile();
+ if (newProfile == null) newProfile = new GameProfile(null, name); + if (newProfile == null) newProfile = new GameProfile(null, name);
+ profile = newProfile; + profile = newProfile;

View File

@ -0,0 +1,24 @@
From ca2b0215ad7c6097f7b59f8884a6c7ae71f25438 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Wed, 2 Mar 2016 23:45:17 -0600
Subject: [PATCH] Disable spigot tick limiters
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index ee953c880e..48360c2b47 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -650,9 +650,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
// Spigot start
// Iterator iterator = this.tileEntityListTick.iterator();
int tilesThisCycle = 0;
- for (tileLimiter.initTick();
- tilesThisCycle < tileEntityListTick.size() && (tilesThisCycle % 10 != 0 || tileLimiter.shouldContinue());
- tileTickPosition++, tilesThisCycle++) {
+ for (tileTickPosition = 0; tileTickPosition < tileEntityListTick.size(); tileTickPosition++) { // Paper - Disable tick limiters
tileTickPosition = (tileTickPosition < tileEntityListTick.size()) ? tileTickPosition : 0;
TileEntity tileentity = (TileEntity) this.tileEntityListTick.get(tileTickPosition);
// Spigot start
--
2.21.0

View File

@ -1,4 +1,4 @@
From 12c382750154c7f56762076b755c2c1b122fc188 Mon Sep 17 00:00:00 2001 From 5edd0028e03561e889fdde9dcea3cdd732dc6ba3 Mon Sep 17 00:00:00 2001
From: Steve Anton <anxuiz.nx@gmail.com> From: Steve Anton <anxuiz.nx@gmail.com>
Date: Thu, 3 Mar 2016 00:09:38 -0600 Date: Thu, 3 Mar 2016 00:09:38 -0600
Subject: [PATCH] Add PlayerInitialSpawnEvent Subject: [PATCH] Add PlayerInitialSpawnEvent
@ -6,13 +6,14 @@ Subject: [PATCH] Add PlayerInitialSpawnEvent
For modifying a player's initial spawn location as they join the server For modifying a player's initial spawn location as they join the server
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 3a83819d56..c2061e9596 100644 index 7939208a5a..f904e1c28d 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java --- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -109,6 +109,21 @@ public abstract class PlayerList { @@ -109,7 +109,22 @@ public abstract class PlayerList {
} }
// CraftBukkit end // CraftBukkit end
- entityplayer.spawnIn(worldserver);
+ // Paper start - support PlayerInitialSpawnEvent + // Paper start - support PlayerInitialSpawnEvent
+ Location originalLoc = new Location(entityplayer.world.getWorld(), entityplayer.locX, entityplayer.locY, entityplayer.locZ, entityplayer.yaw, entityplayer.pitch); + Location originalLoc = new Location(entityplayer.world.getWorld(), entityplayer.locX, entityplayer.locY, entityplayer.locZ, entityplayer.yaw, entityplayer.pitch);
+ com.destroystokyo.paper.event.player.PlayerInitialSpawnEvent event = new com.destroystokyo.paper.event.player.PlayerInitialSpawnEvent(entityplayer.getBukkitEntity(), originalLoc); + com.destroystokyo.paper.event.player.PlayerInitialSpawnEvent event = new com.destroystokyo.paper.event.player.PlayerInitialSpawnEvent(entityplayer.getBukkitEntity(), originalLoc);
@ -28,9 +29,10 @@ index 3a83819d56..c2061e9596 100644
+ entityplayer.dimension = ((CraftWorld) newLoc.getWorld()).getHandle().dimension; + entityplayer.dimension = ((CraftWorld) newLoc.getWorld()).getHandle().dimension;
+ // Paper end + // Paper end
+ +
entityplayer.spawnIn(this.server.getWorldServer(entityplayer.dimension)); + entityplayer.spawnIn(((CraftWorld) newLoc.getWorld()).getHandle());
entityplayer.playerInteractManager.a((WorldServer) entityplayer.world); entityplayer.playerInteractManager.a((WorldServer) entityplayer.world);
String s1 = "local"; String s1 = "local";
-- --
2.21.0 2.21.0

View File

@ -1,4 +1,4 @@
From 89cdf80156325f331b71f544198fa7be8cb71d8d Mon Sep 17 00:00:00 2001 From c453ea6fa9dccc9e8c61d9f07842f5364377539e Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 01:13:45 -0600 Date: Thu, 3 Mar 2016 01:13:45 -0600
Subject: [PATCH] Configurable Disabling Cat Chest Detection Subject: [PATCH] Configurable Disabling Cat Chest Detection
@ -6,10 +6,10 @@ Subject: [PATCH] Configurable Disabling Cat Chest Detection
Offers a gameplay feature to stop cats from blocking chests Offers a gameplay feature to stop cats from blocking chests
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 4266a87fe3..4641eaf2f8 100644 index d663b15ceb..2782970393 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -184,4 +184,9 @@ public class PaperWorldConfig { @@ -176,4 +176,9 @@ public class PaperWorldConfig {
private void containerUpdateTickRate() { private void containerUpdateTickRate() {
containerUpdateTickRate = getInt("container-update-tick-rate", 1); containerUpdateTickRate = getInt("container-update-tick-rate", 1);
} }
@ -20,19 +20,19 @@ index 4266a87fe3..4641eaf2f8 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java
index 5e1a3df2b3..e94786138e 100644 index 6b1c64e8f3..ee9d91a8c1 100644
--- a/src/main/java/net/minecraft/server/BlockChest.java --- a/src/main/java/net/minecraft/server/BlockChest.java
+++ b/src/main/java/net/minecraft/server/BlockChest.java +++ b/src/main/java/net/minecraft/server/BlockChest.java
@@ -232,6 +232,11 @@ public class BlockChest extends BlockTileEntity implements IFluidSource, IFluidC @@ -280,6 +280,11 @@ public class BlockChest extends BlockTileEntity implements IBlockWaterlogged {
} }
private boolean b(World world, BlockPosition blockposition) { private static boolean b(GeneratorAccess generatoraccess, BlockPosition blockposition) {
+ // Paper start - Option to disable chest cat detection + // Paper start - Option to disable chest cat detection
+ if (world.paperConfig.disableChestCatDetection) { + if (((World) generatoraccess).paperConfig.disableChestCatDetection) {
+ return false; + return false;
+ } + }
+ // Paper end + // Paper end
List<EntityOcelot> list = world.a(EntityOcelot.class, new AxisAlignedBB((double) blockposition.getX(), (double) (blockposition.getY() + 1), (double) blockposition.getZ(), (double) (blockposition.getX() + 1), (double) (blockposition.getY() + 2), (double) (blockposition.getZ() + 1))); List<EntityCat> list = generatoraccess.a(EntityCat.class, new AxisAlignedBB((double) blockposition.getX(), (double) (blockposition.getY() + 1), (double) blockposition.getZ(), (double) (blockposition.getX() + 1), (double) (blockposition.getY() + 2), (double) (blockposition.getZ() + 1)));
if (!list.isEmpty()) { if (!list.isEmpty()) {
-- --

View File

@ -1,39 +0,0 @@
From f9b732ac79ee53385cc92bf38ea541f45a7c304c Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Wed, 2 Mar 2016 23:45:17 -0600
Subject: [PATCH] Disable spigot tick limiters
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 20990cbfdd..a80acbb6a5 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1124,10 +1124,10 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
// CraftBukkit start - Use field for loop variable
co.aikar.timings.TimingHistory.entityTicks += this.entityList.size(); // Paper
int entitiesThisCycle = 0;
- if (tickPosition < 0) tickPosition = 0;
- for (entityLimiter.initTick();
- entitiesThisCycle < entityList.size() && (entitiesThisCycle % 10 != 0 || entityLimiter.shouldContinue());
- tickPosition++, entitiesThisCycle++) {
+ // Paper start - Disable tick limiters
+ //if (tickPosition < 0) tickPosition = 0;
+ for (tickPosition = 0; tickPosition < entityList.size(); tickPosition++) {
+ // Paper end
tickPosition = (tickPosition < entityList.size()) ? tickPosition : 0;
entity = (Entity) this.entityList.get(this.tickPosition);
// CraftBukkit end
@@ -1191,9 +1191,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
// Spigot start
// Iterator iterator = this.tileEntityListTick.iterator();
int tilesThisCycle = 0;
- for (tileLimiter.initTick();
- tilesThisCycle < tileEntityListTick.size() && (tilesThisCycle % 10 != 0 || tileLimiter.shouldContinue());
- tileTickPosition++, tilesThisCycle++) {
+ for (tileTickPosition = 0; tileTickPosition < tileEntityListTick.size(); tileTickPosition++) { // Paper - Disable tick limiters
tileTickPosition = (tileTickPosition < tileEntityListTick.size()) ? tileTickPosition : 0;
TileEntity tileentity = (TileEntity) this.tileEntityListTick.get(tileTickPosition);
// Spigot start
--
2.21.0

View File

@ -1,4 +1,4 @@
From afe18ef667aa63c426197f85c3785aa7e2e36e46 Mon Sep 17 00:00:00 2001 From b65da8135d73b3be5877239a3751c4dcd150f97f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 01:17:12 -0600 Date: Thu, 3 Mar 2016 01:17:12 -0600
Subject: [PATCH] Ensure commands are not ran async Subject: [PATCH] Ensure commands are not ran async
@ -14,10 +14,10 @@ big slowdown in execution but throwing an exception at same time to raise awaren
that it is happening so that plugin authors can fix their code to stop executing commands async. that it is happening so that plugin authors can fix their code to stop executing commands async.
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index b9e6a3275c..9a83e5fc0b 100644 index 287bba3f6c..9d7bbafe02 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1533,6 +1533,29 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -1579,6 +1579,29 @@ public class PlayerConnection implements PacketListenerPlayIn {
} }
if (!async && s.startsWith("/")) { if (!async && s.startsWith("/")) {
@ -45,13 +45,13 @@ index b9e6a3275c..9a83e5fc0b 100644
+ } + }
+ // Paper End + // Paper End
this.handleCommand(s); this.handleCommand(s);
} else if (this.player.getChatFlags() == EntityHuman.EnumChatVisibility.SYSTEM) { } else if (this.player.getChatFlags() == EnumChatVisibility.SYSTEM) {
// Do nothing, this is coming from a plugin // Do nothing, this is coming from a plugin
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 7b4af7a904..c6e6ae4fe7 100644 index de592ae851..9c54d151df 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -701,6 +701,29 @@ public final class CraftServer implements Server { @@ -704,6 +704,29 @@ public final class CraftServer implements Server {
Validate.notNull(commandLine, "CommandLine cannot be null"); Validate.notNull(commandLine, "CommandLine cannot be null");
org.spigotmc.AsyncCatcher.catchOp( "command dispatch" ); // Spigot org.spigotmc.AsyncCatcher.catchOp( "command dispatch" ); // Spigot
@ -82,19 +82,19 @@ index 7b4af7a904..c6e6ae4fe7 100644
return true; return true;
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java diff --git a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
index a0cdd2317c..984df4083d 100644 index ddef523ea8..70f8d42992 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java --- a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java +++ b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
@@ -14,6 +14,7 @@ public class ServerShutdownThread extends Thread { @@ -13,6 +13,7 @@ public class ServerShutdownThread extends Thread {
public void run() { public void run() {
try { try {
org.spigotmc.AsyncCatcher.enabled = false; // Spigot org.spigotmc.AsyncCatcher.enabled = false; // Spigot
+ org.spigotmc.AsyncCatcher.shuttingDown = true; // Paper + org.spigotmc.AsyncCatcher.shuttingDown = true; // Paper
server.stop(); server.close();
} catch (ExceptionWorldConflict ex) { } finally {
ex.printStackTrace(); try {
diff --git a/src/main/java/org/spigotmc/AsyncCatcher.java b/src/main/java/org/spigotmc/AsyncCatcher.java diff --git a/src/main/java/org/spigotmc/AsyncCatcher.java b/src/main/java/org/spigotmc/AsyncCatcher.java
index 4b3aa85c97..e44c230165 100644 index aeed769725..9f7d2ef932 100644
--- a/src/main/java/org/spigotmc/AsyncCatcher.java --- a/src/main/java/org/spigotmc/AsyncCatcher.java
+++ b/src/main/java/org/spigotmc/AsyncCatcher.java +++ b/src/main/java/org/spigotmc/AsyncCatcher.java
@@ -6,6 +6,7 @@ public class AsyncCatcher @@ -6,6 +6,7 @@ public class AsyncCatcher
@ -106,7 +106,7 @@ index 4b3aa85c97..e44c230165 100644
public static void catchOp(String reason) public static void catchOp(String reason)
{ {
diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java
index f4e088c134..944151d140 100644 index e7b953ca31..ccea803f58 100644
--- a/src/main/java/org/spigotmc/RestartCommand.java --- a/src/main/java/org/spigotmc/RestartCommand.java
+++ b/src/main/java/org/spigotmc/RestartCommand.java +++ b/src/main/java/org/spigotmc/RestartCommand.java
@@ -43,6 +43,7 @@ public class RestartCommand extends Command @@ -43,6 +43,7 @@ public class RestartCommand extends Command

View File

@ -1,14 +1,14 @@
From 6aa2b20662a0a6df004590d4434b3b20490ff225 Mon Sep 17 00:00:00 2001 From 3eec776d3820e492a821d9cb3d2ad417cf1935cf Mon Sep 17 00:00:00 2001
From: vemacs <d@nkmem.es> From: vemacs <d@nkmem.es>
Date: Thu, 3 Mar 2016 01:19:22 -0600 Date: Thu, 3 Mar 2016 01:19:22 -0600
Subject: [PATCH] All chunks are slime spawn chunks toggle Subject: [PATCH] All chunks are slime spawn chunks toggle
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 4641eaf2f8..05d2d50e54 100644 index 2782970393..be91b11242 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -189,4 +189,9 @@ public class PaperWorldConfig { @@ -181,4 +181,9 @@ public class PaperWorldConfig {
private void disableChestCatDetection() { private void disableChestCatDetection() {
disableChestCatDetection = getBoolean("game-mechanics.disable-chest-cat-detection", false); disableChestCatDetection = getBoolean("game-mechanics.disable-chest-cat-detection", false);
} }
@ -19,18 +19,18 @@ index 4641eaf2f8..05d2d50e54 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java
index aa23cdff12..f92bf02b87 100644 index 3140a49e1c..8115b1e4ec 100644
--- a/src/main/java/net/minecraft/server/EntitySlime.java --- a/src/main/java/net/minecraft/server/EntitySlime.java
+++ b/src/main/java/net/minecraft/server/EntitySlime.java +++ b/src/main/java/net/minecraft/server/EntitySlime.java
@@ -267,7 +267,7 @@ public class EntitySlime extends EntityInsentient implements IMonster { @@ -276,7 +276,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
} }
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(blockposition); ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(blockposition);
- boolean flag1 = SeededRandom.a(chunkcoordintpair.x, chunkcoordintpair.z, generatoraccess.getSeed(), world.spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot - boolean flag = SeededRandom.a(chunkcoordintpair.x, chunkcoordintpair.z, generatoraccess.getSeed(), world.spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot
+ boolean flag1 = world.paperConfig.allChunksAreSlimeChunks || SeededRandom.a(chunkcoordintpair.x, chunkcoordintpair.z, generatoraccess.getSeed(), world.spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot // Paper - add allChunksAreSlime + boolean flag = world.paperConfig.allChunksAreSlimeChunks || SeededRandom.a(chunkcoordintpair.x, chunkcoordintpair.z, generatoraccess.getSeed(), world.spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot // Paper
if (this.random.nextInt(10) == 0 && flag1 && this.locY < 40.0D) { if (this.random.nextInt(10) == 0 && flag && this.locY < 40.0D) {
return super.a(generatoraccess, flag); return super.a(generatoraccess, enummobspawn);
-- --
2.21.0 2.21.0

View File

@ -1,4 +1,4 @@
From b72883726c3c140cd0459d8241c7e6c03873bab0 Mon Sep 17 00:00:00 2001 From d20d85eabbc58677092cd028741797484a981d24 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 02:02:07 -0600 Date: Thu, 3 Mar 2016 02:02:07 -0600
Subject: [PATCH] Optimize Pathfinding Subject: [PATCH] Optimize Pathfinding
@ -7,10 +7,10 @@ Prevents pathfinding from spamming failures for things such as
arrow attacks. arrow attacks.
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
index 2d788ef663..60b5068e32 100644 index ca30e08ff4..2ced8dedd1 100644
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java --- a/src/main/java/net/minecraft/server/NavigationAbstract.java
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java +++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
@@ -122,10 +122,26 @@ public abstract class NavigationAbstract { @@ -116,10 +116,26 @@ public abstract class NavigationAbstract {
} }
public boolean a(Entity entity, double d0) { public boolean a(Entity entity, double d0) {
@ -38,10 +38,10 @@ index 2d788ef663..60b5068e32 100644
public boolean a(@Nullable PathEntity pathentity, double d0) { public boolean a(@Nullable PathEntity pathentity, double d0) {
if (pathentity == null) { if (pathentity == null) {
@@ -258,6 +274,7 @@ public abstract class NavigationAbstract { @@ -252,6 +268,7 @@ public abstract class NavigationAbstract {
} }
public void q() { public void o() {
+ this.pathfindFailures = 0; this.lastFailure = 0; // Paper - Pathfinding optimizations + this.pathfindFailures = 0; this.lastFailure = 0; // Paper - Pathfinding optimizations
this.c = null; this.c = null;
} }

View File

@ -54,7 +54,7 @@ fi
echo "Applying member mappings..." echo "Applying member mappings..."
if [ ! -f "$jarpath-m.jar" ]; then if [ ! -f "$jarpath-m.jar" ]; then
java -jar "$workdir/BuildData/bin/SpecialSource-2.jar" map --only . --only net/minecraft --auto-member TOKENS -i "$jarpath-cl.jar" -m "$membermappings" -o "$jarpath-m.jar" 1>/dev/null java -jar "$workdir/BuildData/bin/SpecialSource-2.jar" map --only . --only net/minecraft --auto-member LOGGER --auto-member TOKENS -i "$jarpath-cl.jar" -m "$membermappings" -o "$jarpath-m.jar" 1>/dev/null
if [ "$?" != "0" ]; then if [ "$?" != "0" ]; then
echo "Failed to apply member mappings." echo "Failed to apply member mappings."
exit 1 exit 1

@ -1 +1 @@
Subproject commit 601818a24e1d39ea5c09cbf82932fad6031c44b7 Subproject commit df665071847a0ace1b4b7149f504e5bb8eca992c

@ -1 +1 @@
Subproject commit 3735f9d0ad8295565d59db84f49446589f580da0 Subproject commit 73c235679573768d11aca47ce7e9bc4051004f19

@ -1 +1 @@
Subproject commit 364b6fbb73176d276a110f4ce4217979ad7ee6a4 Subproject commit 724ec10f3358924e348e96fe51dffe41c91780e5

@ -1 +1 @@
Subproject commit 6dbf995f13ca29e311d686e963973905388a29b3 Subproject commit 066994b8aef9c7e7c0bf800e346eb30efa76835a