Skip to content

Commit

Permalink
Updated Upstream (Purpur)
Browse files Browse the repository at this point in the history
Upstream has released updates that appear to apply and compile correctly

[Purpur Changes]
PurpurMC/Purpur@a398e71: add option to make ravagers afraid of rabbits
  • Loading branch information
github-actions[bot] committed May 7, 2024
1 parent 4810a20 commit dd781d2
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ pufferfishBranch = ver/1.20
usePufferfish = false

paperCommit = ac3a5471c8dcdc1d0431025781da1d524895c47a
purpurCommit = 61e91ba5ee46bfc262b61682abf2fbee024b8ae1
purpurCommit = a398e71e9d559597b85108ca91b929738352582e
2 changes: 1 addition & 1 deletion patches/api/0001-Purpur-API-Changes.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: granny <[email protected]>
Date: Tue, 7 May 2024 11:28:43 +0000
Date: Tue, 7 May 2024 12:19:04 +0000
Subject: [PATCH] Purpur API Changes

PurpurMC
Expand Down
19 changes: 11 additions & 8 deletions patches/server/0001-Purpur-Server-Changes.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: granny <[email protected]>
Date: Tue, 7 May 2024 11:28:43 +0000
Date: Tue, 7 May 2024 12:19:04 +0000
Subject: [PATCH] Purpur Server Changes

PurpurMC
Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -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));
Expand All @@ -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();
Expand All @@ -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));
}

Expand All @@ -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();

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -23765,6 +23766,7 @@ index 0000000000000000000000000000000000000000..710511db0e882d9795c2a1ff31570fbb
+ public boolean ravagerTakeDamageFromWater = false;
+ public List<Block> 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);
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0012-Optimize-default-configurations.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit dd781d2

Please sign in to comment.