[ci-skip] More attributes work

This commit is contained in:
BillyGalbreath
2020-12-23 09:47:27 -06:00
parent 19ec1c311f
commit 7ad2c5d503
24 changed files with 432 additions and 676 deletions

View File

@@ -5,20 +5,18 @@ Subject: [PATCH] Chickens can retaliate
diff --git a/src/main/java/net/minecraft/server/EntityChicken.java b/src/main/java/net/minecraft/server/EntityChicken.java
index 182469fd39cb23633a3225cf1a64ab6b291e4cdf..11a612fa390cb0acf37fb84c5d5b6ea926dabad3 100644
index 182469fd39cb23633a3225cf1a64ab6b291e4cdf..8fb5d5c75e79a81ab46af3fbb96ebc41804113c4 100644
--- a/src/main/java/net/minecraft/server/EntityChicken.java
+++ b/src/main/java/net/minecraft/server/EntityChicken.java
@@ -17,16 +17,35 @@ public class EntityChicken extends EntityAnimal {
@@ -17,16 +17,33 @@ public class EntityChicken extends EntityAnimal {
this.a(PathType.WATER, 0.0F);
}
+ // Purpur start
+ @Override
+ protected void initAttributes(World world) {
+ if (world != null) {
+ if (world.purpurConfig.chickenRetaliate) {
+ this.getAttributeInstance(GenericAttributes.ATTACK_DAMAGE).setValue(2.0D);
+ }
+ protected void initAttributes() {
+ if (world.purpurConfig.chickenRetaliate) {
+ this.getAttributeInstance(GenericAttributes.ATTACK_DAMAGE).setValue(2.0D);
+ }
+ }
+ // Purpur end
@@ -45,7 +43,7 @@ index 182469fd39cb23633a3225cf1a64ab6b291e4cdf..11a612fa390cb0acf37fb84c5d5b6ea9
}
@Override
@@ -35,7 +54,7 @@ public class EntityChicken extends EntityAnimal {
@@ -35,7 +52,7 @@ public class EntityChicken extends EntityAnimal {
}
public static AttributeProvider.Builder eK() {