mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 10:57:43 +01:00
Change some default config options to match vanilla behaviors
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 8b27ca142306231130854439df63def114455547 Mon Sep 17 00:00:00 2001
|
||||
From 285bf7aad89ef56a3045937502413cab3a816eee Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Thu, 20 Jun 2019 18:48:58 -0500
|
||||
Subject: [PATCH] Phantoms spawn naturally in the end
|
||||
@@ -6,12 +6,12 @@ Subject: [PATCH] Phantoms spawn naturally in the end
|
||||
---
|
||||
.../server/BiomeTheEndHighIsland.java | 3 ++-
|
||||
.../net/minecraft/server/EntityPhantom.java | 19 +++++++++++++++++++
|
||||
.../net/minecraft/server/SpawnerCreature.java | 6 ++++++
|
||||
.../java/net/pl3x/purpur/PurpurConfig.java | 5 +++++
|
||||
.../net/minecraft/server/SpawnerCreature.java | 9 +++++++++
|
||||
.../java/net/pl3x/purpur/PurpurConfig.java | 2 ++
|
||||
4 files changed, 32 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BiomeTheEndHighIsland.java b/src/main/java/net/minecraft/server/BiomeTheEndHighIsland.java
|
||||
index e8cf6153ec..b2a8fe3020 100644
|
||||
index e8cf6153ec..82f3a9a95f 100644
|
||||
--- a/src/main/java/net/minecraft/server/BiomeTheEndHighIsland.java
|
||||
+++ b/src/main/java/net/minecraft/server/BiomeTheEndHighIsland.java
|
||||
@@ -4,10 +4,11 @@ public class BiomeTheEndHighIsland extends BiomeBase {
|
||||
@@ -24,11 +24,11 @@ index e8cf6153ec..b2a8fe3020 100644
|
||||
BiomeDecoratorGroups.aq(this);
|
||||
this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, a(WorldGenerator.CHORUS_PLANT, WorldGenFeatureConfiguration.e, WorldGenDecorator.K, WorldGenFeatureDecoratorConfiguration.e));
|
||||
this.a(EnumCreatureType.MONSTER, new BiomeBase.BiomeMeta(EntityTypes.ENDERMAN, 10, 4, 4));
|
||||
+ if (net.pl3x.purpur.PurpurConfig.spawnPhantomsInTheEnd) this.a(EnumCreatureType.MONSTER, new BiomeBase.BiomeMeta(EntityTypes.PHANTOM, 5, 1, 4)); // Purpur
|
||||
+ this.a(EnumCreatureType.MONSTER, new BiomeBase.BiomeMeta(EntityTypes.PHANTOM, 5, 1, 4)); // Purpur
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPhantom.java b/src/main/java/net/minecraft/server/EntityPhantom.java
|
||||
index 38551c94f4..245c258531 100644
|
||||
index 69a1c79e74..2fada230bc 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPhantom.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPhantom.java
|
||||
@@ -12,6 +12,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
@@ -52,7 +52,7 @@ index 38551c94f4..245c258531 100644
|
||||
@Override
|
||||
protected EntityAIBodyControl o() {
|
||||
return new EntityPhantom.d(this);
|
||||
@@ -103,6 +110,18 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
@@ -105,6 +112,18 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
this.world.addParticle(Particles.MYCELIUM, this.locX - (double) f2, this.locY + (double) f4, this.locZ - (double) f3, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
|
||||
@@ -72,15 +72,18 @@ index 38551c94f4..245c258531 100644
|
||||
this.die();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
index 5e6559df0b..490445cefa 100644
|
||||
index 5e6559df0b..6386e7edcf 100644
|
||||
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
@@ -78,6 +78,12 @@ public final class SpawnerCreature {
|
||||
@@ -78,6 +78,15 @@ public final class SpawnerCreature {
|
||||
if (biomebase_biomemeta.b.e() != EnumCreatureType.MISC && (biomebase_biomemeta.b.d() || d0 <= 16384.0D)) {
|
||||
EntityTypes<?> entitytypes = biomebase_biomemeta.b;
|
||||
|
||||
+ // Purpur start
|
||||
+ if (net.pl3x.purpur.PurpurConfig.spawnPhantomsInTheEnd && entitytypes == EntityTypes.PHANTOM) {
|
||||
+ if (entitytypes == EntityTypes.PHANTOM) {
|
||||
+ if (!net.pl3x.purpur.PurpurConfig.spawnPhantomsInTheEnd) {
|
||||
+ return mobsSpawned;
|
||||
+ }
|
||||
+ blockposition_mutableblockposition.y = 70 + world.random.nextInt(20);
|
||||
+ }
|
||||
+ // Purpur end
|
||||
@@ -89,21 +92,22 @@ index 5e6559df0b..490445cefa 100644
|
||||
EntityPositionTypes.Surface entitypositiontypes_surface = EntityPositionTypes.a(entitytypes);
|
||||
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index 9cd05d37ed..7dac34a6cd 100644
|
||||
index 9a9935edbc..71138c7d52 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -161,6 +161,11 @@ public class PurpurConfig {
|
||||
ironGolemSwims = getBoolean("settings.mobs.iron_golem.swims", ironGolemSwims);
|
||||
@@ -164,10 +164,12 @@ public class PurpurConfig {
|
||||
public static double crystalsAttackPhantomsRadius = 0.0D;
|
||||
public static float crystalsAttackPhantomDamage = 1.0F;
|
||||
public static double phantomsOrbitCrystalsRadius = 0.0D;
|
||||
+ public static boolean spawnPhantomsInTheEnd = false;
|
||||
private static void phantomSettings() {
|
||||
crystalsAttackPhantomsRadius = getDouble("settings.mobs.phantom.crystals-attack-range", crystalsAttackPhantomsRadius);
|
||||
crystalsAttackPhantomDamage = (float) getDouble("settings.mobs.phantom.crystals-attack-damage", crystalsAttackPhantomDamage);
|
||||
phantomsOrbitCrystalsRadius = getDouble("settings.mob.phantom.orbit-crystal-radius", phantomsOrbitCrystalsRadius);
|
||||
+ spawnPhantomsInTheEnd = getBoolean("settings.mobs.phantom.spawn-in-the-end", spawnPhantomsInTheEnd);
|
||||
}
|
||||
|
||||
+ public static boolean spawnPhantomsInTheEnd = true;
|
||||
+ private static void phantomSettings() {
|
||||
+ spawnPhantomsInTheEnd = getBoolean("settings.mobs.phantom.spawn-in-the-end", spawnPhantomsInTheEnd);
|
||||
+ }
|
||||
+
|
||||
public static boolean snowmanDropsPumpkin = true;
|
||||
public static boolean snowmanPumpkinPutBack = true;
|
||||
private static void snowmansSettings() {
|
||||
public static boolean snowmanDropsPumpkin = false;
|
||||
--
|
||||
2.20.1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user