Latest progress - restored patches, some issues resolved

This commit is contained in:
Aikar 2020-06-26 02:29:44 -04:00
parent 014b7f115d
commit 68636aee72
No known key found for this signature in database
GPG Key ID: 401ADFC9891FAAFE
296 changed files with 881 additions and 743 deletions

View File

@ -268,10 +268,10 @@ index 0000000000000000000000000000000000000000..41c79650b169b87fbc70cf502438a545
+}
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
new file mode 100644
index 0000000000000000000000000000000000000000..273cdb598b3606b962dcc92564c84ad351b7a74f
index 0000000000000000000000000000000000000000..68d3cb02dbfdc9d6f9d3682a2659c9430b50c490
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -0,0 +1,184 @@
@@ -0,0 +1,185 @@
+package com.destroystokyo.paper;
+
+import com.google.common.base.Throwables;
@ -291,6 +291,7 @@ index 0000000000000000000000000000000000000000..273cdb598b3606b962dcc92564c84ad3
+import net.minecraft.server.MinecraftServer;
+import org.bukkit.Bukkit;
+import org.bukkit.command.Command;
+import org.bukkit.configuration.ConfigurationSection;
+import org.bukkit.configuration.InvalidConfigurationException;
+import org.bukkit.configuration.file.YamlConfiguration;
+

View File

@ -279,6 +279,27 @@ index 8886cedfe8809fe4711b5f2451e3e6456d2a6513..b77a0f0c2ee30df44b113aa6c8d4fa92
return true;
}
}
diff --git a/src/main/java/net/minecraft/server/IBlockState.java b/src/main/java/net/minecraft/server/IBlockState.java
index 88f1f201240ef0479c4f0f93f4caca454bbe7e9e..d63a4e4916ed5f5d901be0f4dd2c13cf66239055 100644
--- a/src/main/java/net/minecraft/server/IBlockState.java
+++ b/src/main/java/net/minecraft/server/IBlockState.java
@@ -16,12 +16,10 @@ public abstract class IBlockState<T extends Comparable<T>> {
private final Codec<IBlockState.a<T>> e;
protected IBlockState(String s, Class<T> oclass) {
- this.d = Codec.STRING.comapFlatMap((s1) -> {
- return (DataResult) this.b(s1).map(DataResult::success).orElseGet(() -> {
- return DataResult.error("Unable to read property: " + this + " with value: " + s1);
- });
- }, this::a);
- this.e = this.d.xmap(this::b, IBlockState.a::b);
+ this.d = Codec.STRING.comapFlatMap((s1) -> this.b(s1).map(DataResult::success).orElseGet(() -> { // Paper - decompile error
+ return DataResult.error("Unable to read property: " + this + " with value: " + s1);
+ }), this::a);
+ this.e = this.d.xmap(this::b, (IBlockState.a<T> param) -> param.b()); // Paper - decompile fix
this.a = oclass;
this.b = s;
}
diff --git a/src/main/java/net/minecraft/server/IEntityAccess.java b/src/main/java/net/minecraft/server/IEntityAccess.java
index 2517b70ddeb985ae7d708c6a1708b42c6a67dd00..c469b5db81fb040fc27cd2e4f7cd61797f56a62d 100644
--- a/src/main/java/net/minecraft/server/IEntityAccess.java
@ -423,6 +444,22 @@ index 998101592723abb26c91d1f92e98be1cf24c954d..ee9069c744df63cbb7f21dd9d28d6d55
}
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index a5f26a51ba612bc62d406cbefa858af75bd062da..7ea0118d108dd71fa1b0336e471ac4cc36722ff8 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1550,9 +1550,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
ResourcePackRepository resourcepackrepository = this.resourcePackRepository;
this.resourcePackRepository.getClass();
- return stream.map(resourcepackrepository::a).filter(Objects::nonNull).map(ResourcePackLoader::d).collect(ImmutableList.toImmutableList()); // CraftBukkit - decompile error
+ return stream.<ResourcePackLoader>map(resourcepackrepository::a).filter(Objects::nonNull).map(ResourcePackLoader::d).collect(ImmutableList.toImmutableList()); // CraftBukkit - decompile error // Paper - decompile error
}, this).thenCompose((immutablelist) -> {
- return DataPackResources.a(immutablelist, this.j() ? CommandDispatcher.ServerType.DEDICATED : CommandDispatcher.ServerType.INTEGRATED, this.h(), this.executorService, this);
+ return DataPackResources.a((List<IResourcePack>) immutablelist, this.j() ? CommandDispatcher.ServerType.DEDICATED : CommandDispatcher.ServerType.INTEGRATED, this.h(), this.executorService, this); // Paper - decompile error
}).thenAcceptAsync((datapackresources) -> {
this.dataPackResources.close();
this.dataPackResources = datapackresources;
diff --git a/src/main/java/net/minecraft/server/NBTBase.java b/src/main/java/net/minecraft/server/NBTBase.java
index 829a7ae0a2b77205fb8e8c5754d0d4333afa224d..8b9e47b4c7f5dc464fa617a59583df9e30a54045 100644
--- a/src/main/java/net/minecraft/server/NBTBase.java

View File

@ -2318,6 +2318,18 @@ index eff6ebcd30b538cbaedaa031a46a59ea956253ba..30cbfc8eac20910aa55951e3dce63862
@Override
public IBlockData getType(BlockPosition blockposition) {
return Blocks.AIR.getBlockData();
diff --git a/src/main/java/net/minecraft/server/BlockBase.java b/src/main/java/net/minecraft/server/BlockBase.java
index 47324feca49786b49563d3d0e854e74ad27c190b..26d446077bb563ca3c5bb0339695b3364a3e41bf 100644
--- a/src/main/java/net/minecraft/server/BlockBase.java
+++ b/src/main/java/net/minecraft/server/BlockBase.java
@@ -632,6 +632,7 @@ public abstract class BlockBase {
return this.a != null ? this.a.e : Block.a(this.getCollisionShape(iblockaccess, blockposition));
}
+ public IBlockData getBlockData() { return p(); } // Paper - OBFHELPER
protected abstract IBlockData p();
public boolean isAlwaysDestroyable() {
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
index 8eb94bcb605f882c9ce096fc758df5e3ae3ab28d..b61651fcd6605cd8638ce14f15e41b878add3f1c 100644
--- a/src/main/java/net/minecraft/server/BlockPosition.java

View File

@ -647,10 +647,10 @@ index 0000000000000000000000000000000000000000..e257d6b36e0e78dac5b8320017d92776
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 273cdb598b3606b962dcc92564c84ad351b7a74f..b6d470e594ce196f560ac6c94ced904b0081b205 100644
index 68d3cb02dbfdc9d6f9d3682a2659c9430b50c490..b367bb8ea184489f433f8acc798466c38816ae62 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -41,6 +41,7 @@ public class PaperConfig {
@@ -42,6 +42,7 @@ public class PaperConfig {
private static boolean verbose;
private static boolean fatalError;
/*========================================================================*/
@ -658,7 +658,7 @@ index 273cdb598b3606b962dcc92564c84ad351b7a74f..b6d470e594ce196f560ac6c94ced904b
public static void init(File configFile) {
CONFIG_FILE = configFile;
@@ -83,6 +84,11 @@ public class PaperConfig {
@@ -84,6 +85,11 @@ public class PaperConfig {
for (Map.Entry<String, Command> entry : commands.entrySet()) {
MinecraftServer.getServer().server.getCommandMap().register(entry.getKey(), "Paper", entry.getValue());
}

View File

@ -117,7 +117,7 @@ index 3e679f66cd922cf0b47a84cdd1a83f311ddf6d0b..f51325612fa14c1428679d6955a6d923
private String entityKeyString;
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 3cae7ef750371cee741c2f27799c1bb5864a278a..f4d88de468e7843585eb5c722c9e94f5d2b47e6a 100644
index 3cae7ef750371cee741c2f27799c1bb5864a278a..f8d859cda8186d706304b4e182bca34573f09433 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -51,6 +51,15 @@ public abstract class TileEntity implements KeyedObject { // Paper
@ -128,7 +128,7 @@ index 3cae7ef750371cee741c2f27799c1bb5864a278a..f4d88de468e7843585eb5c722c9e94f5
+ private java.lang.ref.WeakReference<Chunk> currentChunk = null;
+ public Chunk getCurrentChunk() {
+ final Chunk chunk = currentChunk != null ? currentChunk.get() : null;
+ return chunk != null && chunk.isLoaded() ? chunk : null;
+ return chunk != null && chunk.loaded ? chunk : null;
+ }
+ public void setCurrentChunk(Chunk chunk) {
+ this.currentChunk = chunk != null ? new java.lang.ref.WeakReference<>(chunk) : null;

View File

@ -544,7 +544,7 @@ index 0000000000000000000000000000000000000000..d4ebcf8f66197299256bd6b65710a148
+}
diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
new file mode 100644
index 0000000000000000000000000000000000000000..fa1c920ea6092259149f9e7f9cd7cc1ed27bf338
index 0000000000000000000000000000000000000000..03bb2102d6952df04753ba9986aad9b494568e2d
--- /dev/null
+++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
@@ -0,0 +1,118 @@
@ -608,7 +608,7 @@ index 0000000000000000000000000000000000000000..fa1c920ea6092259149f9e7f9cd7cc1e
+ public final Timing miscMobSpawning;
+
+ public WorldTimingsHandler(World server) {
+ String name = server.worldData.getName() +" - ";
+ String name = server.getWorld().getName() +" - ";
+
+ mobSpawn = Timings.ofSafe(name + "mobSpawn");
+ doChunkUnload = Timings.ofSafe(name + "doChunkUnload");
@ -663,14 +663,14 @@ index 0000000000000000000000000000000000000000..fa1c920ea6092259149f9e7f9cd7cc1e
+ }
+
+ public static Timing getTickList(WorldServer worldserver, String timingsType) {
+ return Timings.ofSafe(worldserver.getWorldData().getName() + " - Scheduled " + timingsType);
+ return Timings.ofSafe(worldserver.getWorld().getName() + " - Scheduled " + timingsType);
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index b6d470e594ce196f560ac6c94ced904b0081b205..f402a29b0904a0094ffe6e42dbdc6fbc0912d9d9 100644
index b367bb8ea184489f433f8acc798466c38816ae62..a62f4bbb973b9cb6d1ee53f56a0897d70ae176af 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -14,11 +14,14 @@ import java.util.concurrent.TimeUnit;
@@ -14,12 +14,15 @@ import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.regex.Pattern;
@ -678,6 +678,7 @@ index b6d470e594ce196f560ac6c94ced904b0081b205..f402a29b0904a0094ffe6e42dbdc6fbc
import net.minecraft.server.MinecraftServer;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.InvalidConfigurationException;
import org.bukkit.configuration.file.YamlConfiguration;
+import co.aikar.timings.Timings;
@ -685,7 +686,7 @@ index b6d470e594ce196f560ac6c94ced904b0081b205..f402a29b0904a0094ffe6e42dbdc6fbc
public class PaperConfig {
@@ -187,4 +190,27 @@ public class PaperConfig {
@@ -188,4 +191,27 @@ public class PaperConfig {
config.addDefault(path, def);
return config.getString(path, config.getString(path));
}
@ -1116,7 +1117,7 @@ index dccb315440f7429fe881bd0d12af8f1ae8e35c3d..96a95413f74592ef0a8e9367fd3ed81f
if (!this.world.isClientSide && this.dN() && this.aC()) {
this.damageEntity(DamageSource.DROWN, 1.0F);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 67120e3e4a2cd77394fd7e77543223afa2d6a22e..a5284ca66043150c7132f6bee29a952fb6601007 100644
index 10ba89eeb31adedadd34746b86843accd1869597..04d1af26aaa7005c9dcf84abfb796b848108bbf0 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -65,7 +65,7 @@ import org.bukkit.craftbukkit.CraftServer;
@ -1560,7 +1561,7 @@ index e8ff43662b8397229cb19ea26342b66c88807379..3b8f56c0f0507ebdd9ac20be70688b4c
this.g.clear();
this.f.clear();
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index f4d88de468e7843585eb5c722c9e94f5d2b47e6a..03c6a1c95daaa25208917d6985594eb5f182e8e1 100644
index f8d859cda8186d706304b4e182bca34573f09433..057d703fe73de9bb9ca6f0e263463d32abae4c13 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -9,11 +9,12 @@ import org.bukkit.craftbukkit.persistence.CraftPersistentDataContainer;
@ -1626,7 +1627,7 @@ index 42294c7c7de146be08d38eddafd8d099073b627a..8a7ce347c35e0527471b3b586a248d64
CrashReport crashreport = CrashReport.a(throwable, "Ticking entity");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being ticked");
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index f45b5ddc66024e993ac94436ee25a03e085742b4..2b39fb903c1cf6ded8aa170f5bd25f4fadb1195a 100644
index f45b5ddc66024e993ac94436ee25a03e085742b4..dd02f7b8c0c0055a506bceab68cec98faf4a7641 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -3,6 +3,8 @@ package net.minecraft.server;
@ -1687,7 +1688,7 @@ index f45b5ddc66024e993ac94436ee25a03e085742b4..2b39fb903c1cf6ded8aa170f5bd25f4f
org.spigotmc.ActivationRange.activateEntities(this); // Spigot
timings.entityTick.startTiming(); // Spigot
+ TimingHistory.entityTicks += this.globalEntityList.size(); // Paper
+ TimingHistory.entityTicks += this.entitiesById.size(); // Paper
while (objectiterator.hasNext()) {
Entry<Entity> entry = (Entry) objectiterator.next();
Entity entity = (Entity) entry.getValue();

View File

@ -5,14 +5,14 @@ Subject: [PATCH] Entity Origin API
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 80f1c4930d6dd602210b07a50b10c45e9f80ae8a..002678bc2bff9aa733650cea3b9bcb96e6fb3f9c 100644
index 80f1c4930d6dd602210b07a50b10c45e9f80ae8a..12730f52fdb0774dcf8be81547c8f03ef9f184a4 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -167,6 +167,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
public org.bukkit.projectiles.ProjectileSource projectileSource; // For projectiles only
public boolean forceExplosionKnockback; // SPIGOT-949
public Timing tickTimer = MinecraftTimings.getEntityTimings(this); // Paper
+ public Location origin; // Paper
+ public org.bukkit.Location origin; // Paper
// Spigot start
public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
public final boolean defaultActivationState;
@ -35,7 +35,7 @@ index 80f1c4930d6dd602210b07a50b10c45e9f80ae8a..002678bc2bff9aa733650cea3b9bcb96
+ // Paper start - Restore the entity's origin location
+ NBTTagList originTag = nbttagcompound.getList("Paper.Origin", 6);
+ if (!originTag.isEmpty()) {
+ origin = new Location(world.getWorld(), originTag.getDoubleAt(0), originTag.getDoubleAt(1), originTag.getDoubleAt(2));
+ origin = new org.bukkit.Location(world.getWorld(), originTag.getDoubleAt(0), originTag.getDoubleAt(1), originTag.getDoubleAt(2));
+ }
+ // Paper end
+

View File

@ -29,7 +29,7 @@ index d59b82b7bb1f6d1b231f4e394e0a67a3d154d7be..f7a0a33e49cadf9b2bd43f118c106937
+ }
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 002678bc2bff9aa733650cea3b9bcb96e6fb3f9c..2adde8312a8e5bed9bfc2bd60961f56c799ee6c6 100644
index 12730f52fdb0774dcf8be81547c8f03ef9f184a4..be0ade74030c5f8584b5caa22d6d3084a0853afa 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -420,9 +420,16 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke

View File

@ -21,7 +21,7 @@ index 62e793b71b313146b86b466421e7a5f894bef9df..cd47a4ca069df26969de3051c2aac805
+ }
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 2adde8312a8e5bed9bfc2bd60961f56c799ee6c6..833234254a93b0aee421f7cdb91f85f269040b91 100644
index be0ade74030c5f8584b5caa22d6d3084a0853afa..3bda9ab2a19740e3b06f24e2bcc82cc9ea57858e 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2502,7 +2502,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke

View File

@ -25,7 +25,7 @@ index abbf59bb91021821876a8960e8f77fac24457ec4..04430aae52205ee167662004e45c145b
+ }
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 833234254a93b0aee421f7cdb91f85f269040b91..c2ea0e74b72976131976f875934042cf65ba8263 100644
index 3bda9ab2a19740e3b06f24e2bcc82cc9ea57858e..b75c6aa78dd9c7478912b0b68de7a27289a480ba 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2195,6 +2195,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke

View File

@ -16,10 +16,10 @@ modify that. Under the previous logic, plugins were unable (cleanly) override pe
A config option has been added for those who depend on the previous behavior, but I don't expect that.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index f402a29b0904a0094ffe6e42dbdc6fbc0912d9d9..6ef5bb9f323da7cbf8cb24d094bf43c4735549b0 100644
index a62f4bbb973b9cb6d1ee53f56a0897d70ae176af..f207abbe757ad403a29a7a012903aaa88d5b1685 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -213,4 +213,9 @@ public class PaperConfig {
@@ -214,4 +214,9 @@ public class PaperConfig {
" - Length: " + timeSummary(Timings.getHistoryLength() / 20) +
" - Server Name: " + timingsServerName);
}

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Add World Util Methods
Methods that can be used for other patches to help improve logic.
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index f80b0b95ce650b01ecb10d3a2f7c66421ca29178..2a18a905aef50d23d9e5544f4240b2f719abd8f1 100644
index f80b0b95ce650b01ecb10d3a2f7c66421ca29178..6e05a7deaae13f29c24fb6e364c62948a20d83a8 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -283,6 +283,18 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -283,6 +283,22 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
return chunk == null ? null : chunk.getFluid(blockposition);
}
@ -17,8 +17,12 @@ index f80b0b95ce650b01ecb10d3a2f7c66421ca29178..2a18a905aef50d23d9e5544f4240b2f7
+ public boolean isLoadedAndInBounds(BlockPosition blockposition) {
+ return getWorldBorder().isInBounds(blockposition) && getChunkIfLoadedImmediately(blockposition.getX() >> 4, blockposition.getZ() >> 4) != null;
+ }
+ public Chunk getChunkIfLoaded(BlockPosition blockposition) {
+ return getChunkIfLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4);
+
+ public Chunk getChunkIfLoaded(int x, int z) {
+ return ((WorldServer) this).getChunkProvider().getChunkAtIfLoadedImmediately(x, z);
+ }
+ public final Chunk getChunkIfLoaded(BlockPosition blockposition) {
+ return ((WorldServer) this).getChunkProvider().getChunkAtIfLoadedImmediately(blockposition.getX() >> 4, blockposition.getZ() >> 4);
+ }
+
+ // reduces need to do isLoaded before getType
@ -40,3 +44,16 @@ index d039e715624d33fc3ec9e87d5ad992415e7dc6b9..d5c0d394feaf8bb991245dbdcc6252cf
public boolean a(BlockPosition blockposition) {
return (double) (blockposition.getX() + 1) > this.e() && (double) blockposition.getX() < this.g() && (double) (blockposition.getZ() + 1) > this.f() && (double) blockposition.getZ() < this.h();
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 9eec2ec61777222c1290ad3112b003409001e51a..4548a38464fac65a88da26e95660542eeb482ccb 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -83,7 +83,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
public final Convertable.ConversionSession convertable;
public final UUID uuid;
- public Chunk getChunkIfLoaded(int x, int z) {
+ @Override public Chunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI
return this.chunkProvider.getChunkAt(x, z, false);
}

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Use a Shared Random for Entities
Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created.
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index c2ea0e74b72976131976f875934042cf65ba8263..9e750c0ff42fa1189f20f10495e1ca1d74c6d51b 100644
index b75c6aa78dd9c7478912b0b68de7a27289a480ba..0b0dca503a91bbd7991996bf6c395991c993604d 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -58,6 +58,21 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke

View File

@ -192,7 +192,7 @@ index c5d7a013e65c2c81b14ceb2476c1c6dfe3239f0d..ee8df274d43be753887fb77e4203e2ee
@Override
public Fluid getFluid(BlockPosition blockposition) {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 2a18a905aef50d23d9e5544f4240b2f719abd8f1..9067fcbf6d35931d31830b91f42f027076426bad 100644
index 6479a62d81daacde6e1e72cb57bd99f9c59b5ae7..042f10ba2c6a3283203fdc5e79f78f3dbf6ccc22 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -179,7 +179,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {

View File

@ -32,7 +32,7 @@ index f87fc631255aa5948459f0726b188ebbbae13c5f..446a2ffcd95fd631750b74fd31b4c410
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 63c2953d6eb6f3c034be97e0cb2dd5e991c75fdd..777a553fe3abfdc5db3616352ac11de7969f737c 100644
index 704d59e53f4cf6f94202d6db36b3f7dba3a29c59..5f89477c664662447c1aafbf734a15aee0084f17 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1175,6 +1175,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -44,10 +44,10 @@ index 63c2953d6eb6f3c034be97e0cb2dd5e991c75fdd..777a553fe3abfdc5db3616352ac11de7
this.methodProfiler.a(() -> {
return worldserver + " " + worldserver.getDimensionKey().a();
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 9067fcbf6d35931d31830b91f42f027076426bad..66a4e068f43fad6d8f3858e6665ad70eacbe4617 100644
index 0611194eac072ce8dcd350dadffbc9da267d6cff..e236a3b3aa11bc5c3bab92959b90827447aa282c 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -435,7 +435,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -439,7 +439,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
// CraftBukkit start
iblockdata1.b(this, blockposition, j); // Don't call an event for the old block to limit event spam
CraftWorld world = ((WorldServer) this).getWorld();
@ -56,7 +56,7 @@ index 9067fcbf6d35931d31830b91f42f027076426bad..66a4e068f43fad6d8f3858e6665ad70e
BlockPhysicsEvent event = new BlockPhysicsEvent(world.getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()), CraftBlockData.fromData(iblockdata));
this.getServer().getPluginManager().callEvent(event);
@@ -537,7 +537,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -541,7 +541,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
try {
// CraftBukkit start
CraftWorld world = ((WorldServer) this).getWorld();
@ -66,15 +66,14 @@ index 9067fcbf6d35931d31830b91f42f027076426bad..66a4e068f43fad6d8f3858e6665ad70e
this.getServer().getPluginManager().callEvent(event);
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 9e8f22f41889c8592033925c180f46413cfaec14..cc96ce0cb2e75dd86b413da76e878d511cd4e039 100644
index 20200408da6cae15576926f79de22b955781201d..0746d0cf0c517a28e8faf637ecc19fb07f6eac2b 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -83,6 +83,8 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -82,6 +82,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
private int tickPosition;
public final Convertable.ConversionSession convertable;
public final UUID uuid;
+ boolean hasPhysicsEvent = true; // Paper
+
public Chunk getChunkIfLoaded(int x, int z) {
@Override public Chunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI
return this.chunkProvider.getChunkAt(x, z, false);
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Entity AddTo/RemoveFrom World Events
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index cc96ce0cb2e75dd86b413da76e878d511cd4e039..f6940921dec04eedc393578ec9827e6f8516611c 100644
index 0746d0cf0c517a28e8faf637ecc19fb07f6eac2b..a6747315cf3d9d5f22d95aade5b0d4df63bd18f8 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1057,7 +1057,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1056,7 +1056,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
if (entity instanceof EntityInsentient) {
this.navigators.remove(((EntityInsentient) entity).getNavigation());
}
@ -17,7 +17,7 @@ index cc96ce0cb2e75dd86b413da76e878d511cd4e039..f6940921dec04eedc393578ec9827e6f
entity.valid = false; // CraftBukkit
}
@@ -1095,6 +1095,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1094,6 +1094,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
entity.origin = entity.getBukkitEntity().getLocation();
}
// Paper end

View File

@ -11,10 +11,10 @@ The implementation uses a LinkedHashMap as an LRU cache (modified from HashMap).
The maximum size of the RegionFileCache is also made configurable.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 6ef5bb9f323da7cbf8cb24d094bf43c4735549b0..d500cd75a9229584a70bbdbda6de9bce67b836e8 100644
index f207abbe757ad403a29a7a012903aaa88d5b1685..7d726757d1083011a09c9f2ca37c33a81360e964 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -218,4 +218,9 @@ public class PaperConfig {
@@ -219,4 +219,9 @@ public class PaperConfig {
private static void loadPermsBeforePlugins() {
loadPermsBeforePlugins = getBoolean("settings.load-permissions-yml-before-plugins", true);
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 66a4e068f43fad6d8f3858e6665ad70eacbe4617..b9ddbcd0b409352a14c5b8dde14d7eac41e69dc3 100644
index b6242cee9f5ab7c4fc9e32d682eb271f4604db41..45daedbba9829193bdc5e7a8f33b6e29c6fbbe10 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -495,6 +495,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -499,6 +499,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
public void b(BlockPosition blockposition, IBlockData iblockdata, IBlockData iblockdata1) {}
public void applyPhysics(BlockPosition blockposition, Block block) {

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Remove unused World Tile Entity List
Massive hit to performance and it is completely unnecessary.
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index b9ddbcd0b409352a14c5b8dde14d7eac41e69dc3..be3e6b398f20467f843fea8296ad5ceea5efb18a 100644
index d3d7b605d92d433cb6b6655487a779dd10e03b30..1962f6d9c8c86a4ea275e33750ba3c93512a4855 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -39,7 +39,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@ -18,7 +18,7 @@ index b9ddbcd0b409352a14c5b8dde14d7eac41e69dc3..be3e6b398f20467f843fea8296ad5cee
public final List<TileEntity> tileEntityListTick = Lists.newArrayList();
protected final List<TileEntity> tileEntityListPending = Lists.newArrayList();
protected final java.util.Set<TileEntity> tileEntityListUnload = com.google.common.collect.Sets.newHashSet();
@@ -660,9 +660,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -664,9 +664,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
}, tileentity::getPosition});
}
@ -30,7 +30,7 @@ index b9ddbcd0b409352a14c5b8dde14d7eac41e69dc3..be3e6b398f20467f843fea8296ad5cee
this.tileEntityListTick.add(tileentity);
}
@@ -698,7 +698,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -702,7 +702,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
timings.tileEntityTick.startTiming(); // Spigot
if (!this.tileEntityListUnload.isEmpty()) {
this.tileEntityListTick.removeAll(this.tileEntityListUnload);
@ -39,7 +39,7 @@ index b9ddbcd0b409352a14c5b8dde14d7eac41e69dc3..be3e6b398f20467f843fea8296ad5cee
this.tileEntityListUnload.clear();
}
@@ -759,7 +759,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -763,7 +763,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
tilesThisCycle--;
this.tileEntityListTick.remove(tileTickPosition--);
// Spigot end
@ -48,7 +48,7 @@ index b9ddbcd0b409352a14c5b8dde14d7eac41e69dc3..be3e6b398f20467f843fea8296ad5cee
if (this.isLoaded(tileentity.getPosition())) {
this.getChunkAtWorldCoords(tileentity.getPosition()).removeTileEntity(tileentity.getPosition());
}
@@ -789,7 +789,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -793,7 +793,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
this.notify(tileentity1.getPosition(), iblockdata, iblockdata, 3);
// CraftBukkit start
// From above, don't screw this up - SPIGOT-1746
@ -57,7 +57,7 @@ index b9ddbcd0b409352a14c5b8dde14d7eac41e69dc3..be3e6b398f20467f843fea8296ad5cee
this.a(tileentity1);
}
// CraftBukkit end
@@ -931,7 +931,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -935,7 +935,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
} else {
if (tileentity != null) {
this.tileEntityListPending.remove(tileentity);
@ -67,10 +67,10 @@ index b9ddbcd0b409352a14c5b8dde14d7eac41e69dc3..be3e6b398f20467f843fea8296ad5cee
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index f6940921dec04eedc393578ec9827e6f8516611c..e2dfe047e64257b861fa0b168d2790605f09291c 100644
index a6747315cf3d9d5f22d95aade5b0d4df63bd18f8..db02025e02de1d99e34771380dbf7e71b298d290 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1543,7 +1543,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1542,7 +1542,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
}
bufferedwriter.write(String.format("entities: %d\n", this.entitiesById.size()));
@ -79,7 +79,7 @@ index f6940921dec04eedc393578ec9827e6f8516611c..e2dfe047e64257b861fa0b168d279060
bufferedwriter.write(String.format("block_ticks: %d\n", this.getBlockTickList().a()));
bufferedwriter.write(String.format("fluid_ticks: %d\n", this.getFluidTickList().a()));
bufferedwriter.write("distance_manager: " + playerchunkmap.e().c() + "\n");
@@ -1682,7 +1682,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1681,7 +1681,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
private void a(Writer writer) throws IOException {
CSVWriter csvwriter = CSVWriter.a().a("x").a("y").a("z").a("type").a(writer);

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Configurable Player Collision
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index d500cd75a9229584a70bbdbda6de9bce67b836e8..e4f0db64c061af684c28f50f0a37fbca693af7be 100644
index 7d726757d1083011a09c9f2ca37c33a81360e964..3d9a98936cfe933fd71fb82f07e1ba54d5d35800 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -223,4 +223,9 @@ public class PaperConfig {
@@ -224,4 +224,9 @@ public class PaperConfig {
private static void regionFileCacheSize() {
regionFileCacheSize = Math.max(getInt("settings.region-file-cache-size", 256), 4);
}
@ -19,7 +19,7 @@ index d500cd75a9229584a70bbdbda6de9bce67b836e8..e4f0db64c061af684c28f50f0a37fbca
+ }
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 777a553fe3abfdc5db3616352ac11de7969f737c..02e5a4214e46f31ba38d1ab814eeacce850dfaa1 100644
index 5f89477c664662447c1aafbf734a15aee0084f17..26a796513e66d1593d2d7e47062b26bfe07796e9 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -436,6 +436,20 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas

View File

@ -102,10 +102,10 @@ index e6d97e7ffae3eadac586bad078123cd4aaa69916..225353e072033d1e5aaf5604b8db255d
for ( org.bukkit.map.MapCursor cursor : render.cursors) {
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index e2dfe047e64257b861fa0b168d2790605f09291c..6fb4c273b4ce2bafe8ba42f1f9e8b0d7838e5804 100644
index db02025e02de1d99e34771380dbf7e71b298d290..792d2cb535954e02aec779b5076024f9fc0baf38 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1013,6 +1013,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1012,6 +1012,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
{
if ( iter.next().trackee == entity )
{

View File

@ -520,7 +520,7 @@ index 0000000000000000000000000000000000000000..d50410532c27bd2aa932c2a3f5765ca1
+ }
+}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 9e750c0ff42fa1189f20f10495e1ca1d74c6d51b..c6434d735e5838c5bd9e82f61bfb03fb42c412c7 100644
index 0b0dca503a91bbd7991996bf6c395991c993604d..c4abb65702c4a25df696af02d04f26d168ee7900 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -73,6 +73,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Don't save empty scoreboard teams to scoreboard.dat
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index e4f0db64c061af684c28f50f0a37fbca693af7be..67f35fe66b33a4b461a310b6ce4fdedb5eaf1ac4 100644
index 3d9a98936cfe933fd71fb82f07e1ba54d5d35800..6fbf9ab53c8b7fab93b55d815060033f945d56cd 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -228,4 +228,9 @@ public class PaperConfig {
@@ -229,4 +229,9 @@ public class PaperConfig {
private static void enablePlayerCollisions() {
enablePlayerCollisions = getBoolean("settings.enable-player-collisions", true);
}

View File

@ -32,7 +32,7 @@ index 6db1312035807c04b98408100fb0a5c04c07aff4..8cf3076f4e0d8d7e81158881c763f89e
+ }
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index c6434d735e5838c5bd9e82f61bfb03fb42c412c7..851d05096b9230c1eaaf2a910293697f358eec0a 100644
index c4abb65702c4a25df696af02d04f26d168ee7900..6d6ce3b5a012f49b2e0725d66ad4bcae4a7310f7 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2646,6 +2646,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke

View File

@ -77,7 +77,7 @@ index d88d435b7777f731bc0bb728ebe4d4cb31c6376e..a63a60348fe45f63deec6fcb27b6be09
public RedstoneUpdateInfo(BlockPosition blockposition, long i) {
this.a = blockposition;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index be3e6b398f20467f843fea8296ad5ceea5efb18a..3e6dc44ede30846b8c612b043c1bd625576980e8 100644
index 6818565b7af8fd9709a3d0a0ba6c091e7c434b7d..8f7222639bcc5b4b1b8af4aa69a100a37766cb4e 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -89,6 +89,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {

View File

@ -8,10 +8,10 @@ Vanilla will double add Spider Jockeys to the world, so ignore already added.
Also add debug if something else tries to, and abort before world gets bad state
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 6fb4c273b4ce2bafe8ba42f1f9e8b0d7838e5804..43b588709da17ae779e97d297955edd3425c2a68 100644
index 792d2cb535954e02aec779b5076024f9fc0baf38..0ae5eb7da3c8baf6ff54cc3b83bba41127457134 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -920,6 +920,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -919,6 +919,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
// CraftBukkit start
private boolean addEntity0(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) {
org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add setting for proxy online mode status
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 67f35fe66b33a4b461a310b6ce4fdedb5eaf1ac4..53f96a1576582fce83999a1f7e9a2624506ed51f 100644
index 6fbf9ab53c8b7fab93b55d815060033f945d56cd..5827ef1e3eb35a11867ee4f92f301e1b0245c0fa 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -22,6 +22,7 @@ import org.bukkit.configuration.InvalidConfigurationException;
@@ -23,6 +23,7 @@ import org.bukkit.configuration.InvalidConfigurationException;
import org.bukkit.configuration.file.YamlConfiguration;
import co.aikar.timings.Timings;
import co.aikar.timings.TimingsManager;
@ -16,7 +16,7 @@ index 67f35fe66b33a4b461a310b6ce4fdedb5eaf1ac4..53f96a1576582fce83999a1f7e9a2624
public class PaperConfig {
@@ -233,4 +234,13 @@ public class PaperConfig {
@@ -234,4 +235,13 @@ public class PaperConfig {
private static void saveEmptyScoreboardTeams() {
saveEmptyScoreboardTeams = getBoolean("settings.save-empty-scoreboard-teams", false);
}

View File

@ -51,19 +51,10 @@ index 5bd7a236b948666ca31e53cb3a8aa0dc147e274b..36b84446e96faefad3b783f73df74e0f
return true;
} else if (object instanceof BlockStateInteger && super.equals(object)) {
diff --git a/src/main/java/net/minecraft/server/IBlockState.java b/src/main/java/net/minecraft/server/IBlockState.java
index 88f1f201240ef0479c4f0f93f4caca454bbe7e9e..4eea3a4fca4cea96109e54473335fd3660e2f6d6 100644
index d63a4e4916ed5f5d901be0f4dd2c13cf66239055..6550b55067db31dbbc903fe17a13849383651c5a 100644
--- a/src/main/java/net/minecraft/server/IBlockState.java
+++ b/src/main/java/net/minecraft/server/IBlockState.java
@@ -21,7 +21,7 @@ public abstract class IBlockState<T extends Comparable<T>> {
return DataResult.error("Unable to read property: " + this + " with value: " + s1);
});
}, this::a);
- this.e = this.d.xmap(this::b, IBlockState.a::b);
+ this.e = this.d.xmap(this::b, (IBlockState.a<T> param) -> { return param.b(); }); // Paper - decompile fix
this.a = oclass;
this.b = s;
}
@@ -61,23 +61,17 @@ public abstract class IBlockState<T extends Comparable<T>> {
@@ -59,23 +59,17 @@ public abstract class IBlockState<T extends Comparable<T>> {
}
public boolean equals(Object object) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Configurable packet in spam threshold
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 53f96a1576582fce83999a1f7e9a2624506ed51f..010b17d2e7a27ace6ff8b15edff577c4164d2e81 100644
index 5827ef1e3eb35a11867ee4f92f301e1b0245c0fa..23c9e0f317073bb9c327ec49e0b0586d2123e4e9 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -243,4 +243,13 @@ public class PaperConfig {
@@ -244,4 +244,13 @@ public class PaperConfig {
public static boolean isProxyOnlineMode() {
return Bukkit.getOnlineMode() || (SpigotConfig.bungee && bungeeOnlineMode);
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Configurable flying kick messages
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 010b17d2e7a27ace6ff8b15edff577c4164d2e81..5a83fc21cb6801d597a01fb4a83d30488f30bdb6 100644
index 23c9e0f317073bb9c327ec49e0b0586d2123e4e9..c4086de778cc2ccc958b1a94dd6e9cdb5065076c 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -252,4 +252,11 @@ public class PaperConfig {
@@ -253,4 +253,11 @@ public class PaperConfig {
}
packetInSpamThreshold = getInt("settings.incoming-packet-spam-threshold", 300);
}

View File

@ -8,10 +8,10 @@ World checks and the Chunk Add logic are inconsistent on how Y > 256, < 0, is tr
Keep them consistent
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 43b588709da17ae779e97d297955edd3425c2a68..6d5bb1c5183c0e7fc83e197f3a6840b2dcb1ad02 100644
index 0ae5eb7da3c8baf6ff54cc3b83bba41127457134..022b05be76768cf0fb702ac5f9fa48c5e474391c 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -729,7 +729,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -728,7 +728,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
if (entity.ck()) {
this.getMethodProfiler().enter("chunkCheck");
int i = MathHelper.floor(entity.locX() / 16.0D);

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Don't let fishinghooks use portals
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 851d05096b9230c1eaaf2a910293697f358eec0a..3e6d3c2be5fc36db4ae5d022f80f5b0bbc349704 100644
index 6d6ce3b5a012f49b2e0725d66ad4bcae4a7310f7..de126bf6c95e90dd9a81ee8d815806b8908709ec 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -162,7 +162,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Optimize World.isLoaded(BlockPosition)Z
Reduce method invocations for World.isLoaded(BlockPosition)Z
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 3e6dc44ede30846b8c612b043c1bd625576980e8..cfd03f29e6c46c66bf3ad9253c88e27b30f313c1 100644
index 8f7222639bcc5b4b1b8af4aa69a100a37766cb4e..2b5384d43a4bceb0113e88a2e75b3b201fc49393 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -285,6 +285,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Don't allow entities to ride themselves - #572
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 3e6d3c2be5fc36db4ae5d022f80f5b0bbc349704..e1c592c57e54c0c0882978b25286e06d6aaef570 100644
index de126bf6c95e90dd9a81ee8d815806b8908709ec..e36855b969bdef5e85e6b29879f960b0675a7937 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1950,6 +1950,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke

View File

@ -27,7 +27,7 @@ index f164844f339793860e773c499443ce160d0a6830..751551f173338217f6682532a9a5e1a2
+ }
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index e1c592c57e54c0c0882978b25286e06d6aaef570..6c60cf4ff4e7d5716c0487767b7632a59607ce23 100644
index e36855b969bdef5e85e6b29879f960b0675a7937..13b10732917ffb823688336e888a329c774cc251 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -188,6 +188,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Add configuration option to prevent player names from being
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 5a83fc21cb6801d597a01fb4a83d30488f30bdb6..295b8390cbc31fc1fcb225f80ec2ff8f0df44321 100644
index c4086de778cc2ccc958b1a94dd6e9cdb5065076c..5fa63d7ca20b88a44d8800b3ebf74e4c0e376d0b 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -259,4 +259,9 @@ public class PaperConfig {
@@ -260,4 +260,9 @@ public class PaperConfig {
flyingKickPlayerMessage = getString("messages.kick.flying-player", flyingKickPlayerMessage);
flyingKickVehicleMessage = getString("messages.kick.flying-vehicle", flyingKickVehicleMessage);
}

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Entity#fromMobSpawner()
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 6c60cf4ff4e7d5716c0487767b7632a59607ce23..357d9293b66eee667f49e566f6f7b5449666986e 100644
index 13b10732917ffb823688336e888a329c774cc251..039a95a62e115f7095c38eb9a161dc0ff054a50a 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -188,6 +188,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -29,7 +29,7 @@ index 6c60cf4ff4e7d5716c0487767b7632a59607ce23..357d9293b66eee667f49e566f6f7b544
} catch (Throwable throwable) {
@@ -1704,6 +1709,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
if (!originTag.isEmpty()) {
origin = new Location(world.getWorld(), originTag.getDoubleAt(0), originTag.getDoubleAt(1), originTag.getDoubleAt(2));
origin = new org.bukkit.Location(world.getWorld(), originTag.getDoubleAt(0), originTag.getDoubleAt(1), originTag.getDoubleAt(2));
}
+
+ spawnedViaMobSpawner = nbttagcompound.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Fix MC-117075: TE Unload Lag Spike
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index cfd03f29e6c46c66bf3ad9253c88e27b30f313c1..b1d4f955a59313d7274e39870c9a7300fe012d08 100644
index 2b5384d43a4bceb0113e88a2e75b3b201fc49393..598a6907432ad8a7fe3b8c6389d3e5251efc913a 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -703,7 +703,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -707,7 +707,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
gameprofilerfiller.enter("blockEntities");
timings.tileEntityTick.startTiming(); // Spigot
if (!this.tileEntityListUnload.isEmpty()) {

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Allow specifying a custom "authentication servers down" kick
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 295b8390cbc31fc1fcb225f80ec2ff8f0df44321..5884b04f7e84048a9710736bd14237140ebf2cf7 100644
index 5fa63d7ca20b88a44d8800b3ebf74e4c0e376d0b..cee8740e644c492e3d71fd58791e7d52d57e856d 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -1,5 +1,6 @@
@ -16,7 +16,7 @@ index 295b8390cbc31fc1fcb225f80ec2ff8f0df44321..5884b04f7e84048a9710736bd1423714
import com.google.common.base.Throwables;
import java.io.File;
@@ -264,4 +265,9 @@ public class PaperConfig {
@@ -265,4 +266,9 @@ public class PaperConfig {
private static void suggestPlayersWhenNull() {
suggestPlayersWhenNullTabCompletions = getBoolean("settings.suggest-player-names-when-null-tab-completions", suggestPlayersWhenNullTabCompletions);
}

View File

@ -72,10 +72,10 @@ index 69c0a4c7bfb1c753d544dcd074ad832d3e5ef3a0..eaed020982bd19dab72872849170fa62
entity.extinguish();
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index b1d4f955a59313d7274e39870c9a7300fe012d08..ad1841f16ea3ecfbd9c6047483a4b7bd061c1981 100644
index 598a6907432ad8a7fe3b8c6389d3e5251efc913a..e095444d026c277c69a5d533c7b1f537ac84121e 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -640,6 +640,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -644,6 +644,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
this.playSound(entityhuman, (double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, soundeffect, soundcategory, f, f1);
}

View File

@ -18,7 +18,7 @@ the blockstate that will be valid for restoration, as opposed to dropping
information on restoration when the event is cancelled.
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index ad1841f16ea3ecfbd9c6047483a4b7bd061c1981..6f91878fedd3bf8daedc16bcde7ac1fd042f704c 100644
index e095444d026c277c69a5d533c7b1f537ac84121e..94219fe1e01c6e48123544f4cc14fad1ac6de834 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -71,7 +71,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@ -30,7 +30,7 @@ index ad1841f16ea3ecfbd9c6047483a4b7bd061c1981..6f91878fedd3bf8daedc16bcde7ac1fd
public Map<BlockPosition, TileEntity> capturedTileEntities = new HashMap<>();
public List<EntityItem> captureDrops;
public long ticksPerAnimalSpawns;
@@ -323,7 +323,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -327,7 +327,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
public boolean a(BlockPosition blockposition, IBlockData iblockdata, int i, int j) {
// CraftBukkit start - tree generation
if (this.captureTreeGeneration) {
@ -39,7 +39,7 @@ index ad1841f16ea3ecfbd9c6047483a4b7bd061c1981..6f91878fedd3bf8daedc16bcde7ac1fd
if (blockstate == null) {
blockstate = CapturedBlockState.getTreeBlockState(this, blockposition, i);
this.capturedBlockStates.put(blockposition.immutableCopy(), blockstate);
@@ -343,7 +343,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -347,7 +347,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
// CraftBukkit start - capture blockstates
boolean captured = false;
if (this.captureBlockStates && !this.capturedBlockStates.containsKey(blockposition)) {
@ -48,7 +48,7 @@ index ad1841f16ea3ecfbd9c6047483a4b7bd061c1981..6f91878fedd3bf8daedc16bcde7ac1fd
this.capturedBlockStates.put(blockposition.immutableCopy(), blockstate);
captured = true;
}
@@ -601,7 +601,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -605,7 +605,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
public IBlockData getType(BlockPosition blockposition) {
// CraftBukkit start - tree generation
if (captureTreeGeneration) {

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Player.setPlayerProfile API
This can be useful for changing name or skins after a player has logged in.
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 5326e7433dc0a4ff0e1d0ca30aad95b1ec718d6a..a781ac0cf8766e915c10ebd3823cbe5b0d1c5230 100644
index 5326e7433dc0a4ff0e1d0ca30aad95b1ec718d6a..74950d74e6a11d5552369e830f9fdd63c4306221 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -65,7 +65,7 @@ public abstract class EntityHuman extends EntityLiving {
@ -14,7 +14,7 @@ index 5326e7433dc0a4ff0e1d0ca30aad95b1ec718d6a..a781ac0cf8766e915c10ebd3823cbe5b
protected final float bO = 0.02F;
private int g;
- private final GameProfile bQ;
+ private final GameProfile bQ; public final void setProfile(final GameProfile profile) { this.bQ = profile; } // Paper - OBFHELPER
+ private GameProfile bQ; public final void setProfile(final GameProfile profile) { this.bQ = profile; } // Paper - OBFHELPER
private ItemStack bS;
private final ItemCooldown bT;
@Nullable
@ -48,7 +48,7 @@ index 80a21dbc05ed3007f2e827f7a320131244c3044b..e0f0a1e91a037f93b239e779aa8fd92b
uniqueId = i.getId();
// Paper end
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 734274db8f8c53d7e5310f2c16b1c64a42a6277c..4f0dabdb6683402d9fd0ea789381928fa06ee119 100644
index 734274db8f8c53d7e5310f2c16b1c64a42a6277c..44850b387f84aa9a3d1ec47555026b6088fc167e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1,6 +1,8 @@
@ -60,7 +60,15 @@ index 734274db8f8c53d7e5310f2c16b1c64a42a6277c..4f0dabdb6683402d9fd0ea789381928f
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableSet;
import com.google.common.io.BaseEncoding;
@@ -1216,8 +1218,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -41,6 +43,7 @@ import net.minecraft.server.EnumColor;
import net.minecraft.server.EnumGamemode;
import net.minecraft.server.GenericAttributes;
import net.minecraft.server.IChatBaseComponent;
+import net.minecraft.server.MCUtil;
import net.minecraft.server.MapIcon;
import net.minecraft.server.MinecraftKey;
import net.minecraft.server.NBTTagCompound;
@@ -1216,8 +1219,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
hiddenPlayers.put(player.getUniqueId(), hidingPlugins);
// Remove this player from the hidden player's EntityTrackerEntry
@ -75,7 +83,7 @@ index 734274db8f8c53d7e5310f2c16b1c64a42a6277c..4f0dabdb6683402d9fd0ea789381928f
PlayerChunkMap.EntityTracker entry = tracker.trackedEntities.get(other.getId());
if (entry != null) {
entry.clear(getHandle());
@@ -1258,8 +1265,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1258,8 +1266,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
hiddenPlayers.remove(player.getUniqueId());
@ -90,7 +98,7 @@ index 734274db8f8c53d7e5310f2c16b1c64a42a6277c..4f0dabdb6683402d9fd0ea789381928f
getHandle().playerConnection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, other));
@@ -1268,6 +1280,49 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1268,6 +1281,49 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
entry.updatePlayer(getHandle());
}
}
@ -126,7 +134,7 @@ index 734274db8f8c53d7e5310f2c16b1c64a42a6277c..4f0dabdb6683402d9fd0ea789381928f
+ reregisterPlayer(handle);
+
+ //Respawn the player then update their position and selected slot
+ connection.sendPacket(new net.minecraft.server.PacketPlayOutRespawn(handle.dimension, net.minecraft.server.WorldData.c(handle.world.getWorldData().getSeed()), handle.world.getWorldData().getType(), handle.playerInteractManager.getGameMode()));
+ //connection.sendPacket(new net.minecraft.server.PacketPlayOutRespawn(handle.dimension, net.minecraft.server.WorldData.c(handle.world.getWorldData().getSeed()), handle.world.getWorldData().getType(), handle.playerInteractManager.getGameMode())); // TODO: Fix this if you care to make it work
+ handle.updateAbilities();
+ connection.sendPacket(new net.minecraft.server.PacketPlayOutPosition(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch(), new HashSet<>(), 0));
+ net.minecraft.server.MinecraftServer.getServer().getPlayerList().updateClient(handle);

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Make player data saving configurable
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 5884b04f7e84048a9710736bd14237140ebf2cf7..ba341e0174cdc3b5b8bc83b7430270181ea92793 100644
index cee8740e644c492e3d71fd58791e7d52d57e856d..f22bed69f690f6e4754b87dd61cebe9c6627b12d 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -270,4 +270,13 @@ public class PaperConfig {
@@ -271,4 +271,13 @@ public class PaperConfig {
private static void authenticationServersDownKickMessage() {
authenticationServersDownKickMessage = Strings.emptyToNull(getString("messages.kick.authentication-servers-down", authenticationServersDownKickMessage));
}

View File

@ -9,10 +9,10 @@ e.g. servers which allow and support the usage of mod packs.
provide an optional flag to disable this check, at your own risk.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 4f0dabdb6683402d9fd0ea789381928fa06ee119..ec0cb22d53733bed33019b257ac06ca9dc80d19e 100644
index 44850b387f84aa9a3d1ec47555026b6088fc167e..ac621e2a6e7a2eaba5acc1dabca5d0bef4c8b2b3 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -141,6 +141,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -142,6 +142,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper start
private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus;
private String resourcePackHash;
@ -20,7 +20,7 @@ index 4f0dabdb6683402d9fd0ea789381928fa06ee119..ec0cb22d53733bed33019b257ac06ca9
// Paper end
public CraftPlayer(CraftServer server, EntityPlayer entity) {
@@ -1485,7 +1486,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1486,7 +1487,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
public void addChannel(String channel) {

View File

@ -10,7 +10,7 @@ Adds an option to control the force mode of the particle.
This adds a new Builder API which is much friendlier to use.
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 6d5bb1c5183c0e7fc83e197f3a6840b2dcb1ad02..7a71e6dfea35addb7d3d33d8ce187cc2c6943de6 100644
index 022b05be76768cf0fb702ac5f9fa48c5e474391c..0c677b8e1b1a103c7d727dba19fff1f74b7ed382 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -56,7 +56,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@ -22,7 +22,7 @@ index 6d5bb1c5183c0e7fc83e197f3a6840b2dcb1ad02..7a71e6dfea35addb7d3d33d8ce187cc2
public final ChunkProviderServer chunkProvider; // Paper - public
boolean tickingEntities;
private final MinecraftServer server;
@@ -1311,12 +1311,17 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1310,12 +1310,17 @@ public class WorldServer extends World implements GeneratorAccessSeed {
}
public <T extends ParticleParam> int sendParticles(EntityPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) {

View File

@ -36,10 +36,10 @@ This change will result in some major changes to fishing formulas.
I would love to see this change in Vanilla, so Mojang please pull :)
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index ba341e0174cdc3b5b8bc83b7430270181ea92793..26ab855dcf38446a3d8577108bd16fdbb76126b2 100644
index f22bed69f690f6e4754b87dd61cebe9c6627b12d..c8a7d8092a2849b62a8d83d7970756fd76100025 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -279,4 +279,12 @@ public class PaperConfig {
@@ -280,4 +280,12 @@ public class PaperConfig {
"such as inventories, experience points, advancements and the like will not be saved when they log out.");
}
}

View File

@ -5,11 +5,69 @@ Subject: [PATCH] Implement EntityKnockbackByEntityEvent
This event is called when an entity receives knockback by another entity.
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index a1cfa610eb3cc368b9641feeab709a4f5985ffbe..d94874b02ddcb640c9d94c99d83e77b2e55dce73 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -1085,7 +1085,9 @@ public abstract class EntityHuman extends EntityLiving {
if (flag5) {
if (i > 0) {
if (entity instanceof EntityLiving) {
+ ((EntityLiving) entity).knockingBackEntity = this; // Paper
((EntityLiving) entity).a((float) i * 0.5F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F)));
+ ((EntityLiving) entity).knockingBackEntity = null; // Paper
} else {
entity.h((double) (-MathHelper.sin(this.yaw * 0.017453292F) * (float) i * 0.5F), 0.1D, (double) (MathHelper.cos(this.yaw * 0.017453292F) * (float) i * 0.5F));
}
@@ -1109,7 +1111,9 @@ public abstract class EntityHuman extends EntityLiving {
if (entityliving != this && entityliving != entity && !this.r(entityliving) && (!(entityliving instanceof EntityArmorStand) || !((EntityArmorStand) entityliving).isMarker()) && this.h((Entity) entityliving) < 9.0D) {
// CraftBukkit start - Only apply knockback if the damage hits
if (entityliving.damageEntity(DamageSource.playerAttack(this).sweep(), f4)) {
+ ((EntityLiving) entity).knockingBackEntity = this; // Paper
entityliving.a(0.4F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F)));
+ ((EntityLiving) entity).knockingBackEntity = null; // Paper
}
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 3997dc6d979bf5a027861397b948aa4e8486fc58..57521337ea5ad4b944cf7303d2b3f9b34431116a 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -1479,7 +1479,9 @@ public abstract class EntityInsentient extends EntityLiving {
if (flag) {
if (f1 > 0.0F && entity instanceof EntityLiving) {
+ ((EntityLiving) entity).knockingBackEntity = this; // Paper
((EntityLiving) entity).a(f1 * 0.5F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F)));
+ ((EntityLiving) entity).knockingBackEntity = null; // Paper
this.setMot(this.getMot().d(0.6D, 1.0D, 0.6D));
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 2ffc8eb4615abfaa6a9e99c45ea436cdf6a461c8..324a98bf245f410983840ef9970e7215e84f7465 100644
index 2ffc8eb4615abfaa6a9e99c45ea436cdf6a461c8..d0a389e6dc73202a3fa7c82eace1c92dece2982e 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -1531,6 +1531,16 @@ public abstract class EntityLiving extends Entity {
@@ -1239,7 +1239,9 @@ public abstract class EntityLiving extends Entity {
}
this.aw = (float) (MathHelper.d(d1, d0) * 57.2957763671875D - (double) this.yaw);
+ this.knockingBackEntity = entity1 instanceof EntityLiving ? ((EntityLiving) entity1) : null; // Paper
this.a(0.4F, d0, d1);
+ this.knockingBackEntity = null; // Paper
} else {
this.aw = (float) ((int) (Math.random() * 2.0D) * 180);
}
@@ -1287,7 +1289,9 @@ public abstract class EntityLiving extends Entity {
}
protected void f(EntityLiving entityliving) {
+ ((EntityLiving) entityliving).knockingBackEntity = this; // Paper
entityliving.a(0.5F, entityliving.locX() - this.locX(), entityliving.locZ() - this.locZ());
+ ((EntityLiving) entityliving).knockingBackEntity = null; // Paper
}
private boolean f(DamageSource damagesource) {
@@ -1531,8 +1535,19 @@ public abstract class EntityLiving extends Entity {
Vec3D vec3d1 = (new Vec3D(d0, 0.0D, d1)).d().a((double) f);
this.setMot(vec3d.x / 2.0D - vec3d1.x, this.onGround ? Math.min(0.4D, vec3d.y / 2.0D + (double) f) : vec3d.y, vec3d.z / 2.0D - vec3d1.z);
@ -19,10 +77,13 @@ index 2ffc8eb4615abfaa6a9e99c45ea436cdf6a461c8..324a98bf245f410983840ef9970e7215
+ org.bukkit.util.Vector delta = new org.bukkit.util.Vector(currentMot.x - vec3d.x, currentMot.y - vec3d.y, currentMot.z - vec3d.z);
+ // Restore old velocity to be able to access it in the event
+ this.setMot(vec3d);
+ if (entity == null || new com.destroystokyo.paper.event.entity.EntityKnockbackByEntityEvent((LivingEntity) getBukkitEntity(), entity.getBukkitEntity(), f, delta).callEvent()) {
+ if (knockingBackEntity == null || new com.destroystokyo.paper.event.entity.EntityKnockbackByEntityEvent((LivingEntity) getBukkitEntity(), knockingBackEntity.getBukkitEntity(), f, delta).callEvent()) {
+ this.setMot(vec3d.x + delta.getX(), vec3d.y + delta.getY(), vec3d.z + delta.getZ());
+ }
+ // Paper end
}
}
+ EntityLiving knockingBackEntity; // Paper
@Nullable
protected SoundEffect getSoundHurt(DamageSource damagesource) {

View File

@ -6,7 +6,7 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API
How long an entity has raised hands to charge an attack or use an item
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 324a98bf245f410983840ef9970e7215e84f7465..3edd63cbfc3d4bf058f7fb56a4ed4a04b80fe927 100644
index d0a389e6dc73202a3fa7c82eace1c92dece2982e..b80068b184b32256f1944b9863454726852cd502 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -118,7 +118,7 @@ public abstract class EntityLiving extends Entity {
@ -18,7 +18,7 @@ index 324a98bf245f410983840ef9970e7215e84f7465..3edd63cbfc3d4bf058f7fb56a4ed4a04
protected int bk;
protected int bl;
private BlockPosition bE;
@@ -3149,10 +3149,12 @@ public abstract class EntityLiving extends Entity {
@@ -3154,10 +3154,12 @@ public abstract class EntityLiving extends Entity {
return this.activeItem;
}

View File

@ -19,7 +19,7 @@ index 33ce9a500430a01650e69a3568c8b03db325a936..cea15d50ed89430ee8d8cff9de21e1fc
+ }
}
diff --git a/src/main/java/net/minecraft/server/EnderDragonBattle.java b/src/main/java/net/minecraft/server/EnderDragonBattle.java
index 87ddabbbca4ac8444ad6ff69889d7fd0542045d4..785146bfb64fe1a467120d706aff7450cb9a8b96 100644
index 87ddabbbca4ac8444ad6ff69889d7fd0542045d4..1f012667464779939cd43453dcf066a14f4fa278 100644
--- a/src/main/java/net/minecraft/server/EnderDragonBattle.java
+++ b/src/main/java/net/minecraft/server/EnderDragonBattle.java
@@ -28,10 +28,10 @@ public class EnderDragonBattle {
@ -46,3 +46,21 @@ index 87ddabbbca4ac8444ad6ff69889d7fd0542045d4..785146bfb64fe1a467120d706aff7450
this.world = worldserver;
if (nbttagcompound.hasKeyOfType("DragonKilled", 99)) {
if (nbttagcompound.b("Dragon")) {
@@ -376,7 +380,7 @@ public class EnderDragonBattle {
private void a(BlockPosition blockposition) {
this.world.triggerEffect(3000, blockposition, 0);
- WorldGenerator.END_GATEWAY.b((WorldGenFeatureConfiguration) WorldGenEndGatewayConfiguration.a()).a(this.world, this.world.getStructureManager(), this.world.getChunkProvider().getChunkGenerator(), new Random(), blockposition);
+ WorldGenerator.END_GATEWAY.b(WorldGenEndGatewayConfiguration.a()).a(this.world, this.world.getStructureManager(), this.world.getChunkProvider().getChunkGenerator(), new Random(), blockposition); // Paper - decompile error
}
private void a(boolean flag) {
@@ -388,7 +392,7 @@ public class EnderDragonBattle {
}
}
- worldgenendtrophy.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.k).a(this.world, this.world.getStructureManager(), this.world.getChunkProvider().getChunkGenerator(), new Random(), this.exitPortalLocation);
+ worldgenendtrophy.b(WorldGenFeatureConfiguration.k).a(this.world, this.world.getStructureManager(), this.world.getChunkProvider().getChunkGenerator(), new Random(), this.exitPortalLocation); // Paper - decompile error
}
private EntityEnderDragon o() {

View File

@ -7,7 +7,7 @@ Allows you to determine why an inventory was closed, enabling plugin developers
to "confirm" things based on if it was player triggered close or not.
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 4893daca7ea64504731cfab455e09b0a11c65857..1f3e5c384a66bb0767cc18bdbe99b942f30faa55 100644
index d94874b02ddcb640c9d94c99d83e77b2e55dce73..1249a7ae8fa8d6ea33cbc276717f1e4553f73b85 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -155,7 +155,7 @@ public abstract class EntityHuman extends EntityLiving {
@ -114,10 +114,10 @@ index 70339603aa3e256470be241bf033f3471e2090ea..ef1ea58c252d063ce282d244236a5106
PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game");
cserver.getPluginManager().callEvent(playerQuitEvent);
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 7a71e6dfea35addb7d3d33d8ce187cc2c6943de6..dbc7db5c52752c52b3e84b370bbf38772dc20766 100644
index 0c677b8e1b1a103c7d727dba19fff1f74b7ed382..8a42f9ed3e1579b8b034de9321e5545505298d6b 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -968,7 +968,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -967,7 +967,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
for (TileEntity tileentity : chunk.getTileEntities().values()) {
if (tileentity instanceof IInventory) {
for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((IInventory) tileentity).getViewers())) {
@ -126,7 +126,7 @@ index 7a71e6dfea35addb7d3d33d8ce187cc2c6943de6..dbc7db5c52752c52b3e84b370bbf3877
}
}
}
@@ -1026,7 +1026,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1025,7 +1025,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
// Spigot Start
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder) {
for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((org.bukkit.inventory.InventoryHolder) entity.getBukkitEntity()).getInventory().getViewers())) {
@ -155,10 +155,10 @@ index 27b2ee740a705238995dd3bcea62b4bf74ec82dc..f6209e9c0b9e0ab99693025d23847bc6
@Override
public boolean isBlocking() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index ec0cb22d53733bed33019b257ac06ca9dc80d19e..5575c44d6f427661de1fec2c69932b446284c54d 100644
index ac621e2a6e7a2eaba5acc1dabca5d0bef4c8b2b3..0ba5b2a444660f280b673dbd0db9ded38fa6a839 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -788,7 +788,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -789,7 +789,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Close any foreign inventory
if (getHandle().activeContainer != getHandle().defaultContainer) {

View File

@ -8,10 +8,10 @@ These are a critical sign that somethin went wrong, and you've lost some data...
We should kind of know about these things you know.
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index dbc7db5c52752c52b3e84b370bbf38772dc20766..781b84535c105987d4b65e744977c87049b2a1a4 100644
index 8a42f9ed3e1579b8b034de9321e5545505298d6b..c37b69b1632a72e3c7df5fd2643c0b3ff517d06b 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -958,7 +958,8 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -957,7 +957,8 @@ public class WorldServer extends World implements GeneratorAccessSeed {
if (entity1 == null) {
return false;
} else {

View File

@ -6,7 +6,7 @@ Subject: [PATCH] add more information to Entity.toString()
UUID, ticks lived, valid, dead
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 357d9293b66eee667f49e566f6f7b5449666986e..09567fe1628f9d2393e7902782e3cdc91531bb18 100644
index 039a95a62e115f7095c38eb9a161dc0ff054a50a..2fcf43b7a2c5af2f7965a8556a3be9a086dc6420 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2429,7 +2429,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues
Add -Ddebug.entities=true to your JVM flags to gain more information
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 09567fe1628f9d2393e7902782e3cdc91531bb18..c84bf924c9d1c98b469f279302d8595cece71960 100644
index 2fcf43b7a2c5af2f7965a8556a3be9a086dc6420..f735c8cc9f68451ec64c2024769c37955e2ea963 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -76,6 +76,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -40,7 +40,7 @@ index 4ae3e91677ecf9c2104a229b4e8b229d18b87aa4..458802dc4b1f923b159168efff0546bb
protected void g() {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 6f91878fedd3bf8daedc16bcde7ac1fd042f704c..8148ecad0e313d2e6c0307915aaa670e7ad5a317 100644
index 8d9dcdce1f395025ce7f644ba25212a83a438be4..3f91ae81cf87b5455a79fa94111cecae77b9986c 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -68,6 +68,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@ -52,20 +52,20 @@ index 6f91878fedd3bf8daedc16bcde7ac1fd042f704c..8148ecad0e313d2e6c0307915aaa670e
public boolean captureBlockStates = false;
public boolean captureTreeGeneration = false;
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 781b84535c105987d4b65e744977c87049b2a1a4..ac0bcde5ccc9ebb88922d8b82381b03675b87ae6 100644
index c37b69b1632a72e3c7df5fd2643c0b3ff517d06b..9177f300e734afc5e4739655cdcb8b33866ff6cc 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -84,6 +84,9 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -83,6 +83,9 @@ public class WorldServer extends World implements GeneratorAccessSeed {
public final Convertable.ConversionSession convertable;
public final UUID uuid;
boolean hasPhysicsEvent = true; // Paper
+ private static Throwable getAddToWorldStackTrace(Entity entity) {
+ return new Throwable(entity + " Added to world at " + new java.util.Date());
+ }
public Chunk getChunkIfLoaded(int x, int z) {
@Override public Chunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI
return this.chunkProvider.getChunkAt(x, z, false);
@@ -920,8 +923,28 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -919,8 +922,28 @@ public class WorldServer extends World implements GeneratorAccessSeed {
// CraftBukkit start
private boolean addEntity0(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) {
org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot
@ -95,7 +95,7 @@ index 781b84535c105987d4b65e744977c87049b2a1a4..ac0bcde5ccc9ebb88922d8b82381b036
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getName(entity.getEntityType())); // CraftBukkit
return false;
} else if (this.isUUIDTaken(entity)) {
@@ -1081,7 +1104,24 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1080,7 +1103,24 @@ public class WorldServer extends World implements GeneratorAccessSeed {
}
}

View File

@ -19,10 +19,10 @@ index 387e0dcb9f01ad947daaa19211331a96742ce004..eaaa51e4bf761f41fd516402ce1ad0f9
+ }
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 8148ecad0e313d2e6c0307915aaa670e7ad5a317..66ce6afd46be67a131091d16b6a1221bbff333b5 100644
index 2437b73f70594e6745a1a071e23ef1626aeddfef..ba725d77e49e4e60a951fd8bb65b8422a46d0b71 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -836,6 +836,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -840,6 +840,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
// Paper end
}
}

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Vanished players don't have rights
diff --git a/src/main/java/net/minecraft/server/BlockBase.java b/src/main/java/net/minecraft/server/BlockBase.java
index 47324feca49786b49563d3d0e854e74ad27c190b..16a8ee36ba2b23207cb8630623d542ac5943b9df 100644
index 26d446077bb563ca3c5bb0339695b3364a3e41bf..88a1db211286fc8a6164312d7eb0839c00969e0e 100644
--- a/src/main/java/net/minecraft/server/BlockBase.java
+++ b/src/main/java/net/minecraft/server/BlockBase.java
@@ -453,6 +453,7 @@ public abstract class BlockBase {
@ -17,7 +17,7 @@ index 47324feca49786b49563d3d0e854e74ad27c190b..16a8ee36ba2b23207cb8630623d542ac
return this.getBlock().c(this.p(), iblockaccess, blockposition, voxelshapecollision);
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index c84bf924c9d1c98b469f279302d8595cece71960..3b718673e250a1f9e12ce58481ed533151ad3754 100644
index f735c8cc9f68451ec64c2024769c37955e2ea963..f35ebacaf7c3a583d48efe58db9583c12c9c31a1 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -98,7 +98,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -108,7 +108,7 @@ index 86f6f082fe2991ea9065b09c9680b76ca1cf7154..b6e2a3d8d0cf510f497c6f974356fafa
if (operatorboolean.apply(false, false)) {
throw (IllegalArgumentException) SystemUtils.c(new IllegalArgumentException());
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 66ce6afd46be67a131091d16b6a1221bbff333b5..f6cb503b8eb329cb6bfaa960f812da3c99ce45a8 100644
index ba725d77e49e4e60a951fd8bb65b8422a46d0b71..753b9f61a2f7a1851e18748500d745906e3adee8 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -170,6 +170,46 @@ public abstract class World implements GeneratorAccess, AutoCloseable {

View File

@ -58,7 +58,7 @@ index a27f91e6c3d1f5dd0adf8a3b48a640cc63676114..3ba19f75d24a1539c94f4fed9b8f90ae
return;
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 3b718673e250a1f9e12ce58481ed533151ad3754..c9905e99e61ffd4f1f0a000bf18daa403a7ea7d1 100644
index f35ebacaf7c3a583d48efe58db9583c12c9c31a1..e41c0a5891ef10ab7537f0f00ee6ab3e418d762c 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -71,6 +71,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke

View File

@ -80,10 +80,10 @@ index 28039aa8421207ce04840cc90e03d21bc8b7269f..17b8c4445af2bd2ed907d05ed3c396d4
public static ChunkStatus.Type a(@Nullable NBTTagCompound nbttagcompound) {
if (nbttagcompound != null) {
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index ac0bcde5ccc9ebb88922d8b82381b03675b87ae6..d81d6f7b984dc3587baadc96fc33f087b3594dcc 100644
index 9177f300e734afc5e4739655cdcb8b33866ff6cc..972a2fc6febc43156b8aa0917b881c6c604ec2c1 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1001,6 +1001,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1000,6 +1000,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
List[] aentityslice = chunk.getEntitySlices(); // Spigot
int i = aentityslice.length;
@ -91,7 +91,7 @@ index ac0bcde5ccc9ebb88922d8b82381b03675b87ae6..d81d6f7b984dc3587baadc96fc33f087
for (int j = 0; j < i; ++j) {
List<Entity> entityslice = aentityslice[j]; // Spigot
Iterator iterator = entityslice.iterator();
@@ -1013,11 +1014,25 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1012,11 +1013,25 @@ public class WorldServer extends World implements GeneratorAccessSeed {
throw (IllegalStateException) SystemUtils.c(new IllegalStateException("Removing entity while ticking!"));
}

View File

@ -51,7 +51,7 @@ index 3ba19f75d24a1539c94f4fed9b8f90aecc918cdc..f7be161c8557ae3848227b1a61e27374
if (oclass.isInstance(t0) && t0.getBoundingBox().c(axisalignedbb) && (predicate == null || predicate.test(t0))) { // Spigot - instance check
list.add(t0);
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index c9905e99e61ffd4f1f0a000bf18daa403a7ea7d1..7ccaaa9f2fe2a663674d2cd8a2bd759faec3f603 100644
index e41c0a5891ef10ab7537f0f00ee6ab3e418d762c..413dd5456d14842ab48143b6ee35e37dcb5ca3db 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -195,6 +195,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -63,10 +63,10 @@ index c9905e99e61ffd4f1f0a000bf18daa403a7ea7d1..7ccaaa9f2fe2a663674d2cd8a2bd759f
public float getBukkitYaw() {
return this.yaw;
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index d81d6f7b984dc3587baadc96fc33f087b3594dcc..ba0bb12dd5c5068d31c8a925e31804ddf2cec5da 100644
index 972a2fc6febc43156b8aa0917b881c6c604ec2c1..afba8d654bd227ad60ec502de8834c45f239f479 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1153,6 +1153,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1152,6 +1152,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
entity.origin = entity.getBukkitEntity().getLocation();
}
// Paper end
@ -74,7 +74,7 @@ index d81d6f7b984dc3587baadc96fc33f087b3594dcc..ba0bb12dd5c5068d31c8a925e31804dd
new com.destroystokyo.paper.event.entity.EntityAddToWorldEvent(entity.getBukkitEntity()).callEvent(); // Paper - fire while valid
}
@@ -1165,6 +1166,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1164,6 +1165,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
this.removeEntityFromChunk(entity);
this.entitiesById.remove(entity.getId());
this.unregisterEntity(entity);

View File

@ -22,10 +22,10 @@ to take the burden of this into their own hand without having to rely on
plugins doing unsafe things.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 26ab855dcf38446a3d8577108bd16fdbb76126b2..adef07d4d521b4aaa6f3389b04aa27e29bec0229 100644
index c8a7d8092a2849b62a8d83d7970756fd76100025..2e5c71d6b7d120a308076d95a3d5b73c5aca8bc9 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -287,4 +287,18 @@ public class PaperConfig {
@@ -288,4 +288,18 @@ public class PaperConfig {
Bukkit.getLogger().log(Level.INFO, "Using Aikar's Alternative Luck Formula to apply Luck attribute to all loot pool calculations. See https://luckformula.emc.gs");
}
}

View File

@ -64,7 +64,7 @@ index aada95b9d02d8ca0b870ec08875b5b719a543212..d68ee8d5dc5f8a75dc465f155acccb79
((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutBlockChange(world, blockposition)); // SPIGOT-4238: needed when looking through entity
((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); // SPIGOT-4541
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index f6cb503b8eb329cb6bfaa960f812da3c99ce45a8..a47de606a82b840180bd203816955fb657cc7c6c 100644
index aaa68008aacf2e528e6c2dc7e0307ee7dc35da12..7b7785f79ed176967d4c91c2d77c6f6ce73b30b8 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -210,6 +210,17 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@ -86,10 +86,10 @@ index f6cb503b8eb329cb6bfaa960f812da3c99ce45a8..a47de606a82b840180bd203816955fb6
public boolean s_() {
return this.isClientSide;
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index ba0bb12dd5c5068d31c8a925e31804ddf2cec5da..14ec04c6503cca58f64fc2a82a9fd715a06dcefb 100644
index afba8d654bd227ad60ec502de8834c45f239f479..f6c459facde67500499365af6da9f43adcd80606 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1484,15 +1484,17 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1483,15 +1483,17 @@ public class WorldServer extends World implements GeneratorAccessSeed {
this.getMinecraftServer().getPlayerList().sendAll(new PacketPlayOutSpawnPosition(blockposition));
}

View File

@ -9,10 +9,10 @@ thread dumps at an interval until the point of crash.
This will help diagnose what was going on in that time before the crash.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index adef07d4d521b4aaa6f3389b04aa27e29bec0229..214b577b326bc794fa3721deb6171228dd4f25e6 100644
index 2e5c71d6b7d120a308076d95a3d5b73c5aca8bc9..1b21911c3e4fd1d4a3305176bb8477c370256906 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -24,6 +24,7 @@ import org.bukkit.configuration.file.YamlConfiguration;
@@ -25,6 +25,7 @@ import org.bukkit.configuration.file.YamlConfiguration;
import co.aikar.timings.Timings;
import co.aikar.timings.TimingsManager;
import org.spigotmc.SpigotConfig;
@ -20,7 +20,7 @@ index adef07d4d521b4aaa6f3389b04aa27e29bec0229..214b577b326bc794fa3721deb6171228
public class PaperConfig {
@@ -288,6 +289,14 @@ public class PaperConfig {
@@ -289,6 +290,14 @@ public class PaperConfig {
}
}
@ -36,7 +36,7 @@ index adef07d4d521b4aaa6f3389b04aa27e29bec0229..214b577b326bc794fa3721deb6171228
public static int tabSpamLimit = 500;
private static void tabSpamLimiters() {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 790d7df8691537a976086b5507db4f97054706de..a7be2875faa968d2e3939974f62c977ca03e9c5b 100644
index d122fefe0d3b785a5aad6ceceba221279439fe7b..f33624e65a56bd7cf4432eecdd6834fa3f32cda5 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -900,6 +900,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas

View File

@ -5,12 +5,12 @@ Subject: [PATCH] Configurable speed for water flowing over lava
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index bc3df01aab3e79be9c2836820e0eacc69ea6c1f4..487b0d5cd608e84a793eba5fdbd50a9f3d95c79b 100644
index eaaa51e4bf761f41fd516402ce1ad0f903c6ab71..3c28dc61f97a65a0440c122ac5777cb9e24cdb3a 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -399,4 +399,10 @@ public class PaperWorldConfig {
this.armorStandTick = this.getBoolean("armor-stands-tick", this.armorStandTick);
log("ArmorStand ticking is " + (this.armorStandTick ? "enabled" : "disabled") + " by default");
@@ -393,4 +393,10 @@ public class PaperWorldConfig {
private void armorStandEntityLookups() {
armorStandEntityLookups = getBoolean("armor-stands-do-collision-entity-lookups", true);
}
+
+ public int waterOverLavaFlowSpeed;

View File

@ -0,0 +1,49 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: miclebrick <miclebrick@outlook.com>
Date: Thu, 23 Aug 2018 11:45:32 -0400
Subject: [PATCH] Optimize CraftBlockData Creation
Avoids a hashmap lookup by cacheing a reference to the CraftBlockData
and cloning it when one is needed.
diff --git a/src/main/java/net/minecraft/server/BlockBase.java b/src/main/java/net/minecraft/server/BlockBase.java
index 88a1db211286fc8a6164312d7eb0839c00969e0e..aa4bfc9fe8e917c1c19838b0a7b045a11fc9300b 100644
--- a/src/main/java/net/minecraft/server/BlockBase.java
+++ b/src/main/java/net/minecraft/server/BlockBase.java
@@ -323,6 +323,14 @@ public abstract class BlockBase {
this.o = blockbase_info.t;
this.p = blockbase_info.u;
}
+ // Paper start - impl cached craft block data, lazy load to fix issue with loading at the wrong time
+ private org.bukkit.craftbukkit.block.data.CraftBlockData cachedCraftBlockData;
+
+ public org.bukkit.craftbukkit.block.data.CraftBlockData createCraftBlockData() {
+ if (cachedCraftBlockData == null) cachedCraftBlockData = org.bukkit.craftbukkit.block.data.CraftBlockData.createData(getBlockData());
+ return (org.bukkit.craftbukkit.block.data.CraftBlockData) cachedCraftBlockData.clone();
+ }
+ // Paper end
public void a() {
if (!this.getBlock().o()) {
diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
index c7eed6b572cef2c735b1eb2f587c24876047cf94..bbded5671e986be34ebe3100e4c10ee0d5741764 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
@@ -553,7 +553,17 @@ public class CraftBlockData implements BlockData {
return craft;
}
+ // Paper start - optimize creating BlockData to not need a map lookup
+ static {
+ // Initialize cached data for all IBlockData instances after registration
+ Block.REGISTRY_ID.iterator().forEachRemaining(IBlockData::createCraftBlockData);
+ }
public static CraftBlockData fromData(IBlockData data) {
+ return data.createCraftBlockData();
+ }
+
+ public static CraftBlockData createData(IBlockData data) {
+ // Paper end
return MAP.getOrDefault(data.getBlock().getClass(), CraftBlockData::new).apply(data);
}
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add ray tracing methods to LivingEntity
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 3edd63cbfc3d4bf058f7fb56a4ed4a04b80fe927..4f80c46e327006a3d9028ca25db8554fba7b57ea 100644
index b80068b184b32256f1944b9863454726852cd502..12e7b1b5d15e94068c85f189c4ad1c5b5fab5e38 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -3436,6 +3436,23 @@ public abstract class EntityLiving extends Entity {
@@ -3441,6 +3441,23 @@ public abstract class EntityLiving extends Entity {
this.broadcastItemBreak(enumhand == EnumHand.MAIN_HAND ? EnumItemSlot.MAINHAND : EnumItemSlot.OFFHAND);
}
// Paper start

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Expose attack cooldown methods for Player
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 1f3e5c384a66bb0767cc18bdbe99b942f30faa55..0fd29c42179c7ac0c89cfd35b257ab0ad3ae1612 100644
index 1249a7ae8fa8d6ea33cbc276717f1e4553f73b85..af554396fdb25719c158a81ccab76e91f5df2ff5 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -2006,14 +2006,17 @@ public abstract class EntityHuman extends EntityLiving {
@@ -2010,14 +2010,17 @@ public abstract class EntityHuman extends EntityLiving {
this.datawatcher.set(EntityHuman.bs, nbttagcompound);
}
@ -27,10 +27,10 @@ index 1f3e5c384a66bb0767cc18bdbe99b942f30faa55..0fd29c42179c7ac0c89cfd35b257ab0a
this.aA = 0;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 5575c44d6f427661de1fec2c69932b446284c54d..3ec69b90b5e49407fc986741f189b6ea108a2118 100644
index 0ba5b2a444660f280b673dbd0db9ded38fa6a839..7b9b7b55c0b726648cfa4b9b87ad70c91fad2d75 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1944,6 +1944,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1945,6 +1945,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
getInventory().setItemInMainHand(hand);
}

View File

@ -27,7 +27,7 @@ index 6281f7900afab3ef1c9ba3c034b91cbfa1900f50..3c2f8407906879c8dca07b538f59f4bb
int i = this.f ? 300 : 100;
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 7ccaaa9f2fe2a663674d2cd8a2bd759faec3f603..4e3ea0a00b903b09e2f4d62a330f9faf5ff15f67 100644
index 413dd5456d14842ab48143b6ee35e37dcb5ca3db..a704feb0c19b56964d017f9e0ea3f26bc3e975f8 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1460,6 +1460,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -47,10 +47,10 @@ index 7ccaaa9f2fe2a663674d2cd8a2bd759faec3f603..4e3ea0a00b903b09e2f4d62a330f9faf
protected void k(double d0, double d1, double d2) {
diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java
index d5c09152acc93b25d626284071599afdbd76b709..51e9f4a6e09474a7489d2872a800308ee3f02e46 100644
index a70b1a17fe884980ef7c3c0a36e567a0e69ef7f0..74c58c3f82a94a3ec5e53c7f92e54cee80dc9e8a 100644
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
@@ -701,7 +701,8 @@ public class EntityArmorStand extends EntityLiving {
@@ -664,7 +664,8 @@ public class EntityArmorStand extends EntityLiving {
@Override
public void killEntity() {
@ -119,7 +119,7 @@ index c2a3bd8f25e91f79723074d93f6a646a8ce76d8c..4934e71225fe1242615660a379e797e2
public void saveData(NBTTagCompound nbttagcompound) {
super.saveData(nbttagcompound);
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 4f80c46e327006a3d9028ca25db8554fba7b57ea..7105192a5cd8666ac46dcd8a524709d7e429d1b0 100644
index 12e7b1b5d15e94068c85f189c4ad1c5b5fab5e38..c00031656bb6d2f986f555c68bb2fa9b9b0c0e6d 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -95,7 +95,7 @@ public abstract class EntityLiving extends Entity {
@ -139,7 +139,7 @@ index 4f80c46e327006a3d9028ca25db8554fba7b57ea..7105192a5cd8666ac46dcd8a524709d7
@Override
public float getBukkitYaw() {
@@ -1248,13 +1249,17 @@ public abstract class EntityLiving extends Entity {
@@ -1250,13 +1251,17 @@ public abstract class EntityLiving extends Entity {
if (knockbackCancelled) this.world.broadcastEntityEffect(this, (byte) 2); // Paper - Disable explosion knockback
if (this.dk()) {
if (!this.f(damagesource)) {
@ -161,7 +161,7 @@ index 4f80c46e327006a3d9028ca25db8554fba7b57ea..7105192a5cd8666ac46dcd8a524709d7
}
} else if (flag1) {
this.c(damagesource);
@@ -1392,6 +1397,7 @@ public abstract class EntityLiving extends Entity {
@@ -1396,6 +1401,7 @@ public abstract class EntityLiving extends Entity {
Entity entity = damagesource.getEntity();
EntityLiving entityliving = this.getKillingEntity();
@ -169,7 +169,7 @@ index 4f80c46e327006a3d9028ca25db8554fba7b57ea..7105192a5cd8666ac46dcd8a524709d7
if (this.aV >= 0 && entityliving != null) {
entityliving.a(this, this.aV, damagesource);
}
@@ -1403,16 +1409,36 @@ public abstract class EntityLiving extends Entity {
@@ -1407,16 +1413,36 @@ public abstract class EntityLiving extends Entity {
if (this.isSleeping()) {
this.entityWakeup();
}
@ -208,7 +208,7 @@ index 4f80c46e327006a3d9028ca25db8554fba7b57ea..7105192a5cd8666ac46dcd8a524709d7
}
}
@@ -1420,7 +1446,7 @@ public abstract class EntityLiving extends Entity {
@@ -1424,7 +1450,7 @@ public abstract class EntityLiving extends Entity {
if (!this.world.isClientSide) {
boolean flag = false;
@ -217,7 +217,7 @@ index 4f80c46e327006a3d9028ca25db8554fba7b57ea..7105192a5cd8666ac46dcd8a524709d7
if (this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
BlockPosition blockposition = this.getChunkCoordinates();
IBlockData iblockdata = Blocks.WITHER_ROSE.getBlockData();
@@ -1441,7 +1467,8 @@ public abstract class EntityLiving extends Entity {
@@ -1445,7 +1471,8 @@ public abstract class EntityLiving extends Entity {
}
}
@ -227,7 +227,7 @@ index 4f80c46e327006a3d9028ca25db8554fba7b57ea..7105192a5cd8666ac46dcd8a524709d7
Entity entity = damagesource.getEntity();
int i;
@@ -1454,22 +1481,26 @@ public abstract class EntityLiving extends Entity {
@@ -1458,22 +1485,26 @@ public abstract class EntityLiving extends Entity {
boolean flag = this.lastDamageByPlayerTime > 0;
this.dropInventory(); // CraftBukkit - from below
@ -257,7 +257,7 @@ index 4f80c46e327006a3d9028ca25db8554fba7b57ea..7105192a5cd8666ac46dcd8a524709d7
// CraftBukkit start
public int getExpReward() {
@@ -1549,6 +1580,7 @@ public abstract class EntityLiving extends Entity {
@@ -1554,6 +1585,7 @@ public abstract class EntityLiving extends Entity {
return SoundEffects.ENTITY_GENERIC_HURT;
}
@ -265,7 +265,7 @@ index 4f80c46e327006a3d9028ca25db8554fba7b57ea..7105192a5cd8666ac46dcd8a524709d7
@Nullable
protected SoundEffect getSoundDeath() {
return SoundEffects.ENTITY_GENERIC_DEATH;
@@ -2068,10 +2100,12 @@ public abstract class EntityLiving extends Entity {
@@ -2073,10 +2105,12 @@ public abstract class EntityLiving extends Entity {
}
@ -357,10 +357,10 @@ index 7b565ddfffd0b9c78392ee115ef9c20ab89a3380..d78b9fd608da691220f1edeff506b36e
this.minecraftKey = minecraftKey;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 3ec69b90b5e49407fc986741f189b6ea108a2118..e112a87792a76ccbc25caa1253c54db601de76aa 100644
index 7b9b7b55c0b726648cfa4b9b87ad70c91fad2d75..51e7c6d82248b5c0938d37607c64a9c10cb4de4d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1738,7 +1738,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1739,7 +1739,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
public void sendHealthUpdate() {

View File

@ -6,18 +6,18 @@ Subject: [PATCH] Optimize Biome Mob Lookups for Mob Spawning
Uses an EnumMap as well as a Set paired List for O(1) contains calls.
diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java
index ae0ac8d383ca11a683465d8c83a8b8a66e567079..4c656f434f2637a6af4cdb9efe3414de81e4ea9b 100644
index ae0ac8d383ca11a683465d8c83a8b8a66e567079..30aeb45d63394b7d91c2dd7b92cfc9cefa3c088c 100644
--- a/src/main/java/net/minecraft/server/BiomeBase.java
+++ b/src/main/java/net/minecraft/server/BiomeBase.java
@@ -69,7 +69,7 @@ public class BiomeBase {
protected final Map<WorldGenStage.Decoration, List<WorldGenFeatureConfigured<?, ?>>> r;
protected final List<WorldGenFeatureConfigured<?, ?>> s = Lists.newArrayList();
private final Map<StructureGenerator<?>, StructureFeature<?, ?>> u;
- private final Map<EnumCreatureType, List<BiomeBase.BiomeMeta>> v;
+ private final Map<EnumCreatureType, List<BiomeBase.BiomeMeta>> v = Maps.newEnumMap(EnumCreatureType.class); // Paper
private final Map<EntityTypes<?>, BiomeBase.e> w = Maps.newHashMap();
private final List<BiomeBase.d> x;
private final ThreadLocal<Long2FloatLinkedOpenHashMap> y = ThreadLocal.withInitial(() -> {
@@ -119,7 +119,7 @@ public class BiomeBase {
this.r.put(worldgenstage_decoration, Lists.newArrayList());
}
- this.v = Maps.newHashMap();
+ this.v = Maps.newEnumMap(EnumCreatureType.class); // Paper
EnumCreatureType[] aenumcreaturetype = EnumCreatureType.values();
i = aenumcreaturetype.length;
@@ -127,7 +127,7 @@ public class BiomeBase {
for (j = 0; j < i; ++j) {
EnumCreatureType enumcreaturetype = aenumcreaturetype[j];
@ -27,6 +27,15 @@ index ae0ac8d383ca11a683465d8c83a8b8a66e567079..4c656f434f2637a6af4cdb9efe3414de
}
} else {
@@ -150,7 +150,7 @@ public class BiomeBase {
this.u = (Map) list.stream().collect(Collectors.toMap((structurefeature) -> {
return structurefeature.b;
}, Function.identity()));
- this.v = map2;
+ this.v = Maps.newEnumMap(EnumCreatureType.class); this.v.putAll(map2); // Paper
this.x = list1;
this.l = (String) optional.orElse(null); // Paper - decompile fix
Stream stream = map1.values().stream().flatMap(Collection::stream).filter((worldgenfeatureconfigured) -> {
@@ -433,6 +433,38 @@ public class BiomeBase {
return this.l;
}

View File

@ -1,242 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 17 Sep 2018 23:37:31 -0400
Subject: [PATCH] Optimize Server World Map
Minecraft moved worlds to a hashmap in 1.13.1.
This creates inconsistent order for iteration of the map.
This patch restores World management to be back as an Array.
.values() will allow us to iterate as it was pre 1.13.1 by
ArrayList, giving consistent ordering and effecient iteration performance.
KeySet and EntrySet iteration is proxied to the List iterator,
and should retain manipulation behavior but nothing should be doing that.
Getting a World by dimension ID is now back a constant time operation.
Hopefully no other plugins try to mess with this map, as we are only handling
known NMS used methods, but we can add more if naughty plugins are found later.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldMap.java b/src/main/java/com/destroystokyo/paper/PaperWorldMap.java
new file mode 100644
index 0000000000000000000000000000000000000000..0f0c5330c364909c85cc8cf58fb5c478ffdaeb25
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldMap.java
@@ -0,0 +1,193 @@
+package com.destroystokyo.paper;
+
+import net.minecraft.server.DimensionManager;
+import net.minecraft.server.ResourceKey;
+import net.minecraft.server.World;
+import net.minecraft.server.WorldServer;
+
+import javax.annotation.Nonnull;
+import java.util.AbstractSet;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+public class PaperWorldMap extends HashMap<ResourceKey<World>, WorldServer> {
+ private final List<WorldServer> worlds = new ArrayList<>();
+ private final List<WorldServer> worldsIterable = new ArrayList<WorldServer>() {
+ @Override
+ public Iterator<WorldServer> iterator() {
+ Iterator<WorldServer> iterator = super.iterator();
+ return new Iterator<WorldServer>() {
+ private WorldServer last;
+
+ @Override
+ public boolean hasNext() {
+ return iterator.hasNext();
+ }
+
+ @Override
+ public WorldServer next() {
+ this.last = iterator.next();
+ return last;
+ }
+
+ @Override
+ public void remove() {
+ worlds.set(last.worldProvider.getDimensionManager().getDimensionID() + 1, null);
+ }
+ };
+ }
+ };
+ @Override
+ public int size() {
+ return worldsIterable.size();
+ }
+
+ @Override
+ public boolean isEmpty() {
+ return worldsIterable.isEmpty();
+ }
+
+ @Override
+ public WorldServer get(Object key) {
+ // Will hit the below method
+ return key instanceof ResourceKey ? get((ResourceKey<World>) key) : null;
+ }
+ // TODO figure out what to do with dimension ids
+ public WorldServer get(ResourceKey<World> key) {
+ int id = key.getDimensionID()+1;
+ return worlds.size() > id ? worlds.get(id) : null;
+ }
+
+ @Override
+ public boolean containsKey(Object key) {
+ // will hit below method
+ return key instanceof DimensionManager && containsKey((DimensionManager) key);
+ }
+ public boolean containsKey(DimensionManager key) {
+ return get(key) != null;
+ }
+
+ @Override
+ public WorldServer put(ResourceKey<World> key, WorldServer value) {
+ while (worlds.size() <= key.getDimensionID()+1) {
+ worlds.add(null);
+ }
+ WorldServer old = worlds.set(key.getDimensionID()+1, value);
+ if (old != null) {
+ worldsIterable.remove(old);
+ }
+ worldsIterable.add(value);
+ return old;
+ }
+
+ @Override
+ public void putAll(Map<? extends ResourceKey<World>, ? extends WorldServer> m) {
+ for (Entry<? extends ResourceKey<World>, ? extends WorldServer> e : m.entrySet()) {
+ put(e.getKey(), e.getValue());
+ }
+ }
+
+ @Override
+ public WorldServer remove(Object key) {
+ return key instanceof DimensionManager ? remove((DimensionManager) key) : null;
+ }
+
+ public WorldServer remove(DimensionManager key) {
+ WorldServer old;
+ if (key.getDimensionID()+1 == worlds.size() - 1) {
+ old = worlds.remove(key.getDimensionID()+1);
+ } else {
+ old = worlds.set(key.getDimensionID() + 1, null);
+ }
+ if (old != null) {
+ worldsIterable.remove(old);
+ }
+ return old;
+ }
+
+ @Override
+ public void clear() {
+ throw new RuntimeException("What the hell are you doing?");
+ }
+
+ @Override
+ public boolean containsValue(Object value) {
+ return value instanceof WorldServer && get(((WorldServer) value).getDimensionKey()) != null;
+ }
+
+ @Nonnull
+ @Override
+ public Set<ResourceKey<World>> keySet() {
+ return new AbstractSet<ResourceKey<World>>() {
+ @Override
+ public Iterator<ResourceKey<World>> iterator() {
+ Iterator<WorldServer> iterator = worldsIterable.iterator();
+ return new Iterator<ResourceKey<World>>() {
+
+ @Override
+ public boolean hasNext() {
+ return iterator.hasNext();
+ }
+
+ @Override
+ public ResourceKey<World> next() {
+ return iterator.next().getDimensionKey();
+ }
+
+ @Override
+ public void remove() {
+ iterator.remove();
+ }
+ };
+ }
+
+ @Override
+ public int size() {
+ return worlds.size();
+ }
+ };
+ }
+
+ @Override
+ public Collection<WorldServer> values() {
+ return worldsIterable;
+ }
+
+ @Override
+ public Set<Entry<ResourceKey<World>, WorldServer>> entrySet() {
+ return new AbstractSet<Entry<ResourceKey<World>, WorldServer>>() {
+ @Override
+ public Iterator<Entry<ResourceKey<World>, WorldServer>> iterator() {
+ Iterator<WorldServer> iterator = worldsIterable.iterator();
+ return new Iterator<Entry<ResourceKey<World>, WorldServer>>() {
+
+ @Override
+ public boolean hasNext() {
+ return iterator.hasNext();
+ }
+
+ @Override
+ public Entry<ResourceKey<World>, WorldServer> next() {
+ WorldServer entry = iterator.next();
+ return new SimpleEntry<>(entry.getDimensionKey(), entry);
+ }
+
+ @Override
+ public void remove() {
+ iterator.remove();
+ }
+ };
+ }
+
+ @Override
+ public int size() {
+ return worldsIterable.size();
+ }
+ };
+ }
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index a7be2875faa968d2e3939974f62c977ca03e9c5b..1d4ec1412db104a6437b57afe192063188fabd10 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -91,7 +91,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
private String serverIp;
private int serverPort;
public final IRegistryCustom.Dimension f;
- public final Map<ResourceKey<World>, WorldServer> worldServer;
+ public final Map<ResourceKey<World>, WorldServer> worldServer = new com.destroystokyo.paper.PaperWorldMap(); // Paper;
private PlayerList playerList;
private volatile boolean isRunning;
private volatile boolean isRestarting = false; // Paper - flag to signify we're attempting to restart
@@ -441,7 +441,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
}
this.updateWorldSettings();
- for (WorldServer worldserver : this.getWorlds()) {
+ for (WorldServer worldserver : com.google.common.collect.Lists.newArrayList(this.getWorlds())) { // Paper - avoid como if 1 world triggers another world
this.loadSpawn(worldserver.getChunkProvider().playerChunkMap.worldLoadListener, worldserver);
this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldLoadEvent(worldserver.getWorld()));
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Configurable connection throttle kick message
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 214b577b326bc794fa3721deb6171228dd4f25e6..19c5d2047040c43711339a0206bd01df8e03b5ea 100644
index 1b21911c3e4fd1d4a3305176bb8477c370256906..d5c97bb6503c9bfafd819dd62397b9decd515df5 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -272,6 +272,11 @@ public class PaperConfig {
@@ -273,6 +273,11 @@ public class PaperConfig {
authenticationServersDownKickMessage = Strings.emptyToNull(getString("messages.kick.authentication-servers-down", authenticationServersDownKickMessage));
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add sun related API
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index a38a1f3447accd51dcd295fb28c4108cb87ad832..df98f2244a161c0e66e80f92c91760409734dc69 100644
index 1b824bd3757b7e6723254c9cb2badaafbd2de2de..7c9b437d950623a978ca3d45c8ca57b39a897179 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -1509,6 +1509,7 @@ public abstract class EntityInsentient extends EntityLiving {
@@ -1511,6 +1511,7 @@ public abstract class EntityInsentient extends EntityLiving {
}

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Turtle API
diff --git a/src/main/java/net/minecraft/server/EntityTurtle.java b/src/main/java/net/minecraft/server/EntityTurtle.java
index dd745894614982fad6277e77b98bed75fc2a2f55..5862e2026b685df80de45c529f1367382a2a60b0 100644
index dd745894614982fad6277e77b98bed75fc2a2f55..00827c335e9413e986d7f07d0adbcef0d106a553 100644
--- a/src/main/java/net/minecraft/server/EntityTurtle.java
+++ b/src/main/java/net/minecraft/server/EntityTurtle.java
@@ -27,10 +27,12 @@ public class EntityTurtle extends EntityAnimal {
@ -22,7 +22,12 @@ index dd745894614982fad6277e77b98bed75fc2a2f55..5862e2026b685df80de45c529f136738
private BlockPosition getHomePos() {
return (BlockPosition) this.datawatcher.get(EntityTurtle.bw);
}
@@ -51,27 +53,33 @@ public class EntityTurtle extends EntityAnimal {
@@ -47,31 +49,37 @@ public class EntityTurtle extends EntityAnimal {
return (Boolean) this.datawatcher.get(EntityTurtle.bx);
}
- private void setHasEgg(boolean flag) {
+ public void setHasEgg(boolean flag) { // Paper
this.datawatcher.set(EntityTurtle.bx, flag);
}

View File

@ -14,7 +14,7 @@ forwarding, and is integrated into the Minecraft login process by using the 1.13
login plugin message packet.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 19c5d2047040c43711339a0206bd01df8e03b5ea..29cab8730a5e61aeb8bf4d69ccad192c1ff975f4 100644
index d5c97bb6503c9bfafd819dd62397b9decd515df5..478856f190a8d0177dee39dab4692fc54f9c8ed4 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -8,6 +8,7 @@ import java.io.IOException;
@ -25,7 +25,7 @@ index 19c5d2047040c43711339a0206bd01df8e03b5ea..29cab8730a5e61aeb8bf4d69ccad192c
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -243,7 +244,7 @@ public class PaperConfig {
@@ -244,7 +245,7 @@ public class PaperConfig {
}
public static boolean isProxyOnlineMode() {
@ -34,7 +34,7 @@ index 19c5d2047040c43711339a0206bd01df8e03b5ea..29cab8730a5e61aeb8bf4d69ccad192c
}
public static int packetInSpamThreshold = 300;
@@ -315,4 +316,21 @@ public class PaperConfig {
@@ -316,4 +317,21 @@ public class PaperConfig {
}
tabSpamLimit = getInt("settings.spam-limiter.tab-spam-limit", tabSpamLimit);
}

View File

@ -0,0 +1,19 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Wed, 10 Oct 2018 21:22:44 -0500
Subject: [PATCH] Check Drowned for Villager Aggression Config
diff --git a/src/main/java/net/minecraft/server/EntityDrowned.java b/src/main/java/net/minecraft/server/EntityDrowned.java
index 1f1f77776d840c6fa1156239a1da9bb97a328fb1..e6425bdf1a85e773f5555db1aebe7e159f7cd37c 100644
--- a/src/main/java/net/minecraft/server/EntityDrowned.java
+++ b/src/main/java/net/minecraft/server/EntityDrowned.java
@@ -29,7 +29,7 @@ public class EntityDrowned extends EntityZombie implements IRangedEntity {
this.goalSelector.a(7, new PathfinderGoalRandomStroll(this, 1.0D));
this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[]{EntityDrowned.class})).a(EntityPigZombie.class));
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, 10, true, false, this::j));
- this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false));
+ if ( world.spigotConfig.zombieAggressiveTowardsVillager ) this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false)); // Paper
this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityIronGolem.class, true));
this.targetSelector.a(5, new PathfinderGoalNearestAttackableTarget<>(this, EntityTurtle.class, 10, true, false, EntityTurtle.bv));
}

View File

@ -0,0 +1,38 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Fri, 12 Oct 2018 01:37:22 -0500
Subject: [PATCH] Here's Johnny!
diff --git a/src/main/java/net/minecraft/server/EntityVindicator.java b/src/main/java/net/minecraft/server/EntityVindicator.java
index 9c152b79164710d3d4175d0acbc9548d61390097..58315906b641ba46ce73b6fefc43ea333bb0a088 100644
--- a/src/main/java/net/minecraft/server/EntityVindicator.java
+++ b/src/main/java/net/minecraft/server/EntityVindicator.java
@@ -11,7 +11,7 @@ public class EntityVindicator extends EntityIllagerAbstract {
private static final Predicate<EnumDifficulty> b = (enumdifficulty) -> {
return enumdifficulty == EnumDifficulty.NORMAL || enumdifficulty == EnumDifficulty.HARD;
};
- private boolean bv;
+ private boolean bv; public boolean isJohnny() { return bv; } public void setJohnny(boolean johnny) { bv = johnny; } // Paper - OBFHELPER
public EntityVindicator(EntityTypes<? extends EntityVindicator> entitytypes, World world) {
super(entitytypes, world);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java
index 951d47929893fce38183b81cf4ec6a7d4204acd1..5ff957ced7a86f4fa3a0751b4eed5a6fdc525da4 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java
@@ -25,4 +25,14 @@ public class CraftVindicator extends CraftIllager implements Vindicator {
public EntityType getType() {
return EntityType.VINDICATOR;
}
+
+ // Paper start
+ public boolean isJohnny() {
+ return getHandle().isJohnny();
+ }
+
+ public void setJohnny(boolean johnny) {
+ getHandle().setJohnny(johnny);
+ }
+ // Paper end
}

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Add option to prevent players from moving into unloaded
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 487b0d5cd608e84a793eba5fdbd50a9f3d95c79b..b49a1a6f5017c9e183a7d08b16e89899c25a9717 100644
index 3c28dc61f97a65a0440c122ac5777cb9e24cdb3a..6f660388aa0d56577ad1c3f463c96d925c964821 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -405,4 +405,9 @@ public class PaperWorldConfig {
@@ -399,4 +399,9 @@ public class PaperWorldConfig {
waterOverLavaFlowSpeed = getInt("water-over-lava-flow-speed", 5);
log("Water over lava flow speed: " + waterOverLavaFlowSpeed);
}

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Reset players airTicks on respawn
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 4e3ea0a00b903b09e2f4d62a330f9faf5ff15f67..58ecc49ba91cdb9c100ce3319434f2110b9a5892 100644
index a704feb0c19b56964d017f9e0ea3f26bc3e975f8..41c14d367e0b51e109001167d3c7b40676f364b8 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2256,6 +2256,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke

View File

@ -12,7 +12,7 @@ server threads
Allow usage of a single thread executor by not using ForkJoin so single core CPU's.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 1d4ec1412db104a6437b57afe192063188fabd10..e4f033d5ad66da5a38e5bfee861e9ea3399f30fe 100644
index a7be2875faa968d2e3939974f62c977ca03e9c5b..29f7e78fc21ccca1a080055fe616996d1ede666f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -176,6 +176,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas

View File

@ -8,7 +8,7 @@ the updates per world, so that we can re-use the same packet
object for every player unless they have per-player time enabled.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index e4f033d5ad66da5a38e5bfee861e9ea3399f30fe..4c610db03f4d8bae0e310d6a0680cefb7bc74872 100644
index 29f7e78fc21ccca1a080055fe616996d1ede666f..b336cd541b8e3a9ebe3d89a487160d18a294dade 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1197,12 +1197,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Book Size Limits
Puts some limits on the size of books.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 29cab8730a5e61aeb8bf4d69ccad192c1ff975f4..6f688cca9f769a6d7b1d1b9bc48e16632da3a847 100644
index 478856f190a8d0177dee39dab4692fc54f9c8ed4..01d48da8b2f89ad3a615ad10c044c5f0a08ee4ed 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -333,4 +333,11 @@ public class PaperConfig {
@@ -334,4 +334,11 @@ public class PaperConfig {
velocitySecretKey = secret.getBytes(StandardCharsets.UTF_8);
}
}

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Make the default permission message configurable
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 6f688cca9f769a6d7b1d1b9bc48e16632da3a847..1aa7d0cfaf5697daeeb98e237387f27e76bca16f 100644
index 01d48da8b2f89ad3a615ad10c044c5f0a08ee4ed..f9b1b198299166759fe0bd0a36d8d88c626e06a4 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -19,6 +19,7 @@ import java.util.regex.Pattern;
@ -14,9 +14,9 @@ index 6f688cca9f769a6d7b1d1b9bc48e16632da3a847..1aa7d0cfaf5697daeeb98e237387f27e
import org.bukkit.Bukkit;
+import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.InvalidConfigurationException;
import org.bukkit.configuration.file.YamlConfiguration;
@@ -278,6 +279,11 @@ public class PaperConfig {
@@ -279,6 +280,11 @@ public class PaperConfig {
connectionThrottleKickMessage = getString("messages.kick.connection-throttle", connectionThrottleKickMessage);
}

View File

@ -20,7 +20,7 @@ this is going to be the best soultion all around.
Improvements/suggestions welcome!
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 58ecc49ba91cdb9c100ce3319434f2110b9a5892..6d06a5c258981db3bc645087b37a5a8339bc06eb 100644
index 41c14d367e0b51e109001167d3c7b40676f364b8..505ba8e298a825ce69cc60c76cb040edeb0acdbd 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1948,12 +1948,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -72,7 +72,7 @@ index 58ecc49ba91cdb9c100ce3319434f2110b9a5892..6d06a5c258981db3bc645087b37a5a83
if (event.isCancelled()) {
return false;
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 0fd29c42179c7ac0c89cfd35b257ab0ad3ae1612..8af8676888e4deff66094053d14203c2f5b20ab1 100644
index af554396fdb25719c158a81ccab76e91f5df2ff5..5ef91da9733fd9276e7bd819a11a0548e01b17f0 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -942,9 +942,11 @@ public abstract class EntityHuman extends EntityLiving {
@ -91,10 +91,10 @@ index 0fd29c42179c7ac0c89cfd35b257ab0ad3ae1612..8af8676888e4deff66094053d14203c2
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 7105192a5cd8666ac46dcd8a524709d7e429d1b0..1481cbafa1b4e48822d9e0fa2735b9829440fca3 100644
index c00031656bb6d2f986f555c68bb2fa9b9b0c0e6d..0b4e39d93f28ec5c7835bace2ea969a6e99ac2a3 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2886,11 +2886,13 @@ public abstract class EntityLiving extends Entity {
@@ -2891,11 +2891,13 @@ public abstract class EntityLiving extends Entity {
return ((Byte) this.datawatcher.get(EntityLiving.an) & 4) != 0;
}

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