mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 09:57:43 +01:00
Squid EAR immunity
This commit is contained in:
34
patches/server/0110-Squid-EAR-immunity.patch
Normal file
34
patches/server/0110-Squid-EAR-immunity.patch
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
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/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||||
|
index 63d4cf5c44..f7be1373ce 100644
|
||||||
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||||
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||||
|
@@ -629,6 +629,11 @@ public class PurpurWorldConfig {
|
||||||
|
spiderRidableInWater = getBoolean("mobs.spider.ridable-in-water", spiderRidableInWater);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ public boolean squidImmuneToEAR = true;
|
||||||
|
+ private void squidSettings() {
|
||||||
|
+ squidImmuneToEAR = getBoolean("mobs.squid.immune-to-EAR", squidImmuneToEAR);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
public boolean strayRidable = false;
|
||||||
|
public boolean strayRidableInWater = false;
|
||||||
|
private void straySettings() {
|
||||||
|
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||||
|
index da4c49daf4..ab10206d01 100644
|
||||||
|
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||||
|
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||||
|
@@ -378,6 +378,7 @@ public class ActivationRange
|
||||||
|
*/
|
||||||
|
public static boolean checkIfActive(Entity entity)
|
||||||
|
{
|
||||||
|
+ if (entity.world.purpurConfig.squidImmuneToEAR && entity instanceof net.minecraft.server.EntitySquid) return true; // Purpur
|
||||||
|
// Never safe to skip fireworks or entities not yet added to chunk
|
||||||
|
if ( !entity.inChunk || entity instanceof EntityFireworks ) {
|
||||||
|
return true;
|
||||||
Reference in New Issue
Block a user