|
| 1 | +--- a/net/minecraft/world/entity/raid/Raid.java |
| 2 | ++++ b/net/minecraft/world/entity/raid/Raid.java |
| 3 | +@@ -552,6 +_,11 @@ |
| 4 | + boolean isBonusGroup = this.shouldSpawnBonusGroup(); |
| 5 | + |
| 6 | + for (Raid.RaiderType raiderType : Raid.RaiderType.VALUES) { |
| 7 | ++ // Purpur start - exclude Illusioners if the feature is disabled |
| 8 | ++ if (raiderType == Raid.RaiderType.ILLUSIONER && !level.purpurConfig.illusionerSpawnInRaids) { |
| 9 | ++ continue; |
| 10 | ++ } |
| 11 | ++ // Purpur end |
| 12 | + int numSpawns = this.getDefaultNumSpawns(raiderType, groupNumber, isBonusGroup) |
| 13 | + + this.getPotentialBonusSpawns(raiderType, this.random, groupNumber, difficulty, isBonusGroup); |
| 14 | + int ravagersSpawned = 0; |
| 15 | +@@ -573,9 +_,17 @@ |
| 16 | + Raider ridingRaider = null; |
| 17 | + if (groupNumber == this.getNumGroups(Difficulty.NORMAL)) { |
| 18 | + ridingRaider = EntityTypes.PILLAGER.create(level, EntitySpawnReason.EVENT); |
| 19 | ++ // Purpur start - use the setting to determine if Ravagers with Illusioners should spawn |
| 20 | + } else if (groupNumber >= this.getNumGroups(Difficulty.HARD)) { |
| 21 | + if (ravagersSpawned == 0) { |
| 22 | +- ridingRaider = EntityTypes.EVOKER.create(level, EntitySpawnReason.EVENT); |
| 23 | ++ if (level.purpurConfig.illusionerSpawnInRaids) { |
| 24 | ++ ridingRaider = random.nextBoolean() |
| 25 | ++ ? EntityTypes.EVOKER.create(level, EntitySpawnReason.EVENT) |
| 26 | ++ : EntityTypes.ILLUSIONER.create(level, EntitySpawnReason.EVENT); |
| 27 | ++ } else { |
| 28 | ++ ridingRaider = EntityTypes.EVOKER.create(level, EntitySpawnReason.EVENT); |
| 29 | ++ } |
| 30 | ++ // Purpur end |
| 31 | + } else { |
| 32 | + ridingRaider = EntityTypes.VINDICATOR.create(level, EntitySpawnReason.EVENT); |
| 33 | + } |
| 34 | +@@ -782,6 +_,7 @@ |
| 35 | + int bonusSpawns; |
| 36 | + switch (type) { |
| 37 | + case VINDICATOR: |
| 38 | ++ case ILLUSIONER: // Purpur - Ability for illusioners to spawn during raids |
| 39 | + case PILLAGER: |
| 40 | + if (isEasy) { |
| 41 | + bonusSpawns = random.nextInt(2); |
| 42 | +@@ -867,6 +_,7 @@ |
| 43 | + VINDICATOR(EntityTypes.VINDICATOR, new int[]{0, 0, 2, 0, 1, 4, 2, 5}), |
| 44 | + EVOKER(EntityTypes.EVOKER, new int[]{0, 0, 0, 0, 0, 1, 1, 2}), |
| 45 | + PILLAGER(EntityTypes.PILLAGER, new int[]{0, 4, 3, 3, 4, 4, 4, 2}), |
| 46 | ++ ILLUSIONER(EntityTypes.ILLUSIONER, new int[]{0, 0, 1, 0, 1, 1, 0, 1}), // Purpur - Add Illusioners to RaiderType |
| 47 | + WITCH(EntityTypes.WITCH, new int[]{0, 0, 0, 0, 3, 0, 0, 1}), |
| 48 | + RAVAGER(EntityTypes.RAVAGER, new int[]{0, 0, 0, 1, 0, 1, 0, 2}); |
| 49 | + |
0 commit comments