mirror of
https://github.com/PaperMC/Folia.git
synced 2024-11-21 11:55:11 +01:00
Update paper
This commit is contained in:
parent
905cf0b6be
commit
84aecdc64a
@ -2,7 +2,7 @@ group=dev.folia
|
|||||||
|
|
||||||
version=1.20.2-R0.1-SNAPSHOT
|
version=1.20.2-R0.1-SNAPSHOT
|
||||||
mcVersion=1.20.2
|
mcVersion=1.20.2
|
||||||
paperRef=29a02095754a8bc76f996f53e1da1cc04b5fd167
|
paperRef=99b735c1acd147be05bf1ede13ec757b1a624342
|
||||||
|
|
||||||
org.gradle.caching=true
|
org.gradle.caching=true
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
|
@ -1542,7 +1542,7 @@ index 1b090f1e79b996e52097afc49c1cec85936653e6..07abf5a326cc7aa8a449b74bd7ac8a43
|
|||||||
if (loader == null || loader.world != this.world) {
|
if (loader == null || loader.world != this.world) {
|
||||||
// not our problem anymore
|
// not our problem anymore
|
||||||
diff --git a/src/main/java/io/papermc/paper/chunk/system/entity/EntityLookup.java b/src/main/java/io/papermc/paper/chunk/system/entity/EntityLookup.java
|
diff --git a/src/main/java/io/papermc/paper/chunk/system/entity/EntityLookup.java b/src/main/java/io/papermc/paper/chunk/system/entity/EntityLookup.java
|
||||||
index c4d1dbbd39ba0cdc9176ffa6d350d2aa50380211..20a42a13adaf97aa6ff668a1f2c9e5264f474716 100644
|
index 15ee41452992714108efe53b708b5a4e1da7c1ff..5bef4f50082e56b89239cfd62dd7429926b71c09 100644
|
||||||
--- a/src/main/java/io/papermc/paper/chunk/system/entity/EntityLookup.java
|
--- a/src/main/java/io/papermc/paper/chunk/system/entity/EntityLookup.java
|
||||||
+++ b/src/main/java/io/papermc/paper/chunk/system/entity/EntityLookup.java
|
+++ b/src/main/java/io/papermc/paper/chunk/system/entity/EntityLookup.java
|
||||||
@@ -191,7 +191,12 @@ public final class EntityLookup implements LevelEntityGetter<Entity> {
|
@@ -191,7 +191,12 @@ public final class EntityLookup implements LevelEntityGetter<Entity> {
|
||||||
@ -1559,7 +1559,7 @@ index c4d1dbbd39ba0cdc9176ffa6d350d2aa50380211..20a42a13adaf97aa6ff668a1f2c9e526
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Entity[] getAllCopy() {
|
public Entity[] getAllCopy() {
|
||||||
@@ -269,7 +274,9 @@ public final class EntityLookup implements LevelEntityGetter<Entity> {
|
@@ -277,7 +282,9 @@ public final class EntityLookup implements LevelEntityGetter<Entity> {
|
||||||
if (newVisibility.ordinal() > oldVisibility.ordinal()) {
|
if (newVisibility.ordinal() > oldVisibility.ordinal()) {
|
||||||
// status upgrade
|
// status upgrade
|
||||||
if (!oldVisibility.isAccessible() && newVisibility.isAccessible()) {
|
if (!oldVisibility.isAccessible() && newVisibility.isAccessible()) {
|
||||||
@ -1569,7 +1569,7 @@ index c4d1dbbd39ba0cdc9176ffa6d350d2aa50380211..20a42a13adaf97aa6ff668a1f2c9e526
|
|||||||
EntityLookup.this.worldCallback.onTrackingStart(entity);
|
EntityLookup.this.worldCallback.onTrackingStart(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -283,7 +290,9 @@ public final class EntityLookup implements LevelEntityGetter<Entity> {
|
@@ -291,7 +298,9 @@ public final class EntityLookup implements LevelEntityGetter<Entity> {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (oldVisibility.isAccessible() && !newVisibility.isAccessible()) {
|
if (oldVisibility.isAccessible() && !newVisibility.isAccessible()) {
|
||||||
@ -1579,7 +1579,7 @@ index c4d1dbbd39ba0cdc9176ffa6d350d2aa50380211..20a42a13adaf97aa6ff668a1f2c9e526
|
|||||||
EntityLookup.this.worldCallback.onTrackingEnd(entity);
|
EntityLookup.this.worldCallback.onTrackingEnd(entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -426,6 +435,8 @@ public final class EntityLookup implements LevelEntityGetter<Entity> {
|
@@ -434,6 +443,8 @@ public final class EntityLookup implements LevelEntityGetter<Entity> {
|
||||||
|
|
||||||
entity.setLevelCallback(new EntityCallback(entity));
|
entity.setLevelCallback(new EntityCallback(entity));
|
||||||
|
|
||||||
@ -1588,7 +1588,7 @@ index c4d1dbbd39ba0cdc9176ffa6d350d2aa50380211..20a42a13adaf97aa6ff668a1f2c9e526
|
|||||||
this.entityStatusChange(entity, slices, Visibility.HIDDEN, getEntityStatus(entity), false, !fromDisk, false);
|
this.entityStatusChange(entity, slices, Visibility.HIDDEN, getEntityStatus(entity), false, !fromDisk, false);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -442,6 +453,19 @@ public final class EntityLookup implements LevelEntityGetter<Entity> {
|
@@ -450,6 +461,19 @@ public final class EntityLookup implements LevelEntityGetter<Entity> {
|
||||||
return slices == null || !slices.isPreventingStatusUpdates();
|
return slices == null || !slices.isPreventingStatusUpdates();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1608,7 +1608,7 @@ index c4d1dbbd39ba0cdc9176ffa6d350d2aa50380211..20a42a13adaf97aa6ff668a1f2c9e526
|
|||||||
private void removeEntity(final Entity entity) {
|
private void removeEntity(final Entity entity) {
|
||||||
final int sectionX = entity.sectionX;
|
final int sectionX = entity.sectionX;
|
||||||
final int sectionY = entity.sectionY;
|
final int sectionY = entity.sectionY;
|
||||||
@@ -856,12 +880,18 @@ public final class EntityLookup implements LevelEntityGetter<Entity> {
|
@@ -864,12 +888,18 @@ public final class EntityLookup implements LevelEntityGetter<Entity> {
|
||||||
@Override
|
@Override
|
||||||
public void onMove() {
|
public void onMove() {
|
||||||
final Entity entity = this.entity;
|
final Entity entity = this.entity;
|
||||||
@ -1627,7 +1627,7 @@ index c4d1dbbd39ba0cdc9176ffa6d350d2aa50380211..20a42a13adaf97aa6ff668a1f2c9e526
|
|||||||
final Visibility newVisibility = getEntityStatus(entity);
|
final Visibility newVisibility = getEntityStatus(entity);
|
||||||
|
|
||||||
EntityLookup.this.entityStatusChange(entity, newSlices, oldVisibility, newVisibility, true, false, false);
|
EntityLookup.this.entityStatusChange(entity, newSlices, oldVisibility, newVisibility, true, false, false);
|
||||||
@@ -878,6 +908,9 @@ public final class EntityLookup implements LevelEntityGetter<Entity> {
|
@@ -886,6 +916,9 @@ public final class EntityLookup implements LevelEntityGetter<Entity> {
|
||||||
EntityLookup.this.entityStatusChange(entity, null, tickingState, Visibility.HIDDEN, false, false, reason.shouldDestroy());
|
EntityLookup.this.entityStatusChange(entity, null, tickingState, Visibility.HIDDEN, false, false, reason.shouldDestroy());
|
||||||
|
|
||||||
this.entity.setLevelCallback(NoOpCallback.INSTANCE);
|
this.entity.setLevelCallback(NoOpCallback.INSTANCE);
|
||||||
@ -13993,7 +13993,7 @@ index 17610196db7a1c6feb2cf74a02479a8691aa323f..32fdb3d70442257201472f9f1c1ad466
|
|||||||
for (ServerPlayer player : ServerLevel.this.players) {
|
for (ServerPlayer player : ServerLevel.this.players) {
|
||||||
player.getBukkitEntity().onEntityRemove(entity);
|
player.getBukkitEntity().onEntityRemove(entity);
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
index d4aec99cac3f83d764e21946cc904c00e084704e..914910653d90c9519062a0f1ccc9bb2f1e3ec417 100644
|
index 76157319b79d7fefe38cb2cc10b2d79c12667e3d..3c09a5d7f1fc25419503bdc46593ef30b44318a3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
@@ -185,7 +185,7 @@ import org.bukkit.inventory.MainHand;
|
@@ -185,7 +185,7 @@ import org.bukkit.inventory.MainHand;
|
||||||
@ -14005,7 +14005,7 @@ index d4aec99cac3f83d764e21946cc904c00e084704e..914910653d90c9519062a0f1ccc9bb2f
|
|||||||
private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_XZ = 32;
|
private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_XZ = 32;
|
||||||
private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_Y = 10;
|
private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_Y = 10;
|
||||||
public ServerGamePacketListenerImpl connection;
|
public ServerGamePacketListenerImpl connection;
|
||||||
@@ -462,51 +462,151 @@ public class ServerPlayer extends Player {
|
@@ -463,51 +463,151 @@ public class ServerPlayer extends Player {
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@ -14187,7 +14187,7 @@ index d4aec99cac3f83d764e21946cc904c00e084704e..914910653d90c9519062a0f1ccc9bb2f
|
|||||||
return horizontalSpawnArea <= 16 ? horizontalSpawnArea - 1 : 17;
|
return horizontalSpawnArea <= 16 ? horizontalSpawnArea - 1 : 17;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1165,6 +1265,337 @@ public class ServerPlayer extends Player {
|
@@ -1166,6 +1266,337 @@ public class ServerPlayer extends Player {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -14525,7 +14525,7 @@ index d4aec99cac3f83d764e21946cc904c00e084704e..914910653d90c9519062a0f1ccc9bb2f
|
|||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public Entity changeDimension(ServerLevel destination) {
|
public Entity changeDimension(ServerLevel destination) {
|
||||||
@@ -1174,6 +1605,11 @@ public class ServerPlayer extends Player {
|
@@ -1175,6 +1606,11 @@ public class ServerPlayer extends Player {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public Entity changeDimension(ServerLevel worldserver, PlayerTeleportEvent.TeleportCause cause) {
|
public Entity changeDimension(ServerLevel worldserver, PlayerTeleportEvent.TeleportCause cause) {
|
||||||
@ -14537,7 +14537,7 @@ index d4aec99cac3f83d764e21946cc904c00e084704e..914910653d90c9519062a0f1ccc9bb2f
|
|||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
if (this.isSleeping()) return this; // CraftBukkit - SPIGOT-3154
|
if (this.isSleeping()) return this; // CraftBukkit - SPIGOT-3154
|
||||||
// this.isChangingDimension = true; // CraftBukkit - Moved down and into PlayerList#changeDimension
|
// this.isChangingDimension = true; // CraftBukkit - Moved down and into PlayerList#changeDimension
|
||||||
@@ -2126,6 +2562,12 @@ public class ServerPlayer extends Player {
|
@@ -2127,6 +2563,12 @@ public class ServerPlayer extends Player {
|
||||||
public void setCamera(@Nullable Entity entity) {
|
public void setCamera(@Nullable Entity entity) {
|
||||||
Entity entity1 = this.getCamera();
|
Entity entity1 = this.getCamera();
|
||||||
|
|
||||||
@ -14550,7 +14550,7 @@ index d4aec99cac3f83d764e21946cc904c00e084704e..914910653d90c9519062a0f1ccc9bb2f
|
|||||||
this.camera = (Entity) (entity == null ? this : entity);
|
this.camera = (Entity) (entity == null ? this : entity);
|
||||||
if (entity1 != this.camera) {
|
if (entity1 != this.camera) {
|
||||||
// Paper start - Add PlayerStartSpectatingEntityEvent and PlayerStopSpectatingEntity Event
|
// Paper start - Add PlayerStartSpectatingEntityEvent and PlayerStopSpectatingEntity Event
|
||||||
@@ -2624,7 +3066,7 @@ public class ServerPlayer extends Player {
|
@@ -2625,7 +3067,7 @@ public class ServerPlayer extends Player {
|
||||||
this.experienceLevel = this.newLevel;
|
this.experienceLevel = this.newLevel;
|
||||||
this.totalExperience = this.newTotalExp;
|
this.totalExperience = this.newTotalExp;
|
||||||
this.experienceProgress = 0;
|
this.experienceProgress = 0;
|
||||||
@ -14730,10 +14730,10 @@ index 877498729c66de9aa6a27c9148f7494d7895615c..d8af2d59fb1f112f2f1a9fdbb3517fc7
|
|||||||
this.generatingStatus = status;
|
this.generatingStatus = status;
|
||||||
this.writeRadiusCutoff = placementRadius;
|
this.writeRadiusCutoff = placementRadius;
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||||
index 231150bac0ae61e9722c2cdfd70d6f7d254681e4..7c2e1bd6290e17b2d48a387b2a60350b59eb2e87 100644
|
index 20122bf191ebc74c223310aea1f004fdbb163e57..578f5989037acbca98f22316630c15da689f1dc0 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||||
@@ -86,6 +86,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
@@ -85,6 +85,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||||
ServerCommonPacketListenerImpl.LOGGER.info("Stopping singleplayer server as player logged out");
|
ServerCommonPacketListenerImpl.LOGGER.info("Stopping singleplayer server as player logged out");
|
||||||
this.server.halt(false);
|
this.server.halt(false);
|
||||||
}
|
}
|
||||||
@ -14741,7 +14741,7 @@ index 231150bac0ae61e9722c2cdfd70d6f7d254681e4..7c2e1bd6290e17b2d48a387b2a60350b
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -99,9 +100,9 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
@@ -98,9 +99,9 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||||
this.keepAlivePending = false;
|
this.keepAlivePending = false;
|
||||||
} else if (!this.isSingleplayerOwner()) {
|
} else if (!this.isSingleplayerOwner()) {
|
||||||
// Paper start - This needs to be handled on the main thread for plugins
|
// Paper start - This needs to be handled on the main thread for plugins
|
||||||
@ -14753,7 +14753,7 @@ index 231150bac0ae61e9722c2cdfd70d6f7d254681e4..7c2e1bd6290e17b2d48a387b2a60350b
|
|||||||
// Paper endg
|
// Paper endg
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -287,24 +288,8 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
@@ -279,24 +280,8 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||||
if (this.processedDisconnect) {
|
if (this.processedDisconnect) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -14780,7 +14780,7 @@ index 231150bac0ae61e9722c2cdfd70d6f7d254681e4..7c2e1bd6290e17b2d48a387b2a60350b
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -335,7 +320,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
@@ -327,7 +312,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||||
|
|
||||||
Objects.requireNonNull(this.connection);
|
Objects.requireNonNull(this.connection);
|
||||||
// CraftBukkit - Don't wait
|
// CraftBukkit - Don't wait
|
||||||
@ -22403,7 +22403,7 @@ index 315d8260e196709ed9084272aa640f11e327c0a8..1b4926c62e93158180714f58cafb31d9
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index e188bb3ba5d2ec28421947c0b66b25eecb569bfe..be7904a09181ce00acb887a35eec92070515fc05 100644
|
index 604ed1f6742a6b028b9db2809f7bd4b9a3b38f4d..13fd0b86f5b4b4f97bd0fdec4313a12210ffb38c 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -591,7 +591,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -591,7 +591,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
@ -2109,7 +2109,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
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index be7904a09181ce00acb887a35eec92070515fc05..27ace1119456c92b456d08a464c58d4231685f9c 100644
|
index 13fd0b86f5b4b4f97bd0fdec4313a12210ffb38c..44c09217241fae975fa4f734dfc5be4b03094e73 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -611,7 +611,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -611,7 +611,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
@ -9,10 +9,10 @@ data deserialization and is racey even in Vanilla. But in Folia,
|
|||||||
some accesses may throw and as such we need to fix this directly.
|
some accesses may throw and as such we need to fix this directly.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
index 914910653d90c9519062a0f1ccc9bb2f1e3ec417..500b05ce2cda7b2c0e5332e2921d55a3101fc451 100644
|
index 3c09a5d7f1fc25419503bdc46593ef30b44318a3..42ff3d94ee451ced69c1059f0dbd45085489a60d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
@@ -636,7 +636,7 @@ public class ServerPlayer extends Player {
|
@@ -637,7 +637,7 @@ public class ServerPlayer extends Player {
|
||||||
this.getBukkitEntity().readExtraData(nbt); // CraftBukkit
|
this.getBukkitEntity().readExtraData(nbt); // CraftBukkit
|
||||||
|
|
||||||
if (this.isSleeping()) {
|
if (this.isSleeping()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user