mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 02:25:28 +01:00
Upstream Update (#5211)
This commit is contained in:
parent
2a0ee4b65d
commit
4668201606
@ -305,10 +305,10 @@ index fee814e01a653d2b53c56e8b566383ca44aa5346..2acdf2a6d3955923c721222b9da784f3
|
||||
* Gets the custom name on a mob or block. If there is no name this method
|
||||
* will return null.
|
||||
diff --git a/src/main/java/org/bukkit/NamespacedKey.java b/src/main/java/org/bukkit/NamespacedKey.java
|
||||
index 22eca2a180618ed43a4ef103bebd134897d6c71a..abb7448ee8fe1152623794d3b806eef9a9e17abc 100644
|
||||
index 803fa0019869127ee8c7e4fb1777a59c43e66f8a..c65f0d6569c130b4920a9e71ad24af6427f1f030 100644
|
||||
--- a/src/main/java/org/bukkit/NamespacedKey.java
|
||||
+++ b/src/main/java/org/bukkit/NamespacedKey.java
|
||||
@@ -18,7 +18,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
@@ -19,7 +19,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
* underscores, hyphens, and forward slashes.
|
||||
*
|
||||
*/
|
||||
@ -317,9 +317,9 @@ index 22eca2a180618ed43a4ef103bebd134897d6c71a..abb7448ee8fe1152623794d3b806eef9
|
||||
|
||||
/**
|
||||
* The namespace representing all inbuilt keys.
|
||||
@@ -139,4 +139,24 @@ public final class NamespacedKey {
|
||||
public static NamespacedKey minecraft(@NotNull String key) {
|
||||
return new NamespacedKey(MINECRAFT, key);
|
||||
@@ -212,4 +212,24 @@ public final class NamespacedKey {
|
||||
public static NamespacedKey fromString(@NotNull String key) {
|
||||
return fromString(key, null);
|
||||
}
|
||||
+
|
||||
+ // Paper start
|
||||
@ -552,7 +552,7 @@ index a6b9e4f158583e5932bf8ca210d531857e9f5360..d9515a79dc7ed60c66960cd6c6bb4c10
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index cdcbc8b05afc412017ac0e4ed0adf227d1342336..6b5dbe4ea711807a1944cfe2aae2ce415d4f2638 100644
|
||||
index b8a33ac504da73ec990550bdd23e4548f6ccba95..27faaf8d1101f8522b728e3d73833e4dddbf1715 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -38,7 +38,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
@ -515,10 +515,10 @@ index b32de827cf8d1780861c271b4215276fdaab7165..1020002ff7127877db2d7e096f2c5217
|
||||
* Options which can be applied to redstone dust particles - a particle
|
||||
* color and size.
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 96e985eb98ab620e315aec13222b8f0334e5fe0a..1473b1ef341f13fbd634b81a058bf3148de7b2c6 100644
|
||||
index ed7d484416f127467c2898411564937f256d8861..7a96670447fde144e2263d107771e01cd642aaf4 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -2550,7 +2550,57 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
|
||||
@@ -2559,7 +2559,57 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
|
||||
* @param data the data to use for the particle or null,
|
||||
* the type of this depends on {@link Particle#getDataType()}
|
||||
*/
|
||||
|
@ -106,10 +106,10 @@ index 4cf22afc3c1f1cc19b6e5350043431215908a612..af2ee43f2c5133668c18710f526a107d
|
||||
* Returns a list of entities within a bounding box centered around a Location.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 1473b1ef341f13fbd634b81a058bf3148de7b2c6..432367560c572e3fa77c4c36cde5bf7d7e157846 100644
|
||||
index 7a96670447fde144e2263d107771e01cd642aaf4..608e57d92d93aef163bcb91c7fb63339b1672945 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -1409,6 +1409,88 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
|
||||
@@ -1418,6 +1418,88 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
|
||||
*/
|
||||
public boolean createExplosion(@NotNull Location loc, float power, boolean setFire);
|
||||
|
||||
|
@ -199,10 +199,10 @@ index 0000000000000000000000000000000000000000..28f3fda950999a9c964a3608042ca605
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/NamespacedKey.java b/src/main/java/org/bukkit/NamespacedKey.java
|
||||
index abb7448ee8fe1152623794d3b806eef9a9e17abc..f49569d50510807570b51d894369fcffe180cc56 100644
|
||||
index c65f0d6569c130b4920a9e71ad24af6427f1f030..01bcb3a1bdb5accdf844d0178cec3d25746b3eaa 100644
|
||||
--- a/src/main/java/org/bukkit/NamespacedKey.java
|
||||
+++ b/src/main/java/org/bukkit/NamespacedKey.java
|
||||
@@ -18,7 +18,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
@@ -19,7 +19,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
* underscores, hyphens, and forward slashes.
|
||||
*
|
||||
*/
|
||||
@ -211,7 +211,7 @@ index abb7448ee8fe1152623794d3b806eef9a9e17abc..f49569d50510807570b51d894369fcff
|
||||
|
||||
/**
|
||||
* The namespace representing all inbuilt keys.
|
||||
@@ -83,11 +83,13 @@ public final class NamespacedKey implements net.kyori.adventure.key.Key { // Pap
|
||||
@@ -84,11 +84,13 @@ public final class NamespacedKey implements net.kyori.adventure.key.Key { // Pap
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Material API additions
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index f66cd342c2ec3e5d4f4ae5e68dda797c793c76a7..e203c5bfc1d1bf6b500ef8a4446d3aef182b8ecb 100644
|
||||
index 27adc7afae3d32c36762b9355cb5210e187df795..2e959d195f7a5e723952e421aeaeeb463f07d3f5 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -86,6 +86,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@ -16,7 +16,7 @@ index f66cd342c2ec3e5d4f4ae5e68dda797c793c76a7..e203c5bfc1d1bf6b500ef8a4446d3aef
|
||||
public enum Material implements Keyed {
|
||||
//<editor-fold desc="Materials" defaultstate="collapsed">
|
||||
AIR(9648, 0),
|
||||
@@ -3565,6 +3566,22 @@ public enum Material implements Keyed {
|
||||
@@ -3562,6 +3563,22 @@ public enum Material implements Keyed {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add sun related API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index cf831f96efa302f789cf26a384a091df51215a76..19060c7d9c74b9b2808103f3d5627444aece6ccb 100644
|
||||
index ce2d4629ff39847cb21a34cc1a0868c9a4d3cdb9..cac7a083b439414ae269edc9df4dc242dfaf5b59 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -1788,6 +1788,16 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
|
||||
@ -23,7 +23,7 @@ index cf831f96efa302f789cf26a384a091df51215a76..19060c7d9c74b9b2808103f3d5627444
|
||||
+ // Paper end
|
||||
+
|
||||
/**
|
||||
* Returns whether the world has an ongoing storm.
|
||||
* Gets the full in-game time on this world since the world generation
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/entity/Mob.java b/src/main/java/org/bukkit/entity/Mob.java
|
||||
index b132287817d35579ca5128a1ed5c242bf229771a..d726453c041a980576312b6bee96a07837f37974 100644
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] World view distance api
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index f8e104d5e61e52c5fe658d7cda373f62424c7bea..aefcd3c1b6e825ccba1b19444778a7529b1b1f53 100644
|
||||
index 5c004fddaaeb41f966ace1e169103ecfb082a197..eb2b5ae9b66f8ce8adc548f0913c54729a822018 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -3405,6 +3405,34 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
|
||||
@@ -3414,6 +3414,34 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
|
||||
int getViewDistance();
|
||||
// Spigot end
|
||||
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Spawn Reason API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index aefcd3c1b6e825ccba1b19444778a7529b1b1f53..b1b12cd1c53ca4666d0f2e77853f3a11441d24e5 100644
|
||||
index eb2b5ae9b66f8ce8adc548f0913c54729a822018..6441d4e45e5d5f008f95233cdc34048b8be38592 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -1,6 +1,8 @@
|
||||
@ -17,7 +17,7 @@ index aefcd3c1b6e825ccba1b19444778a7529b1b1f53..b1b12cd1c53ca4666d0f2e77853f3a11
|
||||
import org.bukkit.generator.ChunkGenerator;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -2216,6 +2218,12 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
|
||||
@@ -2225,6 +2227,12 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
|
||||
@NotNull
|
||||
public <T extends Entity> T spawn(@NotNull Location location, @NotNull Class<T> clazz) throws IllegalArgumentException;
|
||||
|
||||
@ -30,7 +30,7 @@ index aefcd3c1b6e825ccba1b19444778a7529b1b1f53..b1b12cd1c53ca4666d0f2e77853f3a11
|
||||
/**
|
||||
* Spawn an entity of a specific class at the given {@link Location}, with
|
||||
* the supplied function run before the entity is added to the world.
|
||||
@@ -2233,7 +2241,28 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
|
||||
@@ -2242,7 +2250,28 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
|
||||
* {@link Entity} requested cannot be spawned
|
||||
*/
|
||||
@NotNull
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add a way to get translation keys for blocks, entities and
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index e203c5bfc1d1bf6b500ef8a4446d3aef182b8ecb..4ba991b79f13219182df35b4ce0c5cf57cbd208b 100644
|
||||
index 2e959d195f7a5e723952e421aeaeeb463f07d3f5..2a3becabbd10fa8ffd19f35a3f6d8a6bfcb388c3 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -3580,6 +3580,16 @@ public enum Material implements Keyed {
|
||||
@@ -3577,6 +3577,16 @@ public enum Material implements Keyed {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -533,10 +533,10 @@ index 0000000000000000000000000000000000000000..b31109d2dadd29e8852468c19265066b
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index 49cfd12dd8f68468d7a122f5420687c874cf3317..84407dfd46138359d42ddf8fd5c462a5f494d46b 100644
|
||||
index d1051f05933be093fa598504e169e5cfdaa1b0e3..056e1fced00dff1d6507a90c13f2448a04ca0558 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -273,15 +273,15 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -281,15 +281,15 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
}
|
||||
}
|
||||
|
||||
@ -638,7 +638,7 @@ index 6d1012cc652780189a5d849125abe09b27b88422..d8c8bf2466be362b424fde611fe42b73
|
||||
Main.LOGGER.info("Forcing world upgrade! {}", convertable_conversionsession.getLevelName()); // CraftBukkit
|
||||
WorldUpgrader worldupgrader = new WorldUpgrader(convertable_conversionsession, datafixer, immutableset, flag);
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 169822482d3e31ef4f625a82102adc6d478588a8..2ffa56f3580b524c3593505585410dc347e1780c 100644
|
||||
index 4c5683bcb45ea500adb0775fc81f296bb2583f80..1606a7b4727fffef27d6bb08633b652b7e7fe588 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -77,6 +77,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@ -659,10 +659,10 @@ index 169822482d3e31ef4f625a82102adc6d478588a8..2ffa56f3580b524c3593505585410dc3
|
||||
this.world = new CraftWorld((WorldServer) this, gen, env);
|
||||
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 3aac98dd08e1608c30254fbcf6982773a3a6d20f..bf21a80f781e600a08f82d1a16f0e11983dc8f8d 100644
|
||||
index ab11efee28224852f4984ce7235494d83ba7fe7f..a19242d717f7f9c254e6127fb2cb2f202be2d78a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -809,6 +809,7 @@ public final class CraftServer implements Server {
|
||||
@@ -808,6 +808,7 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
|
||||
@ -670,7 +670,7 @@ index 3aac98dd08e1608c30254fbcf6982773a3a6d20f..bf21a80f781e600a08f82d1a16f0e119
|
||||
for (WorldServer world : console.getWorlds()) {
|
||||
world.worldDataServer.setDifficulty(config.difficulty);
|
||||
world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals);
|
||||
@@ -842,6 +843,7 @@ public final class CraftServer implements Server {
|
||||
@@ -841,6 +842,7 @@ public final class CraftServer implements Server {
|
||||
world.ticksPerAmbientSpawns = this.getTicksPerAmbientSpawns();
|
||||
}
|
||||
world.spigotConfig.init(); // Spigot
|
||||
@ -678,7 +678,7 @@ index 3aac98dd08e1608c30254fbcf6982773a3a6d20f..bf21a80f781e600a08f82d1a16f0e119
|
||||
}
|
||||
|
||||
pluginManager.clearPlugins();
|
||||
@@ -849,6 +851,7 @@ public final class CraftServer implements Server {
|
||||
@@ -848,6 +850,7 @@ public final class CraftServer implements Server {
|
||||
resetRecipes();
|
||||
reloadData();
|
||||
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
|
||||
@ -686,10 +686,10 @@ index 3aac98dd08e1608c30254fbcf6982773a3a6d20f..bf21a80f781e600a08f82d1a16f0e119
|
||||
overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
||||
ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
||||
|
||||
@@ -2096,4 +2099,35 @@ public final class CraftServer implements Server {
|
||||
{
|
||||
@@ -2097,4 +2100,35 @@ public final class CraftServer implements Server {
|
||||
return spigot;
|
||||
}
|
||||
// Spigot end
|
||||
+
|
||||
+ // Paper start
|
||||
+ @SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@ -742,7 +742,7 @@ index 3f52c19b6b797e26b3dcedcec2afd28c478e7091..3a6578170765a472d36b169b999e9dc5
|
||||
};
|
||||
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
index 0005d4226467cc25b55f9863eb5b7aaeb4dd6917..5c394d26e2d2dbc5d65e38c1273b7e5d02464f3a 100644
|
||||
index 83d83ff7ceffbb77723da721b869dfd0091e496d..0efcbab8f8806aeb8dd8bd6384e5a7cee375d100 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
@@ -39,36 +39,36 @@ public class SpigotWorldConfig
|
||||
|
@ -848,10 +848,10 @@ index 83d799bec90693e0fbbf8a7f3bc4f569b5c0ead9..141a8e31151010e5a0bd8d4661033f10
|
||||
|
||||
t0.a(nbttagcompound.getCompound("data"));
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index b6a2f11c34cba54f28ea8997d991b30febf63082..170332ce35db120b53f99a45869882236c361960 100644
|
||||
index 4955ec276c389158727fb98710dd700145c31be8..f1c206b6b506aff09c484730dd2d5ce796c3c2ab 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1798,7 +1798,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -1809,7 +1809,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
}
|
||||
|
||||
// CraftBukkit - decompile error
|
||||
|
@ -2411,7 +2411,7 @@ index 1b2f415e3ed7f6dca12d13cd098cb4ec3af54020..64e8088d394ddcda59d0209883b778ab
|
||||
@Override
|
||||
public BlockPosition immutableCopy() {
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 225e8fef6741d9bdbc8ac86cd17e54ddbf04a9e8..8d5598fab64ce3ac58121302dca4b528edd26563 100644
|
||||
index 9a07db3442d1ef2c1b1c1f1293445d28b0a4c84d..c8ff99ef5c7574292ee66a4aec45d1550eab1624 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -26,7 +26,7 @@ public class Chunk implements IChunkAccess {
|
||||
@ -2572,7 +2572,7 @@ index 225e8fef6741d9bdbc8ac86cd17e54ddbf04a9e8..8d5598fab64ce3ac58121302dca4b528
|
||||
@Override
|
||||
public Fluid getFluid(BlockPosition blockposition) {
|
||||
return this.a(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||
@@ -356,6 +473,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -357,6 +474,7 @@ public class Chunk implements IChunkAccess {
|
||||
entity.chunkX = this.loc.x;
|
||||
entity.chunkY = k;
|
||||
entity.chunkZ = this.loc.z;
|
||||
@ -2580,7 +2580,7 @@ index 225e8fef6741d9bdbc8ac86cd17e54ddbf04a9e8..8d5598fab64ce3ac58121302dca4b528
|
||||
this.entitySlices[k].add(entity);
|
||||
}
|
||||
|
||||
@@ -378,6 +496,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -380,6 +498,7 @@ public class Chunk implements IChunkAccess {
|
||||
}
|
||||
|
||||
this.entitySlices[i].remove(entity);
|
||||
@ -2588,7 +2588,7 @@ index 225e8fef6741d9bdbc8ac86cd17e54ddbf04a9e8..8d5598fab64ce3ac58121302dca4b528
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -399,6 +518,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -401,6 +520,7 @@ public class Chunk implements IChunkAccess {
|
||||
return this.a(blockposition, Chunk.EnumTileEntityState.CHECK);
|
||||
}
|
||||
|
||||
@ -2596,7 +2596,7 @@ index 225e8fef6741d9bdbc8ac86cd17e54ddbf04a9e8..8d5598fab64ce3ac58121302dca4b528
|
||||
@Nullable
|
||||
public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) {
|
||||
// CraftBukkit start
|
||||
@@ -510,7 +630,25 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -512,7 +632,25 @@ public class Chunk implements IChunkAccess {
|
||||
|
||||
// CraftBukkit start
|
||||
public void loadCallback() {
|
||||
@ -2622,7 +2622,7 @@ index 225e8fef6741d9bdbc8ac86cd17e54ddbf04a9e8..8d5598fab64ce3ac58121302dca4b528
|
||||
if (server != null) {
|
||||
/*
|
||||
* If it's a new world, the first few chunks are generated inside
|
||||
@@ -549,6 +687,22 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -551,6 +689,22 @@ public class Chunk implements IChunkAccess {
|
||||
server.getPluginManager().callEvent(unloadEvent);
|
||||
// note: saving can be prevented, but not forced if no saving is actually required
|
||||
this.mustNotSave = !unloadEvent.isSaveChunk();
|
||||
@ -2746,7 +2746,7 @@ index ae61d0a7676bf06c8c9aa5c68ccb8dd4baf326b6..b12e43ed13a1a9d7d418831b8988c30a
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index 84407dfd46138359d42ddf8fd5c462a5f494d46b..20f62f6f7704f47f86179d03b4e55a61e0149627 100644
|
||||
index 056e1fced00dff1d6507a90c13f2448a04ca0558..08f11f98c40221fa4ce9a4f14ee8398f8588f38a 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -17,6 +17,10 @@ import java.util.function.Consumer;
|
||||
@ -2928,7 +2928,7 @@ index 84407dfd46138359d42ddf8fd5c462a5f494d46b..20f62f6f7704f47f86179d03b4e55a61
|
||||
|
||||
public ChunkProviderServer(WorldServer worldserver, Convertable.ConversionSession convertable_conversionsession, DataFixer datafixer, DefinedStructureManager definedstructuremanager, Executor executor, ChunkGenerator chunkgenerator, int i, boolean flag, WorldLoadListener worldloadlistener, Supplier<WorldPersistentData> supplier) {
|
||||
this.world = worldserver;
|
||||
@@ -90,6 +246,49 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -98,6 +254,49 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
this.cacheChunk[0] = ichunkaccess;
|
||||
}
|
||||
|
||||
@ -2978,7 +2978,7 @@ index 84407dfd46138359d42ddf8fd5c462a5f494d46b..20f62f6f7704f47f86179d03b4e55a61
|
||||
@Nullable
|
||||
@Override
|
||||
public IChunkAccess getChunkAt(int i, int j, ChunkStatus chunkstatus, boolean flag) {
|
||||
@@ -372,10 +571,9 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -380,10 +579,9 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
|
||||
this.p = spawnercreature_d;
|
||||
this.world.getMethodProfiler().exit();
|
||||
@ -3934,7 +3934,7 @@ index 8bdda63a2807635e8780481244251f6e35c13627..36a7e41cc5036345929ebf4d2fa160a8
|
||||
int j = 0;
|
||||
ChunkSection[] achunksection = chunk.getSections();
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
index 80118f5a347f5cc21945172b2cc94ad3f640a75e..7b4717ffc31bc406c04d98207a15804502bd3579 100644
|
||||
index f645d3dfb57e99757e233ee2bbb51be5094203cb..985fc002fa5afc71ecd242aa8101684b2c751b30 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
@@ -21,9 +21,9 @@ public class PlayerChunk {
|
||||
@ -3959,7 +3959,7 @@ index 80118f5a347f5cc21945172b2cc94ad3f640a75e..7b4717ffc31bc406c04d98207a158045
|
||||
public PlayerChunk(ChunkCoordIntPair chunkcoordintpair, int i, LightEngine lightengine, PlayerChunk.c playerchunk_c, PlayerChunk.d playerchunk_d) {
|
||||
this.statusFutures = new AtomicReferenceArray(PlayerChunk.CHUNK_STATUSES.size());
|
||||
this.fullChunkFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE;
|
||||
@@ -54,16 +56,63 @@ public class PlayerChunk {
|
||||
@@ -54,10 +56,49 @@ public class PlayerChunk {
|
||||
this.ticketLevel = this.oldTicketLevel;
|
||||
this.n = this.oldTicketLevel;
|
||||
this.a(i);
|
||||
@ -3993,24 +3993,25 @@ index 80118f5a347f5cc21945172b2cc94ad3f640a75e..7b4717ffc31bc406c04d98207a158045
|
||||
+
|
||||
+ public final boolean isEntityTickingReady() {
|
||||
+ return this.isEntityTickingReady;
|
||||
}
|
||||
|
||||
+ }
|
||||
+
|
||||
+ public final boolean isTickingReady() {
|
||||
+ return this.isTickingReady;
|
||||
+ }
|
||||
+
|
||||
+ public final boolean isFullChunkReady() {
|
||||
+ return this.isFullChunkReady;
|
||||
+ }
|
||||
}
|
||||
+ // Paper end
|
||||
+
|
||||
|
||||
// CraftBukkit start
|
||||
- public Chunk getFullChunk() {
|
||||
+ public final Chunk getFullChunk() { // Paper - final for inline
|
||||
if (!getChunkState(this.oldTicketLevel).isAtLeast(PlayerChunk.State.BORDER)) return null; // note: using oldTicketLevel for isLoaded checks
|
||||
CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> statusFuture = this.getStatusFutureUnchecked(ChunkStatus.FULL);
|
||||
Either<IChunkAccess, PlayerChunk.Failure> either = (Either<IChunkAccess, PlayerChunk.Failure>) statusFuture.getNow(null);
|
||||
return either == null ? null : (Chunk) either.left().orElse(null);
|
||||
return this.getFullChunkUnchecked();
|
||||
}
|
||||
@@ -68,6 +109,14 @@ public class PlayerChunk {
|
||||
return (either == null) ? null : (Chunk) either.left().orElse(null);
|
||||
}
|
||||
// CraftBukkit end
|
||||
+ // Paper start - "real" get full chunk immediately
|
||||
@ -4024,7 +4025,7 @@ index 80118f5a347f5cc21945172b2cc94ad3f640a75e..7b4717ffc31bc406c04d98207a158045
|
||||
|
||||
public CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> getStatusFutureUnchecked(ChunkStatus chunkstatus) {
|
||||
CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> completablefuture = (CompletableFuture) this.statusFutures.get(chunkstatus.c());
|
||||
@@ -75,20 +124,23 @@ public class PlayerChunk {
|
||||
@@ -79,20 +128,23 @@ public class PlayerChunk {
|
||||
return getChunkStatus(this.ticketLevel).b(chunkstatus) ? this.getStatusFutureUnchecked(chunkstatus) : PlayerChunk.UNLOADED_CHUNK_ACCESS_FUTURE;
|
||||
}
|
||||
|
||||
@ -4052,7 +4053,7 @@ index 80118f5a347f5cc21945172b2cc94ad3f640a75e..7b4717ffc31bc406c04d98207a158045
|
||||
CompletableFuture<Either<Chunk, PlayerChunk.Failure>> completablefuture = this.a();
|
||||
Either<Chunk, PlayerChunk.Failure> either = (Either) completablefuture.getNow(null); // CraftBukkit - decompile error
|
||||
|
||||
@@ -113,7 +165,7 @@ public class PlayerChunk {
|
||||
@@ -117,7 +169,7 @@ public class PlayerChunk {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -4061,7 +4062,7 @@ index 80118f5a347f5cc21945172b2cc94ad3f640a75e..7b4717ffc31bc406c04d98207a158045
|
||||
return this.chunkSave;
|
||||
}
|
||||
|
||||
@@ -254,11 +306,11 @@ public class PlayerChunk {
|
||||
@@ -258,11 +310,11 @@ public class PlayerChunk {
|
||||
});
|
||||
}
|
||||
|
||||
@ -4075,7 +4076,7 @@ index 80118f5a347f5cc21945172b2cc94ad3f640a75e..7b4717ffc31bc406c04d98207a158045
|
||||
return this.ticketLevel;
|
||||
}
|
||||
|
||||
@@ -329,13 +381,27 @@ public class PlayerChunk {
|
||||
@@ -333,13 +385,27 @@ public class PlayerChunk {
|
||||
|
||||
this.hasBeenLoaded |= flag3;
|
||||
if (!flag2 && flag3) {
|
||||
@ -4104,7 +4105,7 @@ index 80118f5a347f5cc21945172b2cc94ad3f640a75e..7b4717ffc31bc406c04d98207a158045
|
||||
this.a(((CompletableFuture<Either<Chunk, PlayerChunk.Failure>>) completablefuture).thenApply((either1) -> { // CraftBukkit - decompile error
|
||||
playerchunkmap.getClass();
|
||||
return either1.ifLeft(playerchunkmap::a);
|
||||
@@ -346,12 +412,24 @@ public class PlayerChunk {
|
||||
@@ -350,12 +416,24 @@ public class PlayerChunk {
|
||||
boolean flag5 = playerchunk_state1.isAtLeast(PlayerChunk.State.TICKING);
|
||||
|
||||
if (!flag4 && flag5) {
|
||||
@ -4131,7 +4132,7 @@ index 80118f5a347f5cc21945172b2cc94ad3f640a75e..7b4717ffc31bc406c04d98207a158045
|
||||
this.tickingFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE;
|
||||
}
|
||||
|
||||
@@ -363,12 +441,24 @@ public class PlayerChunk {
|
||||
@@ -367,12 +445,24 @@ public class PlayerChunk {
|
||||
throw (IllegalStateException) SystemUtils.c((Throwable) (new IllegalStateException()));
|
||||
}
|
||||
|
||||
@ -4392,7 +4393,7 @@ index ff41038ce6d2c1a8093bce3539070fa0ccfd61c2..ed0f9c5d29c4f88b7beee4b0ecdd7a56
|
||||
return VoxelShapes.b;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 2ffa56f3580b524c3593505585410dc347e1780c..9c6b15e70bfb7db853c8e4a8dfd7b24bae27a70c 100644
|
||||
index 1606a7b4727fffef27d6bb08633b652b7e7fe588..6df28adb17d78a7f5189787a979a44fad677f05c 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -22,6 +22,7 @@ import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
||||
@ -4501,7 +4502,7 @@ index 5719ef9714e9680596a08c42c33508c16c0e676a..bb0f30f182856d2701fde9b1a65eeb98
|
||||
return this.j.m();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 170332ce35db120b53f99a45869882236c361960..c96ad91b15920293e228f5eb7d0843beda92faec 100644
|
||||
index f1c206b6b506aff09c484730dd2d5ce796c3c2ab..592af06de1fc02d94273363c2ede1175a39997f0 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -12,6 +12,7 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectMap.Entry;
|
||||
@ -4521,7 +4522,7 @@ index 170332ce35db120b53f99a45869882236c361960..c96ad91b15920293e228f5eb7d0843be
|
||||
boolean tickingEntities;
|
||||
private final MinecraftServer server;
|
||||
public final WorldDataServer worldDataServer; // CraftBukkit - type
|
||||
@@ -1567,7 +1568,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -1578,7 +1579,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
ObjectIterator objectiterator = spawnercreature_d.b().object2IntEntrySet().iterator();
|
||||
|
||||
while (objectiterator.hasNext()) {
|
||||
@ -4593,7 +4594,7 @@ index 9ad17c560c8d99a396543ab9f97c34de648f6544..4bf48f77f3f7cd62a91590543f5af441
|
||||
currentTask = null;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
|
||||
index 3f55381c152b9841b524f623c9b32360e97cb8ed..d85e21b75054067b926ecfee89d62c6dd0744189 100644
|
||||
index a8ce875f801edc424b5277abf7471e73ce91e3e6..f5f70c1fe31e5c533991e2c857fe8c10a83b94fc 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
|
||||
@@ -39,6 +39,21 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
|
||||
|
@ -8,7 +8,7 @@ This enables us a fast reference to the entities current chunk instead
|
||||
of having to look it up by hashmap lookups.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 8d5598fab64ce3ac58121302dca4b528edd26563..402f6ed90132f48d560a21f56cd50121c42fb34a 100644
|
||||
index c8ff99ef5c7574292ee66a4aec45d1550eab1624..7c5f79124d2f2c69548263e79752484e07e77d48 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -56,11 +56,36 @@ public class Chunk implements IChunkAccess {
|
||||
@ -49,7 +49,7 @@ index 8d5598fab64ce3ac58121302dca4b528edd26563..402f6ed90132f48d560a21f56cd50121
|
||||
this.l = Maps.newHashMap();
|
||||
this.m = Maps.newHashMap();
|
||||
this.n = new ShortList[16];
|
||||
@@ -470,6 +495,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -471,6 +496,7 @@ public class Chunk implements IChunkAccess {
|
||||
}
|
||||
|
||||
entity.inChunk = true;
|
||||
@ -57,7 +57,7 @@ index 8d5598fab64ce3ac58121302dca4b528edd26563..402f6ed90132f48d560a21f56cd50121
|
||||
entity.chunkX = this.loc.x;
|
||||
entity.chunkY = k;
|
||||
entity.chunkZ = this.loc.z;
|
||||
@@ -482,6 +508,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -483,6 +509,7 @@ public class Chunk implements IChunkAccess {
|
||||
((HeightMap) this.heightMap.get(heightmap_type)).a(along);
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ index 8d5598fab64ce3ac58121302dca4b528edd26563..402f6ed90132f48d560a21f56cd50121
|
||||
public void b(Entity entity) {
|
||||
this.a(entity, entity.chunkY);
|
||||
}
|
||||
@@ -495,7 +522,12 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -497,7 +524,12 @@ public class Chunk implements IChunkAccess {
|
||||
i = this.entitySlices.length - 1;
|
||||
}
|
||||
|
||||
@ -80,7 +80,7 @@ index 8d5598fab64ce3ac58121302dca4b528edd26563..402f6ed90132f48d560a21f56cd50121
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 889e65729554b9584b631b0910a4f0c67246a2d6..9f32f6c3c34464e82a953a50141343b0083dea71 100644
|
||||
index b8267cf23f795fd7e586b0e567037eae5048d08e..b35ffae9f88cc14aec01482c2a3ed2e2428c2012 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -176,7 +176,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Store counts for each Entity/Block Entity Type
|
||||
Opens door for future patches to optimize performance
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 402f6ed90132f48d560a21f56cd50121c42fb34a..9f1db6491dafa8e32395db381466a3447395da7e 100644
|
||||
index 7c5f79124d2f2c69548263e79752484e07e77d48..853e11836b6c4eadd03feead101bf578b17b86a3 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -57,15 +57,19 @@ public class Chunk implements IChunkAccess {
|
||||
@ -37,7 +37,7 @@ index 402f6ed90132f48d560a21f56cd50121c42fb34a..9f1db6491dafa8e32395db381466a344
|
||||
}
|
||||
return removed;
|
||||
}
|
||||
@@ -494,6 +499,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -495,6 +500,7 @@ public class Chunk implements IChunkAccess {
|
||||
k = this.entitySlices.length - 1;
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ index 402f6ed90132f48d560a21f56cd50121c42fb34a..9f1db6491dafa8e32395db381466a344
|
||||
entity.inChunk = true;
|
||||
entity.setCurrentChunk(this); // Paper
|
||||
entity.chunkX = this.loc.x;
|
||||
@@ -527,6 +533,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -529,6 +535,7 @@ public class Chunk implements IChunkAccess {
|
||||
if (!this.entitySlices[i].remove(entity)) {
|
||||
return;
|
||||
}
|
||||
|
@ -738,10 +738,10 @@ index 871b79cb2c63525c430c257f00b2cf70157aa476..d847326b0099a0c05a085d5d62de6304
|
||||
private String name;
|
||||
@Nullable
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 9f1db6491dafa8e32395db381466a3447395da7e..19ddcabdc17c23c4ec46f5669ba0fd56d4bbee58 100644
|
||||
index 853e11836b6c4eadd03feead101bf578b17b86a3..0aea16df16b55b1d4756b51d10c8c22d37aef9a3 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -697,6 +697,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -699,6 +699,7 @@ public class Chunk implements IChunkAccess {
|
||||
server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkLoadEvent(this.bukkitChunk, this.needsDecoration));
|
||||
|
||||
if (this.needsDecoration) {
|
||||
@ -749,7 +749,7 @@ index 9f1db6491dafa8e32395db381466a3447395da7e..19ddcabdc17c23c4ec46f5669ba0fd56
|
||||
this.needsDecoration = false;
|
||||
java.util.Random random = new java.util.Random();
|
||||
random.setSeed(world.getSeed());
|
||||
@@ -716,6 +717,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -718,6 +719,7 @@ public class Chunk implements IChunkAccess {
|
||||
}
|
||||
}
|
||||
server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkPopulateEvent(bukkitChunk));
|
||||
@ -758,10 +758,10 @@ index 9f1db6491dafa8e32395db381466a3447395da7e..19ddcabdc17c23c4ec46f5669ba0fd56
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index 20f62f6f7704f47f86179d03b4e55a61e0149627..dd78f093f6ee9822c4a31d87f3c83d2f8fa4fcf8 100644
|
||||
index 08f11f98c40221fa4ce9a4f14ee8398f8588f38a..a066026bce318683dcc022920dad39d7ec25e485 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -314,11 +314,13 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -322,11 +322,13 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
}
|
||||
|
||||
gameprofilerfiller.c("getChunkCacheMiss");
|
||||
@ -777,7 +777,7 @@ index 20f62f6f7704f47f86179d03b4e55a61e0149627..dd78f093f6ee9822c4a31d87f3c83d2f
|
||||
ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> {
|
||||
return ichunkaccess1;
|
||||
}, (playerchunk_failure) -> {
|
||||
@@ -505,7 +507,9 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -513,7 +515,9 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
|
||||
public void save(boolean flag) {
|
||||
this.tickDistanceManager();
|
||||
@ -787,7 +787,7 @@ index 20f62f6f7704f47f86179d03b4e55a61e0149627..dd78f093f6ee9822c4a31d87f3c83d2f
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -542,7 +546,9 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -550,7 +554,9 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
this.tickDistanceManager();
|
||||
this.world.timings.doChunkMap.stopTiming(); // Spigot
|
||||
this.world.getMethodProfiler().exitEnter("chunks");
|
||||
@ -797,7 +797,7 @@ index 20f62f6f7704f47f86179d03b4e55a61e0149627..dd78f093f6ee9822c4a31d87f3c83d2f
|
||||
this.world.timings.doChunkUnload.startTiming(); // Spigot
|
||||
this.world.getMethodProfiler().exitEnter("unload");
|
||||
this.playerChunkMap.unloadChunks(booleansupplier);
|
||||
@@ -566,8 +572,10 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -574,8 +580,10 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
boolean flag2 = world.ticksPerAnimalSpawns != 0L && worlddata.getTime() % world.ticksPerAnimalSpawns == 0L; // CraftBukkit
|
||||
|
||||
this.world.getMethodProfiler().enter("naturalSpawnCount");
|
||||
@ -808,7 +808,7 @@ index 20f62f6f7704f47f86179d03b4e55a61e0149627..dd78f093f6ee9822c4a31d87f3c83d2f
|
||||
|
||||
this.p = spawnercreature_d;
|
||||
this.world.getMethodProfiler().exit();
|
||||
@@ -578,7 +586,9 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -586,7 +594,9 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
|
||||
if (optional.isPresent()) {
|
||||
this.world.getMethodProfiler().enter("broadcast");
|
||||
@ -818,7 +818,7 @@ index 20f62f6f7704f47f86179d03b4e55a61e0149627..dd78f093f6ee9822c4a31d87f3c83d2f
|
||||
this.world.getMethodProfiler().exit();
|
||||
Optional<Chunk> optional1 = ((Either) playerchunk.b().getNow(PlayerChunk.UNLOADED_CHUNK)).left();
|
||||
|
||||
@@ -592,25 +602,25 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -600,25 +610,25 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
SpawnerCreature.a(this.world, chunk, spawnercreature_d, this.allowAnimals, this.allowMonsters, flag2);
|
||||
}
|
||||
|
||||
@ -1007,7 +1007,7 @@ index d91b029c95b6380300db81e7c0fb172ff57958a1..218071260dec39dd4f7eb733ae6f832a
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 9f32f6c3c34464e82a953a50141343b0083dea71..ace7d5a36c0a44763d554d5d83cee7817f77fcc1 100644
|
||||
index b35ffae9f88cc14aec01482c2a3ed2e2428c2012..03933c24ed4d97e16bcebf6b89b1a8d1fc43cd0b 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -31,7 +31,6 @@ import org.bukkit.craftbukkit.event.CraftPortalEvent;
|
||||
@ -1517,7 +1517,7 @@ index b37b791cd66b2e88dd0ecf52beea1844c97cdb94..d34e91887cd73009bf852fb849e495a8
|
||||
// this.minecraftServer.getCommandDispatcher().a(this.player.getCommandListener(), s);
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
|
||||
index 2c671629a43f42da8335e7216f9fd399bb878729..eb3269e0ea3ce33d08e9eee3bca7cf434921e991 100644
|
||||
index 8c534c2f06fe72287364536b8767bd774b94c027..9c810b5aa21ca714ccf355d5648b7612f99b6884 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
|
||||
@@ -2,6 +2,8 @@ package net.minecraft.server;
|
||||
@ -1636,7 +1636,7 @@ index b9ffd000c97111678d45fd55dc9c207ebadc140e..f1d0e2faffb3ef27f5a41d06d0ff7d78
|
||||
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
|
||||
public CraftPersistentDataContainer persistentDataContainer;
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 9c6b15e70bfb7db853c8e4a8dfd7b24bae27a70c..b4aeea40ee04fd2ed10484f40d25dbd2a3a01b53 100644
|
||||
index 6df28adb17d78a7f5189787a979a44fad677f05c..09577ddcb3c2432a0af6047b287a387de5d2920a 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -18,7 +18,6 @@ import org.apache.logging.log4j.Logger;
|
||||
@ -1665,7 +1665,7 @@ index 9c6b15e70bfb7db853c8e4a8dfd7b24bae27a70c..b4aeea40ee04fd2ed10484f40d25dbd2
|
||||
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
|
||||
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
|
||||
}
|
||||
@@ -746,15 +745,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@@ -745,15 +744,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
}
|
||||
|
||||
timings.tileEntityPending.stopTiming(); // Spigot
|
||||
@ -1683,7 +1683,7 @@ index 9c6b15e70bfb7db853c8e4a8dfd7b24bae27a70c..b4aeea40ee04fd2ed10484f40d25dbd2
|
||||
CrashReport crashreport = CrashReport.a(throwable, "Ticking entity");
|
||||
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being ticked");
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index c96ad91b15920293e228f5eb7d0843beda92faec..21e4088cfdb7218e78fb771fe4c9bd2027594663 100644
|
||||
index 592af06de1fc02d94273363c2ede1175a39997f0..3d915105b277a7cbf330ba2cb3c2f1451ee868e4 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -2,6 +2,8 @@ package net.minecraft.server;
|
||||
@ -1810,7 +1810,7 @@ index c96ad91b15920293e228f5eb7d0843beda92faec..21e4088cfdb7218e78fb771fe4c9bd20
|
||||
|
||||
// CraftBukkit start - moved from MinecraftServer.saveChunks
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index bf21a80f781e600a08f82d1a16f0e11983dc8f8d..73bd46c980cb13d6cbe4aba41adb122eaab769be 100644
|
||||
index a19242d717f7f9c254e6127fb2cb2f202be2d78a..351440f534653c9d315ccaf1e923e03ca6ba01f6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2069,12 +2069,31 @@ public final class CraftServer implements Server {
|
||||
@ -1846,10 +1846,9 @@ index bf21a80f781e600a08f82d1a16f0e11983dc8f8d..73bd46c980cb13d6cbe4aba41adb122e
|
||||
public void restart() {
|
||||
org.spigotmc.RestartCommand.restart();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
|
||||
deleted file mode 100644
|
||||
index 7f435847ac1d13756ce233e7d5ae13f9dc17c443..0000000000000000000000000000000000000000
|
||||
index 66523c21c49b8a019a82fdeb84a187c3b627ab73..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
|
||||
+++ /dev/null
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
|
||||
@@ -1,163 +0,0 @@
|
||||
-package org.bukkit.craftbukkit;
|
||||
-
|
||||
@ -1921,7 +1920,7 @@ index 7f435847ac1d13756ce233e7d5ae13f9dc17c443..00000000000000000000000000000000
|
||||
-
|
||||
- String name = "Task: " + plugin + " Runnable: " + taskname;
|
||||
- if (period > 0) {
|
||||
- name += "(interval:" + period +")";
|
||||
- name += "(interval:" + period + ")";
|
||||
- } else {
|
||||
- name += "(Single)";
|
||||
- }
|
||||
@ -2015,10 +2014,10 @@ index 7f435847ac1d13756ce233e7d5ae13f9dc17c443..00000000000000000000000000000000
|
||||
- }
|
||||
-}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 3551ab3a570042585621c943d74d8d3c0bd299b4..4001145980f4dabbd291336d5a464c3856144996 100644
|
||||
index 6ebcf2afe78a0e0ab3ed4570b6aa416973c48fdf..8428ef53e0408c4a7f74cc03e7e238be9c2f1888 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1821,6 +1821,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1820,6 +1820,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
packet.components = components;
|
||||
getHandle().playerConnection.sendPacket(packet);
|
||||
}
|
||||
@ -2110,23 +2109,25 @@ index 4bf48f77f3f7cd62a91590543f5af441c8268029..ffe9cc1011226d604dc5499e7692e9a9
|
||||
|
||||
private boolean isReady(final int currentTick) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
|
||||
index d85e21b75054067b926ecfee89d62c6dd0744189..9d0d1598bfce2f51998395faf39d8bd2f5d3f9f3 100644
|
||||
index f5f70c1fe31e5c533991e2c857fe8c10a83b94fc..90ba08993fefd975b1095dafa6304aad49c62088 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
|
||||
@@ -1,9 +1,11 @@
|
||||
@@ -1,11 +1,13 @@
|
||||
package org.bukkit.craftbukkit.scheduler;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
+
|
||||
+import co.aikar.timings.NullTimingHandler;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
||||
-import org.spigotmc.CustomTimingsHandler; // Spigot
|
||||
+import co.aikar.timings.MinecraftTimings; // Paper
|
||||
+import co.aikar.timings.Timing; // Paper
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
|
||||
|
||||
public class CraftTask implements BukkitTask, Runnable { // Spigot
|
||||
@@ -26,12 +28,12 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
|
||||
*/
|
||||
private volatile long period;
|
||||
@ -2238,10 +2239,10 @@ index 6194d8aac0d2e54958aad3fb8b5fe144451cf879..d63a160f1b00de8d67ae1eb4fefbd5ca
|
||||
* This helper class represents the different NBT Tags.
|
||||
* <p>
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
index d838cd421ddcb082beba1edcd84b5d30e26b1544..2b00258ccd808e3332af5ab3f7e4967f03dd4aa3 100644
|
||||
index 383997d2e57a31e2ff30cf1bf34128fe477390a8..093a11b6e355f9e1236ecca921ea55488d70451d 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -31,7 +31,7 @@ import net.minecraft.server.EntityWither;
|
||||
@@ -29,7 +29,7 @@ import net.minecraft.server.EntityWither;
|
||||
import net.minecraft.server.MathHelper;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.World;
|
||||
@ -2250,7 +2251,7 @@ index d838cd421ddcb082beba1edcd84b5d30e26b1544..2b00258ccd808e3332af5ab3f7e4967f
|
||||
|
||||
public class ActivationRange
|
||||
{
|
||||
@@ -75,8 +75,8 @@ public class ActivationRange
|
||||
@@ -73,8 +73,8 @@ public class ActivationRange
|
||||
/**
|
||||
* These entities are excluded from Activation range checks.
|
||||
*
|
||||
@ -2261,7 +2262,7 @@ index d838cd421ddcb082beba1edcd84b5d30e26b1544..2b00258ccd808e3332af5ab3f7e4967f
|
||||
* @return boolean If it should always tick.
|
||||
*/
|
||||
public static boolean initializeEntityActivationState(Entity entity, SpigotWorldConfig config)
|
||||
@@ -111,7 +111,7 @@ public class ActivationRange
|
||||
@@ -109,7 +109,7 @@ public class ActivationRange
|
||||
*/
|
||||
public static void activateEntities(World world)
|
||||
{
|
||||
@ -2270,7 +2271,7 @@ index d838cd421ddcb082beba1edcd84b5d30e26b1544..2b00258ccd808e3332af5ab3f7e4967f
|
||||
final int miscActivationRange = world.spigotConfig.miscActivationRange;
|
||||
final int raiderActivationRange = world.spigotConfig.raiderActivationRange;
|
||||
final int animalActivationRange = world.spigotConfig.animalActivationRange;
|
||||
@@ -148,7 +148,7 @@ public class ActivationRange
|
||||
@@ -146,7 +146,7 @@ public class ActivationRange
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2279,7 +2280,7 @@ index d838cd421ddcb082beba1edcd84b5d30e26b1544..2b00258ccd808e3332af5ab3f7e4967f
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -245,10 +245,8 @@ public class ActivationRange
|
||||
@@ -243,10 +243,8 @@ public class ActivationRange
|
||||
*/
|
||||
public static boolean checkIfActive(Entity entity)
|
||||
{
|
||||
@ -2290,7 +2291,7 @@ index d838cd421ddcb082beba1edcd84b5d30e26b1544..2b00258ccd808e3332af5ab3f7e4967f
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -272,7 +270,6 @@ public class ActivationRange
|
||||
@@ -270,7 +268,6 @@ public class ActivationRange
|
||||
{
|
||||
isActive = false;
|
||||
}
|
||||
|
@ -1387,10 +1387,10 @@ index e6d97e7ffae3eadac586bad078123cd4aaa69916..d11725d61b888ceb08c4ea30f23d5631
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 73bd46c980cb13d6cbe4aba41adb122eaab769be..b6f867c891c2f02a2e526a0d746d0adde250e202 100644
|
||||
index 351440f534653c9d315ccaf1e923e03ca6ba01f6..99a242956a56121ab4f108fc58563e1df1537577 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -564,8 +564,11 @@ public final class CraftServer implements Server {
|
||||
@@ -563,8 +563,11 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -1403,7 +1403,7 @@ index 73bd46c980cb13d6cbe4aba41adb122eaab769be..b6f867c891c2f02a2e526a0d746d0add
|
||||
}
|
||||
|
||||
public Player getPlayer(final EntityPlayer entity) {
|
||||
@@ -1303,7 +1306,15 @@ public final class CraftServer implements Server {
|
||||
@@ -1302,7 +1305,15 @@ public final class CraftServer implements Server {
|
||||
return configuration.getInt("settings.spawn-radius", -1);
|
||||
}
|
||||
|
||||
@ -1419,7 +1419,7 @@ index 73bd46c980cb13d6cbe4aba41adb122eaab769be..b6f867c891c2f02a2e526a0d746d0add
|
||||
public String getShutdownMessage() {
|
||||
return configuration.getString("settings.shutdown-message");
|
||||
}
|
||||
@@ -1419,7 +1430,15 @@ public final class CraftServer implements Server {
|
||||
@@ -1418,7 +1429,15 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -1435,7 +1435,7 @@ index 73bd46c980cb13d6cbe4aba41adb122eaab769be..b6f867c891c2f02a2e526a0d746d0add
|
||||
Set<CommandSender> recipients = new HashSet<>();
|
||||
for (Permissible permissible : getPluginManager().getPermissionSubscriptions(permission)) {
|
||||
if (permissible instanceof CommandSender && permissible.hasPermission(permission)) {
|
||||
@@ -1427,14 +1446,14 @@ public final class CraftServer implements Server {
|
||||
@@ -1426,14 +1445,14 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
}
|
||||
|
||||
@ -1452,7 +1452,7 @@ index 73bd46c980cb13d6cbe4aba41adb122eaab769be..b6f867c891c2f02a2e526a0d746d0add
|
||||
|
||||
for (CommandSender recipient : recipients) {
|
||||
recipient.sendMessage(message);
|
||||
@@ -1660,6 +1679,14 @@ public final class CraftServer implements Server {
|
||||
@@ -1659,6 +1678,14 @@ public final class CraftServer implements Server {
|
||||
return CraftInventoryCreator.INSTANCE.createInventory(owner, type);
|
||||
}
|
||||
|
||||
@ -1467,7 +1467,7 @@ index 73bd46c980cb13d6cbe4aba41adb122eaab769be..b6f867c891c2f02a2e526a0d746d0add
|
||||
@Override
|
||||
public Inventory createInventory(InventoryHolder owner, InventoryType type, String title) {
|
||||
Validate.isTrue(type.isCreatable(), "Cannot open an inventory of type ", type);
|
||||
@@ -1672,13 +1699,28 @@ public final class CraftServer implements Server {
|
||||
@@ -1671,13 +1698,28 @@ public final class CraftServer implements Server {
|
||||
return CraftInventoryCreator.INSTANCE.createInventory(owner, size);
|
||||
}
|
||||
|
||||
@ -1496,7 +1496,7 @@ index 73bd46c980cb13d6cbe4aba41adb122eaab769be..b6f867c891c2f02a2e526a0d746d0add
|
||||
public Merchant createMerchant(String title) {
|
||||
return new CraftMerchantCustom(title == null ? InventoryType.MERCHANT.getDefaultTitle() : title);
|
||||
}
|
||||
@@ -1722,6 +1764,12 @@ public final class CraftServer implements Server {
|
||||
@@ -1721,6 +1763,12 @@ public final class CraftServer implements Server {
|
||||
return Thread.currentThread().equals(console.serverThread) || console.hasStopped() || !org.spigotmc.AsyncCatcher.enabled; // All bets are off if we have shut down (e.g. due to watchdog)
|
||||
}
|
||||
|
||||
@ -1509,7 +1509,7 @@ index 73bd46c980cb13d6cbe4aba41adb122eaab769be..b6f867c891c2f02a2e526a0d746d0add
|
||||
@Override
|
||||
public String getMotd() {
|
||||
return console.getMotd();
|
||||
@@ -2148,5 +2196,15 @@ public final class CraftServer implements Server {
|
||||
@@ -2149,5 +2197,15 @@ public final class CraftServer implements Server {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -1789,10 +1789,10 @@ index db7c4011c8b90b6daca2b48a6d9ec447d31f7197..969bf1095bb2a90ad0f1cb1f1e023e05
|
||||
public void setCustomName(String name) {
|
||||
// sane limit for name length
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index af41d9f11c6da2609bd75e49f15f5ec129b92361..fb3378e22864335fe6b60d77a401e01a68b3553c 100644
|
||||
index 96b55867d8bfbc85cb290da9b320ec74b9dbb179..ccfa8243639f487e0f83f012349fcfef94f377cb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
@@ -317,9 +317,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
@@ -316,9 +316,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
container = CraftEventFactory.callInventoryOpenEvent(player, container);
|
||||
if (container == null) return;
|
||||
|
||||
@ -1807,7 +1807,7 @@ index af41d9f11c6da2609bd75e49f15f5ec129b92361..fb3378e22864335fe6b60d77a401e01a
|
||||
getHandle().activeContainer = container;
|
||||
getHandle().activeContainer.addSlotListener(player);
|
||||
}
|
||||
@@ -388,8 +391,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
@@ -387,8 +390,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
|
||||
// Now open the window
|
||||
Containers<?> windowType = CraftContainer.getNotchInventoryType(inventory.getTopInventory());
|
||||
@ -1823,18 +1823,10 @@ index af41d9f11c6da2609bd75e49f15f5ec129b92361..fb3378e22864335fe6b60d77a401e01a
|
||||
player.activeContainer.addSlotListener(player);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 4001145980f4dabbd291336d5a464c3856144996..28368aa85e25ad5ee1e35255f093fd3f5a7a15bf 100644
|
||||
index 8428ef53e0408c4a7f74cc03e7e238be9c2f1888..28368aa85e25ad5ee1e35255f093fd3f5a7a15bf 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -84,7 +84,6 @@ import org.bukkit.Particle;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.Statistic;
|
||||
import org.bukkit.WeatherType;
|
||||
-import org.bukkit.World;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.configuration.serialization.DelegateDeserialization;
|
||||
import org.bukkit.conversations.Conversation;
|
||||
@@ -240,14 +239,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -239,14 +239,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
@Override
|
||||
public String getDisplayName() {
|
||||
@ -1874,7 +1866,7 @@ index 4001145980f4dabbd291336d5a464c3856144996..28368aa85e25ad5ee1e35255f093fd3f
|
||||
@Override
|
||||
public String getPlayerListName() {
|
||||
return getHandle().listName == null ? getName() : CraftChatMessage.fromComponent(getHandle().listName);
|
||||
@@ -266,35 +290,35 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -265,35 +290,35 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
}
|
||||
|
||||
@ -1918,7 +1910,7 @@ index 4001145980f4dabbd291336d5a464c3856144996..28368aa85e25ad5ee1e35255f093fd3f
|
||||
updatePlayerListHeaderFooter();
|
||||
}
|
||||
|
||||
@@ -302,8 +326,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -301,8 +326,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
if (getHandle().playerConnection == null) return;
|
||||
|
||||
PacketPlayOutPlayerListHeaderFooter packet = new PacketPlayOutPlayerListHeaderFooter();
|
||||
@ -1929,7 +1921,7 @@ index 4001145980f4dabbd291336d5a464c3856144996..28368aa85e25ad5ee1e35255f093fd3f
|
||||
getHandle().playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@@ -335,6 +359,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -334,6 +359,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
getHandle().playerConnection.disconnect(message == null ? "" : message);
|
||||
}
|
||||
|
||||
@ -1949,7 +1941,7 @@ index 4001145980f4dabbd291336d5a464c3856144996..28368aa85e25ad5ee1e35255f093fd3f
|
||||
@Override
|
||||
public void setCompassTarget(Location loc) {
|
||||
if (getHandle().playerConnection == null) return;
|
||||
@@ -549,6 +586,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -548,6 +586,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
getHandle().playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@ -1987,7 +1979,7 @@ index 4001145980f4dabbd291336d5a464c3856144996..28368aa85e25ad5ee1e35255f093fd3f
|
||||
@Override
|
||||
public void sendSignChange(Location loc, String[] lines) {
|
||||
sendSignChange(loc, lines, DyeColor.BLACK);
|
||||
@@ -571,12 +639,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -570,12 +639,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
IChatBaseComponent[] components = CraftSign.sanitizeLines(lines);
|
||||
@ -2003,7 +1995,7 @@ index 4001145980f4dabbd291336d5a464c3856144996..28368aa85e25ad5ee1e35255f093fd3f
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1706,6 +1775,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1705,6 +1775,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
return (getHandle().clientViewDistance == null) ? Bukkit.getViewDistance() : getHandle().clientViewDistance;
|
||||
}
|
||||
|
||||
@ -2016,7 +2008,7 @@ index 4001145980f4dabbd291336d5a464c3856144996..28368aa85e25ad5ee1e35255f093fd3f
|
||||
@Override
|
||||
public String getLocale() {
|
||||
return getHandle().locale;
|
||||
@@ -1729,6 +1804,137 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1728,6 +1804,137 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
getInventory().setItemInMainHand(hand);
|
||||
}
|
||||
|
||||
@ -2155,10 +2147,10 @@ index 4001145980f4dabbd291336d5a464c3856144996..28368aa85e25ad5ee1e35255f093fd3f
|
||||
private final Player.Spigot spigot = new Player.Spigot()
|
||||
{
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index dde25528de07857175b00ff85612d738eb43b9ec..b82dd03855dab546cc430dc0f0f07f9067365fa7 100644
|
||||
index f6688c7151734f4bdb63a71e810996e04b09e22c..6c153971dd72ff9df9725f889032cfb59bbe31e3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -772,7 +772,7 @@ public class CraftEventFactory {
|
||||
@@ -766,7 +766,7 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
||||
@ -2167,7 +2159,7 @@ index dde25528de07857175b00ff85612d738eb43b9ec..b82dd03855dab546cc430dc0f0f07f90
|
||||
CraftPlayer entity = victim.getBukkitEntity();
|
||||
PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage);
|
||||
event.setKeepInventory(keepInventory);
|
||||
@@ -798,7 +798,7 @@ public class CraftEventFactory {
|
||||
@@ -792,7 +792,7 @@ public class CraftEventFactory {
|
||||
* Server methods
|
||||
*/
|
||||
public static ServerListPingEvent callServerListPingEvent(Server craftServer, InetAddress address, String motd, int numPlayers, int maxPlayers) {
|
||||
@ -2407,14 +2399,15 @@ index 9f6e797d34e5ad21a496c89f5a45ddb0638d3adc..115ee3785b4e0ba6a235bbb31b643aa5
|
||||
@Override
|
||||
public CraftMerchant getCraftMerchant() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
|
||||
index 18faf5ea801984696ba45b9784aa0afdf6971e39..fb4d39a4cf101749f74da9c48bb3a27b0188fbeb 100644
|
||||
index a0cc04cb6d1f02df3018320b4147bd0b156dd81c..fb4d39a4cf101749f74da9c48bb3a27b0188fbeb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
|
||||
@@ -2,12 +2,15 @@ package org.bukkit.craftbukkit.inventory;
|
||||
@@ -1,13 +1,16 @@
|
||||
package org.bukkit.craftbukkit.inventory;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Lists;
|
||||
-import com.google.common.collect.ImmutableMap.Builder;
|
||||
import com.google.common.collect.Lists;
|
||||
+
|
||||
+import com.google.common.collect.ImmutableMap; // Paper
|
||||
import java.util.ArrayList;
|
||||
|
@ -32,10 +32,10 @@ index 89d3ff83f0e152e9747c554693af4145f0a7d07e..dd104b1cd544983024ac60888940a1c0
|
||||
|
||||
public CrashReport b(CrashReport crashreport) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index b6f867c891c2f02a2e526a0d746d0adde250e202..73ede1a37b141007a6085adcdced82236ef656e9 100644
|
||||
index 99a242956a56121ab4f108fc58563e1df1537577..7a2409b78a044c37de1ee4fc772e4ac120ae657c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -227,7 +227,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
||||
@@ -226,7 +226,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
||||
import net.md_5.bungee.api.chat.BaseComponent; // Spigot
|
||||
|
||||
public final class CraftServer implements Server {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Remove invalid mob spawner tile entities
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 19ddcabdc17c23c4ec46f5669ba0fd56d4bbee58..0da51a454b599f54f3bd443040cdcac57b1c7d7c 100644
|
||||
index 0aea16df16b55b1d4756b51d10c8c22d37aef9a3..0d0f36c62d260390827321aa6472f51a3a204c95 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -612,6 +612,10 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -614,6 +614,10 @@ public class Chunk implements IChunkAccess {
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
|
@ -140,10 +140,10 @@ index dd104b1cd544983024ac60888940a1c0917d05a1..478dfe231720324e995dc4123fbf19b9
|
||||
GameProfilerTick gameprofilertick = GameProfilerTick.a("Server");
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 73ede1a37b141007a6085adcdced82236ef656e9..bf9afb9d4dd7d9d6b8647c760e1ba31a8c0ba150 100644
|
||||
index 7a2409b78a044c37de1ee4fc772e4ac120ae657c..390714fa5822a61f64f6b3b8731397e9dae77cfd 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2114,6 +2114,17 @@ public final class CraftServer implements Server {
|
||||
@@ -2113,6 +2113,17 @@ public final class CraftServer implements Server {
|
||||
return CraftMagicNumbers.INSTANCE;
|
||||
}
|
||||
|
||||
@ -158,14 +158,14 @@ index 73ede1a37b141007a6085adcdced82236ef656e9..bf9afb9d4dd7d9d6b8647c760e1ba31a
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
// Spigot start
|
||||
private final Spigot spigot = new Spigot()
|
||||
{
|
||||
|
||||
diff --git a/src/main/java/org/spigotmc/TicksPerSecondCommand.java b/src/main/java/org/spigotmc/TicksPerSecondCommand.java
|
||||
index 9cd57c9d5fe59ceb2cd307e4e1a2052c9ac428fe..7218f23df4d06ff1ca612286e4a404246389ab18 100644
|
||||
index f5b6dec1cbe7501ce2ee9125920e810bc94670cc..e62890433ffbe0b4e48942fe6c38b599a19e58fd 100644
|
||||
--- a/src/main/java/org/spigotmc/TicksPerSecondCommand.java
|
||||
+++ b/src/main/java/org/spigotmc/TicksPerSecondCommand.java
|
||||
@@ -26,22 +26,30 @@ public class TicksPerSecondCommand extends Command
|
||||
@@ -24,22 +24,30 @@ public class TicksPerSecondCommand extends Command
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ index f1d0e2faffb3ef27f5a41d06d0ff7d787f1098f5..da96a91c6b4cc03ad2e4539053bd30e7
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index ab1285ed371f7848cddd959c33019a8ff10e1c28..21868a246d01c0f8c8642e42f82f66632b3bcadd 100644
|
||||
index 0f602de85bc7002150247b6cb26c6905f0e4f585..bc1946ea3060220f4598aae2e1aed3d84ab18387 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -685,11 +685,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@ -42,10 +42,10 @@ index ab1285ed371f7848cddd959c33019a8ff10e1c28..21868a246d01c0f8c8642e42f82f6663
|
||||
+ this.tileEntityListTick.remove(tileTickPosition--);
|
||||
+ continue;
|
||||
+ // Paper end
|
||||
}
|
||||
// Spigot start
|
||||
finally {
|
||||
@@ -755,11 +757,12 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
} finally {
|
||||
tileentity.tickTimer.stopTiming();
|
||||
@@ -754,11 +756,12 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
try {
|
||||
consumer.accept(entity);
|
||||
} catch (Throwable throwable) {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Always tick falling blocks
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
index 2b00258ccd808e3332af5ab3f7e4967f03dd4aa3..78f0fb5d97b077673ec542cd70bbc3ffa13f916c 100644
|
||||
index 093a11b6e355f9e1236ecca921ea55488d70451d..d44ef056bdab3bcff39aea45b40a4c7e9c62398f 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -13,6 +13,7 @@ import net.minecraft.server.EntityCreature;
|
||||
@@ -12,6 +12,7 @@ import net.minecraft.server.EntityCreature;
|
||||
import net.minecraft.server.EntityCreeper;
|
||||
import net.minecraft.server.EntityEnderCrystal;
|
||||
import net.minecraft.server.EntityEnderDragon;
|
||||
@ -16,7 +16,7 @@ index 2b00258ccd808e3332af5ab3f7e4967f03dd4aa3..78f0fb5d97b077673ec542cd70bbc3ff
|
||||
import net.minecraft.server.EntityFireball;
|
||||
import net.minecraft.server.EntityFireworks;
|
||||
import net.minecraft.server.EntityHuman;
|
||||
@@ -93,6 +94,7 @@ public class ActivationRange
|
||||
@@ -91,6 +92,7 @@ public class ActivationRange
|
||||
|| entity instanceof EntityFireball
|
||||
|| entity instanceof EntityLightning
|
||||
|| entity instanceof EntityTNTPrimed
|
||||
|
@ -48,10 +48,10 @@ index 287d1c6abd407dc8f1e5b29a95579ff9875bdaec..cfacd979d75fd612937586cbc9f55570
|
||||
} else if (this.player.getChatFlags() == EnumChatVisibility.SYSTEM) {
|
||||
// Do nothing, this is coming from a plugin
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index bf9afb9d4dd7d9d6b8647c760e1ba31a8c0ba150..6b26a8f09c022f398b847411166d11d2e2d0ca76 100644
|
||||
index 390714fa5822a61f64f6b3b8731397e9dae77cfd..e78182508ccd05bcb934a29eb495ff9c884d3a55 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -763,6 +763,29 @@ public final class CraftServer implements Server {
|
||||
@@ -762,6 +762,29 @@ public final class CraftServer implements Server {
|
||||
Validate.notNull(commandLine, "CommandLine cannot be null");
|
||||
org.spigotmc.AsyncCatcher.catchOp("command dispatch"); // Spigot
|
||||
|
||||
@ -106,7 +106,7 @@ index aeed7697254af17ffefe8e578353ad216e15f9f3..9f7d2ef932ab41cef5d3d0736d20a7c7
|
||||
public static void catchOp(String reason)
|
||||
{
|
||||
diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java
|
||||
index e7b953ca312533f7ede12cdab42b2289aefc3b95..ccea803f58e09067cc998c62ffa134d6604878ff 100644
|
||||
index 56445844c7f542dd74c166bb09abd79cc17e1e12..26795b22e3ebc9594af79f93506a3c217cb784e2 100644
|
||||
--- a/src/main/java/org/spigotmc/RestartCommand.java
|
||||
+++ b/src/main/java/org/spigotmc/RestartCommand.java
|
||||
@@ -43,6 +43,7 @@ public class RestartCommand extends Command
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose server CommandMap
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 6b26a8f09c022f398b847411166d11d2e2d0ca76..5faa720f7249cbe0028927bb274cb45009068359 100644
|
||||
index e78182508ccd05bcb934a29eb495ff9c884d3a55..5e97a52222dbccbdde7d478d76363495784facb8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1753,6 +1753,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1752,6 +1752,7 @@ public final class CraftServer implements Server {
|
||||
return helpMap;
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add velocity warnings
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 5faa720f7249cbe0028927bb274cb45009068359..09d28f816520abb0f092bc6cd1bb1f0e3cfe1417 100644
|
||||
index 5e97a52222dbccbdde7d478d76363495784facb8..f1aae33917fc8a61e38b410421c205a7bc5a13dd 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -263,6 +263,7 @@ public final class CraftServer implements Server {
|
||||
@@ -262,6 +262,7 @@ public final class CraftServer implements Server {
|
||||
public boolean ignoreVanillaPermissions = false;
|
||||
private final List<CraftPlayer> playerView;
|
||||
public int reloadCount;
|
||||
|
@ -49,7 +49,7 @@ index 0000000000000000000000000000000000000000..f699ce18ca044f813e194ef2786b7ea8
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 0da51a454b599f54f3bd443040cdcac57b1c7d7c..81c6ce3ba87da692675bca8b2831a90fabfa4e37 100644
|
||||
index 0d0f36c62d260390827321aa6472f51a3a204c95..01655fd86f9a3218036f8b5404e233d32e0904a5 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -1,5 +1,6 @@
|
||||
@ -59,7 +59,7 @@ index 0da51a454b599f54f3bd443040cdcac57b1c7d7c..81c6ce3ba87da692675bca8b2831a90f
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
import it.unimi.dsi.fastutil.longs.LongOpenHashSet;
|
||||
@@ -617,10 +618,15 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -619,10 +620,15 @@ public class Chunk implements IChunkAccess {
|
||||
this.tileEntities.remove(blockposition);
|
||||
// Paper end
|
||||
} else {
|
||||
@ -187,7 +187,7 @@ index 1844a6504acc420bdfaaf8f045c569e970d055db..d6aadbda5c5a17976659f57ee04cf9b9
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 895436e36e6ef6f78dfd42e3ef3a0132506663f2..1c54c081c6ea1f422c19db1aa9e1935ce066d910 100644
|
||||
index eb0af6775d60e2cd610dde6e7c4874d4b01d6054..3638ae7c0eba5b1ef811bc1629334e9c483bef6f 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -1,5 +1,10 @@
|
||||
@ -214,7 +214,7 @@ index 895436e36e6ef6f78dfd42e3ef3a0132506663f2..1c54c081c6ea1f422c19db1aa9e1935c
|
||||
tilesThisCycle--;
|
||||
this.tileEntityListTick.remove(tileTickPosition--);
|
||||
continue;
|
||||
@@ -757,8 +765,10 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@@ -756,8 +764,10 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
consumer.accept(entity);
|
||||
} catch (Throwable throwable) {
|
||||
// Paper start - Prevent tile entity and entity crashes
|
||||
|
@ -30,10 +30,10 @@ index 1d03a79e9010bc514b72a81ba0ad4a62aeff1bb7..436e555205327afcb8e294370810cf27
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 09d28f816520abb0f092bc6cd1bb1f0e3cfe1417..499e2da0c9085cfffdb882df9801d654f4804d7f 100644
|
||||
index f1aae33917fc8a61e38b410421c205a7bc5a13dd..a02ec4d765ef54955459a372960fb5b539f912df 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -400,6 +400,7 @@ public final class CraftServer implements Server {
|
||||
@@ -399,6 +399,7 @@ public final class CraftServer implements Server {
|
||||
if (type == PluginLoadOrder.STARTUP) {
|
||||
helpMap.clear();
|
||||
helpMap.initializeGeneralTopics();
|
||||
@ -41,7 +41,7 @@ index 09d28f816520abb0f092bc6cd1bb1f0e3cfe1417..499e2da0c9085cfffdb882df9801d654
|
||||
}
|
||||
|
||||
Plugin[] plugins = pluginManager.getPlugins();
|
||||
@@ -419,7 +420,7 @@ public final class CraftServer implements Server {
|
||||
@@ -418,7 +419,7 @@ public final class CraftServer implements Server {
|
||||
commandMap.registerServerAliases();
|
||||
DefaultPermissions.registerCorePermissions();
|
||||
CraftDefaultPermissions.registerCorePermissions();
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Custom Permissions
|
||||
https://github.com/PaperMC/Paper/issues/49
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 499e2da0c9085cfffdb882df9801d654f4804d7f..5bbf334d9621822ffc0e731c6dbd26644a5e80d7 100644
|
||||
index a02ec4d765ef54955459a372960fb5b539f912df..e5f6dfa4061b98ccb5f3b0cd93ef416a2c20ee78 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2243,5 +2243,23 @@ public final class CraftServer implements Server {
|
||||
@@ -2244,5 +2244,23 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
return this.adventure$audiences;
|
||||
}
|
||||
|
@ -7,10 +7,10 @@ Metadata is not meant to persist reload as things break badly with non primitive
|
||||
This will remove metadata on reload so it does not crash everything if a plugin uses it.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 5bbf334d9621822ffc0e731c6dbd26644a5e80d7..0dd537392e0fdbd42466c39d69b03ea3c68c5fb6 100644
|
||||
index e5f6dfa4061b98ccb5f3b0cd93ef416a2c20ee78..83ab502d80bbb97204a6f0e4474d1a3b96218448 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -874,8 +874,18 @@ public final class CraftServer implements Server {
|
||||
@@ -873,8 +873,18 @@ public final class CraftServer implements Server {
|
||||
world.paperConfig.init(); // Paper
|
||||
}
|
||||
|
||||
|
@ -30,10 +30,10 @@ index cd64fb9d0c6d123e1c86cb33f12cd9cefc9f80d0..74ba5dbb83c13ce1721619b755036a78
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index b6ff6095543d720382786e159a9f1cdd6eb6f166..f9ad646f3061914e55e424602abe27da7f1c0865 100644
|
||||
index 9ef17a2ad31c8e11ba433b49aa9a31cf8df57dc8..83858165764a7459843433de1a077037692a2a97 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -984,7 +984,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -986,7 +986,7 @@ public class Chunk implements IChunkAccess {
|
||||
|
||||
@Override
|
||||
public long getInhabitedTime() {
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Remove unused World Tile Entity List
|
||||
Massive hit to performance and it is completely unnecessary.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 3dd789131e8ebe5ac82b1fac2cd15aa5893704ee..05bd9dd542ddb2508cb0c7138833371b52f1164e 100644
|
||||
index d6ee6aae693519a379b4a6ba26642d5ef78e4deb..369a6b42a89fd75aeb3da4930f47b6917a1ae393 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -39,7 +39,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@ -39,7 +39,7 @@ index 3dd789131e8ebe5ac82b1fac2cd15aa5893704ee..05bd9dd542ddb2508cb0c7138833371b
|
||||
this.tileEntityListUnload.clear();
|
||||
}
|
||||
|
||||
@@ -730,7 +730,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@@ -729,7 +729,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
tilesThisCycle--;
|
||||
this.tileEntityListTick.remove(tileTickPosition--);
|
||||
// Spigot end
|
||||
@ -48,7 +48,7 @@ index 3dd789131e8ebe5ac82b1fac2cd15aa5893704ee..05bd9dd542ddb2508cb0c7138833371b
|
||||
if (this.isLoaded(tileentity.getPosition())) {
|
||||
this.getChunkAtWorldCoords(tileentity.getPosition()).removeTileEntity(tileentity.getPosition());
|
||||
}
|
||||
@@ -760,7 +760,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@@ -759,7 +759,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
this.notify(tileentity1.getPosition(), iblockdata, iblockdata, 3);
|
||||
// CraftBukkit start
|
||||
// From above, don't screw this up - SPIGOT-1746
|
||||
@ -57,7 +57,7 @@ index 3dd789131e8ebe5ac82b1fac2cd15aa5893704ee..05bd9dd542ddb2508cb0c7138833371b
|
||||
this.a(tileentity1);
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -906,7 +906,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@@ -905,7 +905,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
} else {
|
||||
if (tileentity != null) {
|
||||
this.tileEntityListPending.remove(tileentity);
|
||||
@ -67,10 +67,10 @@ index 3dd789131e8ebe5ac82b1fac2cd15aa5893704ee..05bd9dd542ddb2508cb0c7138833371b
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index d199191220b5afc42d639f316878501c91514a50..4be09328cea0808c3a41681aea860cd04f799bbd 100644
|
||||
index dbb022fb186b181b9b1912adfaebbb00fa1c7d4b..486ba1efc934c6851d2b570493af6e1079a7abd5 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1600,7 +1600,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -1611,7 +1611,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
}
|
||||
|
||||
bufferedwriter.write(String.format("entities: %d\n", this.entitiesById.size()));
|
||||
@ -79,7 +79,7 @@ index d199191220b5afc42d639f316878501c91514a50..4be09328cea0808c3a41681aea860cd0
|
||||
bufferedwriter.write(String.format("block_ticks: %d\n", this.getBlockTickList().a()));
|
||||
bufferedwriter.write(String.format("fluid_ticks: %d\n", this.getFluidTickList().a()));
|
||||
bufferedwriter.write("distance_manager: " + playerchunkmap.e().c() + "\n");
|
||||
@@ -1739,7 +1739,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -1750,7 +1750,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
|
||||
private void a(Writer writer) throws IOException {
|
||||
CSVWriter csvwriter = CSVWriter.a().a("x").a("y").a("z").a("type").a(writer);
|
||||
|
@ -45,10 +45,10 @@ index 060887d765604e4be82913607bb6266a278f5db6..c5957c2d6c54b076ebe7f9a432e30551
|
||||
} else {
|
||||
String[] astring1 = astring;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 0dd537392e0fdbd42466c39d69b03ea3c68c5fb6..027d5409ae70015cdb5469a1502f861ed466ada1 100644
|
||||
index 83ab502d80bbb97204a6f0e4474d1a3b96218448..7a1a24c71999462aa4f8aebd78914d9bf243f5c9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1508,7 +1508,8 @@ public final class CraftServer implements Server {
|
||||
@@ -1507,7 +1507,8 @@ public final class CraftServer implements Server {
|
||||
// Spigot Start
|
||||
GameProfile profile = null;
|
||||
// Only fetch an online UUID in online mode
|
||||
|
@ -19,10 +19,10 @@ index 6eca3f300020006f02dd36253b522db442e3cc33..622affa0dc3cc1eadaed400511f2ca2c
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index f9ad646f3061914e55e424602abe27da7f1c0865..8dd560c8207f14123ab9c9820d8ce7333775db35 100644
|
||||
index 83858165764a7459843433de1a077037692a2a97..380690cdb1052b12d0574c111c2162bd7ed8ecca 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -641,6 +641,12 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -643,6 +643,12 @@ public class Chunk implements IChunkAccess {
|
||||
"Chunk coordinates: " + (this.loc.x * 16) + "," + (this.loc.z * 16));
|
||||
e.printStackTrace();
|
||||
ServerInternalException.reportInternalException(e);
|
||||
|
@ -38,10 +38,10 @@ index 824e172f06e57f86010836a1006a14d0a3b0bda3..eedec25373cfc8adec7ac8a99b146770
|
||||
entitywitch.prepare(worldserver, worldserver.getDamageScaler(entitywitch.getChunkCoordinates()), EnumMobSpawn.CONVERSION, (GroupDataEntity) null, (NBTTagCompound) null);
|
||||
entitywitch.setNoAI(this.isNoAI());
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index b82dd03855dab546cc430dc0f0f07f9067365fa7..dc6c1e4adfe14bb0ae1c60a2ffdb0fb03fe17c22 100644
|
||||
index 6c153971dd72ff9df9725f889032cfb59bbe31e3..4b8c984a79e276b980dd9aa33d2ef5deee9e13d1 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1082,6 +1082,14 @@ public class CraftEventFactory {
|
||||
@@ -1076,6 +1076,14 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Command Aliases
|
||||
Reload the aliases stored in commands.yml
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 027d5409ae70015cdb5469a1502f861ed466ada1..995b00b6ece91319e06022fb89356345fa257b54 100644
|
||||
index 7a1a24c71999462aa4f8aebd78914d9bf243f5c9..c87c5648582132db4e310a3c580eb3045afc32b8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2272,5 +2272,24 @@ public final class CraftServer implements Server {
|
||||
@@ -2273,5 +2273,24 @@ public final class CraftServer implements Server {
|
||||
DefaultPermissions.registerCorePermissions();
|
||||
CraftDefaultPermissions.registerCorePermissions();
|
||||
}
|
||||
|
@ -18,10 +18,10 @@ index fda68abbdd7c970048ba710d7ef35214f2aaa74c..2c2d44562f732c75532cda910db5ce67
|
||||
|
||||
this.die();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index dc6c1e4adfe14bb0ae1c60a2ffdb0fb03fe17c22..5f6255ceeede4e4ba3e6e8993b6aad6311f50462 100644
|
||||
index 4b8c984a79e276b980dd9aa33d2ef5deee9e13d1..4d90c941f92aaef8dd53b5c31b71a25d19954f40 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -121,6 +121,7 @@ import org.bukkit.entity.ThrownPotion;
|
||||
@@ -117,6 +117,7 @@ import org.bukkit.entity.ThrownPotion;
|
||||
import org.bukkit.entity.Vehicle;
|
||||
import org.bukkit.entity.Villager;
|
||||
import org.bukkit.entity.Villager.Profession;
|
||||
@ -29,7 +29,7 @@ index dc6c1e4adfe14bb0ae1c60a2ffdb0fb03fe17c22..5f6255ceeede4e4ba3e6e8993b6aad63
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.Event.Result;
|
||||
@@ -1041,6 +1042,17 @@ public class CraftEventFactory {
|
||||
@@ -1035,6 +1036,17 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
||||
|
@ -71,10 +71,10 @@ index 7391fd31148dbde60e34955841a296f454ac768e..53a8ea7d1eff84abe6c49464d556aa27
|
||||
|
||||
this.checkBlockCollisions();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 5f6255ceeede4e4ba3e6e8993b6aad6311f50462..1db30da4294f1187eeacecfc056a44963378a1cc 100644
|
||||
index 4d90c941f92aaef8dd53b5c31b71a25d19954f40..62730cbdf46c0cabe71849d3ee3d403ecccab242 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1186,6 +1186,16 @@ public class CraftEventFactory {
|
||||
@@ -1180,6 +1180,16 @@ public class CraftEventFactory {
|
||||
return CraftItemStack.asNMSCopy(bitem);
|
||||
}
|
||||
|
||||
|
@ -44,10 +44,10 @@ index 46b315036bbe576b2bf9938db73d9c5931003cc1..a646dc9f030ad1f76ba2b7bb1bc7897c
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemCrossbow.java b/src/main/java/net/minecraft/server/ItemCrossbow.java
|
||||
index 9e17a002218ce82c0e1033f3487f878463970d17..14c0e7382292b3d39858d4d957df8016c301c712 100644
|
||||
index 5e1af55c429117111aa40a9408cecafc82a94512..658b5ca36d951f2f58d91613b89a328109606fd6 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemCrossbow.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemCrossbow.java
|
||||
@@ -183,6 +183,7 @@ public class ItemCrossbow extends ItemProjectileWeapon implements ItemVanishable
|
||||
@@ -182,6 +182,7 @@ public class ItemCrossbow extends ItemProjectileWeapon implements ItemVanishable
|
||||
|
||||
if (flag1) {
|
||||
object = new EntityFireworks(world, itemstack1, entityliving, entityliving.locX(), entityliving.getHeadY() - 0.15000000596046448D, entityliving.locZ(), true);
|
||||
|
@ -226,10 +226,10 @@ index eedec25373cfc8adec7ac8a99b146770dc15c70e..732323ee1de01929c73bc5f98444c0f6
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityVillagerTrader.java b/src/main/java/net/minecraft/server/EntityVillagerTrader.java
|
||||
index c830b3c2145effc16314c6216be8af935416cb58..f1a509063c09e603140c74255a3fb901693d2cc5 100644
|
||||
index 86e9c9ec35153d4d6248512e2e3406ca2f3dac46..fa3e786cd6ef67da378a5d51583ca84a82677d8c 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityVillagerTrader.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityVillagerTrader.java
|
||||
@@ -144,7 +144,7 @@ public class EntityVillagerTrader extends EntityVillagerAbstract {
|
||||
@@ -145,7 +145,7 @@ public class EntityVillagerTrader extends EntityVillagerAbstract {
|
||||
if (merchantrecipe.isRewardExp()) {
|
||||
int i = 3 + this.random.nextInt(4);
|
||||
|
||||
@ -278,10 +278,10 @@ index a3ddf7be4c7ea588098381b8f05b2bad5b388853..99b20fa5feff0f766124d4ec9474852e
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 3f35e1290beaab1fa2ca93ec64ab0dd42d68d71c..85562d2cafab6f81705b70ac1f965ccfb38abdf5 100644
|
||||
index e42f27bb10b6ee279555cfee3c90a88fccad9d65..5bf5a815653b0556d9d2bcaf5f69026b77bd28a6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1822,7 +1822,7 @@ public class CraftWorld implements World {
|
||||
@@ -1827,7 +1827,7 @@ public class CraftWorld implements World {
|
||||
} else if (TNTPrimed.class.isAssignableFrom(clazz)) {
|
||||
entity = new EntityTNTPrimed(world, x, y, z, null);
|
||||
} else if (ExperienceOrb.class.isAssignableFrom(clazz)) {
|
||||
|
@ -101,7 +101,7 @@ index 05ef12c3b90191a3998d1251221658c86af99654..7ecd5e3747fd8acbddcdf5b42285d7b6
|
||||
// CraftBukkit start
|
||||
public void sendMessage(IChatBaseComponent[] iChatBaseComponents) {
|
||||
diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java
|
||||
index ccea803f58e09067cc998c62ffa134d6604878ff..aefea3a9a8b9b75c62bd20018be7cd166a213001 100644
|
||||
index 26795b22e3ebc9594af79f93506a3c217cb784e2..aefea3a9a8b9b75c62bd20018be7cd166a213001 100644
|
||||
--- a/src/main/java/org/spigotmc/RestartCommand.java
|
||||
+++ b/src/main/java/org/spigotmc/RestartCommand.java
|
||||
@@ -46,86 +46,134 @@ public class RestartCommand extends Command
|
||||
@ -134,7 +134,7 @@ index ccea803f58e09067cc998c62ffa134d6604878ff..aefea3a9a8b9b75c62bd20018be7cd16
|
||||
+ }
|
||||
|
||||
- // Kick all players
|
||||
- for ( EntityPlayer p : (List< EntityPlayer>) MinecraftServer.getServer().getPlayerList().players )
|
||||
- for ( EntityPlayer p : (List<EntityPlayer>) MinecraftServer.getServer().getPlayerList().players )
|
||||
- {
|
||||
- p.playerConnection.disconnect(SpigotConfig.restartMessage);
|
||||
- }
|
||||
|
@ -20,10 +20,10 @@ index 3449ba199bdb426ad36dc4a281925f91eea3fab3..ed519159c37299595b4eaeaab5131a8e
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 995b00b6ece91319e06022fb89356345fa257b54..2ffbe9d1a18f65c1190b6fc14e20bde3084ed444 100644
|
||||
index c87c5648582132db4e310a3c580eb3045afc32b8..2101695ca111d0bfcec7da5065034b6029687949 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2291,5 +2291,10 @@ public final class CraftServer implements Server {
|
||||
@@ -2292,5 +2292,10 @@ public final class CraftServer implements Server {
|
||||
commandMap.registerServerAliases();
|
||||
return true;
|
||||
}
|
||||
|
@ -259,7 +259,7 @@ index 7ecd5e3747fd8acbddcdf5b42285d7b6f3ffbac2..07ab0bf135a6903c936606296b6701b9
|
||||
|
||||
this.k = new GameProfileBanList(PlayerList.b);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 2ffbe9d1a18f65c1190b6fc14e20bde3084ed444..c8b5d0933f26882be18505d9366a5c3d546ba2dc 100644
|
||||
index 2101695ca111d0bfcec7da5065034b6029687949..38486fb74a29fd8ace2bfa6e74c1b5230ab99a7f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -46,7 +46,7 @@ import java.util.function.Consumer;
|
||||
@ -271,7 +271,7 @@ index 2ffbe9d1a18f65c1190b6fc14e20bde3084ed444..c8b5d0933f26882be18505d9366a5c3d
|
||||
import net.minecraft.server.Advancement;
|
||||
import net.minecraft.server.ArgumentEntity;
|
||||
import net.minecraft.server.BiomeManager;
|
||||
@@ -1202,9 +1202,13 @@ public final class CraftServer implements Server {
|
||||
@@ -1201,9 +1201,13 @@ public final class CraftServer implements Server {
|
||||
return logger;
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add UnknownCommandEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index c8b5d0933f26882be18505d9366a5c3d546ba2dc..7bc616faba6e98cb04a36ab26afa7cfb7c9eacd6 100644
|
||||
index 38486fb74a29fd8ace2bfa6e74c1b5230ab99a7f..3ddd97c732fe5ae24075e70f8b8a2b0c3e52a32c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -105,6 +105,7 @@ import net.minecraft.server.WorldNBTStorage;
|
||||
@@ -104,6 +104,7 @@ import net.minecraft.server.WorldNBTStorage;
|
||||
import net.minecraft.server.WorldServer;
|
||||
import net.minecraft.server.WorldSettings;
|
||||
import org.apache.commons.lang.Validate;
|
||||
@ -16,7 +16,7 @@ index c8b5d0933f26882be18505d9366a5c3d546ba2dc..7bc616faba6e98cb04a36ab26afa7cfb
|
||||
import org.bukkit.BanList;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
@@ -178,6 +179,7 @@ import org.bukkit.craftbukkit.util.Versioning;
|
||||
@@ -177,6 +178,7 @@ import org.bukkit.craftbukkit.util.Versioning;
|
||||
import org.bukkit.craftbukkit.util.permissions.CraftDefaultPermissions;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -24,7 +24,7 @@ index c8b5d0933f26882be18505d9366a5c3d546ba2dc..7bc616faba6e98cb04a36ab26afa7cfb
|
||||
import org.bukkit.event.inventory.InventoryType;
|
||||
import org.bukkit.event.player.PlayerChatTabCompleteEvent;
|
||||
import org.bukkit.event.server.BroadcastMessageEvent;
|
||||
@@ -794,7 +796,13 @@ public final class CraftServer implements Server {
|
||||
@@ -793,7 +795,13 @@ public final class CraftServer implements Server {
|
||||
|
||||
// Spigot start
|
||||
if (!org.spigotmc.SpigotConfig.unknownCommandMessage.isEmpty()) {
|
||||
|
@ -509,10 +509,10 @@ index e89c92aded564fe689cc1aa8d0c83abb72f7b10c..aa1b18ffa1e2b7f865f63b7df81d8f3b
|
||||
private volatile long c;
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 7bc616faba6e98cb04a36ab26afa7cfb7c9eacd6..e89b0502b243a35ddc6c765b45cf2d69e491daff 100644
|
||||
index 3ddd97c732fe5ae24075e70f8b8a2b0c3e52a32c..2b6c9dbbbf97386cd9d9b37254640b8585092140 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -228,6 +228,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
||||
@@ -227,6 +227,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
||||
|
||||
import net.md_5.bungee.api.chat.BaseComponent; // Spigot
|
||||
|
||||
@ -522,7 +522,7 @@ index 7bc616faba6e98cb04a36ab26afa7cfb7c9eacd6..e89b0502b243a35ddc6c765b45cf2d69
|
||||
public final class CraftServer implements Server {
|
||||
private final String serverName = "Paper"; // Paper
|
||||
private final String serverVersion;
|
||||
@@ -2308,5 +2311,24 @@ public final class CraftServer implements Server {
|
||||
@@ -2309,5 +2312,24 @@ public final class CraftServer implements Server {
|
||||
public boolean suggestPlayerNamesWhenNullTabCompletions() {
|
||||
return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions;
|
||||
}
|
||||
|
@ -58,10 +58,10 @@ index 63f3743bbf3632badf4e66a5ee4239ccbc5df700..502154234632fbf65fada993f9a1e457
|
||||
@Override
|
||||
public abstract boolean isSpectator();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index fb3378e22864335fe6b60d77a401e01a68b3553c..b1f837fcbaa2ab9d83bb8f17b24dd45fdc3b14e4 100644
|
||||
index ccfa8243639f487e0f83f012349fcfef94f377cb..f209e6d8fa20ceb7db71a6bb1685fd79b13f0738 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
@@ -494,6 +494,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
@@ -493,6 +493,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
getHandle().getCooldownTracker().setCooldown(CraftMagicNumbers.getItem(material), ticks);
|
||||
}
|
||||
|
||||
|
@ -20,10 +20,10 @@ index 90ca51dfdbb3045dd528450225cba96f5834166e..6c692e58cde22003ecbf6dc569579914
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 1db30da4294f1187eeacecfc056a44963378a1cc..56730babb7eb42625155361d47070d4e46bab9d0 100644
|
||||
index 62730cbdf46c0cabe71849d3ee3d403ecccab242..efe3133a8c5a034c5e168e33880a756161b9adb4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -583,16 +583,32 @@ public class CraftEventFactory {
|
||||
@@ -577,16 +577,32 @@ public class CraftEventFactory {
|
||||
EntityExperienceOrb xp = (EntityExperienceOrb) entity;
|
||||
double radius = world.spigotConfig.expMerge;
|
||||
if (radius > 0) {
|
||||
|
@ -81,12 +81,12 @@ index 5de8463c94612edd11e02ac5d9757382c9598e7d..661bb54c27966c8050644b293d99dfe8
|
||||
|
||||
switch (material) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
|
||||
index 26cc40e57f5b73b9c32859bff37c4a3d94904c56..feeae1a9eb309ae4101783b191bb2bffe9aeb7d3 100644
|
||||
index 8a7e9302b4b6be086144add8df610b76b58e00d6..cca1c2ca5c1fe91fda30ace6f06a343b7850842e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
|
||||
@@ -26,20 +26,40 @@ public class CraftBlockEntityState<T extends TileEntity> extends CraftBlockState
|
||||
this.tileEntity = tileEntityClass.cast(world.getHandle().getTileEntity(this.getPosition()));
|
||||
Preconditions.checkState(this.tileEntity != null, "Tile is null, asynchronous access? " + block);
|
||||
Preconditions.checkState(this.tileEntity != null, "Tile is null, asynchronous access? %s", block);
|
||||
|
||||
+ // Paper start
|
||||
+ this.snapshotDisabled = DISABLE_SNAPSHOT;
|
||||
|
@ -72,10 +72,10 @@ index bbf89a81489bc6ec5741448b246ce9926b87b4e1..fa4ae84f7ed03da24d89268c4c566443
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index e89b0502b243a35ddc6c765b45cf2d69e491daff..441547cdae0c2b2d61f79e537896f7521279b478 100644
|
||||
index 2b6c9dbbbf97386cd9d9b37254640b8585092140..cef40ca8f3c7da1ac16dc11c3643899f2fe45098 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1845,7 +1845,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1844,7 +1844,7 @@ public final class CraftServer implements Server {
|
||||
offers = tabCompleteChat(player, message);
|
||||
}
|
||||
|
||||
|
@ -8,10 +8,10 @@ Plugins can cancel this if they want to ensure experience orbs do not lose impor
|
||||
metadata such as spawn reason, or conditionally move data from source to target.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 56730babb7eb42625155361d47070d4e46bab9d0..7805ba48a33b12fb7094cd88972f422b14549c8f 100644
|
||||
index efe3133a8c5a034c5e168e33880a756161b9adb4..e98655a48d3c1edcac0c6f6facd3967018e21e5f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -593,7 +593,7 @@ public class CraftEventFactory {
|
||||
@@ -587,7 +587,7 @@ public class CraftEventFactory {
|
||||
if (e instanceof EntityExperienceOrb) {
|
||||
EntityExperienceOrb loopItem = (EntityExperienceOrb) e;
|
||||
// Paper start
|
||||
|
@ -9,10 +9,10 @@ from triggering monster spawns on a server.
|
||||
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
|
||||
index dd78f093f6ee9822c4a31d87f3c83d2f8fa4fcf8..b6ec5d0f281bac483f210fd8c45a8965cd97cc02 100644
|
||||
index a066026bce318683dcc022920dad39d7ec25e485..8017953af1df6c046a47ebe655e5d1afa68d50f8 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -581,6 +581,15 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -589,6 +589,15 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
this.world.getMethodProfiler().exit();
|
||||
//List<PlayerChunk> list = Lists.newArrayList(this.playerChunkMap.f()); // Paper
|
||||
//Collections.shuffle(list); // Paper
|
||||
|
@ -9,10 +9,10 @@ In Offline Mode, will return an Offline UUID
|
||||
This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 441547cdae0c2b2d61f79e537896f7521279b478..272c27a7a63b7c01ad9c5ecfdba0a36ca18ad5d6 100644
|
||||
index cef40ca8f3c7da1ac16dc11c3643899f2fe45098..ece800d6f7d156be97e3069f76df5d667b9ce94d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1512,6 +1512,26 @@ public final class CraftServer implements Server {
|
||||
@@ -1511,6 +1511,26 @@ public final class CraftServer implements Server {
|
||||
return recipients.size();
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add method to open already placed sign
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index b1f837fcbaa2ab9d83bb8f17b24dd45fdc3b14e4..fb26a4f2953007b7fa503b654a99ca203ccc8caf 100644
|
||||
index f209e6d8fa20ceb7db71a6bb1685fd79b13f0738..d53cbcb6bba9d2526dbecb118735443c839c67d2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
@@ -604,6 +604,17 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
@@ -603,6 +603,17 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ Adds an option to control the force mode of the particle.
|
||||
This adds a new Builder API which is much friendlier to use.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index e23a5f446a1e357493f5232c39baa45f7386a637..a1491094b58cf814d7b05d6c0ce4067bf34dae1a 100644
|
||||
index 885bf43a591492f19bd5a421ea4271854ae8f192..d192e341f0f6a3d03329dab16de3b19962091d2a 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -61,7 +61,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@ -22,7 +22,7 @@ index e23a5f446a1e357493f5232c39baa45f7386a637..a1491094b58cf814d7b05d6c0ce4067b
|
||||
public final ChunkProviderServer chunkProvider; // Paper - public
|
||||
boolean tickingEntities;
|
||||
private final MinecraftServer server;
|
||||
@@ -1357,12 +1357,17 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -1368,12 +1368,17 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
}
|
||||
|
||||
public <T extends ParticleParam> int sendParticles(EntityPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) {
|
||||
@ -43,10 +43,10 @@ index e23a5f446a1e357493f5232c39baa45f7386a637..a1491094b58cf814d7b05d6c0ce4067b
|
||||
|
||||
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
|
||||
index 85562d2cafab6f81705b70ac1f965ccfb38abdf5..a13b2b549dc272ca37ef710c259407679fa2c00d 100644
|
||||
index 5bf5a815653b0556d9d2bcaf5f69026b77bd28a6..94fd77595a6bf2ee8deace75e243e5ce4286d82d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -2334,11 +2334,17 @@ public class CraftWorld implements World {
|
||||
@@ -2339,11 +2339,17 @@ public class CraftWorld implements World {
|
||||
|
||||
@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) {
|
||||
|
@ -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.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index a13b2b549dc272ca37ef710c259407679fa2c00d..77845ad43ea5950f0c9acb19ca844c0d90d44703 100644
|
||||
index 94fd77595a6bf2ee8deace75e243e5ce4286d82d..3518505236e1b5c7267bc65756acd60f34873cfc 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1502,6 +1502,10 @@ public class CraftWorld implements World {
|
||||
@@ -1507,6 +1507,10 @@ public class CraftWorld implements World {
|
||||
if (Boat.class.isAssignableFrom(clazz)) {
|
||||
entity = new EntityBoat(world, x, y, z);
|
||||
entity.setPositionRotation(x, y, z, yaw, pitch);
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Expand Explosions API
|
||||
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
|
||||
index 77845ad43ea5950f0c9acb19ca844c0d90d44703..0471ac6cf1043f4a344b871aa85dcda4f04a5b5c 100644
|
||||
index 3518505236e1b5c7267bc65756acd60f34873cfc..5059ae88375ca9077f02fa521b9ff35018584417 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -877,6 +877,11 @@ public class CraftWorld implements World {
|
||||
@@ -882,6 +882,11 @@ public class CraftWorld implements World {
|
||||
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;
|
||||
}
|
||||
|
@ -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
|
||||
index 0471ac6cf1043f4a344b871aa85dcda4f04a5b5c..cd0a59c3c88a0d7aa4d79acb473ad5da1c465072 100644
|
||||
index 5059ae88375ca9077f02fa521b9ff35018584417..6c58b404807c109bacdf6f3d35fbb05329ea8465 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1291,6 +1291,15 @@ public class CraftWorld implements World {
|
||||
@@ -1296,6 +1296,15 @@ public class CraftWorld implements World {
|
||||
return list;
|
||||
}
|
||||
|
||||
|
@ -130,7 +130,7 @@ index d574bc5755b3075aa8d4a566262ee391b463be19..6c652849a24787a74e7eed16cb30d77e
|
||||
|
||||
PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW));
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index a1491094b58cf814d7b05d6c0ce4067bf34dae1a..a0d1e9f7535db896c0589dc02cb03bda23086167 100644
|
||||
index d192e341f0f6a3d03329dab16de3b19962091d2a..1a2760552cd42b302d4604917daf1fcd23765e59 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1014,7 +1014,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@ -152,10 +152,10 @@ index a1491094b58cf814d7b05d6c0ce4067bf34dae1a..a0d1e9f7535db896c0589dc02cb03bda
|
||||
}
|
||||
// Spigot End
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index fb26a4f2953007b7fa503b654a99ca203ccc8caf..38c0d54fcb084bb102ee004cc8987c8358b5a2ac 100644
|
||||
index d53cbcb6bba9d2526dbecb118735443c839c67d2..7b6ae7ef90c3df27a6ae43bc393b2d1d9a866143 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
@@ -373,7 +373,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
@@ -372,7 +372,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
if (((EntityPlayer) getHandle()).playerConnection == null) return;
|
||||
if (getHandle().activeContainer != getHandle().defaultContainer) {
|
||||
// fire INVENTORY_CLOSE if one already open
|
||||
@ -164,7 +164,7 @@ index fb26a4f2953007b7fa503b654a99ca203ccc8caf..38c0d54fcb084bb102ee004cc8987c83
|
||||
}
|
||||
EntityPlayer player = (EntityPlayer) getHandle();
|
||||
Container container;
|
||||
@@ -443,8 +443,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
@@ -442,8 +442,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
|
||||
@Override
|
||||
public void closeInventory() {
|
||||
@ -193,10 +193,10 @@ index 03b4d9f0a396ef8016e8f5a8be7198843bf0b8dd..6ecbeffc83cef741c9a4ab1d8de1d536
|
||||
|
||||
// Check if the fromWorld and toWorld are the same.
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 7805ba48a33b12fb7094cd88972f422b14549c8f..229d1df5b10b0823e41b1f32d1bb4770592f81cc 100644
|
||||
index e98655a48d3c1edcac0c6f6facd3967018e21e5f..cf364cd080978602f4782e13bc31420d97a4f1a3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1171,7 +1171,7 @@ public class CraftEventFactory {
|
||||
@@ -1165,7 +1165,7 @@ public class CraftEventFactory {
|
||||
|
||||
public static Container callInventoryOpenEvent(EntityPlayer player, Container container, boolean cancelled) {
|
||||
if (player.activeContainer != player.defaultContainer) { // fire INVENTORY_CLOSE if one already open
|
||||
@ -205,7 +205,7 @@ index 7805ba48a33b12fb7094cd88972f422b14549c8f..229d1df5b10b0823e41b1f32d1bb4770
|
||||
}
|
||||
|
||||
CraftServer server = player.world.getServer();
|
||||
@@ -1336,8 +1336,18 @@ public class CraftEventFactory {
|
||||
@@ -1330,8 +1330,18 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
||||
|
@ -31,10 +31,10 @@ index e17637cfee773b1b79c05d7a8e6558963c7a9c14..9a3183e55fcb6809d2b324ad52e27f3e
|
||||
|
||||
for (int i = 0; i < list.size(); ++i) {
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 3bad056cf3c9a4322dbbf3486ea4510117a8d95b..7b2df7f3538f7ee696db08f7d8be74f258ff1996 100644
|
||||
index cb1330ef117224aea07208cebff544c714ae313a..51c57f4752ea49859b9e00045a40899783731f28 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -802,6 +802,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@@ -801,6 +801,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
// Paper end
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ index e0ae51ede44de5c894df526c1fc6d94c46d72013..8bcca73ae48ee822d32a6d23be2e1056
|
||||
return this.getBlock().c(this.p(), iblockaccess, blockposition, voxelshapecollision);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 64a739d0660098b840e2369f150670691eb9c441..91b450da31b972e2251382cd068a818a6bd70c1e 100644
|
||||
index be5ad564964f26c90440bb30464edbf9882ff1e1..c7c8dd944c084c281568cb6444c8bda35b35a4df 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -98,7 +98,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@ -96,7 +96,7 @@ index ed0f9c5d29c4f88b7beee4b0ecdd7a56de2d7a9e..881cea7c466f29ff4a89db28d104e850
|
||||
if (operatorboolean.apply(false, false)) {
|
||||
throw (IllegalArgumentException) SystemUtils.c((Throwable) (new IllegalArgumentException()));
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 7b2df7f3538f7ee696db08f7d8be74f258ff1996..20a13b80e5df99c549b55d3cbddbe13f730f7cdf 100644
|
||||
index 51c57f4752ea49859b9e00045a40899783731f28..26669ded3ec47d13e4e79d65d0f05a588f9e1f63 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -178,6 +178,46 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@ -147,10 +147,10 @@ index 7b2df7f3538f7ee696db08f7d8be74f258ff1996..20a13b80e5df99c549b55d3cbddbe13f
|
||||
public boolean s_() {
|
||||
return this.isClientSide;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 229d1df5b10b0823e41b1f32d1bb4770592f81cc..e762a20c92a990ecc08e8bd4fe65b80b5913587e 100644
|
||||
index cf364cd080978602f4782e13bc31420d97a4f1a3..0d0140c1b132a4c569e34781264cdea8b6d555b2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1207,6 +1207,14 @@ public class CraftEventFactory {
|
||||
@@ -1201,6 +1201,14 @@ public class CraftEventFactory {
|
||||
Projectile projectile = (Projectile) entity.getBukkitEntity();
|
||||
org.bukkit.entity.Entity collided = position.getEntity().getBukkitEntity();
|
||||
com.destroystokyo.paper.event.entity.ProjectileCollideEvent event = new com.destroystokyo.paper.event.entity.ProjectileCollideEvent(projectile, collided);
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Mark chunk dirty anytime entities change to guarantee it
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 8dd560c8207f14123ab9c9820d8ce7333775db35..90b2a891c5bfa26ab1ff6738f58719a10d5cbed6 100644
|
||||
index 380690cdb1052b12d0574c111c2162bd7ed8ecca..84ad87f4a1ab9c136e00f4c9f029853d82f57247 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -523,6 +523,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -524,6 +524,7 @@ public class Chunk implements IChunkAccess {
|
||||
entity.chunkZ = this.loc.z;
|
||||
this.entities.add(entity); // Paper - per chunk entity list
|
||||
this.entitySlices[k].add(entity);
|
||||
@ -17,7 +17,7 @@ index 8dd560c8207f14123ab9c9820d8ce7333775db35..90b2a891c5bfa26ab1ff6738f58719a1
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -550,6 +551,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -552,6 +553,7 @@ public class Chunk implements IChunkAccess {
|
||||
return;
|
||||
}
|
||||
entityCounts.decrement(entity.getMinecraftKeyString());
|
||||
|
@ -9,10 +9,10 @@ This should hopefully avoid duplicate entities ever being created
|
||||
if the entity was to end up in 2 different chunk slices
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 90b2a891c5bfa26ab1ff6738f58719a10d5cbed6..8b9454fd44fe1d14eb6d46f772be56937c99595a 100644
|
||||
index 84ad87f4a1ab9c136e00f4c9f029853d82f57247..e829f62397d092fa919d387b157a65b0c627e2e2 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -514,6 +514,25 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -515,6 +515,25 @@ public class Chunk implements IChunkAccess {
|
||||
if (k >= this.entitySlices.length) {
|
||||
k = this.entitySlices.length - 1;
|
||||
}
|
||||
@ -38,7 +38,7 @@ index 90b2a891c5bfa26ab1ff6738f58719a10d5cbed6..8b9454fd44fe1d14eb6d46f772be5693
|
||||
|
||||
if (!entity.inChunk || entity.getCurrentChunk() != this) entityCounts.increment(entity.getMinecraftKeyString()); // Paper
|
||||
entity.inChunk = true;
|
||||
@@ -523,6 +542,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -524,6 +543,7 @@ public class Chunk implements IChunkAccess {
|
||||
entity.chunkZ = this.loc.z;
|
||||
this.entities.add(entity); // Paper - per chunk entity list
|
||||
this.entitySlices[k].add(entity);
|
||||
@ -46,7 +46,7 @@ index 90b2a891c5bfa26ab1ff6738f58719a10d5cbed6..8b9454fd44fe1d14eb6d46f772be5693
|
||||
this.markDirty(); // Paper
|
||||
}
|
||||
|
||||
@@ -547,6 +567,10 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -549,6 +569,10 @@ public class Chunk implements IChunkAccess {
|
||||
|
||||
// Paper start
|
||||
if (entity.currentChunk != null && entity.currentChunk.get() == this) entity.setCurrentChunk(null);
|
||||
@ -58,7 +58,7 @@ index 90b2a891c5bfa26ab1ff6738f58719a10d5cbed6..8b9454fd44fe1d14eb6d46f772be5693
|
||||
return;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 91b450da31b972e2251382cd068a818a6bd70c1e..a331a62be48c3d9f5247817dfeeaba923aed5f57 100644
|
||||
index c7c8dd944c084c281568cb6444c8bda35b35a4df..da195d9bb6995fcbe569ca2e2b08c473431376a6 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -71,6 +71,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
|
@ -23,10 +23,10 @@ index 9cb2f3b31921870ddba044840e99eb04babe26bb..f0a836db74ad3e20778d3863223bc9a3
|
||||
MutablePair<Integer, Map<ChunkCoordIntPair, Integer>> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap()));
|
||||
ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.chunkX, e.chunkZ);
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 8b9454fd44fe1d14eb6d46f772be56937c99595a..a35cd4df85f0043b83f2f70cec6091d6bae89767 100644
|
||||
index e829f62397d092fa919d387b157a65b0c627e2e2..3cb1ee261724e34a23c4a0f98673da1597786a01 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -823,6 +823,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -825,6 +825,7 @@ public class Chunk implements IChunkAccess {
|
||||
|
||||
for (int i1 = 0; i1 < l; ++i1) {
|
||||
Entity entity1 = (Entity) list1.get(i1);
|
||||
@ -34,7 +34,7 @@ index 8b9454fd44fe1d14eb6d46f772be56937c99595a..a35cd4df85f0043b83f2f70cec6091d6
|
||||
|
||||
if (entity1.getBoundingBox().c(axisalignedbb) && entity1 != entity) {
|
||||
if (predicate == null || predicate.test(entity1)) {
|
||||
@@ -860,6 +861,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -862,6 +863,7 @@ public class Chunk implements IChunkAccess {
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
T entity = (T) iterator.next(); // CraftBukkit - decompile error
|
||||
@ -42,7 +42,7 @@ index 8b9454fd44fe1d14eb6d46f772be56937c99595a..a35cd4df85f0043b83f2f70cec6091d6
|
||||
|
||||
if ((entitytypes == null || entity.getEntityType() == entitytypes) && entity.getBoundingBox().c(axisalignedbb) && predicate.test(entity)) {
|
||||
list.add(entity);
|
||||
@@ -882,6 +884,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -884,6 +886,7 @@ public class Chunk implements IChunkAccess {
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
T t0 = (T) iterator.next(); // CraftBukkit - decompile error
|
||||
@ -51,7 +51,7 @@ index 8b9454fd44fe1d14eb6d46f772be56937c99595a..a35cd4df85f0043b83f2f70cec6091d6
|
||||
if (oclass.isInstance(t0) && t0.getBoundingBox().c(axisalignedbb) && (predicate == null || predicate.test(t0))) { // Spigot - instance check
|
||||
list.add(t0);
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index a331a62be48c3d9f5247817dfeeaba923aed5f57..769fada8ffa657493e5d7bf025281ff5f9f4299f 100644
|
||||
index da195d9bb6995fcbe569ca2e2b08c473431376a6..49c7b40744adcd36e5ae1eef026679e9b646feac 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -190,6 +190,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@ -63,7 +63,7 @@ index a331a62be48c3d9f5247817dfeeaba923aed5f57..769fada8ffa657493e5d7bf025281ff5
|
||||
public float getBukkitYaw() {
|
||||
return this.yaw;
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index d6c319c1177e43eebeb7d9f366da3495b38b6b97..1cbb1c3ddf45cd6d650ca274af4545f2d1c8a813 100644
|
||||
index f649b6cc5840a79c80217427abdadd889bf2738c..e26b1362899a9fad5e0e3a4e49acd98b67a4f03b 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1198,6 +1198,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@ -83,10 +83,10 @@ index d6c319c1177e43eebeb7d9f366da3495b38b6b97..1cbb1c3ddf45cd6d650ca274af4545f2
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index cd0a59c3c88a0d7aa4d79acb473ad5da1c465072..9e9b9b9f81f1e4340b98724ca50fb03f699a03cb 100644
|
||||
index 6c58b404807c109bacdf6f3d35fbb05329ea8465..47d407af1a770404284c591978978b229cbf7541 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1027,6 +1027,7 @@ public class CraftWorld implements World {
|
||||
@@ -1032,6 +1032,7 @@ public class CraftWorld implements World {
|
||||
for (Object o : world.entitiesById.values()) {
|
||||
if (o instanceof net.minecraft.server.Entity) {
|
||||
net.minecraft.server.Entity mcEnt = (net.minecraft.server.Entity) o;
|
||||
@ -94,7 +94,7 @@ index cd0a59c3c88a0d7aa4d79acb473ad5da1c465072..9e9b9b9f81f1e4340b98724ca50fb03f
|
||||
Entity bukkitEntity = mcEnt.getBukkitEntity();
|
||||
|
||||
// Assuming that bukkitEntity isn't null
|
||||
@@ -1046,6 +1047,7 @@ public class CraftWorld implements World {
|
||||
@@ -1051,6 +1052,7 @@ public class CraftWorld implements World {
|
||||
for (Object o : world.entitiesById.values()) {
|
||||
if (o instanceof net.minecraft.server.Entity) {
|
||||
net.minecraft.server.Entity mcEnt = (net.minecraft.server.Entity) o;
|
||||
@ -102,7 +102,7 @@ index cd0a59c3c88a0d7aa4d79acb473ad5da1c465072..9e9b9b9f81f1e4340b98724ca50fb03f
|
||||
Entity bukkitEntity = mcEnt.getBukkitEntity();
|
||||
|
||||
// Assuming that bukkitEntity isn't null
|
||||
@@ -1072,6 +1074,7 @@ public class CraftWorld implements World {
|
||||
@@ -1077,6 +1079,7 @@ public class CraftWorld implements World {
|
||||
|
||||
for (Object entity: world.entitiesById.values()) {
|
||||
if (entity instanceof net.minecraft.server.Entity) {
|
||||
@ -110,7 +110,7 @@ index cd0a59c3c88a0d7aa4d79acb473ad5da1c465072..9e9b9b9f81f1e4340b98724ca50fb03f
|
||||
Entity bukkitEntity = ((net.minecraft.server.Entity) entity).getBukkitEntity();
|
||||
|
||||
if (bukkitEntity == null) {
|
||||
@@ -1095,6 +1098,7 @@ public class CraftWorld implements World {
|
||||
@@ -1100,6 +1103,7 @@ public class CraftWorld implements World {
|
||||
|
||||
for (Object entity: world.entitiesById.values()) {
|
||||
if (entity instanceof net.minecraft.server.Entity) {
|
||||
|
@ -73,7 +73,7 @@ index 48958308a89cbe39e1b4dddcdd8d1d0b5ece6339..120bf8436fd82294c339add2e7bff1cd
|
||||
int i = blockposition.getX();
|
||||
int j = blockposition.getY();
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 20a13b80e5df99c549b55d3cbddbe13f730f7cdf..ec77151d0dde422024ae5226ad7e3fb18c08f7c0 100644
|
||||
index 26669ded3ec47d13e4e79d65d0f05a588f9e1f63..d6bce67fff263d2c04be29020a8dc66fa260a53e 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -218,6 +218,17 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@ -95,10 +95,10 @@ index 20a13b80e5df99c549b55d3cbddbe13f730f7cdf..ec77151d0dde422024ae5226ad7e3fb1
|
||||
public boolean s_() {
|
||||
return this.isClientSide;
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 1cbb1c3ddf45cd6d650ca274af4545f2d1c8a813..f047f07e768b77feb469c69166f36a3f6779f561 100644
|
||||
index e26b1362899a9fad5e0e3a4e49acd98b67a4f03b..f9d2228fb0543c60d2e0848afb4f927b6a7bce51 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1536,15 +1536,17 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -1547,15 +1547,17 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
this.getMinecraftServer().getPlayerList().sendAll(new PacketPlayOutSpawnPosition(blockposition, f));
|
||||
}
|
||||
|
||||
@ -126,10 +126,10 @@ index 1cbb1c3ddf45cd6d650ca274af4545f2d1c8a813..f047f07e768b77feb469c69166f36a3f
|
||||
public float v() {
|
||||
return this.worldData.d();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index e762a20c92a990ecc08e8bd4fe65b80b5913587e..42ffb557ac121ebf9404c02696231ef4e7117c92 100644
|
||||
index 0d0140c1b132a4c569e34781264cdea8b6d555b2..10e967e15048d4040005a6b6b31cc27c0397e1b9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -232,7 +232,7 @@ public class CraftEventFactory {
|
||||
@@ -226,7 +226,7 @@ public class CraftEventFactory {
|
||||
public static Entity entityDamage; // For use in EntityDamageByEntityEvent
|
||||
|
||||
// helper methods
|
||||
@ -138,7 +138,7 @@ index e762a20c92a990ecc08e8bd4fe65b80b5913587e..42ffb557ac121ebf9404c02696231ef4
|
||||
int spawnSize = Bukkit.getServer().getSpawnRadius();
|
||||
|
||||
if (world.getDimensionKey() != World.OVERWORLD) return true;
|
||||
@@ -411,6 +411,20 @@ public class CraftEventFactory {
|
||||
@@ -405,6 +405,20 @@ public class CraftEventFactory {
|
||||
}
|
||||
|
||||
private static PlayerEvent getPlayerBucketEvent(boolean isFilling, WorldServer world, EntityHuman who, BlockPosition changed, BlockPosition clicked, EnumDirection clickedFace, ItemStack itemstack, net.minecraft.server.Item item) {
|
||||
@ -159,7 +159,7 @@ index e762a20c92a990ecc08e8bd4fe65b80b5913587e..42ffb557ac121ebf9404c02696231ef4
|
||||
Player player = (Player) who.getBukkitEntity();
|
||||
CraftItemStack itemInHand = CraftItemStack.asNewCraftStack(item);
|
||||
Material bucket = CraftMagicNumbers.getMaterial(itemstack.getItem());
|
||||
@@ -423,10 +437,10 @@ public class CraftEventFactory {
|
||||
@@ -417,10 +431,10 @@ public class CraftEventFactory {
|
||||
|
||||
PlayerEvent event;
|
||||
if (isFilling) {
|
||||
|
@ -48,10 +48,10 @@ index 88b45c8b4f58ee83d625408eae08aa329c87a6d4..d6d93c76f047573b3e7ea91409fb85e0
|
||||
long start = System.nanoTime(), curTime, tickSection = start; // Paper - Further improve server tick loop
|
||||
lastTick = start - TICK_TIME; // Paper
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 272c27a7a63b7c01ad9c5ecfdba0a36ca18ad5d6..cb73b10ca46b6bb2080f4c76f48a2b9789408dc4 100644
|
||||
index ece800d6f7d156be97e3069f76df5d667b9ce94d..760c5d3b1e9aba0946937f7a9263dbd0c4e295a7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -814,6 +814,7 @@ public final class CraftServer implements Server {
|
||||
@@ -813,6 +813,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
@Override
|
||||
public void reload() {
|
||||
@ -59,7 +59,7 @@ index 272c27a7a63b7c01ad9c5ecfdba0a36ca18ad5d6..cb73b10ca46b6bb2080f4c76f48a2b97
|
||||
reloadCount++;
|
||||
configuration = YamlConfiguration.loadConfiguration(getConfigFile());
|
||||
commandsConfiguration = YamlConfiguration.loadConfiguration(getCommandsConfigFile());
|
||||
@@ -932,6 +933,7 @@ public final class CraftServer implements Server {
|
||||
@@ -931,6 +932,7 @@ public final class CraftServer implements Server {
|
||||
enablePlugins(PluginLoadOrder.STARTUP);
|
||||
enablePlugins(PluginLoadOrder.POSTWORLD);
|
||||
getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.RELOAD));
|
||||
|
@ -27,7 +27,7 @@ index 0790d45e3c8ac68c280b9378d93061b48b045639..a8054a599e3eb502e7bbce903b568398
|
||||
int i = this.f ? 300 : 100;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 769fada8ffa657493e5d7bf025281ff5f9f4299f..c9f4dab524e8f2a80b9e3ee178c36b2e394b5f84 100644
|
||||
index 49c7b40744adcd36e5ae1eef026679e9b646feac..9b55635d97f8ad90f13fdf609471c1f73eb40aed 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -1452,6 +1452,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@ -346,10 +346,10 @@ index 17ca2f9fbd9f43a9b39637d81e26c92ec00ed4d2..bb88a4a035dc7f56c9b0e81e5c613235
|
||||
|
||||
public void injectScaledMaxHealth(Collection<AttributeModifiable> collection, boolean force) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 42ffb557ac121ebf9404c02696231ef4e7117c92..3719bf85502f8b0a44ea2044163df84f4273cbc2 100644
|
||||
index 10e967e15048d4040005a6b6b31cc27c0397e1b9..126f403c18b0ee4af727f325fae307086f289ced 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -789,9 +789,16 @@ public class CraftEventFactory {
|
||||
@@ -783,9 +783,16 @@ public class CraftEventFactory {
|
||||
public static EntityDeathEvent callEntityDeathEvent(EntityLiving victim, List<org.bukkit.inventory.ItemStack> drops) {
|
||||
CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity();
|
||||
EntityDeathEvent event = new EntityDeathEvent(entity, drops, victim.getExpReward());
|
||||
@ -366,7 +366,7 @@ index 42ffb557ac121ebf9404c02696231ef4e7117c92..3719bf85502f8b0a44ea2044163df84f
|
||||
victim.expToDrop = event.getDroppedExp();
|
||||
|
||||
for (org.bukkit.inventory.ItemStack stack : event.getDrops()) {
|
||||
@@ -807,8 +814,15 @@ public class CraftEventFactory {
|
||||
@@ -801,8 +808,15 @@ public class CraftEventFactory {
|
||||
CraftPlayer entity = victim.getBukkitEntity();
|
||||
PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage);
|
||||
event.setKeepInventory(keepInventory);
|
||||
@ -382,7 +382,7 @@ index 42ffb557ac121ebf9404c02696231ef4e7117c92..3719bf85502f8b0a44ea2044163df84f
|
||||
|
||||
victim.keepLevel = event.getKeepLevel();
|
||||
victim.newLevel = event.getNewLevel();
|
||||
@@ -825,6 +839,31 @@ public class CraftEventFactory {
|
||||
@@ -819,6 +833,31 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ index fbecc8ccab47b428c43530ad344e325538cf242d..800a8dd2543f0b83eec67e7805104274
|
||||
if (this.world.isDay() && !this.world.isClientSide) {
|
||||
float f = this.aR();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index ab05cc8e4188fcdfcd77ee6c1f217d0fa170c941..7e08032c968bb8405591082193b03badbe872436 100644
|
||||
index bc10ccd76fcf3f03c23f52064c4db17bcad1c574..46a7e7b2f6079df036d2b73c82d7bf5ea1b07871 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -858,6 +858,13 @@ public class CraftWorld implements World {
|
||||
@ -32,8 +32,8 @@ index ab05cc8e4188fcdfcd77ee6c1f217d0fa170c941..7e08032c968bb8405591082193b03bad
|
||||
+ // Paper end
|
||||
+
|
||||
@Override
|
||||
public boolean createExplosion(double x, double y, double z, float power) {
|
||||
return createExplosion(x, y, z, power, false, true);
|
||||
public long getGameTime() {
|
||||
return world.worldData.getTime();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||
index c89bc7024b650c3b6d2c551f0e4e156975570cca..eaad222fd38a4db4074db04c931bcff7a9ca5e24 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||
|
@ -273,10 +273,10 @@ index b52e8b72eaee87e227b7cc2fd66101550262cb7e..990cfea6c2339cd3cf688e4645de76dc
|
||||
public void a(PacketDataSerializer packetdataserializer) throws IOException {
|
||||
this.a = packetdataserializer.i();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index cb73b10ca46b6bb2080f4c76f48a2b9789408dc4..1babfde50eee8d90cab8d8d0445d5dae7f5965bf 100644
|
||||
index 760c5d3b1e9aba0946937f7a9263dbd0c4e295a7..0463e546fba266df3984022e3e1122750fc9bb06 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -686,7 +686,7 @@ public final class CraftServer implements Server {
|
||||
@@ -685,7 +685,7 @@ public final class CraftServer implements Server {
|
||||
@Override
|
||||
public long getConnectionThrottle() {
|
||||
// Spigot Start - Automatically set connection throttle for bungee configurations
|
||||
|
@ -29,10 +29,10 @@ index e8bade581ed391b25c592dbafb3fb3ccf72be616..053ba1023b6d1393c0ade589ae53feb2
|
||||
Object val = config.get("settings.save-player-data");
|
||||
if (val instanceof Boolean) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 1babfde50eee8d90cab8d8d0445d5dae7f5965bf..53c26b5353e1114a63451af1a466978b094cf2dd 100644
|
||||
index 0463e546fba266df3984022e3e1122750fc9bb06..c9ce183a8acfda1c639e6d808e90936f5a8d35a8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2334,6 +2334,11 @@ public final class CraftServer implements Server {
|
||||
@@ -2335,6 +2335,11 @@ public final class CraftServer implements Server {
|
||||
return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions;
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add more Zombie API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
index d07847876e22971b4a90f67d8281bf08361424e0..8c4a27721b66800c2d9b7bc6c1878b73b76b0df1 100644
|
||||
index 422632c9050d0bcc5398ac5d4cf51801cea9cdda..9b1297e564738eb40e6e9329817d8ebab11dce40 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
@@ -33,6 +33,7 @@ public class EntityZombie extends EntityMonster {
|
||||
@ -29,7 +29,7 @@ index d07847876e22971b4a90f67d8281bf08361424e0..8c4a27721b66800c2d9b7bc6c1878b73
|
||||
public void startDrownedConversion(int i) {
|
||||
this.lastTick = MinecraftServer.currentTick; // CraftBukkit
|
||||
this.drownedConversionTime = i;
|
||||
@@ -226,9 +233,16 @@ public class EntityZombie extends EntityMonster {
|
||||
@@ -229,9 +236,16 @@ public class EntityZombie extends EntityMonster {
|
||||
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ index d07847876e22971b4a90f67d8281bf08361424e0..8c4a27721b66800c2d9b7bc6c1878b73
|
||||
|
||||
@Override
|
||||
public boolean damageEntity(DamageSource damagesource, float f) {
|
||||
@@ -349,6 +363,7 @@ public class EntityZombie extends EntityMonster {
|
||||
@@ -352,6 +366,7 @@ public class EntityZombie extends EntityMonster {
|
||||
nbttagcompound.setBoolean("CanBreakDoors", this.eU());
|
||||
nbttagcompound.setInt("InWaterTime", this.isInWater() ? this.bt : -1);
|
||||
nbttagcompound.setInt("DrownedConversionTime", this.isDrownConverting() ? this.drownedConversionTime : -1);
|
||||
@ -55,7 +55,7 @@ index d07847876e22971b4a90f67d8281bf08361424e0..8c4a27721b66800c2d9b7bc6c1878b73
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -360,7 +375,11 @@ public class EntityZombie extends EntityMonster {
|
||||
@@ -363,7 +378,11 @@ public class EntityZombie extends EntityMonster {
|
||||
if (nbttagcompound.hasKeyOfType("DrownedConversionTime", 99) && nbttagcompound.getInt("DrownedConversionTime") > -1) {
|
||||
this.startDrownedConversion(nbttagcompound.getInt("DrownedConversionTime"));
|
||||
}
|
||||
|
@ -10,10 +10,10 @@ Optimize to check if the captured list even has values in it, and also to
|
||||
just do a get call since the value can never be null.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 89bb995909882a4b35e2d07e5a47739c1d4f46f2..f96ddcba26155bf179489b9d856305b90d1ae014 100644
|
||||
index 6c0e179f4a6c14cf0cedc5a57e959d13a40ca42b..4c36abfa48b7f4fee2d118ff1d218f8ee5fbe007 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -909,12 +909,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@@ -908,12 +908,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
return null;
|
||||
} else {
|
||||
// CraftBukkit start
|
||||
|
@ -29,10 +29,10 @@ index c4f1fa6bd54a1928d163d83807f2823029db54e6..83a0dc052683ad2de6843d49d2e2a861
|
||||
|
||||
public boolean isDebugging() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 53c26b5353e1114a63451af1a466978b094cf2dd..1b420307af7c7c6764a93dd659d045f36e6ba3d9 100644
|
||||
index c9ce183a8acfda1c639e6d808e90936f5a8d35a8..f420f41742efbd4f7bf02067768178bd8288848f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1835,7 +1835,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1834,7 +1834,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
@Override
|
||||
public boolean isPrimaryThread() {
|
||||
|
@ -81,10 +81,10 @@ index fbf3ccfb347a5ba6e895339e9576629d940d1aa4..38d25a12c6a52d8a83214e2a0f43a218
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index a35cd4df85f0043b83f2f70cec6091d6bae89767..714ef2a305fe98895ab5eb9190826bafbb157f59 100644
|
||||
index 3cb1ee261724e34a23c4a0f98673da1597786a01..b258d4a85c41c2de55a28c565766f57c3f1604ff 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -503,6 +503,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -504,6 +504,7 @@ public class Chunk implements IChunkAccess {
|
||||
if (i != this.loc.x || j != this.loc.z) {
|
||||
Chunk.LOGGER.warn("Wrong location! ({}, {}) should be ({}, {}), {}", i, j, this.loc.x, this.loc.z, entity);
|
||||
entity.dead = true;
|
||||
@ -93,7 +93,7 @@ index a35cd4df85f0043b83f2f70cec6091d6bae89767..714ef2a305fe98895ab5eb9190826baf
|
||||
|
||||
int k = MathHelper.floor(entity.locY() / 16.0D);
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 3ba1ca223f689960c637245e1873a4aaa8672a22..e8e6e3ed5fa5aed6160e667142a244a39078c479 100644
|
||||
index 1dbeda9fb385be29b3bb20c33a0487334c6e7c16..595adbeb253529720e72f695667d5bf9584ebaf0 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -2711,6 +2711,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@ -197,7 +197,7 @@ index 4bbcd00950405a4bf3ce391b557049a3b1d4aee8..2db0f3e060850ae65033f878ed46b678
|
||||
ChunkCoordIntPair chunkcoordintpair = playerchunk.i();
|
||||
CompletableFuture<Either<List<IChunkAccess>, PlayerChunk.Failure>> completablefuture = this.a(chunkcoordintpair, 1, (i) -> {
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 58c00add7c64c425150342c3840aa533b605ca7b..33e30ed20c99ab237f86c9d8746041a5b046bd42 100644
|
||||
index 676d160fe5132177a7d91cbf514a386607826964..628d1a5555ec70571c0467900c884cc419cbab37 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -4,6 +4,8 @@ import com.google.common.annotations.VisibleForTesting;
|
||||
|
@ -117,10 +117,10 @@ index 3868572aed50c8bffd93727a139a3fbb8dc19688..ae77805f71c6c574d92f39c51b1e48f2
|
||||
@Override
|
||||
public void a(ChunkCoordIntPair chunkcoordintpair) {
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 33e30ed20c99ab237f86c9d8746041a5b046bd42..ffc048415e7321353644e3bb89cf89f9365f3644 100644
|
||||
index 628d1a5555ec70571c0467900c884cc419cbab37..3a95b98b77171b4b18a1d939eb14953d24b903e0 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1552,12 +1552,88 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -1563,12 +1563,88 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
return ((PersistentIdCounts) this.getMinecraftServer().E().getWorldPersistentData().a(PersistentIdCounts::new, "idcounts")).a();
|
||||
}
|
||||
|
||||
@ -213,10 +213,10 @@ index 33e30ed20c99ab237f86c9d8746041a5b046bd42..ffc048415e7321353644e3bb89cf89f9
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 91eaa1964666607ec628d857ae4be8f94d2f89aa..3c44de754e2ee4668060dbf6140db8a20cfaec42 100644
|
||||
index af411ac8fb378f7ead19b4f82f9709680e321dfd..d1fa8ebc9137e0d4917dc6b933b21588257d343e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1954,15 +1954,21 @@ public class CraftWorld implements World {
|
||||
@@ -1959,15 +1959,21 @@ public class CraftWorld implements World {
|
||||
|
||||
@Override
|
||||
public void setKeepSpawnInMemory(boolean keepLoaded) {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] ChunkMapDistance CME
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java
|
||||
index cf68c9105084d1823b5fc76b3f472a0f8ecd9568..d15bf949671c9a533573278d573376282bfed8c8 100644
|
||||
index 3d359b6dcea28135105cf0b9c06c65797cf537bf..706ef10959df897a4b1889c2e2e7ff41ed924876 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkMapDistance.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java
|
||||
@@ -33,7 +33,16 @@ public abstract class ChunkMapDistance {
|
||||
@ -60,7 +60,7 @@ index cf68c9105084d1823b5fc76b3f472a0f8ecd9568..d15bf949671c9a533573278d57337628
|
||||
return true;
|
||||
} else {
|
||||
if (!this.l.isEmpty()) {
|
||||
@@ -366,7 +363,7 @@ public abstract class ChunkMapDistance {
|
||||
@@ -367,7 +364,7 @@ public abstract class ChunkMapDistance {
|
||||
ObjectIterator objectiterator = this.a.long2ByteEntrySet().iterator();
|
||||
|
||||
while (objectiterator.hasNext()) {
|
||||
@ -70,7 +70,7 @@ index cf68c9105084d1823b5fc76b3f472a0f8ecd9568..d15bf949671c9a533573278d57337628
|
||||
long j = it_unimi_dsi_fastutil_longs_long2bytemap_entry.getLongKey();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
index 7b4717ffc31bc406c04d98207a15804502bd3579..f6b83ced48aa649bbd58a9b8a8dfe460b961bc22 100644
|
||||
index 985fc002fa5afc71ecd242aa8101684b2c751b30..eefd94ef237657625f2e7b19099d802e7680b50a 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
@@ -20,6 +20,7 @@ public class PlayerChunk {
|
||||
|
@ -8,7 +8,7 @@ This patch also adds a chunk status cache on region files (note that
|
||||
its only purpose is to cache the status on DISK)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index 534bcc215b0efb8561f7489f01fe49d34cba4c4f..c4909536af2af2949a6e7ee8f72f39a6622911f5 100644
|
||||
index af597b8b3157ac76456f8575a8f85a48fb0f45cd..d340990000144d9500069824e7e6609400a54ece 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -30,7 +30,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@ -20,7 +20,7 @@ index 534bcc215b0efb8561f7489f01fe49d34cba4c4f..c4909536af2af2949a6e7ee8f72f39a6
|
||||
public final PlayerChunkMap playerChunkMap;
|
||||
private final WorldPersistentData worldPersistentData;
|
||||
private long lastTickTime;
|
||||
@@ -287,6 +287,21 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -295,6 +295,21 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
|
||||
return ret;
|
||||
}
|
||||
@ -108,10 +108,10 @@ index 2fde0b6ca8f38a998ac73b68be61fbfea9088cee..fa03834dacacf7ae6a326c88007256a2
|
||||
@Nullable
|
||||
private PersistentStructureLegacy c;
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
index 2c73bc1151d5d87ce6eac3f778ebff9c555b0212..346bf40bbf3026d3bf5585f06f42eec6cae95704 100644
|
||||
index b7af53dbf3139d7d51069e11388b945785cb47f6..2d749c07b159604e1ab904e026adf326eb9a732e 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
@@ -113,6 +113,19 @@ public class PlayerChunk {
|
||||
@@ -117,6 +117,19 @@ public class PlayerChunk {
|
||||
Either<IChunkAccess, PlayerChunk.Failure> either = (Either<IChunkAccess, PlayerChunk.Failure>) statusFuture.getNow(null);
|
||||
return either == null ? null : (Chunk) either.left().orElse(null);
|
||||
}
|
||||
@ -277,7 +277,7 @@ index de926992e20da3ec433f9c7b4bc73805fd9d36ab..7a15944926427eb6cad976daabe5e710
|
||||
} catch (Throwable throwable1) {
|
||||
throwable = throwable1;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 3c44de754e2ee4668060dbf6140db8a20cfaec42..7603250799196c04c61e76418c747b8ac86a8bf7 100644
|
||||
index d1fa8ebc9137e0d4917dc6b933b21588257d343e..32c4b0089bc4ab1351e74e04b4e07c79beb9e328 100644
|
||||
--- a/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;
|
||||
|
@ -29,7 +29,7 @@ index ffe9b1a63d78925e1d77b9e730aef42fed6d58fa..1278d09f70c1e97607ef20d87a178dc2
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 714ef2a305fe98895ab5eb9190826bafbb157f59..6b561332e89476dbecc0b2a044e8556c7fa70626 100644
|
||||
index b258d4a85c41c2de55a28c565766f57c3f1604ff..fa549cd2ab9d0665dc042f3d4e79e205eaf4da54 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -43,7 +43,7 @@ public class Chunk implements IChunkAccess {
|
||||
@ -42,10 +42,10 @@ index 714ef2a305fe98895ab5eb9190826bafbb157f59..6b561332e89476dbecc0b2a044e8556c
|
||||
private long inhabitedTime;
|
||||
@Nullable
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index c4909536af2af2949a6e7ee8f72f39a6622911f5..bd48c23890c1b28e9838612598a5e4bdcb83e8a0 100644
|
||||
index d340990000144d9500069824e7e6609400a54ece..71c7bf2fd4fdb0ad880ca81c198a7cf25cdb9e87 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -527,6 +527,15 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -535,6 +535,15 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
} // Paper - Timings
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ index 816ab7ac0485f3eb80d461711800e84129f50d64..cb551b24a103ff81459483d610509488
|
||||
this.methodProfiler.enter("snooper");
|
||||
if (((DedicatedServer) this).getDedicatedServerProperties().snooperEnabled && !this.snooper.d() && this.ticks > 100) { // Spigot
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
index 346bf40bbf3026d3bf5585f06f42eec6cae95704..5d736e4ca6098d97b6c16d2452066fbd35fe123c 100644
|
||||
index 2d749c07b159604e1ab904e026adf326eb9a732e..ad01b9333e73c8e4a7c848edc4ce252a51ea52b6 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
@@ -42,6 +42,9 @@ public class PlayerChunk {
|
||||
@ -117,7 +117,7 @@ index 346bf40bbf3026d3bf5585f06f42eec6cae95704..5d736e4ca6098d97b6c16d2452066fbd
|
||||
public PlayerChunk(ChunkCoordIntPair chunkcoordintpair, int i, LightEngine lightengine, PlayerChunk.c playerchunk_c, PlayerChunk.d playerchunk_d) {
|
||||
this.statusFutures = new AtomicReferenceArray(PlayerChunk.CHUNK_STATUSES.size());
|
||||
this.fullChunkFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE;
|
||||
@@ -393,7 +396,19 @@ public class PlayerChunk {
|
||||
@@ -397,7 +400,19 @@ public class PlayerChunk {
|
||||
boolean flag2 = playerchunk_state.isAtLeast(PlayerChunk.State.BORDER);
|
||||
boolean flag3 = playerchunk_state1.isAtLeast(PlayerChunk.State.BORDER);
|
||||
|
||||
@ -137,7 +137,7 @@ index 346bf40bbf3026d3bf5585f06f42eec6cae95704..5d736e4ca6098d97b6c16d2452066fbd
|
||||
if (!flag2 && flag3) {
|
||||
// Paper start - cache ticking ready status
|
||||
int expectCreateCount = ++this.fullChunkCreateCount;
|
||||
@@ -513,8 +528,32 @@ public class PlayerChunk {
|
||||
@@ -517,8 +532,32 @@ public class PlayerChunk {
|
||||
}
|
||||
|
||||
public void m() {
|
||||
@ -265,7 +265,7 @@ index d8bedba819fa9ee0a4d3bdfbf0b010da7144dd68..c4ed4d58f7b344626acb13baeb142889
|
||||
return PlayerChunk.getChunkState(playerchunk.getTicketLevel());
|
||||
});
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index ffc048415e7321353644e3bb89cf89f9365f3644..d43fe3564be139a935303a62047a8d74fd3b8d1f 100644
|
||||
index 3a95b98b77171b4b18a1d939eb14953d24b903e0..3f97befa2742a575b103b68b19fc6415bfbd8c04 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -776,11 +776,43 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Mark entities as being ticked when notifying navigation
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index b3af14ed0364e1b2e68656884dff678309498f03..a468398008c176c67ead844e21b0dbf6cc4a9bf7 100644
|
||||
index 5ce589e38f924c1a60597589ea12d15dbc2a479c..6f9c3f913b2afbde3b5e285ffb9ee49017fa5464 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1364,6 +1364,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@ -16,7 +16,7 @@ index b3af14ed0364e1b2e68656884dff678309498f03..a468398008c176c67ead844e21b0dbf6
|
||||
Iterator iterator = this.navigators.iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -1374,6 +1375,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -1385,6 +1386,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@ And since minecart hoppers are used _very_ rarely near we can avoid alot of sear
|
||||
Combined, this adds up a lot.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 68a6e8e3425291eb28f1759ecdd54eb80612f3a4..08d122f7f20e3c2cdfeababb41b0a8910760b80b 100644
|
||||
index 6763ecaf5f814302c310f29e3a5a42fc1312a990..0601e9cdeb33dec82642ee9fbfaac1712bd0fae9 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -85,6 +85,10 @@ public class Chunk implements IChunkAccess {
|
||||
@ -28,7 +28,7 @@ index 68a6e8e3425291eb28f1759ecdd54eb80612f3a4..08d122f7f20e3c2cdfeababb41b0a891
|
||||
// Paper end
|
||||
|
||||
public Chunk(World world, ChunkCoordIntPair chunkcoordintpair, BiomeStorage biomestorage, ChunkConverter chunkconverter, TickList<Block> ticklist, TickList<FluidType> ticklist1, long i, @Nullable ChunkSection[] achunksection, @Nullable Consumer<Chunk> consumer) {
|
||||
@@ -543,6 +547,13 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -544,6 +548,13 @@ public class Chunk implements IChunkAccess {
|
||||
entity.chunkZ = this.loc.z;
|
||||
this.entities.add(entity); // Paper - per chunk entity list
|
||||
this.entitySlices[k].add(entity);
|
||||
@ -42,7 +42,7 @@ index 68a6e8e3425291eb28f1759ecdd54eb80612f3a4..08d122f7f20e3c2cdfeababb41b0a891
|
||||
entity.entitySlice = this.entitySlices[k]; // Paper
|
||||
this.markDirty(); // Paper
|
||||
}
|
||||
@@ -575,6 +586,11 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -577,6 +588,11 @@ public class Chunk implements IChunkAccess {
|
||||
if (!this.entitySlices[i].remove(entity)) {
|
||||
return;
|
||||
}
|
||||
@ -54,7 +54,7 @@ index 68a6e8e3425291eb28f1759ecdd54eb80612f3a4..08d122f7f20e3c2cdfeababb41b0a891
|
||||
entityCounts.decrement(entity.getMinecraftKeyString());
|
||||
this.markDirty(); // Paper
|
||||
// Paper end
|
||||
@@ -860,6 +876,14 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -862,6 +878,14 @@ public class Chunk implements IChunkAccess {
|
||||
for (int k = i; k <= j; ++k) {
|
||||
Iterator iterator = this.entitySlices[k].iterator(); // Spigot
|
||||
|
||||
@ -69,7 +69,7 @@ index 68a6e8e3425291eb28f1759ecdd54eb80612f3a4..08d122f7f20e3c2cdfeababb41b0a891
|
||||
while (iterator.hasNext()) {
|
||||
T entity = (T) iterator.next(); // CraftBukkit - decompile error
|
||||
if (entity.shouldBeRemoved) continue; // Paper
|
||||
@@ -880,9 +904,29 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -882,9 +906,29 @@ public class Chunk implements IChunkAccess {
|
||||
i = MathHelper.clamp(i, 0, this.entitySlices.length - 1);
|
||||
j = MathHelper.clamp(j, 0, this.entitySlices.length - 1);
|
||||
|
||||
|
@ -2308,10 +2308,10 @@ index 0000000000000000000000000000000000000000..49a594e5f345096cb3b9913b8ee27607
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index bd48c23890c1b28e9838612598a5e4bdcb83e8a0..77e17feb56cc28e763640b2e37f66788241e09b4 100644
|
||||
index 71c7bf2fd4fdb0ad880ca81c198a7cf25cdb9e87..03e59fd8dc339f3479243acb5d1c89883b280b68 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -302,11 +302,138 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -310,11 +310,138 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
return playerChunk.getAvailableChunkNow();
|
||||
|
||||
}
|
||||
@ -2450,7 +2450,7 @@ index bd48c23890c1b28e9838612598a5e4bdcb83e8a0..77e17feb56cc28e763640b2e37f66788
|
||||
if (Thread.currentThread() != this.serverThread) {
|
||||
return (IChunkAccess) CompletableFuture.supplyAsync(() -> {
|
||||
return this.getChunkAt(i, j, chunkstatus, flag);
|
||||
@@ -329,11 +456,16 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -337,11 +464,16 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
}
|
||||
|
||||
gameprofilerfiller.c("getChunkCacheMiss");
|
||||
@ -2468,7 +2468,7 @@ index bd48c23890c1b28e9838612598a5e4bdcb83e8a0..77e17feb56cc28e763640b2e37f66788
|
||||
this.world.timings.syncChunkLoad.stopTiming(); // Paper
|
||||
} // Paper
|
||||
ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> {
|
||||
@@ -399,6 +531,11 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -407,6 +539,11 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
}
|
||||
|
||||
private CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> getChunkFutureMainThread(int i, int j, ChunkStatus chunkstatus, boolean flag) {
|
||||
@ -2480,7 +2480,7 @@ index bd48c23890c1b28e9838612598a5e4bdcb83e8a0..77e17feb56cc28e763640b2e37f66788
|
||||
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i, j);
|
||||
long k = chunkcoordintpair.pair();
|
||||
int l = 33 + ChunkStatus.a(chunkstatus);
|
||||
@@ -798,11 +935,12 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -806,11 +943,12 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
protected boolean executeNext() {
|
||||
// CraftBukkit start - process pending Chunk loadCallback() and unloadCallback() after each run task
|
||||
try {
|
||||
@ -3010,10 +3010,10 @@ index 4c52c57c02571353f71772e3650932f314da62ca..71daa0cb08d69c16bded510d1a490534
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
index 5d736e4ca6098d97b6c16d2452066fbd35fe123c..a1341617ba5388d1d1f2c91ad158b0210b4505cb 100644
|
||||
index ad01b9333e73c8e4a7c848edc4ce252a51ea52b6..25f8febe63167349460e32c831088bb80b6b77ad 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
@@ -129,6 +129,18 @@ public class PlayerChunk {
|
||||
@@ -133,6 +133,18 @@ public class PlayerChunk {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -3032,7 +3032,7 @@ index 5d736e4ca6098d97b6c16d2452066fbd35fe123c..a1341617ba5388d1d1f2c91ad158b021
|
||||
// Paper end
|
||||
|
||||
public CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> getStatusFutureUnchecked(ChunkStatus chunkstatus) {
|
||||
@@ -347,7 +359,7 @@ public class PlayerChunk {
|
||||
@@ -351,7 +363,7 @@ public class PlayerChunk {
|
||||
ChunkStatus chunkstatus = getChunkStatus(this.oldTicketLevel);
|
||||
ChunkStatus chunkstatus1 = getChunkStatus(this.ticketLevel);
|
||||
boolean flag = this.oldTicketLevel <= PlayerChunkMap.GOLDEN_TICKET;
|
||||
@ -3041,7 +3041,7 @@ index 5d736e4ca6098d97b6c16d2452066fbd35fe123c..a1341617ba5388d1d1f2c91ad158b021
|
||||
PlayerChunk.State playerchunk_state = getChunkState(this.oldTicketLevel);
|
||||
PlayerChunk.State playerchunk_state1 = getChunkState(this.ticketLevel);
|
||||
// CraftBukkit start
|
||||
@@ -383,6 +395,12 @@ public class PlayerChunk {
|
||||
@@ -387,6 +399,12 @@ public class PlayerChunk {
|
||||
}
|
||||
});
|
||||
|
||||
@ -3910,7 +3910,7 @@ index d6aca683465c6898536507fab9e6888fef2e77e5..b926cebd053bef829517c9d9bbf1c609
|
||||
|
||||
HAS_SPACE(VillagePlaceRecord::d), IS_OCCUPIED(VillagePlaceRecord::e), ANY((villageplacerecord) -> {
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index a468398008c176c67ead844e21b0dbf6cc4a9bf7..f9d3e7a774f6621cb8608d3dfa8676c3d13a174f 100644
|
||||
index 6f9c3f913b2afbde3b5e285ffb9ee49017fa5464..85c9943a32f21e338daa295d5034af379edb8ddd 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -98,6 +98,79 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@ -4002,7 +4002,7 @@ index a468398008c176c67ead844e21b0dbf6cc4a9bf7..f9d3e7a774f6621cb8608d3dfa8676c3
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -1621,7 +1696,10 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -1632,7 +1707,10 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
}
|
||||
|
||||
MCUtil.getSpiralOutChunks(spawn, radiusInBlocks >> 4).forEach(pair -> {
|
||||
@ -4015,7 +4015,7 @@ index a468398008c176c67ead844e21b0dbf6cc4a9bf7..f9d3e7a774f6621cb8608d3dfa8676c3
|
||||
}
|
||||
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
|
||||
index 7603250799196c04c61e76418c747b8ac86a8bf7..fdef41cd64f18e145b042d887ea7d382283576fd 100644
|
||||
index 32c4b0089bc4ab1351e74e04b4e07c79beb9e328..83d1c748c0dd3004c4a479ca58f634d6a9b6faf4 100644
|
||||
--- a/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.IBlockData;
|
||||
@ -4058,7 +4058,7 @@ index 7603250799196c04c61e76418c747b8ac86a8bf7..fdef41cd64f18e145b042d887ea7d382
|
||||
|
||||
// fall through to load
|
||||
// we do this so we do not re-read the chunk data on disk
|
||||
@@ -2484,6 +2486,34 @@ public class CraftWorld implements World {
|
||||
@@ -2489,6 +2491,34 @@ public class CraftWorld implements World {
|
||||
public DragonBattle getEnderDragonBattle() {
|
||||
return (getHandle().getDragonBattle() == null) ? null : new CraftDragonBattle(getHandle().getDragonBattle());
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ index ba1046999ec48ed49de52be4d7b6d9893033a8d5..71b92f99f0148849acc733005aa90234
|
||||
return;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 5bb9cd2a9b00e908af700fa44944b2dd218b9653..e2ae32a2bbb02c81ba7bb8c2f75a51f4f61eb218 100644
|
||||
index 16bc226dfef36b5f96d95f2de4c6bc2e6e606332..c922f4d5c3a5e7af7237361cb95a5ba8bb3ce715 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -104,6 +104,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@ -38,7 +38,7 @@ index 5bb9cd2a9b00e908af700fa44944b2dd218b9653..e2ae32a2bbb02c81ba7bb8c2f75a51f4
|
||||
public ResourceKey<DimensionManager> getTypeKey() {
|
||||
return typeKey;
|
||||
}
|
||||
@@ -1003,14 +1010,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@@ -1002,14 +1009,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
}
|
||||
|
||||
public boolean p(BlockPosition blockposition) {
|
||||
@ -55,7 +55,7 @@ index 5bb9cd2a9b00e908af700fa44944b2dd218b9653..e2ae32a2bbb02c81ba7bb8c2f75a51f4
|
||||
|
||||
return ichunkaccess == null ? false : ichunkaccess.getType(blockposition).a((IBlockAccess) this, blockposition, entity, enumdirection);
|
||||
}
|
||||
@@ -1131,7 +1138,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@@ -1130,7 +1137,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
|
||||
for (int i1 = i; i1 < j; ++i1) {
|
||||
for (int j1 = k; j1 < l; ++j1) {
|
||||
@ -65,7 +65,7 @@ index 5bb9cd2a9b00e908af700fa44944b2dd218b9653..e2ae32a2bbb02c81ba7bb8c2f75a51f4
|
||||
if (chunk != null) {
|
||||
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
|
||||
index f9d3e7a774f6621cb8608d3dfa8676c3d13a174f..d3130ff85d90a8fb197c9917b66174389659e3bf 100644
|
||||
index 85c9943a32f21e338daa295d5034af379edb8ddd..f599d607afd73e30008e54757502077d783636a1 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -95,7 +95,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@ -78,10 +78,10 @@ index f9d3e7a774f6621cb8608d3dfa8676c3d13a174f..d3130ff85d90a8fb197c9917b6617438
|
||||
|
||||
// Paper start - Asynchronous IO
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
index 78f0fb5d97b077673ec542cd70bbc3ffa13f916c..b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77 100644
|
||||
index d44ef056bdab3bcff39aea45b40a4c7e9c62398f..797e579afdbc77a8dc5fc4cdf5874e546922fbfa 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -143,9 +143,10 @@ public class ActivationRange
|
||||
@@ -141,9 +141,10 @@ public class ActivationRange
|
||||
{
|
||||
for ( int j1 = k; j1 <= l; ++j1 )
|
||||
{
|
||||
|
@ -286,10 +286,10 @@ index 0000000000000000000000000000000000000000..1a68a8012f83bab9e814159c76b8c371
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index 77e17feb56cc28e763640b2e37f66788241e09b4..2eb38bfcdc0c232da9dad6921df503e5a11de09f 100644
|
||||
index 03e59fd8dc339f3479243acb5d1c89883b280b68..070c3a842ebd9fa03e5daaee8355775718df6fb2 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -463,6 +463,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -471,6 +471,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
this.world.asyncChunkTaskManager.raisePriority(x, z, com.destroystokyo.paper.io.PrioritizedTaskQueue.HIGHEST_PRIORITY);
|
||||
com.destroystokyo.paper.io.chunk.ChunkTaskManager.pushChunkWait(this.world, x, z);
|
||||
// Paper end
|
||||
@ -298,10 +298,10 @@ index 77e17feb56cc28e763640b2e37f66788241e09b4..2eb38bfcdc0c232da9dad6921df503e5
|
||||
this.serverThreadQueue.awaitTasks(completablefuture::isDone);
|
||||
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
|
||||
index e2ae32a2bbb02c81ba7bb8c2f75a51f4f61eb218..16e2f0e9580486337b8bc060d4b088bb1bf40581 100644
|
||||
index c922f4d5c3a5e7af7237361cb95a5ba8bb3ce715..dcca5257a03b6fe32ffcd6528e505762b7b4a3e7 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -1071,7 +1071,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@@ -1070,7 +1070,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
|
||||
for (int i1 = i; i1 <= j; ++i1) {
|
||||
for (int j1 = k; j1 <= l; ++j1) {
|
||||
@ -310,7 +310,7 @@ index e2ae32a2bbb02c81ba7bb8c2f75a51f4f61eb218..16e2f0e9580486337b8bc060d4b088bb
|
||||
|
||||
if (chunk != null) {
|
||||
chunk.a(entity, axisalignedbb, list, predicate);
|
||||
@@ -1092,7 +1092,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@@ -1091,7 +1091,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
|
||||
for (int i1 = i; i1 < j; ++i1) {
|
||||
for (int j1 = k; j1 < l; ++j1) {
|
||||
@ -319,7 +319,7 @@ index e2ae32a2bbb02c81ba7bb8c2f75a51f4f61eb218..16e2f0e9580486337b8bc060d4b088bb
|
||||
|
||||
if (chunk != null) {
|
||||
chunk.a(entitytypes, axisalignedbb, list, predicate);
|
||||
@@ -1115,7 +1115,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@@ -1114,7 +1114,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
|
||||
for (int i1 = i; i1 < j; ++i1) {
|
||||
for (int j1 = k; j1 < l; ++j1) {
|
||||
@ -329,7 +329,7 @@ index e2ae32a2bbb02c81ba7bb8c2f75a51f4f61eb218..16e2f0e9580486337b8bc060d4b088bb
|
||||
if (chunk != null) {
|
||||
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
|
||||
index d3130ff85d90a8fb197c9917b66174389659e3bf..0d8ef258422c0aaba31afbecf4bee6da7678259a 100644
|
||||
index f599d607afd73e30008e54757502077d783636a1..6646b8e83c8658fa6cd4838ccd669fd4a280e2e8 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -170,6 +170,12 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
|
@ -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
|
||||
index 2eb38bfcdc0c232da9dad6921df503e5a11de09f..2fad6a79ee977c2712c55433bde8eca524d09ba7 100644
|
||||
index 070c3a842ebd9fa03e5daaee8355775718df6fb2..1eb201695cd118616fb404a0c7ed8cedee77db89 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -736,7 +736,22 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -744,7 +744,22 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
this.world.getMethodProfiler().enter("naturalSpawnCount");
|
||||
this.world.timings.countNaturalMobs.startTiming(); // Paper - timings
|
||||
int l = this.chunkMapDistance.b();
|
||||
|
@ -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
|
||||
index fdef41cd64f18e145b042d887ea7d382283576fd..e612d6528e1e73e774c742e763cbd3e5c28b87db 100644
|
||||
index 83d1c748c0dd3004c4a479ca58f634d6a9b6faf4..6ddfeea46997907f1dd666000c7cc2eb27cd4398 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1875,7 +1875,12 @@ public class CraftWorld implements World {
|
||||
@@ -1880,7 +1880,12 @@ public class CraftWorld implements World {
|
||||
height = 9;
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose the internal current tick
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 1b420307af7c7c6764a93dd659d045f36e6ba3d9..e0f4dc286893fcb37b75e0982a3d2b0d57953943 100644
|
||||
index f420f41742efbd4f7bf02067768178bd8288848f..80e917d7154ed8cafd308440c66ae16fb782dd35 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2357,5 +2357,10 @@ public final class CraftServer implements Server {
|
||||
@@ -2358,5 +2358,10 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
return new com.destroystokyo.paper.profile.CraftPlayerProfile(uuid, name);
|
||||
}
|
||||
|
@ -485,10 +485,10 @@ index d9be182a574daaedcc7a106c759c2bde2e4eb19a..c6df2318762dc6542e73f18ed9a3172e
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 16e2f0e9580486337b8bc060d4b088bb1bf40581..2fa1cd43a8a7b083cd1522c32716d21dee922c46 100644
|
||||
index dcca5257a03b6fe32ffcd6528e505762b7b4a3e7..1dca840322990c996ed6eac49792529f60058a6f 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -1103,8 +1103,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@@ -1102,8 +1102,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
return list;
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ index a167696d2fc3cb69b9eaa720c5904762e073008b..74df45e6c3f86736f7d136cf6fd911d5
|
||||
if (j > i) {
|
||||
i = j;
|
||||
diff --git a/src/main/java/org/spigotmc/TrackingRange.java b/src/main/java/org/spigotmc/TrackingRange.java
|
||||
index 6f8e6c1d079f82d7706d0b4f710bfb9b50e209d9..03990231a8b6bc6925f054e9033825316abfafcc 100644
|
||||
index 646811932e9703510679080dd93586a3389aace9..03990231a8b6bc6925f054e9033825316abfafcc 100644
|
||||
--- a/src/main/java/org/spigotmc/TrackingRange.java
|
||||
+++ b/src/main/java/org/spigotmc/TrackingRange.java
|
||||
@@ -1,6 +1,8 @@
|
||||
|
@ -14,7 +14,7 @@ Adds flying monsters to control ghast and phantoms
|
||||
Adds villagers as separate config
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index e8e6e3ed5fa5aed6160e667142a244a39078c479..2b06163358827e0773969226d8f77e6e0ba0ca3d 100644
|
||||
index 595adbeb253529720e72f695667d5bf9584ebaf0..09e33261f4fe7ed1b68f6954202b359e9d6d9928 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -163,7 +163,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@ -332,7 +332,7 @@ index 182cd7e9110408fff9909ef362d368d055a2b167..f3df10587e652d3a26d15deb09304b97
|
||||
return this.c;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 2fa1cd43a8a7b083cd1522c32716d21dee922c46..6a067e4db344ca5fc446650722db7118fa5127a2 100644
|
||||
index 1dca840322990c996ed6eac49792529f60058a6f..c9c5c0b6f8837001db0b38dabfba7e01bc6de6db 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -82,6 +82,12 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@ -349,7 +349,7 @@ index 2fa1cd43a8a7b083cd1522c32716d21dee922c46..6a067e4db344ca5fc446650722db7118
|
||||
public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 15d68e08a51ae83ae4a8031f47d512b7c89deae0..7d17623989cb601a99195d6d1b0c6c2b29fd3c3f 100644
|
||||
index e6f4b677632f50efa90ebfbb5a04e444f6d9182a..4688b302eaeb42b406a0690f48d97d8cb78e3528 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -747,17 +747,17 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@ -440,13 +440,14 @@ index 15d68e08a51ae83ae4a8031f47d512b7c89deae0..7d17623989cb601a99195d6d1b0c6c2b
|
||||
}
|
||||
} else {
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..9030284ba06dfdcc17c2710f428e84d70afea8d5 100644
|
||||
index 797e579afdbc77a8dc5fc4cdf5874e546922fbfa..a87cec0b391dfe54f70be9e27723f04f149cfadd 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -2,24 +2,34 @@ package org.spigotmc;
|
||||
@@ -1,24 +1,35 @@
|
||||
package org.spigotmc;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
+import java.util.List;
|
||||
+
|
||||
+import net.minecraft.server.Activity;
|
||||
import net.minecraft.server.AxisAlignedBB;
|
||||
@ -478,7 +479,7 @@ index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..9030284ba06dfdcc17c2710f428e84d7
|
||||
import net.minecraft.server.EntityProjectile;
|
||||
import net.minecraft.server.EntityRaider;
|
||||
import net.minecraft.server.EntitySheep;
|
||||
@@ -29,16 +39,26 @@ import net.minecraft.server.EntityTNTPrimed;
|
||||
@@ -27,16 +38,26 @@ import net.minecraft.server.EntityTNTPrimed;
|
||||
import net.minecraft.server.EntityThrownTrident;
|
||||
import net.minecraft.server.EntityVillager;
|
||||
import net.minecraft.server.EntityWither;
|
||||
@ -505,7 +506,7 @@ index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..9030284ba06dfdcc17c2710f428e84d7
|
||||
MONSTER,
|
||||
ANIMAL,
|
||||
RAIDER,
|
||||
@@ -46,6 +66,43 @@ public class ActivationRange
|
||||
@@ -44,6 +65,43 @@ public class ActivationRange
|
||||
|
||||
AxisAlignedBB boundingBox = new AxisAlignedBB( 0, 0, 0, 0, 0, 0 );
|
||||
}
|
||||
@ -549,7 +550,7 @@ index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..9030284ba06dfdcc17c2710f428e84d7
|
||||
|
||||
static AxisAlignedBB maxBB = new AxisAlignedBB( 0, 0, 0, 0, 0, 0 );
|
||||
|
||||
@@ -58,10 +115,13 @@ public class ActivationRange
|
||||
@@ -56,10 +114,13 @@ public class ActivationRange
|
||||
*/
|
||||
public static ActivationType initializeEntityActivationType(Entity entity)
|
||||
{
|
||||
@ -564,7 +565,7 @@ index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..9030284ba06dfdcc17c2710f428e84d7
|
||||
{
|
||||
return ActivationType.MONSTER;
|
||||
} else if ( entity instanceof EntityCreature || entity instanceof EntityAmbient )
|
||||
@@ -82,10 +142,14 @@ public class ActivationRange
|
||||
@@ -80,10 +141,14 @@ public class ActivationRange
|
||||
*/
|
||||
public static boolean initializeEntityActivationState(Entity entity, SpigotWorldConfig config)
|
||||
{
|
||||
@ -583,7 +584,7 @@ index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..9030284ba06dfdcc17c2710f428e84d7
|
||||
|| entity instanceof EntityHuman
|
||||
|| entity instanceof EntityProjectile
|
||||
|| entity instanceof EntityEnderDragon
|
||||
@@ -118,10 +182,25 @@ public class ActivationRange
|
||||
@@ -116,10 +181,25 @@ public class ActivationRange
|
||||
final int raiderActivationRange = world.spigotConfig.raiderActivationRange;
|
||||
final int animalActivationRange = world.spigotConfig.animalActivationRange;
|
||||
final int monsterActivationRange = world.spigotConfig.monsterActivationRange;
|
||||
@ -609,7 +610,7 @@ index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..9030284ba06dfdcc17c2710f428e84d7
|
||||
maxRange = Math.min( ( world.spigotConfig.viewDistance << 4 ) - 8, maxRange );
|
||||
|
||||
for ( EntityHuman player : world.getPlayers() )
|
||||
@@ -133,6 +212,11 @@ public class ActivationRange
|
||||
@@ -131,6 +211,11 @@ public class ActivationRange
|
||||
ActivationType.RAIDER.boundingBox = player.getBoundingBox().grow( raiderActivationRange, 256, raiderActivationRange );
|
||||
ActivationType.ANIMAL.boundingBox = player.getBoundingBox().grow( animalActivationRange, 256, animalActivationRange );
|
||||
ActivationType.MONSTER.boundingBox = player.getBoundingBox().grow( monsterActivationRange, 256, monsterActivationRange );
|
||||
@ -621,7 +622,7 @@ index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..9030284ba06dfdcc17c2710f428e84d7
|
||||
|
||||
int i = MathHelper.floor( maxBB.minX / 16.0D );
|
||||
int j = MathHelper.floor( maxBB.maxX / 16.0D );
|
||||
@@ -143,7 +227,7 @@ public class ActivationRange
|
||||
@@ -141,7 +226,7 @@ public class ActivationRange
|
||||
{
|
||||
for ( int j1 = k; j1 <= l; ++j1 )
|
||||
{
|
||||
@ -630,11 +631,11 @@ index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..9030284ba06dfdcc17c2710f428e84d7
|
||||
if ( chunk != null )
|
||||
{
|
||||
activateChunkEntities( chunk );
|
||||
@@ -161,19 +245,15 @@ public class ActivationRange
|
||||
@@ -159,19 +244,15 @@ public class ActivationRange
|
||||
*/
|
||||
private static void activateChunkEntities(Chunk chunk)
|
||||
{
|
||||
- for ( List<Entity> slice : chunk.entitySlices )
|
||||
- for ( java.util.List<Entity> slice : chunk.entitySlices )
|
||||
- {
|
||||
- for ( Entity entity : (Collection<Entity>) slice )
|
||||
+ // Paper start
|
||||
@ -658,7 +659,7 @@ index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..9030284ba06dfdcc17c2710f428e84d7
|
||||
entity.activatedTick = MinecraftServer.currentTick;
|
||||
}
|
||||
}
|
||||
@@ -188,56 +268,105 @@ public class ActivationRange
|
||||
@@ -186,56 +267,105 @@ public class ActivationRange
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
@ -780,7 +781,7 @@ index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..9030284ba06dfdcc17c2710f428e84d7
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -252,8 +381,19 @@ public class ActivationRange
|
||||
@@ -250,8 +380,19 @@ public class ActivationRange
|
||||
if ( !entity.inChunk || entity instanceof EntityFireworks ) {
|
||||
return true;
|
||||
}
|
||||
@ -801,7 +802,7 @@ index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..9030284ba06dfdcc17c2710f428e84d7
|
||||
|
||||
// Should this entity tick?
|
||||
if ( !isActive )
|
||||
@@ -261,15 +401,19 @@ public class ActivationRange
|
||||
@@ -259,15 +400,19 @@ public class ActivationRange
|
||||
if ( ( MinecraftServer.currentTick - entity.activatedTick - 1 ) % 20 == 0 )
|
||||
{
|
||||
// Check immunities every 20 ticks.
|
||||
@ -827,7 +828,7 @@ index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..9030284ba06dfdcc17c2710f428e84d7
|
||||
isActive = false;
|
||||
}
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
index f0ad5fa235adfd165b8e56be7352568a3b3ae54a..9859e0c964e4d1e7dc7689cb97f40643a8e5cdd7 100644
|
||||
index 34ee684901906fc2ef5f0d09680d2686b813e52b..6b015c1f26facb4e82d75b252164dec05731ca6c 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
@@ -180,13 +180,59 @@ public class SpigotWorldConfig
|
||||
|
@ -7,10 +7,10 @@ bypass the need to get a player chunk, then get the either,
|
||||
then unwrap it...
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index 2fad6a79ee977c2712c55433bde8eca524d09ba7..37ea114deba56efa6692a5e2290c2ef2d4d70ec8 100644
|
||||
index 1eb201695cd118616fb404a0c7ed8cedee77db89..e0296920a794157d89bb314b162de706d69a5459 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -439,6 +439,12 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -447,6 +447,12 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
return this.getChunkAt(i, j, chunkstatus, flag);
|
||||
}, this.serverThreadQueue).join();
|
||||
} else {
|
||||
@ -23,7 +23,7 @@ index 2fad6a79ee977c2712c55433bde8eca524d09ba7..37ea114deba56efa6692a5e2290c2ef2
|
||||
GameProfilerFiller gameprofilerfiller = this.world.getMethodProfiler();
|
||||
|
||||
gameprofilerfiller.c("getChunk");
|
||||
@@ -489,39 +495,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -497,39 +503,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
if (Thread.currentThread() != this.serverThread) {
|
||||
return null;
|
||||
} else {
|
||||
|
@ -83,10 +83,10 @@ index f068436960c96b0df427bcdf337a4dcc6a9f66f5..253423acc3c3697a5e47136f34da9261
|
||||
return this.d(baseblockposition.getX(), baseblockposition.getY(), baseblockposition.getZ());
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 08d122f7f20e3c2cdfeababb41b0a8910760b80b..81504bfbbd4a987c95f35d0f25754dbf8b2487e4 100644
|
||||
index 0601e9cdeb33dec82642ee9fbfaac1712bd0fae9..49bcd959206eeb21ff743f827a076b0c4cd3c722 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -597,8 +597,8 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -599,8 +599,8 @@ public class Chunk implements IChunkAccess {
|
||||
this.entities.remove(entity); // Paper
|
||||
}
|
||||
|
||||
@ -243,10 +243,10 @@ index fa8eab20bb839c53bf7989d02d2274f835002609..4ad393bc99881d813e2b349fb929fc8e
|
||||
|
||||
public BlockPosition getHomePos() { // Paper - public
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 6a067e4db344ca5fc446650722db7118fa5127a2..a6a16f72b49a8a641dbb8ab580ecd9d61e9f4b37 100644
|
||||
index c9c5c0b6f8837001db0b38dabfba7e01bc6de6db..4da88ce31cfb8baa6fa68c0115edadac0c5b2fba 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -1413,10 +1413,18 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@@ -1412,10 +1412,18 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
public abstract ITagRegistry p();
|
||||
|
||||
public BlockPosition a(int i, int j, int k, int l) {
|
||||
@ -267,7 +267,7 @@ index 6a067e4db344ca5fc446650722db7118fa5127a2..a6a16f72b49a8a641dbb8ab580ecd9d6
|
||||
|
||||
public boolean isSavingDisabled() {
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 7d17623989cb601a99195d6d1b0c6c2b29fd3c3f..91e8dceec2d3aa8bb072b3d2f80953dc9af470b4 100644
|
||||
index 4688b302eaeb42b406a0690f48d97d8cb78e3528..640ae46d754f4af09ef3a404860b6b3db7d63a1a 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -561,7 +561,12 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] add hand to BlockMultiPlaceEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 3719bf85502f8b0a44ea2044163df84f4273cbc2..6234baf6abea43cd054630fb029f0cd40350c723 100644
|
||||
index 126f403c18b0ee4af727f325fae307086f289ced..42226525fb61abec501d80251cb4cbe0dfeb5015 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -334,13 +334,18 @@ public class CraftEventFactory {
|
||||
@@ -328,13 +328,18 @@ public class CraftEventFactory {
|
||||
}
|
||||
|
||||
org.bukkit.inventory.ItemStack item;
|
||||
|
@ -22,10 +22,10 @@ index fe1c9dd8258ec8c3fdf343d4a44de2be2ae3d35f..525d702d78a609af987ebd2c32169b87
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
index 05d7b7a67bfc117a91903db5f303587a4f8f8624..f390abf65d648e1e0697e2d802f3195a0241116e 100644
|
||||
index b7dc265ea684b71cc94e9a0542dad484864c0e30..360f14a3128f9a4c31fadb5a6f245d15845c8ae0 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
@@ -386,10 +386,14 @@ public class EntityZombie extends EntityMonster {
|
||||
@@ -389,10 +389,14 @@ public class EntityZombie extends EntityMonster {
|
||||
@Override
|
||||
public void a(WorldServer worldserver, EntityLiving entityliving) {
|
||||
super.a(worldserver, entityliving);
|
||||
|
@ -901,7 +901,7 @@ index 253423acc3c3697a5e47136f34da92617e719753..52ae74571b0d671a294900caedaa400b
|
||||
return this.b(baseblockposition.getX(), baseblockposition.getY(), baseblockposition.getZ());
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index 37ea114deba56efa6692a5e2290c2ef2d4d70ec8..6d1744bbe6af33180fb814a99c041edad9d44aeb 100644
|
||||
index e0296920a794157d89bb314b162de706d69a5459..1f4776f6f2debb4e000440ed8e47e3e063202850 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -194,6 +194,13 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@ -990,10 +990,10 @@ index 33cfeabdee03195a294f303f28044a313cb1c4ed..2287e47d1b891135a5f2579ec324c705
|
||||
public String toString() {
|
||||
return this.e + ": " + this.a + ", " + this.b + ", " + this.c + ", " + this.f;
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
index a1341617ba5388d1d1f2c91ad158b0210b4505cb..3cdfb6cddf4b998ee48df64fd884a85237004b63 100644
|
||||
index 25f8febe63167349460e32c831088bb80b6b77ad..5305da4c7253c7e259d7b08e9722145188adc513 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
@@ -467,7 +467,9 @@ public class PlayerChunk {
|
||||
@@ -471,7 +471,9 @@ public class PlayerChunk {
|
||||
PlayerChunk.this.isTickingReady = true;
|
||||
|
||||
|
||||
@ -1191,7 +1191,7 @@ index 3b8f56c0f0507ebdd9ac20be70688b4c0cfe4cf8..3e148b7e99554a1abe257dd3c9acafb9
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 91e8dceec2d3aa8bb072b3d2f80953dc9af470b4..fb9c55a864ce3fd646e9576b2feede70ab759bbc 100644
|
||||
index 640ae46d754f4af09ef3a404860b6b3db7d63a1a..e0be5975ddeb5116f16696b2ca0d067146b00cf4 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -186,6 +186,15 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
|
@ -15,14 +15,14 @@ Combine that with a buggy detail of the previous implementation of
|
||||
the Dupe UUID patch, then this was the likely source of the "Ghost entities"
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 95b25bb17d9d4b025047b01909a880da26e59146..0543f5f30340e367511ec282ea67b611168c6000 100644
|
||||
index 69060be0daf3fbae2763852209c915be59caac4f..cd04994ed38c7f5d4db6b1ef1796f95ef2c490e1 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1451,9 +1451,9 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
}
|
||||
|
||||
private void removeEntityFromChunk(Entity entity) {
|
||||
- IChunkAccess ichunkaccess = this.getChunkAt(entity.chunkX, entity.chunkZ, ChunkStatus.FULL, false);
|
||||
- IChunkAccess ichunkaccess = chunkProvider.getChunkUnchecked(entity.chunkX, entity.chunkZ); // CraftBukkit - SPIGOT-5228: getChunkAt won't find the entity's chunk if it has already been unloaded (i.e. if it switched to state INACCESSIBLE).
|
||||
+ Chunk ichunkaccess = entity.getCurrentChunk(); // Paper - getChunkAt(x,z,full,false) is broken by CraftBukkit as it won't return an unloading chunk. Use our current chunk reference as this points to what chunk they need to be removed from anyways
|
||||
|
||||
- if (ichunkaccess instanceof Chunk) {
|
||||
|
@ -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
|
||||
index 6d1744bbe6af33180fb814a99c041edad9d44aeb..44aa6baed64a0d3847cd8df067e0fa32a0739c93 100644
|
||||
index 1f4776f6f2debb4e000440ed8e47e3e063202850..475e35a5d3f25929e60ef34d7f41e2db193443ef 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -748,7 +748,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -756,7 +756,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
entityPlayer.playerNaturallySpawnedEvent.callEvent();
|
||||
};
|
||||
// Paper end
|
||||
@ -243,7 +243,7 @@ index 21dfbbdbe72a7562601e23384e2fec8f9393ef29..87de764f74e8174da4c1a28238375caa
|
||||
while (objectbidirectionaliterator.hasNext()) {
|
||||
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
|
||||
index e612d6528e1e73e774c742e763cbd3e5c28b87db..8f221c3b4c4cc9b5dea9938d868a2a036854d6e3 100644
|
||||
index 6ddfeea46997907f1dd666000c7cc2eb27cd4398..756c675939c5f5835736e6b8c42ae20941712c49 100644
|
||||
--- a/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.GroupDataEntity;
|
||||
|
@ -56,10 +56,10 @@ index 519b43154993ec01eb13a58336ddcc745362892f..63b3726bfdd22900e7bc577c34db58dd
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index 44aa6baed64a0d3847cd8df067e0fa32a0739c93..cc7691a2ed5eaa30071ad5e385bbd76bec3c3d80 100644
|
||||
index 475e35a5d3f25929e60ef34d7f41e2db193443ef..1f63cdd9588a8dda1f04154f4d9de21fd8224678 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -686,6 +686,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -694,6 +694,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
this.world.getMethodProfiler().enter("purge");
|
||||
this.world.timings.doChunkMap.startTiming(); // Spigot
|
||||
this.chunkMapDistance.purgeTickets();
|
||||
@ -67,7 +67,7 @@ index 44aa6baed64a0d3847cd8df067e0fa32a0739c93..cc7691a2ed5eaa30071ad5e385bbd76b
|
||||
this.tickDistanceManager();
|
||||
this.world.timings.doChunkMap.stopTiming(); // Spigot
|
||||
this.world.getMethodProfiler().exitEnter("chunks");
|
||||
@@ -695,6 +696,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -703,6 +704,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
this.world.timings.doChunkUnload.startTiming(); // Spigot
|
||||
this.world.getMethodProfiler().exitEnter("unload");
|
||||
this.playerChunkMap.unloadChunks(booleansupplier);
|
||||
@ -75,7 +75,7 @@ index 44aa6baed64a0d3847cd8df067e0fa32a0739c93..cc7691a2ed5eaa30071ad5e385bbd76b
|
||||
this.world.timings.doChunkUnload.stopTiming(); // Spigot
|
||||
this.world.getMethodProfiler().exit();
|
||||
this.clearCache();
|
||||
@@ -748,7 +750,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -756,7 +758,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
entityPlayer.playerNaturallySpawnedEvent.callEvent();
|
||||
};
|
||||
// Paper end
|
||||
@ -84,7 +84,7 @@ index 44aa6baed64a0d3847cd8df067e0fa32a0739c93..cc7691a2ed5eaa30071ad5e385bbd76b
|
||||
Optional<Chunk> optional = ((Either) playerchunk.a().getNow(PlayerChunk.UNLOADED_CHUNK)).left();
|
||||
|
||||
if (optional.isPresent()) {
|
||||
@@ -772,6 +774,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -780,6 +782,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
this.world.timings.chunkTicks.startTiming(); // Spigot // Paper
|
||||
this.world.a(chunk, k);
|
||||
this.world.timings.chunkTicks.stopTiming(); // Spigot // Paper
|
||||
@ -92,7 +92,7 @@ index 44aa6baed64a0d3847cd8df067e0fa32a0739c93..cc7691a2ed5eaa30071ad5e385bbd76b
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -928,6 +931,41 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -936,6 +939,41 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
super.executeTask(runnable);
|
||||
}
|
||||
|
||||
@ -226,7 +226,7 @@ index 96a784744110e7dd4939eb2c1b57346a2d60f983..77a91fa0549d5db12e8a9fa9b51a34a2
|
||||
// Spigot Start
|
||||
CrashReport crashreport;
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index d018cbee11356110aace897b1dd4516dd3ca5b61..1096ecf62127ad92dfed3872dbf6053c13975c94 100644
|
||||
index cbfe3cc34922c4dffb3dea5a279970072de1daae..7230432a67b0d07bcd40352ce510ce80517dd9b6 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -457,6 +457,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
|
@ -147,10 +147,10 @@ index 77a91fa0549d5db12e8a9fa9b51a34a258821e7b..a8fe6c5f99c2be9dc7fedb8dfa8b12e4
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index e0f4dc286893fcb37b75e0982a3d2b0d57953943..7756b25f4b7e5aae7eb6f3e8b347db4d531589f4 100644
|
||||
index 80e917d7154ed8cafd308440c66ae16fb782dd35..255ab2909440a7daeae756fc2e3d21ff71f7a551 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2197,6 +2197,16 @@ public final class CraftServer implements Server {
|
||||
@@ -2196,6 +2196,16 @@ public final class CraftServer implements Server {
|
||||
net.minecraft.server.MinecraftServer.getServer().tps15.getAverage()
|
||||
};
|
||||
}
|
||||
@ -166,4 +166,4 @@ index e0f4dc286893fcb37b75e0982a3d2b0d57953943..7756b25f4b7e5aae7eb6f3e8b347db4d
|
||||
+ }
|
||||
// Paper end
|
||||
|
||||
private final Spigot spigot = new Spigot()
|
||||
// Spigot start
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Expose MinecraftServer#isRunning
|
||||
This allows for plugins to detect if the server is actually turning off in onDisable rather than just plugins reloading.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 7756b25f4b7e5aae7eb6f3e8b347db4d531589f4..fa96805c33ab16fe3a8ffbc5e5b1a4517269dd41 100644
|
||||
index 255ab2909440a7daeae756fc2e3d21ff71f7a551..fafe6354fa73d1f11d30be88bd4ff4354bbbb016 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2372,5 +2372,10 @@ public final class CraftServer implements Server {
|
||||
@@ -2373,5 +2373,10 @@ public final class CraftServer implements Server {
|
||||
public int getCurrentTick() {
|
||||
return net.minecraft.server.MinecraftServer.currentTick;
|
||||
}
|
||||
|
@ -312,7 +312,7 @@ index 1fe1df445ba56b2f176ee25502a774aa0a7bd00b..916a6a1fc1ccc73e4fb974ad77310d16
|
||||
a(SystemUtils.e);
|
||||
a(SystemUtils.f);
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index a6a16f72b49a8a641dbb8ab580ecd9d61e9f4b37..a50b647631eae271380728c890ad3ff67f56bcbe 100644
|
||||
index 4da88ce31cfb8baa6fa68c0115edadac0c5b2fba..d26fd68b2abd4907138ce77a6e6bb45c9af4af02 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -798,6 +798,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@ -323,7 +323,7 @@ index a6a16f72b49a8a641dbb8ab580ecd9d61e9f4b37..a50b647631eae271380728c890ad3ff6
|
||||
// Paper start - Prevent tile entity and entity crashes
|
||||
String msg = "TileEntity threw exception at " + tileentity.world.getWorld().getName() + ":" + tileentity.position.getX() + "," + tileentity.position.getY() + "," + tileentity.position.getZ();
|
||||
System.err.println(msg);
|
||||
@@ -873,6 +874,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@@ -872,6 +873,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
try {
|
||||
consumer.accept(entity);
|
||||
} catch (Throwable throwable) {
|
||||
@ -332,7 +332,7 @@ index a6a16f72b49a8a641dbb8ab580ecd9d61e9f4b37..a50b647631eae271380728c890ad3ff6
|
||||
String msg = "Entity threw exception at " + entity.world.getWorld().getName() + ":" + entity.locX() + "," + entity.locY() + "," + entity.locZ();
|
||||
System.err.println(msg);
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 1c1dceb98413ccb24e3111435119b3b8c1b760c4..5d299a65417ff17eae3dfe52841c1a27a6d75677 100644
|
||||
index 3c72c156ca488e14604cb0db5f1ac4e068776066..e0f66718f3700f5f4bdb77178e05ca3fc95829e8 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -65,7 +65,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@ -345,10 +345,10 @@ index 1c1dceb98413ccb24e3111435119b3b8c1b760c4..5d299a65417ff17eae3dfe52841c1a27
|
||||
List<java.lang.Runnable> afterEntityTickingTasks = Lists.newArrayList();
|
||||
public void doIfNotEntityTicking(java.lang.Runnable run) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index fa96805c33ab16fe3a8ffbc5e5b1a4517269dd41..9cb68bc8be2256244e7908cf76183d11f3b1a58b 100644
|
||||
index fafe6354fa73d1f11d30be88bd4ff4354bbbb016..7630a7fc347f6add6e628093c1f149ee01d05264 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1835,7 +1835,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1834,7 +1834,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
@Override
|
||||
public boolean isPrimaryThread() {
|
||||
|
@ -36,10 +36,10 @@ index 950a16e8aafe71b54b4ba46b61b5d71f8aa3cf94..a417971c0cd6e381078d5ed41508ac10
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index 38c0d54fcb084bb102ee004cc8987c8358b5a2ac..c6564ccfd6580ac5691dd864602eb6fbaf4a34be 100644
|
||||
index 7b6ae7ef90c3df27a6ae43bc393b2d1d9a866143..9e9e5118cbdc02b9171bbccb1b29990c11d7cb5f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
@@ -322,7 +322,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
@@ -321,7 +321,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
if (adventure$title == null) adventure$title = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(container.getBukkitView().getTitle()); // Paper
|
||||
|
||||
//player.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, windowType, CraftChatMessage.fromString(title)[0])); // Paper // Paper - comment
|
||||
@ -48,7 +48,7 @@ index 38c0d54fcb084bb102ee004cc8987c8358b5a2ac..c6564ccfd6580ac5691dd864602eb6fb
|
||||
getHandle().activeContainer = container;
|
||||
getHandle().activeContainer.addSlotListener(player);
|
||||
}
|
||||
@@ -396,7 +396,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
@@ -395,7 +395,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
net.kyori.adventure.text.Component adventure$title = inventory.title(); // Paper
|
||||
if (adventure$title == null) adventure$title = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(inventory.getTitle()); // Paper
|
||||
//player.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, windowType, CraftChatMessage.fromString(title)[0])); // Paper - comment
|
||||
|
@ -9,10 +9,10 @@ so inline where possible, and avoid the abstraction of the
|
||||
Either class.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index cc7691a2ed5eaa30071ad5e385bbd76bec3c3d80..106a0e3b7bf3ee563b45a67db25a07114da2cf42 100644
|
||||
index 1f63cdd9588a8dda1f04154f4d9de21fd8224678..174fc04e8cf5bd481b2f3d4e07031dab9ae66d86 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -610,21 +610,29 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -618,21 +618,29 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
|
||||
public final boolean isInEntityTickingChunk(Entity entity) { return this.a(entity); } // Paper - OBFHELPER
|
||||
@Override public boolean a(Entity entity) {
|
||||
|
@ -25,10 +25,10 @@ This successfully fixed a reoccurring and highly reproduceable crash
|
||||
for heightmaps.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index 106a0e3b7bf3ee563b45a67db25a07114da2cf42..f7355ca6d75c783b663b027efc2ccf6c07e6191d 100644
|
||||
index 174fc04e8cf5bd481b2f3d4e07031dab9ae66d86..75500aaae0dc44f0da3b4d5ed94da6fef9f96c38 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -986,6 +986,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -994,6 +994,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
return super.executeNext() || execChunkTask; // Paper
|
||||
}
|
||||
} finally {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user