mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appears to apply and compile correctly Paper Changes: 862b8c18 Updated Upstream (Bukkit/CraftBukkit) 100d51eb Do not obfuscate air (#4149)
This commit is contained in:
2
Paper
2
Paper
Submodule Paper updated: 47740f67ca...862b8c181a
@@ -1 +1 @@
|
||||
1.16.2--2b1d994e90bd09fabf71139d824eaee54c9adc6a
|
||||
1.16.2--e51a14afcac0a36bd605f287a4c76e4ac56fd943
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] MoonPhase API
|
||||
|
||||
diff --git a/src/main/java/net/pl3x/purpur/MoonPhase.java b/src/main/java/net/pl3x/purpur/MoonPhase.java
|
||||
new file mode 100644
|
||||
index 00000000..f5ad98c6
|
||||
index 000000000..f5ad98c62
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/pl3x/purpur/MoonPhase.java
|
||||
@@ -0,0 +1,36 @@
|
||||
@@ -47,10 +47,10 @@ index 00000000..f5ad98c6
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 75c9225b..9955d741 100644
|
||||
index ba5e6cca0..e764f1b1c 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -3450,6 +3450,16 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
@@ -3460,6 +3460,16 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
@NotNull
|
||||
public List<Raid> getRaids();
|
||||
|
||||
|
||||
@@ -2745,7 +2745,7 @@ index 550232cb38..229c3b0f0c 100644
|
||||
throwable = throwable1;
|
||||
throw throwable1;
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 5dc8f87dae..6c0d8fdaf2 100644
|
||||
index 97e61dae79..68340bf46e 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -137,7 +137,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -3880,7 +3880,7 @@ index a0555b132d..9caf6598f8 100644
|
||||
return fluid.a((Tag) TagsFluid.WATER) ? PathType.WATER : (fluid.a((Tag) TagsFluid.LAVA) ? PathType.LAVA : (a(iblockdata) ? PathType.DAMAGE_FIRE : (BlockDoor.l(iblockdata) && !(Boolean) iblockdata.get(BlockDoor.OPEN) ? PathType.DOOR_WOOD_CLOSED : (block instanceof BlockDoor && material == Material.ORE && !(Boolean) iblockdata.get(BlockDoor.OPEN) ? PathType.DOOR_IRON_CLOSED : (block instanceof BlockDoor && (Boolean) iblockdata.get(BlockDoor.OPEN) ? PathType.DOOR_OPEN : (block instanceof BlockMinecartTrackAbstract ? PathType.RAIL : (block instanceof BlockLeaves ? PathType.LEAVES : (!block.a((Tag) TagsBlock.FENCES) && !block.a((Tag) TagsBlock.WALLS) && (!(block instanceof BlockFenceGate) || (Boolean) iblockdata.get(BlockFenceGate.OPEN)) ? (!iblockdata.a(iblockaccess, blockposition, PathMode.LAND) ? PathType.BLOCKED : PathType.OPEN) : PathType.FENCE))))))));
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
index 835320bde4..a65da4e7d1 100644
|
||||
index fc6197dd5b..d4fd01cd29 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
@@ -361,7 +361,7 @@ public class PlayerChunk {
|
||||
@@ -3891,8 +3891,8 @@ index 835320bde4..a65da4e7d1 100644
|
||||
+ if (chunk != null && (blockposition.getY() >= 0 && blockposition.getY() <= 255)) { // Tuinity - updates cannot happen in sections that don't exist
|
||||
byte b0 = (byte) SectionPosition.a(blockposition.getY());
|
||||
|
||||
if (this.dirtyBlocks[b0] == null) {
|
||||
@@ -419,7 +419,7 @@ public class PlayerChunk {
|
||||
if (b0 >= this.dirtyBlocks.length) return; // CraftBukkit - SPIGOT-6086
|
||||
@@ -420,7 +420,7 @@ public class PlayerChunk {
|
||||
this.a(world, blockposition, iblockdata);
|
||||
} else {
|
||||
ChunkSection chunksection = chunk.getSections()[sectionposition.getY()];
|
||||
@@ -3901,7 +3901,7 @@ index 835320bde4..a65da4e7d1 100644
|
||||
PacketPlayOutMultiBlockChange packetplayoutmultiblockchange = new PacketPlayOutMultiBlockChange(sectionposition, shortset, chunksection, this.x);
|
||||
|
||||
this.a(packetplayoutmultiblockchange, false);
|
||||
@@ -502,6 +502,7 @@ public class PlayerChunk {
|
||||
@@ -503,6 +503,7 @@ public class PlayerChunk {
|
||||
// Paper end - per player view distance
|
||||
}
|
||||
|
||||
@@ -3909,7 +3909,7 @@ index 835320bde4..a65da4e7d1 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);
|
||||
@@ -557,6 +558,7 @@ public class PlayerChunk {
|
||||
@@ -558,6 +559,7 @@ public class PlayerChunk {
|
||||
}
|
||||
|
||||
protected void a(PlayerChunkMap playerchunkmap) {
|
||||
@@ -3917,7 +3917,7 @@ index 835320bde4..a65da4e7d1 100644
|
||||
ChunkStatus chunkstatus = getChunkStatus(this.oldTicketLevel);
|
||||
ChunkStatus chunkstatus1 = getChunkStatus(this.ticketLevel);
|
||||
boolean flag = this.oldTicketLevel <= PlayerChunkMap.GOLDEN_TICKET;
|
||||
@@ -566,7 +568,8 @@ public class PlayerChunk {
|
||||
@@ -567,7 +569,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)) {
|
||||
@@ -3927,7 +3927,7 @@ index 835320bde4..a65da4e7d1 100644
|
||||
Chunk chunk = (Chunk)either.left().orElse(null);
|
||||
if (chunk != null) {
|
||||
playerchunkmap.callbackExecutor.execute(() -> {
|
||||
@@ -631,7 +634,8 @@ public class PlayerChunk {
|
||||
@@ -632,7 +635,8 @@ public class PlayerChunk {
|
||||
if (!flag2 && flag3) {
|
||||
// Paper start - cache ticking ready status
|
||||
int expectCreateCount = ++this.fullChunkCreateCount;
|
||||
@@ -3937,7 +3937,7 @@ index 835320bde4..a65da4e7d1 100644
|
||||
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();
|
||||
@@ -662,7 +666,8 @@ public class PlayerChunk {
|
||||
@@ -663,7 +667,8 @@ public class PlayerChunk {
|
||||
|
||||
if (!flag4 && flag5) {
|
||||
// Paper start - cache ticking ready status
|
||||
@@ -3947,7 +3947,7 @@ index 835320bde4..a65da4e7d1 100644
|
||||
if (either.left().isPresent()) {
|
||||
// note: Here is a very good place to add callbacks to logic waiting on this.
|
||||
Chunk tickingChunk = either.left().get();
|
||||
@@ -693,12 +698,20 @@ public class PlayerChunk {
|
||||
@@ -694,12 +699,20 @@ public class PlayerChunk {
|
||||
}
|
||||
|
||||
// Paper start - cache ticking ready status
|
||||
@@ -3970,7 +3970,7 @@ index 835320bde4..a65da4e7d1 100644
|
||||
|
||||
|
||||
|
||||
@@ -710,6 +723,17 @@ public class PlayerChunk {
|
||||
@@ -711,6 +724,17 @@ public class PlayerChunk {
|
||||
|
||||
if (flag6 && !flag7) {
|
||||
this.entityTickingFuture.complete(PlayerChunk.UNLOADED_CHUNK); this.isEntityTickingReady = false; // Paper - cache chunk ticking stage
|
||||
@@ -3988,7 +3988,7 @@ index 835320bde4..a65da4e7d1 100644
|
||||
this.entityTickingFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE;
|
||||
}
|
||||
|
||||
@@ -736,7 +760,8 @@ public class PlayerChunk {
|
||||
@@ -737,7 +761,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)) {
|
||||
@@ -6926,7 +6926,7 @@ index 7d83cf39ae..2acdb08072 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 fe7e8d97a2..2ac199f91d 100644
|
||||
index 4ab3db10e2..fabc062e19 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -336,6 +336,14 @@ public class CraftWorld implements World {
|
||||
@@ -6944,7 +6944,7 @@ index fe7e8d97a2..2ac199f91d 100644
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -402,14 +410,7 @@ public class CraftWorld implements World {
|
||||
@@ -407,14 +415,7 @@ public class CraftWorld implements World {
|
||||
|
||||
@Override
|
||||
public Chunk getChunkAt(int x, int z) {
|
||||
@@ -6960,7 +6960,7 @@ index fe7e8d97a2..2ac199f91d 100644
|
||||
}
|
||||
|
||||
// Paper start
|
||||
@@ -492,6 +493,7 @@ public class CraftWorld implements World {
|
||||
@@ -497,6 +498,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
|
||||
@@ -6968,7 +6968,7 @@ index fe7e8d97a2..2ac199f91d 100644
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -2524,7 +2526,7 @@ public class CraftWorld implements World {
|
||||
@@ -2529,7 +2531,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);
|
||||
@@ -6978,7 +6978,7 @@ index fe7e8d97a2..2ac199f91d 100644
|
||||
}, MinecraftServer.getServer());
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 082a35004f..0db5338583 100644
|
||||
index bac292e6d8..b4e65963ef 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 {
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] MoonPhase API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 2ac199f91..0c8c9112a 100644
|
||||
index fabc062e19..2dbe0d6075 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -2599,4 +2599,11 @@ public class CraftWorld implements World {
|
||||
@@ -2604,4 +2604,11 @@ public class CraftWorld implements World {
|
||||
return spigot;
|
||||
}
|
||||
// Spigot end
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Entities can use portals configuration
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 6d01021e28..b29f8fae5f 100644
|
||||
index 9990fb09f9..f01afb92c9 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -2370,7 +2370,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1,20 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: stonar96 <minecraft.stonar96@gmail.com>
|
||||
Date: Mon, 17 Aug 2020 19:18:16 -0500
|
||||
Subject: [PATCH] PaperPR - Do not obfuscate air
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java
|
||||
index 5a69dde15f..f475427af0 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java
|
||||
@@ -82,7 +82,8 @@ public final class ChunkPacketBlockControllerAntiXray extends ChunkPacketBlockCo
|
||||
for (String id : toObfuscate) {
|
||||
Block block = IRegistry.BLOCK.getOptional(new MinecraftKey(id)).orElse(null);
|
||||
|
||||
- if (block != null) {
|
||||
+ // Don't obfuscate air because air causes unnecessary block updates and causes block updates to fail in the void
|
||||
+ if (block != null && !block.getBlockData().isAir()) {
|
||||
obfuscateGlobal[ChunkSection.GLOBAL_PALETTE.getOrCreateIdFor(block.getBlockData())] = true;
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Customizable WitherBoss Health and Healing
|
||||
Adds the ability to customize the health of the Wither Boss, as well as the amount that it heals, and how often in the PurpurWorldConfig.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java
|
||||
index 1511212cb..78a5449d1 100644
|
||||
index 1511212cbf..78a5449d1c 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityWither.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityWither.java
|
||||
@@ -36,6 +36,11 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
@@ -45,7 +45,7 @@ index 1511212cb..78a5449d1 100644
|
||||
this.bossBattle.setProgress(this.getHealth() / this.getMaxHealth());
|
||||
}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index d19c6d13c..aaf1735e6 100644
|
||||
index d19c6d13cf..aaf1735e66 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -887,6 +887,15 @@ public class PurpurWorldConfig {
|
||||
@@ -1,30 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Wed, 19 Aug 2020 19:05:27 -0500
|
||||
Subject: [PATCH] Fix end portal platform
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 85e77a61fe..1641d81d25 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -1023,6 +1023,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
if (event.isCancelled() || event.getTo() == null || event.getTo().getWorld() == null) {
|
||||
return null;
|
||||
}
|
||||
+ if (exitWorldServer.getTypeKey() == DimensionManager.THE_END && event.getCanCreatePortal()) WorldServer.rebuildPortalPlatform(exitWorldServer, this); // Purpur
|
||||
return new CraftPortalEvent(event);
|
||||
}
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 61e09bd8f4..b732ec2771 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -2799,6 +2799,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
WorldServer.a(worldserver, null);
|
||||
}
|
||||
|
||||
+ public static void rebuildPortalPlatform(WorldServer worldserver, Entity entity) { a(worldserver, entity); } // Purpur - OBFHELPER
|
||||
public static void a(WorldServer worldserver, Entity entity) {
|
||||
// CraftBukkit end
|
||||
BlockPosition blockposition = WorldServer.a;
|
||||
Reference in New Issue
Block a user