[feat] add config option to configure shared entity random

This commit is contained in:
Shane Freeder 2025-01-01 08:00:06 +00:00
parent 1e4669e8be
commit ffa4118c81
No known key found for this signature in database
GPG Key ID: A3F61EA5A085289C
2 changed files with 2 additions and 1 deletions

View File

@ -114,7 +114,7 @@
public boolean noPhysics;
private boolean wasOnFire;
- public final RandomSource random = RandomSource.create();
+ public final RandomSource random = SHARED_RANDOM; // Paper - Share random for entities to make them more random
+ public final RandomSource random = io.papermc.paper.configuration.GlobalConfiguration.get().misc.improveEntityRandomness ? SHARED_RANDOM : RandomSource.create(); // Paper - Share random for entities to make them more random
public int tickCount;
private int remainingFireTicks = -this.getFireImmuneTicks();
public boolean wasTouchingWater;

View File

@ -344,6 +344,7 @@ public class GlobalConfiguration extends ConfigurationPart {
public IntOr.Default compressionLevel = IntOr.Default.USE_DEFAULT;
@Comment("Defines the leniency distance added on the server to the interaction range of a player when validating interact packets.")
public DoubleOr.Default clientInteractionLeniencyDistance = DoubleOr.Default.USE_DEFAULT;
public boolean improveEntityRandomness = true;
}
public BlockUpdates blockUpdates;