readd beacon effect cause

This commit is contained in:
Lulu13022002
2024-12-18 19:09:46 +01:00
parent dedc6b3394
commit 6126012369
102 changed files with 443 additions and 488 deletions

View File

@@ -21,11 +21,11 @@
private final Queue<Consumer<Connection>> pendingActions = Queues.newConcurrentLinkedQueue();
public Channel channel;
public SocketAddress address;
+ // Spigot Start
+ // Spigot start
+ public java.util.UUID spoofedUUID;
+ public com.mojang.authlib.properties.Property[] spoofedProfile;
+ public boolean preparing = true;
+ // Spigot End
+ // Spigot end
@Nullable
private volatile PacketListener disconnectListener;
@Nullable
@@ -70,13 +70,11 @@
public Connection(PacketFlow receiving) {
this.receiving = receiving;
@@ -116,6 +_,9 @@
@@ -116,6 +_,7 @@
super.channelActive(context);
this.channel = context.channel();
this.address = this.channel.remoteAddress();
+ // Spigot Start
+ this.preparing = false;
+ // Spigot End
+ this.preparing = false; // Spigot
if (this.delayedDisconnect != null) {
this.disconnect(this.delayedDisconnect);
}
@@ -228,13 +226,11 @@
}
if (this.tickCount++ % 20 == 0) {
@@ -432,12 +_,15 @@
@@ -432,12 +_,13 @@
}
public void disconnect(DisconnectionDetails disconnectionDetails) {
+ // Spigot Start
+ this.preparing = false;
+ // Spigot End
+ this.preparing = false; // Spigot
if (this.channel == null) {
this.delayedDisconnect = disconnectionDetails;
}

View File

@@ -18,7 +18,7 @@
buffer.writeVarInt(this.entity);
int size = this.slots.size();
+ try (io.papermc.paper.util.DataSanitizationUtil.DataSanitizer ignored = io.papermc.paper.util.DataSanitizationUtil.start(this.sanitize)) { // Paper - data sanitization
+ try (io.papermc.paper.util.DataSanitizationUtil.DataSanitizer ignored = io.papermc.paper.util.DataSanitizationUtil.start(this.sanitize)) { // Paper - data sanitization
for (int i = 0; i < size; i++) {
Pair<EquipmentSlot, ItemStack> pair = this.slots.get(i);
EquipmentSlot equipmentSlot = pair.getFirst();

View File

@@ -17,7 +17,7 @@
buffer.writeByte(this.options);
buffer.writeUtf(this.nametagVisibility);
- buffer.writeUtf(this.collisionRule);
+ buffer.writeUtf(!io.papermc.paper.configuration.GlobalConfiguration.get().collisions.enablePlayerCollisions ? "never" : this.collisionRule); // Paper - Configurable player collision
+ buffer.writeUtf(!io.papermc.paper.configuration.GlobalConfiguration.get().collisions.enablePlayerCollisions ? PlayerTeam.CollisionRule.NEVER.name : this.collisionRule); // Paper - Configurable player collision
buffer.writeEnum(this.color);
ComponentSerialization.TRUSTED_STREAM_CODEC.encode(buffer, this.playerPrefix);
ComponentSerialization.TRUSTED_STREAM_CODEC.encode(buffer, this.playerSuffix);