From dd781d26102280c14d6d6f82436d615b01aab9ac Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 12:23:17 +0000 Subject: [PATCH] Updated Upstream (Purpur) Upstream has released updates that appear to apply and compile correctly [Purpur Changes] PurpurMC/Purpur@a398e71: add option to make ravagers afraid of rabbits --- gradle.properties | 2 +- patches/api/0001-Purpur-API-Changes.patch | 2 +- .../server/0001-Purpur-Server-Changes.patch | 19 +++++++++++-------- ...0012-Optimize-default-configurations.patch | 4 ++-- ...missing-purpur-configuration-options.patch | 8 ++++---- 5 files changed, 19 insertions(+), 16 deletions(-) diff --git a/gradle.properties b/gradle.properties index 50b5d9986..fc7166373 100644 --- a/gradle.properties +++ b/gradle.properties @@ -21,4 +21,4 @@ pufferfishBranch = ver/1.20 usePufferfish = false paperCommit = ac3a5471c8dcdc1d0431025781da1d524895c47a -purpurCommit = 61e91ba5ee46bfc262b61682abf2fbee024b8ae1 +purpurCommit = a398e71e9d559597b85108ca91b929738352582e diff --git a/patches/api/0001-Purpur-API-Changes.patch b/patches/api/0001-Purpur-API-Changes.patch index 6b78144cc..069f20930 100644 --- a/patches/api/0001-Purpur-API-Changes.patch +++ b/patches/api/0001-Purpur-API-Changes.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: granny -Date: Tue, 7 May 2024 11:28:43 +0000 +Date: Tue, 7 May 2024 12:19:04 +0000 Subject: [PATCH] Purpur API Changes PurpurMC diff --git a/patches/server/0001-Purpur-Server-Changes.patch b/patches/server/0001-Purpur-Server-Changes.patch index 03c9ca475..e55b2d5e4 100644 --- a/patches/server/0001-Purpur-Server-Changes.patch +++ b/patches/server/0001-Purpur-Server-Changes.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: granny -Date: Tue, 7 May 2024 11:28:43 +0000 +Date: Tue, 7 May 2024 12:19:04 +0000 Subject: [PATCH] Purpur Server Changes PurpurMC @@ -12811,10 +12811,10 @@ index ac411202c0029052a962b51b015da191b124de5f..ae3eb87af8d3853be82c2002507141e4 this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true)); this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, AbstractVillager.class, false)); diff --git a/src/main/java/net/minecraft/world/entity/monster/Ravager.java b/src/main/java/net/minecraft/world/entity/monster/Ravager.java -index 2d7b7c949faaaaae94c0043132a4a822f55df104..9551bd7c9bed37cf17910e7f71b82ed20fb2d759 100644 +index 2d7b7c949faaaaae94c0043132a4a822f55df104..dbfcca8adb7afa7a3101f22c2bc48aff6abae4a2 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Ravager.java +++ b/src/main/java/net/minecraft/world/entity/monster/Ravager.java -@@ -68,14 +68,54 @@ public class Ravager extends Raider { +@@ -68,14 +68,55 @@ public class Ravager extends Raider { this.setPathfindingMalus(PathType.LEAVES, 0.0F); } @@ -12861,6 +12861,7 @@ index 2d7b7c949faaaaae94c0043132a4a822f55df104..9551bd7c9bed37cf17910e7f71b82ed2 super.registerGoals(); this.goalSelector.addGoal(0, new FloatGoal(this)); + this.goalSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur ++ if (level().purpurConfig.ravagerAvoidRabbits) this.goalSelector.addGoal(3, new net.minecraft.world.entity.ai.goal.AvoidEntityGoal<>(this, net.minecraft.world.entity.animal.Rabbit.class, 6.0F, 1.0D, 1.2D)); // Purpur this.goalSelector.addGoal(4, new MeleeAttackGoal(this, 1.0D, true)); this.goalSelector.addGoal(5, new WaterAvoidingRandomStrollGoal(this, 0.4D)); this.goalSelector.addGoal(6, new LookAtPlayerGoal(this, Player.class, 6.0F)); @@ -12869,7 +12870,7 @@ index 2d7b7c949faaaaae94c0043132a4a822f55df104..9551bd7c9bed37cf17910e7f71b82ed2 this.targetSelector.addGoal(2, (new HurtByTargetGoal(this, new Class[]{Raider.class})).setAlertOthers()); this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, Player.class, true)); this.targetSelector.addGoal(4, new NearestAttackableTargetGoal<>(this, AbstractVillager.class, true, (entityliving) -> { -@@ -128,7 +168,7 @@ public class Ravager extends Raider { +@@ -128,7 +169,7 @@ public class Ravager extends Raider { @Override public void aiStep() { super.aiStep(); @@ -12878,7 +12879,7 @@ index 2d7b7c949faaaaae94c0043132a4a822f55df104..9551bd7c9bed37cf17910e7f71b82ed2 if (this.isImmobile()) { this.getAttribute(Attributes.MOVEMENT_SPEED).setBaseValue(0.0D); } else { -@@ -138,7 +178,7 @@ public class Ravager extends Raider { +@@ -138,7 +179,7 @@ public class Ravager extends Raider { this.getAttribute(Attributes.MOVEMENT_SPEED).setBaseValue(Mth.lerp(0.1D, d1, d0)); } @@ -12887,7 +12888,7 @@ index 2d7b7c949faaaaae94c0043132a4a822f55df104..9551bd7c9bed37cf17910e7f71b82ed2 boolean flag = false; AABB axisalignedbb = this.getBoundingBox().inflate(0.2D); Iterator iterator = BlockPos.betweenClosed(Mth.floor(axisalignedbb.minX), Mth.floor(axisalignedbb.minY), Mth.floor(axisalignedbb.minZ), Mth.floor(axisalignedbb.maxX), Mth.floor(axisalignedbb.maxY), Mth.floor(axisalignedbb.maxZ)).iterator(); -@@ -148,7 +188,7 @@ public class Ravager extends Raider { +@@ -148,7 +189,7 @@ public class Ravager extends Raider { BlockState iblockdata = this.level().getBlockState(blockposition); Block block = iblockdata.getBlock(); @@ -21347,10 +21348,10 @@ index 0000000000000000000000000000000000000000..f49108ed94f7787347c5e0a721646083 +} diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java new file mode 100644 -index 0000000000000000000000000000000000000000..710511db0e882d9795c2a1ff31570fbb05fbb0f1 +index 0000000000000000000000000000000000000000..d8de8710d9b8cf2ae5c434b2b0b27e76ffbbe4bf --- /dev/null +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -0,0 +1,3304 @@ +@@ -0,0 +1,3306 @@ +package org.purpurmc.purpur; + +import net.minecraft.core.registries.BuiltInRegistries; @@ -23765,6 +23766,7 @@ index 0000000000000000000000000000000000000000..710511db0e882d9795c2a1ff31570fbb + public boolean ravagerTakeDamageFromWater = false; + public List ravagerGriefableBlocks = new ArrayList<>(); + public boolean ravagerAlwaysDropExp = false; ++ public boolean ravagerAvoidRabbits = false; + private void ravagerSettings() { + ravagerRidable = getBoolean("mobs.ravager.ridable", ravagerRidable); + ravagerRidableInWater = getBoolean("mobs.ravager.ridable-in-water", ravagerRidableInWater); @@ -23795,6 +23797,7 @@ index 0000000000000000000000000000000000000000..710511db0e882d9795c2a1ff31570fbb + } + }); + ravagerAlwaysDropExp = getBoolean("mobs.ravager.always-drop-exp", ravagerAlwaysDropExp); ++ ravagerAvoidRabbits = getBoolean("mobs.ravager.avoid-rabbits", ravagerAvoidRabbits); + } + + public boolean salmonRidable = false; diff --git a/patches/server/0012-Optimize-default-configurations.patch b/patches/server/0012-Optimize-default-configurations.patch index aa1b78afa..cafe4d1c3 100644 --- a/patches/server/0012-Optimize-default-configurations.patch +++ b/patches/server/0012-Optimize-default-configurations.patch @@ -398,7 +398,7 @@ index 9311fcb675d20ee77d225e3cffe1d6ce56601963..f9779f8cf0399e434ebe9e49e7bae538 private static void networkSettings() { useUPnP = getBoolean("settings.network.upnp-port-forwarding", useUPnP); diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index 710511db0e882d9795c2a1ff31570fbb05fbb0f1..2da301c8ad73f0a6a0bf8222f7d10c45877292c3 100644 +index d8de8710d9b8cf2ae5c434b2b0b27e76ffbbe4bf..72dc81d3015dc7c6365997de9abc269b261649b1 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java @@ -433,7 +433,7 @@ public class PurpurWorldConfig { @@ -410,7 +410,7 @@ index 710511db0e882d9795c2a1ff31570fbb05fbb0f1..2da301c8ad73f0a6a0bf8222f7d10c45 public boolean teleportOnNetherCeilingDamage = false; public boolean totemOfUndyingWorksInInventory = false; public boolean playerFixStuckPortal = false; -@@ -3133,7 +3133,7 @@ public class PurpurWorldConfig { +@@ -3135,7 +3135,7 @@ public class PurpurWorldConfig { public boolean zombieJockeyOnlyBaby = true; public double zombieJockeyChance = 0.05D; public boolean zombieJockeyTryExistingChickens = true; diff --git a/patches/server/0014-Add-missing-purpur-configuration-options.patch b/patches/server/0014-Add-missing-purpur-configuration-options.patch index 527e80b57..a5727c34d 100644 --- a/patches/server/0014-Add-missing-purpur-configuration-options.patch +++ b/patches/server/0014-Add-missing-purpur-configuration-options.patch @@ -211,7 +211,7 @@ index f9779f8cf0399e434ebe9e49e7bae5386ce01410..c5cfda1a1f0bd434efcf32e253c87738 org.bukkit.event.inventory.InventoryType.ENDER_CHEST.setDefaultSize(enderChestSixRows ? 54 : 27); enderChestPermissionRows = getBoolean("settings.blocks.ender_chest.use-permissions-for-rows", enderChestPermissionRows); diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index 2da301c8ad73f0a6a0bf8222f7d10c45877292c3..bd3913991d7fcf67dda5d30adaf03736898662e5 100644 +index 72dc81d3015dc7c6365997de9abc269b261649b1..73f574e3c7bb7fee3a34f61573b67af27a025dc3 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java @@ -1178,7 +1178,15 @@ public class PurpurWorldConfig { @@ -260,7 +260,7 @@ index 2da301c8ad73f0a6a0bf8222f7d10c45877292c3..bd3913991d7fcf67dda5d30adaf03736 frogRidable = getBoolean("mobs.frog.ridable", frogRidable); frogRidableInWater = getBoolean("mobs.frog.ridable-in-water", frogRidableInWater); frogControllable = getBoolean("mobs.frog.controllable", frogControllable); -@@ -2674,7 +2696,13 @@ public class PurpurWorldConfig { +@@ -2676,7 +2698,13 @@ public class PurpurWorldConfig { public boolean snifferControllable = true; public double snifferMaxHealth = 14.0D; public int snifferBreedingTicks = 6000; @@ -274,7 +274,7 @@ index 2da301c8ad73f0a6a0bf8222f7d10c45877292c3..bd3913991d7fcf67dda5d30adaf03736 snifferRidable = getBoolean("mobs.sniffer.ridable", snifferRidable); snifferRidableInWater = getBoolean("mobs.sniffer.ridable-in-water", snifferRidableInWater); snifferControllable = getBoolean("mobs.sniffer.controllable", snifferControllable); -@@ -2773,7 +2801,15 @@ public class PurpurWorldConfig { +@@ -2775,7 +2803,15 @@ public class PurpurWorldConfig { public boolean tadpoleRidable = false; public boolean tadpoleRidableInWater = true; public boolean tadpoleControllable = true; @@ -290,7 +290,7 @@ index 2da301c8ad73f0a6a0bf8222f7d10c45877292c3..bd3913991d7fcf67dda5d30adaf03736 tadpoleRidable = getBoolean("mobs.tadpole.ridable", tadpoleRidable); tadpoleRidableInWater = getBoolean("mobs.tadpole.ridable-in-water", tadpoleRidableInWater); tadpoleControllable = getBoolean("mobs.tadpole.controllable", tadpoleControllable); -@@ -2989,7 +3025,15 @@ public class PurpurWorldConfig { +@@ -2991,7 +3027,15 @@ public class PurpurWorldConfig { public boolean wardenRidable = false; public boolean wardenRidableInWater = true; public boolean wardenControllable = true;