Skip to content

Commit 2a18957

Browse files
committed
Fix fishing simulation
1 parent d93b673 commit 2a18957

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/main/java/net/earthcomputer/clientcommands/features/FishingCracker.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,10 +1231,10 @@ public SimulatedFishingBobber(long seed, ItemStack tool, Vec3d pos, Vec3d veloci
12311231
// entity UUID
12321232
MathHelper.randomUuid(random);
12331233

1234-
// entity yaw and pitch
1235-
random.nextGaussian();
1236-
random.nextGaussian();
1237-
random.nextGaussian();
1234+
// entity yaw and pitch (ProjectileEntity.setVelocity)
1235+
random.nextTriangular(0, 1);
1236+
random.nextTriangular(0, 1);
1237+
random.nextTriangular(0, 1);
12381238

12391239
this.tool = tool;
12401240
this.lureLevel = EnchantmentHelper.getLure(tool);
@@ -1626,7 +1626,7 @@ private void tickFishingLogic(BlockPos pos) {
16261626
if (this.fishTravelCountdown > 0) {
16271627
this.fishTravelCountdown -= i;
16281628
if (this.fishTravelCountdown > 0) {
1629-
this.fishAngle = (float)((double)this.fishAngle + this.random.nextGaussian() * 4.0D);
1629+
this.fishAngle += random.nextTriangular(0, 9.188);
16301630
n = this.fishAngle * 0.017453292F;
16311631
o = MathHelper.sin(n);
16321632
p = MathHelper.cos(n);

0 commit comments

Comments
 (0)