mirror of
https://github.com/PaperMC/Folia.git
synced 2024-11-24 12:25:23 +01:00
Update Paper
This commit is contained in:
parent
16e8d3aea4
commit
be90fb8d36
@ -2,7 +2,7 @@ group=dev.folia
|
||||
|
||||
version=1.20.4-R0.1-SNAPSHOT
|
||||
mcVersion=1.20.4
|
||||
paperRef=1281f4f5526c0b8bdc32915c41dc6af6b4f9fea2
|
||||
paperRef=07b956e3a30d9cd192111829b59bdf4372f128b1
|
||||
|
||||
org.gradle.caching=true
|
||||
org.gradle.parallel=true
|
||||
|
@ -2402,7 +2402,7 @@ index a6f58b3457b7477015c5c6d969e7d83017dd3fa1..be3d0bf530267a7b58d44ecdd4b1fb17
|
||||
+ // Folia end - threaded regions
|
||||
}
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
|
||||
index 071d3877e386a0c7c4d2f2e8ddd06e0765c49d0d..f8a2a4494edccb25a4403a69581fe7920d9d0de3 100644
|
||||
index 385ca2c1022e0985550a5cc2bbff953f1aa33f5c..f7a66f54a450f1a46e9d0a138544e97423f261b3 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
|
||||
@@ -469,6 +469,14 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
@ -9342,7 +9342,7 @@ index 0000000000000000000000000000000000000000..cf9b66afc1762dbe2c625f09f9e804ca
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||
index 14f4c0a93372a58cf36dc95265b5e210ea1605e5..b0d68a04b185c37659e7b42dd931b6d288970b2d 100644
|
||||
index 37ba8fd69a0099f80bdf7c28b593241f1f5d681f..d02746a6f75b2b546a459607531e88da0b102410 100644
|
||||
--- a/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||
+++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||
@@ -68,7 +68,7 @@ public class CommandSourceStack implements ExecutionCommandSource<CommandSourceS
|
||||
@ -9355,7 +9355,7 @@ index 14f4c0a93372a58cf36dc95265b5e210ea1605e5..b0d68a04b185c37659e7b42dd931b6d2
|
||||
|
||||
protected CommandSourceStack(CommandSource output, Vec3 pos, Vec2 rot, ServerLevel world, int level, String name, Component displayName, MinecraftServer server, @Nullable Entity entity, boolean silent, CommandResultCallback resultStorer, EntityAnchorArgument.Anchor entityAnchor, CommandSigningContext signedArguments, TaskChainer messageChainTaskQueue) {
|
||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||
index 55f3f5396dac2b0bb0cc37b537547e9245042100..2f4986196f446b789f6a0bcefc9db13f3d34d698 100644
|
||||
index 8fe48c6bf65db6b11fcd0674aad01d5bb8d17a5f..4a37225682c3fbc91033da7a0d2800a33d793739 100644
|
||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||
@@ -159,13 +159,13 @@ public class Commands {
|
||||
@ -9450,7 +9450,7 @@ index 55f3f5396dac2b0bb0cc37b537547e9245042100..2f4986196f446b789f6a0bcefc9db13f
|
||||
SaveOffCommand.register(this.dispatcher);
|
||||
SaveOnCommand.register(this.dispatcher);
|
||||
SetPlayerIdleTimeoutCommand.register(this.dispatcher);
|
||||
@@ -508,9 +508,12 @@ public class Commands {
|
||||
@@ -499,9 +499,12 @@ public class Commands {
|
||||
}
|
||||
// Paper start - Async command map building
|
||||
new com.destroystokyo.paper.event.brigadier.AsyncPlayerSendCommandsEvent<CommandSourceStack>(player.getBukkitEntity(), (RootCommandNode) rootcommandnode, false).callEvent(); // Paper
|
||||
@ -9506,7 +9506,7 @@ index 6c78d90e73b47b62c4052727730850d4b67a9cd2..22bd34cf8994082e1b33d58f21ae8621
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
||||
index e6ac20a38f31bb0cd6b8840b2518f6992ef7f518..97a1a99258536f4d2d671964d0eaf8f865190e8a 100644
|
||||
index bf1c5834717758991c1520afd4b2a5c3fa68a558..c3dffeae79cdbf6faae7199eb71f0ab6866dd012 100644
|
||||
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
||||
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
||||
@@ -222,7 +222,7 @@ public interface DispenseItemBehavior {
|
||||
@ -9572,7 +9572,7 @@ index e6ac20a38f31bb0cd6b8840b2518f6992ef7f518..97a1a99258536f4d2d671964d0eaf8f8
|
||||
worldserver.getCraftServer().getPluginManager().callEvent(event);
|
||||
}
|
||||
|
||||
@@ -633,7 +633,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -639,7 +639,7 @@ public interface DispenseItemBehavior {
|
||||
CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack.copyWithCount(1)); // Paper - single item in event
|
||||
|
||||
BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(x, y, z));
|
||||
@ -9581,7 +9581,7 @@ index e6ac20a38f31bb0cd6b8840b2518f6992ef7f518..97a1a99258536f4d2d671964d0eaf8f8
|
||||
worldserver.getCraftServer().getPluginManager().callEvent(event);
|
||||
}
|
||||
|
||||
@@ -708,7 +708,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -713,7 +713,7 @@ public interface DispenseItemBehavior {
|
||||
CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack.copyWithCount(1)); // Paper - single item in event
|
||||
|
||||
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
|
||||
@ -9590,8 +9590,8 @@ index e6ac20a38f31bb0cd6b8840b2518f6992ef7f518..97a1a99258536f4d2d671964d0eaf8f8
|
||||
worldserver.getCraftServer().getPluginManager().callEvent(event);
|
||||
}
|
||||
|
||||
@@ -755,7 +755,7 @@ public interface DispenseItemBehavior {
|
||||
CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack);
|
||||
@@ -760,7 +760,7 @@ public interface DispenseItemBehavior {
|
||||
CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack); // Paper - ignore stack size on damageable items
|
||||
|
||||
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(0, 0, 0));
|
||||
- if (!DispenserBlock.eventFired) {
|
||||
@ -9599,7 +9599,7 @@ index e6ac20a38f31bb0cd6b8840b2518f6992ef7f518..97a1a99258536f4d2d671964d0eaf8f8
|
||||
worldserver.getCraftServer().getPluginManager().callEvent(event);
|
||||
}
|
||||
|
||||
@@ -818,7 +818,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -821,7 +821,7 @@ public interface DispenseItemBehavior {
|
||||
CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack.copyWithCount(1)); // Paper - single item in event
|
||||
|
||||
BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(0, 0, 0));
|
||||
@ -9608,7 +9608,7 @@ index e6ac20a38f31bb0cd6b8840b2518f6992ef7f518..97a1a99258536f4d2d671964d0eaf8f8
|
||||
worldserver.getCraftServer().getPluginManager().callEvent(event);
|
||||
}
|
||||
|
||||
@@ -837,7 +837,8 @@ public interface DispenseItemBehavior {
|
||||
@@ -839,7 +839,8 @@ public interface DispenseItemBehavior {
|
||||
}
|
||||
}
|
||||
|
||||
@ -9618,7 +9618,7 @@ index e6ac20a38f31bb0cd6b8840b2518f6992ef7f518..97a1a99258536f4d2d671964d0eaf8f8
|
||||
// CraftBukkit end
|
||||
|
||||
if (!BoneMealItem.growCrop(stack, worldserver, blockposition) && !BoneMealItem.growWaterPlant(stack, worldserver, blockposition, (Direction) null)) {
|
||||
@@ -846,13 +847,13 @@ public interface DispenseItemBehavior {
|
||||
@@ -848,13 +849,13 @@ public interface DispenseItemBehavior {
|
||||
worldserver.levelEvent(1505, blockposition, 0);
|
||||
}
|
||||
// CraftBukkit start
|
||||
@ -9638,7 +9638,7 @@ index e6ac20a38f31bb0cd6b8840b2518f6992ef7f518..97a1a99258536f4d2d671964d0eaf8f8
|
||||
StructureGrowEvent structureEvent = null;
|
||||
if (treeType != null) {
|
||||
structureEvent = new StructureGrowEvent(location, treeType, false, null, blocks);
|
||||
@@ -888,7 +889,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -890,7 +891,7 @@ public interface DispenseItemBehavior {
|
||||
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
|
||||
|
||||
BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector((double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D));
|
||||
@ -9647,7 +9647,7 @@ index e6ac20a38f31bb0cd6b8840b2518f6992ef7f518..97a1a99258536f4d2d671964d0eaf8f8
|
||||
worldserver.getCraftServer().getPluginManager().callEvent(event);
|
||||
}
|
||||
|
||||
@@ -945,7 +946,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -947,7 +948,7 @@ public interface DispenseItemBehavior {
|
||||
CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack.copyWithCount(1)); // Paper - single item in event
|
||||
|
||||
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
|
||||
@ -9665,7 +9665,7 @@ index e6ac20a38f31bb0cd6b8840b2518f6992ef7f518..97a1a99258536f4d2d671964d0eaf8f8
|
||||
worldserver.getCraftServer().getPluginManager().callEvent(event);
|
||||
}
|
||||
|
||||
@@ -1070,7 +1071,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -1069,7 +1070,7 @@ public interface DispenseItemBehavior {
|
||||
CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack.copyWithCount(1)); // Paper - only single item in event
|
||||
|
||||
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
|
||||
@ -9675,11 +9675,11 @@ index e6ac20a38f31bb0cd6b8840b2518f6992ef7f518..97a1a99258536f4d2d671964d0eaf8f8
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java
|
||||
index ec43e8294d7e7112478a2fc1475f0852690a4882..d8b6e3a8e30d116a657526a87e3be53eb741b37a 100644
|
||||
index 887e75c940ab5089f4e42e4553ab95adf172df46..503253da4ff95def477cabc9bdabe0efb3cd8c22 100644
|
||||
--- a/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java
|
||||
+++ b/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java
|
||||
@@ -40,7 +40,7 @@ public class ShearsDispenseItemBehavior extends OptionalDispenseItemBehavior {
|
||||
CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack);
|
||||
CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack); // Paper - ignore stack size on damageable items
|
||||
|
||||
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(0, 0, 0));
|
||||
- if (!DispenserBlock.eventFired) {
|
||||
@ -12215,7 +12215,7 @@ index 5afeb59ff25fed2d565407acacffec8383398006..047e817eae19800d146970a3ab44913e
|
||||
// Paper end - optimise chunk tick iteration
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index d9cd497bc1b654030ff1a597f038b6a881df9f6b..4bd78902afc1824f3acdeef6067eb45a8f661b65 100644
|
||||
index ecb09c74153349e78bb81d1188c282e4be4000bf..27513071da19c4c37640a7538fa976d166fb5b09 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -137,77 +137,41 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@ -13179,7 +13179,7 @@ index 44ada45d9bf2d9b48e5de1c3cb1a855902f3884b..a21cc9c7d5981c742f379affe9c1ef4d
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278be082392 100644
|
||||
index 7c31f619a6e8e3539c547fc43d821d2cce7df7e7..8d3dca767e5928756e2767d60ca92fcc4cc760f1 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -194,36 +194,35 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@ -13796,7 +13796,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
@Nullable
|
||||
public ServerPlayer getRandomPlayer() {
|
||||
List<ServerPlayer> list = this.getPlayers(LivingEntity::isAlive);
|
||||
@@ -1710,8 +1868,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1711,8 +1869,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
} else {
|
||||
if (entity instanceof net.minecraft.world.entity.item.ItemEntity itemEntity && itemEntity.getItem().isEmpty()) return false; // Paper - Prevent empty items from being added
|
||||
// Paper start - capture all item additions to the world
|
||||
@ -13807,7 +13807,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
return true;
|
||||
}
|
||||
// Paper end
|
||||
@@ -1855,7 +2013,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1856,7 +2014,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
@Override
|
||||
public void sendBlockUpdated(BlockPos pos, BlockState oldState, BlockState newState, int flags) {
|
||||
@ -13816,7 +13816,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
String s = "recursive call to sendBlockUpdated";
|
||||
|
||||
Util.logAndPauseIfInIde("recursive call to sendBlockUpdated", new IllegalStateException("recursive call to sendBlockUpdated"));
|
||||
@@ -1868,7 +2026,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1869,7 +2027,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
if (Shapes.joinIsNotEmpty(voxelshape, voxelshape1, BooleanOp.NOT_SAME)) {
|
||||
List<PathNavigation> list = new ObjectArrayList();
|
||||
@ -13825,7 +13825,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
// CraftBukkit start - fix SPIGOT-6362
|
||||
@@ -1891,7 +2049,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1892,7 +2050,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
try {
|
||||
@ -13834,7 +13834,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
iterator = list.iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -1900,7 +2058,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1901,7 +2059,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
navigationabstract1.recomputePath();
|
||||
}
|
||||
} finally {
|
||||
@ -13843,7 +13843,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1909,23 +2067,23 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1910,23 +2068,23 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
@Override
|
||||
public void updateNeighborsAt(BlockPos pos, Block sourceBlock) {
|
||||
@ -13872,7 +13872,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1956,7 +2114,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1957,7 +2115,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
explosion.clearToBlow();
|
||||
}
|
||||
|
||||
@ -13881,7 +13881,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
ServerPlayer entityplayer = (ServerPlayer) iterator.next();
|
||||
@@ -1971,25 +2129,28 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1972,25 +2130,28 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
@Override
|
||||
public void blockEvent(BlockPos pos, Block block, int type, int data) {
|
||||
@ -13916,7 +13916,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
}
|
||||
|
||||
private boolean doBlockEvent(BlockEventData event) {
|
||||
@@ -2000,12 +2161,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2001,12 +2162,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
@Override
|
||||
public LevelTicks<Block> getBlockTicks() {
|
||||
@ -13931,7 +13931,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@@ -2029,7 +2190,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2030,7 +2191,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
public <T extends ParticleOptions> int sendParticles(ServerPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) {
|
||||
// Paper start - Particle API Expansion
|
||||
@ -13940,7 +13940,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
}
|
||||
public <T extends ParticleOptions> int sendParticles(List<ServerPlayer> receivers, @Nullable ServerPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) {
|
||||
// Paper end
|
||||
@@ -2082,7 +2243,14 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2083,7 +2244,14 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
public Entity getEntityOrPart(int id) {
|
||||
Entity entity = (Entity) this.getEntities().get(id);
|
||||
|
||||
@ -13956,7 +13956,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -2260,6 +2428,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2261,6 +2429,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
public boolean setChunkForced(int x, int z, boolean forced) {
|
||||
@ -13964,7 +13964,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
ForcedChunksSavedData forcedchunk = (ForcedChunksSavedData) this.getDataStorage().computeIfAbsent(ForcedChunksSavedData.factory(), "chunks");
|
||||
ChunkPos chunkcoordintpair = new ChunkPos(x, z);
|
||||
long k = chunkcoordintpair.toLong();
|
||||
@@ -2268,7 +2437,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2269,7 +2438,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
if (forced) {
|
||||
flag1 = forcedchunk.getChunks().add(k);
|
||||
if (flag1) {
|
||||
@ -13973,7 +13973,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
}
|
||||
} else {
|
||||
flag1 = forcedchunk.getChunks().remove(k);
|
||||
@@ -2296,13 +2465,18 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2297,13 +2466,18 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
BlockPos blockposition1 = pos.immutable();
|
||||
|
||||
optional.ifPresent((holder) -> {
|
||||
@ -13995,7 +13995,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
// Paper start
|
||||
if (optional.isEmpty() && this.getPoiManager().exists(blockposition1, poiType -> true)) {
|
||||
this.getPoiManager().remove(blockposition1);
|
||||
@@ -2310,7 +2484,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2311,7 +2485,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// Paper end
|
||||
this.getPoiManager().add(blockposition1, holder);
|
||||
DebugPackets.sendPoiAddedPacket(this, blockposition1);
|
||||
@ -14009,7 +14009,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -2357,7 +2536,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2358,7 +2537,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
BufferedWriter bufferedwriter = Files.newBufferedWriter(path.resolve("stats.txt"));
|
||||
|
||||
try {
|
||||
@ -14018,7 +14018,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
NaturalSpawner.SpawnState spawnercreature_d = this.getChunkSource().getLastSpawnState();
|
||||
|
||||
if (spawnercreature_d != null) {
|
||||
@@ -2371,7 +2550,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2372,7 +2551,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
bufferedwriter.write(String.format(Locale.ROOT, "entities: %s\n", this.entityLookup.getDebugInfo())); // Paper - rewrite chunk system
|
||||
@ -14027,7 +14027,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
bufferedwriter.write(String.format(Locale.ROOT, "block_ticks: %d\n", this.getBlockTicks().count()));
|
||||
bufferedwriter.write(String.format(Locale.ROOT, "fluid_ticks: %d\n", this.getFluidTicks().count()));
|
||||
bufferedwriter.write("distance_manager: " + playerchunkmap.getDistanceManager().getDebugStatus() + "\n");
|
||||
@@ -2517,7 +2696,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2518,7 +2697,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
private void dumpBlockEntityTickers(Writer writer) throws IOException {
|
||||
CsvOutput csvwriter = CsvOutput.builder().addColumn("x").addColumn("y").addColumn("z").addColumn("type").build(writer);
|
||||
@ -14036,7 +14036,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
TickingBlockEntity tickingblockentity = (TickingBlockEntity) iterator.next();
|
||||
@@ -2530,7 +2709,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2531,7 +2710,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
@VisibleForTesting
|
||||
public void clearBlockEvents(BoundingBox box) {
|
||||
@ -14045,7 +14045,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
return box.isInside(blockactiondata.pos());
|
||||
});
|
||||
}
|
||||
@@ -2539,7 +2718,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2540,7 +2719,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
public void blockUpdated(BlockPos pos, Block block) {
|
||||
if (!this.isDebug()) {
|
||||
// CraftBukkit start
|
||||
@ -14054,7 +14054,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -2582,9 +2761,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2583,9 +2762,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
@VisibleForTesting
|
||||
public String getWatchdogStats() {
|
||||
@ -14065,7 +14065,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
}
|
||||
|
||||
private static <T> String getTypeCount(Iterable<T> items, Function<T, String> classifier) {
|
||||
@@ -2617,6 +2794,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2618,6 +2795,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
public static void makeObsidianPlatform(ServerLevel worldserver, Entity entity) {
|
||||
// CraftBukkit end
|
||||
BlockPos blockposition = ServerLevel.END_SPAWN_POINT;
|
||||
@ -14078,7 +14078,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
int i = blockposition.getX();
|
||||
int j = blockposition.getY() - 2;
|
||||
int k = blockposition.getZ();
|
||||
@@ -2629,11 +2812,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2630,11 +2813,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
BlockPos.betweenClosed(i - 2, j, k - 2, i + 2, j, k + 2).forEach((blockposition1) -> {
|
||||
blockList.setBlock(blockposition1, Blocks.OBSIDIAN.defaultBlockState(), 3);
|
||||
});
|
||||
@ -14091,7 +14091,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
blockList.updateList();
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -2654,13 +2833,14 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2655,13 +2834,14 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
public void startTickingChunk(LevelChunk chunk) {
|
||||
@ -14110,7 +14110,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -2682,7 +2862,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2683,7 +2863,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// Paper end - rewrite chunk system
|
||||
}
|
||||
|
||||
@ -14119,7 +14119,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
// Paper start - optimize is ticking ready type functions
|
||||
io.papermc.paper.chunk.system.scheduling.NewChunkHolder chunkHolder = this.chunkTaskScheduler.chunkHolderManager.getChunkHolder(chunkPos);
|
||||
// isTicking implies the chunk is loaded, and the chunk is loaded now implies the entities are loaded
|
||||
@@ -2748,16 +2928,16 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2749,16 +2929,16 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
public void onCreated(Entity entity) {}
|
||||
|
||||
public void onDestroyed(Entity entity) {
|
||||
@ -14139,7 +14139,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
// Paper start - Reset pearls when they stop being ticked
|
||||
if (paperConfig().fixes.disableUnloadedChunkEnderpearlExploit && entity instanceof net.minecraft.world.entity.projectile.ThrownEnderpearl pearl) {
|
||||
pearl.cachedOwner = null;
|
||||
@@ -2768,6 +2948,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2769,6 +2949,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
public void onTrackingStart(Entity entity) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("entity register"); // Spigot
|
||||
@ -14147,7 +14147,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
// ServerLevel.this.getChunkSource().addEntity(entity); // Paper - moved down below valid=true
|
||||
if (entity instanceof ServerPlayer) {
|
||||
ServerPlayer entityplayer = (ServerPlayer) entity;
|
||||
@@ -2785,7 +2966,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2786,7 +2967,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
Util.logAndPauseIfInIde("onTrackingStart called during navigation iteration", new IllegalStateException("onTrackingStart called during navigation iteration"));
|
||||
}
|
||||
|
||||
@ -14156,7 +14156,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
}
|
||||
|
||||
if (entity instanceof EnderDragon) {
|
||||
@@ -2796,7 +2977,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2797,7 +2978,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
for (int j = 0; j < i; ++j) {
|
||||
EnderDragonPart entitycomplexpart = aentitycomplexpart[j];
|
||||
|
||||
@ -14166,7 +14166,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2818,16 +3001,24 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2819,16 +3002,24 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
public void onTrackingEnd(Entity entity) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("entity unregister"); // Spigot
|
||||
@ -14192,7 +14192,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
map.carriedByPlayers.remove( (Player) entity );
|
||||
for ( Iterator<MapItemSavedData.HoldingPlayer> iter = (Iterator<MapItemSavedData.HoldingPlayer>) map.carriedBy.iterator(); iter.hasNext(); )
|
||||
{
|
||||
@@ -2837,6 +3028,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2838,6 +3029,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
iter.remove();
|
||||
}
|
||||
}
|
||||
@ -14200,7 +14200,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
}
|
||||
}
|
||||
} );
|
||||
@@ -2871,7 +3063,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2872,7 +3064,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
Util.logAndPauseIfInIde("onTrackingStart called during navigation iteration", new IllegalStateException("onTrackingStart called during navigation iteration"));
|
||||
}
|
||||
|
||||
@ -14209,7 +14209,7 @@ index 676087c3addd712939c865b39ddb5d9f0bc7ce25..4fad00372277b45aa622e0285a9e3278
|
||||
}
|
||||
|
||||
if (entity instanceof EnderDragon) {
|
||||
@@ -2882,13 +3074,16 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2883,13 +3075,16 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
for (int j = 0; j < i; ++j) {
|
||||
EnderDragonPart entitycomplexpart = aentitycomplexpart[j];
|
||||
|
||||
@ -14794,7 +14794,7 @@ index be05a52be037042c6158100e2ce880b8ed415d53..e479129a977721fc8061be968eefab4d
|
||||
this.removeAllEffects(org.bukkit.event.entity.EntityPotionEffectEvent.Cause.DEATH);
|
||||
this.effectsDirty = true;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
index 58f972832c39a27a8ccd606f9144e1c54adbf6f3..150bc66a9319cf33ce0782e22173e88cd77073e9 100644
|
||||
index a0d69082f5fdeee15bba0d76b940aa48cff36fa9..ac35ee3dacda9e90fd96def1b325dd8e3d0ae6c5 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -128,7 +128,7 @@ public class ServerPlayerGameMode {
|
||||
@ -15145,7 +15145,7 @@ index 79326308f6126f84a3cbb3d5a33302de048d8a50..81090d1b5d67506268a41c6387a1d453
|
||||
Collections.shuffle( this.connections );
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 64255f7db85886421d5029766e8a6d1eadb94cff..d5d2dae8589749f79520d05feb0627d3c425628b 100644
|
||||
index 8b630fc4da8a7fda08c416e70c22463f04c3b6b5..f171d25e60adfd30ad274e854592cf59cfaca430 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -292,7 +292,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@ -16384,7 +16384,7 @@ index ea27b46eec01bda427653335f922ccd068cffcb5..e551d3b875eab6851b75041f418c9a08
|
||||
return blockToFallLocation(blockState);
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 0c46a4aeafd03fbbfd590b0362d41bf2b1d5ca74..8f9e9936400d00e001f8791e9bc8213d898f6073 100644
|
||||
index 1be10c57e374ad4018c08d96cfb69397a2f541d3..630d668dddc6dfc8a3b6dd0b021ad605ef20856f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -167,7 +167,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@ -16461,7 +16461,7 @@ index 0c46a4aeafd03fbbfd590b0362d41bf2b1d5ca74..8f9e9936400d00e001f8791e9bc8213d
|
||||
// Paper end - optimise entity tracking
|
||||
|
||||
public Entity(EntityType<?> type, Level world) {
|
||||
@@ -807,6 +805,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -811,6 +809,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
|
||||
// CraftBukkit start
|
||||
public void postTick() {
|
||||
@ -16474,7 +16474,7 @@ index 0c46a4aeafd03fbbfd590b0362d41bf2b1d5ca74..8f9e9936400d00e001f8791e9bc8213d
|
||||
// No clean way to break out of ticking once the entity has been copied to a new world, so instead we move the portalling later in the tick cycle
|
||||
if (!(this instanceof ServerPlayer) && this.isAlive()) { // Paper - don't attempt to teleport dead entities
|
||||
this.handleNetherPortal();
|
||||
@@ -829,7 +833,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -833,7 +837,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
this.walkDistO = this.walkDist;
|
||||
this.xRotO = this.getXRot();
|
||||
this.yRotO = this.getYRot();
|
||||
@ -16483,7 +16483,7 @@ index 0c46a4aeafd03fbbfd590b0362d41bf2b1d5ca74..8f9e9936400d00e001f8791e9bc8213d
|
||||
if (this.canSpawnSprintParticle()) {
|
||||
this.spawnSprintParticle();
|
||||
}
|
||||
@@ -938,11 +942,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -942,11 +946,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
// This will be called every single tick the entity is in lava, so don't throw an event
|
||||
this.setSecondsOnFire(15, false);
|
||||
}
|
||||
@ -16497,7 +16497,7 @@ index 0c46a4aeafd03fbbfd590b0362d41bf2b1d5ca74..8f9e9936400d00e001f8791e9bc8213d
|
||||
// CraftBukkit end - we also don't throw an event unless the object in lava is living, to save on some event calls
|
||||
|
||||
}
|
||||
@@ -1087,8 +1091,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -1091,8 +1095,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
} else {
|
||||
this.wasOnFire = this.isOnFire();
|
||||
if (movementType == MoverType.PISTON) {
|
||||
@ -16508,7 +16508,7 @@ index 0c46a4aeafd03fbbfd590b0362d41bf2b1d5ca74..8f9e9936400d00e001f8791e9bc8213d
|
||||
movement = this.limitPistonMovement(movement);
|
||||
if (movement.equals(Vec3.ZERO)) {
|
||||
return;
|
||||
@@ -2996,7 +3000,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3000,7 +3004,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
this.passengers = ImmutableList.copyOf(list);
|
||||
}
|
||||
|
||||
@ -16517,7 +16517,7 @@ index 0c46a4aeafd03fbbfd590b0362d41bf2b1d5ca74..8f9e9936400d00e001f8791e9bc8213d
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3045,7 +3049,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3049,7 +3053,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
|
||||
entity.boardingCooldown = 60;
|
||||
@ -16526,7 +16526,7 @@ index 0c46a4aeafd03fbbfd590b0362d41bf2b1d5ca74..8f9e9936400d00e001f8791e9bc8213d
|
||||
}
|
||||
return true; // CraftBukkit
|
||||
}
|
||||
@@ -3325,6 +3329,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3329,6 +3333,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
|
||||
@Nullable
|
||||
public PlayerTeam getTeam() {
|
||||
@ -16538,7 +16538,7 @@ index 0c46a4aeafd03fbbfd590b0362d41bf2b1d5ca74..8f9e9936400d00e001f8791e9bc8213d
|
||||
if (!this.level().paperConfig().scoreboards.allowNonPlayerEntitiesOnScoreboards && !(this instanceof Player)) { return null; } // Paper
|
||||
return this.level().getScoreboard().getPlayersTeam(this.getScoreboardName());
|
||||
}
|
||||
@@ -3440,9 +3449,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3444,9 +3453,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
if (this.fireImmune()) {
|
||||
return;
|
||||
}
|
||||
@ -16550,7 +16550,7 @@ index 0c46a4aeafd03fbbfd590b0362d41bf2b1d5ca74..8f9e9936400d00e001f8791e9bc8213d
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -3615,6 +3624,775 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3619,6 +3628,775 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
this.portalEntrancePos = original.portalEntrancePos;
|
||||
}
|
||||
|
||||
@ -17326,7 +17326,7 @@ index 0c46a4aeafd03fbbfd590b0362d41bf2b1d5ca74..8f9e9936400d00e001f8791e9bc8213d
|
||||
@Nullable
|
||||
public Entity changeDimension(ServerLevel destination) {
|
||||
// CraftBukkit start
|
||||
@@ -3623,6 +4401,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3627,6 +4405,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
|
||||
@Nullable
|
||||
public Entity teleportTo(ServerLevel worldserver, Vec3 location) {
|
||||
@ -17338,7 +17338,7 @@ index 0c46a4aeafd03fbbfd590b0362d41bf2b1d5ca74..8f9e9936400d00e001f8791e9bc8213d
|
||||
// CraftBukkit end
|
||||
// Paper start - fix bad state entities causing dupes
|
||||
if (!this.isAlive() || !this.valid) {
|
||||
@@ -3715,6 +4498,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3719,6 +4502,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
}
|
||||
|
||||
@ -17351,7 +17351,7 @@ index 0c46a4aeafd03fbbfd590b0362d41bf2b1d5ca74..8f9e9936400d00e001f8791e9bc8213d
|
||||
protected void removeAfterChangingDimensions() {
|
||||
this.setRemoved(Entity.RemovalReason.CHANGED_DIMENSION);
|
||||
}
|
||||
@@ -4652,7 +5441,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -4663,7 +5452,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
}
|
||||
// Paper end - fix MC-4
|
||||
@ -17361,7 +17361,7 @@ index 0c46a4aeafd03fbbfd590b0362d41bf2b1d5ca74..8f9e9936400d00e001f8791e9bc8213d
|
||||
synchronized (this.posLock) { // Paper
|
||||
this.position = new Vec3(x, y, z);
|
||||
} // Paper
|
||||
@@ -4673,7 +5463,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -4684,7 +5474,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
|
||||
// Paper start - never allow AABB to become desynced from position
|
||||
// hanging has its own special logic
|
||||
@ -17370,7 +17370,7 @@ index 0c46a4aeafd03fbbfd590b0362d41bf2b1d5ca74..8f9e9936400d00e001f8791e9bc8213d
|
||||
this.setBoundingBox(this.makeBoundingBox());
|
||||
}
|
||||
// Paper end
|
||||
@@ -4760,6 +5550,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -4771,6 +5561,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
return this.removalReason != null;
|
||||
}
|
||||
|
||||
@ -17383,7 +17383,7 @@ index 0c46a4aeafd03fbbfd590b0362d41bf2b1d5ca74..8f9e9936400d00e001f8791e9bc8213d
|
||||
@Nullable
|
||||
public Entity.RemovalReason getRemovalReason() {
|
||||
return this.removalReason;
|
||||
@@ -4775,6 +5571,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -4786,6 +5582,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
// Paper end - rewrite chunk system
|
||||
final boolean alreadyRemoved = this.removalReason != null;
|
||||
@ -17393,7 +17393,7 @@ index 0c46a4aeafd03fbbfd590b0362d41bf2b1d5ca74..8f9e9936400d00e001f8791e9bc8213d
|
||||
if (this.removalReason == null) {
|
||||
this.removalReason = reason;
|
||||
}
|
||||
@@ -4797,6 +5596,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -4808,6 +5607,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
this.removalReason = null;
|
||||
}
|
||||
|
||||
@ -17496,7 +17496,7 @@ index bc908b75cb99536df658281ae7f8b4eeedbbedc9..46b835f65ec64720efa54cc524f16a3f
|
||||
|
||||
while (!flag2 && blockposition.getY() > world.getMinBuildHeight()) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index e0cf7771488ab0065708d68b4e8550b865af0ed4..6a04de78f9f936a4279edd6dda3e2605940fadd5 100644
|
||||
index a7fbd329ea6d36a46c00b4476c74e426dbbfe238..cdcca7c9a9635151584f094814ab4902d9eb7595 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -137,6 +137,14 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||
@ -18417,7 +18417,7 @@ index ccc1caafb0ada52c7b99b7358253826f5390843e..9fc136aae606691e133d2e56eefb52f5
|
||||
return false;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
index 42ebd91196ae420eee57f4380abc558555457163..f7cc9b8b4fbdaeb48c45eaa574e79e4796007b61 100644
|
||||
index b61a367048c3d6dfef187fef35a5dc7471f891d0..4ff6e41210e28b4ca397d25a7ced00b4ed7d31ab 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
@@ -156,6 +156,11 @@ public abstract class AbstractArrow extends Projectile {
|
||||
@ -18923,7 +18923,7 @@ index 31831811ce16265e9828fa34d9e67d8ac195d723..287024eaee26390a469162d63045a7cb
|
||||
|
||||
if (raid1.isActive() && d1 < d0) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/MinecartCommandBlock.java b/src/main/java/net/minecraft/world/entity/vehicle/MinecartCommandBlock.java
|
||||
index 48b4fe75a7f881e7713885d79d4ef5ec7b574a2d..1e1adbb68596bd8351ec77da67e6fd8139734b61 100644
|
||||
index 88b00556322f078b8a9d28fb7c759bb8c84bfcf0..9badca2723f43e4caddb741252caeaf5f57ba9d6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/MinecartCommandBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/MinecartCommandBlock.java
|
||||
@@ -150,5 +150,11 @@ public class MinecartCommandBlock extends AbstractMinecart {
|
||||
@ -18965,7 +18965,7 @@ index 42d87800a328f71c5127ce5599ca4c71cc9bb1cd..4b08175b71e7f92e9bb578f9f6c2c0ef
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index de277d61b718fe07a87d75a2547bb1c7f8553aa1..5289239d64f1081086d864d047ab688dc3fda924 100644
|
||||
index 5b8a1f31e0b55da15daa4ab271317e4393a87e96..4c6420d870c62a8d684d6f331d63fc73c7874af2 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -378,31 +378,32 @@ public final class ItemStack {
|
||||
@ -19316,7 +19316,7 @@ index 9442f58dff89ec843c321533965fbee2727d02f8..2a2ea56384bbbd5d7800c3f4c1eb56cd
|
||||
private final double posX, posY, posZ;
|
||||
private final double minX, minY, minZ;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 8848eeda7a89d445e370626182f9bb4710e5edd4..48480686e8f1a554818e58890f9a8f3f4afd0a43 100644
|
||||
index 6403341f2e9d7ac4251336cb0bcc5d79dbb7bb0e..f2597960643a37c79ad189254b7073e22d607347 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -120,10 +120,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@ -19516,7 +19516,7 @@ index 8848eeda7a89d445e370626182f9bb4710e5edd4..48480686e8f1a554818e58890f9a8f3f
|
||||
this.onBlockStateChange(blockposition, iblockdata1, iblockdata2);
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -1132,7 +1151,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1137,7 +1156,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
||||
@Override
|
||||
public void neighborShapeChanged(Direction direction, BlockState neighborState, BlockPos pos, BlockPos neighborPos, int flags, int maxUpdateDepth) {
|
||||
@ -19525,7 +19525,7 @@ index 8848eeda7a89d445e370626182f9bb4710e5edd4..48480686e8f1a554818e58890f9a8f3f
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1157,11 +1176,34 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1162,11 +1181,34 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
return this.getChunkSource().getLightEngine();
|
||||
}
|
||||
|
||||
@ -19562,7 +19562,7 @@ index 8848eeda7a89d445e370626182f9bb4710e5edd4..48480686e8f1a554818e58890f9a8f3f
|
||||
if (previous != null) {
|
||||
return previous.getHandle();
|
||||
}
|
||||
@@ -1258,7 +1300,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1263,7 +1305,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
}
|
||||
|
||||
public void addBlockEntityTicker(TickingBlockEntity ticker) {
|
||||
@ -19571,7 +19571,7 @@ index 8848eeda7a89d445e370626182f9bb4710e5edd4..48480686e8f1a554818e58890f9a8f3f
|
||||
}
|
||||
|
||||
protected void tickBlockEntities() {
|
||||
@@ -1266,11 +1308,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1271,11 +1313,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
||||
gameprofilerfiller.push("blockEntities");
|
||||
this.timings.tileEntityPending.startTiming(); // Spigot
|
||||
@ -19587,7 +19587,7 @@ index 8848eeda7a89d445e370626182f9bb4710e5edd4..48480686e8f1a554818e58890f9a8f3f
|
||||
this.timings.tileEntityPending.stopTiming(); // Spigot
|
||||
|
||||
this.timings.tileEntityTick.startTiming(); // Spigot
|
||||
@@ -1281,9 +1322,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1286,9 +1327,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
int tilesThisCycle = 0;
|
||||
var toRemove = new it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet<TickingBlockEntity>(); // Paper - use removeAll
|
||||
toRemove.add(null);
|
||||
@ -19599,7 +19599,7 @@ index 8848eeda7a89d445e370626182f9bb4710e5edd4..48480686e8f1a554818e58890f9a8f3f
|
||||
// Spigot end
|
||||
|
||||
if (tickingblockentity.isRemoved()) {
|
||||
@@ -1294,19 +1334,19 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1299,19 +1339,19 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
} else if (flag && this.shouldTickBlocksAt(tickingblockentity.getPos())) {
|
||||
tickingblockentity.tick();
|
||||
// Paper start - execute chunk tasks during tick
|
||||
@ -19624,7 +19624,7 @@ index 8848eeda7a89d445e370626182f9bb4710e5edd4..48480686e8f1a554818e58890f9a8f3f
|
||||
}
|
||||
|
||||
public <T extends Entity> void guardEntityTick(Consumer<T> tickConsumer, T entity) {
|
||||
@@ -1319,7 +1359,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1324,7 +1364,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level().getWorld().getName(), entity.getX(), entity.getY(), entity.getZ());
|
||||
MinecraftServer.LOGGER.error(msg, throwable);
|
||||
getCraftServer().getPluginManager().callEvent(new ServerExceptionEvent(new ServerInternalException(msg, throwable)));
|
||||
@ -19634,7 +19634,7 @@ index 8848eeda7a89d445e370626182f9bb4710e5edd4..48480686e8f1a554818e58890f9a8f3f
|
||||
// Paper end
|
||||
}
|
||||
}
|
||||
@@ -1419,9 +1460,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1424,9 +1465,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
||||
@Nullable
|
||||
public BlockEntity getBlockEntity(BlockPos blockposition, boolean validate) {
|
||||
@ -19650,7 +19650,7 @@ index 8848eeda7a89d445e370626182f9bb4710e5edd4..48480686e8f1a554818e58890f9a8f3f
|
||||
return blockEntity;
|
||||
}
|
||||
// Paper end
|
||||
@@ -1434,8 +1480,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1439,8 +1485,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
||||
if (!this.isOutsideBuildHeight(blockposition)) {
|
||||
// CraftBukkit start
|
||||
@ -19661,7 +19661,7 @@ index 8848eeda7a89d445e370626182f9bb4710e5edd4..48480686e8f1a554818e58890f9a8f3f
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -1515,6 +1561,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1520,6 +1566,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
||||
@Override
|
||||
public List<Entity> getEntities(@Nullable Entity except, AABB box, Predicate<? super Entity> predicate) {
|
||||
@ -19669,7 +19669,7 @@ index 8848eeda7a89d445e370626182f9bb4710e5edd4..48480686e8f1a554818e58890f9a8f3f
|
||||
this.getProfiler().incrementCounter("getEntities");
|
||||
List<Entity> list = Lists.newArrayList();
|
||||
((ServerLevel)this).getEntityLookup().getEntities(except, box, list, predicate); // Paper - optimise this call
|
||||
@@ -1534,6 +1581,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1539,6 +1586,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
}
|
||||
|
||||
public <T extends Entity> void getEntities(EntityTypeTest<Entity, T> filter, AABB box, Predicate<? super T> predicate, List<? super T> result, int limit) {
|
||||
@ -19677,7 +19677,7 @@ index 8848eeda7a89d445e370626182f9bb4710e5edd4..48480686e8f1a554818e58890f9a8f3f
|
||||
this.getProfiler().incrementCounter("getEntities");
|
||||
// Paper start - optimise this call
|
||||
//TODO use limit
|
||||
@@ -1571,13 +1619,30 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1576,13 +1624,30 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
||||
public void disconnect() {}
|
||||
|
||||
@ -19710,7 +19710,7 @@ index 8848eeda7a89d445e370626182f9bb4710e5edd4..48480686e8f1a554818e58890f9a8f3f
|
||||
|
||||
public boolean mayInteract(Player player, BlockPos pos) {
|
||||
return true;
|
||||
@@ -1781,8 +1846,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1786,8 +1851,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
}
|
||||
public final BlockPos.MutableBlockPos getRandomBlockPosition(int x, int y, int z, int l, BlockPos.MutableBlockPos out) {
|
||||
// Paper end
|
||||
@ -19720,7 +19720,7 @@ index 8848eeda7a89d445e370626182f9bb4710e5edd4..48480686e8f1a554818e58890f9a8f3f
|
||||
|
||||
out.set(x + (i1 & 15), y + (i1 >> 16 & l), z + (i1 >> 8 & 15)); // Paper - change to setValues call
|
||||
return out; // Paper
|
||||
@@ -1813,7 +1877,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1818,7 +1882,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
||||
@Override
|
||||
public long nextSubTickCount() {
|
||||
@ -19880,10 +19880,10 @@ index 04b1aa22ac1df39d274f27d9c93e0492a8a673f8..2599e0f62ef172340c54c80c997f7a65
|
||||
}
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
index 4d50dd92a7f3187ee1d8edb926e7c273c8156549..c98a6875f72d067de65f4cff05818ee3f0b3d90f 100644
|
||||
index e21867d3956078bb0db4ceed45e5811e9acd7377..237e4ddf454bdcbda24420d156ed19ec694d3616 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
@@ -389,8 +389,8 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
@@ -397,8 +397,8 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
|
||||
entityitem.setDefaultPickUpDelay();
|
||||
// CraftBukkit start
|
||||
@ -19975,7 +19975,7 @@ index 52e92ffd6bf5d3d721807a0b3a8e2d301951f934..ed6c84ba826ead1071c56923e457aa6e
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java b/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java
|
||||
index 81d2140351775ad55546af52eb635ccdc8509d89..c4a5f7af76f60dd708d1ad7b384ec55a2ea7ec76 100644
|
||||
index a6a257027d60bfda8cb975eca7f255fb1bd1e8d5..57e9cf0d9350e3b966562bf4b18b4c1debb835df 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java
|
||||
@@ -102,7 +102,7 @@ public class DoublePlantBlock extends BushBlock {
|
||||
@ -20423,11 +20423,11 @@ index c57efcb9a79337ec791e4e8f6671612f0a82b441..526d1bfd5ad0de7bcfd0c2da902515f3
|
||||
// CraftBukkit end
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/CommandBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/CommandBlockEntity.java
|
||||
index 167f334eec90417eba05fcecec21435415771df7..3698bae85063baec031a61d24ef3286703a9d04c 100644
|
||||
index f08c77e20462bada221b5ed395ceb2f7d39ee7c0..8422e4fb36342555937002afcb3611d604a60c07 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/CommandBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/CommandBlockEntity.java
|
||||
@@ -57,6 +57,13 @@ public class CommandBlockEntity extends BlockEntity {
|
||||
return new CommandSourceStack(this, Vec3.atCenterOf(CommandBlockEntity.this.worldPosition), new Vec2(0.0F, enumdirection.toYRot()), this.getLevel(), 2, this.getName().getString(), this.getName(), this.getLevel().getServer(), (Entity) null);
|
||||
return new CommandSourceStack(this, Vec3.atCenterOf(CommandBlockEntity.this.worldPosition), new Vec2(0.0F, enumdirection.toYRot()), this.getLevel(), this.getLevel().paperConfig().commandBlocks.permissionsLevel, this.getName().getString(), this.getName(), this.getLevel().getServer(), (Entity) null); // Paper - configurable command block perm level
|
||||
}
|
||||
|
||||
+ // Folia start
|
||||
@ -21148,7 +21148,7 @@ index fa170cc1ce7011d201295b89718292d696c7fc24..744fa3a3a62ffb4b3d1e7831c93fd76d
|
||||
public void tick() {
|
||||
if (!this.blockEntity.isRemoved() && this.blockEntity.hasLevel()) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||
index 1379084a80ce25644f13736b4a5ee5fabbd9ec1f..97533c4a31ab6137072b79dc4377fd602fef9ea8 100644
|
||||
index daa7525074facfbf31c1183e872f083a02697700..84a025e4849e02f3dc1bae2d32f84be8d7f9a76b 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||
@@ -646,7 +646,7 @@ public class ChunkSerializer {
|
||||
@ -22353,7 +22353,7 @@ index a8760f015b9ee3ee408c3b9220266eb76b313ba0..fadf10c6a7fabde2c13f3aff00739a21
|
||||
tileentitybeehive.addOccupantWithPresetTicks(entitybee, false, random.nextInt(599));
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
index e5506a7d074a9f89d41f4d5d7549a458779bef20..1849c13df615dc736c22cbb58d92ddaac51db2e4 100644
|
||||
index 520b53bc604e6755251f0b14e91dce56bc5501ce..59ff22ece9361e9d781de8826f7f2cfc17d60b10 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
@@ -75,6 +75,11 @@ public class CraftBlock implements Block {
|
||||
@ -22693,7 +22693,7 @@ index 1c3e1153d08b59d29b3613fc3b50a4780aa7a3ac..56c7eda0dbfbb8987e1e642936b46e2a
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 2ec8b8f65661001716d1cb34dcc21cda7286e5d7..5a7263da8e82e45c616e6cbf227929813028b136 100644
|
||||
index da63b4050be25dcb91d04df8c2fcc643cbb0751d..676f81ae2d5b35788bcda1f74aea7b8a1253602c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -596,7 +596,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@ -22714,10 +22714,10 @@ index 2ec8b8f65661001716d1cb34dcc21cda7286e5d7..5a7263da8e82e45c616e6cbf22792981
|
||||
+ throw new UnsupportedOperationException("Must use teleportAsync while in region threading");
|
||||
+ }
|
||||
+ // Folia end - region threading
|
||||
java.util.Set<net.minecraft.world.entity.RelativeMovement> relativeArguments;
|
||||
java.util.Set<io.papermc.paper.entity.TeleportFlag> allFlags;
|
||||
Set<io.papermc.paper.entity.TeleportFlag.Relative> relativeArguments;
|
||||
Set<io.papermc.paper.entity.TeleportFlag> allFlags;
|
||||
if (flags.length == 0) {
|
||||
@@ -1944,7 +1949,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1950,7 +1955,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
private void unregisterEntity(Entity other) {
|
||||
// Paper end
|
||||
ChunkMap tracker = ((ServerLevel) this.getHandle().level()).getChunkSource().chunkMap;
|
||||
@ -22726,7 +22726,7 @@ index 2ec8b8f65661001716d1cb34dcc21cda7286e5d7..5a7263da8e82e45c616e6cbf22792981
|
||||
if (entry != null) {
|
||||
entry.removePlayer(this.getHandle());
|
||||
}
|
||||
@@ -2041,7 +2046,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2047,7 +2052,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
if (original != null) otherPlayer.setUUID(original); // Paper - uuid override
|
||||
}
|
||||
|
||||
@ -22874,7 +22874,7 @@ index ec2396f0e5d62b10450eaa7239a8c5479638b3c3..baf5605f31d3c24441da7e2fe13c923b
|
||||
int pluginIndex = CraftMagicNumbers.SUPPORTED_API.indexOf(pdf.getAPIVersion());
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java
|
||||
index a650411e3fa7e2a045ac55502c77028be348acf1..b5760a68ee09494fa5c522f5785c23f8c46cd687 100644
|
||||
index 0f115d555cbc9fed224c9e8b0fab5fae6b0e7ff2..42884e261314a8c23adb57414950db613cf6b731 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java
|
||||
@@ -69,6 +69,13 @@ public abstract class DelegatedGeneratorAccess implements WorldGenLevel {
|
||||
@ -22892,7 +22892,7 @@ index a650411e3fa7e2a045ac55502c77028be348acf1..b5760a68ee09494fa5c522f5785c23f8
|
||||
return this.handle;
|
||||
}
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
index 59103744ac6beeb12719fdefcda54eeff498229e..d88988200016c1a3cc76c017dfb7deabf6fc17af 100644
|
||||
index 2d31752478636bd21bbff5b430e5acb76b5d91c2..ea605188aad5476e8e473bc9c6c2a7c29eeed136 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -65,26 +65,27 @@ public class ActivationRange
|
||||
|
@ -29,10 +29,10 @@ index 41bf71d116ffc5431586ce54abba7f8def6c1dcf..519da6886613b8460e989767b1a21e31
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 8f9e9936400d00e001f8791e9bc8213d898f6073..34724fd847a99349f13a6690d1abe27647bc80ca 100644
|
||||
index 630d668dddc6dfc8a3b6dd0b021ad605ef20856f..0a060023da8c1ca1e4a0646e94170c8f489f48b1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2913,6 +2913,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -2917,6 +2917,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
if (!force && (!this.canRide(entity) || !entity.canAddPassenger(this))) {
|
||||
return false;
|
||||
} else {
|
||||
@ -40,7 +40,7 @@ index 8f9e9936400d00e001f8791e9bc8213d898f6073..34724fd847a99349f13a6690d1abe276
|
||||
// CraftBukkit start
|
||||
if (entity.getBukkitEntity() instanceof Vehicle && this.getBukkitEntity() instanceof LivingEntity) {
|
||||
VehicleEnterEvent event = new VehicleEnterEvent((Vehicle) entity.getBukkitEntity(), this.getBukkitEntity());
|
||||
@@ -2934,6 +2935,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -2938,6 +2939,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
if (event.isCancelled()) {
|
||||
return false;
|
||||
}
|
||||
@ -48,7 +48,7 @@ index 8f9e9936400d00e001f8791e9bc8213d898f6073..34724fd847a99349f13a6690d1abe276
|
||||
// Spigot end
|
||||
if (this.isPassenger()) {
|
||||
this.stopRiding();
|
||||
@@ -3012,6 +3014,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3016,6 +3018,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)");
|
||||
} else {
|
||||
// CraftBukkit start
|
||||
@ -56,7 +56,7 @@ index 8f9e9936400d00e001f8791e9bc8213d898f6073..34724fd847a99349f13a6690d1abe276
|
||||
CraftEntity craft = (CraftEntity) entity.getBukkitEntity().getVehicle();
|
||||
Entity orig = craft == null ? null : craft.getHandle();
|
||||
if (this.getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) {
|
||||
@@ -3039,6 +3042,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3043,6 +3046,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
if (event.isCancelled()) {
|
||||
return false;
|
||||
}
|
||||
@ -2130,7 +2130,7 @@ index 2638c341bc02f201f7ab17fdebcdbdf3a7ec05bf..0f5c2d31a2dea13a46ba81e353393633
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 5a7263da8e82e45c616e6cbf227929813028b136..a288ed0640bfe852677294398474510ab578577a 100644
|
||||
index 676f81ae2d5b35788bcda1f74aea7b8a1253602c..f02a72c0589960d2c60e4155b3b9e0ddd22067d8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -616,7 +616,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@ -2142,7 +2142,7 @@ index 5a7263da8e82e45c616e6cbf227929813028b136..a288ed0640bfe852677294398474510a
|
||||
final ServerGamePacketListenerImpl connection = this.getHandle().connection;
|
||||
if (connection != null) {
|
||||
connection.disconnect(message == null ? net.kyori.adventure.text.Component.empty() : message, cause);
|
||||
@@ -2200,9 +2200,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2206,9 +2206,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -2160,7 +2160,7 @@ index 5a7263da8e82e45c616e6cbf227929813028b136..a288ed0640bfe852677294398474510a
|
||||
}
|
||||
|
||||
public void setHandle(final ServerPlayer entity) {
|
||||
@@ -3236,7 +3243,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -3242,7 +3249,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
{
|
||||
if ( CraftPlayer.this.getHealth() <= 0 && CraftPlayer.this.isOnline() )
|
||||
{
|
||||
|
@ -9,10 +9,10 @@ add explicit block update suppression techniques, it's better
|
||||
than the server crashing.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 48480686e8f1a554818e58890f9a8f3f4afd0a43..b924986c4e3b9e20a4100481c5d6534b040950af 100644
|
||||
index f2597960643a37c79ad189254b7073e22d607347..833f65c7b66a9b87b34118ed12d4d701a54b8e61 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -1758,7 +1758,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1763,7 +1763,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
Direction enumdirection = (Direction) iterator.next();
|
||||
BlockPos blockposition1 = pos.relative(enumdirection);
|
||||
|
||||
|
@ -1460,7 +1460,7 @@ index 027d95e0763c6e18380b706fcd7f48c09a7cc17a..9ea861c1531c5f9d8a87e45512336eba
|
||||
} catch (Throwable throwable) {
|
||||
// Spigot Start
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 4bd78902afc1824f3acdeef6067eb45a8f661b65..c0aaa5ff3839698e262270f2bc315d39c31620ea 100644
|
||||
index 27513071da19c4c37640a7538fa976d166fb5b09..d7dc0c26b6093455ff32e60f6541f4b8923a35b3 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -470,16 +470,21 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@ -1629,7 +1629,7 @@ index a21cc9c7d5981c742f379affe9c1ef4dcb0fa1e1..88db5ada13329a5fe0d0fb652d2c8a8d
|
||||
// Folia end - region threading
|
||||
// Paper end - optimise chunk tick iteration
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 4fad00372277b45aa622e0285a9e3278be082392..fdb5237935a13322d8e7332b199308513b9f8e9b 100644
|
||||
index 8d3dca767e5928756e2767d60ca92fcc4cc760f1..788d6581e5283d6cbdefec158a00cc30aa67aaa9 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -898,6 +898,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@ -1795,7 +1795,7 @@ index e63ad8ed0318fb99e99a8609ef6a31d16f87e7ff..ded539dd20a2d037fa5d175be06d59dd
|
||||
if (interval != -1 && max != -1 && ++numSaved >= max) {
|
||||
break;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
index 940b8d0b89d7e55c938aefbe80ee71b0db3dacb8..a3a6c10f5b4157062a8a8d5ee4638c4e9d6fcf62 100644
|
||||
index 6cfce9755dd464a7afb01f9032e567ce3bcd5bc5..d37a7f2ab6a8041d3bfeed600d15f77d253140f6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
@@ -326,6 +326,13 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||
@ -1826,7 +1826,7 @@ index 940b8d0b89d7e55c938aefbe80ee71b0db3dacb8..a3a6c10f5b4157062a8a8d5ee4638c4e
|
||||
this.factory = factory;
|
||||
this.category = spawnGroup;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index b924986c4e3b9e20a4100481c5d6534b040950af..642cf0b4846cd711958483f72bf85fa7fadd85cb 100644
|
||||
index 833f65c7b66a9b87b34118ed12d4d701a54b8e61..9c176121ac708be71726a67ab4da50113ee3f850 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -229,6 +229,9 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@ -1849,7 +1849,7 @@ index b924986c4e3b9e20a4100481c5d6534b040950af..642cf0b4846cd711958483f72bf85fa7
|
||||
}
|
||||
|
||||
// Paper start
|
||||
@@ -1304,17 +1310,21 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1309,17 +1315,21 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
}
|
||||
|
||||
protected void tickBlockEntities() {
|
||||
@ -1871,7 +1871,7 @@ index b924986c4e3b9e20a4100481c5d6534b040950af..642cf0b4846cd711958483f72bf85fa7
|
||||
// Spigot start
|
||||
// Iterator<TickingBlockEntity> iterator = this.blockEntityTickers.iterator();
|
||||
boolean flag = this.tickRateManager().runsNormally();
|
||||
@@ -1341,6 +1351,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1346,6 +1356,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
}
|
||||
}
|
||||
blockEntityTickers.removeAll(toRemove); // Folia - regionised ticking
|
||||
|
Loading…
Reference in New Issue
Block a user