mirror of
https://github.com/PaperMC/Folia.git
synced 2024-11-22 12:05:12 +01:00
Fix fishing rods throwing exceptions
Need to move setOwner after the position update, as the thread-check will fall back to position
This commit is contained in:
parent
5cbf898ca1
commit
bbee4310fe
@ -18678,6 +18678,27 @@ index 5406925cd66f46ab8744123c670d72cea7bfc3a1..d0fa197283a3bf14ead356e832500430
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
index 7f3a7a769afec8449547c26453112064b9bcb04a..5429cd3f6ee08609c91a25751acedc5936d3e49f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
@@ -98,7 +98,7 @@ public class FishingHook extends Projectile {
|
||||
|
||||
public FishingHook(net.minecraft.world.entity.player.Player thrower, Level world, int luckOfTheSeaLevel, int lureLevel) {
|
||||
this(EntityType.FISHING_BOBBER, world, luckOfTheSeaLevel, lureLevel);
|
||||
- this.setOwner(thrower);
|
||||
+ //this.setOwner(thrower); // Folia - region threading - move this down after position so that thread-checks do not fail
|
||||
float f = thrower.getXRot();
|
||||
float f1 = thrower.getYRot();
|
||||
float f2 = Mth.cos(-f1 * 0.017453292F - 3.1415927F);
|
||||
@@ -110,6 +110,7 @@ public class FishingHook extends Projectile {
|
||||
double d2 = thrower.getZ() - (double) f2 * 0.3D;
|
||||
|
||||
this.moveTo(d0, d1, d2, f1, f);
|
||||
+ this.setOwner(thrower); // Folia - region threading - move this down after position so that thread-checks do not fail
|
||||
Vec3 vec3d = new Vec3((double) (-f3), (double) Mth.clamp(-(f5 / f4), -5.0F, 5.0F), (double) (-f2));
|
||||
double d3 = vec3d.length();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/LlamaSpit.java b/src/main/java/net/minecraft/world/entity/projectile/LlamaSpit.java
|
||||
index 4132c1113f5437a776e5e3c1cb306904775aed88..a756a7373985152eceaa03255e3f0fb39c53d081 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/LlamaSpit.java
|
||||
|
@ -1,7 +1,6 @@
|
||||
Get done before testing:
|
||||
- Mob#getTarget?
|
||||
- regioniser->regionaliser
|
||||
- fishing rods are broken
|
||||
|
||||
Pre-Test: List of things not fully tested
|
||||
- Task queue
|
||||
|
Loading…
Reference in New Issue
Block a user