mirror of
https://github.com/PaperMC/Folia.git
synced 2024-11-21 11:55:11 +01:00
Check region for Vex spell origin
If the Vex portals or is moved far enough away, it may trip a thread check. Fixes https://github.com/PaperMC/Folia/issues/95
This commit is contained in:
parent
eb2231736b
commit
bff0370b70
@ -19443,6 +19443,19 @@ index bf3301eb1341ba9d482e10873447c42bd670f5ed..666d603b098edee635559f78fcfa89bb
|
|||||||
if (ete != null) {
|
if (ete != null) {
|
||||||
net.minecraft.network.protocol.game.ClientboundSetEntityMotionPacket velocityPacket = new net.minecraft.network.protocol.game.ClientboundSetEntityMotionPacket(this);
|
net.minecraft.network.protocol.game.ClientboundSetEntityMotionPacket velocityPacket = new net.minecraft.network.protocol.game.ClientboundSetEntityMotionPacket(this);
|
||||||
net.minecraft.network.protocol.game.ClientboundTeleportEntityPacket positionPacket = new net.minecraft.network.protocol.game.ClientboundTeleportEntityPacket(this);
|
net.minecraft.network.protocol.game.ClientboundTeleportEntityPacket positionPacket = new net.minecraft.network.protocol.game.ClientboundTeleportEntityPacket(this);
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/Vex.java b/src/main/java/net/minecraft/world/entity/monster/Vex.java
|
||||||
|
index 65cb385ab294e362d666a6d03c4496cdc3b64890..51c4125c4014511dc45e7e624dc190272442cb8a 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/entity/monster/Vex.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Vex.java
|
||||||
|
@@ -354,7 +354,7 @@ public class Vex extends Monster implements TraceableEntity {
|
||||||
|
public void tick() {
|
||||||
|
BlockPos blockposition = Vex.this.getBoundOrigin();
|
||||||
|
|
||||||
|
- if (blockposition == null) {
|
||||||
|
+ if (blockposition == null || !io.papermc.paper.util.TickThread.isTickThreadFor((net.minecraft.server.level.ServerLevel)Vex.this.level(), blockposition)) { // Folia - region threading
|
||||||
|
blockposition = Vex.this.blockPosition();
|
||||||
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||||
index 3f8c1d1d3c408fc4f15c4b5680bc22c86f104a9d..720278afd8c28c4303cc2fbfe5874a79d607f6ef 100644
|
index 3f8c1d1d3c408fc4f15c4b5680bc22c86f104a9d..720278afd8c28c4303cc2fbfe5874a79d607f6ef 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||||
|
Loading…
Reference in New Issue
Block a user