Files
Lophine/lophine-server/minecraft-patches/features/0034-Add-config-for-vanilla-random.patch
T
2026-08-08 01:51:27 +08:00

20 lines
1.2 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
Date: Sun, 28 Jun 2026 20:04:06 +0800
Subject: [PATCH] Add config for vanilla random
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index 3b98ef4310d9f996437af9f12ab3de2cf6f4dd63..a7f4a9f8bca00fda1b57e2245c57726bb1ce41ed 100644
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -298,7 +298,7 @@ public abstract class Entity
public double yOld;
public double zOld;
public boolean noPhysics;
- protected final RandomSource random = SHARED_RANDOM; // Paper - Share random for entities to make them more random
+ protected final RandomSource random = me.earthme.luminol.config.modules.fixes.VanillaRandomSourceConfig.useLegacyRandomSourceForPlayers ? RandomSource.create() : SHARED_RANDOM; // Paper - Share random for entities to make them more random // Luminol - Add config for vanilla random SHARED_RANDOM
public int tickCount;
private int remainingFireTicks;
private final EntityFluidInteraction fluidInteraction = new EntityFluidInteraction(Set.of(FluidTags.WATER, FluidTags.LAVA));