Updated Upstream (Paper)

Upstream has released updates that appears to apply and compile correctly

Paper Changes:
70df8f27 Add PrepareGrindstoneEvent
24b2f54b Fix Player skulls for offline mode servers
ce270e14 Updated Upstream (Bukkit/CraftBukkit/Spigot)
c4ada0e1 Fix many chunk loading issues
37b244b5 Fix not running level updates for light if no pre/post task
e6142995 Add and implement PlayerRecipeBookClickEvent (#3351)
9bb4e930 Fix piston dupe patch creating ghost blocks (#3603)
This commit is contained in:
William Blake Galbreath
2020-06-23 14:20:44 -05:00
parent 07c44e35f2
commit 05a85435d2
27 changed files with 115 additions and 193 deletions

2
Paper

Submodule Paper updated: e9c332ddb6...70df8f2716

View File

@@ -1 +1 @@
1.15.2--e969d978e39ac6372ae28161c7aa895478d973f7
1.15.2--c9a7a8c3a5d1f9feafc43f246ab79fe31270202d

View File

@@ -1,4 +1,4 @@
From f8cfeaa389b54346ba976cf1f330dc60d78b571d Mon Sep 17 00:00:00 2001
From ed82e825eb9705667b56300afc136bbc830131ae Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Fri, 14 Dec 2018 21:53:58 -0800
Subject: [PATCH] Tuinity Server Changes
@@ -37,7 +37,6 @@ Subject: [PATCH] Tuinity Server Changes
.../java/net/minecraft/server/IBlockData.java | 12 +
.../minecraft/server/ICollisionAccess.java | 39 +-
.../minecraft/server/LightEngineStorage.java | 5 +-
.../minecraft/server/LightEngineThreaded.java | 13 +-
.../java/net/minecraft/server/MCUtil.java | 14 +
.../net/minecraft/server/MinecraftServer.java | 110 +++-
.../net/minecraft/server/NetworkManager.java | 59 +-
@@ -88,7 +87,7 @@ Subject: [PATCH] Tuinity Server Changes
.../bukkit/craftbukkit/util/Versioning.java | 2 +-
src/main/java/org/spigotmc/AsyncCatcher.java | 2 +-
.../java/org/spigotmc/WatchdogThread.java | 79 +++
84 files changed, 3977 insertions(+), 387 deletions(-)
83 files changed, 3967 insertions(+), 384 deletions(-)
create mode 100644 src/main/java/com/tuinity/tuinity/chunk/SingleThreadChunkRegionManager.java
create mode 100644 src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
create mode 100644 src/main/java/com/tuinity/tuinity/util/CachedLists.java
@@ -1564,7 +1563,7 @@ index 72fb92f7c..6ea29ffc0 100644
if (tileentity instanceof IInventory) {
InventoryUtils.dropInventory(world, blockposition, (IInventory) tileentity);
diff --git a/src/main/java/net/minecraft/server/BlockPiston.java b/src/main/java/net/minecraft/server/BlockPiston.java
index f90ac88d3..8312ed779 100644
index 73ac83832..8312ed779 100644
--- a/src/main/java/net/minecraft/server/BlockPiston.java
+++ b/src/main/java/net/minecraft/server/BlockPiston.java
@@ -279,8 +279,10 @@ public class BlockPiston extends BlockDirectional {
@@ -1614,7 +1613,7 @@ index f90ac88d3..8312ed779 100644
+ }
+ // Tuinity end - pushable TE's
if (!allowDesync) {
- world.setTypeAndData(oldPos, Blocks.AIR.getBlockData(), 4 | 16 | 1024); // set air to prevent later physics updates from seeing this block
- world.setTypeAndData(oldPos, Blocks.AIR.getBlockData(), 2 | 4 | 16 | 1024); // set air to prevent later physics updates from seeing this block
+ world.setTypeAndDataRaw(oldPos, Blocks.AIR.getBlockData(), null); // Tuinity - don't fire logic for removing the old block
}
+ world.setTileEntity(blockposition3, BlockPistonMoving.createPistonTile(allowDesync ? list1.get(k) : iblockdata1, enumdirection, flag, false, tileEntity)); // Tuinity - pushable TE's
@@ -1751,7 +1750,7 @@ index 55f9f4e6e..15f0f86a3 100644
this.a(ChunkCoordIntPair.a, i, j, flag);
}
diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java
index a013753bd..26994b478 100644
index 9a84d1749..e0378f486 100644
--- a/src/main/java/net/minecraft/server/ChunkMapDistance.java
+++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java
@@ -31,7 +31,7 @@ public abstract class ChunkMapDistance {
@@ -1895,7 +1894,7 @@ index a013753bd..26994b478 100644
}
if (arraysetsorted.isEmpty()) {
@@ -347,6 +393,7 @@ public abstract class ChunkMapDistance {
@@ -369,6 +415,7 @@ public abstract class ChunkMapDistance {
}
private ArraySetSorted<Ticket<?>> e(long i) {
@@ -1903,7 +1902,7 @@ index a013753bd..26994b478 100644
return (ArraySetSorted) this.tickets.computeIfAbsent(i, (j) -> {
return ArraySetSorted.a(4);
});
@@ -364,6 +411,7 @@ public abstract class ChunkMapDistance {
@@ -386,6 +433,7 @@ public abstract class ChunkMapDistance {
}
public void a(SectionPosition sectionposition, EntityPlayer entityplayer) {
@@ -1911,7 +1910,7 @@ index a013753bd..26994b478 100644
long i = sectionposition.u().pair();
((ObjectSet) this.c.computeIfAbsent(i, (j) -> {
@@ -374,6 +422,7 @@ public abstract class ChunkMapDistance {
@@ -396,6 +444,7 @@ public abstract class ChunkMapDistance {
}
public void b(SectionPosition sectionposition, EntityPlayer entityplayer) {
@@ -1919,7 +1918,7 @@ index a013753bd..26994b478 100644
long i = sectionposition.u().pair();
ObjectSet<EntityPlayer> objectset = (ObjectSet) this.c.get(i);
@@ -423,6 +472,7 @@ public abstract class ChunkMapDistance {
@@ -445,6 +494,7 @@ public abstract class ChunkMapDistance {
// CraftBukkit start
public <T> void removeAllTicketsFor(TicketType<T> ticketType, int ticketLevel, T ticketIdentifier) {
@@ -1928,7 +1927,7 @@ index a013753bd..26994b478 100644
for (java.util.Iterator<Entry<ArraySetSorted<Ticket<?>>>> iterator = this.tickets.long2ObjectEntrySet().fastIterator(); iterator.hasNext();) {
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 75c22a3f4..24af59962 100644
index 7d50b94cb..e8bf60507 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -118,7 +118,7 @@ public class ChunkProviderServer extends IChunkProvider {
@@ -2116,7 +2115,7 @@ index 75c22a3f4..24af59962 100644
public ChunkProviderServer(WorldServer worldserver, File file, DataFixer datafixer, DefinedStructureManager definedstructuremanager, Executor executor, ChunkGenerator<?> chunkgenerator, int i, WorldLoadListener worldloadlistener, Supplier<WorldPersistentData> supplier) {
this.world = worldserver;
@@ -533,6 +690,8 @@ public class ChunkProviderServer extends IChunkProvider {
@@ -543,6 +700,8 @@ public class ChunkProviderServer extends IChunkProvider {
Arrays.fill(this.cacheChunk, (Object) null);
}
@@ -2125,7 +2124,7 @@ index 75c22a3f4..24af59962 100644
private CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> getChunkFutureMainThread(int i, int j, ChunkStatus chunkstatus, boolean flag) {
// Paper start - add isUrgent - old sig left in place for dirty nms plugins
return getChunkFutureMainThread(i, j, chunkstatus, flag, false);
@@ -551,9 +710,12 @@ public class ChunkProviderServer extends IChunkProvider {
@@ -561,9 +720,12 @@ public class ChunkProviderServer extends IChunkProvider {
PlayerChunk.State currentChunkState = PlayerChunk.getChunkState(playerchunk.getTicketLevel());
currentlyUnloading = (oldChunkState.isAtLeast(PlayerChunk.State.BORDER) && !currentChunkState.isAtLeast(PlayerChunk.State.BORDER));
}
@@ -2138,7 +2137,7 @@ index 75c22a3f4..24af59962 100644
if (isUrgent) this.chunkMapDistance.markUrgent(chunkcoordintpair); // Paper
if (this.a(playerchunk, l)) {
GameProfilerFiller gameprofilerfiller = this.world.getMethodProfiler();
@@ -564,12 +726,20 @@ public class ChunkProviderServer extends IChunkProvider {
@@ -574,12 +736,20 @@ public class ChunkProviderServer extends IChunkProvider {
playerchunk = this.getChunk(k);
gameprofilerfiller.exit();
if (this.a(playerchunk, l)) {
@@ -2160,7 +2159,7 @@ index 75c22a3f4..24af59962 100644
if (isUrgent) {
future.thenAccept(either -> this.chunkMapDistance.clearUrgent(chunkcoordintpair));
}
@@ -731,7 +901,7 @@ public class ChunkProviderServer extends IChunkProvider {
@@ -741,7 +911,7 @@ public class ChunkProviderServer extends IChunkProvider {
this.world.getMethodProfiler().enter("purge");
this.world.timings.doChunkMap.startTiming(); // Spigot
this.chunkMapDistance.purgeTickets();
@@ -2169,7 +2168,7 @@ index 75c22a3f4..24af59962 100644
this.tickDistanceManager();
this.world.timings.doChunkMap.stopTiming(); // Spigot
this.world.getMethodProfiler().exitEnter("chunks");
@@ -741,12 +911,22 @@ public class ChunkProviderServer extends IChunkProvider {
@@ -751,12 +921,22 @@ public class ChunkProviderServer extends IChunkProvider {
this.world.timings.doChunkUnload.startTiming(); // Spigot
this.world.getMethodProfiler().exitEnter("unload");
this.playerChunkMap.unloadChunks(booleansupplier);
@@ -2193,7 +2192,7 @@ index 75c22a3f4..24af59962 100644
private void tickChunks() {
long i = this.world.getTime();
long j = i - this.lastTickTime;
@@ -822,11 +1002,12 @@ public class ChunkProviderServer extends IChunkProvider {
@@ -832,11 +1012,12 @@ public class ChunkProviderServer extends IChunkProvider {
this.world.timings.countNaturalMobs.stopTiming(); // Paper - timings
this.world.getMethodProfiler().exit();
// Paper - replaced by above
@@ -2211,7 +2210,7 @@ index 75c22a3f4..24af59962 100644
this.world.getMethodProfiler().enter("broadcast");
this.world.timings.broadcastChunkUpdates.startTiming(); // Paper - timings
@@ -905,10 +1086,26 @@ public class ChunkProviderServer extends IChunkProvider {
@@ -915,10 +1096,26 @@ public class ChunkProviderServer extends IChunkProvider {
this.world.timings.chunkTicks.startTiming(); // Spigot // Paper
this.world.a(chunk, k);
this.world.timings.chunkTicks.stopTiming(); // Spigot // Paper
@@ -2240,7 +2239,7 @@ index 75c22a3f4..24af59962 100644
this.world.getMethodProfiler().enter("customSpawners");
if (flag1) {
try (co.aikar.timings.Timing ignored = this.world.timings.miscMobSpawning.startTiming()) { // Paper - timings
@@ -920,7 +1117,25 @@ public class ChunkProviderServer extends IChunkProvider {
@@ -930,7 +1127,25 @@ public class ChunkProviderServer extends IChunkProvider {
this.world.getMethodProfiler().exit();
}
@@ -2266,7 +2265,7 @@ index 75c22a3f4..24af59962 100644
}
@Override
@@ -1046,44 +1261,11 @@ public class ChunkProviderServer extends IChunkProvider {
@@ -1056,44 +1271,11 @@ public class ChunkProviderServer extends IChunkProvider {
ChunkProviderServer.this.world.getMethodProfiler().c("runTask");
super.executeTask(runnable);
}
@@ -2891,38 +2890,6 @@ index f2575fb69..89985a61e 100644
Entry entry;
long j;
diff --git a/src/main/java/net/minecraft/server/LightEngineThreaded.java b/src/main/java/net/minecraft/server/LightEngineThreaded.java
index 604fe8531..bf22ee3d7 100644
--- a/src/main/java/net/minecraft/server/LightEngineThreaded.java
+++ b/src/main/java/net/minecraft/server/LightEngineThreaded.java
@@ -282,17 +282,24 @@ public class LightEngineThreaded extends LightEngine implements AutoCloseable {
}
// Paper start - replace impl
+ private final java.util.List<Runnable> pre = new java.util.ArrayList<>(); // Tuinity - stop allocating
+ private final java.util.List<Runnable> post = new java.util.ArrayList<>(); // Tuinity - stop allocating
private void b() {
- java.util.List<Runnable> pre = new java.util.ArrayList<>();
- java.util.List<Runnable> post = new java.util.ArrayList<>();
+ // Tuinity - stop allocating
+ boolean ran = false; // Tuinity - fix error in updating
int i = Math.min(queue.size(), 4);
while (i-- > 0 && queue.poll(pre, post)) {
pre.forEach(Runnable::run);
pre.clear();
- super.a(Integer.MAX_VALUE, true, true);
+ super.a(Integer.MAX_VALUE, true, true); ran = true; // Tuinity - fix error in updating
post.forEach(Runnable::run);
post.clear();
}
+ // Tuinity start - fix error in updating
+ if (!ran) {
+ super.a(Integer.MAX_VALUE, true, true);
+ }
+ // Tuinity end - fix error in updating
// Paper end
}
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
index 87d580021..973bdd25c 100644
--- a/src/main/java/net/minecraft/server/MCUtil.java
@@ -3484,10 +3451,10 @@ index 4240ca81c..61e4dbcd4 100644
}
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
index 9c1be2e2d..7e24de37b 100644
index 2edb4904d..44d6f2deb 100644
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
@@ -504,6 +504,7 @@ public class PlayerChunk {
@@ -507,6 +507,7 @@ public class PlayerChunk {
// Paper end - per player view distance
}
@@ -3495,7 +3462,7 @@ index 9c1be2e2d..7e24de37b 100644
public CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> a(ChunkStatus chunkstatus, PlayerChunkMap playerchunkmap) {
int i = chunkstatus.c();
CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> completablefuture = (CompletableFuture) this.statusFutures.get(i);
@@ -559,6 +560,7 @@ public class PlayerChunk {
@@ -562,6 +563,7 @@ public class PlayerChunk {
}
protected void a(PlayerChunkMap playerchunkmap) {
@@ -3503,7 +3470,7 @@ index 9c1be2e2d..7e24de37b 100644
ChunkStatus chunkstatus = getChunkStatus(this.oldTicketLevel);
ChunkStatus chunkstatus1 = getChunkStatus(this.ticketLevel);
boolean flag = this.oldTicketLevel <= PlayerChunkMap.GOLDEN_TICKET;
@@ -568,7 +570,8 @@ public class PlayerChunk {
@@ -571,7 +573,8 @@ public class PlayerChunk {
// CraftBukkit start
// ChunkUnloadEvent: Called before the chunk is unloaded: isChunkLoaded is still true and chunk can still be modified by plugins.
if (playerchunk_state.isAtLeast(PlayerChunk.State.BORDER) && !playerchunk_state1.isAtLeast(PlayerChunk.State.BORDER)) {
@@ -3513,31 +3480,31 @@ index 9c1be2e2d..7e24de37b 100644
Chunk chunk = (Chunk)either.left().orElse(null);
if (chunk != null) {
playerchunkmap.callbackExecutor.execute(() -> {
@@ -633,7 +636,8 @@ public class PlayerChunk {
@@ -636,7 +639,8 @@ public class PlayerChunk {
if (!flag2 && flag3) {
// Paper start - cache ticking ready status
int expectCreateCount = ++this.fullChunkCreateCount;
- this.fullChunkFuture = playerchunkmap.b(this); MCUtil.ensureMain(this.fullChunkFuture).thenAccept((either) -> { // Paper - ensure main
- this.fullChunkFuture = playerchunkmap.b(this); ensureMain(this.fullChunkFuture).thenAccept((either) -> { // Paper - ensure main
+ this.fullChunkFuture = playerchunkmap.b(this); this.fullChunkFuture.thenAccept((either) -> { // Paper - ensure main // Tuinity - always fired on main
+ com.tuinity.tuinity.util.TickThread.ensureTickThread("Async full chunk future completion"); // Tuinity
if (either.left().isPresent() && PlayerChunk.this.fullChunkCreateCount == expectCreateCount) {
// note: Here is a very good place to add callbacks to logic waiting on this.
Chunk fullChunk = either.left().get();
@@ -664,7 +668,8 @@ public class PlayerChunk {
@@ -667,7 +671,8 @@ public class PlayerChunk {
if (!flag4 && flag5) {
// Paper start - cache ticking ready status
- this.tickingFuture = playerchunkmap.a(this); MCUtil.ensureMain(this.tickingFuture).thenAccept((either) -> { // Paper - ensure main
- this.tickingFuture = playerchunkmap.a(this); ensureMain(this.tickingFuture).thenAccept((either) -> { // Paper - ensure main
+ this.tickingFuture = playerchunkmap.a(this); this.tickingFuture.thenAccept((either) -> { // Paper - ensure main // Tuinity - always completed on main
+ com.tuinity.tuinity.util.TickThread.ensureTickThread("Async ticking chunk future completion"); // Tuinity
if (either.left().isPresent()) {
// note: Here is a very good place to add callbacks to logic waiting on this.
Chunk tickingChunk = either.left().get();
@@ -695,12 +700,20 @@ public class PlayerChunk {
@@ -698,12 +703,20 @@ public class PlayerChunk {
}
// Paper start - cache ticking ready status
- this.entityTickingFuture = playerchunkmap.b(this.location); MCUtil.ensureMain(this.entityTickingFuture).thenAccept((either) -> { // Paper ensureMain
- this.entityTickingFuture = playerchunkmap.b(this.location); ensureMain(this.entityTickingFuture).thenAccept((either) -> { // Paper ensureMain
+ this.entityTickingFuture = playerchunkmap.b(this.location); this.entityTickingFuture.thenAccept((either) -> { // Paper ensureMain // Tuinity - always completed on main
+ com.tuinity.tuinity.util.TickThread.ensureTickThread("Async entity ticking chunk future completion"); // Tuinity
if (either.left().isPresent()) {
@@ -3556,7 +3523,7 @@ index 9c1be2e2d..7e24de37b 100644
@@ -712,6 +725,17 @@ public class PlayerChunk {
@@ -715,6 +728,17 @@ public class PlayerChunk {
if (flag6 && !flag7) {
this.entityTickingFuture.complete(PlayerChunk.UNLOADED_CHUNK); this.isEntityTickingReady = false; // Paper - cache chunk ticking stage
@@ -3574,7 +3541,7 @@ index 9c1be2e2d..7e24de37b 100644
this.entityTickingFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE;
}
// Paper start - raise IO/load priority if priority changes, use our preferred priority
@@ -737,7 +761,8 @@ public class PlayerChunk {
@@ -740,7 +764,8 @@ public class PlayerChunk {
// CraftBukkit start
// ChunkLoadEvent: Called after the chunk is loaded: isChunkLoaded returns true and chunk is ready to be modified by plugins.
if (!playerchunk_state.isAtLeast(PlayerChunk.State.BORDER) && playerchunk_state1.isAtLeast(PlayerChunk.State.BORDER)) {
@@ -3585,7 +3552,7 @@ index 9c1be2e2d..7e24de37b 100644
if (chunk != null) {
playerchunkmap.callbackExecutor.execute(() -> {
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 8abf276a3..13f5857ae 100644
index 201221df6..34ec3b9d7 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -117,31 +117,28 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -3655,7 +3622,7 @@ index 8abf276a3..13f5857ae 100644
int chunkX = MCUtil.getChunkCoordinate(player.locX());
int chunkZ = MCUtil.getChunkCoordinate(player.locZ());
// Note: players need to be explicitly added to distance maps before they can be updated
@@ -722,6 +722,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -740,6 +740,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@Nullable
private PlayerChunk a(long i, int j, @Nullable PlayerChunk playerchunk, int k) {
@@ -3663,7 +3630,7 @@ index 8abf276a3..13f5857ae 100644
if (k > PlayerChunkMap.GOLDEN_TICKET && j > PlayerChunkMap.GOLDEN_TICKET) {
return playerchunk;
} else {
@@ -935,7 +936,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -953,7 +954,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
com.destroystokyo.paper.io.PaperFileIOThread.Holder.INSTANCE.scheduleSave(this.world, chunkPos.x, chunkPos.z,
@@ -3672,7 +3639,7 @@ index 8abf276a3..13f5857ae 100644
if (!chunk.isNeedsSaving()) {
return;
@@ -969,7 +970,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -987,7 +988,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
asyncSaveData = ChunkRegionLoader.getAsyncSaveData(this.world, chunk);
}
@@ -3681,7 +3648,7 @@ index 8abf276a3..13f5857ae 100644
asyncSaveData, chunk);
chunk.setLastSaved(this.world.getTime());
@@ -1024,6 +1025,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1042,6 +1043,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
protected boolean b() {
@@ -3689,7 +3656,7 @@ index 8abf276a3..13f5857ae 100644
if (!this.updatingChunksModified) {
return false;
} else {
@@ -1201,7 +1203,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1219,7 +1221,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
// Paper end
this.mailboxWorldGen.a(ChunkTaskQueueSorter.a(playerchunk, runnable)); // CraftBukkit - decompile error
@@ -3701,7 +3668,7 @@ index 8abf276a3..13f5857ae 100644
}
protected void c(ChunkCoordIntPair chunkcoordintpair) {
@@ -1429,6 +1434,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1447,6 +1452,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
public final void setViewDistance(int i) { // Paper - public
@@ -3709,7 +3676,7 @@ index 8abf276a3..13f5857ae 100644
int j = MathHelper.clamp(i + 1, 3, 33); // Paper - diff on change, these make the lower view distance limit 2 and the upper 32
if (j != this.viewDistance) {
@@ -1442,6 +1448,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1460,6 +1466,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
// Paper start - no-tick view distance
public final void setNoTickViewDistance(int viewDistance) {
@@ -3717,7 +3684,7 @@ index 8abf276a3..13f5857ae 100644
viewDistance = viewDistance == -1 ? -1 : MathHelper.clamp(viewDistance, 2, 32);
this.noTickViewDistance = viewDistance;
@@ -1971,23 +1978,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1989,23 +1996,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
private final void processTrackQueue() {
this.world.timings.tracker1.startTiming();
try {
@@ -3752,7 +3719,7 @@ index 8abf276a3..13f5857ae 100644
// Paper end - optimised tracker
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 3e5dea60f..1859cd296 100644
index 10e3bf60f..e0da3a13b 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -323,19 +323,24 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -6619,7 +6586,7 @@ index 568aefdf6..760752eae 100644
public void restart() {
org.spigotmc.RestartCommand.restart();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index f4a1be34f..1ee5ce50b 100644
index 73ffc3c24..32d4aa0f4 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -333,6 +333,13 @@ public class CraftWorld implements World {
@@ -6652,15 +6619,15 @@ index f4a1be34f..1ee5ce50b 100644
}
// Paper start
@@ -490,6 +490,7 @@ public class CraftWorld implements World {
net.minecraft.server.IChunkAccess chunk = world.getChunkProvider().getChunkAtIfLoadedImmediately(x, z); // Paper
if (chunk != null) {
world.getChunkProvider().removeTicket(TicketType.PLUGIN, chunk.getPos(), 0, Unit.INSTANCE); // Paper
@@ -489,6 +489,7 @@ public class CraftWorld implements World {
org.spigotmc.AsyncCatcher.catchOp("chunk unload"); // Spigot
if (isChunkLoaded(x, z)) {
world.getChunkProvider().removeTicket(TicketType.PLUGIN, new ChunkCoordIntPair(x, z), 0, Unit.INSTANCE); // Paper
+ ((ChunkMapDistance)world.getChunkProvider().playerChunkMap.getChunkMapDistanceManager()).removeTickets(ChunkCoordIntPair.pair(x, z), TicketType.DELAYED_UNLOAD); // Tuinity - delay chunk unloads - let plugins override
}
return true;
@@ -2505,7 +2506,7 @@ public class CraftWorld implements World {
@@ -2504,7 +2505,7 @@ public class CraftWorld implements World {
}
return this.world.getChunkProvider().getChunkAtAsynchronously(x, z, gen, urgent).thenComposeAsync((either) -> {
net.minecraft.server.Chunk chunk = (net.minecraft.server.Chunk) either.left().orElse(null);
@@ -6670,7 +6637,7 @@ index f4a1be34f..1ee5ce50b 100644
}, MinecraftServer.getServer());
}
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index d6e5d014c..90a2f8fea 100644
index 2ea6f5b7d..cce21aaf3 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -138,6 +138,13 @@ public class Main {
@@ -6697,7 +6664,7 @@ index d6e5d014c..90a2f8fea 100644
//Thread.sleep(TimeUnit.SECONDS.toMillis(20));
// Paper End
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index a5f981cd0..197c2ffab 100644
index 382b50d37..0ba3d963c 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -207,7 +207,7 @@ public class CraftBlock implements Block {

View File

@@ -1,4 +1,4 @@
From ab0e10ba00591acd8a7821ae0647943a21d24b39 Mon Sep 17 00:00:00 2001
From b1cd21795f45b71ae265cebd95060a23cfcf9310 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Thu, 26 Mar 2020 13:17:09 -0500
Subject: [PATCH] Add language asset purpur.lang
@@ -12,10 +12,10 @@ Subject: [PATCH] Add language asset purpur.lang
create mode 100644 src/main/resources/purpur.lang
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 4ed4ad6bc..9437a06d8 100644
index 39072ebdc..fe1e9ea61 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1577,6 +1577,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1582,6 +1582,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
public void a(IChatBaseComponent ichatbasecomponent, ChatMessageType chatmessagetype) {

View File

@@ -1,4 +1,4 @@
From 11dc6191a681f05cf592ab662bc14e09966eddbb Mon Sep 17 00:00:00 2001
From 807a6d3ab82b3c883c3d8ad10b0409012b3f4f02 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Thu, 6 Feb 2020 19:53:59 -0600
Subject: [PATCH] Ridables
@@ -3358,10 +3358,10 @@ index 0357c9da9..98a657cec 100644
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true));
this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false));
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 9437a06d8..4ecc89ac4 100644
index fe1e9ea61..51bae05ec 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1308,6 +1308,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1313,6 +1313,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
public void a(float f, float f1, boolean flag, boolean flag1) {
@@ -3369,7 +3369,7 @@ index 9437a06d8..4ecc89ac4 100644
if (this.isPassenger()) {
if (f >= -1.0F && f <= 1.0F) {
this.aZ = f;
@@ -1320,7 +1321,6 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1325,7 +1326,6 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.jumping = flag;
this.setSneaking(flag1);
}

View File

@@ -1,4 +1,4 @@
From d5aa173e66a65d2bd0f499d1161debd81ed92a57 Mon Sep 17 00:00:00 2001
From 2094c83c3f1ac0a54a44a83a97dd93640767160f Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Sun, 15 Dec 2019 12:53:59 -0600
Subject: [PATCH] Disable outdated build check
@@ -8,14 +8,14 @@ Subject: [PATCH] Disable outdated build check
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 8d436d275..b007840a5 100644
index 77b9ce301..b007840a5 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -259,7 +259,7 @@ public class Main {
System.setProperty(TerminalConsoleAppender.JLINE_OVERRIDE_PROPERTY, "false"); // Paper
}
- if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
- if (false && Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
+ if (false) { // Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) { // Purpur
Date buildDate = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").parse(Main.class.getPackage().getImplementationVendor()); // Paper

View File

@@ -1,4 +1,4 @@
From c7e035e81dc76249a91f70a5fd569206289ac85c Mon Sep 17 00:00:00 2001
From 724e01f51f459443dd24030bbe0e7d73f142ac3d Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Thu, 6 Jun 2019 17:40:30 -0500
Subject: [PATCH] Signs allow color codes
@@ -11,10 +11,10 @@ Subject: [PATCH] Signs allow color codes
4 files changed, 26 insertions(+)
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 4ecc89ac4..2a70beedc 100644
index 51bae05ec..b781aa3ae 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1148,6 +1148,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1153,6 +1153,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@Override
public void openSign(TileEntitySign tileentitysign) {
tileentitysign.a((EntityHuman) this);
@@ -23,10 +23,10 @@ index 4ecc89ac4..2a70beedc 100644
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 1859cd296..944610737 100644
index e0da3a13b..8a5059b4f 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2640,6 +2640,14 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -2646,6 +2646,14 @@ public class PlayerConnection implements PacketListenerPlayIn {
}
}
// Paper end

View File

@@ -1,4 +1,4 @@
From 85245049408f5357a575ddb8baeaef8d51bd475b Mon Sep 17 00:00:00 2001
From fa7ce62a34d0cd0e28afe493de492cb5e8c0d4df Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Thu, 8 Aug 2019 15:29:15 -0500
Subject: [PATCH] Implement AFK API
@@ -50,10 +50,10 @@ index 27cfc6654..d62174e9c 100644
super(EntityTypes.PLAYER, world);
this.bV = ItemStack.a;
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 2a70beedc..96f98926e 100644
index b781aa3ae..d7ce31284 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1641,8 +1641,51 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1646,8 +1646,51 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public void resetIdleTimer() {
this.cj = SystemUtils.getMonotonicMillis();
@@ -171,7 +171,7 @@ index 1398c47a2..0bf1a14b7 100644
public static Predicate<Entity> a(double d0, double d1, double d2, double d3) {
double d4 = d3 * d3;
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 944610737..26268a160 100644
index 8a5059b4f..148beb1b6 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -233,6 +233,12 @@ public class PlayerConnection implements PacketListenerPlayIn {

View File

@@ -1,4 +1,4 @@
From 0bd8ceb166c07de1bc7c9c542f3cd811ce33c544 Mon Sep 17 00:00:00 2001
From 180a11a08582be6b68f188b6e5b5f7cefbcab4fa Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Sun, 21 Jul 2019 18:01:46 -0500
Subject: [PATCH] Players should not cram to death
@@ -8,10 +8,10 @@ Subject: [PATCH] Players should not cram to death
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 96f98926e..977392373 100644
index d7ce31284..3e0e49dbb 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1121,7 +1121,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1126,7 +1126,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@Override
public boolean isInvulnerable(DamageSource damagesource) {

View File

@@ -1,4 +1,4 @@
From dcf936f4a58a869b127053dbface4407d90ba15b Mon Sep 17 00:00:00 2001
From 5de138cbdf306a02f264c50f32f22c6864d001f1 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Thu, 1 Aug 2019 19:15:12 -0500
Subject: [PATCH] Add blacklist option for grindstone
@@ -10,10 +10,10 @@ Subject: [PATCH] Add blacklist option for grindstone
3 files changed, 35 insertions(+)
diff --git a/src/main/java/net/minecraft/server/ContainerGrindstone.java b/src/main/java/net/minecraft/server/ContainerGrindstone.java
index ed88e208d..fcfb4abdc 100644
index 83cb0cd64..2a849d0ec 100644
--- a/src/main/java/net/minecraft/server/ContainerGrindstone.java
+++ b/src/main/java/net/minecraft/server/ContainerGrindstone.java
@@ -57,12 +57,24 @@ public class ContainerGrindstone extends Container {
@@ -61,12 +61,24 @@ public class ContainerGrindstone extends Container {
this.a(new Slot(this.craftInventory, 0, 49, 19) {
@Override
public boolean isAllowed(ItemStack itemstack) {
@@ -38,7 +38,7 @@ index ed88e208d..fcfb4abdc 100644
return itemstack.e() || itemstack.getItem() == Items.ENCHANTED_BOOK || itemstack.hasEnchantments();
}
});
@@ -106,6 +118,11 @@ public class ContainerGrindstone extends Container {
@@ -110,6 +122,11 @@ public class ContainerGrindstone extends Container {
}
private int e(ItemStack itemstack) {

View File

@@ -1,4 +1,4 @@
From 23e176a46b1214496ce22866fd08e1aecae26a22 Mon Sep 17 00:00:00 2001
From ac25e2c7e75e91a4b246439af0fe5d213b369c34 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Fri, 11 Oct 2019 00:17:39 -0500
Subject: [PATCH] Alternative Keepalive Handling
@@ -22,7 +22,7 @@ index 8e93f1540..470f92c4f 100644
return this.a;
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 09cab5a99..6f7fd0f64 100644
index 148beb1b6..82faee937 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -75,6 +75,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -55,7 +55,7 @@ index 09cab5a99..6f7fd0f64 100644
if (this.isPendingPing()) {
if (!this.processedDisconnect && elapsedTime >= KEEPALIVE_LIMIT) { // check keepalive limit, don't fire if already disconnected
PlayerConnection.LOGGER.warn("{} was kicked due to keepalive timeout!", this.player.getName()); // more info
@@ -2677,6 +2693,17 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -2683,6 +2699,17 @@ public class PlayerConnection implements PacketListenerPlayIn {
@Override
public void a(PacketPlayInKeepAlive packetplayinkeepalive) {

View File

@@ -1,4 +1,4 @@
From 93a93b6f297d5f1bd55db507d44b7b0263d8852c Mon Sep 17 00:00:00 2001
From 3783ea32482a168cacafaf3dd37e311a2ac4d2eb Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Sat, 1 Feb 2020 22:22:16 -0600
Subject: [PATCH] Add moon phase API
@@ -8,10 +8,10 @@ Subject: [PATCH] Add moon phase API
1 file changed, 8 insertions(+)
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 1ee5ce50b..eb8571c30 100644
index 32d4aa0f4..e55be5271 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -2478,6 +2478,14 @@ public class CraftWorld implements World {
@@ -2477,6 +2477,14 @@ public class CraftWorld implements World {
return new CraftDragonBattle(((WorldProviderTheEnd) worldProvider).o()); // PAIL rename getDragonBattle
}

View File

@@ -1,4 +1,4 @@
From 5ae31d323f96470ac6ba7a31996cada392449d6c Mon Sep 17 00:00:00 2001
From 64163a967be7513c8c46cc26d795e81c41446fb1 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Sat, 8 Feb 2020 23:30:17 -0600
Subject: [PATCH] Add getPlacementBlockData to World
@@ -66,10 +66,10 @@ index 9c9b93f28..74a722cce 100644
public static final Item bZ = a(Blocks.CHEST, CreativeModeTab.c);
public static final Item ca = a(Blocks.DIAMOND_ORE, CreativeModeTab.b);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index eb8571c30..3d27028e8 100644
index e55be5271..8b5003436 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -2484,6 +2484,11 @@ public class CraftWorld implements World {
@@ -2483,6 +2483,11 @@ public class CraftWorld implements World {
public net.pl3x.purpur.MoonPhase getMoonPhase() {
return net.pl3x.purpur.MoonPhase.getPhase(getFullTime() / 24000L);
}

View File

@@ -1,4 +1,4 @@
From 6c73c93a24c4766149576a59e16d7e7ab031e149 Mon Sep 17 00:00:00 2001
From 437e55dc3cde421e1c239bd7f834ff858fd3f4fc Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Sat, 28 Dec 2019 04:21:54 -0600
Subject: [PATCH] Add permission for F3+N debug
@@ -8,10 +8,10 @@ Subject: [PATCH] Add permission for F3+N debug
1 file changed, 1 insertion(+)
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 54f6dfcaa..29150bd7d 100644
index ab8247eb7..af2cdbf4d 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -979,6 +979,7 @@ public abstract class PlayerList {
@@ -980,6 +980,7 @@ public abstract class PlayerList {
} else {
b0 = (byte) (24 + i);
}

View File

@@ -1,4 +1,4 @@
From 9e7ef8eea9cb9c27ffc7b15b4ad7926629ca5667 Mon Sep 17 00:00:00 2001
From 4d4c1ccec681b4363afd0772013d59b6de57b351 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Thu, 2 Apr 2020 00:28:06 -0500
Subject: [PATCH] Optimize Chunk Ticks
@@ -9,10 +9,10 @@ Subject: [PATCH] Optimize Chunk Ticks
2 files changed, 25 insertions(+), 39 deletions(-)
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 24af59962..adc08db22 100644
index e8bf60507..93abf7493 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -971,11 +971,12 @@ public class ChunkProviderServer extends IChunkProvider {
@@ -981,11 +981,12 @@ public class ChunkProviderServer extends IChunkProvider {
int k = this.world.getGameRules().getInt(GameRules.RANDOM_TICK_SPEED);
BlockPosition blockposition = this.world.getSpawn();
// CraftBukkit start - Other mob type spawn tick rate
@@ -30,7 +30,7 @@ index 24af59962..adc08db22 100644
// CraftBukkit end
this.world.getMethodProfiler().enter("naturalSpawnCount");
@@ -1022,40 +1023,11 @@ public class ChunkProviderServer extends IChunkProvider {
@@ -1032,40 +1033,11 @@ public class ChunkProviderServer extends IChunkProvider {
if (flag1 && (this.allowMonsters || this.allowAnimals) && this.world.getWorldBorder().isInBounds(chunk.getPos()) && !this.playerChunkMap.isOutsideOfRange(playerchunk, chunkcoordintpair, true)) { // Spigot // Paper - optimise isOutsideOfRange
this.world.getMethodProfiler().enter("spawner");
this.world.timings.mobSpawn.startTiming(); // Spigot

View File

@@ -1,4 +1,4 @@
From 6601b605fd122327b6cf4d6dbde13ff5ee278649 Mon Sep 17 00:00:00 2001
From 7c51cf494632ddcecb2ee18c559a9930f3b4a681 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Sat, 2 May 2020 20:55:44 -0500
Subject: [PATCH] Player invulnerabilities
@@ -12,10 +12,10 @@ Subject: [PATCH] Player invulnerabilities
5 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 977392373..6572177c5 100644
index 3e0e49dbb..e73b33721 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -132,6 +132,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -137,6 +137,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.canPickUpLoot = true;
this.maxHealthCache = this.getMaxHealth();
this.cachedSingleMobDistanceMap = new com.destroystokyo.paper.util.PooledHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper
@@ -24,7 +24,7 @@ index 977392373..6572177c5 100644
}
// Paper start
public BlockPosition getPointInFront(double inFront) {
@@ -743,6 +745,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -748,6 +750,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
@@ -37,7 +37,7 @@ index 977392373..6572177c5 100644
@Override
public boolean damageEntity(DamageSource damagesource, float f) {
if (this.isInvulnerable(damagesource)) {
@@ -750,7 +758,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -755,7 +763,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
} else {
boolean flag = this.server.m() && this.canPvP() && "fall".equals(damagesource.translationIndex);
@@ -46,7 +46,7 @@ index 977392373..6572177c5 100644
return false;
} else {
if (damagesource instanceof EntityDamageSource) {
@@ -1017,6 +1025,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1022,6 +1030,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
PlayerChangedWorldEvent changeEvent = new PlayerChangedWorldEvent(this.getBukkitEntity(), worldserver.getWorld());
this.world.getServer().getPluginManager().callEvent(changeEvent);
// CraftBukkit end
@@ -55,7 +55,7 @@ index 977392373..6572177c5 100644
return this;
}
}
@@ -2005,9 +2015,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -2010,9 +2020,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@Override
public boolean isFrozen() { // Paper - protected > public
@@ -75,7 +75,7 @@ index 977392373..6572177c5 100644
public Scoreboard getScoreboard() {
return getBukkitEntity().getScoreboard().getHandle();
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 00a30519d..2eeeed017 100644
index 82faee937..86715ff3c 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1548,6 +1548,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -87,10 +87,10 @@ index 00a30519d..2eeeed017 100644
this.server.getPluginManager().callEvent(new PlayerResourcePackStatusEvent(getPlayer(), packStatus));
// Paper end
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 29150bd7d..7b912d46f 100644
index af2cdbf4d..5cacea602 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -827,6 +827,8 @@ public abstract class PlayerList {
@@ -828,6 +828,8 @@ public abstract class PlayerList {
}
// Paper end

View File

@@ -1,4 +1,4 @@
From 962285cc430c028dd08bff3c3e61b8fbe363dba3 Mon Sep 17 00:00:00 2001
From 4a8ac41e8b4ea8f138e46d0ef993a5ea6598fc2b Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Sun, 7 Jun 2020 13:16:02 -0500
Subject: [PATCH] Do not strip colors from death messages
@@ -8,10 +8,10 @@ Subject: [PATCH] Do not strip colors from death messages
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 6572177c5..a1333c437 100644
index e73b33721..9eeefa1ca 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -617,7 +617,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -622,7 +622,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
IChatBaseComponent defaultMessage = this.getCombatTracker().getDeathMessage();

View File

@@ -1,45 +0,0 @@
From 6388840e7fdd890b026b827d3b54f7da27a6f511 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Thu, 18 Jun 2020 23:29:54 -0500
Subject: [PATCH] Add PrepareGrindstoneEvent
---
.../java/net/minecraft/server/ContainerGrindstone.java | 1 +
.../org/bukkit/craftbukkit/event/CraftEventFactory.java | 9 +++++++++
2 files changed, 10 insertions(+)
diff --git a/src/main/java/net/minecraft/server/ContainerGrindstone.java b/src/main/java/net/minecraft/server/ContainerGrindstone.java
index fcfb4abdc..0ebdcf0ad 100644
--- a/src/main/java/net/minecraft/server/ContainerGrindstone.java
+++ b/src/main/java/net/minecraft/server/ContainerGrindstone.java
@@ -161,6 +161,7 @@ public class ContainerGrindstone extends Container {
super.a(iinventory);
if (iinventory == this.craftInventory) {
this.e();
+ org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareGrindstoneEvent(getBukkitView(), resultInventory.getItem(0)); // Purpur
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index ce8d7877a..a7e033181 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1521,6 +1521,15 @@ public class CraftEventFactory {
return event;
}
+ // Purpur start
+ public static net.pl3x.purpur.event.inventory.PrepareGrindstoneEvent callPrepareGrindstoneEvent(InventoryView view, ItemStack item) {
+ net.pl3x.purpur.event.inventory.PrepareGrindstoneEvent event = new net.pl3x.purpur.event.inventory.PrepareGrindstoneEvent(view, CraftItemStack.asCraftMirror(item).clone());
+ event.getView().getPlayer().getServer().getPluginManager().callEvent(event);
+ event.getInventory().setItem(2, event.getResult());
+ return event;
+ }
+ // Purpur end
+
/**
* Mob spawner event.
*/
--
2.26.2

View File

@@ -1,4 +1,4 @@
From 01f779999483a518fbcc4bb50d1012721f5bd591 Mon Sep 17 00:00:00 2001
From dcebd276461c63a590cd35b73ece127106eb7d6a Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Fri, 19 Jun 2020 21:36:16 -0500
Subject: [PATCH] Fix reloading paper.yml

View File

@@ -1,4 +1,4 @@
From c54950636f4071df3ba78b647838a6c731dad604 Mon Sep 17 00:00:00 2001
From b9d6a9418690fed6b75e7f4ca46dcc7a9fa94200 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Fri, 21 Feb 2020 17:04:51 -0600
Subject: [PATCH] MC-125757 Fix - Always increment arrow despawn counter

View File

@@ -1,4 +1,4 @@
From aa1c6cff1f8d0d3490aeccb736ebe442bfd4665d Mon Sep 17 00:00:00 2001
From c127ee26dc42f88155087b8dcdf7b61c067088ec Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Thu, 6 Jun 2019 22:15:46 -0500
Subject: [PATCH] MC-168772 Fix - Add turtle egg block options

View File

@@ -1,4 +1,4 @@
From 3066c4fd1c0e1722328c02c45a91216cc9757377 Mon Sep 17 00:00:00 2001
From fbb5d60cfb97f9a166ecea0361abdbcb72385ee7 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Sat, 6 Jul 2019 21:12:58 -0500
Subject: [PATCH] MC-4 Fix - Item position desync

View File

@@ -1,4 +1,4 @@
From 92a5d8dbf53574306790877796c786ee0604fb5f Mon Sep 17 00:00:00 2001
From 709d9ada46d90e86bde0c82e0dc0960c3e7c86b7 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Tue, 9 Jul 2019 20:56:47 -0500
Subject: [PATCH] MC-56653 Fix - pig zombies aggro

View File

@@ -1,4 +1,4 @@
From 8766ab3142d8c5ae273e6e160f16b5c2eb51f398 Mon Sep 17 00:00:00 2001
From ff08fe5bfa4a978c4db1e6e039d4eadea593d3f0 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 20 Jul 2013 22:40:56 -0400
Subject: [PATCH] EMC - MonsterEggSpawn Event

View File

@@ -1,4 +1,4 @@
From 645f0e70778082ed0c0355f0d703dc8d3a269af0 Mon Sep 17 00:00:00 2001
From 3e5f9a68fcae710e4090815afb8f635865e12f0b Mon Sep 17 00:00:00 2001
From: Eearslya Sleiarion <eearslya@gmail.com>
Date: Mon, 24 Jun 2019 21:27:32 -0700
Subject: [PATCH] PaperPR - Add BellRingEvent

View File

@@ -1,4 +1,4 @@
From ac3aea5c4687c6c17a2efc5fe044b876d24d74d7 Mon Sep 17 00:00:00 2001
From 4ccb3f307363426180c14b91fd024e297f003f8e Mon Sep 17 00:00:00 2001
From: KennyTV <kennytv@t-online.de>
Date: Mon, 20 Apr 2020 13:57:06 +0200
Subject: [PATCH] PaperPR - PlayerItemCooldownEvent

View File

@@ -1,4 +1,4 @@
From b21435be03ef81ca9cdaabaf4ace1d2c37bf219e Mon Sep 17 00:00:00 2001
From 1b1a21c1dc6b4bbfbe85b0743ee29c22385882f9 Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Thu, 5 Mar 2020 23:08:01 +0100
Subject: [PATCH] YAPFA - Disable mojang profiler