mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@484d6bf [ci skip] Move some disruptive patches back PaperMC/Paper@52619e7 [ci skip] Add more patch identifying comments PaperMC/Paper@e660379 [ci skip] Move some disruptive patches back PaperMC/Paper@c57d1aa Move diffs around to compile without later ones applied PaperMC/Paper@581b101 Add world to Entity AddTo/RemoveFrom Events (#10183) PaperMC/Paper@24dc2bf Add BlockStateMeta#clearBlockState (#10160) PaperMC/Paper@76da4bc Expose LootTable of DecoratedPot (#10023) PaperMC/Paper@11645e3 [ci skip] (Mostly) finish adding identifying patch comments PaperMC/Paper@51bef80 [ci skip] Remove removed patches PaperMC/Paper@ad2cf68 [ci skip] Move chunk system patch back a bit PaperMC/Paper@d405ff1 [ci skip] Fixup last commit PaperMC/Paper@a4a08b7 [ci skip] Move chunk system patch a bit back PaperMC/Paper@b700460 Convert average tick value in the GUI to the correct granularity PaperMC/Paper@1831240 [ci skip] Move chunk system patch back
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 e813fa037ca17bec29db916eac882cbfab432e56..c87c7feb140864771cbef3dcee1f89319c9a1f83 100644
|
|
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
@@ -1453,6 +1453,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);
|
|
@@ -1462,6 +1463,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 b73bb349aed01a96515e5d4d7fe67d28bd80189f..f9e3f4e15719ed9284ec315b8a1ef63dc242e009 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;
|
|
@@ -401,6 +402,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;
|