mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Make illusioners naturally spawn
This commit is contained in:
@@ -95,6 +95,11 @@ mobs
|
|||||||
- **default**: true
|
- **default**: true
|
||||||
- **description**: Control if giant zombies have AI instead of just standing there
|
- **description**: Control if giant zombies have AI instead of just standing there
|
||||||
|
|
||||||
|
* illusioner
|
||||||
|
* naturally-spawn
|
||||||
|
- **default**: true
|
||||||
|
- **description**: Control if illusioners naturally spawn in the game
|
||||||
|
|
||||||
* iron_golem
|
* iron_golem
|
||||||
* swims
|
* swims
|
||||||
- **default**: true
|
- **default**: true
|
||||||
|
|||||||
58
patches/server/0039-Make-illusioners-naturally-spawn.patch
Normal file
58
patches/server/0039-Make-illusioners-naturally-spawn.patch
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
From 1da508750fdc4ae0a1a5833518aee4ea99455bd5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||||
|
Date: Fri, 5 Jul 2019 11:09:25 -0500
|
||||||
|
Subject: [PATCH] Make illusioners naturally spawn
|
||||||
|
|
||||||
|
---
|
||||||
|
src/main/java/net/minecraft/server/Biomes.java | 18 ++++++++++++++++++
|
||||||
|
.../java/net/pl3x/purpur/PurpurConfig.java | 5 +++++
|
||||||
|
2 files changed, 23 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/Biomes.java b/src/main/java/net/minecraft/server/Biomes.java
|
||||||
|
index 3f7f7a2de..38284a62b 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/Biomes.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/Biomes.java
|
||||||
|
@@ -112,6 +112,24 @@ public abstract class Biomes {
|
||||||
|
addSpawn("eroded_badlands", EnumCreatureType.MONSTER, EntityTypes.GIANT, 10, 1, 2);
|
||||||
|
addSpawn("modified_badlands_plateau", EnumCreatureType.MONSTER, EntityTypes.GIANT, 10, 2, 1);
|
||||||
|
}
|
||||||
|
+ if (net.pl3x.purpur.PurpurConfig.illusionersNaturallySpawn) {
|
||||||
|
+ addSpawn("plains", EnumCreatureType.MONSTER, EntityTypes.ILLUSIONER, 5, 1, 1);
|
||||||
|
+ addSpawn("sunflower_plains", EnumCreatureType.MONSTER, EntityTypes.ILLUSIONER, 5, 1, 1);
|
||||||
|
+ addSpawn("desert", EnumCreatureType.MONSTER, EntityTypes.ILLUSIONER, 5, 1, 1);
|
||||||
|
+ addSpawn("desert_hills", EnumCreatureType.MONSTER, EntityTypes.ILLUSIONER, 5, 1, 1);
|
||||||
|
+ addSpawn("desert_lakes", EnumCreatureType.MONSTER, EntityTypes.ILLUSIONER, 5, 1, 1);
|
||||||
|
+ addSpawn("mountains", EnumCreatureType.MONSTER, EntityTypes.ILLUSIONER, 5, 1, 1);
|
||||||
|
+ addSpawn("gravelly_mountains", EnumCreatureType.MONSTER, EntityTypes.ILLUSIONER, 5, 1, 1);
|
||||||
|
+ addSpawn("modified_gravelly_mountains", EnumCreatureType.MONSTER, EntityTypes.ILLUSIONER, 5, 1, 1);
|
||||||
|
+ addSpawn("savanna", EnumCreatureType.MONSTER, EntityTypes.ILLUSIONER, 5, 1, 1);
|
||||||
|
+ addSpawn("savanna_plateau", EnumCreatureType.MONSTER, EntityTypes.ILLUSIONER, 5, 1, 1);
|
||||||
|
+ addSpawn("shattered_savanna", EnumCreatureType.MONSTER, EntityTypes.ILLUSIONER, 5, 1, 1);
|
||||||
|
+ addSpawn("shattered_savanna_plateau", EnumCreatureType.MONSTER, EntityTypes.ILLUSIONER, 5, 1, 1);
|
||||||
|
+ addSpawn("badlands", EnumCreatureType.MONSTER, EntityTypes.ILLUSIONER, 10, 1, 1);
|
||||||
|
+ addSpawn("badlands_plateau", EnumCreatureType.MONSTER, EntityTypes.ILLUSIONER, 10, 1, 1);
|
||||||
|
+ addSpawn("eroded_badlands", EnumCreatureType.MONSTER, EntityTypes.ILLUSIONER, 10, 1, 1);
|
||||||
|
+ addSpawn("modified_badlands_plateau", EnumCreatureType.MONSTER, EntityTypes.ILLUSIONER, 10, 1, 1);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void addSpawn(String biome, EnumCreatureType ct, EntityTypes et, int weight, int min_group, int max_group) {
|
||||||
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||||
|
index a6f90105f..b4f8cca53 100644
|
||||||
|
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||||
|
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||||
|
@@ -158,6 +158,11 @@ public class PurpurConfig {
|
||||||
|
giantsHaveAI = getBoolean("settings.mobs.giant.have-ai", giantsHaveAI);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ public static boolean illusionersNaturallySpawn = true;
|
||||||
|
+ private static void illusionersSettings() {
|
||||||
|
+ illusionersNaturallySpawn = getBoolean("settings.mobs.illusioner.naturally-spawn", illusionersNaturallySpawn);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
public static boolean ironGolemSwims = true;
|
||||||
|
private static void ironGolemSettings() {
|
||||||
|
ironGolemSwims = getBoolean("settings.mobs.iron_golem.swims", ironGolemSwims);
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
||||||
Reference in New Issue
Block a user