Fix attribute spam for bats (#744)

Co-authored-by: Camotoy <20743703+Camotoy@users.noreply.github.com>
This commit is contained in:
Encode42
2021-12-12 15:07:50 -05:00
parent 76e339a037
commit 45ae426761
17 changed files with 108 additions and 53 deletions

View File

@@ -6,10 +6,10 @@ Subject: [PATCH] Configurable mob blindness
Ported from https://github.com/raltsmc/mobblindness
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index b036b0145a83eeb424beb261483b0515518dacd5..2c5d453f57b28008e5b98cf6aec044cb3ffb2385 100644
index a46e6d55731c7877fd50329b1ad37951e1f02784..9da2d74f38110abfeaa42ac15b4523dfe7db7e07 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -987,6 +987,17 @@ public abstract class LivingEntity extends Entity {
@@ -988,6 +988,17 @@ public abstract class LivingEntity extends Entity {
if (entitytypes == EntityType.SKELETON && itemstack.is(Items.SKELETON_SKULL) || entitytypes == EntityType.ZOMBIE && itemstack.is(Items.ZOMBIE_HEAD) || entitytypes == EntityType.CREEPER && itemstack.is(Items.CREEPER_HEAD)) {
d0 *= 0.5D;
}
@@ -28,7 +28,7 @@ index b036b0145a83eeb424beb261483b0515518dacd5..2c5d453f57b28008e5b98cf6aec044cb
return d0;
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 70df00057ceb30f5c5f5ed6a141ebf278876628e..4766ff27a4dab68877b0517b7698aa800e747a3f 100644
index 5be12ae7635d8fce57fbff7b52e7480fe970ebc3..78e1a64946daec89d7724fd966c3ecdc346f468c 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -459,6 +459,7 @@ public class PurpurWorldConfig {