3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-23 23:00:08 +01:00

Fix wrong diff applying delta twice (#10959)

Dieser Commit ist enthalten in:
Lulu13022002 2024-06-22 20:11:34 +02:00 committet von GitHub
Ursprung 77c763b5ef
Commit 76c2f16f57
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B5690EEEBB952194
41 geänderte Dateien mit 90 neuen und 89 gelöschten Zeilen

Datei anzeigen

@ -11,13 +11,14 @@ Co-authored-by: aerulion <aerulion@gmail.com>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index d6017d9d71fb4b3a3df6eaa44da0ebda54c83da4..5e7cf17779685355011bb0f684c110807a7736c7 100644
index d6017d9d71fb4b3a3df6eaa44da0ebda54c83da4..629942afb41f73ca7a7855cba58c81fd0e734a7a 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1962,6 +1962,21 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -1962,7 +1962,21 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
public void push(double deltaX, double deltaY, double deltaZ) {
- this.setDeltaMovement(this.getDeltaMovement().add(deltaX, deltaY, deltaZ));
+ // Paper start - Add EntityKnockbackByEntityEvent and EntityPushedByEntityAttackEvent
+ this.push(deltaX, deltaY, deltaZ, null);
+ }
@ -33,9 +34,9 @@ index d6017d9d71fb4b3a3df6eaa44da0ebda54c83da4..5e7cf17779685355011bb0f684c11080
+ }
+ this.setDeltaMovement(this.getDeltaMovement().add(delta.getX(), delta.getY(), delta.getZ()));
+ // Paper end - Add EntityKnockbackByEntityEvent and EntityPushedByEntityAttackEvent
this.setDeltaMovement(this.getDeltaMovement().add(deltaX, deltaY, deltaZ));
this.hasImpulse = true;
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index a054aaa3713f911512358cbd63c202a8a7bb8236..ebd81b34d1fbb31ce0f9c92593154fdb6b62bf52 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] add more information to Entity.toString()
UUID, ticks lived, valid, dead
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 5e7cf17779685355011bb0f684c110807a7736c7..4ba77d4b109bc33d47130519c1fac704434d393d 100644
index 629942afb41f73ca7a7855cba58c81fd0e734a7a..f431c5a17bfc3bdf2a464470af4ec5e226b0d13e 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3280,7 +3280,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3279,7 +3279,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
public String toString() {
String s = this.level() == null ? "~NULL~" : this.level().toString();

Datei anzeigen

@ -43,7 +43,7 @@ index ce6be7aed7b392c3e0c851f3f6e1e216bccceaf5..b151506b96a51c74ba408cb555a4d385
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
return false;
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 4ba77d4b109bc33d47130519c1fac704434d393d..3830440b913bd2693f2922483e57419c76117315 100644
index f431c5a17bfc3bdf2a464470af4ec5e226b0d13e..131eda47e7a9f90a4057607870acbcb8fecfbf0b 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -250,6 +250,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess

Datei anzeigen

@ -41,10 +41,10 @@ index b4240bdd2d2baf91f52458602e0063f746dcfb6d..39504d27b8e0bae74c41e89ebabced1c
Iterator iterator = entityliving.getActiveEffects().iterator();
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 3830440b913bd2693f2922483e57419c76117315..5b3de422b07f680e6639ee84f076bffb3c901d0e 100644
index 131eda47e7a9f90a4057607870acbcb8fecfbf0b..2e376b0b2bf2d49ad0669b6e6fd287628a72ea64 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2706,17 +2706,28 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2705,17 +2705,28 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
public void removeVehicle() {
@ -75,7 +75,7 @@ index 3830440b913bd2693f2922483e57419c76117315..5b3de422b07f680e6639ee84f076bffb
}
protected void addPassenger(Entity passenger) {
@@ -2741,7 +2752,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2740,7 +2751,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
}
@ -87,7 +87,7 @@ index 3830440b913bd2693f2922483e57419c76117315..5b3de422b07f680e6639ee84f076bffb
if (entity.getVehicle() == this) {
throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)");
} else {
@@ -2751,7 +2765,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2750,7 +2764,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
if (this.getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) {
VehicleExitEvent event = new VehicleExitEvent(
(Vehicle) this.getBukkitEntity(),
@ -96,7 +96,7 @@ index 3830440b913bd2693f2922483e57419c76117315..5b3de422b07f680e6639ee84f076bffb
);
// Suppress during worldgen
if (this.valid) {
@@ -2764,7 +2778,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2763,7 +2777,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
}

Datei anzeigen

@ -59,7 +59,7 @@ index 00c43d7b846e97e2cc2105c93be5ce918fafd775..8f90e8cd36348089799097807ead774e
if (entity != null) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 5b3de422b07f680e6639ee84f076bffb3c901d0e..631f2d70b5fd6dabc06062e3c77802d2b61398ae 100644
index 2e376b0b2bf2d49ad0669b6e6fd287628a72ea64..869cd3723c6704e7512f4637682476b8af9f0264 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -247,6 +247,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@ -70,7 +70,7 @@ index 5b3de422b07f680e6639ee84f076bffb3c901d0e..631f2d70b5fd6dabc06062e3c77802d2
private CraftEntity bukkitEntity;
@@ -2276,6 +2277,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2275,6 +2276,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
nbttagcompound.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ()));
}
@ -80,7 +80,7 @@ index 5b3de422b07f680e6639ee84f076bffb3c901d0e..631f2d70b5fd6dabc06062e3c77802d2
// Save entity's from mob spawner status
if (spawnedViaMobSpawner) {
nbttagcompound.putBoolean("Paper.FromMobSpawner", true);
@@ -2422,6 +2426,26 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2421,6 +2425,26 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add option to nerf pigmen from nether portals
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 631f2d70b5fd6dabc06062e3c77802d2b61398ae..d890331b9bd8c7b29efb21454af34a0b246b1674 100644
index 869cd3723c6704e7512f4637682476b8af9f0264..981b4d28f5f8c614b623f1482551d0f9281807f6 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -404,6 +404,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@ -16,7 +16,7 @@ index 631f2d70b5fd6dabc06062e3c77802d2b61398ae..d890331b9bd8c7b29efb21454af34a0b
public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one
// Paper start - Entity origin API
@javax.annotation.Nullable
@@ -2284,6 +2285,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2283,6 +2284,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
if (spawnedViaMobSpawner) {
nbttagcompound.putBoolean("Paper.FromMobSpawner", true);
}
@ -26,7 +26,7 @@ index 631f2d70b5fd6dabc06062e3c77802d2b61398ae..d890331b9bd8c7b29efb21454af34a0b
// Paper end
return nbttagcompound;
} catch (Throwable throwable) {
@@ -2426,6 +2430,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2425,6 +2429,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status

Datei anzeigen

@ -84,10 +84,10 @@ index ed0ffff1cfc25f66e1947e40008c6c7259b17019..51426da5f3e7b9f8631880a04cef0a58
}
// Paper end - Entity#getEntitySpawnReason
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index d890331b9bd8c7b29efb21454af34a0b246b1674..2ce2926f4e3a79a1a329cdd684852970f6f104f2 100644
index 981b4d28f5f8c614b623f1482551d0f9281807f6..61ae5553a22adc84acbe2962632b8f564ed80d88 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2387,27 +2387,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2386,27 +2386,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
// CraftBukkit end

Datei anzeigen

@ -16,10 +16,10 @@ So even if something NEW comes up, it would be impossible to drop the
same item twice because the source was destroyed.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 2ce2926f4e3a79a1a329cdd684852970f6f104f2..b1d870b9a3b414ed49b4674afc2c6088d457ebc1 100644
index 61ae5553a22adc84acbe2962632b8f564ed80d88..2c21ef3f9096d1282091a7ec34e57fd74d815353 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2517,11 +2517,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2516,11 +2516,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
} else {
// CraftBukkit start - Capture drops for death event
if (this instanceof net.minecraft.world.entity.LivingEntity && !((net.minecraft.world.entity.LivingEntity) this).forceDrops) {
@ -34,7 +34,7 @@ index 2ce2926f4e3a79a1a329cdd684852970f6f104f2..b1d870b9a3b414ed49b4674afc2c6088
entityitem.setDefaultPickUpDelay();
// CraftBukkit start
@@ -3337,6 +3338,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3336,6 +3337,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
public Entity changeDimension(DimensionTransition teleportTarget) {
Level world = this.level();
@ -47,7 +47,7 @@ index 2ce2926f4e3a79a1a329cdd684852970f6f104f2..b1d870b9a3b414ed49b4674afc2c6088
if (world instanceof ServerLevel worldserver) {
if (!this.isRemoved()) {
// CraftBukkit start
@@ -3379,6 +3386,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3378,6 +3385,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
if (entity2 != null) {
if (this != entity2) {
@ -59,7 +59,7 @@ index 2ce2926f4e3a79a1a329cdd684852970f6f104f2..b1d870b9a3b414ed49b4674afc2c6088
entity2.restoreFrom(this);
this.removeAfterChangingDimensions();
// CraftBukkit start - Forward the CraftEntity to the new entity
@@ -3454,7 +3466,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3453,7 +3465,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
public boolean canChangeDimensions(Level from, Level to) {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Ensure Entity position and AABB are never invalid
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index b1d870b9a3b414ed49b4674afc2c6088d457ebc1..f2855de7320dc9532d0b568b84b0b7e5a2064045 100644
index 2c21ef3f9096d1282091a7ec34e57fd74d815353..be990f12c61a6079fafbfd3d05ae1ae352d6229d 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -670,8 +670,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@ -20,7 +20,7 @@ index b1d870b9a3b414ed49b4674afc2c6088d457ebc1..f2855de7320dc9532d0b568b84b0b7e5
}
protected AABB makeBoundingBox() {
@@ -4225,7 +4225,29 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -4224,7 +4224,29 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return this.getZ((2.0D * this.random.nextDouble() - 1.0D) * widthScale);
}
@ -50,7 +50,7 @@ index b1d870b9a3b414ed49b4674afc2c6088d457ebc1..f2855de7320dc9532d0b568b84b0b7e5
if (this.position.x != x || this.position.y != y || this.position.z != z) {
this.position = new Vec3(x, y, z);
int i = Mth.floor(x);
@@ -4243,6 +4265,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -4242,6 +4264,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
this.levelCallback.onMove();
}

Datei anzeigen

@ -31,7 +31,7 @@ index 762998180eb7b10151f390ee79690c68d66622f2..d97b1040ecec1d30fdd1bf309a821595
}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index f2855de7320dc9532d0b568b84b0b7e5a2064045..1e65bfa3d2f3a178803c530e1610c94065ed6110 100644
index be990f12c61a6079fafbfd3d05ae1ae352d6229d..335962dfe50d8d691a2a1fc6224950641e2b5a2b 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -171,6 +171,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Expose the Entity Counter to allow plugins to use valid and
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 1e65bfa3d2f3a178803c530e1610c94065ed6110..70952ec99d049c3b133629e41eeb1d725ffb5917 100644
index 335962dfe50d8d691a2a1fc6224950641e2b5a2b..203aacc9e116c1335bde1cff4d59674bfa7a622a 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -4510,4 +4510,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -4509,4 +4509,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
void accept(Entity entity, double x, double y, double z);
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Entity#isTicking
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 70952ec99d049c3b133629e41eeb1d725ffb5917..fef25470049fb0ac6f741920c057814ea437cd07 100644
index 203aacc9e116c1335bde1cff4d59674bfa7a622a..0764f5eaaa5a13e1e9b98a83bfb32e8eb1278f23 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -4515,5 +4515,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -4514,5 +4514,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
public static int nextEntityId() {
return ENTITY_COUNTER.incrementAndGet();
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Climbing should not bypass cramming gamerule
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index fef25470049fb0ac6f741920c057814ea437cd07..7e4fe51b276df05f41c5603140ed198b7aef9585 100644
index 0764f5eaaa5a13e1e9b98a83bfb32e8eb1278f23..7b4c877d6c613e1c40618bc95a65672ec7a31deb 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2081,6 +2081,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2080,6 +2080,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
public boolean isPushable() {

Datei anzeigen

@ -28,10 +28,10 @@ index 488ebd443903af812913437f1ade3002093f2470..a043ac10834562d357ef0b5aded2e916
public Vec3 decode(long x, long y, long z) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 7e4fe51b276df05f41c5603140ed198b7aef9585..b5f45ce710ea9bf1e37c4fd71b75d0e2d537cf45 100644
index 7b4c877d6c613e1c40618bc95a65672ec7a31deb..a99bd882a9fbf4a54a82dbde7086c715ff3e46ea 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -4262,6 +4262,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -4261,6 +4261,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return;
}
// Paper end - Block invalid positions and bounding box

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Collision option for requiring a player participant
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index b5f45ce710ea9bf1e37c4fd71b75d0e2d537cf45..959a3f1abd2a2d6224f9d130fc6136aef20ef904 100644
index a99bd882a9fbf4a54a82dbde7086c715ff3e46ea..eafd838e2d87103b7c8d9a04144639c3d13381fa 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1937,6 +1937,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Expand EntityUnleashEvent
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 959a3f1abd2a2d6224f9d130fc6136aef20ef904..64e0dafe15bbf8e0f5892337df69063982a9d82a 100644
index eafd838e2d87103b7c8d9a04144639c3d13381fa..317115dd54252e882575aa04dbfb3f977ba3df60 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2576,12 +2576,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2575,12 +2575,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
if (leashable.getLeashHolder() == player) {
if (!this.level().isClientSide()) {
// CraftBukkit start - fire PlayerUnleashEntityEvent
@ -26,7 +26,7 @@ index 959a3f1abd2a2d6224f9d130fc6136aef20ef904..64e0dafe15bbf8e0f5892337df690639
this.gameEvent(GameEvent.ENTITY_INTERACT, player);
}
@@ -3452,8 +3455,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3451,8 +3454,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
protected void removeAfterChangingDimensions() {
this.setRemoved(Entity.RemovalReason.CHANGED_DIMENSION, null); // CraftBukkit - add Bukkit remove cause
if (this instanceof Leashable leashable) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Optimize indirect passenger iteration
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 64e0dafe15bbf8e0f5892337df69063982a9d82a..5223379e5c11c978fd85bd05ef9451aa2ddc2aa3 100644
index 317115dd54252e882575aa04dbfb3f977ba3df60..567c1d741628fcafca02fc06922ad6d77fa823ff 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3891,20 +3891,34 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3890,20 +3890,34 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
private Stream<Entity> getIndirectPassengersStream() {
@ -43,7 +43,7 @@ index 64e0dafe15bbf8e0f5892337df69063982a9d82a..5223379e5c11c978fd85bd05ef9451aa
return () -> {
return this.getIndirectPassengersStream().iterator();
};
@@ -3917,6 +3931,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3916,6 +3930,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
public boolean hasExactlyOnePlayerPassenger() {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add back EntityPortalExitEvent
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 5223379e5c11c978fd85bd05ef9451aa2ddc2aa3..4ef848a32c4f149e4cc2f9a8213244c163a72bea 100644
index 567c1d741628fcafca02fc06922ad6d77fa823ff..28c20c14fa36470a96fad88787fc01c77592d19f 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3365,7 +3365,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3364,7 +3364,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
if (world instanceof ServerLevel worldserver) {
if (!this.isRemoved()) {
// CraftBukkit start
@ -17,7 +17,7 @@ index 5223379e5c11c978fd85bd05ef9451aa2ddc2aa3..4ef848a32c4f149e4cc2f9a8213244c1
// Paper start - gateway-specific teleport event
final EntityTeleportEvent teleEvent;
if (this.portalProcess != null && this.portalProcess.isSamePortal(((net.minecraft.world.level.block.EndGatewayBlock) net.minecraft.world.level.block.Blocks.END_GATEWAY)) && this.level.getBlockEntity(this.portalProcess.getEntryPosition()) instanceof net.minecraft.world.level.block.entity.TheEndGatewayBlockEntity theEndGatewayBlockEntity) {
@@ -3379,7 +3379,25 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3378,7 +3378,25 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return null;
}
to = teleEvent.getTo();

Datei anzeigen

@ -7,10 +7,10 @@ Subject: [PATCH] Add Raw Byte Entity Serialization
public net.minecraft.world.entity.Entity setLevel(Lnet/minecraft/world/level/Level;)V
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 4ef848a32c4f149e4cc2f9a8213244c163a72bea..4542c6a7c48bfcb8a5acf127944e24b60dfc13e1 100644
index 28c20c14fa36470a96fad88787fc01c77592d19f..13e1b47873f0a4a974bb0763679fee6e37932b5c 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2146,6 +2146,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2145,6 +2145,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
}

Datei anzeigen

@ -8,7 +8,7 @@ This is because bukkit uses a separate head rotation field for yaw.
This issue only applies to players.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 4542c6a7c48bfcb8a5acf127944e24b60dfc13e1..42afa622c97cc7da666cfb3019f417c96842d318 100644
index 13e1b47873f0a4a974bb0763679fee6e37932b5c..2dc2f8ff7add3573a66ab12e12b8625e87669fa4 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1845,6 +1845,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] don't attempt to teleport dead entities
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 42afa622c97cc7da666cfb3019f417c96842d318..4ec6a43b7f16560de948974d60ad8ab1dcbb4696 100644
index 2dc2f8ff7add3573a66ab12e12b8625e87669fa4..b969b0a1c3768e43bda8b2fb297f022ebc8bc4ce 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -706,7 +706,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Forward CraftEntity in teleport command
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 4ec6a43b7f16560de948974d60ad8ab1dcbb4696..038c22d09818c9a8310a8457d87b7e61119bb0dd 100644
index b969b0a1c3768e43bda8b2fb297f022ebc8bc4ce..6d011de57725aec5ffffc35b3b94ec1b7c178861 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3355,6 +3355,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3354,6 +3354,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
public void restoreFrom(Entity original) {
@ -22,7 +22,7 @@ index 4ec6a43b7f16560de948974d60ad8ab1dcbb4696..038c22d09818c9a8310a8457d87b7e61
CompoundTag nbttagcompound = original.saveWithoutId(new CompoundTag());
nbttagcompound.remove("Dimension");
@@ -3441,8 +3448,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3440,8 +3447,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
entity2.restoreFrom(this);
this.removeAfterChangingDimensions();
// CraftBukkit start - Forward the CraftEntity to the new entity

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Freeze Tick Lock API
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 038c22d09818c9a8310a8457d87b7e61119bb0dd..ad049687cd6c6c98bd08b512c6233b725c6ad9ab 100644
index 6d011de57725aec5ffffc35b3b94ec1b7c178861..c16f179e4cb45f5a312255692cf8606884606ba2 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -412,6 +412,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@ -25,7 +25,7 @@ index 038c22d09818c9a8310a8457d87b7e61119bb0dd..ad049687cd6c6c98bd08b512c6233b72
this.setTicksFrozen(0);
this.level().levelEvent((Player) null, 1009, this.blockPosition, 1);
}
@@ -2314,6 +2315,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2313,6 +2314,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
if (fromNetherPortal) {
nbttagcompound.putBoolean("Paper.FromNetherPortal", true);
}
@ -35,7 +35,7 @@ index 038c22d09818c9a8310a8457d87b7e61119bb0dd..ad049687cd6c6c98bd08b512c6233b72
// Paper end
return nbttagcompound;
} catch (Throwable throwable) {
@@ -2458,6 +2462,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2457,6 +2461,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
if (spawnReason == null) {
spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT;
}

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Ensure entity passenger world matches ridden entity
Bad plugins doing this would cause some obvious problems...
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index ad049687cd6c6c98bd08b512c6233b725c6ad9ab..156fb444061be556bbb1f230b239d5d2ce59b94b 100644
index c16f179e4cb45f5a312255692cf8606884606ba2..b0c9c22c983344119925d76ee3180df9f411d8f5 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2689,7 +2689,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2688,7 +2688,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
public boolean startRiding(Entity entity, boolean force) {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Prevent entity loading causing async lookups
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 156fb444061be556bbb1f230b239d5d2ce59b94b..bbca8a478ab4c27c21fb6fe33fdb57fd3d29435c 100644
index b0c9c22c983344119925d76ee3180df9f411d8f5..0b273d6249c212994b23aeaac382e532edfd563f 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -715,6 +715,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add various missing EntityDropItemEvent calls
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index bbca8a478ab4c27c21fb6fe33fdb57fd3d29435c..d328393e62e4e49ddd56c10a9f4f5fcf0b218ddf 100644
index 0b273d6249c212994b23aeaac382e532edfd563f..75c80072800fb1fdc3cf362f242fd8ee440e600e 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2559,6 +2559,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2558,6 +2558,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
stack.setCount(0); // Paper - destroy this item - if this ever leaks due to game bugs, ensure it doesn't dupe
entityitem.setDefaultPickUpDelay();

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Fix EntityCombustEvent cancellation cant fully prevent
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index d328393e62e4e49ddd56c10a9f4f5fcf0b218ddf..1ce674329b3e977be09d40a01ed85d6fce71b2b3 100644
index 75c80072800fb1fdc3cf362f242fd8ee440e600e..82531bd4ada8373d3c255758382d5850309913e2 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3195,6 +3195,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3194,6 +3194,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
pluginManager.callEvent(entityCombustEvent);
if (!entityCombustEvent.isCancelled()) {
this.igniteForSeconds(entityCombustEvent.getDuration(), false);

Datei anzeigen

@ -21,10 +21,10 @@ index b6b15e8ce98603d6e580a31ba458fedc8b3f663a..91ca37605bf7ba65875b588fe9764b30
} else if (this.seenBy.remove(player.connection)) {
this.serverEntity.removePairing(player);
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 1ce674329b3e977be09d40a01ed85d6fce71b2b3..4d70a5fd3cc6473942c9542a7f2a61edbc00b661 100644
index 82531bd4ada8373d3c255758382d5850309913e2..f52d394c90bc326c2a58c4f623df632235e0c599 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3870,7 +3870,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3869,7 +3869,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
public void startSeenByPlayer(ServerPlayer player) {}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Improve PortalEvents
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 4d70a5fd3cc6473942c9542a7f2a61edbc00b661..9058e5cd8ef661d59e93e82a3222506a13d0b1f4 100644
index f52d394c90bc326c2a58c4f623df632235e0c599..b58a83b9e7a7c9253b0091f271823bf821e90c19 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3529,7 +3529,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3528,7 +3528,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
org.bukkit.entity.Entity bukkitEntity = entity.getBukkitEntity();
Location enter = bukkitEntity.getLocation();

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Expose pre-collision moving velocity to
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 9058e5cd8ef661d59e93e82a3222506a13d0b1f4..609d6b02d0aa90ea1d7dae0345b824334966239d 100644
index b58a83b9e7a7c9253b0091f271823bf821e90c19..deee2eebebb415115c5566057ac626f35e9472e1 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -943,6 +943,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess

Datei anzeigen

@ -14,7 +14,7 @@ clearing the owner.
Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com>
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 609d6b02d0aa90ea1d7dae0345b824334966239d..382ba6e846afdb41f6651b13b477ef4553a15b11 100644
index deee2eebebb415115c5566057ac626f35e9472e1..6d18b9a0b65c62de3f134d3d6dda6e4a988a64dc 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -391,6 +391,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Don't load chunks for supporting block checks
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 382ba6e846afdb41f6651b13b477ef4553a15b11..ceafb9a540aa0871516f220c79c7f2c30639f069 100644
index 6d18b9a0b65c62de3f134d3d6dda6e4a988a64dc..33ecda938359e07607ceacd0b8e8fca7e33e2ee2 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1186,7 +1186,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess

Datei anzeigen

@ -1185,7 +1185,7 @@ index 2ea29c9491186d7a25ed3eed99ee4a488bcaa272..de96d7df65713f2fa7b8f2dd068856bb
this.players.remove(entityplayer);
this.playersByName.remove(entityplayer.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index ceafb9a540aa0871516f220c79c7f2c30639f069..30c979591001af9f465a2d3d23766e6f9f7d8892 100644
index 33ecda938359e07607ceacd0b8e8fca7e33e2ee2..309dab6900543bf04ae371d7278bdf1b87a8a3c4 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -255,11 +255,23 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@ -1213,7 +1213,7 @@ index ceafb9a540aa0871516f220c79c7f2c30639f069..30c979591001af9f465a2d3d23766e6f
@Override
public CommandSender getBukkitSender(CommandSourceStack wrapper) {
return this.getBukkitEntity();
@@ -4485,6 +4497,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -4484,6 +4496,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
public final void setRemoved(Entity.RemovalReason entity_removalreason, EntityRemoveEvent.Cause cause) {
CraftEventFactory.callEntityRemoveEvent(this, cause);
// CraftBukkit end
@ -1221,7 +1221,7 @@ index ceafb9a540aa0871516f220c79c7f2c30639f069..30c979591001af9f465a2d3d23766e6f
if (this.removalReason == null) {
this.removalReason = entity_removalreason;
}
@@ -4495,12 +4508,28 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -4494,12 +4507,28 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
this.getPassengers().forEach(Entity::stopRiding);
this.levelCallback.onRemove(entity_removalreason);

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Expand Pose API
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 30c979591001af9f465a2d3d23766e6f9f7d8892..e99fc105b39e1ad92cbebc2f9de900c165d32a57 100644
index 309dab6900543bf04ae371d7278bdf1b87a8a3c4..d56d1426a9be2f22fac458f8302bad04b3f257c2 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -426,6 +426,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess

Datei anzeigen

@ -17,10 +17,10 @@ index 9d6c6a979fb1751ca90c9c1210ec52bbf12495f4..46d6fb2591f47c245446db210a00cbaa
this.containerMenu.findSlot(this.getInventory(), this.getInventory().selected).ifPresent(s -> {
this.containerSynchronizer.sendSlotChange(this.containerMenu, s, this.getMainHandItem());
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index e99fc105b39e1ad92cbebc2f9de900c165d32a57..b70a7985280d52bd1d00c65a202316449e0d9561 100644
index d56d1426a9be2f22fac458f8302bad04b3f257c2..eebb2ad39c1363ab2c3bd6d1efbd5c70b4700f42 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2640,8 +2640,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2639,8 +2639,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
if (!this.level().isClientSide()) {
// CraftBukkit start - fire PlayerLeashEntityEvent
if (CraftEventFactory.callPlayerLeashEntityEvent(this, player, player, hand).isCancelled()) {

Datei anzeigen

@ -31,7 +31,7 @@ index 8b5eabea1a0926c22b58ef8761caee3a06aa5ee0..53fdf4e104f36a2bd88fdf26d8c68cd3
if (entity.valid) {
MinecraftServer.LOGGER.error("Attempted Double World add on {}", entity, new Throwable());
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index b70a7985280d52bd1d00c65a202316449e0d9561..d25bf5d1f0335e75edd78aa7b9706228e4d7fdec 100644
index eebb2ad39c1363ab2c3bd6d1efbd5c70b4700f42..fb1b19bb748a97465af2b9f1de89df9f5165b7cc 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -625,7 +625,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess

Datei anzeigen

@ -50,10 +50,10 @@ index 184f3c7a1304f4f9d2aaeae27172be9d853c30de..3cbb59df34156479d24a8251f2b3acbb
if (entityitem == null) {
return null;
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index d25bf5d1f0335e75edd78aa7b9706228e4d7fdec..1052133e22d90c90e5345ba423f6872cb5d2ad2d 100644
index fb1b19bb748a97465af2b9f1de89df9f5165b7cc..bebb39beaba51bf19448d572b08efd25560c6e5a 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2564,6 +2564,25 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2563,6 +2563,25 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@Nullable
public ItemEntity spawnAtLocation(ItemStack stack, float yOffset) {
@ -79,7 +79,7 @@ index d25bf5d1f0335e75edd78aa7b9706228e4d7fdec..1052133e22d90c90e5345ba423f6872c
if (stack.isEmpty()) {
return null;
} else if (this.level().isClientSide) {
@@ -2571,14 +2590,21 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2570,14 +2589,21 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
} else {
// CraftBukkit start - Capture drops for death event
if (this instanceof net.minecraft.world.entity.LivingEntity && !((net.minecraft.world.entity.LivingEntity) this).forceDrops) {

Datei anzeigen

@ -84,10 +84,10 @@ index caf1d79e2bbdd257a5439e2973653747e678805f..e34584e4780f343d6c946af5377088d5
public DamageSource sonicBoom(Entity attacker) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 1052133e22d90c90e5345ba423f6872cb5d2ad2d..8b6a905f398f5aadd0801ea50d49506a002d4ff5 100644
index bebb39beaba51bf19448d572b08efd25560c6e5a..e0a3efc65b407084bdf2ef5be2cea86572858435 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3264,7 +3264,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3263,7 +3263,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return;
}

Datei anzeigen

@ -26830,7 +26830,7 @@ index ea72dcb064a35bc6245bc5c94d592efedd8faf41..87ee8e51dfa7657ed7d83fcbceef48bf
this.comparator = comparator;
if (initialCapacity < 0) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 8b6a905f398f5aadd0801ea50d49506a002d4ff5..138616b36b5e4d43b786876efc147d2648af1461 100644
index e0a3efc65b407084bdf2ef5be2cea86572858435..02bb3dd944c97e035125f5f31d99690dbe950d0b 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 @@ import org.bukkit.event.player.PlayerTeleportEvent;
@ -26920,7 +26920,7 @@ index 8b6a905f398f5aadd0801ea50d49506a002d4ff5..138616b36b5e4d43b786876efc147d26
public Entity(EntityType<?> type, Level world) {
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
@@ -4397,6 +4468,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -4396,6 +4467,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
this.setPosRaw(x, y, z, false);
}
public final void setPosRaw(double x, double y, double z, boolean forceBoundingBoxUpdate) {
@ -26936,7 +26936,7 @@ index 8b6a905f398f5aadd0801ea50d49506a002d4ff5..138616b36b5e4d43b786876efc147d26
if (!checkPosition(this, x, y, z)) {
return;
}
@@ -4528,6 +4608,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -4527,6 +4607,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@Override
public final void setRemoved(Entity.RemovalReason entity_removalreason, EntityRemoveEvent.Cause cause) {
@ -26949,7 +26949,7 @@ index 8b6a905f398f5aadd0801ea50d49506a002d4ff5..138616b36b5e4d43b786876efc147d26
CraftEventFactory.callEntityRemoveEvent(this, cause);
// CraftBukkit end
final boolean alreadyRemoved = this.removalReason != null; // Paper - Folia schedulers
@@ -4539,7 +4625,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -4538,7 +4624,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
this.stopRiding();
}
@ -26958,7 +26958,7 @@ index 8b6a905f398f5aadd0801ea50d49506a002d4ff5..138616b36b5e4d43b786876efc147d26
this.levelCallback.onRemove(entity_removalreason);
// Paper start - Folia schedulers
if (!(this instanceof ServerPlayer) && entity_removalreason != RemovalReason.CHANGED_DIMENSION && !alreadyRemoved) {
@@ -4570,7 +4656,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -4569,7 +4655,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@Override
public boolean shouldBeSaved() {

Datei anzeigen

@ -111,7 +111,7 @@ index b65927095e36451c53cdae770701a33470eaadbc..19de709c25cfb5a7d1ed810f93d10022
} else {
passenger.stopRiding();
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 138616b36b5e4d43b786876efc147d2648af1461..2fa05c07cd9fc5acb844fac331986c2322433303 100644
index 02bb3dd944c97e035125f5f31d99690dbe950d0b..139a5cd05a167b3b3330aa94bd33d193dce19e2d 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -419,6 +419,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess

Datei anzeigen

@ -115,7 +115,7 @@ index 0d0b07c9199be9ca0d5ac3feb1d44f149ba69283..3d30427e75bdfb9cf453fb5cd2a34422
this.sendLevelInfo(player, worldserver1);
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 2fa05c07cd9fc5acb844fac331986c2322433303..437956b18d5bffd93c46e0be34cf413e9c704e5a 100644
index 139a5cd05a167b3b3330aa94bd33d193dce19e2d..1a40128b06e70e39a82f170fc16dcae1e22c745c 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -664,13 +664,44 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess