mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Rebuild patches
Cos, you know, pushing the correct changes the first time woulda been overrated
This commit is contained in:
parent
f3497a0c5c
commit
729db1bed4
1 changed files with 20 additions and 5 deletions
|
@ -45,6 +45,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ // Paper start
|
||||
Entity other = ((CraftEntity) entity).getHandle();
|
||||
+ unregisterEntity(other);
|
||||
+
|
||||
+ server.getPluginManager().callEvent(new PlayerHideEntityEvent(this, entity));
|
||||
+ }
|
||||
+ private void unregisterEntity(Entity other) {
|
||||
+ // Paper end
|
||||
|
@ -52,6 +54,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
ChunkMap.TrackedEntity entry = tracker.entityMap.get(other.getId());
|
||||
if (entry != null) {
|
||||
entry.removePlayer(this.getHandle());
|
||||
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
this.getHandle().connection.send(new ClientboundPlayerInfoPacket(ClientboundPlayerInfoPacket.Action.REMOVE_PLAYER, otherPlayer));
|
||||
}
|
||||
}
|
||||
-
|
||||
- server.getPluginManager().callEvent(new PlayerHideEntityEvent(this, entity));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
this.hiddenEntities.remove(entity.getUniqueId());
|
||||
|
@ -60,6 +71,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ // Paper start
|
||||
Entity other = ((CraftEntity) entity).getHandle();
|
||||
+ registerEntity(other);
|
||||
+
|
||||
+ server.getPluginManager().callEvent(new PlayerShowEntityEvent(this, entity));
|
||||
+ }
|
||||
+ private void registerEntity(Entity other) {
|
||||
+ ChunkMap tracker = ((ServerLevel) this.getHandle().level).getChunkSource().chunkMap;
|
||||
|
@ -68,9 +81,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
if (other instanceof ServerPlayer) {
|
||||
ServerPlayer otherPlayer = (ServerPlayer) other;
|
||||
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
server.getPluginManager().callEvent(new PlayerShowEntityEvent(this, entity));
|
||||
}
|
||||
if (entry != null && !entry.seenBy.contains(this.getHandle().connection)) {
|
||||
entry.updatePlayer(this.getHandle());
|
||||
}
|
||||
+ }
|
||||
+ // Paper start
|
||||
+ private void reregisterPlayer(ServerPlayer player) {
|
||||
+ if (!hiddenEntities.containsKey(player.getUUID())) {
|
||||
|
@ -93,7 +107,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ public com.destroystokyo.paper.profile.PlayerProfile getPlayerProfile() {
|
||||
+ return new com.destroystokyo.paper.profile.CraftPlayerProfile(this).clone();
|
||||
+ }
|
||||
+
|
||||
|
||||
- server.getPluginManager().callEvent(new PlayerShowEntityEvent(this, entity));
|
||||
+ private void refreshPlayer() {
|
||||
+ ServerPlayer handle = getHandle();
|
||||
+
|
||||
|
@ -113,7 +128,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ this.setOp(false);
|
||||
+ this.setOp(true);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
+ // Paper end
|
||||
|
||||
public void onEntityRemove(Entity entity) {
|
||||
|
|
Loading…
Reference in a new issue