mirror of
https://github.com/PaperMC/Folia.git
synced 2025-04-23 04:39:19 +08:00
Do not invoke ender pearl registration logic
The owner of the projectile would need to be retrieved, which may trip a thread check. We do not track ender pearls anyways, so the registration logic does nothing regardless. Fixes https://github.com/PaperMC/Folia/issues/315
This commit is contained in:
parent
35b98633ba
commit
290f78994a
@ -1,5 +1,23 @@
|
|||||||
--- a/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
|
--- a/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
|
||||||
+++ b/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
|
+++ b/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
|
||||||
|
@@ -58,15 +_,11 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
private void deregisterFromCurrentOwner() {
|
||||||
|
- if (this.getOwner() instanceof ServerPlayer serverPlayer) {
|
||||||
|
- serverPlayer.deregisterEnderPearl(this);
|
||||||
|
- }
|
||||||
|
+ // Folia - region threading - we remove the registration logic, we do not need to fetch the owner
|
||||||
|
}
|
||||||
|
|
||||||
|
private void registerToCurrentOwner() {
|
||||||
|
- if (this.getOwner() instanceof ServerPlayer serverPlayer) {
|
||||||
|
- serverPlayer.registerEnderPearl(this);
|
||||||
|
- }
|
||||||
|
+ // Folia - region threading - we remove the registration logic, we do not need to fetch the owner
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
@@ -99,6 +_,81 @@
|
@@ -99,6 +_,81 @@
|
||||||
result.getEntity().hurt(this.damageSources().thrown(this, this.getOwner()), 0.0F);
|
result.getEntity().hurt(this.damageSources().thrown(this, this.getOwner()), 0.0F);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user