forked from mirror/Folia
Add missing remove event cause (fixes tests)
This commit is contained in:
parent
3a91a4a5cf
commit
7bc84f49be
@ -18550,7 +18550,7 @@ index ab777952bda1651796ed41e8a7fc6621f27db9aa..6b9365eba3339578ee2984605240b74d
|
|||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
|
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
|
||||||
index 1fb1e729d6879568d8b4943071fa940325b2e5b0..977ea70cc444ca66bcc797f4c96f976e4897f955 100644
|
index 1fb1e729d6879568d8b4943071fa940325b2e5b0..0c4b158d574ad0e9e257532ac3b9a3a34497216f 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
|
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
|
||||||
@@ -46,6 +46,78 @@ public class ThrownEnderpearl extends ThrowableItemProjectile {
|
@@ -46,6 +46,78 @@ public class ThrownEnderpearl extends ThrowableItemProjectile {
|
||||||
@ -18646,7 +18646,7 @@ index 1fb1e729d6879568d8b4943071fa940325b2e5b0..977ea70cc444ca66bcc797f4c96f976e
|
|||||||
+ if (entity != null) {
|
+ if (entity != null) {
|
||||||
+ attemptTeleport(entity, (ServerLevel)this.level(), this.position());
|
+ attemptTeleport(entity, (ServerLevel)this.level(), this.position());
|
||||||
+ }
|
+ }
|
||||||
+ this.discard();
|
+ this.discard(EntityRemoveEvent.Cause.HIT);
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // Folia end - region threading
|
+ // Folia end - region threading
|
||||||
@ -20407,7 +20407,7 @@ index 83481539e058e5f428d9951e409fed62ef159e5c..48260dce982181e2ee4e92614f8ed3af
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||||
index 098fde8200a11f91f934ddab6b1486dac4014dfe..8bec28f6935a54e133dcbdf774a218991bf6df3f 100644
|
index 098fde8200a11f91f934ddab6b1486dac4014dfe..412fa8a03be7215fa2695f07ac4f2334d1e70903 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||||
@@ -51,9 +51,12 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
@@ -51,9 +51,12 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
||||||
@ -20512,7 +20512,7 @@ index 098fde8200a11f91f934ddab6b1486dac4014dfe..8bec28f6935a54e133dcbdf774a21899
|
|||||||
+ // to teleport the vehicle, rather just the owner given the lack of getRootVehicle
|
+ // to teleport the vehicle, rather just the owner given the lack of getRootVehicle
|
||||||
+ owner.unRide();
|
+ owner.unRide();
|
||||||
+ chosenEntity = owner;
|
+ chosenEntity = owner;
|
||||||
+ pearl.discard();
|
+ pearl.discard(EntityRemoveEvent.Cause.HIT);
|
||||||
+ } else {
|
+ } else {
|
||||||
+ // see above for unRide()
|
+ // see above for unRide()
|
||||||
+ pearl.unRide();
|
+ pearl.unRide();
|
||||||
|
Loading…
Reference in New Issue
Block a user