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:
committed by
granny
parent
bb8ed69b06
commit
c81d37b664
@@ -9,3 +9,11 @@
|
||||
final int worldHeight = world.getHeight();
|
||||
ActivationRange.maxBB = player.getBoundingBox().inflate(maxRange, worldHeight, maxRange);
|
||||
ActivationType.MISC.boundingBox = player.getBoundingBox().inflate(miscActivationRange, worldHeight, miscActivationRange);
|
||||
@@ -282,6 +_,7 @@
|
||||
* @return
|
||||
*/
|
||||
public static boolean checkIfActive(final Entity entity) {
|
||||
+ if (entity.level().purpurConfig.squidImmuneToEAR && entity instanceof net.minecraft.world.entity.animal.Squid) return true; // Purpur - Squid EAR immunity
|
||||
// Never safe to skip fireworks or item gravity
|
||||
if (entity instanceof FireworkRocketEntity || (entity instanceof ItemEntity && (entity.tickCount + entity.getId()) % 4 == 0)) { // Needed for item gravity, see ItemEntity tick
|
||||
return true;
|
||||
|
||||
@@ -1575,6 +1575,7 @@ public class PurpurWorldConfig {
|
||||
public boolean squidControllable = true;
|
||||
public double squidMaxHealth = 10.0D;
|
||||
public double squidScale = 1.0D;
|
||||
public boolean squidImmuneToEAR = true;
|
||||
private void squidSettings() {
|
||||
squidRidable = getBoolean("mobs.squid.ridable", squidRidable);
|
||||
squidControllable = getBoolean("mobs.squid.controllable", squidControllable);
|
||||
@@ -1585,6 +1586,7 @@ public class PurpurWorldConfig {
|
||||
}
|
||||
squidMaxHealth = getDouble("mobs.squid.attributes.max_health", squidMaxHealth);
|
||||
squidScale = Mth.clamp(getDouble("mobs.squid.attributes.scale", squidScale), 0.0625D, 16.0D);
|
||||
squidImmuneToEAR = getBoolean("mobs.squid.immune-to-EAR", squidImmuneToEAR);
|
||||
}
|
||||
|
||||
public boolean spiderRidable = false;
|
||||
|
||||
Reference in New Issue
Block a user