From dfd71f4ab05b447ae40240ac052896063bb96c34 Mon Sep 17 00:00:00 2001 From: Ruben Taelman Date: Wed, 2 Oct 2024 17:14:24 +0200 Subject: [PATCH] Fix VengeanceSpirit using wrong RandomSource Closes #1064 --- .../evilcraft/entity/monster/EntityVengeanceSpirit.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/cyclops/evilcraft/entity/monster/EntityVengeanceSpirit.java b/src/main/java/org/cyclops/evilcraft/entity/monster/EntityVengeanceSpirit.java index dbd7d76854..83bd64f930 100644 --- a/src/main/java/org/cyclops/evilcraft/entity/monster/EntityVengeanceSpirit.java +++ b/src/main/java/org/cyclops/evilcraft/entity/monster/EntityVengeanceSpirit.java @@ -137,7 +137,7 @@ public EntityVengeanceSpirit(EntityType type, L this.blocksBuilding = false; float damage = 0.5F; - int remainingLife = Mth.nextInt(level.random, REMAININGLIFE_MIN, REMAININGLIFE_MAX); + int remainingLife = Mth.nextInt(this.getRandom(), REMAININGLIFE_MIN, REMAININGLIFE_MAX); if(isSwarm()) { damage += 0.5D * getSwarmTier(); remainingLife += (REMAININGLIFE_MAX - REMAININGLIFE_MIN) * getSwarmTier(); @@ -648,9 +648,9 @@ public static EntityVengeanceSpirit spawnRandom(Level level, BlockPos blockPos, int baseDistance = 5; while(canSpawnNew(level, blockPos) && attempts > 0) { BlockPos spawnPos = blockPos.offset( - Mth.nextInt(level.random, baseDistance, baseDistance + area) * Mth.nextInt(level.random, -1, 1), - Mth.nextInt(level.random, 0, 3) * Mth.nextInt(level.random, -1, 1), - Mth.nextInt(level.random, baseDistance, baseDistance + area) * Mth.nextInt(level.random, -1, 1) + Mth.nextInt(spirit.random, baseDistance, baseDistance + area) * Mth.nextInt(spirit.random, -1, 1), + Mth.nextInt(spirit.random, 0, 3) * Mth.nextInt(spirit.random, -1, 1), + Mth.nextInt(spirit.random, baseDistance, baseDistance + area) * Mth.nextInt(spirit.random, -1, 1) ); if(BlockHelpers.doesBlockHaveSolidTopSurface(level, spawnPos.offset(0, -1, 0))) {