mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 10:27:44 +01:00
more ridables
This commit is contained in:
@@ -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 {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user