mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Change some default config options to match vanilla behaviors
This commit is contained in:
@@ -103,8 +103,8 @@ mobs
|
||||
|
||||
* cow
|
||||
* feed-mushrooms-for-mooshroom
|
||||
- **default**: 5
|
||||
- **description**: Number of mushrooms to feed a cow to make it transform into a mooshroom. Set to 0 to disable.
|
||||
- **default**: 0
|
||||
- **description**: Number of mushrooms to feed a cow to make it transform into a mooshroom. Value of 0 disables feature.
|
||||
|
||||
* ender-dragon
|
||||
* death-always-places-egg-block
|
||||
@@ -136,8 +136,17 @@ mobs
|
||||
- **description**: Set whether iron golem can swim or not
|
||||
|
||||
* phantom
|
||||
* crystals-attack-range
|
||||
- **default**: 0.0
|
||||
- **description**: Radius crystals scan for phantoms to attack. Value of 0 disables feature
|
||||
* crystals-attack-damage
|
||||
- **default**: 1.0F
|
||||
- **description**: Amount of damage per second crystals deal to phantoms. Value of 1.0 is half a heart
|
||||
* orbit-crystal-radius
|
||||
- **default**: 0.0
|
||||
- **description**: Radius which phantoms scan for crystals to orbit. Value of 0 disables feature
|
||||
* spawn-in-the-end
|
||||
- **default**: true
|
||||
- **default**: false
|
||||
- **description**: Set whether phantoms spawn naturally in the end
|
||||
|
||||
* pillager
|
||||
@@ -147,11 +156,11 @@ mobs
|
||||
|
||||
* snow_golem
|
||||
* drops-pumpkin-when-sheared
|
||||
- **default**: true
|
||||
- **default**: false
|
||||
- **description**: Control if shearing a snowman makes the pumpkin drop to the ground
|
||||
|
||||
* pumpkin-can-be-added-back
|
||||
- **default**: true
|
||||
- **default**: false
|
||||
- **description**: Control if pumpkins can be placed back onto snowmen
|
||||
|
||||
* villager
|
||||
@@ -294,8 +303,13 @@ limit-pillager-outpost-spawns
|
||||
|
||||
radius-villager-iron-golem-spawns
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
* **default**: 10
|
||||
* **description**: Radius villagers search for existing iron golems before spawning more
|
||||
* **default**: 0
|
||||
* **description**: Radius villagers search for existing iron golems before spawning more. Value of 0 disables features
|
||||
|
||||
limit-villager-iron-golem-spawns
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
* **default**: 5
|
||||
* **description**: Maximum amount of iron golems villagers can spawn in configured radius
|
||||
|
||||
elytra
|
||||
~~~~~~
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
From 28e6cd80aab548a6cbb18a9a3e548b1aea593ab0 Mon Sep 17 00:00:00 2001
|
||||
From b653df02c21db40f850ad00a87994d01b617b98e Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 4 May 2019 01:10:30 -0500
|
||||
Subject: [PATCH] cows to mooshroom when fed mushrooms
|
||||
|
||||
---
|
||||
.../java/net/minecraft/server/Entity.java | 2 +
|
||||
.../java/net/minecraft/server/EntityCow.java | 71 ++++++++++++++++++-
|
||||
.../java/net/minecraft/server/EntityCow.java | 70 +++++++++++++++++++
|
||||
.../net/minecraft/server/EntityLiving.java | 10 ++-
|
||||
.../java/net/pl3x/purpur/PurpurConfig.java | 5 ++
|
||||
4 files changed, 85 insertions(+), 3 deletions(-)
|
||||
4 files changed, 85 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index e8def7f812..40ab9daade 100644
|
||||
@@ -31,24 +31,23 @@ index e8def7f812..40ab9daade 100644
|
||||
this.setPositionRotation(entity.locX, entity.locY, entity.locZ, entity.yaw, entity.pitch);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityCow.java b/src/main/java/net/minecraft/server/EntityCow.java
|
||||
index d2c2e3cc33..c3aef0b2a1 100644
|
||||
index d2c2e3cc33..0c00a86a84 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityCow.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityCow.java
|
||||
@@ -16,7 +16,7 @@ public class EntityCow extends EntityAnimal {
|
||||
@@ -16,6 +16,7 @@ public class EntityCow extends EntityAnimal {
|
||||
this.goalSelector.a(0, new PathfinderGoalFloat(this));
|
||||
this.goalSelector.a(1, new PathfinderGoalPanic(this, 2.0D));
|
||||
this.goalSelector.a(2, new PathfinderGoalBreed(this, 1.0D));
|
||||
- this.goalSelector.a(3, new PathfinderGoalTempt(this, 1.25D, RecipeItemStack.a(Items.WHEAT), false));
|
||||
+ this.goalSelector.a(3, new PathfinderGoalTempt(this, 1.25D, RecipeItemStack.a(Items.WHEAT, Blocks.RED_MUSHROOM.getItem(), Blocks.BROWN_MUSHROOM.getItem()), false));
|
||||
+ if (net.pl3x.purpur.PurpurConfig.feedMushroomsToCows > 0) this.goalSelector.a(3, new PathfinderGoalTempt(this, 1.25D, RecipeItemStack.a(Items.WHEAT, Blocks.RED_MUSHROOM.getItem(), Blocks.BROWN_MUSHROOM.getItem()), false)); else // Purpur
|
||||
this.goalSelector.a(3, new PathfinderGoalTempt(this, 1.25D, RecipeItemStack.a(Items.WHEAT), false));
|
||||
this.goalSelector.a(4, new PathfinderGoalFollowParent(this, 1.25D));
|
||||
this.goalSelector.a(5, new PathfinderGoalRandomStrollLand(this, 1.0D));
|
||||
this.goalSelector.a(6, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 6.0F));
|
||||
@@ -79,11 +79,80 @@ public class EntityCow extends EntityAnimal {
|
||||
@@ -79,11 +80,80 @@ public class EntityCow extends EntityAnimal {
|
||||
// CraftBukkit end
|
||||
|
||||
return true;
|
||||
+ // Purpur start - feed mushroom to change to mooshroom
|
||||
+ } else if (getEntityType() != EntityTypes.MOOSHROOM && isMushroom(itemstack)) {
|
||||
+ } else if (net.pl3x.purpur.PurpurConfig.feedMushroomsToCows > 0 && getEntityType() != EntityTypes.MOOSHROOM && isMushroom(itemstack)) {
|
||||
+ return feedMushroom(entityhuman, itemstack);
|
||||
+ // Purpur end
|
||||
} else {
|
||||
@@ -125,7 +124,7 @@ index d2c2e3cc33..c3aef0b2a1 100644
|
||||
public EntityCow createChild(EntityAgeable entityageable) {
|
||||
return (EntityCow) EntityTypes.COW.a(this.world);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 87056e17ca..168b5aa2d1 100644
|
||||
index 31ab07176e..5ee807f0ea 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -2742,8 +2742,14 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -146,7 +145,7 @@ index 87056e17ca..168b5aa2d1 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index b0f0040a4a..d433eca03b 100644
|
||||
index b0f0040a4a..d013f84076 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -130,4 +130,9 @@ public class PurpurConfig {
|
||||
@@ -154,7 +153,7 @@ index b0f0040a4a..d433eca03b 100644
|
||||
return config.getString(path, config.getString(path));
|
||||
}
|
||||
+
|
||||
+ public static int feedMushroomsToCows = 5;
|
||||
+ public static int feedMushroomsToCows = 0;
|
||||
+ private static void cowsSettings() {
|
||||
+ feedMushroomsToCows = getInt("settings.mobs.cow.feed-mushrooms-for-mooshroom", feedMushroomsToCows);
|
||||
+ }
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
From f35349a7b5b61f0bf0f18310d6272b9877ddf1d8 Mon Sep 17 00:00:00 2001
|
||||
From fa488761323e77e154ec12c60fe99e2e6a98ff0e Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Fri, 3 May 2019 23:58:44 -0500
|
||||
Subject: [PATCH] Snowman set pumpkin on/off by player interaction
|
||||
|
||||
---
|
||||
.../net/minecraft/server/EntitySnowman.java | 19 ++++++++++++++++++-
|
||||
.../java/net/pl3x/purpur/PurpurConfig.java | 7 +++++++
|
||||
2 files changed, 25 insertions(+), 1 deletion(-)
|
||||
.../java/net/minecraft/server/EntitySnowman.java | 16 ++++++++++++++++
|
||||
src/main/java/net/pl3x/purpur/PurpurConfig.java | 7 +++++++
|
||||
2 files changed, 23 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntitySnowman.java b/src/main/java/net/minecraft/server/EntitySnowman.java
|
||||
index fe1381cc1..1fed1d6e7 100644
|
||||
index fe1381cc17..42d0c0017d 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntitySnowman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntitySnowman.java
|
||||
@@ -8,6 +8,7 @@ import org.bukkit.event.player.PlayerShearEntityEvent;
|
||||
@@ -20,16 +20,7 @@ index fe1381cc1..1fed1d6e7 100644
|
||||
private static final DataWatcherObject<Byte> b = DataWatcher.a(EntitySnowman.class, DataWatcherRegistry.a);
|
||||
|
||||
public EntitySnowman(EntityTypes<? extends EntitySnowman> entitytypes, World world) {
|
||||
@@ -112,7 +113,7 @@ public class EntitySnowman extends EntityGolem implements IRangedEntity {
|
||||
protected boolean a(EntityHuman entityhuman, EnumHand enumhand) {
|
||||
ItemStack itemstack = entityhuman.b(enumhand);
|
||||
|
||||
- if (itemstack.getItem() == Items.SHEARS && this.hasPumpkin() && !this.world.isClientSide) {
|
||||
+ if (this.hasPumpkin()) { if (itemstack.getItem() == Items.SHEARS) { // Purpur
|
||||
// CraftBukkit start
|
||||
PlayerShearEntityEvent event = new PlayerShearEntityEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), this.getBukkitEntity());
|
||||
this.world.getServer().getPluginManager().callEvent(event);
|
||||
@@ -126,6 +127,22 @@ public class EntitySnowman extends EntityGolem implements IRangedEntity {
|
||||
@@ -126,6 +127,21 @@ public class EntitySnowman extends EntityGolem implements IRangedEntity {
|
||||
itemstack.damage(1, entityhuman, (entityhuman1) -> {
|
||||
entityhuman1.d(enumhand);
|
||||
});
|
||||
@@ -41,19 +32,18 @@ index fe1381cc1..1fed1d6e7 100644
|
||||
+ world.addEntity(pumpkin);
|
||||
+ }
|
||||
+ return true;
|
||||
+ }} else {
|
||||
+ if (net.pl3x.purpur.PurpurConfig.snowmanPumpkinPutBack && PUMPKIN.test(itemstack)) {
|
||||
+ setHasPumpkin(true);
|
||||
+ if (!entityhuman.abilities.canInstantlyBuild) {
|
||||
+ itemstack.subtract(1);
|
||||
+ }
|
||||
+ return true;
|
||||
+ } else if (net.pl3x.purpur.PurpurConfig.snowmanPumpkinPutBack && !hasPumpkin() && PUMPKIN.test(itemstack)) {
|
||||
+ setHasPumpkin(true);
|
||||
+ if (!entityhuman.abilities.canInstantlyBuild) {
|
||||
+ itemstack.subtract(1);
|
||||
+ }
|
||||
+ return true;
|
||||
+ // Purpur end
|
||||
}
|
||||
|
||||
return super.a(entityhuman, enumhand);
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index d433eca03..7faa0c6ac 100644
|
||||
index d013f84076..37bab6180c 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -135,4 +135,11 @@ public class PurpurConfig {
|
||||
@@ -61,8 +51,8 @@ index d433eca03..7faa0c6ac 100644
|
||||
feedMushroomsToCows = getInt("settings.mobs.cow.feed-mushrooms-for-mooshroom", feedMushroomsToCows);
|
||||
}
|
||||
+
|
||||
+ public static boolean snowmanDropsPumpkin = true;
|
||||
+ public static boolean snowmanPumpkinPutBack = true;
|
||||
+ public static boolean snowmanDropsPumpkin = false;
|
||||
+ public static boolean snowmanPumpkinPutBack = false;
|
||||
+ private static void snowmansSettings() {
|
||||
+ snowmanDropsPumpkin = getBoolean("settings.mobs.snow_golem.drops-pumpkin-when-sheared", snowmanDropsPumpkin);
|
||||
+ snowmanPumpkinPutBack = getBoolean("settings.mobs.snow_golem.pumpkin-can-be-added-back", snowmanPumpkinPutBack);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 2dedb27e03409f30cbd7b2f6891c9601f60f4851 Mon Sep 17 00:00:00 2001
|
||||
From 3613b5b5c27a0265371bf4612156b8aecf0e92c0 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Thu, 9 May 2019 18:26:06 -0500
|
||||
Subject: [PATCH] Phantoms attracted to crystals and crystals shoot phantoms
|
||||
@@ -7,9 +7,10 @@ Subject: [PATCH] Phantoms attracted to crystals and crystals shoot phantoms
|
||||
.../net/minecraft/server/DamageSource.java | 1 +
|
||||
.../java/net/minecraft/server/Entity.java | 8 +-
|
||||
.../minecraft/server/EntityEnderCrystal.java | 49 +++++
|
||||
.../net/minecraft/server/EntityPhantom.java | 180 +++++++++++++++++-
|
||||
.../net/minecraft/server/EntityPhantom.java | 181 +++++++++++++++++-
|
||||
.../net/minecraft/server/IEntityAccess.java | 1 +
|
||||
5 files changed, 225 insertions(+), 14 deletions(-)
|
||||
.../java/net/pl3x/purpur/PurpurConfig.java | 9 +
|
||||
6 files changed, 235 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/DamageSource.java b/src/main/java/net/minecraft/server/DamageSource.java
|
||||
index 730a15f332..31454349a2 100644
|
||||
@@ -54,7 +55,7 @@ index 40ab9daade..dd787b7b65 100644
|
||||
return null;
|
||||
} else if (this.world.isClientSide) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityEnderCrystal.java b/src/main/java/net/minecraft/server/EntityEnderCrystal.java
|
||||
index 801552fc61..ad88cc9822 100644
|
||||
index 801552fc61..9c7f7fee85 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityEnderCrystal.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityEnderCrystal.java
|
||||
@@ -13,6 +13,12 @@ public class EntityEnderCrystal extends Entity {
|
||||
@@ -75,12 +76,12 @@ index 801552fc61..ad88cc9822 100644
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
+ if (--idleCooldown > 0) {
|
||||
+ if (net.pl3x.purpur.PurpurConfig.crystalsAttackPhantomsRadius <= 0 || --idleCooldown > 0) {
|
||||
+ return; // on cooldown
|
||||
+ }
|
||||
+
|
||||
+ if (targetPhantom == null) {
|
||||
+ for (EntityPhantom phantom : world.getEntitiesByClass(EntityPhantom.class, getBoundingBox().grow(16, 16, 16))) {
|
||||
+ for (EntityPhantom phantom : world.getEntitiesByClass(EntityPhantom.class, getBoundingBox().grow(net.pl3x.purpur.PurpurConfig.crystalsAttackPhantomsRadius))) {
|
||||
+ if (phantom.hasLineOfSight(this)) {
|
||||
+ attackPhantom(phantom);
|
||||
+ break;
|
||||
@@ -93,7 +94,7 @@ index 801552fc61..ad88cc9822 100644
|
||||
+ if (targetPhantom.hasLineOfSight(this)) {
|
||||
+ if (phantomDamageCooldown <= 0) {
|
||||
+ phantomDamageCooldown = 20;
|
||||
+ targetPhantom.damageEntity(DamageSource.indirectMagic(this, this), 1.0F);
|
||||
+ targetPhantom.damageEntity(DamageSource.indirectMagic(this, this), net.pl3x.purpur.PurpurConfig.crystalsAttackPhantomDamage);
|
||||
+ }
|
||||
+ } else {
|
||||
+ forgetPhantom(); // no longer in sight
|
||||
@@ -122,7 +123,7 @@ index 801552fc61..ad88cc9822 100644
|
||||
@Override
|
||||
protected void b(NBTTagCompound nbttagcompound) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPhantom.java b/src/main/java/net/minecraft/server/EntityPhantom.java
|
||||
index e5d032d02b..2d62248fcc 100644
|
||||
index e5d032d02b..7bc7b33665 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPhantom.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPhantom.java
|
||||
@@ -8,9 +8,10 @@ import javax.annotation.Nullable;
|
||||
@@ -139,7 +140,7 @@ index e5d032d02b..2d62248fcc 100644
|
||||
|
||||
public EntityPhantom(EntityTypes<? extends EntityPhantom> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
@@ -29,10 +30,14 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
@@ -29,10 +30,16 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
|
||||
@Override
|
||||
protected void initPathfinder() {
|
||||
@@ -148,8 +149,10 @@ index e5d032d02b..2d62248fcc 100644
|
||||
- this.goalSelector.a(3, new EntityPhantom.e());
|
||||
- this.targetSelector.a(1, new EntityPhantom.b());
|
||||
+ // Purpur start
|
||||
+ this.goalSelector.a(1, new FindCrystalGoal(this));
|
||||
+ this.goalSelector.a(2, new OrbitCrystalGoal(this));
|
||||
+ if (net.pl3x.purpur.PurpurConfig.phantomsOrbitCrystalsRadius > 0) {
|
||||
+ this.goalSelector.a(1, new FindCrystalGoal(this));
|
||||
+ this.goalSelector.a(2, new OrbitCrystalGoal(this));
|
||||
+ }
|
||||
+ this.goalSelector.a(3, new EntityPhantom.c()); // PickAttackGoal
|
||||
+ this.goalSelector.a(4, new EntityPhantom.i()); // SweepAttackGoal
|
||||
+ this.goalSelector.a(5, new EntityPhantom.e()); // OrbitPointGoal
|
||||
@@ -158,7 +161,7 @@ index e5d032d02b..2d62248fcc 100644
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -114,6 +119,26 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
@@ -114,6 +121,26 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
super.mobTick();
|
||||
}
|
||||
|
||||
@@ -185,7 +188,7 @@ index e5d032d02b..2d62248fcc 100644
|
||||
@Override
|
||||
public GroupDataEntity prepare(GeneratorAccess generatoraccess, DifficultyDamageScaler difficultydamagescaler, EnumMobSpawn enummobspawn, @Nullable GroupDataEntity groupdataentity, @Nullable NBTTagCompound nbttagcompound) {
|
||||
this.d = (new BlockPosition(this)).up(5);
|
||||
@@ -202,6 +227,136 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
@@ -202,6 +229,135 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@@ -203,7 +206,7 @@ index e5d032d02b..2d62248fcc 100644
|
||||
+ @Override
|
||||
+ public boolean a() { // shouldExecute
|
||||
+ double range = maxTargetRange();
|
||||
+ List<EntityEnderCrystal> crystals = world.getEntitiesByClass(EntityEnderCrystal.class, phantom.getBoundingBox().grow(range, range, range));
|
||||
+ List<EntityEnderCrystal> crystals = world.getEntitiesByClass(EntityEnderCrystal.class, phantom.getBoundingBox().grow(range));
|
||||
+ if (crystals.isEmpty()) {
|
||||
+ return false;
|
||||
+ }
|
||||
@@ -238,8 +241,7 @@ index e5d032d02b..2d62248fcc 100644
|
||||
+ }
|
||||
+
|
||||
+ private double maxTargetRange() {
|
||||
+ AttributeInstance range = phantom.getAttributeInstance(GenericAttributes.FOLLOW_RANGE);
|
||||
+ return range == null ? 16.0D : range.getValue();
|
||||
+ return net.pl3x.purpur.PurpurConfig.phantomsOrbitCrystalsRadius;
|
||||
+ }
|
||||
+
|
||||
+ class DistanceComparator implements java.util.Comparator<Entity> {
|
||||
@@ -322,7 +324,7 @@ index e5d032d02b..2d62248fcc 100644
|
||||
class b extends PathfinderGoal {
|
||||
|
||||
private final PathfinderTargetCondition b;
|
||||
@@ -259,7 +414,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
@@ -259,7 +415,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
public boolean a() {
|
||||
EntityLiving entityliving = EntityPhantom.this.getGoalTarget();
|
||||
|
||||
@@ -331,7 +333,7 @@ index e5d032d02b..2d62248fcc 100644
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -305,11 +460,16 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
@@ -305,11 +461,16 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
|
||||
@Override
|
||||
public boolean a() {
|
||||
@@ -349,7 +351,7 @@ index e5d032d02b..2d62248fcc 100644
|
||||
EntityLiving entityliving = EntityPhantom.this.getGoalTarget();
|
||||
|
||||
if (entityliving == null) {
|
||||
@@ -379,7 +539,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
@@ -379,7 +540,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
|
||||
@Override
|
||||
public boolean a() {
|
||||
@@ -370,6 +372,26 @@ index dca18afdbb..9aaa75e959 100644
|
||||
default <T extends Entity> List<T> a(Class<? extends T> oclass, AxisAlignedBB axisalignedbb) {
|
||||
return this.a(oclass, axisalignedbb, IEntitySelector.f);
|
||||
}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index 37bab6180c..feab5b66f8 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -136,6 +136,15 @@ public class PurpurConfig {
|
||||
feedMushroomsToCows = getInt("settings.mobs.cow.feed-mushrooms-for-mooshroom", feedMushroomsToCows);
|
||||
}
|
||||
|
||||
+ public static double crystalsAttackPhantomsRadius = 0.0D;
|
||||
+ public static float crystalsAttackPhantomDamage = 1.0F;
|
||||
+ public static double phantomsOrbitCrystalsRadius = 0.0D;
|
||||
+ 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);
|
||||
+ }
|
||||
+
|
||||
public static boolean snowmanDropsPumpkin = false;
|
||||
public static boolean snowmanPumpkinPutBack = false;
|
||||
private static void snowmansSettings() {
|
||||
--
|
||||
2.20.1
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 1dc75ffb5b36e250b78c01c716e7d09c7eb74a65 Mon Sep 17 00:00:00 2001
|
||||
From f6099f4243f8aff62dda9f6d2d8fe99732941d58 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Tue, 30 Apr 2019 19:17:21 -0500
|
||||
Subject: [PATCH] Integrate ridables
|
||||
@@ -430,7 +430,7 @@ index 1e3782122a..c0b066d188 100644
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityCow.java b/src/main/java/net/minecraft/server/EntityCow.java
|
||||
index c3aef0b2a1..a79ce9296a 100644
|
||||
index 0c00a86a84..2e3d6b657f 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityCow.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityCow.java
|
||||
@@ -9,11 +9,13 @@ public class EntityCow extends EntityAnimal {
|
||||
@@ -446,7 +446,7 @@ index c3aef0b2a1..a79ce9296a 100644
|
||||
+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur
|
||||
this.goalSelector.a(1, new PathfinderGoalPanic(this, 2.0D));
|
||||
this.goalSelector.a(2, new PathfinderGoalBreed(this, 1.0D));
|
||||
this.goalSelector.a(3, new PathfinderGoalTempt(this, 1.25D, RecipeItemStack.a(Items.WHEAT, Blocks.RED_MUSHROOM.getItem(), Blocks.BROWN_MUSHROOM.getItem()), false));
|
||||
if (net.pl3x.purpur.PurpurConfig.feedMushroomsToCows > 0) this.goalSelector.a(3, new PathfinderGoalTempt(this, 1.25D, RecipeItemStack.a(Items.WHEAT, Blocks.RED_MUSHROOM.getItem(), Blocks.BROWN_MUSHROOM.getItem()), false)); else // Purpur
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java
|
||||
index bcb7276308..038ff1d93c 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityCreeper.java
|
||||
@@ -1091,7 +1091,7 @@ index 1160929e1b..3318e274f8 100644
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
index 8771fb37da..7418ef4916 100644
|
||||
index 5d3e48ba61..2a943f3160 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
@@ -362,9 +362,21 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@@ -1251,7 +1251,7 @@ index 8e463111bb..2c34ab337a 100644
|
||||
this.goalSelector.a(2, new PathfinderGoalMoveTowardsTarget(this, 0.9D, 32.0F));
|
||||
this.goalSelector.a(2, new PathfinderGoalStrollVillage(this, 0.6D));
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 49cbd682fc..f5504b6953 100644
|
||||
index 0054d3bed5..2b7925b5d4 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -87,10 +87,10 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -1651,7 +1651,7 @@ index a7cdb5e7a2..0eeb110554 100644
|
||||
this.goalSelector.a(2, this.goalSit);
|
||||
this.goalSelector.a(2, new PathfinderGoalFollowOwnerParrot(this, 1.0D, 5.0F, 1.0F));
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPhantom.java b/src/main/java/net/minecraft/server/EntityPhantom.java
|
||||
index 2d62248fcc..38551c94f4 100644
|
||||
index 7bc7b33665..69a1c79e74 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPhantom.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPhantom.java
|
||||
@@ -15,12 +15,14 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
@@ -1674,10 +1674,10 @@ index 2d62248fcc..38551c94f4 100644
|
||||
protected void initPathfinder() {
|
||||
// Purpur start
|
||||
+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur
|
||||
this.goalSelector.a(1, new FindCrystalGoal(this));
|
||||
this.goalSelector.a(2, new OrbitCrystalGoal(this));
|
||||
this.goalSelector.a(3, new EntityPhantom.c()); // PickAttackGoal
|
||||
@@ -44,6 +47,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
if (net.pl3x.purpur.PurpurConfig.phantomsOrbitCrystalsRadius > 0) {
|
||||
this.goalSelector.a(1, new FindCrystalGoal(this));
|
||||
this.goalSelector.a(2, new OrbitCrystalGoal(this));
|
||||
@@ -46,6 +49,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
protected void initAttributes() {
|
||||
super.initAttributes();
|
||||
this.getAttributeMap().b(GenericAttributes.ATTACK_DAMAGE);
|
||||
@@ -1685,7 +1685,7 @@ index 2d62248fcc..38551c94f4 100644
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -107,7 +111,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
@@ -109,7 +113,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
|
||||
@Override
|
||||
public void movementTick() {
|
||||
@@ -1694,7 +1694,7 @@ index 2d62248fcc..38551c94f4 100644
|
||||
this.setOnFire(8);
|
||||
}
|
||||
|
||||
@@ -606,14 +610,23 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
@@ -607,14 +611,23 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1720,7 +1720,7 @@ index 2d62248fcc..38551c94f4 100644
|
||||
}
|
||||
|
||||
class d extends EntityAIBodyControl {
|
||||
@@ -629,7 +642,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
@@ -630,7 +643,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1729,7 +1729,7 @@ index 2d62248fcc..38551c94f4 100644
|
||||
|
||||
private float j = 0.1F;
|
||||
|
||||
@@ -637,8 +650,19 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
@@ -638,8 +651,19 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
super(entityinsentient);
|
||||
}
|
||||
|
||||
@@ -2159,7 +2159,7 @@ index 253ff9594c..af3876a6c8 100644
|
||||
|
||||
this.setMot(vec3d.x, 0.41999998688697815D, vec3d.z);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntitySnowman.java b/src/main/java/net/minecraft/server/EntitySnowman.java
|
||||
index 1fed1d6e75..0f612b8f44 100644
|
||||
index 42d0c0017d..984747f999 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntitySnowman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntitySnowman.java
|
||||
@@ -13,10 +13,12 @@ public class EntitySnowman extends EntityGolem implements IRangedEntity {
|
||||
@@ -2643,7 +2643,7 @@ index da8a8c8551..bf0ea521a5 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index 7faa0c6ac7..158cd07b17 100644
|
||||
index feab5b66f8..2b67041f45 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -131,6 +131,11 @@ public class PurpurConfig {
|
||||
@@ -2655,10 +2655,10 @@ index 7faa0c6ac7..158cd07b17 100644
|
||||
+ requireShiftToMount = getBoolean("settings.mobs.require-shift-to-mount", requireShiftToMount);
|
||||
+ }
|
||||
+
|
||||
public static int feedMushroomsToCows = 5;
|
||||
public static int feedMushroomsToCows = 0;
|
||||
private static void cowsSettings() {
|
||||
feedMushroomsToCows = getInt("settings.mobs.cow.feed-mushrooms-for-mooshroom", feedMushroomsToCows);
|
||||
@@ -142,4 +147,121 @@ public class PurpurConfig {
|
||||
@@ -151,4 +156,121 @@ public class PurpurConfig {
|
||||
snowmanDropsPumpkin = getBoolean("settings.mobs.snow_golem.drops-pumpkin-when-sheared", snowmanDropsPumpkin);
|
||||
snowmanPumpkinPutBack = getBoolean("settings.mobs.snow_golem.pumpkin-can-be-added-back", snowmanPumpkinPutBack);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 2dfe23044500d0bb7ef3f2635b1826d763c61330 Mon Sep 17 00:00:00 2001
|
||||
From b27bc98e22f0c21525465d23a6c0ef7e727a9d5e Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sun, 12 May 2019 00:43:12 -0500
|
||||
Subject: [PATCH] Make giants naturally spawn and have AI
|
||||
@@ -102,7 +102,7 @@ index 29e7639ad6..e69e7a456d 100644
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index 8bf8384a2a..bb91a4a67c 100644
|
||||
index 2b67041f45..ad807268c9 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -141,6 +141,13 @@ public class PurpurConfig {
|
||||
@@ -116,9 +116,9 @@ index 8bf8384a2a..bb91a4a67c 100644
|
||||
+ giantsHaveAI = getBoolean("settings.mobs.giant.have-ai", giantsHaveAI);
|
||||
+ }
|
||||
+
|
||||
public static boolean snowmanDropsPumpkin = true;
|
||||
public static boolean snowmanPumpkinPutBack = true;
|
||||
private static void snowmansSettings() {
|
||||
public static double crystalsAttackPhantomsRadius = 0.0D;
|
||||
public static float crystalsAttackPhantomDamage = 1.0F;
|
||||
public static double phantomsOrbitCrystalsRadius = 0.0D;
|
||||
--
|
||||
2.20.1
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 993318eb6baed6171d9aaf0ff23de8a317d264a0 Mon Sep 17 00:00:00 2001
|
||||
From 577d81729195cc19c5f0104fab3afb4ff001f3d2 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Thu, 23 May 2019 21:50:37 -0500
|
||||
Subject: [PATCH] Packed Barrels
|
||||
@@ -40,7 +40,7 @@ index 5d80ec8010..dd8c6e8876 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index 4d0d7a9dad..3fe87c2daa 100644
|
||||
index c58931392a..fa89e29652 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -6,6 +6,7 @@ import org.bukkit.Bukkit;
|
||||
@@ -51,7 +51,7 @@ index 4d0d7a9dad..3fe87c2daa 100644
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -162,6 +163,12 @@ public class PurpurConfig {
|
||||
@@ -171,6 +172,12 @@ public class PurpurConfig {
|
||||
snowmanPumpkinPutBack = getBoolean("settings.mobs.snow_golem.pumpkin-can-be-added-back", snowmanPumpkinPutBack);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From e5202baf3ef1fdd42ba0f61adc8b914fde3bf157 Mon Sep 17 00:00:00 2001
|
||||
From e532d05cd56e22ed4d6a12bde3afa56ccb254e14 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 1 Jun 2019 01:16:35 -0500
|
||||
Subject: [PATCH] Always place dragon egg when dragon is killed
|
||||
@@ -31,10 +31,10 @@ index 6700c8c658..f0c77eb6c1 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index 3fe87c2daa..4c78758e78 100644
|
||||
index fa89e29652..27eca5246c 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -169,6 +169,11 @@ public class PurpurConfig {
|
||||
@@ -178,6 +178,11 @@ public class PurpurConfig {
|
||||
InventoryType.BARREL.setDefaultSize(packedBarrels ? 54 : 27);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From dcd4e2277b3f13c979904300f53757a72935ceab Mon Sep 17 00:00:00 2001
|
||||
From 72cadce1c45bf749bc8187032fb964df60ccb4ea Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 15 Jun 2019 03:12:15 -0500
|
||||
Subject: [PATCH] Make Iron Golems Swim
|
||||
@@ -21,7 +21,7 @@ index 2c34ab337a..9bb033336c 100644
|
||||
this.goalSelector.a(1, new PathfinderGoalMeleeAttack(this, 1.0D, true));
|
||||
this.goalSelector.a(2, new PathfinderGoalMoveTowardsTarget(this, 0.9D, 32.0F));
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index 4c78758e78..9cd05d37ed 100644
|
||||
index 27eca5246c..9a9935edbc 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -156,6 +156,11 @@ public class PurpurConfig {
|
||||
@@ -33,9 +33,9 @@ index 4c78758e78..9cd05d37ed 100644
|
||||
+ ironGolemSwims = getBoolean("settings.mobs.iron_golem.swims", ironGolemSwims);
|
||||
+ }
|
||||
+
|
||||
public static boolean snowmanDropsPumpkin = true;
|
||||
public static boolean snowmanPumpkinPutBack = true;
|
||||
private static void snowmansSettings() {
|
||||
public static double crystalsAttackPhantomsRadius = 0.0D;
|
||||
public static float crystalsAttackPhantomDamage = 1.0F;
|
||||
public static double phantomsOrbitCrystalsRadius = 0.0D;
|
||||
--
|
||||
2.20.1
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From b0ef60387187bdb7ccbe1e5f04e972902fe34d54 Mon Sep 17 00:00:00 2001
|
||||
From becfe4122c029779ab53f38382c48e654f5ba3d0 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sun, 23 Jun 2019 17:01:26 -0500
|
||||
Subject: [PATCH] Add large sized ender chests
|
||||
@@ -36,10 +36,10 @@ index fd31b9a6dc..49b369236d 100644
|
||||
// CraftBukkit end
|
||||
}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index 7dac34a6cd..abdbf21775 100644
|
||||
index f5e0d63536..62df497984 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -173,6 +173,12 @@ public class PurpurConfig {
|
||||
@@ -179,6 +179,12 @@ public class PurpurConfig {
|
||||
snowmanPumpkinPutBack = getBoolean("settings.mobs.snow_golem.pumpkin-can-be-added-back", snowmanPumpkinPutBack);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 76d44d6f1cccb6c1804bdf56fcd5b87b8fc237cc Mon Sep 17 00:00:00 2001
|
||||
From 5eb43efa6016e44c3796d08005ef23c79946ccc5 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 29 Jun 2019 02:32:40 -0500
|
||||
Subject: [PATCH] Controllable Minecarts
|
||||
@@ -111,7 +111,7 @@ index ec96fa0a43..9ad3cc2982 100644
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index abdbf21775..e0077674c1 100644
|
||||
index 62df497984..6704742ffa 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -1,9 +1,13 @@
|
||||
@@ -128,7 +128,7 @@ index abdbf21775..e0077674c1 100644
|
||||
import org.bukkit.configuration.InvalidConfigurationException;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.event.inventory.InventoryType;
|
||||
@@ -306,4 +310,30 @@ public class PurpurConfig {
|
||||
@@ -312,4 +316,30 @@ public class PurpurConfig {
|
||||
ridableZombiePigman = getBoolean("settings.ridable.zombie_pigman", ridableZombiePigman);
|
||||
ridableZombieVillager = getBoolean("settings.ridable.zombie_villager", ridableZombieVillager);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From aefe8bfa24742683de4ec3f13d0aadbf16e424d8 Mon Sep 17 00:00:00 2001
|
||||
From 16827285653352eafdf5ae788b959cfa5a6ba5ca Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sun, 7 Jul 2019 19:52:16 -0500
|
||||
Subject: [PATCH] Add chance for zombie horse natural spawns
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH] Add chance for zombie horse natural spawns
|
||||
2 files changed, 17 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index f780aea01a..ed30e83e7d 100644
|
||||
index a9765cc9b0..e160b0aa59 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -402,12 +402,18 @@ public class WorldServer extends World {
|
||||
@@ -38,10 +38,10 @@ index f780aea01a..ed30e83e7d 100644
|
||||
|
||||
this.strikeLightning(new EntityLightning(this, (double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, flag1), org.bukkit.event.weather.LightningStrikeEvent.Cause.WEATHER); // CraftBukkit
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index a3197414a9..e9ae041ea6 100644
|
||||
index e034a0f754..3860737e7b 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -197,6 +197,11 @@ public class PurpurConfig {
|
||||
@@ -203,6 +203,11 @@ public class PurpurConfig {
|
||||
snowmanPumpkinPutBack = getBoolean("settings.mobs.snow_golem.pumpkin-can-be-added-back", snowmanPumpkinPutBack);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 13cceab96a020767c5cbc232a147d50faa77610e Mon Sep 17 00:00:00 2001
|
||||
From 487794d0b2e451e53ef0ddf1121a5a620c260032 Mon Sep 17 00:00:00 2001
|
||||
From: kickash32 <kickash32@gmail.com>
|
||||
Date: Tue, 11 Jun 2019 22:22:16 -0400
|
||||
Subject: [PATCH] implement optional per player mob spawns
|
||||
@@ -92,7 +92,7 @@ index 4c774e31dc..ebf0298631 100644
|
||||
int i = b(chunkcoordintpair, entityplayer, true);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
index 925efd4a15..70580355c6 100644
|
||||
index 5c0d9c77c4..1418264f8a 100644
|
||||
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
@@ -20,16 +20,15 @@ public final class SpawnerCreature {
|
||||
@@ -115,7 +115,7 @@ index 925efd4a15..70580355c6 100644
|
||||
|
||||
if (k >= 1) {
|
||||
IBlockData iblockdata = world.getTypeIfLoadedAndInBounds(blockposition1); // Paper - don't load chunks for mob spawn
|
||||
@@ -104,7 +103,7 @@ public final class SpawnerCreature {
|
||||
@@ -107,7 +106,7 @@ public final class SpawnerCreature {
|
||||
);
|
||||
if (!event.callEvent()) {
|
||||
if (event.shouldAbortSpawn()) {
|
||||
@@ -124,7 +124,7 @@ index 925efd4a15..70580355c6 100644
|
||||
}
|
||||
++i2;
|
||||
continue;
|
||||
@@ -123,7 +122,7 @@ public final class SpawnerCreature {
|
||||
@@ -126,7 +125,7 @@ public final class SpawnerCreature {
|
||||
} catch (Exception exception) {
|
||||
SpawnerCreature.LOGGER.warn("Failed to create mob", exception);
|
||||
ServerInternalException.reportInternalException(exception); // Paper
|
||||
@@ -133,7 +133,7 @@ index 925efd4a15..70580355c6 100644
|
||||
}
|
||||
|
||||
entityinsentient.setPositionRotation((double) f, (double) k, (double) f1, world.random.nextFloat() * 360.0F, 0.0F);
|
||||
@@ -134,15 +133,15 @@ public final class SpawnerCreature {
|
||||
@@ -137,15 +136,15 @@ public final class SpawnerCreature {
|
||||
++i;
|
||||
++i2;
|
||||
// Paper start - stop when limit is reached
|
||||
@@ -153,7 +153,7 @@ index 925efd4a15..70580355c6 100644
|
||||
}
|
||||
|
||||
if (entityinsentient.c(i2)) {
|
||||
@@ -168,7 +167,7 @@ public final class SpawnerCreature {
|
||||
@@ -171,7 +170,7 @@ public final class SpawnerCreature {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 1dd837a707fbdd7d6a1fcbbb863c851464a75331 Mon Sep 17 00:00:00 2001
|
||||
From be1741ea568ce4b0ad7c28e96ab5afc191544b32 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Mon, 22 Jul 2019 17:32:17 -0500
|
||||
Subject: [PATCH] Implement configurable search radius for villagers to spawn
|
||||
@@ -10,19 +10,19 @@ Subject: [PATCH] Implement configurable search radius for villagers to spawn
|
||||
2 files changed, 8 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
index 976473a678..7bc0c2f861 100644
|
||||
index 976473a678..0800788e5b 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
@@ -886,6 +886,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
|
||||
@Nullable
|
||||
private EntityIronGolem eG() {
|
||||
+ if (world.a(EntityIronGolem.class, getBoundingBox().grow(world.purpurConfig.radiusVillagerIronGolemSpawns)).size() > world.purpurConfig.limitVillagerIronGolemSpawns) return null; // Purpur
|
||||
+ if (world.purpurConfig.radiusVillagerIronGolemSpawns > 0 && world.a(EntityIronGolem.class, getBoundingBox().grow(world.purpurConfig.radiusVillagerIronGolemSpawns)).size() > world.purpurConfig.limitVillagerIronGolemSpawns) return null; // Purpur
|
||||
BlockPosition blockposition = new BlockPosition(this);
|
||||
int i = 0;
|
||||
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index e3fe4ed5f0..88a7e9ec6e 100644
|
||||
index e3fe4ed5f0..4dfecc4a1b 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -133,4 +133,11 @@ public class PurpurWorldConfig {
|
||||
@@ -30,7 +30,7 @@ index e3fe4ed5f0..88a7e9ec6e 100644
|
||||
limitPillagerOutpostSpawns = getInt("limit-pillager-outpost-spawns", limitPillagerOutpostSpawns);
|
||||
}
|
||||
+
|
||||
+ public int radiusVillagerIronGolemSpawns = 64;
|
||||
+ public int radiusVillagerIronGolemSpawns = 0;
|
||||
+ public int limitVillagerIronGolemSpawns = 5;
|
||||
+ private void radiusVillagerIronGolemSpawns() {
|
||||
+ radiusVillagerIronGolemSpawns = getInt("radius-villager-iron-golem-spawns", radiusVillagerIronGolemSpawns);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From a64e52abaf40732e740469379b83b2c9277705ac Mon Sep 17 00:00:00 2001
|
||||
From 4f4f58d77cc1c5db32fce7052ce7e49b2a0aa909 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Tue, 23 Jul 2019 08:28:21 -0500
|
||||
Subject: [PATCH] Implement configurable villager brain ticks
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH] Implement configurable villager brain ticks
|
||||
2 files changed, 13 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
index 7bc0c2f861..f49b279252 100644
|
||||
index 0800788e5b..2c45661386 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
@@ -53,6 +53,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
@@ -40,10 +40,10 @@ index 7bc0c2f861..f49b279252 100644
|
||||
this.world.getMethodProfiler().exit();
|
||||
if (!this.dY() && this.bE > 0) {
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index b7ea53656a..85acb47ad4 100644
|
||||
index 048954c8d4..d964f9025a 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -209,6 +209,13 @@ public class PurpurConfig {
|
||||
@@ -215,6 +215,13 @@ public class PurpurConfig {
|
||||
snowmanPumpkinPutBack = getBoolean("settings.mobs.snow_golem.pumpkin-can-be-added-back", snowmanPumpkinPutBack);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From d7a757e28cdc8a72d55d176dd34bc96721179e2c Mon Sep 17 00:00:00 2001
|
||||
From 17854f31076fcfe3b5f2620b3285a38d92f8e741 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 27 Jul 2019 17:20:35 -0500
|
||||
Subject: [PATCH] Add option to disable pillager patrols
|
||||
@@ -21,11 +21,11 @@ index bb612b3861..99bb38f033 100644
|
||||
return 0;
|
||||
} else {
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index 85acb47ad4..baca254e91 100644
|
||||
index 5621edab52..f47756fa66 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -197,6 +197,11 @@ public class PurpurConfig {
|
||||
ironGolemSwims = getBoolean("settings.mobs.iron_golem.swims", ironGolemSwims);
|
||||
@@ -208,6 +208,11 @@ public class PurpurConfig {
|
||||
spawnPhantomsInTheEnd = getBoolean("settings.mobs.phantom.spawn-in-the-end", spawnPhantomsInTheEnd);
|
||||
}
|
||||
|
||||
+ public static boolean disablePillagerPatrols = false;
|
||||
@@ -33,9 +33,9 @@ index 85acb47ad4..baca254e91 100644
|
||||
+ disablePillagerPatrols = getBoolean("settings.mobs.pillager.disable-patrols", disablePillagerPatrols);
|
||||
+ }
|
||||
+
|
||||
public static boolean spawnPhantomsInTheEnd = true;
|
||||
private static void phantomSettings() {
|
||||
spawnPhantomsInTheEnd = getBoolean("settings.mobs.phantom.spawn-in-the-end", spawnPhantomsInTheEnd);
|
||||
public static boolean snowmanDropsPumpkin = false;
|
||||
public static boolean snowmanPumpkinPutBack = false;
|
||||
private static void snowmansSettings() {
|
||||
--
|
||||
2.20.1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user