mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 01:47:42 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@4d20922 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#11024) PaperMC/Paper@2fa5e0e Fix horse inventories (#11028) PaperMC/Paper@62ed302 Fix entity distance check when applying knockback closes #1553
This commit is contained in:
@@ -7,10 +7,10 @@ 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 da375fb6907e0c46ed176bc76a84f2666227547c..0a3b883ffe3627c5ab7c763f4ecaef4f70e1e144 100644
|
||||
index 0e862d4f044683ec46c32929310641af5c1cc2d0..77156a6ccd171ed8fd36d71fcd3f0b77ba4f5432 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Wolf.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Wolf.java
|
||||
@@ -106,6 +106,37 @@ public class Wolf extends TamableAnimal implements NeutralMob, VariantHolder<Hol
|
||||
@@ -107,6 +107,37 @@ public class Wolf extends TamableAnimal implements NeutralMob, VariantHolder<Hol
|
||||
|
||||
return entitytypes == EntityType.SHEEP || entitytypes == EntityType.RABBIT || entitytypes == EntityType.FOX;
|
||||
};
|
||||
@@ -48,7 +48,7 @@ index da375fb6907e0c46ed176bc76a84f2666227547c..0a3b883ffe3627c5ab7c763f4ecaef4f
|
||||
private static final float START_HEALTH = 8.0F;
|
||||
private static final float TAME_HEALTH = 40.0F;
|
||||
private static final float ARMOR_REPAIR_UNIT = 0.125F;
|
||||
@@ -159,6 +190,30 @@ public class Wolf extends TamableAnimal implements NeutralMob, VariantHolder<Hol
|
||||
@@ -160,6 +191,30 @@ public class Wolf extends TamableAnimal implements NeutralMob, VariantHolder<Hol
|
||||
return this.level().purpurConfig.wolfBreedingTicks;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ index da375fb6907e0c46ed176bc76a84f2666227547c..0a3b883ffe3627c5ab7c763f4ecaef4f
|
||||
@Override
|
||||
protected void registerGoals() {
|
||||
this.goalSelector.addGoal(1, new FloatGoal(this));
|
||||
@@ -166,6 +221,7 @@ public class Wolf extends TamableAnimal implements NeutralMob, VariantHolder<Hol
|
||||
@@ -167,6 +222,7 @@ public class Wolf extends TamableAnimal implements NeutralMob, VariantHolder<Hol
|
||||
this.goalSelector.addGoal(1, new TamableAnimal.TamableAnimalPanicGoal(1.5D, DamageTypeTags.PANIC_ENVIRONMENTAL_CAUSES));
|
||||
this.goalSelector.addGoal(2, new SitWhenOrderedToGoal(this));
|
||||
this.goalSelector.addGoal(3, new Wolf.WolfAvoidEntityGoal<>(this, Llama.class, 24.0F, 1.5D, 1.5D));
|
||||
@@ -87,7 +87,7 @@ index da375fb6907e0c46ed176bc76a84f2666227547c..0a3b883ffe3627c5ab7c763f4ecaef4f
|
||||
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));
|
||||
@@ -179,7 +235,7 @@ public class Wolf extends TamableAnimal implements NeutralMob, VariantHolder<Hol
|
||||
@@ -180,7 +236,7 @@ public class Wolf extends TamableAnimal implements NeutralMob, VariantHolder<Hol
|
||||
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));
|
||||
@@ -96,7 +96,7 @@ index da375fb6907e0c46ed176bc76a84f2666227547c..0a3b883ffe3627c5ab7c763f4ecaef4f
|
||||
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));
|
||||
@@ -228,6 +284,7 @@ public class Wolf extends TamableAnimal implements NeutralMob, VariantHolder<Hol
|
||||
@@ -229,6 +285,7 @@ public class Wolf extends TamableAnimal implements NeutralMob, VariantHolder<Hol
|
||||
public void addAdditionalSaveData(CompoundTag nbt) {
|
||||
super.addAdditionalSaveData(nbt);
|
||||
nbt.putByte("CollarColor", (byte) this.getCollarColor().getId());
|
||||
@@ -104,7 +104,7 @@ index da375fb6907e0c46ed176bc76a84f2666227547c..0a3b883ffe3627c5ab7c763f4ecaef4f
|
||||
this.getVariant().unwrapKey().ifPresent((resourcekey) -> {
|
||||
nbt.putString("variant", resourcekey.location().toString());
|
||||
});
|
||||
@@ -245,6 +302,10 @@ public class Wolf extends TamableAnimal implements NeutralMob, VariantHolder<Hol
|
||||
@@ -246,6 +303,10 @@ public class Wolf extends TamableAnimal implements NeutralMob, VariantHolder<Hol
|
||||
if (nbt.contains("CollarColor", 99)) {
|
||||
this.setCollarColor(DyeColor.byId(nbt.getInt("CollarColor")));
|
||||
}
|
||||
@@ -115,7 +115,7 @@ index da375fb6907e0c46ed176bc76a84f2666227547c..0a3b883ffe3627c5ab7c763f4ecaef4f
|
||||
|
||||
this.readPersistentAngerSaveData(this.level(), nbt);
|
||||
}
|
||||
@@ -263,6 +324,12 @@ public class Wolf extends TamableAnimal implements NeutralMob, VariantHolder<Hol
|
||||
@@ -264,6 +325,12 @@ public class Wolf extends TamableAnimal implements NeutralMob, VariantHolder<Hol
|
||||
}
|
||||
|
||||
this.setVariant(holder1);
|
||||
@@ -128,7 +128,7 @@ index da375fb6907e0c46ed176bc76a84f2666227547c..0a3b883ffe3627c5ab7c763f4ecaef4f
|
||||
return super.finalizeSpawn(world, difficulty, spawnReason, (SpawnGroupData) entityData);
|
||||
}
|
||||
|
||||
@@ -306,6 +373,11 @@ public class Wolf extends TamableAnimal implements NeutralMob, VariantHolder<Hol
|
||||
@@ -307,6 +374,11 @@ public class Wolf extends TamableAnimal implements NeutralMob, VariantHolder<Hol
|
||||
public void tick() {
|
||||
super.tick();
|
||||
if (this.isAlive()) {
|
||||
@@ -140,7 +140,7 @@ index da375fb6907e0c46ed176bc76a84f2666227547c..0a3b883ffe3627c5ab7c763f4ecaef4f
|
||||
this.interestedAngleO = this.interestedAngle;
|
||||
if (this.isInterested()) {
|
||||
this.interestedAngle += (1.0F - this.interestedAngle) * 0.4F;
|
||||
@@ -546,6 +618,19 @@ public class Wolf extends TamableAnimal implements NeutralMob, VariantHolder<Hol
|
||||
@@ -547,6 +619,19 @@ public class Wolf extends TamableAnimal implements NeutralMob, VariantHolder<Hol
|
||||
itemstack.consume(1, player);
|
||||
this.tryToTame(player);
|
||||
return InteractionResult.SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user