From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: violetc <58360096+s-yh-china@users.noreply.github.com> Date: Thu, 16 Feb 2023 17:25:01 +0800 Subject: [PATCH] Use vanilla random config diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java index 6addc14f1c6366da14662c445bc90d3017e7ac72..9d785bffce91ff709492e24981f8caaa4e7edf0f 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -568,7 +568,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { this.bb = Entity.INITIAL_AABB; this.stuckSpeedMultiplier = Vec3.ZERO; this.nextStep = 1.0F; - this.random = SHARED_RANDOM; // Paper + this.random = top.leavesmc.leaves.LeavesConfig.useVanillaRandom ? RandomSource.create() : SHARED_RANDOM; // Paper // Leaves - vanilla plz this.remainingFireTicks = -this.getFireImmuneTicks(); this.fluidHeight = new Object2DoubleArrayMap(2); this.fluidOnEyes = new HashSet(); diff --git a/src/main/java/net/minecraft/world/entity/animal/Squid.java b/src/main/java/net/minecraft/world/entity/animal/Squid.java index b72006c4b2342ca9d9a81f54f89fa6d979c33c85..4bcaf4387b509df13e8798990f363a545a27a15d 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Squid.java +++ b/src/main/java/net/minecraft/world/entity/animal/Squid.java @@ -46,7 +46,7 @@ public class Squid extends WaterAnimal { public Squid(EntityType type, Level world) { super(type, world); - //this.random.setSeed((long) this.getId()); // Paper - we set the random to shared, do not clobber the seed + if (top.leavesmc.leaves.LeavesConfig.useVanillaRandom) this.random.setSeed((long) this.getId()); // Paper - we set the random to shared, do not clobber the seed // Leaves - vanilla plz this.tentacleSpeed = 1.0F / (this.random.nextFloat() + 1.0F) * 0.2F; }