mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 00:47:42 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@7a96bf2 Make debug dump file names consistent (#9075) PaperMC/Paper@1704bf7 Edit Paper download link in README (#9077) PaperMC/Paper@5fb3ab0 Allow non player entities in scoreboards by default (#9082) PaperMC/Paper@dc08c74 Remove duplicate animate packet for records (#8600) PaperMC/Paper@50e683d Added a config option for ticking markers (#9034) PaperMC/Paper@1d2fe64 fix: null SpawnReason for new player (#9015) PaperMC/Paper@9893e2b Deprecate ChatColor (#9069) PaperMC/Paper@0849144 Do not send expired keys to players on login (#9090) PaperMC/Paper@641dafd Cleanup some patches (#9093) PaperMC/Paper@497b919 Fix ignoreCancelled having no effect on events registered by direct EventExecutor (#9099)
47 lines
2.4 KiB
Diff
47 lines
2.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
|
Date: Mon, 13 Jul 2020 13:49:41 -0500
|
|
Subject: [PATCH] Squid EAR immunity
|
|
|
|
|
|
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
index 2cbab8dc920fff0d1573072b791f39debd61a710..6b2a2b898d8a4b75f7c9d1ec7112e4f748413e95 100644
|
|
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
@@ -1455,6 +1455,7 @@ public class PurpurWorldConfig {
|
|
public boolean squidRidable = false;
|
|
public boolean squidControllable = true;
|
|
public double squidMaxHealth = 10.0D;
|
|
+ public boolean squidImmuneToEAR = true;
|
|
private void squidSettings() {
|
|
squidRidable = getBoolean("mobs.squid.ridable", squidRidable);
|
|
squidControllable = getBoolean("mobs.squid.controllable", squidControllable);
|
|
@@ -1464,6 +1465,7 @@ public class PurpurWorldConfig {
|
|
set("mobs.squid.attributes.max_health", oldValue);
|
|
}
|
|
squidMaxHealth = getDouble("mobs.squid.attributes.max_health", squidMaxHealth);
|
|
+ squidImmuneToEAR = getBoolean("mobs.squid.immune-to-EAR", squidImmuneToEAR);
|
|
}
|
|
|
|
public boolean spiderRidable = false;
|
|
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
|
index 1f37695950e69fc9784a415a5ab9c6586ed32e61..d9448a222bbe2cbd09debfb93f339b175ed44c92 100644
|
|
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
|
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
|
@@ -15,6 +15,7 @@ import net.minecraft.world.entity.ambient.AmbientCreature;
|
|
import net.minecraft.world.entity.animal.Animal;
|
|
import net.minecraft.world.entity.animal.Bee;
|
|
import net.minecraft.world.entity.animal.Sheep;
|
|
+import net.minecraft.world.entity.animal.Squid;
|
|
import net.minecraft.world.entity.animal.WaterAnimal;
|
|
import net.minecraft.world.entity.animal.horse.Llama;
|
|
import net.minecraft.world.entity.boss.EnderDragonPart;
|
|
@@ -397,6 +398,7 @@ public class ActivationRange
|
|
*/
|
|
public static boolean checkIfActive(Entity entity)
|
|
{
|
|
+ if (entity.level.purpurConfig.squidImmuneToEAR && entity instanceof Squid) return true; // Purpur
|
|
// Never safe to skip fireworks or entities not yet added to chunk
|
|
if ( entity instanceof FireworkRocketEntity ) {
|
|
return true;
|