mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@e16fefb [ci skip] add 'accepted' to Done project category (#9429) PaperMC/Paper@171ba7c Move Log4j plugins to own source set (#9428) PaperMC/Paper@4356758 Call missing BlockDispenseEvents (#8518) PaperMC/Paper@c0936a7 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9440) PaperMC/Paper@12c9700 Fix ThrownEggHatchEvent#setHatching (#9448)
This commit is contained in:
@@ -7,7 +7,7 @@ Configurable chance to spawn a wolf that is rabid.
|
||||
Rabid wolves attack all players, mobs, and animals.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Wolf.java b/src/main/java/net/minecraft/world/entity/animal/Wolf.java
|
||||
index 074f1860e755348a5a3a8e9df383896656cee9af..aa484d03ed31f6c60c0b4456a4047bc38a40ea4a 100644
|
||||
index d8c73365915e67b38292c96a9601f983f121bdf9..f39b278bc520a4785e9fa472bccd836ad1daac85 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Wolf.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Wolf.java
|
||||
@@ -10,6 +10,7 @@ import net.minecraft.network.syncher.EntityDataAccessor;
|
||||
@@ -55,7 +55,7 @@ index 074f1860e755348a5a3a8e9df383896656cee9af..aa484d03ed31f6c60c0b4456a4047bc3
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.gameevent.GameEvent;
|
||||
import net.minecraft.world.level.pathfinder.BlockPathTypes;
|
||||
@@ -83,6 +90,37 @@ public class Wolf extends TamableAnimal implements NeutralMob {
|
||||
@@ -84,6 +91,37 @@ public class Wolf extends TamableAnimal implements NeutralMob {
|
||||
|
||||
return entitytypes == EntityType.SHEEP || entitytypes == EntityType.RABBIT || entitytypes == EntityType.FOX;
|
||||
};
|
||||
@@ -93,7 +93,7 @@ index 074f1860e755348a5a3a8e9df383896656cee9af..aa484d03ed31f6c60c0b4456a4047bc3
|
||||
private static final float START_HEALTH = 8.0F;
|
||||
private static final float TAME_HEALTH = 20.0F;
|
||||
private float interestedAngle;
|
||||
@@ -134,6 +172,37 @@ public class Wolf extends TamableAnimal implements NeutralMob {
|
||||
@@ -135,6 +173,37 @@ public class Wolf extends TamableAnimal implements NeutralMob {
|
||||
return this.level().purpurConfig.wolfBreedingTicks;
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ index 074f1860e755348a5a3a8e9df383896656cee9af..aa484d03ed31f6c60c0b4456a4047bc3
|
||||
@Override
|
||||
protected void registerGoals() {
|
||||
this.goalSelector.addGoal(1, new FloatGoal(this));
|
||||
@@ -141,6 +210,7 @@ public class Wolf extends TamableAnimal implements NeutralMob {
|
||||
@@ -142,6 +211,7 @@ public class Wolf extends TamableAnimal implements NeutralMob {
|
||||
this.goalSelector.addGoal(1, new Wolf.WolfPanicGoal(1.5D));
|
||||
this.goalSelector.addGoal(2, new SitWhenOrderedToGoal(this));
|
||||
this.goalSelector.addGoal(3, new Wolf.WolfAvoidEntityGoal<>(this, Llama.class, 24.0F, 1.5D, 1.5D));
|
||||
@@ -139,7 +139,7 @@ index 074f1860e755348a5a3a8e9df383896656cee9af..aa484d03ed31f6c60c0b4456a4047bc3
|
||||
this.goalSelector.addGoal(4, new LeapAtTargetGoal(this, 0.4F));
|
||||
this.goalSelector.addGoal(5, new MeleeAttackGoal(this, 1.0D, true));
|
||||
this.goalSelector.addGoal(6, new FollowOwnerGoal(this, 1.0D, 10.0F, 2.0F, false));
|
||||
@@ -154,7 +224,7 @@ public class Wolf extends TamableAnimal implements NeutralMob {
|
||||
@@ -155,7 +225,7 @@ public class Wolf extends TamableAnimal implements NeutralMob {
|
||||
this.targetSelector.addGoal(2, new OwnerHurtTargetGoal(this));
|
||||
this.targetSelector.addGoal(3, (new HurtByTargetGoal(this, new Class[0])).setAlertOthers());
|
||||
this.targetSelector.addGoal(4, new NearestAttackableTargetGoal<>(this, Player.class, 10, true, false, this::isAngryAt));
|
||||
@@ -148,7 +148,7 @@ index 074f1860e755348a5a3a8e9df383896656cee9af..aa484d03ed31f6c60c0b4456a4047bc3
|
||||
this.targetSelector.addGoal(6, new NonTameRandomTargetGoal<>(this, Turtle.class, false, Turtle.BABY_ON_LAND_SELECTOR));
|
||||
this.targetSelector.addGoal(7, new NearestAttackableTargetGoal<>(this, AbstractSkeleton.class, false));
|
||||
this.targetSelector.addGoal(8, new ResetUniversalAngerTargetGoal<>(this, true));
|
||||
@@ -199,6 +269,7 @@ public class Wolf extends TamableAnimal implements NeutralMob {
|
||||
@@ -182,6 +252,7 @@ public class Wolf extends TamableAnimal implements NeutralMob {
|
||||
public void addAdditionalSaveData(CompoundTag nbt) {
|
||||
super.addAdditionalSaveData(nbt);
|
||||
nbt.putByte("CollarColor", (byte) this.getCollarColor().getId());
|
||||
@@ -156,7 +156,7 @@ index 074f1860e755348a5a3a8e9df383896656cee9af..aa484d03ed31f6c60c0b4456a4047bc3
|
||||
this.addPersistentAngerSaveData(nbt);
|
||||
}
|
||||
|
||||
@@ -208,6 +279,10 @@ public class Wolf extends TamableAnimal implements NeutralMob {
|
||||
@@ -191,6 +262,10 @@ public class Wolf extends TamableAnimal implements NeutralMob {
|
||||
if (nbt.contains("CollarColor", 99)) {
|
||||
this.setCollarColor(DyeColor.byId(nbt.getInt("CollarColor")));
|
||||
}
|
||||
@@ -167,7 +167,7 @@ index 074f1860e755348a5a3a8e9df383896656cee9af..aa484d03ed31f6c60c0b4456a4047bc3
|
||||
|
||||
this.readPersistentAngerSaveData(this.level(), nbt);
|
||||
}
|
||||
@@ -252,6 +327,11 @@ public class Wolf extends TamableAnimal implements NeutralMob {
|
||||
@@ -235,6 +310,11 @@ public class Wolf extends TamableAnimal implements NeutralMob {
|
||||
public void tick() {
|
||||
super.tick();
|
||||
if (this.isAlive()) {
|
||||
@@ -179,7 +179,7 @@ index 074f1860e755348a5a3a8e9df383896656cee9af..aa484d03ed31f6c60c0b4456a4047bc3
|
||||
this.interestedAngleO = this.interestedAngle;
|
||||
if (this.isInterested()) {
|
||||
this.interestedAngle += (1.0F - this.interestedAngle) * 0.4F;
|
||||
@@ -463,6 +543,19 @@ public class Wolf extends TamableAnimal implements NeutralMob {
|
||||
@@ -450,6 +530,19 @@ public class Wolf extends TamableAnimal implements NeutralMob {
|
||||
}
|
||||
|
||||
return InteractionResult.SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user