geforkt von Mirrors/Paper
SPIGOT-7788: The healing power of friendship advancement is never granted
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
2f1800fa2e
Commit
d67f71f3f4
@ -13,7 +13,7 @@
|
||||
public class BehaviorAttackTargetForget {
|
||||
|
||||
private static final int TIMEOUT_TO_GET_WITHIN_ATTACK_RANGE = 200;
|
||||
@@ -41,6 +47,18 @@
|
||||
@@ -41,6 +47,17 @@
|
||||
if (entityinsentient.canAttack(entityliving) && (!flag || !isTiredOfTryingToReachTarget(entityinsentient, behaviorbuilder_b.tryGet(memoryaccessor1))) && entityliving.isAlive() && entityliving.level() == entityinsentient.level() && !predicate.test(entityliving)) {
|
||||
return true;
|
||||
} else {
|
||||
@ -23,11 +23,10 @@
|
||||
+ if (event.isCancelled()) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ if (event.getTarget() == null) {
|
||||
+ memoryaccessor.erase();
|
||||
+ if (event.getTarget() != null) {
|
||||
+ entityinsentient.getBrain().setMemory(MemoryModuleType.ATTACK_TARGET, ((CraftLivingEntity) event.getTarget()).getHandle());
|
||||
+ return true;
|
||||
+ }
|
||||
+ entityliving = ((CraftLivingEntity) event.getTarget()).getHandle();
|
||||
+ // CraftBukkit end
|
||||
biconsumer.accept(entityinsentient, entityliving);
|
||||
memoryaccessor.erase();
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren