Archiviert
13
0

Updated Upstream (Bukkit/CraftBukkit/Spigot) (#2415)

* fixup patch and rebuild

* Updated Upstream (Bukkit/CraftBukkit/Spigot)

Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
bde198c9 SPIGOT-5246: PlayerQuitEvent.get/setQuitMessage() is incorrectly marked as NotNull
24ad5a79 SPIGOT-5240: Vector.angle not valid for angles very close to each other
a143db9a SPIGOT-5231: ShotAtAngle API for Fireworks
10db5c3d SPIGOT-5226: Update Javadoc of PlayerDeathEvent

CraftBukkit Changes:
1ec1b05e SPIGOT-5245: Unneeded cast to WorldNBTStorage in CraftWorld#getWorldFolder
e5e8eec2 SPIGOT-5241: setAttributeModifiers does not work on untouched stack
803eaa31 SPIGOT-5231: ShotAtAngle API for Fireworks
7881d2ae SPIGOT-5237: Horses, pigs do not drop their inventory
06efc9ec Don't accept connections until all plugins have enabled
da62a66a SPIGOT-5225: World handle isn't closed if world is unloaded without saving
104b3831 SPIGOT-5222: Cannot get Long values from Entity memory
f0b3fe43 SPIGOT-5220: Server CPU usage reaches 100% when stdin is null

Spigot Changes:
e5b1b5db SPIGOT-5235: Destroy expired area effect clouds / fireworks that are inactive
cbcc8e87 Make region files more reliable to write to
8887c5f4 Remove redundant late-bind option
dac29063 Rebuild patches

* Preserve old flush on save flag for reliable regionfiles

Originally this patch was in paper

* Fix some issues with the death event

- Entities potentially entering a glitched state to the client where
they appear to be falling over
- Donkeys losing their chest if the event was cancelled (only an
issue since the upstream merge)
- Some wither death logic running for an entity killed by a wither
Dieser Commit ist enthalten in:
Spottedleaf 2019-08-05 09:35:40 -07:00 committet von Zach
Ursprung 474e5ad269
Commit 7c640a1ae2
93 geänderte Dateien mit 470 neuen und 715 gelöschten Zeilen

Datei anzeigen

@ -1,4 +1,4 @@
From 6920434f57d65bdcb36d94c4c347c5e30f3775ad Mon Sep 17 00:00:00 2001
From 2bde8cda0f726300a485db3267cad3e528cebaa2 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 28 Dec 2016 01:18:55 -0500
Subject: [PATCH] Fireworks API's
@ -7,7 +7,7 @@ Get the Entity being boosted
Get the firework launcher
diff --git a/src/main/java/org/bukkit/entity/Firework.java b/src/main/java/org/bukkit/entity/Firework.java
index 1c55f0338..7df26cf7f 100644
index d6ea16ec4..a6250043e 100644
--- a/src/main/java/org/bukkit/entity/Firework.java
+++ b/src/main/java/org/bukkit/entity/Firework.java
@@ -3,6 +3,9 @@ package org.bukkit.entity;
@ -20,10 +20,10 @@ index 1c55f0338..7df26cf7f 100644
public interface Firework extends Entity {
/**
@@ -25,4 +28,15 @@ public interface Firework extends Entity {
* remaining fuse.
@@ -43,4 +46,15 @@ public interface Firework extends Entity {
* @param shotAtAngle
*/
void detonate();
void setShotAtAngle(boolean shotAtAngle);
+
+ // Paper start
+ @Nullable
@ -37,5 +37,5 @@ index 1c55f0338..7df26cf7f 100644
+ // Paper end
}
--
2.21.0
2.22.0

Datei anzeigen

@ -1,4 +1,4 @@
From d99eaf4f0c6f2a9b5cd3be7cee05369dca7244d1 Mon Sep 17 00:00:00 2001
From c1950775d3e3996cd0c5525df5195bdc8c292ad0 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 21:02:09 -0600
Subject: [PATCH] Paper config files
@ -518,10 +518,10 @@ index 0000000000..a738657394
+ }
+}
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index d88c9b6f65..5e0797afde 100644
index e02e003006..e6cf90484c 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -152,6 +152,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -162,6 +162,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
org.spigotmc.SpigotConfig.init((File) options.valueOf("spigot-settings"));
org.spigotmc.SpigotConfig.registerCommands();
// Spigot end
@ -599,7 +599,7 @@ index bec64d7f28..7f648dbbc9 100644
this.world = new CraftWorld((WorldServer) this, gen, env);
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 8465a91088..4d38bf5018 100644
index 305b6eaa93..dce5bde54f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -756,6 +756,7 @@ public final class CraftServer implements Server {
@ -626,7 +626,7 @@ index 8465a91088..4d38bf5018 100644
overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*");
ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions");
@@ -1958,4 +1961,35 @@ public final class CraftServer implements Server {
@@ -1959,4 +1962,35 @@ public final class CraftServer implements Server {
{
return spigot;
}

Datei anzeigen

@ -1,4 +1,4 @@
From 98451ed1b8e477f1cbf7b5da71e9437d7e665207 Mon Sep 17 00:00:00 2001
From 07b31610596dc222d66d78b3b1e468314d3157e8 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 04:00:11 -0600
Subject: [PATCH] Timings v2
@ -358,7 +358,7 @@ index 3ed48be382..c4d989f702 100644
}
}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index baf3bd461b..f351d021dc 100644
index 3b785a3ade..e51e3b74cc 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -129,11 +129,13 @@ public class ChunkProviderServer extends IChunkProvider {
@ -387,7 +387,7 @@ index baf3bd461b..f351d021dc 100644
}
@Override
@@ -354,7 +358,9 @@ public class ChunkProviderServer extends IChunkProvider {
@@ -362,7 +366,9 @@ public class ChunkProviderServer extends IChunkProvider {
this.tickDistanceManager();
this.world.timings.doChunkMap.stopTiming(); // Spigot
this.world.getMethodProfiler().exitEnter("chunks");
@ -397,7 +397,7 @@ index baf3bd461b..f351d021dc 100644
this.world.timings.doChunkUnload.startTiming(); // Spigot
this.world.getMethodProfiler().exitEnter("unload");
this.playerChunkMap.unloadChunks(booleansupplier);
@@ -379,10 +385,12 @@ public class ChunkProviderServer extends IChunkProvider {
@@ -387,10 +393,12 @@ public class ChunkProviderServer extends IChunkProvider {
boolean flag2 = world.ticksPerAnimalSpawns != 0L && worlddata.getTime() % world.ticksPerAnimalSpawns == 0L; // CraftBukkit // PAIL: TODO monster ticks
this.world.getMethodProfiler().enter("naturalSpawnCount");
@ -410,7 +410,7 @@ index baf3bd461b..f351d021dc 100644
this.world.getMethodProfiler().exit();
this.playerChunkMap.f().forEach((playerchunk) -> {
Optional<Chunk> optional = ((Either) playerchunk.b().getNow(PlayerChunk.UNLOADED_CHUNK)).left();
@@ -391,7 +399,9 @@ public class ChunkProviderServer extends IChunkProvider {
@@ -399,7 +407,9 @@ public class ChunkProviderServer extends IChunkProvider {
Chunk chunk = (Chunk) optional.get();
this.world.getMethodProfiler().enter("broadcast");
@ -420,7 +420,7 @@ index baf3bd461b..f351d021dc 100644
this.world.getMethodProfiler().exit();
ChunkCoordIntPair chunkcoordintpair = playerchunk.i();
@@ -441,9 +451,9 @@ public class ChunkProviderServer extends IChunkProvider {
@@ -449,9 +459,9 @@ public class ChunkProviderServer extends IChunkProvider {
this.world.getMethodProfiler().exit();
}
@ -432,7 +432,7 @@ index baf3bd461b..f351d021dc 100644
}
}
});
@@ -456,9 +466,7 @@ public class ChunkProviderServer extends IChunkProvider {
@@ -464,9 +474,7 @@ public class ChunkProviderServer extends IChunkProvider {
this.world.getMethodProfiler().exit();
}
@ -521,7 +521,7 @@ index 53735b52a3..721839b4c6 100644
int j = 0;
CustomFunction.c[] acustomfunction_c = customfunction.b();
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 5e0797afde..f572cd8fc7 100644
index e6cf90484c..ce3ca4830e 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -19,6 +19,8 @@ import java.util.Collections;
@ -542,7 +542,7 @@ index 5e0797afde..f572cd8fc7 100644
import org.bukkit.event.server.ServerCommandEvent;
import org.bukkit.craftbukkit.util.Waitable;
import org.bukkit.event.server.RemoteServerCommandEvent;
@@ -428,7 +430,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -425,7 +427,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
}
public void handleCommandQueue() {
@ -551,7 +551,7 @@ index 5e0797afde..f572cd8fc7 100644
while (!this.serverCommandQueue.isEmpty()) {
ServerCommand servercommand = (ServerCommand) this.serverCommandQueue.remove(0);
@@ -443,7 +445,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -440,7 +442,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
// CraftBukkit end
}
@ -560,7 +560,7 @@ index 5e0797afde..f572cd8fc7 100644
}
@Override
@@ -669,6 +671,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -666,6 +668,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@Override
public String executeRemoteCommand(String s) {
@ -568,7 +568,7 @@ index 5e0797afde..f572cd8fc7 100644
this.remoteControlCommandListener.clearMessages();
this.executeSync(() -> {
// CraftBukkit start - fire RemoteServerCommandEvent
@@ -677,10 +680,39 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -674,10 +677,39 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
if (event.isCancelled()) {
return;
}
@ -648,7 +648,7 @@ index d4954801cb..fd4712c710 100644
protected Vec3D a(Vec3D vec3d, EnumMoveType enummovetype) {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index dcbc4ea7e1..b1f130f91d 100644
index 2b13f4c9f9..47379046dc 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -35,7 +35,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
@ -660,7 +660,7 @@ index dcbc4ea7e1..b1f130f91d 100644
public abstract class EntityLiving extends Entity {
@@ -2214,7 +2214,6 @@ public abstract class EntityLiving extends Entity {
@@ -2215,7 +2215,6 @@ public abstract class EntityLiving extends Entity {
@Override
public void tick() {
@ -668,7 +668,7 @@ index dcbc4ea7e1..b1f130f91d 100644
super.tick();
this.o();
this.p();
@@ -2289,9 +2288,7 @@ public abstract class EntityLiving extends Entity {
@@ -2290,9 +2289,7 @@ public abstract class EntityLiving extends Entity {
}
}
@ -678,7 +678,7 @@ index dcbc4ea7e1..b1f130f91d 100644
double d0 = this.locX - this.lastX;
double d1 = this.locZ - this.lastZ;
float f = (float) (d0 * d0 + d1 * d1);
@@ -2371,8 +2368,6 @@ public abstract class EntityLiving extends Entity {
@@ -2372,8 +2369,6 @@ public abstract class EntityLiving extends Entity {
if (this.isSleeping()) {
this.pitch = 0.0F;
}
@ -687,7 +687,7 @@ index dcbc4ea7e1..b1f130f91d 100644
}
protected float e(float f, float f1) {
@@ -2446,7 +2441,6 @@ public abstract class EntityLiving extends Entity {
@@ -2447,7 +2442,6 @@ public abstract class EntityLiving extends Entity {
this.setMot(d4, d5, d6);
this.world.getMethodProfiler().enter("ai");
@ -695,7 +695,7 @@ index dcbc4ea7e1..b1f130f91d 100644
if (this.isFrozen()) {
this.jumping = false;
this.bb = 0.0F;
@@ -2457,7 +2451,6 @@ public abstract class EntityLiving extends Entity {
@@ -2458,7 +2452,6 @@ public abstract class EntityLiving extends Entity {
this.doTick();
this.world.getMethodProfiler().exit();
}
@ -703,7 +703,7 @@ index dcbc4ea7e1..b1f130f91d 100644
this.world.getMethodProfiler().exit();
this.world.getMethodProfiler().enter("jump");
@@ -2482,9 +2475,7 @@ public abstract class EntityLiving extends Entity {
@@ -2483,9 +2476,7 @@ public abstract class EntityLiving extends Entity {
this.n();
AxisAlignedBB axisalignedbb = this.getBoundingBox();
@ -713,7 +713,7 @@ index dcbc4ea7e1..b1f130f91d 100644
this.world.getMethodProfiler().exit();
this.world.getMethodProfiler().enter("push");
if (this.bq > 0) {
@@ -2492,9 +2483,7 @@ public abstract class EntityLiving extends Entity {
@@ -2493,9 +2484,7 @@ public abstract class EntityLiving extends Entity {
this.a(axisalignedbb, this.getBoundingBox());
}
@ -724,7 +724,7 @@ index dcbc4ea7e1..b1f130f91d 100644
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 1701d39eab..d9eb5ce085 100644
index cec3794cd4..bc0e483a2a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -63,7 +63,7 @@ import org.bukkit.craftbukkit.CraftServer;
@ -736,7 +736,7 @@ index 1701d39eab..d9eb5ce085 100644
import org.spigotmc.SlackActivityAccountant; // Spigot
public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTask> implements IMojangStatistics, ICommandListener, AutoCloseable, Runnable {
@@ -684,6 +684,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -685,6 +685,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
// CraftBukkit end
MinecraftServer.LOGGER.info("Stopping server");
@ -744,7 +744,7 @@ index 1701d39eab..d9eb5ce085 100644
// CraftBukkit start
if (this.server != null) {
this.server.disablePlugins();
@@ -881,7 +882,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -882,7 +883,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
// CraftBukkit end
protected void sleepForTick() {
@ -753,7 +753,7 @@ index 1701d39eab..d9eb5ce085 100644
this.awaitTasks(() -> {
return !this.canSleepForTick();
});
@@ -961,7 +962,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -962,7 +963,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
protected void exit() {}
protected void a(BooleanSupplier booleansupplier) {
@ -762,7 +762,7 @@ index 1701d39eab..d9eb5ce085 100644
this.slackActivityAccountant.tickStarted(); // Spigot
long i = SystemUtils.getMonotonicNanos();
@@ -982,14 +983,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -983,14 +984,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit
@ -777,7 +777,7 @@ index 1701d39eab..d9eb5ce085 100644
}
this.methodProfiler.enter("snooper");
@@ -1012,30 +1011,34 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1013,30 +1012,34 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.methodProfiler.exit();
org.spigotmc.WatchdogThread.tick(); // Spigot
this.slackActivityAccountant.tickEnded(l); // Spigot
@ -821,7 +821,7 @@ index 1701d39eab..d9eb5ce085 100644
// Send time updates to everyone, it will get the right time from the world the player is in.
if (this.ticks % 20 == 0) {
for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
@@ -1043,7 +1046,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1044,7 +1047,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
entityplayer.playerConnection.sendPacket(new PacketPlayOutUpdateTime(entityplayer.world.getTime(), entityplayer.getPlayerTime(), entityplayer.world.getGameRules().getBoolean(GameRules.DO_DAYLIGHT_CYCLE))); // Add support for per player time
}
}
@ -830,7 +830,7 @@ index 1701d39eab..d9eb5ce085 100644
while (iterator.hasNext()) {
WorldServer worldserver = (WorldServer) iterator.next();
@@ -1086,20 +1089,20 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1087,20 +1090,20 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
this.methodProfiler.exitEnter("connection");
@ -1294,10 +1294,10 @@ index 825e72e53a..a28c97a889 100644
// CraftBukkit start - moved from MinecraftServer.saveChunks
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 2fd73f4835..6de0b6e5da 100644
index dce5bde54f..a59f61e73a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1931,12 +1931,31 @@ public final class CraftServer implements Server {
@@ -1932,12 +1932,31 @@ public final class CraftServer implements Server {
private final Spigot spigot = new Spigot()
{

Datei anzeigen

@ -1,4 +1,4 @@
From af9adce4d92c26640b7c018c32287af165d9091f Mon Sep 17 00:00:00 2001
From 6ef37bf7c16af47d5f1f2e0f99d5a3243593ed28 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 14:32:43 -0600
Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
@ -19,10 +19,10 @@ index 3f35a28ba1..cf00f35a5b 100644
throwable = throwable1;
throw throwable1;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index d9eb5ce085..15c6818f10 100644
index bc0e483a2a..d7c0006605 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1300,7 +1300,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1301,7 +1301,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
public String getServerModName() {
@ -32,7 +32,7 @@ index d9eb5ce085..15c6818f10 100644
public CrashReport b(CrashReport crashreport) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 6de0b6e5da..e72faeaa3b 100644
index a59f61e73a..f49bd144ff 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -196,7 +196,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;

Datei anzeigen

@ -1,4 +1,4 @@
From 88ad52a8150b3e8dbfc84307364cfc13827a6a99 Mon Sep 17 00:00:00 2001
From eff79b832f995fb9394e5d7a749db0fbde4999fb Mon Sep 17 00:00:00 2001
From: Kyle Wood <demonwav@gmail.com>
Date: Thu, 1 Mar 2018 19:37:52 -0600
Subject: [PATCH] Add version history to version command
@ -192,10 +192,10 @@ index 0000000000..aac3f66cb2
+ }
+}
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index c7ea4ec4fe..6e1509c2c1 100644
index ce3ca4830e..895049287c 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -162,6 +162,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -172,6 +172,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
return false;
}
com.destroystokyo.paper.PaperConfig.registerCommands();

Datei anzeigen

@ -1,11 +1,11 @@
From f330251e5134f41873289563ce02eb5c70499ce7 Mon Sep 17 00:00:00 2001
From cc69a9a63cd4b9e2e5248acd36fa6f8117868852 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 8 Mar 2015 22:55:25 -0600
Subject: [PATCH] Optimize TileEntity Ticking
diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java
index ffaf16cff8..387e366130 100644
index ffaf16cff8..6b94826536 100644
--- a/src/main/java/net/minecraft/server/TileEntityChest.java
+++ b/src/main/java/net/minecraft/server/TileEntityChest.java
@@ -7,7 +7,7 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity;
@ -17,7 +17,7 @@ index ffaf16cff8..387e366130 100644
private NonNullList<ItemStack> items;
protected float a;
@@ -101,13 +101,19 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
@@ -101,22 +101,31 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
return nbttagcompound;
}
@ -28,6 +28,7 @@ index ffaf16cff8..387e366130 100644
int k = this.position.getZ();
++this.j;
- this.viewingCount = a(this.world, this, this.j, i, j, k, this.viewingCount);
+ }
+
+ public void doOpenLogic() {
@ -35,10 +36,10 @@ index ffaf16cff8..387e366130 100644
+ int j = this.position.getY();
+ int k = this.position.getZ();
+
this.viewingCount = a(this.world, this, this.j, i, j, k, this.viewingCount);
+ //this.viewingCount = a(this.world, this, this.j, i, j, k, this.viewingCount); // Paper - check is faulty given our logic is called before active container set
this.b = this.a;
float f = 0.1F;
@@ -115,8 +121,11 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
if (this.viewingCount > 0 && this.a == 0.0F) {
this.a(SoundEffects.BLOCK_CHEST_OPEN);
}

Datei anzeigen

@ -1,4 +1,4 @@
From 3a06c1c75bebcf36bb3d8ea4553d07efb2eba026 Mon Sep 17 00:00:00 2001
From bb298197fb834218d8cd16207a2cbd0b75718392 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 1 Mar 2016 23:09:29 -0600
Subject: [PATCH] Further improve server tick loop
@ -12,7 +12,7 @@ Previous implementation did not calculate TPS correctly.
Switch to a realistic rolling average and factor in std deviation as an extra reporting variable
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index cec120cf2..7bb83014b 100644
index d7c0006605..6594138f35 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -157,7 +157,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -33,7 +33,7 @@ index cec120cf2..7bb83014b 100644
public final double[] recentTps = new double[ 3 ];
public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant();
// Spigot end
@@ -768,6 +768,57 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -769,6 +769,57 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
{
return ( avg * exp ) + ( tps * ( 1 - exp ) );
}
@ -91,7 +91,7 @@ index cec120cf2..7bb83014b 100644
// Spigot End
public void run() {
@@ -780,30 +831,38 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -781,30 +832,38 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
// Spigot start
Arrays.fill( recentTps, 20 );
@ -140,10 +140,10 @@ index cec120cf2..7bb83014b 100644
if (this.T) {
this.T = false;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index e72faeaa3..688ab8ccf 100644
index f49bd144ff..6446f68b67 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1928,6 +1928,17 @@ public final class CraftServer implements Server {
@@ -1929,6 +1929,17 @@ public final class CraftServer implements Server {
return CraftMagicNumbers.INSTANCE;
}
@ -162,7 +162,7 @@ index e72faeaa3..688ab8ccf 100644
{
diff --git a/src/main/java/org/spigotmc/TicksPerSecondCommand.java b/src/main/java/org/spigotmc/TicksPerSecondCommand.java
index be2e31dea..6d21c3269 100644
index be2e31deae..6d21c32692 100644
--- a/src/main/java/org/spigotmc/TicksPerSecondCommand.java
+++ b/src/main/java/org/spigotmc/TicksPerSecondCommand.java
@@ -1,8 +1,5 @@

Datei anzeigen

@ -1,4 +1,4 @@
From 007df3f67953da4b9df15a5b6b6c7486d9dc5a80 Mon Sep 17 00:00:00 2001
From 2aab0c3c063b1d75f7d802c8daa63ae29e88a110 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 11:59:48 -0600
Subject: [PATCH] Optimize explosions
@ -123,10 +123,10 @@ index cdd8939504..bd6a0bd16b 100644
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index a7b8567ec5..980284c3e9 100644
index 6594138f35..55d10058f5 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1144,6 +1144,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1145,6 +1145,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.methodProfiler.exit();
this.methodProfiler.exit();

Datei anzeigen

@ -1,14 +1,14 @@
From 9ca00dd6798f265f139cc7671135ae9c3ce5a9f6 Mon Sep 17 00:00:00 2001
From 538ced5fe40748ce53726acf37c6434946c2b531 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Thu, 3 Mar 2016 02:15:57 -0600
Subject: [PATCH] Expose server CommandMap
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 58428bfbf7..84cb33c317 100644
index 145178ebc0..a21067c279 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1587,6 +1587,7 @@ public final class CraftServer implements Server {
@@ -1588,6 +1588,7 @@ public final class CraftServer implements Server {
return helpMap;
}

Datei anzeigen

@ -1,4 +1,4 @@
From cf75b4463e247e36daca0616d92949435ca35c66 Mon Sep 17 00:00:00 2001
From f2305fbc79aca7ff5edca26550381010447e8b93 Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 03:15:41 -0600
Subject: [PATCH] Add exception reporting event
@ -80,7 +80,7 @@ index 46635a5308..6c13ae3bae 100644
}
}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 25e0163c60..4e60de0b6e 100644
index e51e3b74cc..0ce2d6d0fb 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -15,6 +15,9 @@ import java.util.function.BooleanSupplier;
@ -121,7 +121,7 @@ index 2cb0962ff1..21a8ed3231 100644
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index e2ab4b1bfb..14b0875eee 100644
index 89694d3faf..7a681bda7c 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -681,6 +681,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@ -141,7 +141,7 @@ index e2ab4b1bfb..14b0875eee 100644
}
}
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
index d4a9af975d..88b5aa3a51 100644
index 8b17dde509..d6cecfc09b 100644
--- a/src/main/java/net/minecraft/server/RegionFile.java
+++ b/src/main/java/net/minecraft/server/RegionFile.java
@@ -1,5 +1,6 @@
@ -159,8 +159,8 @@ index d4a9af975d..88b5aa3a51 100644
return null;
}
}
@@ -252,6 +254,7 @@ public class RegionFile implements AutoCloseable {
this.b(chunkcoordintpair, (int) (SystemUtils.getTimeMillis() / 1000L));
@@ -262,6 +264,7 @@ public class RegionFile implements AutoCloseable {
// this.b(chunkcoordintpair, (int) (SystemUtils.getTimeMillis() / 1000L)); // Spigot - move this into writeChunk
} catch (IOException ioexception) {
ioexception.printStackTrace();
+ ServerInternalException.reportInternalException(ioexception); // Paper

Datei anzeigen

@ -1,4 +1,4 @@
From 73bc13803b289003e2a94fdc929696f601d6bd33 Mon Sep 17 00:00:00 2001
From 6951163f41c48961ff495eadbc07949a8ae88979 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 4 Mar 2013 23:46:10 -0500
Subject: [PATCH] Chunk Save Reattempt
@ -6,12 +6,12 @@ Subject: [PATCH] Chunk Save Reattempt
We commonly have "Stream Closed" errors on chunk saving, so this code should re-try to save the chunk in the event of failure and hopefully prevent rollbacks.
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
index 88b5aa3a51..b062a31c49 100644
index d6cecfc09b..fb529eac91 100644
--- a/src/main/java/net/minecraft/server/RegionFile.java
+++ b/src/main/java/net/minecraft/server/RegionFile.java
@@ -253,8 +253,7 @@ public class RegionFile implements AutoCloseable {
@@ -263,8 +263,7 @@ public class RegionFile implements AutoCloseable {
this.b(chunkcoordintpair, (int) (SystemUtils.getTimeMillis() / 1000L));
// this.b(chunkcoordintpair, (int) (SystemUtils.getTimeMillis() / 1000L)); // Spigot - move this into writeChunk
} catch (IOException ioexception) {
- ioexception.printStackTrace();
- ServerInternalException.reportInternalException(ioexception); // Paper

Datei anzeigen

@ -1,4 +1,4 @@
From dbb22dc1a9bfe5505d64cc586fda7ec2ee362d19 Mon Sep 17 00:00:00 2001
From e4a631c318c73bc88e050bf30fb9175776e1d5c0 Mon Sep 17 00:00:00 2001
From: William <admin@domnian.com>
Date: Fri, 18 Mar 2016 03:30:17 -0400
Subject: [PATCH] Allow Reloading of Custom Permissions
@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Custom Permissions
https://github.com/PaperMC/Paper/issues/49
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index adcb6fd1f3..20bd804bce 100644
index 4a43da08a5..8b8e85b711 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2047,5 +2047,23 @@ public final class CraftServer implements Server {
@@ -2048,5 +2048,23 @@ public final class CraftServer implements Server {
return null;
}
}

Datei anzeigen

@ -1,4 +1,4 @@
From aca6f8a1376268c04f3c40395342b898ff07377d Mon Sep 17 00:00:00 2001
From 6fe36de0f7fe5dcb63bfb2f004a97256243b1829 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 28 May 2015 23:00:19 -0400
Subject: [PATCH] Handle Item Meta Inconsistencies
@ -18,7 +18,7 @@ For consistency, the old API methods now forward to use the
ItemMeta API equivalents, and should deprecate the old API's.
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index 7bcc72399..5bc078d31 100644
index 9ebfbff46b..b1dfd64d15 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -7,6 +7,8 @@ import com.mojang.brigadier.StringReader;
@ -78,7 +78,7 @@ index 7bcc72399..5bc078d31 100644
public boolean hasEnchantments() {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index c04ec4a7c..c45fe35e0 100644
index c04ec4a7cb..c45fe35e03 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -178,28 +178,11 @@ public final class CraftItemStack extends ItemStack {
@ -193,7 +193,7 @@ index c04ec4a7c..c45fe35e0 100644
static Map<Enchantment, Integer> getEnchantments(net.minecraft.server.ItemStack item) {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 4f1834014..b0682e529 100644
index de54a67a2a..084c958899 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -6,6 +6,7 @@ import com.google.common.collect.HashMultimap;
@ -296,7 +296,7 @@ index 4f1834014..b0682e529 100644
}
if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) {
@@ -1197,7 +1200,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1200,7 +1203,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
clone.customModelData = this.customModelData;
clone.blockData = this.blockData;
if (this.enchantments != null) {
@ -305,7 +305,7 @@ index 4f1834014..b0682e529 100644
}
if (this.hasAttributeModifiers()) {
clone.attributeModifiers = HashMultimap.create(this.attributeModifiers);
@@ -1425,6 +1428,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1428,6 +1431,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
}
}

Datei anzeigen

@ -1,14 +1,14 @@
From f77b9c5b4e36960ad5e5abb91bb4ddd2d271a65a Mon Sep 17 00:00:00 2001
From 86eb3bc68d65c0bb4cd7005648825ece1e7239a8 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sun, 21 Jun 2015 15:07:20 -0400
Subject: [PATCH] Custom replacement for eaten items
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index acd6a3f142..f32408b3b5 100644
index c335a20fa9..adacb1847c 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2817,12 +2817,13 @@ public abstract class EntityLiving extends Entity {
@@ -2818,12 +2818,13 @@ public abstract class EntityLiving extends Entity {
protected void q() {
if (!this.activeItem.isEmpty() && this.isHandRaised()) {
@ -23,7 +23,7 @@ index acd6a3f142..f32408b3b5 100644
world.getServer().getPluginManager().callEvent(event);
if (event.isCancelled()) {
@@ -2837,9 +2838,20 @@ public abstract class EntityLiving extends Entity {
@@ -2838,9 +2839,20 @@ public abstract class EntityLiving extends Entity {
itemstack = this.activeItem.a(this.world, this);
}

Datei anzeigen

@ -1,11 +1,11 @@
From 37a4d63b60bde00f515935ca5b79e9fb60c4527f Mon Sep 17 00:00:00 2001
From a4600ef6c1900a74208033a6768d2f829096b2b8 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 27 Sep 2015 01:18:02 -0400
Subject: [PATCH] handle NaN health/absorb values and repair bad data
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 645b7f605c..18e152b8fb 100644
index adacb1847c..217fd0c2dd 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -543,7 +543,13 @@ public abstract class EntityLiving extends Entity {
@ -34,7 +34,7 @@ index 645b7f605c..18e152b8fb 100644
// CraftBukkit start - Handle scaled health
if (this instanceof EntityPlayer) {
org.bukkit.craftbukkit.entity.CraftPlayer player = ((EntityPlayer) this).getBukkitEntity();
@@ -2675,7 +2685,7 @@ public abstract class EntityLiving extends Entity {
@@ -2676,7 +2686,7 @@ public abstract class EntityLiving extends Entity {
}
public void setAbsorptionHearts(float f) {
@ -44,7 +44,7 @@ index 645b7f605c..18e152b8fb 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 2e0621b889..d0d61fd290 100644
index b6a93c4f4c..427f392f9a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1574,6 +1574,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

Datei anzeigen

@ -1,4 +1,4 @@
From 9bbb2d0782475e8049ba823fc4e5432d6f47a12b Mon Sep 17 00:00:00 2001
From 73e6613f2094496f99ac2c93ca84523bfee82c9f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 19:55:45 -0400
Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener
@ -32,10 +32,10 @@ index ef392f5fe8..227fe073fd 100644
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 980284c3e9..0740737672 100644
index 55d10058f5..fe50d4ff71 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1110,6 +1110,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1111,6 +1111,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
while (iterator.hasNext()) {
WorldServer worldserver = (WorldServer) iterator.next();

Datei anzeigen

@ -1,22 +1,22 @@
From 4ead0796d388d19e14fc45a702d0570797808c03 Mon Sep 17 00:00:00 2001
From 74d31b94b3c55fb528d39b03051961a31e3b4e4b Mon Sep 17 00:00:00 2001
From: Antony Riley <antony@cyberiantiger.org>
Date: Tue, 29 Mar 2016 06:56:23 +0300
Subject: [PATCH] Reduce IO ops opening a new region file.
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
index b062a31c49..4e6288e8bb 100644
index fb529eac91..3aeac69c26 100644
--- a/src/main/java/net/minecraft/server/RegionFile.java
+++ b/src/main/java/net/minecraft/server/RegionFile.java
@@ -26,7 +26,7 @@ public class RegionFile implements AutoCloseable {
private final File file;
// Spigot end
private static final byte[] a = new byte[4096];
- private final RandomAccessFile b;
+ private final RandomAccessFile b; private RandomAccessFile getDataFile() { return this.b; } // Paper - OBFHELPER
- private final RandomAccessFile b; // PAIL dataFile
+ private final RandomAccessFile b; private RandomAccessFile getDataFile() { return this.b; } // Paper - OBFHELPER // PAIL dataFile
private final int[] c = new int[1024];
private final int[] d = new int[1024];
private final List<Boolean> e;
private final List<Boolean> e; // PAIL freeSectors
@@ -59,10 +59,19 @@ public class RegionFile implements AutoCloseable {
this.e.set(1, false);
this.b.seek(0L);

Datei anzeigen

@ -1,4 +1,4 @@
From c37becf719c64b0f3313627c7d9e6ee6be8fccd3 Mon Sep 17 00:00:00 2001
From ad70f23c1ea684f7771bb2b748da2103093c3711 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 13 Apr 2016 02:10:49 -0400
Subject: [PATCH] Configurable Player Collision
@ -19,7 +19,7 @@ index 0cef1853f5..dc3438890b 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 1cbb8b1ef7..257258c189 100644
index fe50d4ff71..e3bd80c934 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -446,6 +446,20 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -42,7 +42,7 @@ index 1cbb8b1ef7..257258c189 100644
+
this.server.enablePlugins(org.bukkit.plugin.PluginLoadOrder.POSTWORLD);
this.server.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.STARTUP));
// CraftBukkit end
this.serverConnection.acceptConnections();
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java b/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java
index b0740965a4..6b1a914d2f 100644
--- a/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java

Datei anzeigen

@ -1,4 +1,4 @@
From 84a97a765c6b7e047e6fddd62e3c6036caea4f1b Mon Sep 17 00:00:00 2001
From 5abf16f7dce2b01baec6c3435941df78b58fc9af Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 28 Apr 2016 00:57:27 -0400
Subject: [PATCH] remove null possibility for getServer singleton
@ -6,7 +6,7 @@ Subject: [PATCH] remove null possibility for getServer singleton
to stop IDE complaining about potential NPE
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 815b8dc243..5a04e6d72e 100644
index e3bd80c934..17b9e9a31d 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -68,6 +68,7 @@ import org.spigotmc.SlackActivityAccountant; // Spigot
@ -25,7 +25,7 @@ index 815b8dc243..5a04e6d72e 100644
this.resourcePackRepository = new ResourcePackRepository<>(ResourcePackLoader::new);
this.ai = new CraftingManager();
this.aj = new TagRegistry();
@@ -2122,7 +2124,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -2123,7 +2125,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@Deprecated
public static MinecraftServer getServer() {

Datei anzeigen

@ -1,4 +1,4 @@
From dbf172874d23bea013db9a87fec778d833ee3f12 Mon Sep 17 00:00:00 2001
From 87f6d99f3b919bc730e3f98ec6243fafa015479d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 16 May 2016 20:47:41 -0400
Subject: [PATCH] Optimize UserCache / Thread Safe
@ -10,10 +10,10 @@ Additionally, move Saving of the User cache to be done async, incase
the user never changed the default setting for Spigot's save on stop only.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 9562fde4c..842116da7 100644
index 17b9e9a31d..6a2933f4ff 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -750,7 +750,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -751,7 +751,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
// Spigot start
if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) {
LOGGER.info("Saving usercache.json");
@ -23,7 +23,7 @@ index 9562fde4c..842116da7 100644
// Spigot end
}
diff --git a/src/main/java/net/minecraft/server/UserCache.java b/src/main/java/net/minecraft/server/UserCache.java
index 57d053e9f..ea0256755 100644
index 57d053e9ff..ea02567554 100644
--- a/src/main/java/net/minecraft/server/UserCache.java
+++ b/src/main/java/net/minecraft/server/UserCache.java
@@ -43,8 +43,8 @@ public class UserCache {

Datei anzeigen

@ -1,4 +1,4 @@
From 568f1455637b9a8c6eabd0f1bab621884689c23b Mon Sep 17 00:00:00 2001
From e31be59b829cb42dc3f9ea5f6143275dcd8ed1e2 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 16 May 2016 23:19:16 -0400
Subject: [PATCH] Avoid blocking on Network Manager creation
@ -6,7 +6,7 @@ Subject: [PATCH] Avoid blocking on Network Manager creation
Per Paper issue 294
diff --git a/src/main/java/net/minecraft/server/ServerConnection.java b/src/main/java/net/minecraft/server/ServerConnection.java
index 42c654a1d..e7ed6af9c 100644
index 7de96ae69d..379c79272b 100644
--- a/src/main/java/net/minecraft/server/ServerConnection.java
+++ b/src/main/java/net/minecraft/server/ServerConnection.java
@@ -39,6 +39,15 @@ public class ServerConnection {
@ -34,7 +34,7 @@ index 42c654a1d..e7ed6af9c 100644
channel.pipeline().addLast("packet_handler", networkmanager);
networkmanager.setPacketListener(new HandshakeListener(ServerConnection.this.e, networkmanager));
}
@@ -102,6 +111,7 @@ public class ServerConnection {
@@ -112,6 +121,7 @@ public class ServerConnection {
synchronized (this.g) {
// Spigot Start

Datei anzeigen

@ -1,11 +1,11 @@
From 034805841cca15ab64c5afcd20a1b40847100b57 Mon Sep 17 00:00:00 2001
From 8076467ee1a1540dbc421f8aa8f049cb4e36fbac Mon Sep 17 00:00:00 2001
From: Gabriele C <sgdc3.mail@gmail.com>
Date: Fri, 5 Aug 2016 01:03:08 +0200
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 cbfe12734..1daa2e453 100644
index cbfe12734d..1daa2e4535 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;
@ -31,7 +31,7 @@ index cbfe12734..1daa2e453 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
index 21a8ed323..0794aff5b 100644
index 21a8ed3231..0794aff5b7 100644
--- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
+++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
@@ -58,7 +58,8 @@ public class NameReferencingFileConverter {
@ -45,10 +45,10 @@ index 21a8ed323..0794aff5b 100644
} else {
String[] astring1 = astring;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index facd9c8ad..0d9e98914 100644
index 6f6b0bea39..893d3e5c4c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1357,7 +1357,8 @@ public final class CraftServer implements Server {
@@ -1358,7 +1358,8 @@ public final class CraftServer implements Server {
// Spigot Start
GameProfile profile = null;
// Only fetch an online UUID in online mode

Datei anzeigen

@ -1,4 +1,4 @@
From 5c80b1af654f2ab86eac1b897c4436a67cdc693e Mon Sep 17 00:00:00 2001
From 194c189b347a96b95a782873d42e50a6fd2c4f49 Mon Sep 17 00:00:00 2001
From: willies952002 <admin@domnian.com>
Date: Mon, 28 Nov 2016 10:21:52 -0500
Subject: [PATCH] Allow Reloading of Command Aliases
@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Command Aliases
Reload the aliases stored in commands.yml
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 0d9e98914..9b4e957d6 100644
index 893d3e5c4c..ca6158dc73 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2076,5 +2076,24 @@ public final class CraftServer implements Server {
@@ -2077,5 +2077,24 @@ public final class CraftServer implements Server {
DefaultPermissions.registerCorePermissions();
CraftDefaultPermissions.registerCorePermissions();
}

Datei anzeigen

@ -1,11 +1,11 @@
From 8278f3309ebe8c14615c79687585125ae81dd34a Mon Sep 17 00:00:00 2001
From 5cc70c7a81386cc66cead409e9f0e90d4ccd07af Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 28 Dec 2016 07:18:33 +0100
Subject: [PATCH] Firework API's
diff --git a/src/main/java/net/minecraft/server/EntityFireworks.java b/src/main/java/net/minecraft/server/EntityFireworks.java
index 020562cd3..aaae9b376 100644
index fd3897c056..3cf3b1c174 100644
--- a/src/main/java/net/minecraft/server/EntityFireworks.java
+++ b/src/main/java/net/minecraft/server/EntityFireworks.java
@@ -3,6 +3,8 @@ package net.minecraft.server;
@ -18,7 +18,7 @@ index 020562cd3..aaae9b376 100644
public class EntityFireworks extends Entity implements IProjectile {
@@ -12,7 +14,8 @@ public class EntityFireworks extends Entity implements IProjectile {
private static final DataWatcherObject<Boolean> d = DataWatcher.a(EntityFireworks.class, DataWatcherRegistry.i);
public static final DataWatcherObject<Boolean> d = DataWatcher.a(EntityFireworks.class, DataWatcherRegistry.i); // PAIL
private int ticksFlown;
public int expectedLifespan;
- private EntityLiving ridingEntity;
@ -27,7 +27,7 @@ index 020562cd3..aaae9b376 100644
public EntityFireworks(EntityTypes<? extends EntityFireworks> entitytypes, World world) {
super(entitytypes, world);
@@ -255,6 +258,11 @@ public class EntityFireworks extends Entity implements IProjectile {
@@ -263,6 +266,11 @@ public class EntityFireworks extends Entity implements IProjectile {
}
nbttagcompound.setBoolean("ShotAtAngle", (Boolean) this.datawatcher.get(EntityFireworks.d));
@ -39,7 +39,7 @@ index 020562cd3..aaae9b376 100644
}
@Override
@@ -270,7 +278,11 @@ public class EntityFireworks extends Entity implements IProjectile {
@@ -278,7 +286,11 @@ public class EntityFireworks extends Entity implements IProjectile {
if (nbttagcompound.hasKey("ShotAtAngle")) {
this.datawatcher.set(EntityFireworks.d, nbttagcompound.getBoolean("ShotAtAngle"));
}
@ -53,7 +53,7 @@ index 020562cd3..aaae9b376 100644
@Override
diff --git a/src/main/java/net/minecraft/server/ItemCrossbow.java b/src/main/java/net/minecraft/server/ItemCrossbow.java
index 28d7fdeef..874d9f500 100644
index 28d7fdeef8..874d9f500e 100644
--- a/src/main/java/net/minecraft/server/ItemCrossbow.java
+++ b/src/main/java/net/minecraft/server/ItemCrossbow.java
@@ -199,6 +199,7 @@ public class ItemCrossbow extends ItemProjectileWeapon {
@ -65,7 +65,7 @@ index 28d7fdeef..874d9f500 100644
object = a(world, entityliving, itemstack, itemstack1);
if (flag || f3 != 0.0F) {
diff --git a/src/main/java/net/minecraft/server/ItemFireworks.java b/src/main/java/net/minecraft/server/ItemFireworks.java
index 37caa79cb..aea46ffae 100644
index 37caa79cba..aea46ffae5 100644
--- a/src/main/java/net/minecraft/server/ItemFireworks.java
+++ b/src/main/java/net/minecraft/server/ItemFireworks.java
@@ -17,6 +17,7 @@ public class ItemFireworks extends Item {
@ -90,7 +90,7 @@ index 37caa79cb..aea46ffae 100644
itemstack.subtract(1);
}
diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java
index 3f6d2676e..b1fd18151 100644
index 3f6d2676e7..b1fd18151b 100644
--- a/src/main/java/net/minecraft/server/NBTTagCompound.java
+++ b/src/main/java/net/minecraft/server/NBTTagCompound.java
@@ -112,7 +112,7 @@ public class NBTTagCompound implements NBTBase {
@ -103,7 +103,7 @@ index 3f6d2676e..b1fd18151 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
index 6b69be742..37374ae5b 100644
index d3cbad9a5c..219a1e4c0d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
@@ -2,6 +2,7 @@ package org.bukkit.craftbukkit.entity;
@ -126,13 +126,12 @@ index 6b69be742..37374ae5b 100644
public class CraftFirework extends CraftEntity implements Firework {
private final Random random = new Random();
@@ -68,4 +72,18 @@ public class CraftFirework extends CraftEntity implements Firework {
public void detonate() {
getHandle().expectedLifespan = 0;
@@ -78,4 +82,17 @@ public class CraftFirework extends CraftEntity implements Firework {
public void setShotAtAngle(boolean shotAtAngle) {
getHandle().getDataWatcher().set(EntityFireworks.d, shotAtAngle);
}
+
+ // Paper start
+
+ @Override
+ public UUID getSpawningEntity() {
+ return getHandle().spawningEntity;
@ -146,5 +145,5 @@ index 6b69be742..37374ae5b 100644
+ // Paper end
}
--
2.22.0.windows.1
2.22.0

Datei anzeigen

@ -1,4 +1,4 @@
From b40164fbd816aa8ff20c8416815fc9d49ad83204 Mon Sep 17 00:00:00 2001
From 99aef69d63d3a44c6b7fcb9a5cbe573b0826402c Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 22 Jan 2017 18:07:56 -0500
Subject: [PATCH] Cap Entity Collisions
@ -39,10 +39,10 @@ index f4188fc75d..482864ac62 100644
// Spigot end
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index c5e671961b..96bed03b15 100644
index 6ba5e98400..79edb3b3cb 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2559,8 +2559,11 @@ public abstract class EntityLiving extends Entity {
@@ -2560,8 +2560,11 @@ public abstract class EntityLiving extends Entity {
}
}

Datei anzeigen

@ -1,4 +1,4 @@
From 22fe020e25d7e0ad7e8d2974617403a6cfe1d20b Mon Sep 17 00:00:00 2001
From 7dc83c0fff37f349a9d529e535df8226404a49b2 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Fri, 12 May 2017 23:34:11 -0500
Subject: [PATCH] Properly handle async calls to restart the server
@ -30,7 +30,7 @@ will have plugins and worlds saving to the disk has a high potential to result
in corruption/dataloss.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 842116da7..7f6c3d4f6 100644
index 6a2933f4ff..f621350ea6 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -88,6 +88,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -41,7 +41,7 @@ index 842116da7..7f6c3d4f6 100644
private boolean isStopped;
private int ticks;
protected final Proxy proxy;
@@ -713,7 +714,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -714,7 +715,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
if (this.playerList != null) {
MinecraftServer.LOGGER.info("Saving players");
this.playerList.savePlayers();
@ -50,7 +50,7 @@ index 842116da7..7f6c3d4f6 100644
try { Thread.sleep(100); } catch (InterruptedException ex) {} // CraftBukkit - SPIGOT-625 - give server at least a chance to send packets
}
@@ -767,8 +768,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -768,8 +769,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
return this.isRunning;
}
@ -64,7 +64,7 @@ index 842116da7..7f6c3d4f6 100644
if (flag) {
try {
this.serverThread.join();
@@ -778,6 +784,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -779,6 +785,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
}
@ -73,7 +73,7 @@ index 842116da7..7f6c3d4f6 100644
// Spigot Start
private static double calcTps(double avg, double exp, double tps)
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index ccf8b7c70..d23e4e5e3 100644
index ccf8b7c707..d23e4e5e3d 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1041,10 +1041,15 @@ public abstract class PlayerList {
@ -102,7 +102,7 @@ index ccf8b7c70..d23e4e5e3 100644
// CraftBukkit start
public void sendMessage(IChatBaseComponent[] iChatBaseComponents) {
diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java
index ccea803f5..aefea3a9a 100644
index ccea803f58..aefea3a9a8 100644
--- a/src/main/java/org/spigotmc/RestartCommand.java
+++ b/src/main/java/org/spigotmc/RestartCommand.java
@@ -46,86 +46,134 @@ public class RestartCommand extends Command

Datei anzeigen

@ -1,4 +1,4 @@
From 41566122b7aea7361afaecd0032a395f3d193040 Mon Sep 17 00:00:00 2001
From 047c0fb7c02a50bdd6e251d0d179adf2210b76c4 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Fri, 9 Jun 2017 07:24:34 -0700
Subject: [PATCH] Add configuration option to prevent player names from being
@ -20,10 +20,10 @@ index b5a50afd24..11d2a1013b 100644
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 9ccf6a6891..f762ff1d2e 100644
index ca6158dc73..8e6f23d278 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2095,5 +2095,10 @@ public final class CraftServer implements Server {
@@ -2096,5 +2096,10 @@ public final class CraftServer implements Server {
commandMap.registerServerAliases();
return true;
}

Datei anzeigen

@ -1,4 +1,4 @@
From 1e4a0195e149cf0b657118531e001bacde3daeb7 Mon Sep 17 00:00:00 2001
From 0200910eb828793d2cec73d86c74afecef8c1fce Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Fri, 9 Jun 2017 19:03:43 +0200
Subject: [PATCH] Use TerminalConsoleAppender for console improvements
@ -143,7 +143,7 @@ index 0000000000..685deaa0e5
+
+}
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index f2c65e40a1..f8fa3f78e7 100644
index 895049287c..92d0aa6d66 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -85,6 +85,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@ -156,7 +156,7 @@ index f2c65e40a1..f8fa3f78e7 100644
jline.console.ConsoleReader bufferedreader = reader;
// CraftBukkit end
@@ -107,6 +110,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -117,6 +120,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
DedicatedServer.LOGGER.error("Exception handling console input", ioexception);
}
@ -165,7 +165,7 @@ index f2c65e40a1..f8fa3f78e7 100644
}
};
@@ -118,6 +123,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -128,6 +133,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
}
global.addHandler(new org.bukkit.craftbukkit.util.ForwardLogHandler());
@ -175,7 +175,7 @@ index f2c65e40a1..f8fa3f78e7 100644
final org.apache.logging.log4j.core.Logger logger = ((org.apache.logging.log4j.core.Logger) LogManager.getRootLogger());
for (org.apache.logging.log4j.core.Appender appender : logger.getAppenders().values()) {
if (appender instanceof org.apache.logging.log4j.core.appender.ConsoleAppender) {
@@ -126,6 +134,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -136,6 +144,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
}
new org.bukkit.craftbukkit.util.TerminalConsoleWriterThread(System.out, this.reader).start();
@ -185,7 +185,7 @@ index f2c65e40a1..f8fa3f78e7 100644
System.setOut(new PrintStream(new LoggerOutputStream(logger, Level.INFO), true));
System.setErr(new PrintStream(new LoggerOutputStream(logger, Level.WARN), true));
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 43319f1061..6c2b050da3 100644
index f621350ea6..8fcffc9fa3 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -57,7 +57,7 @@ import org.apache.commons.lang3.Validate;
@ -225,7 +225,7 @@ index 43319f1061..6c2b050da3 100644
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
}
// CraftBukkit end
@@ -941,7 +945,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -942,7 +946,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
} finally {
// CraftBukkit start - Restore terminal to original settings
try {
@ -234,7 +234,7 @@ index 43319f1061..6c2b050da3 100644
} catch (Exception ignored) {
}
// CraftBukkit end
@@ -1428,7 +1432,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1429,7 +1433,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@Override
public void sendMessage(IChatBaseComponent ichatbasecomponent) {
@ -258,7 +258,7 @@ index d23e4e5e3d..6a77707983 100644
this.k = new GameProfileBanList(PlayerList.a);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index f477f8943f..42e0f5ec86 100644
index 8e6f23d278..4c94e85e46 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -41,7 +41,6 @@ import java.util.function.Consumer;
@ -269,7 +269,7 @@ index f477f8943f..42e0f5ec86 100644
import net.minecraft.server.Advancement;
import net.minecraft.server.ArgumentEntity;
import net.minecraft.server.Block;
@@ -1092,9 +1091,13 @@ public final class CraftServer implements Server {
@@ -1093,9 +1092,13 @@ public final class CraftServer implements Server {
return logger;
}

Datei anzeigen

@ -1,4 +1,4 @@
From c8e8a8d3fd52fe0bc39c1d0cd5a0388183b97a9b Mon Sep 17 00:00:00 2001
From 0009ced384917a226d1a1694eab6b1d8f1241678 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 15 Jan 2018 22:11:48 -0500
Subject: [PATCH] Basic PlayerProfile API
@ -429,10 +429,10 @@ index 1f6a126329..6d278a0da5 100644
* Calculates distance between 2 entities
* @param e1
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 6c2b050da3..22d653cfcd 100644
index 8fcffc9fa3..32a9e54d0a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1259,7 +1259,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1260,7 +1260,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
DispenserRegistry.init();
DispenserRegistry.c();
String s = "."; // PAIL?
@ -441,7 +441,7 @@ index 6c2b050da3..22d653cfcd 100644
MinecraftSessionService minecraftsessionservice = yggdrasilauthenticationservice.createMinecraftSessionService();
GameProfileRepository gameprofilerepository = yggdrasilauthenticationservice.createProfileRepository();
UserCache usercache = new UserCache(gameprofilerepository, new File(s, MinecraftServer.b.getName()));
@@ -1719,6 +1719,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1720,6 +1720,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.H = i;
}
@ -486,7 +486,7 @@ index b0d883d493..1d4bf64b1b 100644
private UserCacheEntry(GameProfile gameprofile, Date date) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 90ce6e8fb2..ee622bcab5 100644
index f891b1346c..308ae2e157 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -196,6 +196,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
@ -499,7 +499,7 @@ index 90ce6e8fb2..ee622bcab5 100644
public final class CraftServer implements Server {
private final String serverName = "Paper"; // Paper
private final String serverVersion;
@@ -2111,5 +2114,24 @@ public final class CraftServer implements Server {
@@ -2112,5 +2115,24 @@ public final class CraftServer implements Server {
public boolean suggestPlayerNamesWhenNullTabCompletions() {
return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions;
}

Datei anzeigen

@ -1,4 +1,4 @@
From 6123d01c33d30f1f87f3760e6ecc70c1b67a4aa2 Mon Sep 17 00:00:00 2001
From 293d21b77ff488266b8137593bf35c8cb805ba94 Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Mon, 18 Sep 2017 12:00:03 +0200
Subject: [PATCH] Use Log4j IOStreams to redirect System.out/err to logger
@ -12,7 +12,7 @@ results in a separate line, even though it should not result in
a line break. Log4j's implementation handles it correctly.
diff --git a/pom.xml b/pom.xml
index 54d214a8cf..ea6fb01249 100644
index 58b14a740e..a70c0ec07a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -63,6 +63,11 @@
@ -28,10 +28,10 @@ index 54d214a8cf..ea6fb01249 100644
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index f8fa3f78e7..118d90242e 100644
index 92d0aa6d66..c6eb88c34b 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -137,8 +137,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -147,8 +147,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
*/
// Paper end

Datei anzeigen

@ -1,4 +1,4 @@
From 8e9be82d7e127ea31437f7c85c18273646a24ea6 Mon Sep 17 00:00:00 2001
From d6a94ec50d3adf4c4c7ed9c15c680b40bab4f77e Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Thu, 21 Sep 2017 16:14:55 +0200
Subject: [PATCH] Handle plugin prefixes using Log4J configuration
@ -15,7 +15,7 @@ This may cause additional prefixes to be disabled for plugins bypassing
the plugin logger.
diff --git a/pom.xml b/pom.xml
index ea6fb01249..d955106433 100644
index a70c0ec07a..5ab1f29846 100644
--- a/pom.xml
+++ b/pom.xml
@@ -61,7 +61,7 @@
@ -28,10 +28,10 @@ index ea6fb01249..d955106433 100644
<dependency>
<groupId>org.apache.logging.log4j</groupId>
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index fc6cb9306a..bd601333ee 100644
index d873256c01..783aa6db1f 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -291,7 +291,7 @@ public class SpigotConfig
@@ -286,7 +286,7 @@ public class SpigotConfig
private static void playerSample()
{
playerSample = getInt( "settings.sample-count", 12 );

Datei anzeigen

@ -1,11 +1,11 @@
From 37eb7bf78423b3149998c38df7884b3adc0704c2 Mon Sep 17 00:00:00 2001
From d8089c4bf30144a196c0cea8306ef6d32899ce37 Mon Sep 17 00:00:00 2001
From: pkt77 <parkerkt77@gmail.com>
Date: Fri, 10 Nov 2017 23:46:34 -0500
Subject: [PATCH] Add PlayerArmorChangeEvent
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index efc7617957..72adeb7271 100644
index 46dfb3c498..74c1f7c447 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -1,5 +1,6 @@
@ -15,7 +15,7 @@ index efc7617957..72adeb7271 100644
import com.google.common.base.Objects;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Maps;
@@ -2275,6 +2276,13 @@ public abstract class EntityLiving extends Entity {
@@ -2276,6 +2277,13 @@ public abstract class EntityLiving extends Entity {
ItemStack itemstack1 = this.getEquipment(enumitemslot);
if (!ItemStack.matches(itemstack1, itemstack)) {

Datei anzeigen

@ -1,4 +1,4 @@
From c20b37ca6d31358fe106f4fef2c13036fd20b95a Mon Sep 17 00:00:00 2001
From 8dc339d494ac04fa85ad7eca65213096c14c98f4 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 26 Nov 2017 13:19:58 -0500
Subject: [PATCH] AsyncTabCompleteEvent
@ -72,10 +72,10 @@ index 1d140b3fe7..6008613fae 100644
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 9f29be85c2..66d4dccedd 100644
index 308ae2e157..3938adf7c7 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1667,7 +1667,7 @@ public final class CraftServer implements Server {
@@ -1668,7 +1668,7 @@ public final class CraftServer implements Server {
offers = tabCompleteChat(player, message);
}

Datei anzeigen

@ -1,4 +1,4 @@
From 99a5fd70220d1da44b64c78c13482bd4669132dc Mon Sep 17 00:00:00 2001
From 92d718d2cc5efcad7c1d148a44a3e1869ef20fd0 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 27 Jan 2018 17:04:14 -0500
Subject: [PATCH] Add ArmorStand Item Meta
@ -267,7 +267,7 @@ index f700522840..3723faccac 100644
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index b0682e5299..704a7d91e3 100644
index 084c958899..195b2e8f9a 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -162,6 +162,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@ -278,7 +278,7 @@ index b0682e5299..704a7d91e3 100644
.put(CraftMetaItem.class, "UNSPECIFIC")
.build();
@@ -1421,7 +1422,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1424,7 +1425,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
CraftMetaKnowledgeBook.BOOK_RECIPES.NBT,
CraftMetaTropicalFishBucket.VARIANT.NBT,
CraftMetaCrossbow.CHARGED.NBT,

Datei anzeigen

@ -1,4 +1,4 @@
From f96c992cf77cd972d27bca1231e644e6ba854b7f Mon Sep 17 00:00:00 2001
From d041c59da4e509e0633e7380feb6c02c4a8a20e8 Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Wed, 11 Oct 2017 15:56:26 +0200
Subject: [PATCH] Implement extended PaperServerListPingEvent
@ -6,7 +6,7 @@ Subject: [PATCH] Implement extended PaperServerListPingEvent
diff --git a/src/main/java/com/destroystokyo/paper/network/PaperServerListPingEventImpl.java b/src/main/java/com/destroystokyo/paper/network/PaperServerListPingEventImpl.java
new file mode 100644
index 000000000..c1a8e295b
index 0000000000..c1a8e295b6
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/network/PaperServerListPingEventImpl.java
@@ -0,0 +1,31 @@
@ -43,7 +43,7 @@ index 000000000..c1a8e295b
+}
diff --git a/src/main/java/com/destroystokyo/paper/network/PaperStatusClient.java b/src/main/java/com/destroystokyo/paper/network/PaperStatusClient.java
new file mode 100644
index 000000000..a2a409e63
index 0000000000..a2a409e635
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/network/PaperStatusClient.java
@@ -0,0 +1,11 @@
@ -60,7 +60,7 @@ index 000000000..a2a409e63
+}
diff --git a/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java b/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java
new file mode 100644
index 000000000..a85466bc7
index 0000000000..a85466bc7e
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java
@@ -0,0 +1,112 @@
@ -177,7 +177,7 @@ index 000000000..a85466bc7
+
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 798bf3521..46b3fcf07 100644
index 32a9e54d0a..37353b29da 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1,6 +1,9 @@
@ -190,7 +190,7 @@ index 798bf3521..46b3fcf07 100644
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.gson.JsonElement;
@@ -1057,7 +1060,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1058,7 +1061,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
if (i - this.Z >= 5000000000L) {
this.Z = i;
this.serverPing.setPlayerSample(new ServerPing.ServerPingPlayerSample(this.getMaxPlayers(), this.getPlayerCount()));
@ -200,7 +200,7 @@ index 798bf3521..46b3fcf07 100644
for (int k = 0; k < agameprofile.length; ++k) {
diff --git a/src/main/java/net/minecraft/server/PacketStatusListener.java b/src/main/java/net/minecraft/server/PacketStatusListener.java
index 2b08f285d..295c9ac22 100644
index 2b08f285d1..295c9ac22d 100644
--- a/src/main/java/net/minecraft/server/PacketStatusListener.java
+++ b/src/main/java/net/minecraft/server/PacketStatusListener.java
@@ -37,6 +37,8 @@ public class PacketStatusListener implements PacketStatusInListener {
@ -223,7 +223,7 @@ index 2b08f285d..295c9ac22 100644
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/server/ServerPing.java b/src/main/java/net/minecraft/server/ServerPing.java
index aa125a52d..ea52e89bd 100644
index aa125a52dc..ea52e89bd9 100644
--- a/src/main/java/net/minecraft/server/ServerPing.java
+++ b/src/main/java/net/minecraft/server/ServerPing.java
@@ -29,6 +29,7 @@ public class ServerPing {
@ -248,10 +248,10 @@ index aa125a52d..ea52e89bd 100644
this.c = agameprofile;
}
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index bd601333e..6c5430ff9 100644
index 783aa6db1f..33767c85ca 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -290,7 +290,7 @@ public class SpigotConfig
@@ -285,7 +285,7 @@ public class SpigotConfig
public static int playerSample;
private static void playerSample()
{

Datei anzeigen

@ -1,4 +1,4 @@
From c4a08d45b71ddad5c9fbb4f09f5544aa45715b22 Mon Sep 17 00:00:00 2001
From 5a68a156dd67d7290fb1dd4f2acfda61f0fe004d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 22 Mar 2018 01:40:24 -0400
Subject: [PATCH] getPlayerUniqueId API
@ -9,10 +9,10 @@ In Offline Mode, will return an Offline UUID
This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 66d4dccedd..208556355c 100644
index 3938adf7c7..8b5765e619 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1360,6 +1360,26 @@ public final class CraftServer implements Server {
@@ -1361,6 +1361,26 @@ public final class CraftServer implements Server {
return recipients.size();
}

Datei anzeigen

@ -1,4 +1,4 @@
From bc6650512170cc798661473a88c62c3871774f8b Mon Sep 17 00:00:00 2001
From 370986b06ddf12b6508978905b94d0e75f742699 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sat, 16 Jun 2018 01:18:16 -0500
Subject: [PATCH] Make shield blocking delay configurable
@ -19,10 +19,10 @@ index da10550030..182ac2e7f6 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 72adeb7271..a578dec9db 100644
index 74c1f7c447..a873685e47 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2921,7 +2921,7 @@ public abstract class EntityLiving extends Entity {
@@ -2922,7 +2922,7 @@ public abstract class EntityLiving extends Entity {
if (this.isHandRaised() && !this.activeItem.isEmpty()) {
Item item = this.activeItem.getItem();
@ -31,7 +31,7 @@ index 72adeb7271..a578dec9db 100644
} else {
return false;
}
@@ -3157,4 +3157,15 @@ public abstract class EntityLiving extends Entity {
@@ -3158,4 +3158,15 @@ public abstract class EntityLiving extends Entity {
public void d(EnumHand enumhand) {
this.c(enumhand == EnumHand.MAIN_HAND ? EnumItemSlot.MAINHAND : EnumItemSlot.OFFHAND);
}
@ -48,7 +48,7 @@ index 72adeb7271..a578dec9db 100644
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 42cc158824..513b3fac7f 100644
index 4cbe1ec22c..06cc48a1dc 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -619,5 +619,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {

Datei anzeigen

@ -1,4 +1,4 @@
From c32f8c825de97cc79061ca8cd11e41cbdbdb7dea Mon Sep 17 00:00:00 2001
From ad8b55ff30923ed0f1e1422f1f7abbfa1e5448d5 Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de>
Date: Mon, 18 Jun 2018 15:46:23 +0200
Subject: [PATCH] Implement EntityKnockbackByEntityEvent
@ -6,10 +6,10 @@ 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/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index a578dec9db..c2634f8813 100644
index a873685e47..dfbd40a997 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -1430,6 +1430,16 @@ public abstract class EntityLiving extends Entity {
@@ -1431,6 +1431,16 @@ 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);

Datei anzeigen

@ -1,4 +1,4 @@
From 639efcb00e1ca46a92d1ac3b84ba20c10f04a4ba Mon Sep 17 00:00:00 2001
From ea688d4a7f14a44362f33e207c455d5bdf1a9181 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 29 Jun 2018 00:21:28 -0400
Subject: [PATCH] LivingEntity Hand Raised/Item Use API
@ -6,7 +6,7 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API
How long an entity has raised hands to charge an attack or use an item
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index c2634f8813..b29e0c5d35 100644
index dfbd40a997..e1972f7935 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -109,7 +109,7 @@ public abstract class EntityLiving extends Entity {
@ -18,7 +18,7 @@ index c2634f8813..b29e0c5d35 100644
protected int bo;
protected int bp;
private BlockPosition bG;
@@ -2899,10 +2899,12 @@ public abstract class EntityLiving extends Entity {
@@ -2900,10 +2900,12 @@ public abstract class EntityLiving extends Entity {
return this.activeItem;
}
@ -32,7 +32,7 @@ index c2634f8813..b29e0c5d35 100644
return this.isHandRaised() ? this.activeItem.k() - this.dm() : 0;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 513b3fac7f..8dea7d36b6 100644
index 06cc48a1dc..0610d0d5c0 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -629,5 +629,25 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {

Datei anzeigen

@ -1,4 +1,4 @@
From e220aec9f0be7078d01e47a707f639aff5147bad Mon Sep 17 00:00:00 2001
From 01e7f97e767e1390bd6c0b7d18e8c8d430029d0b Mon Sep 17 00:00:00 2001
From: miclebrick <miclebrick@outlook.com>
Date: Wed, 8 Aug 2018 15:30:52 -0400
Subject: [PATCH] Add Early Warning Feature to WatchDog
@ -9,7 +9,7 @@ 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 207e5d3e2..a13c8c68b 100644
index 207e5d3e23..a13c8c68b6 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -25,6 +25,7 @@ import org.bukkit.configuration.file.YamlConfiguration;
@ -36,10 +36,10 @@ index 207e5d3e2..a13c8c68b 100644
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 46b3fcf07..e99e698c4 100644
index 37353b29da..2acb71fa8a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -860,6 +860,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -861,6 +861,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.a(this.serverPing);
// Spigot start
@ -48,7 +48,7 @@ index 46b3fcf07..e99e698c4 100644
long start = System.nanoTime(), curTime, tickSection = start; // Paper - Further improve server tick loop
lastTick = start - TICK_TIME; // Paper
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index c0f3a7cc7..3fe85b2fc 100644
index 8b5765e619..1ca2c2204c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -757,6 +757,7 @@ public final class CraftServer implements Server {
@ -68,7 +68,7 @@ index c0f3a7cc7..3fe85b2fc 100644
@Override
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index 6c5430ff9..4b8581f0e 100644
index 33767c85ca..359a0c8afc 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -225,7 +225,7 @@ public class SpigotConfig
@ -81,7 +81,7 @@ index 6c5430ff9..4b8581f0e 100644
public static boolean bungee;
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
index 9532aada8..a1d93200e 100644
index 9532aada82..a1d93200e6 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -5,6 +5,7 @@ import java.lang.management.MonitorInfo;

Datei anzeigen

@ -1,4 +1,4 @@
From 1bdd1d5693380eb76a04520a2de4e4e7318b5c41 Mon Sep 17 00:00:00 2001
From a1683b33a2ec42ca595cd7182ffdf5b376c844be Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 11 Aug 2018 00:49:20 -0400
Subject: [PATCH] Detect and repair corrupt Region Files
@ -11,18 +11,18 @@ I don't know why mojang only checks for 4096, when anything less than 8192 is a
But to be safe, it will attempt to back up the file.
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
index 4e6288e8bb..e68f901943 100644
index 3aeac69c26..17648c1c04 100644
--- a/src/main/java/net/minecraft/server/RegionFile.java
+++ b/src/main/java/net/minecraft/server/RegionFile.java
@@ -27,13 +27,13 @@ public class RegionFile implements AutoCloseable {
// Spigot end
private static final byte[] a = new byte[4096];
private final RandomAccessFile b; private RandomAccessFile getDataFile() { return this.b; } // Paper - OBFHELPER
private final RandomAccessFile b; private RandomAccessFile getDataFile() { return this.b; } // Paper - OBFHELPER // PAIL dataFile
- private final int[] c = new int[1024];
- private final int[] d = new int[1024];
+ private final int[] c = new int[1024]; private int[] offsets = c; // Paper - OBFHELPER
+ private final int[] d = new int[1024];private int[] timestamps = d; // Paper - OBFHELPER
private final List<Boolean> e;
+ private final int[] c = new int[1024]; private final int[] offsets = c; // Paper - OBFHELPER
+ private final int[] d = new int[1024]; private final int[] timestamps = d; // Paper - OBFHELPER
private final List<Boolean> e; // PAIL freeSectors
public RegionFile(File file) throws IOException {
this.b = new RandomAccessFile(file, "rw");
@ -52,13 +52,13 @@ index 4e6288e8bb..e68f901943 100644
for (j = 0; j < 1024; ++j) {
k = headerAsInts.get(); // Paper
- this.d[j] = k;
+ if (offsets[j] != 0) this.timestamps[j] = k; // Paper - don't set timestamp if it got 0'd above due to corruption
+ if (this.offsets[j] != 0) this.timestamps[j] = k; // Paper - don't set timestamp if it got 0'd above due to corruption
}
this.file = file; // Spigot
@@ -306,6 +307,53 @@ public class RegionFile implements AutoCloseable {
this.b.close();
@@ -349,6 +350,53 @@ public class RegionFile implements AutoCloseable {
}
// Spigot end
+ // Paper start
+ public synchronized void deleteChunk(int j1) {

Datei anzeigen

@ -1,4 +1,4 @@
From 5fb2815537295ce5488fe268c3022169bee43f12 Mon Sep 17 00:00:00 2001
From be7d2af254d189bf2a6e546950db79d49781de94 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 12 Aug 2018 02:33:39 -0400
Subject: [PATCH] Use a Queue for Queueing Commands
@ -6,7 +6,7 @@ Subject: [PATCH] Use a Queue for Queueing Commands
Lists are bad as Queues mmmkay.
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 118d90242e..6da54a64bd 100644
index c6eb88c34b..5bc19cd081 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -43,7 +43,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@ -18,7 +18,7 @@ index 118d90242e..6da54a64bd 100644
private RemoteStatusListener remoteStatusListener;
public final RemoteControlCommandListener remoteControlCommandListener;
private RemoteControlListener remoteControlListener;
@@ -444,8 +444,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -441,8 +441,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
public void handleCommandQueue() {
MinecraftTimings.serverCommandTimer.startTiming(); // Spigot

Datei anzeigen

@ -1,11 +1,11 @@
From 9a63a21996daeb021e7501f224b43eeec8d2467b Mon Sep 17 00:00:00 2001
From 71ad58ad5a2f615ecde1edac307a09353bac3826 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Wed, 15 Aug 2018 01:26:09 -0700
Subject: [PATCH] Allow disabling armour stand ticking
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 09607fb44..5832c3e86 100644
index 09607fb447..5832c3e868 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -386,4 +386,10 @@ public class PaperWorldConfig {
@ -20,7 +20,7 @@ index 09607fb44..5832c3e86 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java
index 9e7b4f6fe..627925e3b 100644
index 9e7b4f6feb..627925e3ba 100644
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
@@ -44,6 +44,11 @@ public class EntityArmorStand extends EntityLiving {
@ -140,10 +140,10 @@ index 9e7b4f6fe..627925e3b 100644
public Vector3f r() {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 29eace446..2f293aa83 100644
index e1972f7935..dbf42f882f 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2265,52 +2265,7 @@ public abstract class EntityLiving extends Entity {
@@ -2266,52 +2266,7 @@ public abstract class EntityLiving extends Entity {
}
}
@ -197,7 +197,7 @@ index 29eace446..2f293aa83 100644
if (this.ticksLived % 20 == 0) {
this.getCombatTracker().g();
@@ -2411,6 +2366,57 @@ public abstract class EntityLiving extends Entity {
@@ -2412,6 +2367,57 @@ public abstract class EntityLiving extends Entity {
}
}
@ -256,7 +256,7 @@ index 29eace446..2f293aa83 100644
float f2 = MathHelper.g(f - this.aK);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
index 9f5c3b92e..07ce93f17 100644
index 9f5c3b92e3..07ce93f17c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
@@ -297,5 +297,15 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand {

Datei anzeigen

@ -1,4 +1,4 @@
From 5b14cf5c8f6cb08ef4991880537bae8439a94343 Mon Sep 17 00:00:00 2001
From 57e4e704f0bd0d50d54eb66b0050a85a0e7ca8a6 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 27 Apr 2016 22:09:52 -0400
Subject: [PATCH] Optimize Hoppers
@ -47,10 +47,10 @@ index c69a067ef1..1e23d77e72 100644
itemstack.d(this.C());
if (this.tag != null) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 4efcbcbad5..ae33f2e948 100644
index 2acb71fa8a..0d690fc8e1 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1142,6 +1142,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1143,6 +1143,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
WorldServer worldserver = (WorldServer) iterator.next();
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper

Datei anzeigen

@ -1,14 +1,14 @@
From 0f4a289817ad1677fc0d007aa5f2d8279142363d Mon Sep 17 00:00:00 2001
From 06c4452e3e07fe002dc02aff0a6327d251746592 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Mon, 3 Sep 2018 18:20:03 -0500
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 2cbcd1e17b..6ed473c656 100644
index dbf42f882f..b09712ca91 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -3176,6 +3176,23 @@ public abstract class EntityLiving extends Entity {
@@ -3177,6 +3177,23 @@ public abstract class EntityLiving extends Entity {
this.c(enumhand == EnumHand.MAIN_HAND ? EnumItemSlot.MAINHAND : EnumItemSlot.OFFHAND);
}
// Paper start
@ -33,7 +33,7 @@ index 2cbcd1e17b..6ed473c656 100644
public int getShieldBlockingDelay() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 8dea7d36b6..d5c4115a85 100644
index 0610d0d5c0..408028131b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -182,6 +182,28 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {

Datei anzeigen

@ -1,4 +1,4 @@
From 5cf90690617048b1f94b303f4af011d0add5188f Mon Sep 17 00:00:00 2001
From 5d6dc2bb82c80b978eaccdeb9e69dbf34d723805 Mon Sep 17 00:00:00 2001
From: Phoenix616 <mail@moep.tv>
Date: Tue, 21 Aug 2018 01:39:35 +0100
Subject: [PATCH] Improve death events
@ -15,7 +15,7 @@ items and experience which is otherwise only properly possible by using
internal code.
diff --git a/src/main/java/net/minecraft/server/CombatTracker.java b/src/main/java/net/minecraft/server/CombatTracker.java
index 84c3ea9d0..f563a7b63 100644
index 84c3ea9d00..f563a7b630 100644
--- a/src/main/java/net/minecraft/server/CombatTracker.java
+++ b/src/main/java/net/minecraft/server/CombatTracker.java
@@ -175,6 +175,7 @@ public class CombatTracker {
@ -27,7 +27,7 @@ index 84c3ea9d0..f563a7b63 100644
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 7811beb80..f9b097fd6 100644
index 7811beb807..f9b097fd6f 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1517,6 +1517,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -47,7 +47,7 @@ index 7811beb80..f9b097fd6 100644
protected void i(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 627925e3b..e516db270 100644
index 627925e3ba..e516db2701 100644
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
@@ -683,7 +683,8 @@ public class EntityArmorStand extends EntityLiving {
@ -61,7 +61,7 @@ index 627925e3b..e516db270 100644
}
diff --git a/src/main/java/net/minecraft/server/EntityFox.java b/src/main/java/net/minecraft/server/EntityFox.java
index 85231309f..1da2f013f 100644
index 85231309fd..97059b8239 100644
--- a/src/main/java/net/minecraft/server/EntityFox.java
+++ b/src/main/java/net/minecraft/server/EntityFox.java
@@ -597,15 +597,25 @@ public class EntityFox extends EntityAnimal {
@ -74,7 +74,7 @@ index 85231309f..1da2f013f 100644
+ ItemStack itemstack = this.getEquipment(EnumItemSlot.MAINHAND).cloneItemStack(); // Paper
+
+ // Paper start - Cancellable death event
+ org.bukkit.event.entity.EntityDeathEvent deathEvent = super.d(damagesource);
+ org.bukkit.event.entity.EntityDeathEvent deathEvent = super.processDeath(damagesource);
+
+ // Below is code to drop
+
@ -93,8 +93,33 @@ index 85231309f..1da2f013f 100644
}
public static boolean a(EntityFox entityfox, EntityLiving entityliving) {
diff --git a/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java b/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java
index 2483cfd28a..2a988366cd 100644
--- a/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java
+++ b/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java
@@ -55,11 +55,19 @@ public abstract class EntityHorseChestedAbstract extends EntityHorseAbstract {
this.a((IMaterial) Blocks.CHEST);
}
- this.setCarryingChest(false);
+ //this.setCarryingChest(false); // Paper - moved to post death logic
}
}
+ // Paper start
+ protected void postDeathDropItems(org.bukkit.event.entity.EntityDeathEvent event) {
+ if (this.isCarryingChest() && (event == null || !event.isCancelled())) {
+ this.setCarryingChest(false);
+ }
+ }
+ // Paper end
+
@Override
public void b(NBTTagCompound nbttagcompound) {
super.b(nbttagcompound);
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index edc25586a..37ff76486 100644
index b09712ca91..1e53af2cce 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -85,7 +85,7 @@ public abstract class EntityLiving extends Entity {
@ -144,7 +169,7 @@ index edc25586a..37ff76486 100644
if (this.aY >= 0 && entityliving != null) {
entityliving.a(this, this.aY, damagesource);
}
@@ -1340,11 +1346,29 @@ public abstract class EntityLiving extends Entity {
@@ -1340,14 +1346,32 @@ public abstract class EntityLiving extends Entity {
if (this.isSleeping()) {
this.dy();
}
@ -175,8 +200,19 @@ index edc25586a..37ff76486 100644
+
boolean flag = false;
if (entityliving instanceof EntityWither) {
@@ -1371,7 +1395,8 @@ public abstract class EntityLiving extends Entity {
- if (entityliving instanceof EntityWither) {
+ if (this.killed && entityliving instanceof EntityWither) {
if (this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
BlockPosition blockposition = new BlockPosition(this.locX, this.locY, this.locZ);
IBlockData iblockdata = Blocks.WITHER_ROSE.getBlockData();
@@ -1366,12 +1390,15 @@ public abstract class EntityLiving extends Entity {
}
}
+ if (this.killed) { // Paper
this.world.broadcastEntityEffect(this, (byte) 3);
this.setPose(EntityPose.DYING);
+ } // Paper
}
}
@ -186,11 +222,11 @@ index edc25586a..37ff76486 100644
Entity entity = damagesource.getEntity();
int i;
@@ -1383,18 +1408,20 @@ public abstract class EntityLiving extends Entity {
@@ -1384,21 +1411,24 @@ public abstract class EntityLiving extends Entity {
boolean flag = this.lastDamageByPlayerTime > 0;
+ org.bukkit.event.entity.EntityDeathEvent deathEvent = null; // Paper
this.cF(); // CraftBukkit - from below // PAIL
+ org.bukkit.event.entity.EntityDeathEvent deathEvent; // Paper
if (this.isDropExperience() && this.world.getGameRules().getBoolean(GameRules.DO_MOB_LOOT)) {
this.a(damagesource, flag);
this.dropDeathLoot(damagesource, i, flag);
@ -198,20 +234,24 @@ index edc25586a..37ff76486 100644
- CraftEventFactory.callEntityDeathEvent(this, this.drops);
- this.drops = new ArrayList<org.bukkit.inventory.ItemStack>();
+ deathEvent = CraftEventFactory.callEntityDeathEvent(this, this.drops); // Paper
+ if (!deathEvent.isCancelled()) this.drops = new ArrayList<org.bukkit.inventory.ItemStack>(); // Paper
} else {
- CraftEventFactory.callEntityDeathEvent(this);
+ deathEvent = CraftEventFactory.callEntityDeathEvent(this); // Paper
// CraftBukkit end
}
+ this.postDeathDropItems(deathEvent); // Paper
+ this.drops = new ArrayList<>(); // Paper
- this.cF();
+ if (!deathEvent.isCancelled()) this.cF();; // Paper
- // this.cF();// CraftBukkit - moved up
+ return deathEvent; // Paper
}
protected void cF() {}
@@ -1448,6 +1475,7 @@ public abstract class EntityLiving extends Entity {
+ protected void postDeathDropItems(org.bukkit.event.entity.EntityDeathEvent event) {} // Paper - method for post death logic that cannot be ran before the event is potentially cancelled
protected void dropDeathLoot(DamageSource damagesource, int i, boolean flag) {}
@@ -1449,6 +1479,7 @@ public abstract class EntityLiving extends Entity {
return SoundEffects.ENTITY_GENERIC_HURT;
}
@ -219,7 +259,7 @@ index edc25586a..37ff76486 100644
@Nullable
protected SoundEffect getSoundDeath() {
return SoundEffects.ENTITY_GENERIC_DEATH;
@@ -1897,10 +1925,12 @@ public abstract class EntityLiving extends Entity {
@@ -1898,10 +1929,12 @@ public abstract class EntityLiving extends Entity {
}
@ -233,7 +273,7 @@ index edc25586a..37ff76486 100644
return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F;
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index dcd48d8b3..d7bc6e329 100644
index dcd48d8b3d..d7bc6e3297 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -75,6 +75,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@ -284,7 +324,7 @@ index dcd48d8b3..d7bc6e329 100644
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftSound.java b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
index 73cb64e09..9f317ff2e 100644
index 73cb64e09d..9f317ff2e8 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftSound.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
@@ -806,6 +806,22 @@ public enum CraftSound {
@ -311,7 +351,7 @@ index 73cb64e09..9f317ff2e 100644
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 2c99a1e9d..e9458dc65 100644
index 2c99a1e9df..e9458dc65f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1722,7 +1722,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -332,7 +372,7 @@ index 2c99a1e9d..e9458dc65 100644
public void injectScaledMaxHealth(Collection<AttributeInstance> collection, boolean force) {
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 5309a4e30..4074100c4 100644
index 5309a4e304..4074100c44 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -736,9 +736,16 @@ public class CraftEventFactory {

Datei anzeigen

@ -1,4 +1,4 @@
From 7e11e5163ca99a542547906faf603a703660a677 Mon Sep 17 00:00:00 2001
From e89b946fd0a5f1904172eb5b4596c3f42b79afc8 Mon Sep 17 00:00:00 2001
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
Date: Wed, 12 Sep 2018 18:53:55 +0300
Subject: [PATCH] Implement an API for CanPlaceOn and CanDestroy NBT values
@ -32,7 +32,7 @@ index 005ebec266..97d85f8451 100644
this.s = this::l;
if (this.i.canRead() && this.i.peek() == '#') {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 704a7d91e3..d484292dd0 100644
index 195b2e8f9a..1faadbd101 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -87,6 +87,12 @@ import org.bukkit.persistence.PersistentDataContainer;
@ -208,7 +208,7 @@ index 704a7d91e3..d484292dd0 100644
}
@Override
@@ -1152,7 +1260,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1155,7 +1263,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
&& (this.hideFlag == that.hideFlag)
&& (this.isUnbreakable() == that.isUnbreakable())
&& (this.hasDamage() ? that.hasDamage() && this.damage == that.damage : !that.hasDamage())
@ -221,7 +221,7 @@ index 704a7d91e3..d484292dd0 100644
}
/**
@@ -1187,6 +1299,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1190,6 +1302,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
hash = 61 * hash + (hasDamage() ? this.damage : 0);
hash = 61 * hash + (hasAttributeModifiers() ? this.attributeModifiers.hashCode() : 0);
hash = 61 * hash + version;
@ -232,7 +232,7 @@ index 704a7d91e3..d484292dd0 100644
return hash;
}
@@ -1210,6 +1326,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1213,6 +1329,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
clone.unbreakable = this.unbreakable;
clone.damage = this.damage;
clone.version = this.version;
@ -247,7 +247,7 @@ index 704a7d91e3..d484292dd0 100644
return clone;
} catch (CloneNotSupportedException e) {
throw new Error(e);
@@ -1267,6 +1391,24 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1270,6 +1394,24 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
builder.put(DAMAGE.BUKKIT, damage);
}
@ -272,7 +272,7 @@ index 704a7d91e3..d484292dd0 100644
final Map<String, NBTBase> internalTags = new HashMap<String, NBTBase>(unhandledTags);
serializeInternal(internalTags);
if (!internalTags.isEmpty()) {
@@ -1429,7 +1571,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1432,7 +1574,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
CraftMetaArmorStand.NO_BASE_PLATE.NBT,
CraftMetaArmorStand.SHOW_ARMS.NBT,
CraftMetaArmorStand.SMALL.NBT,
@ -283,7 +283,7 @@ index 704a7d91e3..d484292dd0 100644
// Paper end
));
}
@@ -1476,4 +1620,147 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1479,4 +1623,147 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
return spigot;
}
// Spigot end

Datei anzeigen

@ -1,4 +1,4 @@
From 20f83dd15b487d2c37dd45bc8bb3906242f3073d Mon Sep 17 00:00:00 2001
From 7fca1b3434f57de370ca948b5d846262a058c9bb 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
@ -21,7 +21,7 @@ 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 000000000..6bb2f98b4
index 0000000000..6bb2f98b45
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldMap.java
@@ -0,0 +1,191 @@
@ -217,7 +217,7 @@ index 000000000..6bb2f98b4
+ }
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 150f19024..f6a979a5b 100644
index de423de63b..a5447c6501 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -88,7 +88,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -238,7 +238,7 @@ index 150f19024..f6a979a5b 100644
this.loadSpawn(worldserver.getChunkProvider().playerChunkMap.worldLoadListener, worldserver);
this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldLoadEvent(worldserver.getWorld()));
}
@@ -597,7 +597,6 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -598,7 +598,6 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
// this.nextTick = SystemUtils.getMonotonicMillis() + 10L;
this.executeModerately();
// Iterator iterator = DimensionManager.a().iterator();

Datei anzeigen

@ -1,4 +1,4 @@
From e81b7a80f13ef4a74b4c31279c19ed692cfb5c0e Mon Sep 17 00:00:00 2001
From 7d5f5c45416e21cfe63aa30f352310a28faee015 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 2 Nov 2018 23:11:51 -0400
Subject: [PATCH] Optimize World Time Updates
@ -8,10 +8,10 @@ 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 3b948a0eed..7959fba8a8 100644
index a5447c6501..aec871dd24 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1129,12 +1129,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1130,12 +1130,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper
// Send time updates to everyone, it will get the right time from the world the player is in.

Datei anzeigen

@ -1,4 +1,4 @@
From c2a2a950beeb3962a13e29dd5d4dc86dacea4bde Mon Sep 17 00:00:00 2001
From 0a711dbbea913e930e4f34e1bdbe3ad46161deaf Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Thu, 15 Nov 2018 13:38:37 +0000
Subject: [PATCH] force entity dismount during teleportation
@ -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 19bbcc043..75da08596 100644
index 19bbcc043f..75da085969 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2045,12 +2045,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -72,7 +72,7 @@ index 19bbcc043..75da08596 100644
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 8887c24a9..5d3e48ba6 100644
index 8887c24a9b..5d3e48ba61 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -952,9 +952,11 @@ public abstract class EntityHuman extends EntityLiving {
@ -91,10 +91,10 @@ index 8887c24a9..5d3e48ba6 100644
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 37ff76486..93ee1feb9 100644
index 1e53af2cce..d23968a7c9 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2669,11 +2669,13 @@ public abstract class EntityLiving extends Entity {
@@ -2673,11 +2673,13 @@ public abstract class EntityLiving extends Entity {
return ((Byte) this.datawatcher.get(EntityLiving.ar) & 4) != 0;
}
@ -112,7 +112,7 @@ index 37ff76486..93ee1feb9 100644
this.B(entity);
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 965f1c279..0a6fdd383 100644
index 965f1c279b..0a6fdd383f 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1002,11 +1002,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {

Datei anzeigen

@ -1,4 +1,4 @@
From d9ac1f05ff60238411284540f4917dd04ab3b920 Mon Sep 17 00:00:00 2001
From baf1582d76a61343a81f2fb410f50b28e5e74d46 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sun, 18 Nov 2018 19:49:56 +0000
Subject: [PATCH] Make the default permission message configurable
@ -29,10 +29,10 @@ index 8feb0efdcd..81987e4ad9 100644
private static void savePlayerData() {
savePlayerData = getBoolean("settings.save-player-data", savePlayerData);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 145de4fe6e..12dbdbf1b8 100644
index dfa78653aa..b89486beb1 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2137,6 +2137,11 @@ public final class CraftServer implements Server {
@@ -2138,6 +2138,11 @@ public final class CraftServer implements Server {
return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions;
}

Datei anzeigen

@ -1,4 +1,4 @@
From 2d05bd7f3624fb882fd0eee352819bafc6876d5a Mon Sep 17 00:00:00 2001
From a8ff3e42fb3f25826b75e3309adb27dcb4804b39 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 15 Feb 2019 01:08:19 -0500
Subject: [PATCH] Allow Saving of Oversized Chunks
@ -64,7 +64,7 @@ index b7c94fe238..80eea5dfbd 100644
public NBTTagList() {}
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
index e68f901943..ed2ccebb23 100644
index 17648c1c04..86ae53fed3 100644
--- a/src/main/java/net/minecraft/server/RegionFile.java
+++ b/src/main/java/net/minecraft/server/RegionFile.java
@@ -23,7 +23,7 @@ public class RegionFile implements AutoCloseable {
@ -75,7 +75,7 @@ index e68f901943..ed2ccebb23 100644
+ final File file; // Paper - private -> package
// Spigot end
private static final byte[] a = new byte[4096];
private final RandomAccessFile b; private RandomAccessFile getDataFile() { return this.b; } // Paper - OBFHELPER
private final RandomAccessFile b; private RandomAccessFile getDataFile() { return this.b; } // Paper - OBFHELPER // PAIL dataFile
@@ -33,6 +33,7 @@ public class RegionFile implements AutoCloseable {
public RegionFile(File file) throws IOException {
@ -102,7 +102,7 @@ index e68f901943..ed2ccebb23 100644
// Spigot end
this.e.set((k >> 8) + l, false);
@@ -102,11 +104,11 @@ public class RegionFile implements AutoCloseable {
if (offsets[j] != 0) this.timestamps[j] = k; // Paper - don't set timestamp if it got 0'd above due to corruption
if (this.offsets[j] != 0) this.timestamps[j] = k; // Paper - don't set timestamp if it got 0'd above due to corruption
}
- this.file = file; // Spigot
@ -126,7 +126,7 @@ index e68f901943..ed2ccebb23 100644
}
protected synchronized void a(ChunkCoordIntPair chunkcoordintpair, byte[] abyte, int i) {
@@ -201,8 +203,9 @@ public class RegionFile implements AutoCloseable {
@@ -202,8 +204,9 @@ public class RegionFile implements AutoCloseable {
if (i1 >= 256) {
// Spigot start
@ -137,7 +137,7 @@ index e68f901943..ed2ccebb23 100644
// Spigot end
}
@@ -352,6 +355,109 @@ public class RegionFile implements AutoCloseable {
@@ -395,6 +398,109 @@ public class RegionFile implements AutoCloseable {
logger.error("Error backing up corrupt file" + file.getAbsolutePath(), e);
}
}
@ -247,7 +247,7 @@ index e68f901943..ed2ccebb23 100644
// Paper end
class ChunkBuffer extends ByteArrayOutputStream {
@@ -363,8 +469,35 @@ public class RegionFile implements AutoCloseable {
@@ -406,8 +512,35 @@ public class RegionFile implements AutoCloseable {
this.b = chunkcoordintpair;
}

Datei anzeigen

@ -1,4 +1,4 @@
From 9f6a1c486a41aa4246ef8622be3e3534ab03ae3a Mon Sep 17 00:00:00 2001
From 8f2a9a05ad3501a4821915bc0e935b370bea5418 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sat, 22 Sep 2018 00:33:08 -0500
Subject: [PATCH] Add LivingEntity#getTargetEntity
@ -66,10 +66,10 @@ index 75da085969..046e7e031c 100644
return 0.0F;
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 192a9a86d1..251afcc1bb 100644
index d23968a7c9..31d14b19b1 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -3225,6 +3225,37 @@ public abstract class EntityLiving extends Entity {
@@ -3229,6 +3229,37 @@ public abstract class EntityLiving extends Entity {
return world.rayTrace(raytrace);
}
@ -120,7 +120,7 @@ index 9bf1919451..56488b78dd 100644
return !entity.isSpectator();
};
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index d5c4115a85..c4aa1945ff 100644
index 408028131b..e0de3820f3 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -202,6 +202,33 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {

Datei anzeigen

@ -1,4 +1,4 @@
From 92e78367f968c250304b0d7a05343e015ff8ce44 Mon Sep 17 00:00:00 2001
From e22bb304de24d0f80e9884d55d88b271e78d404f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 27 Mar 2019 22:48:45 -0400
Subject: [PATCH] Server Tick Events
@ -6,10 +6,10 @@ Subject: [PATCH] Server Tick Events
Fires event at start and end of a server tick
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 7959fba8a8..d72c02680c 100644
index aec871dd24..35c5d38c21 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1054,6 +1054,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1055,6 +1055,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
co.aikar.timings.TimingsManager.FULL_SERVER_TICK.startTiming(); // Paper
this.slackActivityAccountant.tickStarted(); // Spigot
long i = SystemUtils.getMonotonicNanos();
@ -17,7 +17,7 @@ index 7959fba8a8..d72c02680c 100644
++this.ticks;
this.b(booleansupplier);
@@ -1105,6 +1106,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1106,6 +1107,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.executeAll();
}
// Paper end

Datei anzeigen

@ -1,72 +0,0 @@
From fcbe8db874577c2047d830b1c4b7e7ad98c94485 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Sun, 31 Mar 2019 22:02:24 -0700
Subject: [PATCH] Allow login events to fire only after the server plugins are
enabled
Event threads will simply block until they're ready to accept.
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
index a8773037e5..c09e1edfd4 100644
--- a/src/main/java/net/minecraft/server/LoginListener.java
+++ b/src/main/java/net/minecraft/server/LoginListener.java
@@ -290,6 +290,36 @@ public class LoginListener implements PacketLoginInListener {
}
}
+ // Paper start - Delay async prelogin until plugins are ready
+ private static volatile Object blockingLogins = new Object();
+
+ public static void checkStartupAndBlock() {
+ final Object lock = LoginListener.blockingLogins;
+ if (lock != null) {
+ synchronized (lock) {
+ for (;;) {
+ if (LoginListener.blockingLogins == null) {
+ return;
+ }
+ try {
+ lock.wait();
+ } catch (final InterruptedException ignore) {// handled by the if statement above
+ Thread.currentThread().interrupt();
+ }
+ }
+ }
+ }
+ }
+
+ public static void allowLogins() {
+ final Object lock = LoginListener.blockingLogins;
+ synchronized (lock) {
+ LoginListener.blockingLogins = null;
+ lock.notifyAll();
+ }
+ }
+ // Paper end
+
// Spigot start
public class LoginHandler {
@@ -300,6 +330,7 @@ public class LoginListener implements PacketLoginInListener {
return;
}
// Paper end
+ LoginListener.checkStartupAndBlock(); // Paper - Delay async login events until plugins are ready
String playerName = i.getName();
java.net.InetAddress address = ((java.net.InetSocketAddress) networkManager.getSocketAddress()).getAddress();
java.util.UUID uniqueId = i.getId();
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 05c23a2d98..b2a9fe30d5 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -471,6 +471,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
// Paper end
this.server.enablePlugins(org.bukkit.plugin.PluginLoadOrder.POSTWORLD);
+ LoginListener.allowLogins(); // Paper - Allow logins once postworld
this.server.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.STARTUP));
// CraftBukkit end
--
2.22.0

Datei anzeigen

@ -1,4 +1,4 @@
From 2120bc5b2bdc7e46057acfc1bdcba1ed8a915ba9 Mon Sep 17 00:00:00 2001
From 26aaafb89179c1b8d19ed21a8ebe9cd913b1fd15 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Thu, 4 Apr 2019 17:55:05 -0700
Subject: [PATCH] Optimize GameRules to use LinkedHashMap

Datei anzeigen

@ -1,214 +0,0 @@
From 9d94490ac2671994c06c081a116d7b11d8ef4f77 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Mon, 1 Apr 2019 18:57:32 -0700
Subject: [PATCH] Make region files more reliable to write to
Previously we would write to header before writing our chunk data,
which opens a window for corruption (or we would overwrite entirely).
Now the saving process has been changed to follow this chain of events:
1. We always allocate a new space to write so we do not potentially
overwrite and corrupt the current data
2. Write the chunk data first (the order of the fields in
the chunk data isn't relevant though)
3. Flush to disk (if the launch flag is used)
4. Write to the region header last
5. Flush to disk (if the launch flag is used)
6. Then we free the previous space allocated
With this chain of events it is impossible for a chunk write to corrupt
a region file, unless the operating system has lied and we have NOT flushed
to disk.
However server administrators are still recommended to continue performing
regular backups.
Note that when Mojang finally decides to change their region format
to deal with oversized chunks this patch must be changed to deal with
whatever system they decide to impose.
If the paper.flush-on-save startup flag is set to true, then the
steps 3 and 5 will make a call to sync() on the region file's fd,
effectively flushing to disk.
We also make use of two flushes to disk per chunk save (to ensure
ordering and ensure data has gone to disk), so this will negatively
affect save performance if the startup flag is used (especially on
HDDs).
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
index ed2ccebb23..b0ec9edf67 100644
--- a/src/main/java/net/minecraft/server/RegionFile.java
+++ b/src/main/java/net/minecraft/server/RegionFile.java
@@ -29,7 +29,7 @@ public class RegionFile implements AutoCloseable {
private final RandomAccessFile b; private RandomAccessFile getDataFile() { return this.b; } // Paper - OBFHELPER
private final int[] c = new int[1024]; private int[] offsets = c; // Paper - OBFHELPER
private final int[] d = new int[1024];private int[] timestamps = d; // Paper - OBFHELPER
- private final List<Boolean> e;
+ private final List<Boolean> e; private List<Boolean> getFreeSectors() { return this.e; } // Paper - OBFHELPER
public RegionFile(File file) throws IOException {
this.b = new RandomAccessFile(file, "rw");
@@ -191,8 +191,8 @@ public class RegionFile implements AutoCloseable {
protected synchronized void a(ChunkCoordIntPair chunkcoordintpair, byte[] abyte, int i) {
try {
int j = this.getOffset(chunkcoordintpair);
- int k = j >> 8;
- int l = j & 255;
+ int k = j >> 8; final int oldSectorOffset = k; // Paper - store variable for later
+ int l = j & 255; final int oldSectorCount; // Paper - store variable for later
// Spigot start
if (l == 255) {
this.b.seek(k * 4096);
@@ -200,6 +200,7 @@ public class RegionFile implements AutoCloseable {
}
// Spigot end
int i1 = (i + 5) / 4096 + 1;
+ oldSectorCount = l; // Paper - store variable for later (watch out for re-assignments of l)
if (i1 >= 256) {
// Spigot start
@@ -209,14 +210,12 @@ public class RegionFile implements AutoCloseable {
// Spigot end
}
- if (k != 0 && l == i1) {
+ if (false && k != 0 && l == i1) { // Paper - We never want to overrite old data
this.a(k, abyte, i);
} else {
int j1;
- for (j1 = 0; j1 < l; ++j1) {
- this.e.set(k + j1, true);
- }
+ // Paper - We do not free old sectors until we are done writing the new chunk data
j1 = this.e.indexOf(true);
int k1 = 0;
@@ -243,13 +242,13 @@ public class RegionFile implements AutoCloseable {
if (k1 >= i1) {
k = j1;
- this.a(chunkcoordintpair, j1 << 8 | (i1 > 255 ? 255 : i1)); // Spigot
+ //this.a(chunkcoordintpair, j1 << 8 | (i1 > 255 ? 255 : i1)); // Spigot // Paper - We only write to header after we've written chunk data
for (l1 = 0; l1 < i1; ++l1) {
this.e.set(k + l1, false);
}
- this.a(k, abyte, i);
+ this.writeChunk(chunkcoordintpair, j1 << 8 | (i1 > 255 ? 255 : i1), k, abyte, i); // Paper - Ensure we do not corrupt region files
} else {
this.b.seek(this.b.length());
k = this.e.size();
@@ -259,22 +258,27 @@ public class RegionFile implements AutoCloseable {
this.e.add(false);
}
- this.a(k, abyte, i);
- this.a(chunkcoordintpair, k << 8 | (i1 > 255 ? 255 : i1)); // Spigot
+ this.writeChunk(chunkcoordintpair, k << 8 | (i1 > 255 ? 255 : i1), k, abyte, i); // Paper - Ensure we do not corrupt region files
+ }
+
+ // Paper start - Now that we've written the new chunk we can free the old data
+ for (int off = 0; off < oldSectorCount; ++off) {
+ this.getFreeSectors().set(oldSectorOffset + off, true);
}
+ // Paper end
}
- this.b(chunkcoordintpair, (int) (SystemUtils.getTimeMillis() / 1000L));
+ // Paper - move this into writeChunkData
} catch (IOException ioexception) {
com.destroystokyo.paper.util.SneakyThrow.sneaky(ioexception); // Paper - we want the upper try/catch to retry this
}
}
+ private void writeChunkData(final int sectorOffset, final byte[] data, final int dataLength) throws IOException { this.a(sectorOffset, data, dataLength); } // Paper - OBFHELPER
private void a(int i, byte[] abyte, int j) throws IOException {
this.b.seek((long) (i * 4096));
- this.b.writeInt(j + 1);
- this.b.writeByte(2);
+ this.writeIntAndByte(j + 1, (byte)2); // Paper - Avoid 4 io write calls
this.b.write(abyte, 0, j);
}
@@ -286,24 +290,28 @@ public class RegionFile implements AutoCloseable {
return this.getOffset(chunkcoordintpair) != 0;
}
+ private void updateChunkHeader(ChunkCoordIntPair chunkcoordintpair, final int offset) throws IOException { this.a(chunkcoordintpair, offset); } // Paper - OBFHELPER
private void a(ChunkCoordIntPair chunkcoordintpair, int i) throws IOException {
int j = this.f(chunkcoordintpair);
- this.c[j] = i;
+ //this.c[j] = i; // Paper - move this to after the write
this.b.seek((long) (j * 4));
- this.b.writeInt(i);
+ this.writeInt(i); // Paper - Avoid 3 io write calls
+ this.c[j] = i; // Paper - move this to after the write
}
private int f(ChunkCoordIntPair chunkcoordintpair) {
return chunkcoordintpair.j() + chunkcoordintpair.k() * 32;
}
+ private final void updateChunkTime(ChunkCoordIntPair chunkPos, final int time) throws IOException { this.b(chunkPos, time); } // Paper - OBFHELPER
private void b(ChunkCoordIntPair chunkcoordintpair, int i) throws IOException {
int j = this.f(chunkcoordintpair);
- this.d[j] = i;
+ //this.d[j] = i; // Paper - move this to after the write
this.b.seek((long) (4096 + j * 4));
- this.b.writeInt(i);
+ this.writeInt(i); // Paper - Avoid 3 io write calls
+ this.d[j] = i; // Paper - move this to after the write
}
public void close() throws IOException {
@@ -311,6 +319,41 @@ public class RegionFile implements AutoCloseable {
}
// Paper start
+ private static final boolean FLUSH_ON_SAVE = Boolean.getBoolean("paper.flush-on-save");
+ private void syncRegionFile() throws IOException {
+ if (!FLUSH_ON_SAVE) {
+ return;
+ }
+ this.getDataFile().getFD().sync(); // rethrow exception as we want to avoid corrupting a regionfile
+ }
+
+ private final java.nio.ByteBuffer scratchBuffer = java.nio.ByteBuffer.allocate(8);
+
+ private void writeInt(final int value) throws IOException {
+ synchronized (this.scratchBuffer) {
+ this.scratchBuffer.putInt(0, value);
+ this.getDataFile().write(this.scratchBuffer.array(), 0, 4);
+ }
+ }
+
+ // writes v1 then v2
+ private void writeIntAndByte(final int v1, final byte v2) throws IOException {
+ synchronized (this.scratchBuffer) {
+ this.scratchBuffer.putInt(0, v1);
+ this.scratchBuffer.put(4, v2);
+ this.getDataFile().write(this.scratchBuffer.array(), 0, 5);
+ }
+ }
+
+ private void writeChunk(final ChunkCoordIntPair chunk, final int chunkHeaderData,
+ final int chunkOffset, final byte[] chunkData, final int chunkDataLength) throws IOException {
+ this.writeChunkData(chunkOffset, chunkData, chunkDataLength);
+ this.syncRegionFile(); // Sync is required to ensure the previous data is written successfully
+ this.updateChunkTime(chunk, (int)(SystemUtils.getTimeMillis() / 1000L));
+ this.updateChunkHeader(chunk, chunkHeaderData);
+ this.syncRegionFile(); // Ensure header changes go through
+ }
+
public synchronized void deleteChunk(int j1) {
backup();
int k = offsets[j1];
--
2.22.0

Datei anzeigen

@ -1,4 +1,4 @@
From 270ebf9337fc0cf70642c4c3f9518ebf8eabc804 Mon Sep 17 00:00:00 2001
From 21758385418502c81a934bb3604ff94d733f5d85 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 6 Apr 2019 10:16:48 -0400
Subject: [PATCH] Optimize Captured TileEntity Lookup

Datei anzeigen

@ -1,4 +1,4 @@
From 9739535bc8f8b54bb6fafa476f00a60695ccf44e Mon Sep 17 00:00:00 2001
From 8f924f033228ae4dc6f0d8f624ce93b136be4a44 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Tue, 1 Jan 2019 02:22:01 -0800
Subject: [PATCH] Add Heightmap API
@ -20,7 +20,7 @@ index dd2a9c6e59..e3b4e30e65 100644
if (i >= -30000000 && j >= -30000000 && i < 30000000 && j < 30000000) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index a08366d360..d5ef409efb 100644
index 6bf7eded56..0d4e38d0f4 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -323,6 +323,29 @@ public class CraftWorld implements World {

Datei anzeigen

@ -1,4 +1,4 @@
From 422339fc192da2fb546a62e50776af166a0accf2 Mon Sep 17 00:00:00 2001
From 0fbd3c1b72d52dbca3781d93ab9bfa5681a3f4cb Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Mon, 15 Apr 2019 02:24:52 +0100
Subject: [PATCH] Handle bad chunks more gracefully

Datei anzeigen

@ -1,4 +1,4 @@
From 5c6de81d44eeefc98f4c8fab3ea3ab699366d0bf Mon Sep 17 00:00:00 2001
From 98d05ca6b896bc5aead03a7402b365bb5f631abe Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Fri, 19 Apr 2019 12:41:13 -0500
Subject: [PATCH] Mob Spawner API Enhancements

Datei anzeigen

@ -1,4 +1,4 @@
From c255782aba7ac85ae14b272e5034cc48f881c430 Mon Sep 17 00:00:00 2001
From 14bd1135ed355b728586d6237f8d7117124ccb63 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach@zachbr.io>
Date: Mon, 6 May 2019 01:29:25 -0400
Subject: [PATCH] Per-Player View Distance API placeholders
@ -39,7 +39,7 @@ index 18151acd5d..8b3052b113 100644
double deltaX = this.locX - player.locX;
double deltaZ = this.locZ - player.locZ;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 15c874fc82..5345233d59 100644
index 9fa55ef6f7..e920545df1 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1983,6 +1983,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

Datei anzeigen

@ -1,4 +1,4 @@
From d33e8cd67df7477d532be49dfc07c136c162a375 Mon Sep 17 00:00:00 2001
From f1a649c2b246c717099b5764f92d2545f8e1f4ba Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Mon, 6 May 2019 12:29:24 -0700
Subject: [PATCH] Async Chunk placeholder
@ -6,7 +6,7 @@ Subject: [PATCH] Async Chunk placeholder
Until we figure out Mojang's ticket system.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index d114c471e..20c370cf2 100644
index 0d4e38d0f4..74f7b046ac 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -18,6 +18,7 @@ import java.util.Objects;

Datei anzeigen

@ -1,11 +1,11 @@
From 92fc1f520adf818b763f54480751c2d48d5bed83 Mon Sep 17 00:00:00 2001
From ac0590e2d5af6b8fa96a15894b434ddc7a3458d4 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Fri, 10 May 2019 18:38:19 +0100
Subject: [PATCH] Fix CB call to changed postToMainThread method
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 79054b4519..8d48495eb7 100644
index 7680b88024..4187ba05bd 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -283,7 +283,7 @@ public class PlayerConnection implements PacketListenerPlayIn {

Datei anzeigen

@ -1,4 +1,4 @@
From 870c1db2cc3d04de45598077f3a7bb49f9d36b8a Mon Sep 17 00:00:00 2001
From 5c0d14c68d85c4dd031f920b56997708fff20905 Mon Sep 17 00:00:00 2001
From: Phoenix616 <mail@moep.tv>
Date: Sat, 27 Apr 2019 20:00:43 +0100
Subject: [PATCH] Fix sounds when item frames are modified (MC-123450)
@ -6,7 +6,7 @@ Subject: [PATCH] Fix sounds when item frames are modified (MC-123450)
This also fixes the adding sound playing when the item frame direction is changed.
diff --git a/src/main/java/net/minecraft/server/EntityItemFrame.java b/src/main/java/net/minecraft/server/EntityItemFrame.java
index 6f6837ec4..b078435c6 100644
index 6f6837ec4d..b078435c6f 100644
--- a/src/main/java/net/minecraft/server/EntityItemFrame.java
+++ b/src/main/java/net/minecraft/server/EntityItemFrame.java
@@ -226,7 +226,7 @@ public class EntityItemFrame extends EntityHanging {
@ -19,7 +19,7 @@ index 6f6837ec4..b078435c6 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java
index 799036f26..9ad180d94 100644
index 799036f268..9ad180d946 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java
@@ -49,7 +49,7 @@ public class CraftItemFrame extends CraftHanging implements ItemFrame {

Datei anzeigen

@ -1,4 +1,4 @@
From a1ad9b53d37594f0d2ba28cc803cb8e44b29c474 Mon Sep 17 00:00:00 2001
From aeef538a6f37143d4cacf2d4c66298232d6a19e4 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Mon, 13 May 2019 21:10:59 -0700
Subject: [PATCH] Fix CraftServer#isPrimaryThread and MinecraftServer
@ -16,7 +16,7 @@ handling that should have been handled synchronously will be handled
synchronously when the server gets shut down.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index cbc9502802..51be3f9adf 100644
index 35c5d38c21..c70ab3caf0 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2154,7 +2154,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -29,10 +29,10 @@ index cbc9502802..51be3f9adf 100644
@Deprecated
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index fc2576129f..0588641482 100644
index b89486beb1..7a8ab7d401 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1663,7 +1663,7 @@ public final class CraftServer implements Server {
@@ -1664,7 +1664,7 @@ public final class CraftServer implements Server {
@Override
public boolean isPrimaryThread() {

Datei anzeigen

@ -1,4 +1,4 @@
From bde8b8d76b122c1e4e9e7a10315b4eb28783b308 Mon Sep 17 00:00:00 2001
From d975ee9db6feb4d152164a06a70ba7c3b7154c4a Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 28 Sep 2018 21:49:53 -0400
Subject: [PATCH] Fix issues with entity loss due to unloaded chunks

Datei anzeigen

@ -1,4 +1,4 @@
From 0774260e6ddf31b3c48d62ce459633e624768a2c Mon Sep 17 00:00:00 2001
From 8c38c2390cee11240ea12602dbbd440aeb5e0477 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 21 Jul 2018 14:27:34 -0400
Subject: [PATCH] Duplicate UUID Resolve Option

Datei anzeigen

@ -1,4 +1,4 @@
From d04d1a0616a2869cb8de91fa7f607e7c04084d16 Mon Sep 17 00:00:00 2001
From b5079bb58d1c535dc36ee860218926d43f818f48 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Tue, 21 May 2019 02:34:04 +0100
Subject: [PATCH] improve CraftWorld#isChunkLoaded
@ -9,7 +9,7 @@ waiting for the execution queue to get to our request; We can just query
the chunk status and get a response now, vs having to wait
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index cbe9d5628e..9857914325 100644
index 74f7b046ac..f613ae1da4 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -388,14 +388,13 @@ public class CraftWorld implements World {

Datei anzeigen

@ -1,4 +1,4 @@
From c5d9df70d841184b48e1202c9ff00e6dbf660b45 Mon Sep 17 00:00:00 2001
From 4848ceac96873ad5395abff0990c6e1238496749 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 13 Sep 2014 23:14:43 -0400
Subject: [PATCH] Configurable Keep Spawn Loaded range per world
@ -21,7 +21,7 @@ index d8bb13693d..de11a91af6 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 51be3f9adf..380c3663a6 100644
index c70ab3caf0..c58f6f50d3 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -577,6 +577,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -196,7 +196,7 @@ index e474237c24..1003ea50d3 100644
public LongSet getForceLoadedChunks() {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 273afa972a..acf151a253 100644
index f613ae1da4..ceb256222f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1837,15 +1837,21 @@ public class CraftWorld implements World {

Datei anzeigen

@ -1,11 +1,11 @@
From dbc810e491a0c56583048cbcd0caf0df6fc8097b Mon Sep 17 00:00:00 2001
From dcab8a73f48cd67cd36bd1c1a216453f94a7b91c Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Fri, 24 May 2019 07:53:16 +0100
Subject: [PATCH] Fix some generation concurrency issues
diff --git a/src/main/java/net/minecraft/server/DefinedStructureManager.java b/src/main/java/net/minecraft/server/DefinedStructureManager.java
index 8ecbd945c..fec41a142 100644
index 8ecbd945c2..fec41a142f 100644
--- a/src/main/java/net/minecraft/server/DefinedStructureManager.java
+++ b/src/main/java/net/minecraft/server/DefinedStructureManager.java
@@ -20,7 +20,7 @@ import org.apache.logging.log4j.Logger;
@ -18,7 +18,7 @@ index 8ecbd945c..fec41a142 100644
private final MinecraftServer d;
private final java.nio.file.Path e;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index e3b4e30e6..10c149fae 100644
index e3b4e30e65..10c149faec 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -101,6 +101,23 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@ -46,7 +46,7 @@ index e3b4e30e6..10c149fae 100644
public CraftWorld getWorld() {
return this.world;
diff --git a/src/main/java/net/minecraft/server/WorldGenStronghold.java b/src/main/java/net/minecraft/server/WorldGenStronghold.java
index ddf726867..c2188ceef 100644
index ddf7268676..c2188ceef1 100644
--- a/src/main/java/net/minecraft/server/WorldGenStronghold.java
+++ b/src/main/java/net/minecraft/server/WorldGenStronghold.java
@@ -10,10 +10,12 @@ import javax.annotation.Nullable;

Datei anzeigen

@ -1,4 +1,4 @@
From c91c9c3475b153e3322014ef463be6f2b9e3b062 Mon Sep 17 00:00:00 2001
From 7714e202d48c4aaed00476736342817ff5ed8484 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Mon, 27 May 2019 17:35:39 -0500
Subject: [PATCH] MC-114618 - Fix EntityAreaEffectCloud from going negative
@ -6,10 +6,10 @@ Subject: [PATCH] MC-114618 - Fix EntityAreaEffectCloud from going negative
diff --git a/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java b/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java
index 91b434aff6..8ebf85dc6b 100644
index 3a8e105336..fe527aba52 100644
--- a/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java
+++ b/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java
@@ -163,6 +163,12 @@ public class EntityAreaEffectCloud extends Entity {
@@ -175,6 +175,12 @@ public class EntityAreaEffectCloud extends Entity {
super.tick();
boolean flag = this.l();
float f = this.getRadius();

Datei anzeigen

@ -1,4 +1,4 @@
From d91280b404da585a708ada87cd172dd832ab2364 Mon Sep 17 00:00:00 2001
From a80c7dd8d8dde293eabadf950661cc3f5b5d4fca Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Wed, 29 May 2019 04:01:22 +0100
Subject: [PATCH] ChunkMapDistance CME

Datei anzeigen

@ -1,14 +1,14 @@
From 8dccf6997c9352637853343a52abcdd7a96950e5 Mon Sep 17 00:00:00 2001
From cfd6e121847944f05ffba9e6650966f15db044a6 Mon Sep 17 00:00:00 2001
From: kickash32 <kickash32@gmail.com>
Date: Sun, 2 Jun 2019 01:22:02 -0400
Subject: [PATCH] Actually-Limit-Natural-Spawns-To-Limit
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index a58cfc14bb..26216fe72c 100644
index 0ce2d6d0fb..d30da20435 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -444,8 +444,12 @@ public class ChunkProviderServer extends IChunkProvider {
@@ -452,8 +452,12 @@ public class ChunkProviderServer extends IChunkProvider {
if (enumcreaturetype != EnumCreatureType.MISC && (!enumcreaturetype.c() || this.allowAnimals) && (enumcreaturetype.c() || this.allowMonsters) && (!enumcreaturetype.d() || flag2)) {
int k1 = limit * l / ChunkProviderServer.b; // CraftBukkit - use per-world limits

Datei anzeigen

@ -1,4 +1,4 @@
From c7ca2c14f74f080cd47fa9831cea2e0d04f78c33 Mon Sep 17 00:00:00 2001
From 282879b099576a7f5851f2306a9bfac9b6ac6f23 Mon Sep 17 00:00:00 2001
From: simpleauthority <jacob@algorithmjunkie.com>
Date: Tue, 28 May 2019 03:48:51 -0700
Subject: [PATCH] Implement CraftBlockSoundGroup

Datei anzeigen

@ -1,4 +1,4 @@
From 44adb27104789a1f6739d9c6ef7ccf378c45bc6f Mon Sep 17 00:00:00 2001
From 9867b160e76f323ac2623bae1440a178adb502f1 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Sat, 1 Jun 2019 13:00:55 -0700
Subject: [PATCH] Chunk debug command
@ -185,7 +185,7 @@ index 391726d99c..8db92edc36 100644
* Ported from MinecraftForge - author: LexManos <LexManos@gmail.com> - License: LGPLv2.1
*/
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 21032fa943..220cd197fa 100644
index d30da20435..cb78e14a05 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -22,7 +22,7 @@ import org.apache.logging.log4j.Logger;
@ -412,7 +412,7 @@ index 7407c1a564..14a176d61d 100644
private int dirtyCount;
private int r;
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 8470bf693d..60bd3a63e7 100644
index 67d011745f..493770bf68 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -57,7 +57,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@ -434,7 +434,7 @@ index 8470bf693d..60bd3a63e7 100644
private final DefinedStructureManager definedStructureManager;
private final File x;
diff --git a/src/main/java/net/minecraft/server/Ticket.java b/src/main/java/net/minecraft/server/Ticket.java
index c23a366b2c..e53cbd418b 100644
index 0430ca5353..badbe6c19d 100644
--- a/src/main/java/net/minecraft/server/Ticket.java
+++ b/src/main/java/net/minecraft/server/Ticket.java
@@ -6,8 +6,8 @@ public final class Ticket<T> implements Comparable<Ticket<?>> {

Datei anzeigen

@ -1,11 +1,11 @@
From cffcc434581178122d9cae2f3ac04815131d0840 Mon Sep 17 00:00:00 2001
From 24b13d1473de60e0424b5a62f4f92ffc471ebfc7 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sun, 9 Jun 2019 03:53:22 +0100
Subject: [PATCH] incremental chunk saving
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index de11a91af..4d3c6c6b4 100644
index de11a91af6..4d3c6c6b47 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -489,4 +489,19 @@ public class PaperWorldConfig {
@ -29,7 +29,7 @@ index de11a91af..4d3c6c6b4 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index ee8f80174..2003522d9 100644
index ee8f801745..2003522d96 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -42,7 +42,7 @@ public class Chunk implements IChunkAccess {
@ -42,7 +42,7 @@ index ee8f80174..2003522d9 100644
private long t;
@Nullable
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 9765eaf24..5fabfe87c 100644
index cb78e14a05..ca5963b11a 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -335,6 +335,15 @@ public class ChunkProviderServer extends IChunkProvider {
@ -60,9 +60,9 @@ index 9765eaf24..5fabfe87c 100644
+
@Override
public void close() throws IOException {
this.save(true);
// CraftBukkit start
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 380c3663a..6eef4592a 100644
index c58f6f50d3..2293360407 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -165,6 +165,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -106,7 +106,7 @@ index 380c3663a..6eef4592a 100644
this.methodProfiler.enter("snooper");
if (((DedicatedServer) this).getDedicatedServerProperties().snooperEnabled && !this.snooper.d() && this.ticks > 100) { // Spigot
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 493770bf6..2be6fa0f0 100644
index 493770bf68..2be6fa0f07 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -297,6 +297,36 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@ -147,7 +147,7 @@ index 493770bf6..2be6fa0f0 100644
if (flag) {
List<PlayerChunk> list = (List) this.visibleChunks.values().stream().filter(PlayerChunk::hasBeenLoaded).peek(PlayerChunk::m).collect(Collectors.toList());
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 1003ea50d..4148325a2 100644
index 1003ea50d3..4148325a26 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -756,11 +756,44 @@ public class WorldServer extends World {

Datei anzeigen

@ -1,4 +1,4 @@
From 4597e8c878afc739c30b9432335581ef98c1f252 Mon Sep 17 00:00:00 2001
From 44d0cac4322b4f99b41506189e942406b720ffaf Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Mon, 10 Jun 2019 09:36:40 +0100
Subject: [PATCH] Catch exceptions from dispenser entity spawns

Datei anzeigen

@ -1,4 +1,4 @@
From 3315876ab63c039fb2e795aae0fa079824cecd0e Mon Sep 17 00:00:00 2001
From a281cd55109105f08246f47bb9517a48feab713a Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Sat, 15 Jun 2019 08:54:33 -0700
Subject: [PATCH] Fix World#isChunkGenerated calls
@ -8,7 +8,7 @@ This patch also adds a chunk status cache on region files (note that
its only purpose is to cache the status on DISK)
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 5fabfe87c..2c6a164f0 100644
index ca5963b11a..3894b04342 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -28,7 +28,7 @@ public class ChunkProviderServer extends IChunkProvider {
@ -43,7 +43,7 @@ index 5fabfe87c..2c6a164f0 100644
@Nullable
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index e778c2e85..73f93e494 100644
index e778c2e857..73f93e4948 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -410,6 +410,17 @@ public class ChunkRegionLoader {
@ -65,7 +65,7 @@ index e778c2e85..73f93e494 100644
if (nbttagcompound != null) {
ChunkStatus chunkstatus = ChunkStatus.a(nbttagcompound.getCompound("Level").getString("Status"));
diff --git a/src/main/java/net/minecraft/server/ChunkStatus.java b/src/main/java/net/minecraft/server/ChunkStatus.java
index dd1822d6f..e324989b4 100644
index dd1822d6ff..e324989b46 100644
--- a/src/main/java/net/minecraft/server/ChunkStatus.java
+++ b/src/main/java/net/minecraft/server/ChunkStatus.java
@@ -176,6 +176,7 @@ public class ChunkStatus {
@ -95,7 +95,7 @@ index dd1822d6f..e324989b4 100644
return (ChunkStatus) IRegistry.CHUNK_STATUS.get(MinecraftKey.a(s));
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
index 14a176d61..98590e233 100644
index 14a176d61d..98590e233a 100644
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
@@ -70,6 +70,19 @@ public class PlayerChunk {
@ -119,7 +119,7 @@ index 14a176d61..98590e233 100644
public CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> getStatusFutureUnchecked(ChunkStatus chunkstatus) {
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 2be6fa0f0..bdadbd436 100644
index 2be6fa0f07..bdadbd436e 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -891,11 +891,61 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@ -187,12 +187,12 @@ index 2be6fa0f0..bdadbd436 100644
boolean isOutsideOfRange(ChunkCoordIntPair chunkcoordintpair) {
// Spigot start
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
index b0ec9edf6..41f1e15cb 100644
index 86ae53fed3..e6e412b7c1 100644
--- a/src/main/java/net/minecraft/server/RegionFile.java
+++ b/src/main/java/net/minecraft/server/RegionFile.java
@@ -31,6 +31,30 @@ public class RegionFile implements AutoCloseable {
private final int[] d = new int[1024];private int[] timestamps = d; // Paper - OBFHELPER
private final List<Boolean> e; private List<Boolean> getFreeSectors() { return this.e; } // Paper - OBFHELPER
private final int[] d = new int[1024]; private final int[] timestamps = d; // Paper - OBFHELPER
private final List<Boolean> e; // PAIL freeSectors
+ // Paper start - Cache chunk status
+ private final ChunkStatus[] statuses = new ChunkStatus[32 * 32];
@ -221,7 +221,7 @@ index b0ec9edf6..41f1e15cb 100644
public RegionFile(File file) throws IOException {
this.b = new RandomAccessFile(file, "rw");
this.file = file; // Spigot // Paper - We need this earlier
@@ -286,6 +310,7 @@ public class RegionFile implements AutoCloseable {
@@ -291,6 +315,7 @@ public class RegionFile implements AutoCloseable {
return this.c[this.f(chunkcoordintpair)];
}
@ -229,15 +229,15 @@ index b0ec9edf6..41f1e15cb 100644
public boolean d(ChunkCoordIntPair chunkcoordintpair) {
return this.getOffset(chunkcoordintpair) != 0;
}
@@ -300,6 +325,7 @@ public class RegionFile implements AutoCloseable {
this.c[j] = i; // Paper - move this to after the write
@@ -304,6 +329,7 @@ public class RegionFile implements AutoCloseable {
this.c[j] = i; // Spigot - move this to after the write
}
+ private final int getChunkLocation(ChunkCoordIntPair chunkcoordintpair) { return this.f(chunkcoordintpair); } // Paper - OBFHELPER
private int f(ChunkCoordIntPair chunkcoordintpair) {
return chunkcoordintpair.j() + chunkcoordintpair.k() * 32;
}
@@ -315,6 +341,7 @@ public class RegionFile implements AutoCloseable {
@@ -318,6 +344,7 @@ public class RegionFile implements AutoCloseable {
}
public void close() throws IOException {
@ -246,7 +246,7 @@ index b0ec9edf6..41f1e15cb 100644
}
diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java
index 6f34d8aea..d2b328945 100644
index 6f34d8aea0..d2b3289450 100644
--- a/src/main/java/net/minecraft/server/RegionFileCache.java
+++ b/src/main/java/net/minecraft/server/RegionFileCache.java
@@ -47,6 +47,12 @@ public abstract class RegionFileCache implements AutoCloseable {
@ -279,7 +279,7 @@ index 6f34d8aea..d2b328945 100644
printOversizedLog("ChunkTooLarge even after reduction. Trying in overzealous mode.", regionfile.file, chunkX, chunkZ);
// Eek, major fail. We have retry logic, so reduce threshholds and fall back
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index acf151a25..a2b6c3c94 100644
index ceb256222f..21f1530138 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -393,8 +393,22 @@ public class CraftWorld implements World {

Datei anzeigen

@ -1,4 +1,4 @@
From ea7b4ced04c403a37b00158512027f35f0892d3f Mon Sep 17 00:00:00 2001
From d06b36e7d5bd3ef23b800fce2c461581d1d8c0b2 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Sat, 15 Jun 2019 10:28:25 -0700
Subject: [PATCH] Show blockstate location if we failed to read it

Datei anzeigen

@ -1,4 +1,4 @@
From 77b5bfcb86df30c3e0bbcaf5dd5746eed768f9fa Mon Sep 17 00:00:00 2001
From 3aa0ab156ffd994ad737bc2f76af3d7475c8a9b0 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Fri, 21 Jun 2019 14:42:48 -0700
Subject: [PATCH] Log other thread in DataPaletteBlock lock failure

Datei anzeigen

@ -1,4 +1,4 @@
From c37c254f623531a867bcac6b5cb7cbb1d48b60da Mon Sep 17 00:00:00 2001
From ced736fc443de0c3b20f67e4781b14aa63ecf6f9 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Sat, 22 Jun 2019 04:20:47 -0700
Subject: [PATCH] Use ChunkStatus cache when saving protochunks
@ -7,7 +7,7 @@ The cache should contain the chunk status when saving. If not it
will load it.
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index bdadbd436..fbbd4d5dd 100644
index bdadbd436e..fbbd4d5dd0 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -768,8 +768,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {

Datei anzeigen

@ -1,11 +1,11 @@
From b953a9e663b95822621257afde5f98387acffdb9 Mon Sep 17 00:00:00 2001
From 30e17b2ad5a927f202ccb708ab7d6d251db6b5eb Mon Sep 17 00:00:00 2001
From: stonar96 <minecraft.stonar96@gmail.com>
Date: Mon, 20 Aug 2018 03:03:58 +0200
Subject: [PATCH] Anti-Xray
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 81987e4ad..5942c3438 100644
index 81987e4ad9..5942c3438e 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -71,8 +71,8 @@ public class PaperConfig {
@ -20,7 +20,7 @@ index 81987e4ad..5942c3438 100644
}
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 4d3c6c6b4..929f5c303 100644
index 4d3c6c6b47..929f5c3031 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -1,7 +1,11 @@
@ -81,7 +81,7 @@ index 4d3c6c6b4..929f5c303 100644
}
diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockController.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockController.java
new file mode 100644
index 000000000..f7e376ce6
index 0000000000..f7e376ce6a
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockController.java
@@ -0,0 +1,46 @@
@ -133,7 +133,7 @@ index 000000000..f7e376ce6
+}
diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java
new file mode 100644
index 000000000..23626bef3
index 0000000000..23626bef3a
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java
@@ -0,0 +1,782 @@
@ -921,7 +921,7 @@ index 000000000..23626bef3
+}
diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfo.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfo.java
new file mode 100644
index 000000000..a68bace35
index 0000000000..a68bace353
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfo.java
@@ -0,0 +1,81 @@
@ -1008,7 +1008,7 @@ index 000000000..a68bace35
+}
diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfoAntiXray.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfoAntiXray.java
new file mode 100644
index 000000000..067dfb2f1
index 0000000000..067dfb2f14
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfoAntiXray.java
@@ -0,0 +1,31 @@
@ -1045,7 +1045,7 @@ index 000000000..067dfb2f1
+}
diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java
new file mode 100644
index 000000000..cc586827a
index 0000000000..cc586827aa
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java
@@ -0,0 +1,56 @@
@ -1107,7 +1107,7 @@ index 000000000..cc586827a
+}
diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java
new file mode 100644
index 000000000..37093419c
index 0000000000..37093419cf
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java
@@ -0,0 +1,84 @@
@ -1196,7 +1196,7 @@ index 000000000..37093419c
+ }
+}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 2003522d9..d604f96c1 100644
index 2003522d96..d604f96c16 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -315,7 +315,7 @@ public class Chunk implements IChunkAccess {
@ -1209,7 +1209,7 @@ index 2003522d9..d604f96c1 100644
}
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 73f93e494..a02807411 100644
index 73f93e4948..a028074112 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -74,7 +74,7 @@ public class ChunkRegionLoader {
@ -1231,7 +1231,7 @@ index 73f93e494..a02807411 100644
object = protochunk;
protochunk.a(abiomebase);
diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java
index ca2bf8b77..584b3e639 100644
index ca2bf8b770..584b3e6393 100644
--- a/src/main/java/net/minecraft/server/ChunkSection.java
+++ b/src/main/java/net/minecraft/server/ChunkSection.java
@@ -6,21 +6,31 @@ public class ChunkSection {
@ -1270,7 +1270,7 @@ index ca2bf8b77..584b3e639 100644
public IBlockData getType(int i, int j, int k) {
diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java
index 1e2bca1e0..8fba1e2f3 100644
index 1e2bca1e04..8fba1e2f3d 100644
--- a/src/main/java/net/minecraft/server/DataPaletteBlock.java
+++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java
@@ -3,6 +3,7 @@ package net.minecraft.server;
@ -1392,7 +1392,7 @@ index 1e2bca1e0..8fba1e2f3 100644
if (this.h == this.b) {
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
index e156804f7..96a785af2 100644
index e156804f7a..96a785af27 100644
--- a/src/main/java/net/minecraft/server/NetworkManager.java
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
@@ -42,7 +42,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
@ -1455,7 +1455,7 @@ index e156804f7..96a785af2 100644
public void a() {
this.o();
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
index ef71a1feb..483317608 100644
index ef71a1feb3..483317608c 100644
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
@@ -1,5 +1,6 @@
@ -1548,7 +1548,7 @@ index ef71a1feb..483317608 100644
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
index 98590e233..af934ef8b 100644
index 98590e233a..af934ef8bc 100644
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
@@ -176,6 +176,11 @@ public class PlayerChunk {
@ -1573,7 +1573,7 @@ index 98590e233..af934ef8b 100644
this.a(new PacketPlayOutMultiBlockChange(this.dirtyCount, this.dirtyBlocks, chunk), false);
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index fbbd4d5dd..fd0d2b6e6 100644
index fbbd4d5dd0..fd0d2b6e67 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -539,7 +539,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@ -1595,7 +1595,7 @@ index fbbd4d5dd..fd0d2b6e6 100644
}
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
index 1c79890e3..e5e9de542 100644
index 1c79890e3f..e5e9de542b 100644
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
@@ -253,6 +253,8 @@ public class PlayerInteractManager {
@ -1608,7 +1608,7 @@ index 1c79890e3..e5e9de542 100644
public void a(BlockPosition blockposition, PacketPlayInBlockDig.EnumPlayerDigType packetplayinblockdig_enumplayerdigtype) {
diff --git a/src/main/java/net/minecraft/server/ProtoChunk.java b/src/main/java/net/minecraft/server/ProtoChunk.java
index 6bdd7dda0..7bad12eb0 100644
index 6bdd7dda04..7bad12eb00 100644
--- a/src/main/java/net/minecraft/server/ProtoChunk.java
+++ b/src/main/java/net/minecraft/server/ProtoChunk.java
@@ -44,16 +44,28 @@ public class ProtoChunk implements IChunkAccess {
@ -1651,7 +1651,7 @@ index 6bdd7dda0..7bad12eb0 100644
return this.j[i];
diff --git a/src/main/java/net/minecraft/server/TicketType.java b/src/main/java/net/minecraft/server/TicketType.java
index 157ca6a7e..9c114d2d3 100644
index 157ca6a7e6..9c114d2d37 100644
--- a/src/main/java/net/minecraft/server/TicketType.java
+++ b/src/main/java/net/minecraft/server/TicketType.java
@@ -21,6 +21,7 @@ public class TicketType<T> {
@ -1663,7 +1663,7 @@ index 157ca6a7e..9c114d2d3 100644
public static <T> TicketType<T> a(String s, Comparator<T> comparator) {
return new TicketType<>(s, comparator, 0L);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 10c149fae..ab98c7b79 100644
index 10c149faec..ab98c7b796 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -2,6 +2,8 @@ package net.minecraft.server;
@ -1700,7 +1700,7 @@ index 10c149fae..ab98c7b79 100644
if (iblockdata1 == null) {
// CraftBukkit start - remove blockstate if failed
diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java b/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java
index 7772d5900..4570ed999 100644
index 7772d59005..4570ed9991 100644
--- a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java
+++ b/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java
@@ -21,9 +21,11 @@ public final class CraftChunkData implements ChunkGenerator.ChunkData {

Datei anzeigen

@ -1,4 +1,4 @@
From 5e472e2806995e8cf0cb95ec7452ebde738dd3d8 Mon Sep 17 00:00:00 2001
From bd8d126fa7f77f55f6e29c10fcc77390f250e282 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 24 Mar 2019 01:01:32 -0400
Subject: [PATCH] Only count Natural Spawned mobs towards natural spawn mob
@ -17,7 +17,7 @@ This should fully solve all of the issues around it so that only natural
influences natural spawns.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 929f5c303..ff520d9e8 100644
index 929f5c3031..ff520d9e86 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -509,6 +509,16 @@ public class PaperWorldConfig {
@ -38,7 +38,7 @@ index 929f5c303..ff520d9e8 100644
public boolean asynchronous;
public EngineMode engineMode;
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 4148325a2..7faa5dd84 100644
index 4148325a26..7faa5dd84a 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -899,6 +899,13 @@ public class WorldServer extends World {

Datei anzeigen

@ -1,4 +1,4 @@
From 88cb7775e487f94a1bdda8f8722f4a0404965ca4 Mon Sep 17 00:00:00 2001
From 15ae33fdf438a0d55998add482f6964989fd98fa Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Mon, 8 Jul 2019 00:13:36 -0700
Subject: [PATCH] Use getChunkIfLoadedImmediately in places
@ -21,7 +21,7 @@ index 55c73ffcaa..e8def7f812 100644
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 8d48495eb7..9cf6cc53f4 100644
index 4187ba05bd..e7b8b2e992 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -981,7 +981,7 @@ public class PlayerConnection implements PacketListenerPlayIn {

Datei anzeigen

@ -1,4 +1,4 @@
From d8c12019140334bf58354a929f9681fd457f6c66 Mon Sep 17 00:00:00 2001
From d96a4efc6bb4e9f5337a315866a58004213d3c6b Mon Sep 17 00:00:00 2001
From: Lucavon <lucavonlp@gmail.com>
Date: Tue, 23 Jul 2019 20:29:20 -0500
Subject: [PATCH] Configurable projectile relative velocity
@ -39,7 +39,7 @@ index ff520d9e86..318a470eea 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
index af0f5cb00f..25ddaae482 100644
index a9575d310b..5f3e1ccb4e 100644
--- a/src/main/java/net/minecraft/server/EntityArrow.java
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
@@ -85,7 +85,7 @@ public abstract class EntityArrow extends Entity implements IProjectile {

Datei anzeigen

@ -1,11 +1,11 @@
From e932d77aab4de7670f848d83f8e50e53eae4513a Mon Sep 17 00:00:00 2001
From 57c0b62fe62dee94a1677e7882991f2f86b3536e Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sun, 28 Jul 2019 00:51:11 +0100
Subject: [PATCH] Mark entities as being ticked when notifying navigation
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 7faa5dd84..451ad4f32 100644
index 7faa5dd84a..451ad4f32b 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1311,6 +1311,7 @@ public class WorldServer extends World {

Datei anzeigen

@ -1,11 +1,11 @@
From 45d31e0fb763a4fdc9d96a959d88bff6877ccb50 Mon Sep 17 00:00:00 2001
From 6571748607bac393655db682f7cb6621e8bac280 Mon Sep 17 00:00:00 2001
From: kickash32 <kickash32@gmail.com>
Date: Tue, 30 Jul 2019 03:17:16 +0500
Subject: [PATCH] offset item frame ticking
diff --git a/src/main/java/net/minecraft/server/EntityHanging.java b/src/main/java/net/minecraft/server/EntityHanging.java
index 3b282a18a..636a0bc4e 100644
index 3b282a18a2..2b4a849f48 100644
--- a/src/main/java/net/minecraft/server/EntityHanging.java
+++ b/src/main/java/net/minecraft/server/EntityHanging.java
@@ -15,7 +15,7 @@ public abstract class EntityHanging extends Entity {

Datei anzeigen

@ -0,0 +1,23 @@
From 0739db695afc0dc5c7e9f6dbe6289075455cadee Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Mon, 5 Aug 2019 08:24:01 -0700
Subject: [PATCH] Preserve old flush on save flag for reliable regionfiles
Originally this patch was in paper
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
index e6e412b7c1..b4c191d538 100644
--- a/src/main/java/net/minecraft/server/RegionFile.java
+++ b/src/main/java/net/minecraft/server/RegionFile.java
@@ -349,7 +349,7 @@ public class RegionFile implements AutoCloseable {
}
// Spigot start - Make region files reliable
- private static final boolean FLUSH_ON_SAVE = Boolean.getBoolean("spigot.flush-on-save");
+ private static final boolean FLUSH_ON_SAVE = Boolean.getBoolean("spigot.flush-on-save") || Boolean.getBoolean("paper.flush-on-save"); // Paper - preserve old flag
private void syncRegionFile() throws IOException {
if (!FLUSH_ON_SAVE) {
return;
--
2.22.0

Datei anzeigen

@ -1,22 +0,0 @@
From 6f1992e5ac2e92994e9dae8a36bb25a9044bbcb2 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Tue, 23 Jul 2019 21:11:30 -0700
Subject: [PATCH] fixup! Optimize TileEntity Ticking
diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java
index 6c10f0eb89..4aa56e50e8 100644
--- a/src/main/java/net/minecraft/server/TileEntityChest.java
+++ b/src/main/java/net/minecraft/server/TileEntityChest.java
@@ -114,7 +114,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic
int j = this.position.getY();
int k = this.position.getZ();
- this.viewingCount = a(this.world, this, this.j, i, j, k, this.viewingCount);
+ //this.viewingCount = a(this.world, this, this.j, i, j, k, this.viewingCount); // Paper - check is faulty given our logic is called before active container set
this.b = this.a;
float f = 0.1F;
--
2.22.0

@ -1 +1 @@
Subproject commit 3d9d2efcea61cf3dba713aa989ae7a362db68458
Subproject commit bde198c9e927cc58b4773dc343825f15f7a8add6

@ -1 +1 @@
Subproject commit 3e7b3862c7d1c718a47d1d5e54de8e3ea5845bbf
Subproject commit 1ec1b05e2a808326e9acbfcc3ffbdbdb4d4328c7

@ -1 +1 @@
Subproject commit 1981d553d1119cd80acb63db4d5612bc16179cb4
Subproject commit e5b1b5dbb1c8546af20b21db92bd07a0029d4030