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@a203544 build: Compile against and shade the filtered jar (#9747) PaperMC/Paper@bd38e03 Updated Upstream (Bukkit/CraftBukkit) (#10379) PaperMC/Paper@a774fba feat: Entity#teleportAsync method with TeleportFlags (#10371) PaperMC/Paper@06361fa Fix invalid block entities created during world gen (#10375) PaperMC/Paper@bbee11f Deprecate Bukkit#getLogger (#10388) PaperMC/Paper@d8456ee Don't throw NPE for unplaced blockstate on #getDrops (#10366) PaperMC/Paper@182e79b Add more item use API (#10304) PaperMC/Paper@acf838f Backport some stuff from the generators branch (#10365) PaperMC/Paper@3d31e45 Add BlockBreakProgressUpdateEvent (#10300) PaperMC/Paper@8e75001 Disable vertical air friction when item entities have friction disabled (#10369) PaperMC/Paper@241d8e2 Ignore minecart in activation range (#10359) PaperMC/Paper@1207162 Allow player-list API to self un/list (#10358)
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 98e6faaeeaf8a983f9d730591a9d85c314c112d3..27d279d76fd3632fd023edded3b10630629ec132 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 88bac31994679c6a1b65e237fd44b239817fa2cf..c63b7d5b442f2be5dadd529a2f4f65302e44e792 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;
|
|
@@ -403,6 +404,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;
|