3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 02:50:09 +01:00

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:
b2f1908c SPIGOT-5783: Add helpful info to UnknownDependencyException
e4f46260 SPIGOT-2623: Add EntityEquipment methods to get/set ItemStacks by slot.
529a9a69 SPIGOT-5751: Clarify behaviour of block drop-related API methods

CraftBukkit Changes:
8ea9b138 Remove outdated build delay.
ffc2b251 Revert "#675: Fix redirected CommandNodes sometimes not being properly redirected"
cb701f6b #675: Fix redirected CommandNodes sometimes not being properly redirected
c9d7c16b SPIGOT-2623: Add EntityEquipment methods to get/set ItemStacks by slot.
fad2494a #673: Fix Craftworld#isChunkLoaded
8637ec00 SPIGOT-5751: Made breakNaturally and getDrops returns the correct item if no argument is given

Spigot Changes:
a99063f7 Rebuild patches

Fixes #3602
Dieser Commit ist enthalten in:
Aikar 2020-06-23 04:30:45 -04:00
Ursprung c4ada0e199
Commit ce270e1412
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 401ADFC9891FAAFE
124 geänderte Dateien mit 148 neuen und 171 gelöschten Zeilen

Datei anzeigen

@ -64,7 +64,7 @@ index 0000000000000000000000000000000000000000..8cf87d228a7006658d52ce0da16c2d74
+ Sound getFallSound(); + Sound getFallSound();
+} +}
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
index 41f6b849186346f9a4e254122d2448a7ea8e0ee9..9713867950572fdc8c0f8798afcb37712a6a4e85 100644 index d7c7df85228c01529e266ffdd3b3bcdc9ed35774..596f1d68b69a2ba3976398d0045379f047541f40 100644
--- a/src/main/java/org/bukkit/block/Block.java --- a/src/main/java/org/bukkit/block/Block.java
+++ b/src/main/java/org/bukkit/block/Block.java +++ b/src/main/java/org/bukkit/block/Block.java
@@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
@ -75,7 +75,7 @@ index 41f6b849186346f9a4e254122d2448a7ea8e0ee9..9713867950572fdc8c0f8798afcb3771
import org.bukkit.Chunk; import org.bukkit.Chunk;
import org.bukkit.FluidCollisionMode; import org.bukkit.FluidCollisionMode;
import org.bukkit.Location; import org.bukkit.Location;
@@ -539,4 +540,16 @@ public interface Block extends Metadatable { @@ -540,4 +541,16 @@ public interface Block extends Metadatable {
*/ */
@NotNull @NotNull
BoundingBox getBoundingBox(); BoundingBox getBoundingBox();

Datei anzeigen

@ -5,12 +5,12 @@ Subject: [PATCH] Add effect to block break naturally
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
index 9713867950572fdc8c0f8798afcb37712a6a4e85..19a3b2a1faa5037c34486873e0be0c534813da1d 100644 index 596f1d68b69a2ba3976398d0045379f047541f40..999f2a362c62cf58752d9c3d378aafe6754d2aaf 100644
--- a/src/main/java/org/bukkit/block/Block.java --- a/src/main/java/org/bukkit/block/Block.java
+++ b/src/main/java/org/bukkit/block/Block.java +++ b/src/main/java/org/bukkit/block/Block.java
@@ -468,6 +468,18 @@ public interface Block extends Metadatable { @@ -469,6 +469,18 @@ public interface Block extends Metadatable {
*/ */
boolean breakNaturally(@NotNull ItemStack tool); boolean breakNaturally(@Nullable ItemStack tool);
+ // Paper start + // Paper start
+ /** + /**

Datei anzeigen

@ -190,13 +190,13 @@ index 9fc92e347f24a0210a9190513e93cba3b6772557..3554314526b3f33ad02df2adfd42d451
<!-- we need our custom version as it fixes some bugs on case sensitive file systems --> <!-- we need our custom version as it fixes some bugs on case sensitive file systems -->
<dependency> <dependency>
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 88223a53cb547727bacbba2d6006ecabf92bb524..cb5d0f5378418655eee2cd68bab8dc39a7b7052b 100644 index 91e2d0b9d9f698f54b49636944a6282adcff5b4b..3fb78997d8c4d913770a9a6a35f34e2c61b896fa 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -186,7 +186,7 @@ public class Main { @@ -186,7 +186,7 @@ public class Main {
} }
if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) { if (false && Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
- Date buildDate = new Date(Integer.parseInt(Main.class.getPackage().getImplementationVendor()) * 1000L); - Date buildDate = new Date(Integer.parseInt(Main.class.getPackage().getImplementationVendor()) * 1000L);
+ Date buildDate = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").parse(Main.class.getPackage().getImplementationVendor()); // Paper + Date buildDate = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").parse(Main.class.getPackage().getImplementationVendor()); // Paper

Datei anzeigen

@ -530,10 +530,10 @@ index 0000000000000000000000000000000000000000..a738657394bcccd859ef260a801736d4
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 41eac3588e01431818d8848a56ae009a5a510f30..32c496fa88eb1426ab4996fa1bd9803f60648267 100644 index 87c4b4c6b7793808308c0bfab957f9fd6425f452..beb6b63fa483f0a7b29f5403bebf7ee47b27cd29 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -260,15 +260,15 @@ public class ChunkProviderServer extends IChunkProvider { @@ -270,15 +270,15 @@ public class ChunkProviderServer extends IChunkProvider {
} }
} }
@ -699,7 +699,7 @@ index be30f6bf6a978dfe14af1aca1099cb9a6f7ab443..ad1dcf53040695a1b3194efa92b54917
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index cb5d0f5378418655eee2cd68bab8dc39a7b7052b..101d5b42e319c010fd7ed043fb17d1f2289ae38f 100644 index 3fb78997d8c4d913770a9a6a35f34e2c61b896fa..daa65aaf8c9616e5e058f3337fc4fc0895d13364 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -129,6 +129,14 @@ public class Main { @@ -129,6 +129,14 @@ public class Main {

Datei anzeigen

@ -2729,7 +2729,7 @@ index 260644bf0be4c5b2d96033f11382f88231048ce3..5a975f6bc60922ac872ec9c00c9150ce
} }
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 32c496fa88eb1426ab4996fa1bd9803f60648267..ba2af2abe2dd09eb6801f431a0942bd93755c97e 100644 index beb6b63fa483f0a7b29f5403bebf7ee47b27cd29..64d84b334d211fe39e808d2c8b5d457757fb1359 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -23,7 +23,7 @@ public class ChunkProviderServer extends IChunkProvider { @@ -23,7 +23,7 @@ public class ChunkProviderServer extends IChunkProvider {
@ -2911,7 +2911,7 @@ index 32c496fa88eb1426ab4996fa1bd9803f60648267..ba2af2abe2dd09eb6801f431a0942bd9
public ChunkProviderServer(WorldServer worldserver, File file, DataFixer datafixer, DefinedStructureManager definedstructuremanager, Executor executor, ChunkGenerator<?> chunkgenerator, int i, WorldLoadListener worldloadlistener, Supplier<WorldPersistentData> supplier) { public ChunkProviderServer(WorldServer worldserver, File file, DataFixer datafixer, DefinedStructureManager definedstructuremanager, Executor executor, ChunkGenerator<?> chunkgenerator, int i, WorldLoadListener worldloadlistener, Supplier<WorldPersistentData> supplier) {
this.world = worldserver; this.world = worldserver;
this.serverThreadQueue = new ChunkProviderServer.a(worldserver); this.serverThreadQueue = new ChunkProviderServer.a(worldserver);
@@ -77,6 +240,49 @@ public class ChunkProviderServer extends IChunkProvider { @@ -87,6 +250,49 @@ public class ChunkProviderServer extends IChunkProvider {
this.cacheChunk[0] = ichunkaccess; this.cacheChunk[0] = ichunkaccess;
} }

Datei anzeigen

@ -754,10 +754,10 @@ index f1b9b937e8ced0c718db463c94d716422113c396..43dc791191cdf2aa3e5cb2768c25e6be
} }
} }
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index ba2af2abe2dd09eb6801f431a0942bd93755c97e..875f353dc3a0f3418b01821abf30e0f1ca32bb4d 100644 index 64d84b334d211fe39e808d2c8b5d457757fb1359..83707fa6ae5cf4f564760ca0fb5e8c1932d4a91e 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -308,11 +308,13 @@ public class ChunkProviderServer extends IChunkProvider { @@ -318,11 +318,13 @@ public class ChunkProviderServer extends IChunkProvider {
} }
gameprofilerfiller.c("getChunkCacheMiss"); gameprofilerfiller.c("getChunkCacheMiss");
@ -773,7 +773,7 @@ index ba2af2abe2dd09eb6801f431a0942bd93755c97e..875f353dc3a0f3418b01821abf30e0f1
ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> { ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> {
return ichunkaccess1; return ichunkaccess1;
}, (playerchunk_failure) -> { }, (playerchunk_failure) -> {
@@ -505,7 +507,9 @@ public class ChunkProviderServer extends IChunkProvider { @@ -515,7 +517,9 @@ public class ChunkProviderServer extends IChunkProvider {
public void save(boolean flag) { public void save(boolean flag) {
this.tickDistanceManager(); this.tickDistanceManager();
@ -783,7 +783,7 @@ index ba2af2abe2dd09eb6801f431a0942bd93755c97e..875f353dc3a0f3418b01821abf30e0f1
} }
@Override @Override
@@ -542,7 +546,9 @@ public class ChunkProviderServer extends IChunkProvider { @@ -552,7 +556,9 @@ public class ChunkProviderServer extends IChunkProvider {
this.tickDistanceManager(); this.tickDistanceManager();
this.world.timings.doChunkMap.stopTiming(); // Spigot this.world.timings.doChunkMap.stopTiming(); // Spigot
this.world.getMethodProfiler().exitEnter("chunks"); this.world.getMethodProfiler().exitEnter("chunks");
@ -793,7 +793,7 @@ index ba2af2abe2dd09eb6801f431a0942bd93755c97e..875f353dc3a0f3418b01821abf30e0f1
this.world.timings.doChunkUnload.startTiming(); // Spigot this.world.timings.doChunkUnload.startTiming(); // Spigot
this.world.getMethodProfiler().exitEnter("unload"); this.world.getMethodProfiler().exitEnter("unload");
this.playerChunkMap.unloadChunks(booleansupplier); this.playerChunkMap.unloadChunks(booleansupplier);
@@ -573,10 +579,12 @@ public class ChunkProviderServer extends IChunkProvider { @@ -583,10 +589,12 @@ public class ChunkProviderServer extends IChunkProvider {
// CraftBukkit end // CraftBukkit end
this.world.getMethodProfiler().enter("naturalSpawnCount"); this.world.getMethodProfiler().enter("naturalSpawnCount");
@ -806,7 +806,7 @@ index ba2af2abe2dd09eb6801f431a0942bd93755c97e..875f353dc3a0f3418b01821abf30e0f1
this.world.getMethodProfiler().exit(); this.world.getMethodProfiler().exit();
this.playerChunkMap.f().forEach((playerchunk) -> { this.playerChunkMap.f().forEach((playerchunk) -> {
Optional<Chunk> optional = ((Either) playerchunk.b().getNow(PlayerChunk.UNLOADED_CHUNK)).left(); Optional<Chunk> optional = ((Either) playerchunk.b().getNow(PlayerChunk.UNLOADED_CHUNK)).left();
@@ -585,11 +593,14 @@ public class ChunkProviderServer extends IChunkProvider { @@ -595,11 +603,14 @@ public class ChunkProviderServer extends IChunkProvider {
Chunk chunk = (Chunk) optional.get(); Chunk chunk = (Chunk) optional.get();
this.world.getMethodProfiler().enter("broadcast"); this.world.getMethodProfiler().enter("broadcast");
@ -821,7 +821,7 @@ index ba2af2abe2dd09eb6801f431a0942bd93755c97e..875f353dc3a0f3418b01821abf30e0f1
chunk.setInhabitedTime(chunk.getInhabitedTime() + j); chunk.setInhabitedTime(chunk.getInhabitedTime() + j);
if (flag1 && (this.allowMonsters || this.allowAnimals) && this.world.getWorldBorder().isInBounds(chunk.getPos()) && !this.playerChunkMap.isOutsideOfRange(chunkcoordintpair, true)) { // Spigot if (flag1 && (this.allowMonsters || this.allowAnimals) && this.world.getWorldBorder().isInBounds(chunk.getPos()) && !this.playerChunkMap.isOutsideOfRange(chunkcoordintpair, true)) { // Spigot
this.world.getMethodProfiler().enter("spawner"); this.world.getMethodProfiler().enter("spawner");
@@ -640,24 +651,24 @@ public class ChunkProviderServer extends IChunkProvider { @@ -650,24 +661,24 @@ public class ChunkProviderServer extends IChunkProvider {
this.world.getMethodProfiler().exit(); this.world.getMethodProfiler().exit();
} }

Datei anzeigen

@ -265,10 +265,10 @@ index 8dc47452a453023e332303575b36732417abd84e..560e2f42b702c5c4870640ad7da3aa48
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 32e96bc05704f10ac4830a661bd6abb71b71f487..265af7ac7fba984ed3d486d6c5d01b54dd2592d9 100644 index 4ca9ddacb7da760b31d405e77b691ef6d8ff534a..13a83f285126123811a148453ccaea6f9bf197b4 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1799,7 +1799,7 @@ public class CraftWorld implements World { @@ -1797,7 +1797,7 @@ public class CraftWorld implements World {
} else if (TNTPrimed.class.isAssignableFrom(clazz)) { } else if (TNTPrimed.class.isAssignableFrom(clazz)) {
entity = new EntityTNTPrimed(world, x, y, z, null); entity = new EntityTNTPrimed(world, x, y, z, null);
} else if (ExperienceOrb.class.isAssignableFrom(clazz)) { } else if (ExperienceOrb.class.isAssignableFrom(clazz)) {

Datei anzeigen

@ -286,7 +286,7 @@ index 9eb4acf93c65a1473e385be317e5d93cd4571d41..681a84e5b3e7594a43fac0d47f1df2ee
@Override @Override
public PluginCommand getPluginCommand(String name) { public PluginCommand getPluginCommand(String name) {
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index afbe711acbd1cbaf307513d4fede44bb17b3caae..fc07fdb590475ccaa09875b8fcbb81adc0db5e66 100644 index 18a945ea8674390d294e2a978c78ee2b53039aed..c3641ca48bfe4051f6450c891ccd4dd023257cb5 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -13,7 +13,7 @@ import java.util.logging.Logger; @@ -13,7 +13,7 @@ import java.util.logging.Logger;
@ -325,7 +325,7 @@ index afbe711acbd1cbaf307513d4fede44bb17b3caae..fc07fdb590475ccaa09875b8fcbb81ad
+ System.setProperty(TerminalConsoleAppender.JLINE_OVERRIDE_PROPERTY, "false"); // Paper + 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) {
@@ -226,7 +237,7 @@ public class Main { @@ -226,7 +237,7 @@ public class Main {
System.out.println("Unable to read system info"); System.out.println("Unable to read system info");
} }

Datei anzeigen

@ -9,10 +9,10 @@ from triggering monster spawns on a server.
Also a highly more effecient way to blanket block spawns in a world Also a highly more effecient way to blanket block spawns in a world
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index fa4ad0b6dcd2cb428d87047340b81594b271e4b2..8c6550433c20c54cbe390219821ce393c5720da8 100644 index 7464aeb4e2f2cbe177cfd2ac19c45aabac625632..261eff5bdb4f4dfae2f66eecad79b21fef69ea8f 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -589,6 +589,15 @@ public class ChunkProviderServer extends IChunkProvider { @@ -599,6 +599,15 @@ public class ChunkProviderServer extends IChunkProvider {
this.world.timings.countNaturalMobs.stopTiming(); // Paper - timings this.world.timings.countNaturalMobs.stopTiming(); // Paper - timings
this.world.getMethodProfiler().exit(); this.world.getMethodProfiler().exit();

Datei anzeigen

@ -43,10 +43,10 @@ index e428b3cb8c8ca5a662a0e867bf74d08775f1bacd..a834a77b2de8f7287be69fd5d002ff43
if (this.a(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit if (this.a(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 265af7ac7fba984ed3d486d6c5d01b54dd2592d9..d6e101ca9fade08e4d2545fb6e38cb2f6e988a1c 100644 index 13a83f285126123811a148453ccaea6f9bf197b4..1a3ca48485ebce128ae1288e6a50308c76ee0452 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -2289,11 +2289,17 @@ public class CraftWorld implements World { @@ -2287,11 +2287,17 @@ public class CraftWorld implements World {
@Override @Override
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) { public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) {

Datei anzeigen

@ -8,10 +8,10 @@ This API has more capabilities than .dropItem with the Consumer function
Item can be set inside of the Consumer pre spawn function. Item can be set inside of the Consumer pre spawn function.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index d6e101ca9fade08e4d2545fb6e38cb2f6e988a1c..a427fea9c70380e2301515c6a24497e382c5097b 100644 index 1a3ca48485ebce128ae1288e6a50308c76ee0452..28a94e473482b414b50ca793564acd409a5dc133 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1491,6 +1491,10 @@ public class CraftWorld implements World { @@ -1489,6 +1489,10 @@ public class CraftWorld implements World {
if (Boat.class.isAssignableFrom(clazz)) { if (Boat.class.isAssignableFrom(clazz)) {
entity = new EntityBoat(world, x, y, z); entity = new EntityBoat(world, x, y, z);
entity.setPositionRotation(x, y, z, yaw, pitch); entity.setPositionRotation(x, y, z, yaw, pitch);

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Expand Explosions API
Add Entity as a Source capability, and add more API choices, and on Location. Add Entity as a Source capability, and add more API choices, and on Location.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index a427fea9c70380e2301515c6a24497e382c5097b..a16ab1f845ba98b8895402ae93c4cd90f48f617c 100644 index 28a94e473482b414b50ca793564acd409a5dc133..8968bf92b6c2718cbf9519c724bc85d27de54e72 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -879,6 +879,11 @@ public class CraftWorld implements World { @@ -877,6 +877,11 @@ public class CraftWorld implements World {
public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, Entity source) { public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, Entity source) {
return !world.createExplosion(source == null ? null : ((CraftEntity) source).getHandle(), x, y, z, power, setFire, breakBlocks ? Explosion.Effect.BREAK : Explosion.Effect.NONE).wasCanceled; return !world.createExplosion(source == null ? null : ((CraftEntity) source).getHandle(), x, y, z, power, setFire, breakBlocks ? Explosion.Effect.BREAK : Explosion.Effect.NONE).wasCanceled;
} }

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Implement World.getEntity(UUID) API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index a16ab1f845ba98b8895402ae93c4cd90f48f617c..cde999c97f5a1ccab0d13f02708992fac3876e67 100644 index 8968bf92b6c2718cbf9519c724bc85d27de54e72..a59172ff043e5220ffdd363582c38ae53c429f1a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1293,6 +1293,15 @@ public class CraftWorld implements World { @@ -1291,6 +1291,15 @@ public class CraftWorld implements World {
return list; return list;
} }

Datei anzeigen

@ -92,10 +92,10 @@ index 426ca12970e0c75ba75eee6c3e3cdbf833730737..3067ab76d94c58fbfd52fac6754bf6d6
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index cde999c97f5a1ccab0d13f02708992fac3876e67..960e29cb16f1b08f522832700c60d25416585cce 100644 index a59172ff043e5220ffdd363582c38ae53c429f1a..6c3cd51d92d2271cd216c42c18733d549fbe668d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1029,6 +1029,7 @@ public class CraftWorld implements World { @@ -1027,6 +1027,7 @@ public class CraftWorld implements World {
for (Object o : world.entitiesById.values()) { for (Object o : world.entitiesById.values()) {
if (o instanceof net.minecraft.server.Entity) { if (o instanceof net.minecraft.server.Entity) {
net.minecraft.server.Entity mcEnt = (net.minecraft.server.Entity) o; net.minecraft.server.Entity mcEnt = (net.minecraft.server.Entity) o;
@ -103,7 +103,7 @@ index cde999c97f5a1ccab0d13f02708992fac3876e67..960e29cb16f1b08f522832700c60d254
Entity bukkitEntity = mcEnt.getBukkitEntity(); Entity bukkitEntity = mcEnt.getBukkitEntity();
// Assuming that bukkitEntity isn't null // Assuming that bukkitEntity isn't null
@@ -1048,6 +1049,7 @@ public class CraftWorld implements World { @@ -1046,6 +1047,7 @@ public class CraftWorld implements World {
for (Object o : world.entitiesById.values()) { for (Object o : world.entitiesById.values()) {
if (o instanceof net.minecraft.server.Entity) { if (o instanceof net.minecraft.server.Entity) {
net.minecraft.server.Entity mcEnt = (net.minecraft.server.Entity) o; net.minecraft.server.Entity mcEnt = (net.minecraft.server.Entity) o;
@ -111,7 +111,7 @@ index cde999c97f5a1ccab0d13f02708992fac3876e67..960e29cb16f1b08f522832700c60d254
Entity bukkitEntity = mcEnt.getBukkitEntity(); Entity bukkitEntity = mcEnt.getBukkitEntity();
// Assuming that bukkitEntity isn't null // Assuming that bukkitEntity isn't null
@@ -1074,6 +1076,7 @@ public class CraftWorld implements World { @@ -1072,6 +1074,7 @@ public class CraftWorld implements World {
for (Object entity: world.entitiesById.values()) { for (Object entity: world.entitiesById.values()) {
if (entity instanceof net.minecraft.server.Entity) { if (entity instanceof net.minecraft.server.Entity) {
@ -119,7 +119,7 @@ index cde999c97f5a1ccab0d13f02708992fac3876e67..960e29cb16f1b08f522832700c60d254
Entity bukkitEntity = ((net.minecraft.server.Entity) entity).getBukkitEntity(); Entity bukkitEntity = ((net.minecraft.server.Entity) entity).getBukkitEntity();
if (bukkitEntity == null) { if (bukkitEntity == null) {
@@ -1097,6 +1100,7 @@ public class CraftWorld implements World { @@ -1095,6 +1098,7 @@ public class CraftWorld implements World {
for (Object entity: world.entitiesById.values()) { for (Object entity: world.entitiesById.values()) {
if (entity instanceof net.minecraft.server.Entity) { if (entity instanceof net.minecraft.server.Entity) {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Send nearby packets from world player list not server list
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 22f18be4627fefe500239f7a35eee3b019bcffcc..085b70508bb116a1082a9fd79a389199a263109b 100644 index a225cd8738df80344afe5256ae14c84337865371..69c2c3871a45052a64202470aa5bcc1feba61f11 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java --- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -910,8 +910,25 @@ public abstract class PlayerList { @@ -910,8 +910,25 @@ public abstract class PlayerList {
@ -68,10 +68,10 @@ index 3067ab76d94c58fbfd52fac6754bf6d6d7f01d09..6e878c9b9dee511812df5ea2491d953f
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 960e29cb16f1b08f522832700c60d25416585cce..c7c75a3bfd35ed4a9233e80575a5082660d82d03 100644 index 6c3cd51d92d2271cd216c42c18733d549fbe668d..ad951812835b1fa786e964c533efc4547c57b7a2 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -2124,7 +2124,7 @@ public class CraftWorld implements World { @@ -2122,7 +2122,7 @@ public class CraftWorld implements World {
double z = loc.getZ(); double z = loc.getZ();
PacketPlayOutCustomSoundEffect packet = new PacketPlayOutCustomSoundEffect(new MinecraftKey(sound), SoundCategory.valueOf(category.name()), new Vec3D(x, y, z), volume, pitch); PacketPlayOutCustomSoundEffect packet = new PacketPlayOutCustomSoundEffect(new MinecraftKey(sound), SoundCategory.valueOf(category.name()), new Vec3D(x, y, z), volume, pitch);

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Make CraftWorld#loadChunk(int, int, false) load unconverted
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index c7c75a3bfd35ed4a9233e80575a5082660d82d03..68b1382838f187f9bfbd83a3f582631af6218e29 100644 index ad951812835b1fa786e964c533efc4547c57b7a2..4e7b11af047c267ce87549e0ba178d7223c03b63 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -501,7 +501,7 @@ public class CraftWorld implements World { @@ -499,7 +499,7 @@ public class CraftWorld implements World {
@Override @Override
public boolean loadChunk(int x, int z, boolean generate) { public boolean loadChunk(int x, int z, boolean generate) {
org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot

Datei anzeigen

@ -17,10 +17,10 @@ index b5816dc89ede5f5f1780d3086d9b1a41fba2b19d..bed15873b675bbd05c0149d655f9fb16
if (this.world.isDay() && !this.world.isClientSide) { if (this.world.isDay() && !this.world.isClientSide) {
float f = this.aI(); float f = this.aI();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 68b1382838f187f9bfbd83a3f582631af6218e29..db31b17b87084c47402f5452872f385629c58382 100644 index 4e7b11af047c267ce87549e0ba178d7223c03b63..07729667f5c66bbcb85fc59cb5fa3c218efa2ec8 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -860,6 +860,13 @@ public class CraftWorld implements World { @@ -858,6 +858,13 @@ public class CraftWorld implements World {
} }
} }

Datei anzeigen

@ -9,15 +9,14 @@ 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 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 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 0d5731429abe7b4ff97d6644ff088063dde19e60..5ea7b0b25ae837645f690443d674ce7eb48c1692 100644 index 2a3d133e51326b0088af2ce53e09bf2fe4b0c3c6..568eca9d3c499e33290aa8ab8548d9c64c97ce5f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -405,14 +405,13 @@ public class CraftWorld implements World { @@ -405,13 +405,13 @@ public class CraftWorld implements World {
@Override @Override
public boolean isChunkLoaded(int x, int z) { public boolean isChunkLoaded(int x, int z) {
- net.minecraft.server.Chunk chunk = world.getChunkProvider().getChunkAt(x, z, false); - return world.getChunkProvider().isChunkLoaded(x, z);
- return chunk != null;
+ return world.getChunkProvider().getChunkAtIfLoadedImmediately(x, z) != null; // Paper + return world.getChunkProvider().getChunkAtIfLoadedImmediately(x, z) != null; // Paper
} }

Datei anzeigen

@ -21,7 +21,7 @@ index 572679e4d1ca0d84a08a5c48542fa40d426461e5..071e5e7f729d6c3ffb70506e7ef32eeb
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 4b50158fe12533d0af541be343731d220e772bd9..8b499c815c77bf5b356d4216ba6cbf2a329c9aca 100644 index eabca3975af61b669fd31a23cb7c27883db7833e..257adcf4d5387fc18d5c48e0fa221f68539ad8f9 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -586,6 +586,14 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas @@ -586,6 +586,14 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -199,10 +199,10 @@ index 55c0b5dc30cff8de5a83a97ae17fec7624cbe3d9..ca0a23be27ee8174204867d463eb89a1
public LongSet getForceLoadedChunks() { public LongSet getForceLoadedChunks() {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 5ea7b0b25ae837645f690443d674ce7eb48c1692..8f8c18c5a4f483acee0d61a8007577ac8193bef9 100644 index 568eca9d3c499e33290aa8ab8548d9c64c97ce5f..b257ef7583f7bc3b6d31f0be89990603640c5ff7 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1932,15 +1932,21 @@ public class CraftWorld implements World { @@ -1931,15 +1931,21 @@ public class CraftWorld implements World {
@Override @Override
public void setKeepSpawnInMemory(boolean keepLoaded) { public void setKeepSpawnInMemory(boolean keepLoaded) {

Datei anzeigen

@ -29,7 +29,7 @@ index 071e5e7f729d6c3ffb70506e7ef32eebee1e9118..48676152152faf7a7b9524ac37d8b4a8
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 4f05468590e30f4b11599d3841418c76519255e4..820033289cbeb782429b26b6bcabc3835b0101a3 100644 index 962f425bbb7165740e77664dc543f976ef3d9c4a..dd3857bb6a002d8432ecbc6c6b52a39e5d55e6a6 100644
--- a/src/main/java/net/minecraft/server/Chunk.java --- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -42,7 +42,7 @@ public class Chunk implements IChunkAccess { @@ -42,7 +42,7 @@ public class Chunk implements IChunkAccess {
@ -42,10 +42,10 @@ index 4f05468590e30f4b11599d3841418c76519255e4..820033289cbeb782429b26b6bcabc383
private long inhabitedTime; private long inhabitedTime;
@Nullable @Nullable
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index e6d08756f76360b29b29f18305e5ec84d09f2d54..6713b7667ae4fe3f1f555a71321832b4a9492162 100644 index 8a8fb6acaabc5fc179a23ce3e23ddb54e1ee23a4..7b855ec2914a8a31ce0ade0f7ad085dd04f71478 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -515,6 +515,15 @@ public class ChunkProviderServer extends IChunkProvider { @@ -525,6 +525,15 @@ public class ChunkProviderServer extends IChunkProvider {
} // Paper - Timings } // Paper - Timings
} }
@ -62,7 +62,7 @@ index e6d08756f76360b29b29f18305e5ec84d09f2d54..6713b7667ae4fe3f1f555a71321832b4
public void close() throws IOException { public void close() throws IOException {
// CraftBukkit start // CraftBukkit start
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 8b499c815c77bf5b356d4216ba6cbf2a329c9aca..cfed5f51431ec5aecb538a321327bfb6e8a0bd88 100644 index 257adcf4d5387fc18d5c48e0fa221f68539ad8f9..7920d24ab089fb8360ef74946cf7dc35cb7625eb 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -168,6 +168,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas @@ -168,6 +168,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas

Datei anzeigen

@ -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) 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 diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 6713b7667ae4fe3f1f555a71321832b4a9492162..4c9c8e483974f8869d6711626620cfd7d814d956 100644 index 7b855ec2914a8a31ce0ade0f7ad085dd04f71478..d8647f272bdb29518b1a7faafa6fbcb53ffe1163 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -28,7 +28,7 @@ public class ChunkProviderServer extends IChunkProvider { @@ -28,7 +28,7 @@ public class ChunkProviderServer extends IChunkProvider {
@ -20,7 +20,7 @@ index 6713b7667ae4fe3f1f555a71321832b4a9492162..4c9c8e483974f8869d6711626620cfd7
public final PlayerChunkMap playerChunkMap; public final PlayerChunkMap playerChunkMap;
private final WorldPersistentData worldPersistentData; private final WorldPersistentData worldPersistentData;
private long lastTickTime; private long lastTickTime;
@@ -284,6 +284,21 @@ public class ChunkProviderServer extends IChunkProvider { @@ -294,6 +294,21 @@ public class ChunkProviderServer extends IChunkProvider {
return ret; return ret;
} }
@ -280,7 +280,7 @@ index 942b7d323936a872d83c536c1901b4b436aa7e7c..2f8af42e2aadeb1b11db94fdb54ec0ba
throwable = throwable1; throwable = throwable1;
throw throwable1; throw throwable1;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 8f8c18c5a4f483acee0d61a8007577ac8193bef9..50467656df0b54c2dcba8696b5677a2fc975b178 100644 index b257ef7583f7bc3b6d31f0be89990603640c5ff7..cf059aa091e9c732f99b89fc347074a9c1b879a8 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -19,6 +19,7 @@ import java.util.Objects; @@ -19,6 +19,7 @@ import java.util.Objects;
@ -315,7 +315,7 @@ index 8f8c18c5a4f483acee0d61a8007577ac8193bef9..50467656df0b54c2dcba8696b5677a2f
} catch (IOException ex) { } catch (IOException ex) {
throw new RuntimeException(ex); throw new RuntimeException(ex);
} }
@@ -523,20 +538,49 @@ public class CraftWorld implements World { @@ -522,20 +537,49 @@ public class CraftWorld implements World {
@Override @Override
public boolean loadChunk(int x, int z, boolean generate) { public boolean loadChunk(int x, int z, boolean generate) {
org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot

Datei anzeigen

@ -2309,10 +2309,10 @@ index 0000000000000000000000000000000000000000..b5c2e1f4a2b5fdcaa6bb01f4b3b6847c
+ +
+} +}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 4c9c8e483974f8869d6711626620cfd7d814d956..a88e8598aab55ac769a5f186507f362e4f99cef4 100644 index d8647f272bdb29518b1a7faafa6fbcb53ffe1163..981cf581c7504c38120d48c06b6351952fab43c0 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -299,11 +299,138 @@ public class ChunkProviderServer extends IChunkProvider { @@ -309,11 +309,138 @@ public class ChunkProviderServer extends IChunkProvider {
return playerChunk.getAvailableChunkNow(); return playerChunk.getAvailableChunkNow();
} }
@ -2451,7 +2451,7 @@ index 4c9c8e483974f8869d6711626620cfd7d814d956..a88e8598aab55ac769a5f186507f362e
if (Thread.currentThread() != this.serverThread) { if (Thread.currentThread() != this.serverThread) {
return (IChunkAccess) CompletableFuture.supplyAsync(() -> { return (IChunkAccess) CompletableFuture.supplyAsync(() -> {
return this.getChunkAt(i, j, chunkstatus, flag); return this.getChunkAt(i, j, chunkstatus, flag);
@@ -326,11 +453,16 @@ public class ChunkProviderServer extends IChunkProvider { @@ -336,11 +463,16 @@ public class ChunkProviderServer extends IChunkProvider {
} }
gameprofilerfiller.c("getChunkCacheMiss"); gameprofilerfiller.c("getChunkCacheMiss");
@ -2469,7 +2469,7 @@ index 4c9c8e483974f8869d6711626620cfd7d814d956..a88e8598aab55ac769a5f186507f362e
this.world.timings.syncChunkLoad.stopTiming(); // Paper this.world.timings.syncChunkLoad.stopTiming(); // Paper
} // Paper } // Paper
ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> { ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> {
@@ -396,6 +528,11 @@ public class ChunkProviderServer extends IChunkProvider { @@ -406,6 +538,11 @@ public class ChunkProviderServer extends IChunkProvider {
} }
private CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> getChunkFutureMainThread(int i, int j, ChunkStatus chunkstatus, boolean flag) { private CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> getChunkFutureMainThread(int i, int j, ChunkStatus chunkstatus, boolean flag) {
@ -2481,7 +2481,7 @@ index 4c9c8e483974f8869d6711626620cfd7d814d956..a88e8598aab55ac769a5f186507f362e
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i, j); ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i, j);
long k = chunkcoordintpair.pair(); long k = chunkcoordintpair.pair();
int l = 33 + ChunkStatus.a(chunkstatus); int l = 33 + ChunkStatus.a(chunkstatus);
@@ -835,11 +972,12 @@ public class ChunkProviderServer extends IChunkProvider { @@ -845,11 +982,12 @@ public class ChunkProviderServer extends IChunkProvider {
protected boolean executeNext() { protected boolean executeNext() {
// CraftBukkit start - process pending Chunk loadCallback() and unloadCallback() after each run task // CraftBukkit start - process pending Chunk loadCallback() and unloadCallback() after each run task
try { try {
@ -4038,7 +4038,7 @@ index 83585f3ba7ef9e72f3702079a82f62c8b17e4077..83e6c872028107a17de1c08a5f6e8a02
} }
public void removeTicketsForSpawn(int radiusInBlocks, BlockPosition spawn) { public void removeTicketsForSpawn(int radiusInBlocks, BlockPosition spawn) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 50467656df0b54c2dcba8696b5677a2fc975b178..1c5154f8f1b02d8e84fc54afeacb56a86e244ec3 100644 index cf059aa091e9c732f99b89fc347074a9c1b879a8..5aea49404717061fce4bf24e91f36217db5cee83 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -75,6 +75,7 @@ import net.minecraft.server.GroupDataEntity; @@ -75,6 +75,7 @@ import net.minecraft.server.GroupDataEntity;
@ -4049,7 +4049,7 @@ index 50467656df0b54c2dcba8696b5677a2fc975b178..1c5154f8f1b02d8e84fc54afeacb56a8
import net.minecraft.server.MovingObjectPosition; import net.minecraft.server.MovingObjectPosition;
import net.minecraft.server.PacketPlayOutCustomSoundEffect; import net.minecraft.server.PacketPlayOutCustomSoundEffect;
import net.minecraft.server.PacketPlayOutUpdateTime; import net.minecraft.server.PacketPlayOutUpdateTime;
@@ -556,22 +557,23 @@ public class CraftWorld implements World { @@ -555,22 +556,23 @@ public class CraftWorld implements World {
return true; return true;
} }
@ -4081,7 +4081,7 @@ index 50467656df0b54c2dcba8696b5677a2fc975b178..1c5154f8f1b02d8e84fc54afeacb56a8
// fall through to load // fall through to load
// we do this so we do not re-read the chunk data on disk // we do this so we do not re-read the chunk data on disk
@@ -2443,6 +2445,34 @@ public class CraftWorld implements World { @@ -2442,6 +2444,34 @@ public class CraftWorld implements World {
return new CraftDragonBattle(((WorldProviderTheEnd) worldProvider).o()); // PAIL rename getDragonBattle return new CraftDragonBattle(((WorldProviderTheEnd) worldProvider).o()); // PAIL rename getDragonBattle
} }

Datei anzeigen

@ -286,10 +286,10 @@ index 0000000000000000000000000000000000000000..59aec103295f747793fdc0a52eb45f41
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index a88e8598aab55ac769a5f186507f362e4f99cef4..21e444e6ad78081353a7330b60c74164e4596d61 100644 index 981cf581c7504c38120d48c06b6351952fab43c0..54cf319e9db1aad793ab7f55249f9857b450eda2 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -460,6 +460,7 @@ public class ChunkProviderServer extends IChunkProvider { @@ -470,6 +470,7 @@ public class ChunkProviderServer extends IChunkProvider {
this.world.asyncChunkTaskManager.raisePriority(x, z, com.destroystokyo.paper.io.PrioritizedTaskQueue.HIGHEST_PRIORITY); this.world.asyncChunkTaskManager.raisePriority(x, z, com.destroystokyo.paper.io.PrioritizedTaskQueue.HIGHEST_PRIORITY);
com.destroystokyo.paper.io.chunk.ChunkTaskManager.pushChunkWait(this.world, x, z); com.destroystokyo.paper.io.chunk.ChunkTaskManager.pushChunkWait(this.world, x, z);
// Paper end // Paper end
@ -298,7 +298,7 @@ index a88e8598aab55ac769a5f186507f362e4f99cef4..21e444e6ad78081353a7330b60c74164
this.serverThreadQueue.awaitTasks(completablefuture::isDone); this.serverThreadQueue.awaitTasks(completablefuture::isDone);
com.destroystokyo.paper.io.chunk.ChunkTaskManager.popChunkWait(); // Paper - async chunk debug com.destroystokyo.paper.io.chunk.ChunkTaskManager.popChunkWait(); // Paper - async chunk debug
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 21bb992cad2fd2692940ebe26360b8014c1df136..d46f09f684b0b49e84b86fab5f10ac83b4b64d0b 100644 index 8e5c54af26d2c7abf2daae081af97caee7fd9f7a..045e449c7e411dec7ef415c76c808cda426db652 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java
@@ -1174,7 +1174,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -1174,7 +1174,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@ -329,7 +329,7 @@ index 21bb992cad2fd2692940ebe26360b8014c1df136..d46f09f684b0b49e84b86fab5f10ac83
if (chunk != null) { if (chunk != null) {
chunk.a(oclass, axisalignedbb, list, predicate); chunk.a(oclass, axisalignedbb, list, predicate);
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index f84248ad9f90aaaf02afa35a4147fb11f703fdcb..befdabc38edfcdffb588c4cdbe52908afe8a9c04 100644 index 83e6c872028107a17de1c08a5f6e8a02d62277ea..da38293cf02d84f3e24a883136ffe5118a510b5a 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -154,6 +154,12 @@ public class WorldServer extends World { @@ -154,6 +154,12 @@ public class WorldServer extends World {

Datei anzeigen

@ -545,10 +545,10 @@ index 0000000000000000000000000000000000000000..4f13d3ff8391793a99f067189f854078
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 21e444e6ad78081353a7330b60c74164e4596d61..927abc78e973e6f0f87e12303409fd808b3cf6ab 100644 index 54cf319e9db1aad793ab7f55249f9857b450eda2..633f12098973857eca04acd2839bb4d453860f1e 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -747,7 +747,22 @@ public class ChunkProviderServer extends IChunkProvider { @@ -757,7 +757,22 @@ public class ChunkProviderServer extends IChunkProvider {
this.world.timings.countNaturalMobs.startTiming(); // Paper - timings this.world.timings.countNaturalMobs.startTiming(); // Paper - timings
int l = this.chunkMapDistance.b(); int l = this.chunkMapDistance.b();
EnumCreatureType[] aenumcreaturetype = EnumCreatureType.values(); EnumCreatureType[] aenumcreaturetype = EnumCreatureType.values();
@ -572,7 +572,7 @@ index 21e444e6ad78081353a7330b60c74164e4596d61..927abc78e973e6f0f87e12303409fd80
this.world.timings.countNaturalMobs.stopTiming(); // Paper - timings this.world.timings.countNaturalMobs.stopTiming(); // Paper - timings
this.world.getMethodProfiler().exit(); this.world.getMethodProfiler().exit();
@@ -815,8 +830,23 @@ public class ChunkProviderServer extends IChunkProvider { @@ -825,8 +840,23 @@ public class ChunkProviderServer extends IChunkProvider {
if (enumcreaturetype != EnumCreatureType.MISC && (!enumcreaturetype.c() || this.allowAnimals) && (enumcreaturetype.c() || this.allowMonsters) && (!enumcreaturetype.d() || flag2)) { 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 int k1 = limit * l / ChunkProviderServer.b; // CraftBukkit - use per-world limits

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Fix spawning of hanging entities that are not ItemFrames and
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 1c5154f8f1b02d8e84fc54afeacb56a86e244ec3..5f51e8c05a822dfad35bcfa4c9a33f1f067e85a7 100644 index 5aea49404717061fce4bf24e91f36217db5cee83..c030ff7b34fdd4c4632714a800935a6a5f8082cb 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1851,7 +1851,12 @@ public class CraftWorld implements World { @@ -1850,7 +1850,12 @@ public class CraftWorld implements World {
height = 9; height = 9;
} }

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add effect to block break naturally
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index 1fc7f55fcaa1f9aaa4c675f9fcd508ffb80e9629..a5f981cd0d373db45f22384803c323be428dce0c 100644 index 16349e8e796c5e7e4e43fb355d4d641df7f41dc9..382b50d37aced746266b618f3f277846728565bd 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -606,6 +606,13 @@ public class CraftBlock implements Block { @@ -606,6 +606,13 @@ public class CraftBlock implements Block {
@ -24,7 +24,7 @@ index 1fc7f55fcaa1f9aaa4c675f9fcd508ffb80e9629..a5f981cd0d373db45f22384803c323be
net.minecraft.server.Block block = iblockdata.getBlock(); net.minecraft.server.Block block = iblockdata.getBlock();
@@ -615,6 +622,7 @@ public class CraftBlock implements Block { @@ -615,6 +622,7 @@ public class CraftBlock implements Block {
// Modelled off EntityHuman#hasBlock // Modelled off EntityHuman#hasBlock
if (block != Blocks.AIR && (iblockdata.getMaterial().isAlwaysDestroyable() || nmsItem.canDestroySpecialBlock(iblockdata))) { if (block != Blocks.AIR && (item == null || iblockdata.getMaterial().isAlwaysDestroyable() || nmsItem.canDestroySpecialBlock(iblockdata))) {
net.minecraft.server.Block.dropItems(iblockdata, world.getMinecraftWorld(), position, world.getTileEntity(position), null, nmsItem); net.minecraft.server.Block.dropItems(iblockdata, world.getMinecraftWorld(), position, world.getTileEntity(position), null, nmsItem);
+ if (triggerEffect) world.triggerEffect(org.bukkit.Effect.STEP_SOUND.getId(), position, net.minecraft.server.Block.getCombinedId(block.getBlockData())); // Paper + if (triggerEffect) world.triggerEffect(org.bukkit.Effect.STEP_SOUND.getId(), position, net.minecraft.server.Block.getCombinedId(block.getBlockData())); // Paper
result = true; result = true;

Datei anzeigen

@ -7,10 +7,10 @@ bypass the need to get a player chunk, then get the either,
then unwrap it... then unwrap it...
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 927abc78e973e6f0f87e12303409fd808b3cf6ab..6688b1340e2cc8fb13a7e80c9b7c37b8822dcecd 100644 index 633f12098973857eca04acd2839bb4d453860f1e..e467cd8123dafc46a8c894f1ffa9440de0d45340 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -436,6 +436,12 @@ public class ChunkProviderServer extends IChunkProvider { @@ -446,6 +446,12 @@ public class ChunkProviderServer extends IChunkProvider {
return this.getChunkAt(i, j, chunkstatus, flag); return this.getChunkAt(i, j, chunkstatus, flag);
}, this.serverThreadQueue).join(); }, this.serverThreadQueue).join();
} else { } else {
@ -23,7 +23,7 @@ index 927abc78e973e6f0f87e12303409fd808b3cf6ab..6688b1340e2cc8fb13a7e80c9b7c37b8
GameProfilerFiller gameprofilerfiller = this.world.getMethodProfiler(); GameProfilerFiller gameprofilerfiller = this.world.getMethodProfiler();
gameprofilerfiller.c("getChunk"); gameprofilerfiller.c("getChunk");
@@ -486,39 +492,7 @@ public class ChunkProviderServer extends IChunkProvider { @@ -496,39 +502,7 @@ public class ChunkProviderServer extends IChunkProvider {
if (Thread.currentThread() != this.serverThread) { if (Thread.currentThread() != this.serverThread) {
return null; return null;
} else { } else {
@ -65,7 +65,7 @@ index 927abc78e973e6f0f87e12303409fd808b3cf6ab..6688b1340e2cc8fb13a7e80c9b7c37b8
} }
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index b9685abed74fd1fb239b0940751fde65cceb6f57..d8eb8a59da36215334582ae73822e1fd4a5b2df1 100644 index d7ac4c86d170a8d7d816f86ac691c3b5129a20ba..adacff593ee20804b5ddb2df55b66bc6c162dc70 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java
@@ -266,6 +266,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -266,6 +266,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable {

Datei anzeigen

@ -57,10 +57,10 @@ index 0000000000000000000000000000000000000000..f6ff4d8132a95895680f5bc81f8f873e
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index d53b34ba552771bf271131ce0a56ebb992ccc84c..a1b5e6b90fc93f83186cf3ebf3e158767008c69a 100644 index 9e3471be219b5e061486c8a3e4b638a45e6f28f5..9d5275c628b3963befdfa60841ef3c3331c8338c 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -756,7 +756,7 @@ public class ChunkProviderServer extends IChunkProvider { @@ -766,7 +766,7 @@ public class ChunkProviderServer extends IChunkProvider {
entityPlayer.playerNaturallySpawnedEvent.callEvent(); entityPlayer.playerNaturallySpawnedEvent.callEvent();
}; };
// Paper end // Paper end
@ -243,7 +243,7 @@ index 6a2cf0c6f649e7a74b58fc292f57a08c0663b0a4..ea6b310e8e4741c8bb301e5bc586faca
while (objectbidirectionaliterator.hasNext()) { while (objectbidirectionaliterator.hasNext()) {
Entry<PlayerChunk> entry = (Entry) objectbidirectionaliterator.next(); Entry<PlayerChunk> entry = (Entry) objectbidirectionaliterator.next();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 5f51e8c05a822dfad35bcfa4c9a33f1f067e85a7..efa92c798010b4815b4aa63fe1e4832eeeccd9e9 100644 index c030ff7b34fdd4c4632714a800935a6a5f8082cb..1929aacbe83c401c7254484aa8df62ed1554e3ba 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -74,6 +74,7 @@ import net.minecraft.server.GameRules; @@ -74,6 +74,7 @@ import net.minecraft.server.GameRules;

Datei anzeigen

@ -1,29 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 8 Apr 2020 21:07:08 -0400
Subject: [PATCH] Don't load chunks when attempting to unload a chunk
Big Brain Logic
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index efa92c798010b4815b4aa63fe1e4832eeeccd9e9..c77c59223eb652346502b9a896e0ad536395e444 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -474,7 +474,7 @@ public class CraftWorld implements World {
@Override
public boolean unloadChunkRequest(int x, int z) {
org.spigotmc.AsyncCatcher.catchOp("chunk unload"); // Spigot
- net.minecraft.server.IChunkAccess chunk = world.getChunkProvider().getChunkAt(x, z, ChunkStatus.FULL, false);
+ net.minecraft.server.IChunkAccess chunk = world.getChunkProvider().getChunkAtIfLoadedImmediately(x, z); // Paper
if (chunk != null) {
world.getChunkProvider().removeTicket(TicketType.PLUGIN, chunk.getPos(), 1, Unit.INSTANCE);
}
@@ -484,7 +484,7 @@ public class CraftWorld implements World {
private boolean unloadChunk0(int x, int z, boolean save) {
org.spigotmc.AsyncCatcher.catchOp("chunk unload"); // Spigot
- net.minecraft.server.Chunk chunk = (net.minecraft.server.Chunk) world.getChunkProvider().getChunkAt(x, z, ChunkStatus.FULL, false);
+ net.minecraft.server.Chunk chunk = world.getChunkProvider().getChunkAtIfLoadedImmediately(x, z); // Paper
if (chunk == null) {
return true;
}

Datei anzeigen

@ -56,10 +56,10 @@ index f1b41e16c8ce8323a896339c5d822f8ff7d8f7e6..f8f225e18fa38cad917f52a379233e0a
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index a1b5e6b90fc93f83186cf3ebf3e158767008c69a..2ef8506f10426b8a5877e30986c105c0d95be774 100644 index 9d5275c628b3963befdfa60841ef3c3331c8338c..b6146330a55665a0365ff7474f1843766e0c0ce1 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -689,6 +689,7 @@ public class ChunkProviderServer extends IChunkProvider { @@ -699,6 +699,7 @@ public class ChunkProviderServer extends IChunkProvider {
this.world.getMethodProfiler().enter("purge"); this.world.getMethodProfiler().enter("purge");
this.world.timings.doChunkMap.startTiming(); // Spigot this.world.timings.doChunkMap.startTiming(); // Spigot
this.chunkMapDistance.purgeTickets(); this.chunkMapDistance.purgeTickets();
@ -67,7 +67,7 @@ index a1b5e6b90fc93f83186cf3ebf3e158767008c69a..2ef8506f10426b8a5877e30986c105c0
this.tickDistanceManager(); this.tickDistanceManager();
this.world.timings.doChunkMap.stopTiming(); // Spigot this.world.timings.doChunkMap.stopTiming(); // Spigot
this.world.getMethodProfiler().exitEnter("chunks"); this.world.getMethodProfiler().exitEnter("chunks");
@@ -698,6 +699,7 @@ public class ChunkProviderServer extends IChunkProvider { @@ -708,6 +709,7 @@ public class ChunkProviderServer extends IChunkProvider {
this.world.timings.doChunkUnload.startTiming(); // Spigot this.world.timings.doChunkUnload.startTiming(); // Spigot
this.world.getMethodProfiler().exitEnter("unload"); this.world.getMethodProfiler().exitEnter("unload");
this.playerChunkMap.unloadChunks(booleansupplier); this.playerChunkMap.unloadChunks(booleansupplier);
@ -75,7 +75,7 @@ index a1b5e6b90fc93f83186cf3ebf3e158767008c69a..2ef8506f10426b8a5877e30986c105c0
this.world.timings.doChunkUnload.stopTiming(); // Spigot this.world.timings.doChunkUnload.stopTiming(); // Spigot
this.world.getMethodProfiler().exit(); this.world.getMethodProfiler().exit();
this.clearCache(); this.clearCache();
@@ -756,7 +758,7 @@ public class ChunkProviderServer extends IChunkProvider { @@ -766,7 +768,7 @@ public class ChunkProviderServer extends IChunkProvider {
entityPlayer.playerNaturallySpawnedEvent.callEvent(); entityPlayer.playerNaturallySpawnedEvent.callEvent();
}; };
// Paper end // Paper end
@ -84,7 +84,7 @@ index a1b5e6b90fc93f83186cf3ebf3e158767008c69a..2ef8506f10426b8a5877e30986c105c0
Optional<Chunk> optional = ((Either) playerchunk.b().getNow(PlayerChunk.UNLOADED_CHUNK)).left(); Optional<Chunk> optional = ((Either) playerchunk.b().getNow(PlayerChunk.UNLOADED_CHUNK)).left();
if (optional.isPresent()) { if (optional.isPresent()) {
@@ -839,6 +841,7 @@ public class ChunkProviderServer extends IChunkProvider { @@ -849,6 +851,7 @@ public class ChunkProviderServer extends IChunkProvider {
this.world.timings.chunkTicks.startTiming(); // Spigot // Paper this.world.timings.chunkTicks.startTiming(); // Spigot // Paper
this.world.a(chunk, k); this.world.a(chunk, k);
this.world.timings.chunkTicks.stopTiming(); // Spigot // Paper this.world.timings.chunkTicks.stopTiming(); // Spigot // Paper
@ -92,7 +92,7 @@ index a1b5e6b90fc93f83186cf3ebf3e158767008c69a..2ef8506f10426b8a5877e30986c105c0
} }
} }
}); });
@@ -980,6 +983,41 @@ public class ChunkProviderServer extends IChunkProvider { @@ -990,6 +993,41 @@ public class ChunkProviderServer extends IChunkProvider {
super.executeTask(runnable); super.executeTask(runnable);
} }

Datei anzeigen

@ -40,7 +40,7 @@ index f4215d38acef8018f09dff5f379c14336647687d..4e4c0acc6c103c85b7ba2a390a54d351
this.dimension = ((WorldServer) this.world).getWorldProvider().getDimensionManager(); this.dimension = ((WorldServer) this.world).getWorldProvider().getDimensionManager();
this.playerInteractManager.a((WorldServer) world); this.playerInteractManager.a((WorldServer) world);
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 32d8cc7f22aaddef2e68506eeb44e01795f2aff5..ab2831830ad3a4cec0671d189e0534c843b47f5e 100644 index 157738f452493aabdefb228cd527ba85400baad5..611dea90200fe346915d66317e21d94154381e97 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java --- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -108,6 +108,7 @@ public abstract class PlayerList { @@ -108,6 +108,7 @@ public abstract class PlayerList {

Datei anzeigen

@ -87,7 +87,7 @@ index f8f225e18fa38cad917f52a379233e0a7a869b07..3ee7e5671dd2519cec72b81211f1f391
version = getInt("config-version", 20); version = getInt("config-version", 20);
set("config-version", 20); set("config-version", 20);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 2d54c9a27fc5ca35c54a42b59f5321277d2d822b..c07339c87f8efff9c26aadc778cc3b16e170673f 100644 index 11349565e71d97384d3dcab9cdf6ea168c6d2f4f..a0e33d42a158defc8b4a72de5d01b9395dca42eb 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -106,6 +106,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas @@ -106,6 +106,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Delay unsafe actions until after entity ticking is done
This will help prevent many cases of unregistering entities during entity ticking This will help prevent many cases of unregistering entities during entity ticking
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index a4a2882d32d0167738f8367209dbfd3ca4f5b953..9e32e2db10f5faaa3c5f4adc5cbc2c1a2e4d3073 100644 index 69e6614049e490dc70baf745761c62b173cf693e..aaf85a1497de98522e3a01d4f81a267c4b0cc087 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -60,6 +60,16 @@ public class WorldServer extends World { @@ -60,6 +60,16 @@ public class WorldServer extends World {

Datei anzeigen

@ -330,7 +330,7 @@ index b627180729a24a83ca383f83aee53133ea1b398e..f49193d9d7cd9655fdedf64bebdcf4e1
@Override @Override
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 093dbeae2784d51dae74f66e3e1ce5bf6a370428..99e1e902d8fdf33c157416c5d6abc71b495ac48e 100644 index d3463abe89f6e730373cef5e3ac8c0911d0b0963..e913d249d850210c9efba1bb46ce2ce4df013a62 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -150,6 +150,37 @@ public class Main { @@ -150,6 +150,37 @@ public class Main {

Datei anzeigen

@ -178,7 +178,7 @@ index 4157e50e4d99c029759bffcb48a8d645487554c8..5135308fb6137a34ed6fd061f0a210de
return stream.filter(axisalignedbb1::c).map(VoxelShapes::a); return stream.filter(axisalignedbb1::c).map(VoxelShapes::a);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 8cf191ec7f7c825e3d0996b7e224956a569ab2ba..9f4268202653f6f0ebed49cd67ae691a8b18ccd2 100644 index bdd0908adb7d3cd5370b43be196c975e6c48a70f..1c7955d3ae7ddd1c2d924cec20a91202cf090f40 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java
@@ -1179,6 +1179,32 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -1179,6 +1179,32 @@ public abstract class World implements GeneratorAccess, AutoCloseable {

Datei anzeigen

@ -9,10 +9,10 @@ so inline where possible, and avoid the abstraction of the
Either class. Either class.
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 2ef8506f10426b8a5877e30986c105c0d95be774..722db939971fe395d8250c388fbd7f3b5e87804d 100644 index b6146330a55665a0365ff7474f1843766e0c0ce1..695d12e1942018be6a9e8c999ba6071b9f778568 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -607,27 +607,37 @@ public class ChunkProviderServer extends IChunkProvider { @@ -617,27 +617,37 @@ public class ChunkProviderServer extends IChunkProvider {
public final boolean isInEntityTickingChunk(Entity entity) { return this.a(entity); } // Paper - OBFHELPER public final boolean isInEntityTickingChunk(Entity entity) { return this.a(entity); } // Paper - OBFHELPER
@Override public boolean a(Entity entity) { @Override public boolean a(Entity entity) {

Datei anzeigen

@ -25,10 +25,10 @@ This successfully fixed a reoccurring and highly reproduceable crash
for heightmaps. for heightmaps.
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 722db939971fe395d8250c388fbd7f3b5e87804d..ba99e9949c6fdfc4f49b6b6716100eb51697227d 100644 index 695d12e1942018be6a9e8c999ba6071b9f778568..665d83042dab467cddf315fade883fd55ffc8bfd 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -1040,6 +1040,7 @@ public class ChunkProviderServer extends IChunkProvider { @@ -1050,6 +1050,7 @@ public class ChunkProviderServer extends IChunkProvider {
return super.executeNext() || execChunkTask; // Paper return super.executeNext() || execChunkTask; // Paper
} }
} finally { } finally {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Broadcast join message to console
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 78040e83899f1ef1a6d5c456beb9d13959307c18..c491612267977fb331368825e0d87b2fc297e9c5 100644 index 5428f306340acb92b93fe133b827173b646e5d4c..ba97c48c937051adc0baa1e9acbc911575ea58d0 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java --- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -188,9 +188,9 @@ public abstract class PlayerList { @@ -188,9 +188,9 @@ public abstract class PlayerList {

Datei anzeigen

@ -52,7 +52,7 @@ index 48f858388029e77f710365e73905f8570f1103f5..2caa53a7e143aae32918ecbefc1bdadc
if (!(entity instanceof EntityComplexPart)) { if (!(entity instanceof EntityComplexPart)) {
if (!(entity instanceof EntityLightning)) { if (!(entity instanceof EntityLightning)) {
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index c491612267977fb331368825e0d87b2fc297e9c5..40f5d9fa9069a330b6999eefa50015daa4c19217 100644 index ba97c48c937051adc0baa1e9acbc911575ea58d0..1c7aac029ae01afa127ca386278a4ff8520e3674 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java --- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -177,6 +177,12 @@ public abstract class PlayerList { @@ -177,6 +177,12 @@ public abstract class PlayerList {

Datei anzeigen

@ -9,7 +9,7 @@ their position to the ground/exit location when entering the bed, resulting in
the server believing they're still in the air. the server believing they're still in the air.
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index cf274bcfdc5aeea780eae96df36816c2c5a1f4d9..91d078b6388eaf869afa0e602f73eb194b2e99a5 100644 index 6dd4303c1c211ac4b0bb542ea96cc150581bf8c1..08e087d952edfecd73ad698684b71c09dabbac9e 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -160,7 +160,7 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -160,7 +160,7 @@ public class PlayerConnection implements PacketListenerPlayIn {

Datei anzeigen

@ -69,7 +69,7 @@ index 0b23a0548d52a30c064d624e39a896a9791aab3b..c988c929f1063b417d10d84b0c131277
public boolean hasPermission(int i) { public boolean hasPermission(int i) {
// CraftBukkit start // CraftBukkit start
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 91d078b6388eaf869afa0e602f73eb194b2e99a5..c2f2671da9b3598c2f866db1078d4b1d0f3430ef 100644 index 08e087d952edfecd73ad698684b71c09dabbac9e..c3a86d3007c2fdc5d45f628226507b4a1c968ad6 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -581,8 +581,12 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -581,8 +581,12 @@ public class PlayerConnection implements PacketListenerPlayIn {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Validate PickItem Packet and kick for invalid
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index c2f2671da9b3598c2f866db1078d4b1d0f3430ef..294e9a47e21be0babad2ea3d2a9b3fc79083e350 100644 index c3a86d3007c2fdc5d45f628226507b4a1c968ad6..a716f25478ba9731b7bb07f5d80c3655c8190e8b 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -696,7 +696,14 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -696,7 +696,14 @@ public class PlayerConnection implements PacketListenerPlayIn {

Datei anzeigen

@ -13,7 +13,7 @@ it is triggering a massive movement velocity.
This will ensure that the servers position is synchronized anytime player is teleported. This will ensure that the servers position is synchronized anytime player is teleported.
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 294e9a47e21be0babad2ea3d2a9b3fc79083e350..45944cad9436dd309a6323f80a0c4c2f2bb6367b 100644 index a716f25478ba9731b7bb07f5d80c3655c8190e8b..1f9d231fb93e30286205f7a0a4c898a0e153bd95 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -498,6 +498,7 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -498,6 +498,7 @@ public class PlayerConnection implements PacketListenerPlayIn {

Datei anzeigen

@ -17,7 +17,7 @@ keeping long lived large direct buffers in cache.
Set system properly at server startup if not set already to help protect from this. Set system properly at server startup if not set already to help protect from this.
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 99e1e902d8fdf33c157416c5d6abc71b495ac48e..d6e5d014c0d81f5f7cff6638ccfc2e983fea53d9 100644 index e913d249d850210c9efba1bb46ce2ce4df013a62..2ea6f5b7da35cbb342e72a00ea70fef667f05d49 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -21,6 +21,7 @@ public class Main { @@ -21,6 +21,7 @@ public class Main {

Datei anzeigen

@ -77,10 +77,10 @@ index 10e385eb556faff954df28ed0b3ddaceac2b8baa..ae27942991eeaec77f72b58ab32260a3
public String c() { public String c() {
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index ba99e9949c6fdfc4f49b6b6716100eb51697227d..7a275bf3260f9fbefc41883c5ebdc1eb2196daf0 100644 index 665d83042dab467cddf315fade883fd55ffc8bfd..3089d673a029c493cac756124eb0baa21a8bab7f 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -725,6 +725,36 @@ public class ChunkProviderServer extends IChunkProvider { @@ -735,6 +735,36 @@ public class ChunkProviderServer extends IChunkProvider {
boolean flag1 = this.world.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING) && !world.getPlayers().isEmpty(); // CraftBukkit boolean flag1 = this.world.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING) && !world.getPlayers().isEmpty(); // CraftBukkit
if (!flag) { if (!flag) {
@ -117,7 +117,7 @@ index ba99e9949c6fdfc4f49b6b6716100eb51697227d..7a275bf3260f9fbefc41883c5ebdc1eb
this.world.getMethodProfiler().enter("pollingChunks"); this.world.getMethodProfiler().enter("pollingChunks");
int k = this.world.getGameRules().getInt(GameRules.RANDOM_TICK_SPEED); int k = this.world.getGameRules().getInt(GameRules.RANDOM_TICK_SPEED);
BlockPosition blockposition = this.world.getSpawn(); BlockPosition blockposition = this.world.getSpawn();
@@ -759,15 +789,7 @@ public class ChunkProviderServer extends IChunkProvider { @@ -769,15 +799,7 @@ public class ChunkProviderServer extends IChunkProvider {
this.world.timings.countNaturalMobs.stopTiming(); // Paper - timings this.world.timings.countNaturalMobs.stopTiming(); // Paper - timings
this.world.getMethodProfiler().exit(); this.world.getMethodProfiler().exit();
@ -134,7 +134,7 @@ index ba99e9949c6fdfc4f49b6b6716100eb51697227d..7a275bf3260f9fbefc41883c5ebdc1eb
final int[] chunksTicked = {0}; this.playerChunkMap.forEachVisibleChunk((playerchunk) -> { // Paper - safe iterator incase chunk loads, also no wrapping final int[] chunksTicked = {0}; this.playerChunkMap.forEachVisibleChunk((playerchunk) -> { // Paper - safe iterator incase chunk loads, also no wrapping
Optional<Chunk> optional = ((Either) playerchunk.b().getNow(PlayerChunk.UNLOADED_CHUNK)).left(); Optional<Chunk> optional = ((Either) playerchunk.b().getNow(PlayerChunk.UNLOADED_CHUNK)).left();
@@ -781,10 +803,10 @@ public class ChunkProviderServer extends IChunkProvider { @@ -791,10 +813,10 @@ public class ChunkProviderServer extends IChunkProvider {
this.world.getMethodProfiler().exit(); this.world.getMethodProfiler().exit();
ChunkCoordIntPair chunkcoordintpair = playerchunk.i(); ChunkCoordIntPair chunkcoordintpair = playerchunk.i();

Datei anzeigen

@ -603,10 +603,10 @@ index 1c7955d3ae7ddd1c2d924cec20a91202cf090f40..7bd3f789b6055d73f3a6c0628652cca2
if (!this.isClientSide && (i & 1) != 0) { if (!this.isClientSide && (i & 1) != 0) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index c77c59223eb652346502b9a896e0ad536395e444..5f180bb77b736220c848357b2cac4d0d2b99e3df 100644 index 1929aacbe83c401c7254484aa8df62ed1554e3ba..36207acffac3620879afd11bb47e06341a3dabb9 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -2494,10 +2494,39 @@ public class CraftWorld implements World { @@ -2493,10 +2493,39 @@ public class CraftWorld implements World {
// Spigot start // Spigot start
@Override @Override
public int getViewDistance() { public int getViewDistance() {

Datei anzeigen

@ -484,10 +484,10 @@ index 7702fbefa598bce7e6a2d287f7ec36b78a62bff8..35a4999b2c34ae62cba042885db25dd1
protected int c(long i) { protected int c(long i) {
return this.a.get(i); return this.a.get(i);
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 7a275bf3260f9fbefc41883c5ebdc1eb2196daf0..b6a7e475c6ebe499c641db5967adb1674323a517 100644 index 3089d673a029c493cac756124eb0baa21a8bab7f..8efe036be0c74a5ceb6a18e019c4a08a49a28693 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -432,6 +432,26 @@ public class ChunkProviderServer extends IChunkProvider { @@ -442,6 +442,26 @@ public class ChunkProviderServer extends IChunkProvider {
public <T> void removeTicketAtLevel(TicketType<T> ticketType, ChunkCoordIntPair chunkPos, int ticketLevel, T identifier) { public <T> void removeTicketAtLevel(TicketType<T> ticketType, ChunkCoordIntPair chunkPos, int ticketLevel, T identifier) {
this.chunkMapDistance.removeTicketAtLevel(ticketType, chunkPos, ticketLevel, identifier); this.chunkMapDistance.removeTicketAtLevel(ticketType, chunkPos, ticketLevel, identifier);
} }
@ -514,7 +514,7 @@ index 7a275bf3260f9fbefc41883c5ebdc1eb2196daf0..b6a7e475c6ebe499c641db5967adb167
// Paper end // Paper end
@Nullable @Nullable
@@ -470,6 +490,8 @@ public class ChunkProviderServer extends IChunkProvider { @@ -480,6 +500,8 @@ public class ChunkProviderServer extends IChunkProvider {
if (!completablefuture.isDone()) { // Paper if (!completablefuture.isDone()) { // Paper
// Paper start - async chunk io/loading // Paper start - async chunk io/loading
@ -523,7 +523,7 @@ index 7a275bf3260f9fbefc41883c5ebdc1eb2196daf0..b6a7e475c6ebe499c641db5967adb167
this.world.asyncChunkTaskManager.raisePriority(x, z, com.destroystokyo.paper.io.PrioritizedTaskQueue.HIGHEST_PRIORITY); this.world.asyncChunkTaskManager.raisePriority(x, z, com.destroystokyo.paper.io.PrioritizedTaskQueue.HIGHEST_PRIORITY);
com.destroystokyo.paper.io.chunk.ChunkTaskManager.pushChunkWait(this.world, x, z); com.destroystokyo.paper.io.chunk.ChunkTaskManager.pushChunkWait(this.world, x, z);
// Paper end // Paper end
@@ -478,6 +500,8 @@ public class ChunkProviderServer extends IChunkProvider { @@ -488,6 +510,8 @@ public class ChunkProviderServer extends IChunkProvider {
this.serverThreadQueue.awaitTasks(completablefuture::isDone); this.serverThreadQueue.awaitTasks(completablefuture::isDone);
com.destroystokyo.paper.io.chunk.ChunkTaskManager.popChunkWait(); // Paper - async chunk debug com.destroystokyo.paper.io.chunk.ChunkTaskManager.popChunkWait(); // Paper - async chunk debug
this.world.timings.syncChunkLoad.stopTiming(); // Paper this.world.timings.syncChunkLoad.stopTiming(); // Paper
@ -532,7 +532,7 @@ index 7a275bf3260f9fbefc41883c5ebdc1eb2196daf0..b6a7e475c6ebe499c641db5967adb167
} // Paper } // Paper
ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> { ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> {
return ichunkaccess1; return ichunkaccess1;
@@ -530,10 +554,12 @@ public class ChunkProviderServer extends IChunkProvider { @@ -540,10 +564,12 @@ public class ChunkProviderServer extends IChunkProvider {
if (flag && !currentlyUnloading) { if (flag && !currentlyUnloading) {
// CraftBukkit end // CraftBukkit end
this.chunkMapDistance.a(TicketType.UNKNOWN, chunkcoordintpair, l, chunkcoordintpair); this.chunkMapDistance.a(TicketType.UNKNOWN, chunkcoordintpair, l, chunkcoordintpair);
@ -545,7 +545,7 @@ index 7a275bf3260f9fbefc41883c5ebdc1eb2196daf0..b6a7e475c6ebe499c641db5967adb167
this.tickDistanceManager(); this.tickDistanceManager();
playerchunk = this.getChunk(k); playerchunk = this.getChunk(k);
gameprofilerfiller.exit(); gameprofilerfiller.exit();
@@ -542,8 +568,13 @@ public class ChunkProviderServer extends IChunkProvider { @@ -552,8 +578,13 @@ public class ChunkProviderServer extends IChunkProvider {
} }
} }
} }
@ -561,7 +561,7 @@ index 7a275bf3260f9fbefc41883c5ebdc1eb2196daf0..b6a7e475c6ebe499c641db5967adb167
} }
private boolean a(@Nullable PlayerChunk playerchunk, int i) { private boolean a(@Nullable PlayerChunk playerchunk, int i) {
@@ -593,7 +624,8 @@ public class ChunkProviderServer extends IChunkProvider { @@ -603,7 +634,8 @@ public class ChunkProviderServer extends IChunkProvider {
return this.serverThreadQueue.executeNext(); return this.serverThreadQueue.executeNext();
} }
@ -1187,10 +1187,10 @@ index d7b9d9fd3a3b607278a3d72b0b306b0be2aa30ad..6fd852db6bcfbfbf84ec2acf6d23b08a
public static <T> TicketType<T> a(String s, Comparator<T> comparator) { public static <T> TicketType<T> a(String s, Comparator<T> comparator) {
return new TicketType<>(s, comparator, 0L); return new TicketType<>(s, comparator, 0L);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 5f180bb77b736220c848357b2cac4d0d2b99e3df..d3c5b7d1904a6cbd65db406639ed2ba90ec9fd2a 100644 index 36207acffac3620879afd11bb47e06341a3dabb9..5992fdda8a5c66f77dbfca86d6261b98cce2b1e9 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -2484,6 +2484,10 @@ public class CraftWorld implements World { @@ -2483,6 +2483,10 @@ public class CraftWorld implements World {
return future; return future;
} }

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen