more ridables

This commit is contained in:
William Blake Galbreath
2020-07-09 10:15:41 -05:00
parent aedda68e52
commit 918dfae914
9 changed files with 668 additions and 189 deletions

View File

@@ -5,10 +5,24 @@ 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 c6ee92343..fa97552bb 100644
index c6ee92343..137eada65 100644
--- a/src/main/java/net/minecraft/server/EntityChicken.java
+++ b/src/main/java/net/minecraft/server/EntityChicken.java
@@ -20,14 +20,33 @@ public class EntityChicken extends EntityAnimal {
@@ -17,16 +17,35 @@ 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);
+ }
+ }
+ }
+ // Purpur end
+
@Override
protected void initPathfinder() {
this.goalSelector.a(0, new PathfinderGoalFloat(this));
@@ -28,21 +42,9 @@ index c6ee92343..fa97552bb 100644
+ this.goalSelector.a(1, new PathfinderGoalPanic(this, 1.4D));
+ }
+ // Purpur end
+ }
+
+ // Purpur start
+ @Override
+ protected void initAttributes(World world) {
+ if (world != null) {
+ if (world.purpurConfig.chickenRetaliate) {
+ this.getAttributeInstance(GenericAttributes.ATTACK_DAMAGE).setValue(2.0D);
+ }
+ }
}
+ // Purpur end
@Override
protected float b(EntityPose entitypose, EntitySize entitysize) {
@@ -35,7 +54,7 @@ public class EntityChicken extends EntityAnimal {
}