Update to Minecraft 1.21.2

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2024-10-23 02:15:00 +11:00
parent 2c4beb962b
commit d3a23f42c3
522 changed files with 8501 additions and 6477 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/level/EntityTrackerEntry.java
+++ b/net/minecraft/server/level/EntityTrackerEntry.java
@@ -46,6 +46,12 @@
@@ -50,6 +50,12 @@
import net.minecraft.world.phys.Vec3D;
import org.slf4j.Logger;
@@ -13,7 +13,7 @@
public class EntityTrackerEntry {
private static final Logger LOGGER = LogUtils.getLogger();
@@ -70,8 +76,12 @@
@@ -74,8 +80,12 @@
private boolean wasOnGround;
@Nullable
private List<DataWatcher.c<?>> trackedDataValues;
@@ -27,7 +27,7 @@
this.level = worldserver;
this.broadcast = consumer;
this.entity = entity;
@@ -90,7 +100,7 @@
@@ -94,7 +104,7 @@
List<Entity> list = this.entity.getPassengers();
if (!list.equals(this.lastPassengers)) {
@@ -36,7 +36,7 @@
removedPassengers(list, this.lastPassengers).forEach((entity) -> {
if (entity instanceof EntityPlayer entityplayer) {
entityplayer.connection.teleport(entityplayer.getX(), entityplayer.getY(), entityplayer.getZ(), entityplayer.getYRot(), entityplayer.getXRot());
@@ -103,18 +113,18 @@
@@ -107,18 +117,18 @@
Entity entity = this.entity;
if (entity instanceof EntityItemFrame entityitemframe) {
@@ -59,7 +59,7 @@
worldmap.tickCarriedBy(entityplayer, itemstack);
Packet<?> packet = worldmap.getUpdatePacket(mapid, entityplayer);
@@ -232,6 +242,27 @@
@@ -248,6 +258,27 @@
++this.tickCount;
if (this.entity.hurtMarked) {
@@ -87,7 +87,7 @@
this.entity.hurtMarked = false;
this.broadcastAndSend(new PacketPlayOutEntityVelocity(this.entity));
}
@@ -260,7 +291,10 @@
@@ -298,7 +329,10 @@
public void sendPairingData(EntityPlayer entityplayer, Consumer<Packet<PacketListenerPlayOut>> consumer) {
if (this.entity.isRemoved()) {
@@ -99,7 +99,7 @@
}
Packet<PacketListenerPlayOut> packet = this.entity.getAddEntityPacket(this);
@@ -275,6 +309,12 @@
@@ -313,6 +347,12 @@
if (this.entity instanceof EntityLiving) {
Collection<AttributeModifiable> collection = ((EntityLiving) this.entity).getAttributes().getSyncableAttributes();
@@ -112,7 +112,7 @@
if (!collection.isEmpty()) {
consumer.accept(new PacketPlayOutUpdateAttributes(this.entity.getId(), collection));
}
@@ -305,6 +345,7 @@
@@ -344,6 +384,7 @@
if (!list.isEmpty()) {
consumer.accept(new PacketPlayOutEntityEquipment(this.entity.getId(), list));
}
@@ -120,7 +120,7 @@
}
if (!this.entity.getPassengers().isEmpty()) {
@@ -358,6 +399,11 @@
@@ -396,6 +437,11 @@
Set<AttributeModifiable> set = ((EntityLiving) this.entity).getAttributes().getAttributesToSync();
if (!set.isEmpty()) {