mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: 12dec20 Bump paerweight to 1.1.7 e33ed89 Get short commit ref using a more proper method 7d6147d Remove now unneeded patch due to paperweight 1.1.7 e72fa41 Update task dependency for includeMappings so the new task isn't skipped 0ad5526 Trim whitspace off of git hash (oops) Tuinity Changes: e878ba9 Update paper 2bd2849 Bring back fix codec spam patch
47 lines
2.3 KiB
Diff
47 lines
2.3 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/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
index 43c8dc815f4e756e270b1a130ec67dba5f4cb453..c54831d2f24511ee02b38a8e8d35cfb19e998306 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -1255,6 +1255,7 @@ public class PurpurWorldConfig {
|
|
|
|
public boolean squidRidable = false;
|
|
public double squidMaxHealth = 10.0D;
|
|
+ public boolean squidImmuneToEAR = true;
|
|
private void squidSettings() {
|
|
squidRidable = getBoolean("mobs.squid.ridable", squidRidable);
|
|
if (PurpurConfig.version < 10) {
|
|
@@ -1263,6 +1264,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 48ce9975b872c259dae1348148203fdbcb25e2ee..073b0e6dbd4be7cb7edd8864b1be1c4b6a56e641 100644
|
|
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
|
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
|
@@ -14,6 +14,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;
|
|
@@ -348,6 +349,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;
|