[ci skip] Add more patch identifying comments

This commit is contained in:
Nassim Jahnke
2024-01-23 14:34:17 +01:00
parent e433c8696b
commit 88d3d87993
47 changed files with 147 additions and 180 deletions

View File

@@ -13,7 +13,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
return tag.contains("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level;
}
+ // Paper start
+ // Paper start - Share random for entities to make them more random
+ public static RandomSource SHARED_RANDOM = new RandomRandomSource();
+ private static final class RandomRandomSource extends java.util.Random implements net.minecraft.world.level.levelgen.BitRandomSource {
+ private boolean locked = false;
@@ -84,7 +84,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ return super.nextGaussian();
+ }
+ }
+ // Paper end
+ // Paper end - Share random for entities to make them more random
+
private CraftEntity bukkitEntity;
@@ -94,7 +94,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
this.stuckSpeedMultiplier = Vec3.ZERO;
this.nextStep = 1.0F;
- this.random = RandomSource.create();
+ this.random = SHARED_RANDOM; // Paper
+ this.random = SHARED_RANDOM; // Paper - Share random for entities to make them more random
this.remainingFireTicks = -this.getFireImmuneTicks();
this.fluidHeight = new Object2DoubleArrayMap(2);
this.fluidOnEyes = new HashSet();
@@ -107,7 +107,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public Squid(EntityType<? extends Squid> type, Level world) {
super(type, world);
- this.random.setSeed((long)this.getId());
+ //this.random.setSeed((long)this.getId()); // Paper - we set the random to shared, do not clobber the seed
+ //this.random.setSeed((long)this.getId()); // Paper - Share random for entities to make them more random
this.tentacleSpeed = 1.0F / (this.random.nextFloat() + 1.0F) * 0.2F;
}