[ci skip] Add more identifying patch comments, merge related patches
This commit is contained in:
@@ -12,7 +12,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
private int ticksUntilNextAlert;
|
||||
private static final float ZOMBIFIED_PIGLIN_EYE_HEIGHT = 1.79F;
|
||||
private static final float ZOMBIFIED_PIGLIN_BABY_EYE_HEIGHT_ADJUSTMENT = 0.82F;
|
||||
+ private HurtByTargetGoal pathfinderGoalHurtByTarget; // Paper
|
||||
+ private HurtByTargetGoal pathfinderGoalHurtByTarget; // Paper - fix PigZombieAngerEvent cancellation
|
||||
|
||||
public ZombifiedPiglin(EntityType<? extends ZombifiedPiglin> type, Level world) {
|
||||
super(type, world);
|
||||
@@ -21,7 +21,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
this.goalSelector.addGoal(2, new ZombieAttackGoal(this, 1.0D, false));
|
||||
this.goalSelector.addGoal(7, new WaterAvoidingRandomStrollGoal(this, 1.0D));
|
||||
- this.targetSelector.addGoal(1, (new HurtByTargetGoal(this, new Class[0])).setAlertOthers());
|
||||
+ this.targetSelector.addGoal(1, pathfinderGoalHurtByTarget = (new HurtByTargetGoal(this, new Class[0])).setAlertOthers()); // Paper - assign field
|
||||
+ this.targetSelector.addGoal(1, pathfinderGoalHurtByTarget = (new HurtByTargetGoal(this, new Class[0])).setAlertOthers()); // Paper - fix PigZombieAngerEvent cancellation
|
||||
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, 10, true, false, this::isAngryAt));
|
||||
this.targetSelector.addGoal(3, new ResetUniversalAngerTargetGoal<>(this, true));
|
||||
}
|
||||
@@ -29,7 +29,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
this.level().getCraftServer().getPluginManager().callEvent(event);
|
||||
if (event.isCancelled()) {
|
||||
this.setPersistentAngerTarget(null);
|
||||
+ pathfinderGoalHurtByTarget.stop(); // Paper - clear goalTargets to fix cancellation
|
||||
+ pathfinderGoalHurtByTarget.stop(); // Paper - fix PigZombieAngerEvent cancellation
|
||||
return;
|
||||
}
|
||||
this.setRemainingPersistentAngerTime(event.getNewAnger());
|
||||
|
||||
Reference in New Issue
Block a user