diff --git a/PATCHES.md b/PATCHES.md index 73c8fa96..96872db2 100644 --- a/PATCHES.md +++ b/PATCHES.md @@ -103,13 +103,17 @@ # Patches | server | Charged creeper naturally spawn | William Blake Galbreath | | | api | ChatColor conveniences | William Blake Galbreath | | | server | Chickens can retaliate | William Blake Galbreath | | +| server | Config for Enderman to aggro spawned Endermites | Encode42 | | | server | Config migration: climbing should not bypass cramming | jmp | | | server | Config migration: disable saving projectiles to disk -> | jmp | | | server | Config to allow Note Block sounds when blocked | Encode42 | | | server | Config to always tame in Creative | Encode42 | | +| server | Config to ignore Dragon Head wearers and stare aggro | Encode42 | | +| server | Config to ignore nearby mobs when sleeping | Encode42 | | | server | Config to use infinity bows without arrows | Encode42 | | | server | Configs for if Wither/Ender Dragon can ride vehicles | jmp | | | server | Configurable BlockPhysicsEvent | Mykyta Komarnytskyy | | +| server | Configurable Ender Pearl cooldown, damage, and Endermite RNG | Encode42 | | | server | Configurable TPS Catchup | William Blake Galbreath | | | server | Configurable chance for wolves to spawn rabid | Encode42 | | | server | Configurable criterion triggers | Mykyta Komarnytskyy | | diff --git a/Paper b/Paper index e4d8a627..eb11845f 160000 --- a/Paper +++ b/Paper @@ -1 +1 @@ -Subproject commit e4d8a6279cbcbd748a769a104e592e7189477944 +Subproject commit eb11845f87197d08a68bf083e509679bead010ab diff --git a/patches/Airplane/patches/server/0004-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch b/patches/Airplane/patches/server/0004-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch index a10d482a..47bc9b6d 100644 --- a/patches/Airplane/patches/server/0004-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch +++ b/patches/Airplane/patches/server/0004-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch @@ -27,7 +27,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index c8f23b21cbe8625f7344c118eb62bab7e55e42e2..18dc5712a16f5610184e10a73f4be81fd6e2a366 100644 +index 90d41b9e286064f11ce55badfb76574778d933a6..523db5ec954bc420a478bbaaf0d10d5a63024ccd 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -3071,7 +3071,7 @@ public abstract class EntityLiving extends Entity { diff --git a/patches/Airplane/patches/server/0010-Don-t-get-entity-equipment-if-not-needed.patch b/patches/Airplane/patches/server/0010-Don-t-get-entity-equipment-if-not-needed.patch index a8ba48fa..930f284f 100644 --- a/patches/Airplane/patches/server/0010-Don-t-get-entity-equipment-if-not-needed.patch +++ b/patches/Airplane/patches/server/0010-Don-t-get-entity-equipment-if-not-needed.patch @@ -20,7 +20,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 18dc5712a16f5610184e10a73f4be81fd6e2a366..88d5fb46b3fa8c148293ac6c2c8206fc480b5521 100644 +index 523db5ec954bc420a478bbaaf0d10d5a63024ccd..c5762aebcdd383ab710d4891308a7b1e815c44fd 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -820,11 +820,13 @@ public abstract class EntityLiving extends Entity { diff --git a/patches/Airplane/patches/server/0014-Reduce-chunk-loading-lookups.patch b/patches/Airplane/patches/server/0014-Reduce-chunk-loading-lookups.patch index 89be2404..f9123da8 100644 --- a/patches/Airplane/patches/server/0014-Reduce-chunk-loading-lookups.patch +++ b/patches/Airplane/patches/server/0014-Reduce-chunk-loading-lookups.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Reduce chunk loading & lookups diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java -index b884addf2ce6f1ef7394658078deb2e75370654f..e20b91b36587d1191f8f9e8dd501607bf085e76d 100644 +index df4d5ed5957658ee9ca083ac79b38a1202fe7015..e7568e3df10bc07e9b3b05caa9d41398925cf4d7 100644 --- a/src/main/java/net/minecraft/server/EntityEnderman.java +++ b/src/main/java/net/minecraft/server/EntityEnderman.java @@ -279,11 +279,18 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { diff --git a/patches/Airplane/patches/server/0018-Multithreaded-entity-tracking.patch b/patches/Airplane/patches/server/0018-Multithreaded-entity-tracking.patch index 07cb7131..305873b5 100644 --- a/patches/Airplane/patches/server/0018-Multithreaded-entity-tracking.patch +++ b/patches/Airplane/patches/server/0018-Multithreaded-entity-tracking.patch @@ -181,7 +181,7 @@ index 0924f6b484468f3cf3c2d405101c0158c12d69e6..1d65d884d1f31a73333e4cf6a9ce30d7 this(world, chunkcoordintpair, biomestorage, ChunkConverter.a, TickListEmpty.b(), TickListEmpty.b(), 0L, (ChunkSection[]) null, (Consumer) null); } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 912952ff7c50b416bddd63469a592cf563e8a2cd..5118e0c0dd908d7cafe1f53e2ff28d44a6138442 100644 +index bf81977bfef4ddfed10f4bf4422e230d67e8199f..4c42d7fb44e2c82f516e37556b7c20e7380c7f13 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -52,7 +52,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/patches/Origami/patches/server/0008-Don-t-wake-up-entities-when-damage-event-is-cancelle.patch b/patches/Origami/patches/server/0008-Don-t-wake-up-entities-when-damage-event-is-cancelle.patch index 0b52ceaf..c869d6aa 100644 --- a/patches/Origami/patches/server/0008-Don-t-wake-up-entities-when-damage-event-is-cancelle.patch +++ b/patches/Origami/patches/server/0008-Don-t-wake-up-entities-when-damage-event-is-cancelle.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't wake up entities when damage event is cancelled diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 88d5fb46b3fa8c148293ac6c2c8206fc480b5521..6bfd3a92e7b760c780e756ecbc5323d10235da9d 100644 +index c5762aebcdd383ab710d4891308a7b1e815c44fd..7535a6689f8e67af97bff9643fabd3c615222f99 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -1118,9 +1118,12 @@ public abstract class EntityLiving extends Entity { diff --git a/patches/Purpur/patches/api/0031-Fix-javadoc-warnings-missing-param-and-return.patch b/patches/Purpur/patches/api/0031-Fix-javadoc-warnings-missing-param-and-return.patch index 8c3ae7fb..ec5cff40 100644 --- a/patches/Purpur/patches/api/0031-Fix-javadoc-warnings-missing-param-and-return.patch +++ b/patches/Purpur/patches/api/0031-Fix-javadoc-warnings-missing-param-and-return.patch @@ -553,10 +553,28 @@ index afb7b136b461202026290624836446cff9f9e45d..087579fdff09237409c9f80446e7a15a /** diff --git a/src/main/java/org/bukkit/WorldCreator.java b/src/main/java/org/bukkit/WorldCreator.java -index 3802bf39c2b8330ab64f90f91c88741500caaa64..28e251388d90d00b0111c847ea3d5adc4766aedf 100644 +index 1d93a6c42d6c93ffd50c6054e74f3ff75d745b58..0dc013530b39618a7282a094b0bdb4c024f23712 100644 --- a/src/main/java/org/bukkit/WorldCreator.java +++ b/src/main/java/org/bukkit/WorldCreator.java -@@ -293,11 +293,8 @@ public class WorldCreator { +@@ -71,6 +71,8 @@ public class WorldCreator { + * + * @param levelName LevelName of the world that will be created + * @param worldKey NamespacedKey of the world that will be created ++ * ++ * @return WorldCreator + */ + @NotNull + public static WorldCreator ofNameAndKey(@NotNull String levelName, @NotNull NamespacedKey worldKey) { +@@ -82,6 +84,8 @@ public class WorldCreator { + * LevelName will be the Key part of the NamespacedKey. + * + * @param worldKey NamespacedKey of the world that will be created ++ * ++ * @return WorldCreator + */ + @NotNull + public static WorldCreator ofKey(@NotNull NamespacedKey worldKey) { +@@ -293,11 +297,8 @@ public class WorldCreator { * is as follows: * {"structures": {"structures": {"village": {"salt": 8015723, "spacing": 32, "separation": 8}}}, "layers": [{"block": "stone", "height": 1}, {"block": "grass", "height": 1}], "biome":"plains"} * @@ -1352,10 +1370,18 @@ index c7b17eabf07b829a02afe7c1f27a5127b6bfea70..d4e2bcf8ce8fc2af851b471490147f00 /** diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java -index 0c5e488fca4370a18fede705f58bff25f3a7b4cb..ffe8a6dcb13d917a7c295dfa6123da9e29e66d6d 100644 +index 0c5e488fca4370a18fede705f58bff25f3a7b4cb..551bed4f91fe23d36f3299b1b1576546722eb799 100644 --- a/src/main/java/org/bukkit/inventory/ItemFactory.java +++ b/src/main/java/org/bukkit/inventory/ItemFactory.java -@@ -179,7 +179,7 @@ public interface ItemFactory { +@@ -148,6 +148,7 @@ public interface ItemFactory { + * Creates a hover event for the given item. + * + * @param item The item ++ * @param op Unary operator + * @return A hover event + */ + @NotNull +@@ -179,7 +180,7 @@ public interface ItemFactory { /** * Creates a {@link net.md_5.bungee.api.chat.hover.content.Content} of that ItemStack for displaying. * diff --git a/patches/Purpur/patches/server/0172-One-Punch-Man.patch b/patches/Purpur/patches/server/0172-One-Punch-Man.patch index dcf9aa99..99180ad0 100644 --- a/patches/Purpur/patches/server/0172-One-Punch-Man.patch +++ b/patches/Purpur/patches/server/0172-One-Punch-Man.patch @@ -5,7 +5,7 @@ Subject: [PATCH] One Punch Man! diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 50fa5f8395fea3ba6fa202a5a38519cd55ae00e0..c8f23b21cbe8625f7344c118eb62bab7e55e42e2 100644 +index 50fa5f8395fea3ba6fa202a5a38519cd55ae00e0..90d41b9e286064f11ce55badfb76574778d933a6 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -1921,6 +1921,23 @@ public abstract class EntityLiving extends Entity { @@ -13,7 +13,7 @@ index 50fa5f8395fea3ba6fa202a5a38519cd55ae00e0..c8f23b21cbe8625f7344c118eb62bab7 } + // Purpur start -+ if (damagesource.getEntity().world.purpurConfig.creativeOnePunch && damagesource.getEntity() instanceof EntityHuman) { ++ if (damagesource.getEntity() instanceof EntityHuman && damagesource.getEntity().world.purpurConfig.creativeOnePunch) { + EntityHuman entityHuman = (EntityHuman) damagesource.getEntity(); + if (entityHuman.isCreative()) { + double attackDamage = 0; diff --git a/patches/Purpur/patches/server/0174-Configurable-Ender-Pearl-cooldown-damage-and-Endermi.patch b/patches/Purpur/patches/server/0174-Configurable-Ender-Pearl-cooldown-damage-and-Endermi.patch new file mode 100644 index 00000000..61c8b834 --- /dev/null +++ b/patches/Purpur/patches/server/0174-Configurable-Ender-Pearl-cooldown-damage-and-Endermi.patch @@ -0,0 +1,70 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Encode42 +Date: Sun, 7 Mar 2021 19:08:16 -0500 +Subject: [PATCH] Configurable Ender Pearl cooldown, damage, and Endermite RNG + +- Survival and Creative Cooldown speed +- Damage dealt on pearl usage +- Endermite spawn chance + +diff --git a/src/main/java/net/minecraft/server/EntityEnderPearl.java b/src/main/java/net/minecraft/server/EntityEnderPearl.java +index 44dbe818b19c927098c1e6b2bcb556378be5637c..a1a070e786a7b587d103809957ec4f70f30f999a 100644 +--- a/src/main/java/net/minecraft/server/EntityEnderPearl.java ++++ b/src/main/java/net/minecraft/server/EntityEnderPearl.java +@@ -54,7 +54,7 @@ public class EntityEnderPearl extends EntityProjectileThrowable { + Bukkit.getPluginManager().callEvent(teleEvent); + + if (!teleEvent.isCancelled() && !entityplayer.playerConnection.isDisconnected()) { +- if (this.random.nextFloat() < 0.05F && this.world.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING)) { ++ if (this.random.nextFloat() < this.world.purpurConfig.enderPearlEndermiteChance && this.world.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING)) { // Purpur + EntityEndermite entityendermite = (EntityEndermite) EntityTypes.ENDERMITE.a(this.world); + + entityendermite.setPlayerSpawned(true); +@@ -69,7 +69,7 @@ public class EntityEnderPearl extends EntityProjectileThrowable { + entityplayer.playerConnection.teleport(teleEvent.getTo()); + entity.fallDistance = 0.0F; + CraftEventFactory.entityDamage = this; +- entity.damageEntity(DamageSource.FALL, 5.0F); ++ entity.damageEntity(DamageSource.FALL, this.world.purpurConfig.enderPearlDamage); // Purpur + CraftEventFactory.entityDamage = null; + } + // CraftBukkit end +diff --git a/src/main/java/net/minecraft/server/ItemEnderPearl.java b/src/main/java/net/minecraft/server/ItemEnderPearl.java +index 0e154ee2976694dacf8d41fcd831f21fbbda13af..f2cafb9f9365a3428f8fa0c35e9b6045d5729a8f 100644 +--- a/src/main/java/net/minecraft/server/ItemEnderPearl.java ++++ b/src/main/java/net/minecraft/server/ItemEnderPearl.java +@@ -27,7 +27,7 @@ public class ItemEnderPearl extends Item { + + world.playSound((EntityHuman) null, entityhuman.locX(), entityhuman.locY(), entityhuman.locZ(), SoundEffects.ENTITY_ENDER_PEARL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (Entity.SHARED_RANDOM.nextFloat() * 0.4F + 0.8F)); + entityhuman.b(StatisticList.ITEM_USED.b(this)); +- entityhuman.getCooldownTracker().setCooldown(this, 20); ++ entityhuman.getCooldownTracker().setCooldown(this, entityhuman.abilities.canInstantlyBuild ? world.purpurConfig.enderPearlCooldownCreative : world.purpurConfig.enderPearlCooldown); // Purpur + } else { + // Paper end + if (entityhuman instanceof EntityPlayer) { +diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +index bf8a842e7c43946c87c8f27afdf364b1475cf44e..9b7c1b16ad191f58fea0625ebf547431a6e8ddad 100644 +--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java ++++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +@@ -170,6 +170,10 @@ public class PurpurWorldConfig { + public List itemImmuneToFire = new ArrayList<>(); + public boolean dontRunWithScissors = false; + public double scissorsRunningDamage = 1D; ++ public float enderPearlDamage = 5.0F; ++ public int enderPearlCooldown = 20; ++ public int enderPearlCooldownCreative = 20; ++ public float enderPearlEndermiteChance = 0.05F; + private void itemSettings() { + itemImmuneToCactus.clear(); + getList("gameplay-mechanics.item.immune.cactus", new ArrayList<>()).forEach(key -> { +@@ -200,6 +204,10 @@ public class PurpurWorldConfig { + }); + dontRunWithScissors = getBoolean("gameplay-mechanics.item.shears.damage-if-sprinting", dontRunWithScissors); + scissorsRunningDamage = getDouble("gameplay-mechanics.item.shears.sprinting-damage", scissorsRunningDamage); ++ enderPearlDamage = (float) getDouble("gameplay-mechanics.item.ender-pearl.damage", enderPearlDamage); ++ enderPearlCooldown = getInt("gameplay-mechanics.item.ender-pearl.cooldown", enderPearlCooldown); ++ enderPearlCooldownCreative = getInt("gameplay-mechanics.item.ender-pearl.creative-cooldown", enderPearlCooldownCreative); ++ enderPearlEndermiteChance = (float) getDouble("gameplay-mechanics.item.ender-pearl.endermite-spawn-chance", enderPearlEndermiteChance); + } + + public boolean idleTimeoutKick = true; diff --git a/patches/Purpur/patches/server/0175-Config-to-ignore-nearby-mobs-when-sleeping.patch b/patches/Purpur/patches/server/0175-Config-to-ignore-nearby-mobs-when-sleeping.patch new file mode 100644 index 00000000..e8cc877d --- /dev/null +++ b/patches/Purpur/patches/server/0175-Config-to-ignore-nearby-mobs-when-sleeping.patch @@ -0,0 +1,39 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Encode42 +Date: Mon, 8 Mar 2021 16:46:54 -0500 +Subject: [PATCH] Config to ignore nearby mobs when sleeping + + +diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java +index 912952ff7c50b416bddd63469a592cf563e8a2cd..bf81977bfef4ddfed10f4bf4422e230d67e8199f 100644 +--- a/src/main/java/net/minecraft/server/EntityPlayer.java ++++ b/src/main/java/net/minecraft/server/EntityPlayer.java +@@ -1311,7 +1311,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + return entitymonster.f((EntityHuman) this); + }); + +- if (!list.isEmpty()) { ++ if (!this.world.purpurConfig.playerSleepNearMonsters && !list.isEmpty()) { // Purpur + return Either.left(EntityHuman.EnumBedResult.NOT_SAFE); + } + } +diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +index 9b7c1b16ad191f58fea0625ebf547431a6e8ddad..839b76e406d9374c1b3aff7adee82acaa7d89dc9 100644 +--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java ++++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +@@ -283,6 +283,7 @@ public class PurpurWorldConfig { + public int raidCooldownSeconds = 0; + public int animalBreedingCooldownSeconds = 0; + public boolean creativeOnePunch = false; ++ public boolean playerSleepNearMonsters = false; + private void miscGameplayMechanicsSettings() { + useBetterMending = getBoolean("gameplay-mechanics.use-better-mending", useBetterMending); + alwaysTameInCreative = getBoolean("gameplay-mechanics.always-tame-in-creative", alwaysTameInCreative); +@@ -301,6 +302,7 @@ public class PurpurWorldConfig { + raidCooldownSeconds = getInt("gameplay-mechanics.raid-cooldown-seconds", raidCooldownSeconds); + animalBreedingCooldownSeconds = getInt("gameplay-mechanics.animal-breeding-cooldown-seconds", animalBreedingCooldownSeconds); + creativeOnePunch = getBoolean("gameplay-mechanics.player.one-punch-in-creative", creativeOnePunch); ++ playerSleepNearMonsters = getBoolean("gameplay-mechanics.player.sleep-ignore-nearby-mobs", playerSleepNearMonsters); + } + + public boolean catSpawning; diff --git a/patches/Purpur/patches/server/0176-Config-for-Enderman-to-aggro-spawned-Endermites.patch b/patches/Purpur/patches/server/0176-Config-for-Enderman-to-aggro-spawned-Endermites.patch new file mode 100644 index 00000000..2e902a6e --- /dev/null +++ b/patches/Purpur/patches/server/0176-Config-for-Enderman-to-aggro-spawned-Endermites.patch @@ -0,0 +1,40 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Encode42 +Date: Tue, 9 Mar 2021 16:10:39 -0500 +Subject: [PATCH] Config for Enderman to aggro spawned Endermites + +By default, Enderman do not attack Endermites unless spawned by an Ender Pearl. + +diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java +index b884addf2ce6f1ef7394658078deb2e75370654f..6c60253fee2098889292837033396f0dcd75c4b7 100644 +--- a/src/main/java/net/minecraft/server/EntityEnderman.java ++++ b/src/main/java/net/minecraft/server/EntityEnderman.java +@@ -16,7 +16,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { + private static final DataWatcherObject bo = DataWatcher.a(EntityEnderman.class, DataWatcherRegistry.i); + private static final DataWatcherObject bp = DataWatcher.a(EntityEnderman.class, DataWatcherRegistry.i); + private static final Predicate bq = (entityliving) -> { +- return entityliving instanceof EntityEndermite && ((EntityEndermite) entityliving).isPlayerSpawned(); ++ return entityliving instanceof EntityEndermite && (((EntityEndermite) entityliving).isPlayerSpawned() || entityliving.world.purpurConfig.endermanAggroSpawnedEndermites); // Purpur + }; + private int br = Integer.MIN_VALUE; + private int bs; +diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +index 839b76e406d9374c1b3aff7adee82acaa7d89dc9..28814c8b5ecab56fca113e741305ac5dc4f49e8c 100644 +--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java ++++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +@@ -821,6 +821,7 @@ public class PurpurWorldConfig { + public boolean endermanDespawnEvenWithBlock = false; + public double endermanMaxHealth = 40.0D; + public boolean endermanTakeDamageFromWater = true; ++ public boolean endermanAggroSpawnedEndermites = false; + private void endermanSettings() { + endermanRidable = getBoolean("mobs.enderman.ridable", endermanRidable); + endermanRidableInWater = getBoolean("mobs.enderman.ridable-in-water", endermanRidableInWater); +@@ -834,6 +835,7 @@ public class PurpurWorldConfig { + } + endermanMaxHealth = getDouble("mobs.enderman.attributes.max_health", endermanMaxHealth); + endermanTakeDamageFromWater = getBoolean("mobs.enderman.takes-damage-from-water", endermanTakeDamageFromWater); ++ endermanAggroSpawnedEndermites = getBoolean("mobs.enderman.aggressive-towards-spawned-endermites", endermanAggroSpawnedEndermites); + } + + public boolean endermiteRidable = false; diff --git a/patches/Purpur/patches/server/0177-Config-to-ignore-Dragon-Head-wearers-and-stare-aggro.patch b/patches/Purpur/patches/server/0177-Config-to-ignore-Dragon-Head-wearers-and-stare-aggro.patch new file mode 100644 index 00000000..b7188141 --- /dev/null +++ b/patches/Purpur/patches/server/0177-Config-to-ignore-Dragon-Head-wearers-and-stare-aggro.patch @@ -0,0 +1,43 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Encode42 +Date: Tue, 9 Mar 2021 16:16:01 -0500 +Subject: [PATCH] Config to ignore Dragon Head wearers and stare aggro + +Prevents Enderman from becoming aggresive towards players that are wearing a Dragon Head. +Adds functionality to a useless item! + +diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java +index 6c60253fee2098889292837033396f0dcd75c4b7..df4d5ed5957658ee9ca083ac79b38a1202fe7015 100644 +--- a/src/main/java/net/minecraft/server/EntityEnderman.java ++++ b/src/main/java/net/minecraft/server/EntityEnderman.java +@@ -197,7 +197,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { + // Paper end + ItemStack itemstack = (ItemStack) entityhuman.inventory.armor.get(3); + +- if (itemstack.getItem() == Blocks.CARVED_PUMPKIN.getItem()) { ++ if (world.purpurConfig.endermanDisableStareAggro || itemstack.getItem() == Blocks.CARVED_PUMPKIN.getItem() || (world.purpurConfig.endermanIgnorePlayerDragonHead && itemstack.getItem() == Items.DRAGON_HEAD)) { // Purpur + return false; + } else { + Vec3D vec3d = entityhuman.f(1.0F).d(); +diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +index 28814c8b5ecab56fca113e741305ac5dc4f49e8c..45c5b7b9e7b207e25d80c008a87b06b91e81668b 100644 +--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java ++++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +@@ -822,6 +822,8 @@ public class PurpurWorldConfig { + public double endermanMaxHealth = 40.0D; + public boolean endermanTakeDamageFromWater = true; + public boolean endermanAggroSpawnedEndermites = false; ++ public boolean endermanIgnorePlayerDragonHead = false; ++ public boolean endermanDisableStareAggro = false; + private void endermanSettings() { + endermanRidable = getBoolean("mobs.enderman.ridable", endermanRidable); + endermanRidableInWater = getBoolean("mobs.enderman.ridable-in-water", endermanRidableInWater); +@@ -836,6 +838,8 @@ public class PurpurWorldConfig { + endermanMaxHealth = getDouble("mobs.enderman.attributes.max_health", endermanMaxHealth); + endermanTakeDamageFromWater = getBoolean("mobs.enderman.takes-damage-from-water", endermanTakeDamageFromWater); + endermanAggroSpawnedEndermites = getBoolean("mobs.enderman.aggressive-towards-spawned-endermites", endermanAggroSpawnedEndermites); ++ endermanIgnorePlayerDragonHead = getBoolean("mobs.enderman.ignore-players-wearing-dragon-head", endermanIgnorePlayerDragonHead); ++ endermanDisableStareAggro = getBoolean("mobs.enderman.disable-player-stare-aggression", endermanDisableStareAggro); + } + + public boolean endermiteRidable = false; diff --git a/patches/server/0006-Yatopia-configuration.patch b/patches/server/0006-Yatopia-configuration.patch index e567940c..1976c8fc 100644 --- a/patches/server/0006-Yatopia-configuration.patch +++ b/patches/server/0006-Yatopia-configuration.patch @@ -47,7 +47,7 @@ index a85a844a4766cde16eea9e814abfec29d8935c0f..b55d73e39b5665f5444497e54e940e17 this.setAllowFlight(dedicatedserverproperties.allowFlight); this.setResourcePack(dedicatedserverproperties.resourcePack, this.ba()); diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 6bfd3a92e7b760c780e756ecbc5323d10235da9d..48496d8cc88dd758e68dba8e7051ff8c3c8d99c7 100644 +index 7535a6689f8e67af97bff9643fabd3c615222f99..424e0a1c31561aa06229a13b68d0cc367f392545 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -271,6 +271,7 @@ public abstract class EntityLiving extends Entity { diff --git a/patches/server/0007-Per-entity-type-collision-settings.patch b/patches/server/0007-Per-entity-type-collision-settings.patch index 964ac983..900e1b10 100644 --- a/patches/server/0007-Per-entity-type-collision-settings.patch +++ b/patches/server/0007-Per-entity-type-collision-settings.patch @@ -59,7 +59,7 @@ index 27599f422be266ad2fdbda49617661801c2c1991..2457b240f3b49dbd5fe0eb603d86418f } \ No newline at end of file diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 48496d8cc88dd758e68dba8e7051ff8c3c8d99c7..33dc4ecbe165346be6e372883c4ae223741a135b 100644 +index 424e0a1c31561aa06229a13b68d0cc367f392545..86493a37a1ca5d35e660dadf1d6005af55f67144 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -2957,7 +2957,7 @@ public abstract class EntityLiving extends Entity { diff --git a/patches/server/0013-lithium-enum_values.patch b/patches/server/0013-lithium-enum_values.patch index 3959c203..c12c6e89 100644 --- a/patches/server/0013-lithium-enum_values.patch +++ b/patches/server/0013-lithium-enum_values.patch @@ -39,7 +39,7 @@ index 5d3bb5f393a1e0e4a2e8b9a466530a91279697a9..7f084e7f11a829c10d113c7fb39eec0b if (enumdirection2 != EnumDirection.DOWN && world.isBlockFacePowered(blockposition1.shift(enumdirection2), enumdirection2)) { return true; diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 33dc4ecbe165346be6e372883c4ae223741a135b..cd48e116b9663e1172e6a96f05722443705fdfc2 100644 +index 86493a37a1ca5d35e660dadf1d6005af55f67144..5745ac2e932ba934604072951a33edf2fa16b3cb 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -2640,10 +2640,12 @@ public abstract class EntityLiving extends Entity { diff --git a/patches/server/0049-Configurable-criterion-triggers.patch b/patches/server/0049-Configurable-criterion-triggers.patch index a02e74c7..718dcad2 100644 --- a/patches/server/0049-Configurable-criterion-triggers.patch +++ b/patches/server/0049-Configurable-criterion-triggers.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Configurable criterion triggers This patch adds toggles for three criterion triggers that are called every tick. These can be very unnecessary, and especially in the case of CriterionTriggerEnterBlock, quite heavy. diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 5118e0c0dd908d7cafe1f53e2ff28d44a6138442..bbe44052661ef6796da5a807fc6ab984abe8e6dd 100644 +index 4c42d7fb44e2c82f516e37556b7c20e7380c7f13..a2aa223a3487338591b5135ae6907b6892a87fcb 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -439,6 +439,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/upstream/Purpur b/upstream/Purpur index 63c370ce..f8e60975 160000 --- a/upstream/Purpur +++ b/upstream/Purpur @@ -1 +1 @@ -Subproject commit 63c370ce0258d6f65a3ff7bb65f4544f450a0aba +Subproject commit f8e609757ff8346759f2365212bd6d09582202c1 diff --git a/upstreamCommits/Purpur b/upstreamCommits/Purpur index fe22d895..cad75da5 100644 --- a/upstreamCommits/Purpur +++ b/upstreamCommits/Purpur @@ -1 +1 @@ -63c370ce0258d6f65a3ff7bb65f4544f450a0aba \ No newline at end of file +f8e609757ff8346759f2365212bd6d09582202c1 \ No newline at end of file