Skip to content

Package net.minecraft.world.entity.ai.goal

Part 1/1


AvoidEntityGoal

  • Full name: net.minecraft.world.entity.ai.goal.AvoidEntityGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/AvoidEntityGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.AvoidEntityGoal#AvoidEntityGoal(PathfinderMob,Class<T>,float,double,double)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/AvoidEntityGoal.java:30
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ AvoidEntityGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • PathfinderMob pathfinderMob
  • Class<T> class_
  • float f
  • double d
  • double e

ตัวอย่างใช้งาน

PathfinderMob pathfinderMob = ...;
Class<T> class_ = ...;
AvoidEntityGoal instance = new AvoidEntityGoal(pathfinderMob, class_, 0.0F, 0.0D, 0.0D);

net.minecraft.world.entity.ai.goal.AvoidEntityGoal#AvoidEntityGoal(PathfinderMob,Class<T>,float,double,double,Predicate<LivingEntity>)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/AvoidEntityGoal.java:51
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ AvoidEntityGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • PathfinderMob pathfinderMob
  • Class<T> class_
  • float f
  • double d
  • double e
  • Predicate<LivingEntity> predicate

ตัวอย่างใช้งาน

PathfinderMob pathfinderMob = ...;
Class<T> class_ = ...;
Predicate<LivingEntity> predicate = ...;
AvoidEntityGoal instance = new AvoidEntityGoal(pathfinderMob, class_, 0.0F, 0.0D, 0.0D, predicate);

net.minecraft.world.entity.ai.goal.AvoidEntityGoal#AvoidEntityGoal(PathfinderMob,Class<T>,Predicate<LivingEntity>,float,double,double,Predicate<LivingEntity>)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/AvoidEntityGoal.java:34
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ AvoidEntityGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: mob, avoidClass, avoidPredicate, maxDist, walkSpeedModifier, sprintSpeedModifier. เรียกต่อ: getNavigation(), setFlags(), of(), forCombat(), range(), selector(), test().

Parameters

  • PathfinderMob pathfinderMob
  • Class<T> class_
  • Predicate<LivingEntity> predicate
  • float f
  • double d
  • double e
  • Predicate<LivingEntity> predicate2

ตัวอย่างใช้งาน

PathfinderMob pathfinderMob = ...;
Class<T> class_ = ...;
Predicate<LivingEntity> predicate = ...;
Predicate<LivingEntity> predicate2 = ...;
AvoidEntityGoal instance = new AvoidEntityGoal(pathfinderMob, class_, predicate, 0.0F, 0.0D, 0.0D, predicate2);

net.minecraft.world.entity.ai.goal.AvoidEntityGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/AvoidEntityGoal.java:83
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

เรียกต่อ: isDone(). คืนค่า: !this.pathNav.isDone().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

AvoidEntityGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.AvoidEntityGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/AvoidEntityGoal.java:55
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: toAvoid, path. เรียกต่อ: getServerLevel(), getNearestEntity(), level(), getEntitiesOfClass(), getBoundingBox(), inflate(), getX(), getY(). มีจุด return อย่างน้อย 4 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

AvoidEntityGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.AvoidEntityGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/AvoidEntityGoal.java:88
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

เรียกต่อ: moveTo().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

AvoidEntityGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.AvoidEntityGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/AvoidEntityGoal.java:93
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

แก้ state: toAvoid.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

AvoidEntityGoal instance = ...;
instance.stop();

net.minecraft.world.entity.ai.goal.AvoidEntityGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/AvoidEntityGoal.java:98
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: distanceToSqr(), getNavigation(), setSpeedModifier().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

AvoidEntityGoal instance = ...;
instance.tick();

BegGoal

  • Full name: net.minecraft.world.entity.ai.goal.BegGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/BegGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.BegGoal#BegGoal(Wolf,float)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/BegGoal.java:22
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ BegGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: wolf, level, lookDistance, begTargeting. เรียกต่อ: getServerLevel(), forNonCombat(), range(), setFlags(), of().

Parameters

  • Wolf wolf
  • float f

ตัวอย่างใช้งาน

Wolf wolf = ...;
BegGoal instance = new BegGoal(wolf, 0.0F);

net.minecraft.world.entity.ai.goal.BegGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/BegGoal.java:36
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isAlive(), distanceToSqr(), playerHoldingInteresting(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BegGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.BegGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/BegGoal.java:30
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

แก้ state: player. เรียกต่อ: getNearestPlayer(), playerHoldingInteresting(). คืนค่า: this.player == null ? false : this.playerHoldingInteresting(this.player).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BegGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.BegGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/BegGoal.java:47
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

แก้ state: lookTime. เรียกต่อ: setIsInterested(), adjustedTickDelay(), getRandom(), nextInt().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BegGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.BegGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/BegGoal.java:53
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

แก้ state: player. เรียกต่อ: setIsInterested().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BegGoal instance = ...;
instance.stop();

net.minecraft.world.entity.ai.goal.BegGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/BegGoal.java:59
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

แก้ state: lookTime. เรียกต่อ: getLookControl(), setLookAt(), getX(), getEyeY(), getZ(), getMaxHeadXRot().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BegGoal instance = ...;
instance.tick();

BreakDoorGoal

  • Full name: net.minecraft.world.entity.ai.goal.BreakDoorGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/BreakDoorGoal.java
  • Type: class
  • Modifiers: public
  • Extends: DoorInteractGoal

net.minecraft.world.entity.ai.goal.BreakDoorGoal#BreakDoorGoal(Mob,int,Predicate<Difficulty>)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/BreakDoorGoal.java:21
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ BreakDoorGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: doorBreakTime.

Parameters

  • Mob mob
  • int i
  • Predicate<Difficulty> predicate

ตัวอย่างใช้งาน

Mob mob = ...;
Predicate<Difficulty> predicate = ...;
BreakDoorGoal instance = new BreakDoorGoal(mob, 0, predicate);

net.minecraft.world.entity.ai.goal.BreakDoorGoal#BreakDoorGoal(Mob,Predicate<Difficulty>)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/BreakDoorGoal.java:16
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ BreakDoorGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: validDifficulties.

Parameters

  • Mob mob
  • Predicate<Difficulty> predicate

ตัวอย่างใช้งาน

Mob mob = ...;
Predicate<Difficulty> predicate = ...;
BreakDoorGoal instance = new BreakDoorGoal(mob, predicate);

net.minecraft.world.entity.ai.goal.BreakDoorGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/BreakDoorGoal.java:47
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

เรียกต่อ: getDoorBreakTime(), isOpen(), closerToCenterThan(), position(), isValidDifficulty(), level(), getDifficulty().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BreakDoorGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.BreakDoorGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/BreakDoorGoal.java:30
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getServerLevel(), getGameRules(), getBoolean(), isValidDifficulty(), level(), getDifficulty(), isOpen(). คืนค่า: false.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BreakDoorGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.BreakDoorGoal#getDoorBreakTime()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/BreakDoorGoal.java:26
  • Modifiers: protected
  • Return: int

คืออะไร

อ่านค่า Door Break Time

ทำงานยังไง

เรียกต่อ: max(). คืนค่า: Math.max(240, this.doorBreakTime).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected int getDoorBreakTime() {
    return super.getDoorBreakTime();
}

net.minecraft.world.entity.ai.goal.BreakDoorGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/BreakDoorGoal.java:41
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

แก้ state: breakTime.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BreakDoorGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.BreakDoorGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/BreakDoorGoal.java:55
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

เรียกต่อ: level(), destroyBlockProgress(), getId().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BreakDoorGoal instance = ...;
instance.stop();

net.minecraft.world.entity.ai.goal.BreakDoorGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/BreakDoorGoal.java:61
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: breakTime, lastBreakProgress. เรียกต่อ: getRandom(), nextInt(), level(), levelEvent(), swing(), getUsedItemHand(), getDoorBreakTime(), destroyBlockProgress().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BreakDoorGoal instance = ...;
instance.tick();

BreathAirGoal

  • Full name: net.minecraft.world.entity.ai.goal.BreathAirGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/BreathAirGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.BreathAirGoal#BreathAirGoal(PathfinderMob)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/BreathAirGoal.java:17
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ BreathAirGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: mob. เรียกต่อ: setFlags(), of().

Parameters

  • PathfinderMob pathfinderMob

ตัวอย่างใช้งาน

PathfinderMob pathfinderMob = ...;
BreathAirGoal instance = new BreathAirGoal(pathfinderMob);

net.minecraft.world.entity.ai.goal.BreathAirGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/BreathAirGoal.java:27
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

เรียกต่อ: canUse(). คืนค่า: this.canUse().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BreathAirGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.BreathAirGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/BreathAirGoal.java:22
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

เรียกต่อ: getAirSupply(). คืนค่า: this.mob.getAirSupply() < 140.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BreathAirGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.BreathAirGoal#isInterruptable()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/BreathAirGoal.java:32
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Interruptable

ทำงานยังไง

คืนค่า: false.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BreathAirGoal instance = ...;
boolean result = instance.isInterruptable();

net.minecraft.world.entity.ai.goal.BreathAirGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/BreathAirGoal.java:37
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

เรียกต่อ: findAirPosition().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BreathAirGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.BreathAirGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/BreathAirGoal.java:67
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

เรียกต่อ: findAirPosition(), moveRelative(), move(), getDeltaMovement(). สร้างออบเจ็กต์: Vec3.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BreathAirGoal instance = ...;
instance.tick();

BreedGoal

  • Full name: net.minecraft.world.entity.ai.goal.BreedGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/BreedGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.BreedGoal#breed()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/BreedGoal.java:79
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ breed ตาม implementation ของ BreedGoal

ทำงานยังไง

เรียกต่อ: spawnChildFromBreeding().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected void breed() {
    super.breed();
}

net.minecraft.world.entity.ai.goal.BreedGoal#BreedGoal(Animal,double)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/BreedGoal.java:20
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ BreedGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

เรียกต่อ: getClass().

Parameters

  • Animal animal
  • double d

ตัวอย่างใช้งาน

Animal animal = ...;
BreedGoal instance = new BreedGoal(animal, 0.0D);

net.minecraft.world.entity.ai.goal.BreedGoal#BreedGoal(Animal,double,Class<? extends Animal>)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/BreedGoal.java:24
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ BreedGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: animal, level, partnerClass, speedModifier. เรียกต่อ: getServerLevel(), setFlags(), of().

Parameters

  • Animal animal
  • double d
  • Class<? extends Animal> class_

ตัวอย่างใช้งาน

Animal animal = ...;
Class<? extends Animal> class_ = ...;
BreedGoal instance = new BreedGoal(animal, 0.0D, class_);

net.minecraft.world.entity.ai.goal.BreedGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/BreedGoal.java:42
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

เรียกต่อ: isAlive(), isInLove(), isPanicking(). คืนค่า: this.partner.isAlive() && this.partner.isInLove() && this.loveTime < 60 && !this.partner.isPanicking().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BreedGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.BreedGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/BreedGoal.java:32
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: partner. เรียกต่อ: isInLove(), getFreePartner(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BreedGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.BreedGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/BreedGoal.java:47
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

แก้ state: partner, loveTime.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BreedGoal instance = ...;
instance.stop();

net.minecraft.world.entity.ai.goal.BreedGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/BreedGoal.java:53
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: loveTime. เรียกต่อ: getLookControl(), setLookAt(), getMaxHeadXRot(), getNavigation(), moveTo(), adjustedTickDelay(), distanceToSqr(), breed().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BreedGoal instance = ...;
instance.tick();

CatLieOnBedGoal

  • Full name: net.minecraft.world.entity.ai.goal.CatLieOnBedGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/CatLieOnBedGoal.java
  • Type: class
  • Modifiers: public
  • Extends: MoveToBlockGoal

net.minecraft.world.entity.ai.goal.CatLieOnBedGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/CatLieOnBedGoal.java:20
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

เรียกต่อ: isTame(), isOrderedToSit(), isLying(). คืนค่า: this.cat.isTame() && !this.cat.isOrderedToSit() && !this.cat.isLying() && super.canUse().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CatLieOnBedGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.CatLieOnBedGoal#CatLieOnBedGoal(Cat,double,int)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/CatLieOnBedGoal.java:13
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ CatLieOnBedGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: cat, verticalSearchStart. เรียกต่อ: setFlags(), of().

Parameters

  • Cat cat
  • double d
  • int i

ตัวอย่างใช้งาน

Cat cat = ...;
CatLieOnBedGoal instance = new CatLieOnBedGoal(cat, 0.0D, 0);

net.minecraft.world.entity.ai.goal.CatLieOnBedGoal#isValidTarget(LevelReader,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/CatLieOnBedGoal.java:53
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Valid Target

ทำงานยังไง

เรียกต่อ: isEmptyBlock(), above(), getBlockState(), is(). คืนค่า: levelReader.isEmptyBlock(blockPos.above()) && levelReader.getBlockState(blockPos).is(BlockTags.BEDS).

Parameters

  • LevelReader levelReader
  • BlockPos blockPos

ตัวอย่างใช้งาน

LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean isValidTarget(LevelReader levelReader, BlockPos blockPos) {
    return super.isValidTarget(levelReader, blockPos);
}

net.minecraft.world.entity.ai.goal.CatLieOnBedGoal#nextStartTick(PathfinderMob)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/CatLieOnBedGoal.java:31
  • Modifiers: protected
  • Return: int

คืออะไร

ดำเนินการ nextStartTick ตาม implementation ของ CatLieOnBedGoal

ทำงานยังไง

คืนค่า: 40.

Parameters

  • PathfinderMob pathfinderMob

ตัวอย่างใช้งาน

PathfinderMob pathfinderMob = ...;
@Override
protected int nextStartTick(PathfinderMob pathfinderMob) {
    return super.nextStartTick(pathfinderMob);
}

net.minecraft.world.entity.ai.goal.CatLieOnBedGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/CatLieOnBedGoal.java:25
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

เรียกต่อ: setInSittingPose().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CatLieOnBedGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.CatLieOnBedGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/CatLieOnBedGoal.java:36
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

เรียกต่อ: setLying().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CatLieOnBedGoal instance = ...;
instance.stop();

net.minecraft.world.entity.ai.goal.CatLieOnBedGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/CatLieOnBedGoal.java:42
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: setInSittingPose(), isReachedTarget(), setLying(), isLying().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CatLieOnBedGoal instance = ...;
instance.tick();

CatSitOnBlockGoal

  • Full name: net.minecraft.world.entity.ai.goal.CatSitOnBlockGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/CatSitOnBlockGoal.java
  • Type: class
  • Modifiers: public
  • Extends: MoveToBlockGoal

net.minecraft.world.entity.ai.goal.CatSitOnBlockGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/CatSitOnBlockGoal.java:22
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

เรียกต่อ: isTame(), isOrderedToSit(). คืนค่า: this.cat.isTame() && !this.cat.isOrderedToSit() && super.canUse().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CatSitOnBlockGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.CatSitOnBlockGoal#CatSitOnBlockGoal(Cat,double)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/CatSitOnBlockGoal.java:17
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ CatSitOnBlockGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: cat.

Parameters

  • Cat cat
  • double d

ตัวอย่างใช้งาน

Cat cat = ...;
CatSitOnBlockGoal instance = new CatSitOnBlockGoal(cat, 0.0D);

net.minecraft.world.entity.ai.goal.CatSitOnBlockGoal#isValidTarget(LevelReader,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/CatSitOnBlockGoal.java:45
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Valid Target

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isEmptyBlock(), above(), getBlockState(), is(), getOpenCount(), getValue(), getOptionalValue(), map(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • LevelReader levelReader
  • BlockPos blockPos

ตัวอย่างใช้งาน

LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean isValidTarget(LevelReader levelReader, BlockPos blockPos) {
    return super.isValidTarget(levelReader, blockPos);
}

net.minecraft.world.entity.ai.goal.CatSitOnBlockGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/CatSitOnBlockGoal.java:27
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

เรียกต่อ: setInSittingPose().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CatSitOnBlockGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.CatSitOnBlockGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/CatSitOnBlockGoal.java:33
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

เรียกต่อ: setInSittingPose().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CatSitOnBlockGoal instance = ...;
instance.stop();

net.minecraft.world.entity.ai.goal.CatSitOnBlockGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/CatSitOnBlockGoal.java:39
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

เรียกต่อ: setInSittingPose(), isReachedTarget().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CatSitOnBlockGoal instance = ...;
instance.tick();

ClimbOnTopOfPowderSnowGoal

  • Full name: net.minecraft.world.entity.ai.goal.ClimbOnTopOfPowderSnowGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/ClimbOnTopOfPowderSnowGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.ClimbOnTopOfPowderSnowGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/ClimbOnTopOfPowderSnowGoal.java:22
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getType(), is(), blockPosition(), above(), getBlockState(), getCollisionShape(), empty(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ClimbOnTopOfPowderSnowGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.ClimbOnTopOfPowderSnowGoal#ClimbOnTopOfPowderSnowGoal(Mob,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/ClimbOnTopOfPowderSnowGoal.java:16
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ ClimbOnTopOfPowderSnowGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: mob, level. เรียกต่อ: setFlags(), of().

Parameters

  • Mob mob
  • Level level

ตัวอย่างใช้งาน

Mob mob = ...;
Level level = ...;
ClimbOnTopOfPowderSnowGoal instance = new ClimbOnTopOfPowderSnowGoal(mob, level);

net.minecraft.world.entity.ai.goal.ClimbOnTopOfPowderSnowGoal#requiresUpdateEveryTick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/ClimbOnTopOfPowderSnowGoal.java:34
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ requiresUpdateEveryTick ตาม implementation ของ ClimbOnTopOfPowderSnowGoal

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ClimbOnTopOfPowderSnowGoal instance = ...;
boolean result = instance.requiresUpdateEveryTick();

net.minecraft.world.entity.ai.goal.ClimbOnTopOfPowderSnowGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/ClimbOnTopOfPowderSnowGoal.java:39
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

เรียกต่อ: getJumpControl(), jump().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ClimbOnTopOfPowderSnowGoal instance = ...;
instance.tick();

DolphinJumpGoal

  • Full name: net.minecraft.world.entity.ai.goal.DolphinJumpGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/DolphinJumpGoal.java
  • Type: class
  • Modifiers: public
  • Extends: JumpGoal

net.minecraft.world.entity.ai.goal.DolphinJumpGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/DolphinJumpGoal.java:53
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

เรียกต่อ: getDeltaMovement(), getXRot(), abs(), isInWater(), onGround(). คืนค่า: (!(d * d < 0.03F) || this.dolphin.getXRot() == 0.0F || !(Math.abs(this.dolphin.getXRot()) < 10.0F) || !this.dolphin.isInWater()) && !this.dolphin.onGround().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

DolphinJumpGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.DolphinJumpGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/DolphinJumpGoal.java:23
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getRandom(), nextInt(), getMotionDirection(), getStepX(), getStepZ(), blockPosition(), waterIsClear(), surfaceIsClear(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

DolphinJumpGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.DolphinJumpGoal#DolphinJumpGoal(Dolphin,int)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/DolphinJumpGoal.java:18
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ DolphinJumpGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: dolphin, interval. เรียกต่อ: reducedTickDelay().

Parameters

  • Dolphin dolphin
  • int i

ตัวอย่างใช้งาน

Dolphin dolphin = ...;
DolphinJumpGoal instance = new DolphinJumpGoal(dolphin, 0);

net.minecraft.world.entity.ai.goal.DolphinJumpGoal#isInterruptable()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/DolphinJumpGoal.java:60
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Interruptable

ทำงานยังไง

คืนค่า: false.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

DolphinJumpGoal instance = ...;
boolean result = instance.isInterruptable();

net.minecraft.world.entity.ai.goal.DolphinJumpGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/DolphinJumpGoal.java:65
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

เรียกต่อ: getMotionDirection(), setDeltaMovement(), getDeltaMovement(), add(), getStepX(), getStepZ(), getNavigation(), stop().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

DolphinJumpGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.DolphinJumpGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/DolphinJumpGoal.java:72
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

เรียกต่อ: setXRot().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

DolphinJumpGoal instance = ...;
instance.stop();

net.minecraft.world.entity.ai.goal.DolphinJumpGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/DolphinJumpGoal.java:77
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: breached. เรียกต่อ: level(), getFluidState(), blockPosition(), is(), playSound(), getDeltaMovement(), getXRot(), setXRot().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

DolphinJumpGoal instance = ...;
instance.tick();

DoorInteractGoal

  • Full name: net.minecraft.world.entity.ai.goal.DoorInteractGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/DoorInteractGoal.java
  • Type: class
  • Modifiers: public abstract
  • Extends: Goal

net.minecraft.world.entity.ai.goal.DoorInteractGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/DoorInteractGoal.java:82
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

คืนค่า: !this.passed.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

DoorInteractGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.DoorInteractGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/DoorInteractGoal.java:50
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: doorPos, hasDoor. เรียกต่อ: hasGroundPathNavigation(), getNavigation(), getPath(), isDone(), min(), getNextNodeIndex(), getNodeCount(), getNode(). สร้างออบเจ็กต์: BlockPos. มีจุด return อย่างน้อย 5 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

DoorInteractGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.DoorInteractGoal#DoorInteractGoal(Mob)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/DoorInteractGoal.java:20
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ DoorInteractGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: mob. เรียกต่อ: hasGroundPathNavigation(). สร้างออบเจ็กต์: IllegalArgumentException.

Parameters

  • Mob mob

ตัวอย่างใช้งาน

Mob mob = ...;
DoorInteractGoal instance = new DoorInteractGoal(mob);

net.minecraft.world.entity.ai.goal.DoorInteractGoal#isOpen()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/DoorInteractGoal.java:27
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Open

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: hasDoor. เรียกต่อ: level(), getBlockState(), getBlock(), getValue(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected boolean isOpen() {
    return super.isOpen();
}

net.minecraft.world.entity.ai.goal.DoorInteractGoal#requiresUpdateEveryTick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/DoorInteractGoal.java:94
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ requiresUpdateEveryTick ตาม implementation ของ DoorInteractGoal

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

DoorInteractGoal instance = ...;
boolean result = instance.requiresUpdateEveryTick();

net.minecraft.world.entity.ai.goal.DoorInteractGoal#setOpen(boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/DoorInteractGoal.java:41
  • Modifiers: protected
  • Return: void

คืออะไร

กำหนดค่า Open

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: level(), getBlockState(), getBlock().

Parameters

  • boolean bl

ตัวอย่างใช้งาน

@Override
protected void setOpen(boolean bl) {
    super.setOpen(bl);
}

net.minecraft.world.entity.ai.goal.DoorInteractGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/DoorInteractGoal.java:87
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

แก้ state: passed, doorOpenDirX, doorOpenDirZ. เรียกต่อ: getX(), getZ().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

DoorInteractGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.DoorInteractGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/DoorInteractGoal.java:99
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: passed. เรียกต่อ: getX(), getZ().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

DoorInteractGoal instance = ...;
instance.tick();

EatBlockGoal

  • Full name: net.minecraft.world.entity.ai.goal.EatBlockGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/EatBlockGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.EatBlockGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/EatBlockGoal.java:49
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

คืนค่า: this.eatAnimationTick > 0.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

EatBlockGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.EatBlockGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/EatBlockGoal.java:27
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getRandom(), nextInt(), isBaby(), blockPosition(), test(), getBlockState(), below(), is(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

EatBlockGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.EatBlockGoal#EatBlockGoal(Mob)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/EatBlockGoal.java:21
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ EatBlockGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: mob, level. เรียกต่อ: level(), setFlags(), of().

Parameters

  • Mob mob

ตัวอย่างใช้งาน

Mob mob = ...;
EatBlockGoal instance = new EatBlockGoal(mob);

net.minecraft.world.entity.ai.goal.EatBlockGoal#getEatAnimationTick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/EatBlockGoal.java:54
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Eat Animation Tick

ทำงานยังไง

คืนค่า: this.eatAnimationTick.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

EatBlockGoal instance = ...;
int result = instance.getEatAnimationTick();

net.minecraft.world.entity.ai.goal.EatBlockGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/EatBlockGoal.java:37
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

แก้ state: eatAnimationTick. เรียกต่อ: adjustedTickDelay(), broadcastEntityEvent(), getNavigation(), stop().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

EatBlockGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.EatBlockGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/EatBlockGoal.java:44
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

แก้ state: eatAnimationTick.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

EatBlockGoal instance = ...;
instance.stop();

net.minecraft.world.entity.ai.goal.EatBlockGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/EatBlockGoal.java:58
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: eatAnimationTick. เรียกต่อ: max(), adjustedTickDelay(), blockPosition(), test(), getBlockState(), getServerLevel(), getGameRules(), getBoolean().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

EatBlockGoal instance = ...;
instance.tick();

FleeSunGoal

  • Full name: net.minecraft.world.entity.ai.goal.FleeSunGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/FleeSunGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.FleeSunGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FleeSunGoal.java:54
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

เรียกต่อ: getNavigation(), isDone(). คืนค่า: !this.mob.getNavigation().isDone().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FleeSunGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.FleeSunGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FleeSunGoal.java:27
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getTarget(), isDay(), isOnFire(), canSeeSky(), blockPosition(), getItemBySlot(), isEmpty(), setWantedPos(). มีจุด return อย่างน้อย 5 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FleeSunGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.FleeSunGoal#FleeSunGoal(PathfinderMob,double)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FleeSunGoal.java:20
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ FleeSunGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: mob, speedModifier, level. เรียกต่อ: level(), setFlags(), of().

Parameters

  • PathfinderMob pathfinderMob
  • double d

ตัวอย่างใช้งาน

PathfinderMob pathfinderMob = ...;
FleeSunGoal instance = new FleeSunGoal(pathfinderMob, 0.0D);

net.minecraft.world.entity.ai.goal.FleeSunGoal#getHidePos()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FleeSunGoal.java:64
  • Modifiers: protected
  • Return: Vec3

คืออะไร

อ่านค่า Hide Pos

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getRandom(), blockPosition(), offset(), nextInt(), canSeeSky(), getWalkTargetValue(), atBottomCenterOf(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected Vec3 getHidePos() {
    return super.getHidePos();
}

net.minecraft.world.entity.ai.goal.FleeSunGoal#setWantedPos()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FleeSunGoal.java:42
  • Modifiers: protected
  • Return: boolean

คืออะไร

กำหนดค่า Wanted Pos

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: wantedX, wantedY, wantedZ. เรียกต่อ: getHidePos(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected boolean setWantedPos() {
    return super.setWantedPos();
}

net.minecraft.world.entity.ai.goal.FleeSunGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FleeSunGoal.java:59
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

เรียกต่อ: getNavigation(), moveTo().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FleeSunGoal instance = ...;
instance.start();

FloatGoal

  • Full name: net.minecraft.world.entity.ai.goal.FloatGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/FloatGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.FloatGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FloatGoal.java:16
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

เรียกต่อ: isInWater(), getFluidHeight(), getFluidJumpThreshold(), isInLava(). คืนค่า: this.mob.isInWater() && this.mob.getFluidHeight(FluidTags.WATER) > this.mob.getFluidJumpThreshold() || this.mob.isInLava().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FloatGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.FloatGoal#FloatGoal(Mob)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FloatGoal.java:10
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ FloatGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: mob. เรียกต่อ: setFlags(), of(), getNavigation(), setCanFloat().

Parameters

  • Mob mob

ตัวอย่างใช้งาน

Mob mob = ...;
FloatGoal instance = new FloatGoal(mob);

net.minecraft.world.entity.ai.goal.FloatGoal#requiresUpdateEveryTick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FloatGoal.java:21
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ requiresUpdateEveryTick ตาม implementation ของ FloatGoal

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FloatGoal instance = ...;
boolean result = instance.requiresUpdateEveryTick();

net.minecraft.world.entity.ai.goal.FloatGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FloatGoal.java:26
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getRandom(), nextFloat(), getJumpControl(), jump().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FloatGoal instance = ...;
instance.tick();

FollowBoatGoal

  • Full name: net.minecraft.world.entity.ai.goal.FollowBoatGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/FollowBoatGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.FollowBoatGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowBoatGoal.java:47
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

เรียกต่อ: isPassenger(), abs(). คืนค่า: this.following != null && this.following.isPassenger() && (Mth.abs(this.following.xxa) > 0.0F || Mth.abs(this.following.zza) > 0.0F).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FollowBoatGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.FollowBoatGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowBoatGoal.java:26
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: level(), getEntitiesOfClass(), getBoundingBox(), inflate(), getControllingPassenger(), abs(). คืนค่า: this.following != null && (Mth.abs(this.following.xxa) > 0.0F || Mth.abs(this.following.zza) > 0.0F) || bl.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FollowBoatGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.FollowBoatGoal#FollowBoatGoal(PathfinderMob)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowBoatGoal.java:22
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ FollowBoatGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: mob.

Parameters

  • PathfinderMob pathfinderMob

ตัวอย่างใช้งาน

PathfinderMob pathfinderMob = ...;
FollowBoatGoal instance = new FollowBoatGoal(pathfinderMob);

net.minecraft.world.entity.ai.goal.FollowBoatGoal#isInterruptable()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowBoatGoal.java:42
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Interruptable

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FollowBoatGoal instance = ...;
boolean result = instance.isInterruptable();

net.minecraft.world.entity.ai.goal.FollowBoatGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowBoatGoal.java:52
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: following, timeToRecalcPath, currentGoal. เรียกต่อ: level(), getEntitiesOfClass(), getBoundingBox(), inflate(), getControllingPassenger().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FollowBoatGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.FollowBoatGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowBoatGoal.java:65
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

แก้ state: following.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FollowBoatGoal instance = ...;
instance.stop();

net.minecraft.world.entity.ai.goal.FollowBoatGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowBoatGoal.java:70
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: currentGoal, timeToRecalcPath. เรียกต่อ: abs(), moveRelative(), move(), getDeltaMovement(), adjustedTickDelay(), blockPosition(), relative(), getDirection(). สร้างออบเจ็กต์: Vec3.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FollowBoatGoal instance = ...;
instance.tick();

FollowFlockLeaderGoal

  • Full name: net.minecraft.world.entity.ai.goal.FollowFlockLeaderGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/FollowFlockLeaderGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.FollowFlockLeaderGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowFlockLeaderGoal.java:44
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

เรียกต่อ: isFollower(), inRangeOfLeader(). คืนค่า: this.mob.isFollower() && this.mob.inRangeOfLeader().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FollowFlockLeaderGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.FollowFlockLeaderGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowFlockLeaderGoal.java:23
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: nextStartTick. เรียกต่อ: hasFollowers(), isFollower(), nextStartTick(), canBeFollowed(), level(), getEntitiesOfClass(), getClass(), getBoundingBox(). มีจุด return อย่างน้อย 4 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FollowFlockLeaderGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.FollowFlockLeaderGoal#FollowFlockLeaderGoal(AbstractSchoolingFish)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowFlockLeaderGoal.java:14
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ FollowFlockLeaderGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: mob, nextStartTick. เรียกต่อ: nextStartTick().

Parameters

  • AbstractSchoolingFish abstractSchoolingFish

ตัวอย่างใช้งาน

AbstractSchoolingFish abstractSchoolingFish = ...;
FollowFlockLeaderGoal instance = new FollowFlockLeaderGoal(abstractSchoolingFish);

net.minecraft.world.entity.ai.goal.FollowFlockLeaderGoal#nextStartTick(AbstractSchoolingFish)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowFlockLeaderGoal.java:19
  • Modifiers: protected
  • Return: int

คืออะไร

ดำเนินการ nextStartTick ตาม implementation ของ FollowFlockLeaderGoal

ทำงานยังไง

เรียกต่อ: reducedTickDelay(), getRandom(), nextInt(). คืนค่า: reducedTickDelay(200 + abstractSchoolingFish.getRandom().nextInt(200) % 20).

Parameters

  • AbstractSchoolingFish abstractSchoolingFish

ตัวอย่างใช้งาน

AbstractSchoolingFish abstractSchoolingFish = ...;
@Override
protected int nextStartTick(AbstractSchoolingFish abstractSchoolingFish) {
    return super.nextStartTick(abstractSchoolingFish);
}

net.minecraft.world.entity.ai.goal.FollowFlockLeaderGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowFlockLeaderGoal.java:49
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

แก้ state: timeToRecalcPath.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FollowFlockLeaderGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.FollowFlockLeaderGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowFlockLeaderGoal.java:54
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

เรียกต่อ: stopFollowing().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FollowFlockLeaderGoal instance = ...;
instance.stop();

net.minecraft.world.entity.ai.goal.FollowFlockLeaderGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowFlockLeaderGoal.java:59
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: timeToRecalcPath. เรียกต่อ: adjustedTickDelay(), pathToLeader().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FollowFlockLeaderGoal instance = ...;
instance.tick();

FollowMobGoal

  • Full name: net.minecraft.world.entity.ai.goal.FollowMobGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/FollowMobGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.FollowMobGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowMobGoal.java:54
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

เรียกต่อ: isDone(), distanceToSqr(). คืนค่า: this.followingMob != null && !this.navigation.isDone() && this.mob.distanceToSqr(this.followingMob) > this.stopDistance * this.stopDistance.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FollowMobGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.FollowMobGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowMobGoal.java:39
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: followingMob. เรียกต่อ: level(), getEntitiesOfClass(), getBoundingBox(), inflate(), isEmpty(), isInvisible(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FollowMobGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.FollowMobGoal#FollowMobGoal(Mob,double,float,float)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowMobGoal.java:26
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ FollowMobGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: mob, followPredicate, speedModifier, navigation, stopDistance, areaSize. เรียกต่อ: getClass(), getNavigation(), setFlags(), of(). สร้างออบเจ็กต์: IllegalArgumentException.

Parameters

  • Mob mob
  • double d
  • float f
  • float g

ตัวอย่างใช้งาน

Mob mob = ...;
FollowMobGoal instance = new FollowMobGoal(mob, 0.0D, 0.0F, 0.0F);

net.minecraft.world.entity.ai.goal.FollowMobGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowMobGoal.java:59
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

แก้ state: timeToRecalcPath, oldWaterCost. เรียกต่อ: getPathfindingMalus(), setPathfindingMalus().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FollowMobGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.FollowMobGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowMobGoal.java:66
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

แก้ state: followingMob. เรียกต่อ: setPathfindingMalus().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FollowMobGoal instance = ...;
instance.stop();

net.minecraft.world.entity.ai.goal.FollowMobGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowMobGoal.java:73
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: timeToRecalcPath. เรียกต่อ: isLeashed(), getLookControl(), setLookAt(), getMaxHeadXRot(), adjustedTickDelay(), getX(), getY(), getZ().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FollowMobGoal instance = ...;
instance.tick();

FollowOwnerGoal

  • Full name: net.minecraft.world.entity.ai.goal.FollowOwnerGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/FollowOwnerGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.FollowOwnerGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java:54
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isDone(), unableToMoveToOwner(), distanceToSqr(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FollowOwnerGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.FollowOwnerGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java:35
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: owner. เรียกต่อ: getOwner(), unableToMoveToOwner(), distanceToSqr(). มีจุด return อย่างน้อย 4 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FollowOwnerGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.FollowOwnerGoal#FollowOwnerGoal(TamableAnimal,double,float,float)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java:23
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ FollowOwnerGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: tamable, speedModifier, navigation, startDistance, stopDistance. เรียกต่อ: getNavigation(), setFlags(), of(). สร้างออบเจ็กต์: IllegalArgumentException.

Parameters

  • TamableAnimal tamableAnimal
  • double d
  • float f
  • float g

ตัวอย่างใช้งาน

TamableAnimal tamableAnimal = ...;
FollowOwnerGoal instance = new FollowOwnerGoal(tamableAnimal, 0.0D, 0.0F, 0.0F);

net.minecraft.world.entity.ai.goal.FollowOwnerGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java:63
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

แก้ state: timeToRecalcPath, oldWaterCost. เรียกต่อ: getPathfindingMalus(), setPathfindingMalus().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FollowOwnerGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.FollowOwnerGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java:70
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

แก้ state: owner. เรียกต่อ: setPathfindingMalus().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FollowOwnerGoal instance = ...;
instance.stop();

net.minecraft.world.entity.ai.goal.FollowOwnerGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java:77
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: timeToRecalcPath. เรียกต่อ: shouldTryTeleportToOwner(), getLookControl(), setLookAt(), getMaxHeadXRot(), adjustedTickDelay(), tryToTeleportToOwner(), moveTo().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FollowOwnerGoal instance = ...;
instance.tick();

FollowParentGoal

  • Full name: net.minecraft.world.entity.ai.goal.FollowParentGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/FollowParentGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.FollowParentGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowParentGoal.java:56
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getAge(), isAlive(), distanceToSqr(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FollowParentGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.FollowParentGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowParentGoal.java:22
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: parent. เรียกต่อ: getAge(), level(), getEntitiesOfClass(), getClass(), getBoundingBox(), inflate(), distanceToSqr(). มีจุด return อย่างน้อย 4 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FollowParentGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.FollowParentGoal#FollowParentGoal(Animal,double)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowParentGoal.java:17
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ FollowParentGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: animal, speedModifier.

Parameters

  • Animal animal
  • double d

ตัวอย่างใช้งาน

Animal animal = ...;
FollowParentGoal instance = new FollowParentGoal(animal, 0.0D);

net.minecraft.world.entity.ai.goal.FollowParentGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowParentGoal.java:70
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

แก้ state: timeToRecalcPath.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FollowParentGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.FollowParentGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowParentGoal.java:75
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

แก้ state: parent.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FollowParentGoal instance = ...;
instance.stop();

net.minecraft.world.entity.ai.goal.FollowParentGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/FollowParentGoal.java:80
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: timeToRecalcPath. เรียกต่อ: adjustedTickDelay(), getNavigation(), moveTo().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FollowParentGoal instance = ...;
instance.tick();

Goal

  • Full name: net.minecraft.world.entity.ai.goal.Goal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/Goal.java
  • Type: class
  • Modifiers: public abstract

net.minecraft.world.entity.ai.goal.Goal#adjustedTickDelay(int)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/Goal.java:49
  • Modifiers: protected
  • Return: int

คืออะไร

ดำเนินการ adjustedTickDelay ตาม implementation ของ Goal

ทำงานยังไง

เรียกต่อ: requiresUpdateEveryTick(), reducedTickDelay(). คืนค่า: this.requiresUpdateEveryTick() ? i : reducedTickDelay(i).

Parameters

  • int i

ตัวอย่างใช้งาน

@Override
protected int adjustedTickDelay(int i) {
    return super.adjustedTickDelay(i);
}

net.minecraft.world.entity.ai.goal.Goal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/Goal.java:14
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

เรียกต่อ: canUse(). คืนค่า: this.canUse().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Goal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.Goal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/Goal.java:12
  • Modifiers: public abstract
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Goal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.Goal#getFlags()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/Goal.java:45
  • Modifiers: public
  • Return: EnumSet<Goal.Flag>

คืออะไร

อ่านค่า Flags

ทำงานยังไง

คืนค่า: this.flags.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Goal instance = ...;
EnumSet<Goal.Flag> result = instance.getFlags();

net.minecraft.world.entity.ai.goal.Goal#getServerLevel(Entity)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/Goal.java:57
  • Modifiers: protected static
  • Return: ServerLevel

คืออะไร

อ่านค่า Server Level

ทำงานยังไง

เรียกต่อ: level(). คืนค่า: (ServerLevel)entity.level().

Parameters

  • Entity entity

ตัวอย่างใช้งาน

Entity entity = ...;
@Override
protected ServerLevel getServerLevel(Entity entity) {
    return super.getServerLevel(entity);
}

net.minecraft.world.entity.ai.goal.Goal#getServerLevel(Level)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/Goal.java:61
  • Modifiers: protected static
  • Return: ServerLevel

คืออะไร

อ่านค่า Server Level

ทำงานยังไง

คืนค่า: (ServerLevel)level.

Parameters

  • Level level

ตัวอย่างใช้งาน

Level level = ...;
@Override
protected ServerLevel getServerLevel(Level level) {
    return super.getServerLevel(level);
}

net.minecraft.world.entity.ai.goal.Goal#isInterruptable()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/Goal.java:18
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Interruptable

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Goal instance = ...;
boolean result = instance.isInterruptable();

net.minecraft.world.entity.ai.goal.Goal#reducedTickDelay(int)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/Goal.java:53
  • Modifiers: protected static
  • Return: int

คืออะไร

ดำเนินการ reducedTickDelay ตาม implementation ของ Goal

ทำงานยังไง

เรียกต่อ: positiveCeilDiv(). คืนค่า: Mth.positiveCeilDiv(i, 2).

Parameters

  • int i

ตัวอย่างใช้งาน

@Override
protected int reducedTickDelay(int i) {
    return super.reducedTickDelay(i);
}

net.minecraft.world.entity.ai.goal.Goal#requiresUpdateEveryTick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/Goal.java:28
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ requiresUpdateEveryTick ตาม implementation ของ Goal

ทำงานยังไง

คืนค่า: false.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Goal instance = ...;
boolean result = instance.requiresUpdateEveryTick();

net.minecraft.world.entity.ai.goal.Goal#setFlags(EnumSet<Goal.Flag>)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/Goal.java:35
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Flags

ทำงานยังไง

เรียกต่อ: clear(), addAll().

Parameters

  • EnumSet<Goal.Flag> enumSet

ตัวอย่างใช้งาน

Goal instance = ...;
EnumSet<Goal.Flag> enumSet = ...;
instance.setFlags(enumSet);

net.minecraft.world.entity.ai.goal.Goal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/Goal.java:22
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Goal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.Goal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/Goal.java:25
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Goal instance = ...;
instance.stop();

net.minecraft.world.entity.ai.goal.Goal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/Goal.java:32
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Goal instance = ...;
instance.tick();

net.minecraft.world.entity.ai.goal.Goal#toString()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/Goal.java:40
  • Modifiers: public
  • Return: String

คืออะไร

ดำเนินการ toString ตาม implementation ของ Goal

ทำงานยังไง

เรียกต่อ: getClass(), getSimpleName(). คืนค่า: this.getClass().getSimpleName().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Goal instance = ...;
String result = instance.toString();

GoalSelector

  • Full name: net.minecraft.world.entity.ai.goal.GoalSelector
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/GoalSelector.java
  • Type: class
  • Modifiers: public

net.minecraft.world.entity.ai.goal.GoalSelector#addGoal(int,Goal)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/GoalSelector.java:29
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Goal

ทำงานยังไง

เรียกต่อ: add(). สร้างออบเจ็กต์: WrappedGoal.

Parameters

  • int i
  • Goal goal

ตัวอย่างใช้งาน

GoalSelector instance = ...;
Goal goal = ...;
instance.addGoal(0, goal);

net.minecraft.world.entity.ai.goal.GoalSelector#disableControlFlag(Goal.Flag)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/GoalSelector.java:118
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ disableControlFlag ตาม implementation ของ GoalSelector

ทำงานยังไง

เรียกต่อ: add().

Parameters

  • Goal.Flag flag

ตัวอย่างใช้งาน

GoalSelector instance = ...;
Goal.Flag flag = ...;
instance.disableControlFlag(flag);

net.minecraft.world.entity.ai.goal.GoalSelector#enableControlFlag(Goal.Flag)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/GoalSelector.java:122
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ enableControlFlag ตาม implementation ของ GoalSelector

ทำงานยังไง

เรียกต่อ: remove().

Parameters

  • Goal.Flag flag

ตัวอย่างใช้งาน

GoalSelector instance = ...;
Goal.Flag flag = ...;
instance.enableControlFlag(flag);

net.minecraft.world.entity.ai.goal.GoalSelector#getAvailableGoals()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/GoalSelector.java:114
  • Modifiers: public
  • Return: Set<WrappedGoal>

คืออะไร

อ่านค่า Available Goals

ทำงานยังไง

คืนค่า: this.availableGoals.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

GoalSelector instance = ...;
Set<WrappedGoal> result = instance.getAvailableGoals();

net.minecraft.world.entity.ai.goal.GoalSelector#removeAllGoals(Predicate<Goal>)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/GoalSelector.java:33
  • Modifiers: public
  • Return: void

คืออะไร

ลบ All Goals

ทำงานยังไง

เรียกต่อ: removeIf(), test(), getGoal().

Parameters

  • Predicate<Goal> predicate

ตัวอย่างใช้งาน

GoalSelector instance = ...;
Predicate<Goal> predicate = ...;
instance.removeAllGoals(predicate);

net.minecraft.world.entity.ai.goal.GoalSelector#removeGoal(Goal)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/GoalSelector.java:38
  • Modifiers: public
  • Return: void

คืออะไร

ลบ Goal

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getGoal(), isRunning(), stop(), removeIf().

Parameters

  • Goal goal

ตัวอย่างใช้งาน

GoalSelector instance = ...;
Goal goal = ...;
instance.removeGoal(goal);

net.minecraft.world.entity.ai.goal.GoalSelector#setControlFlag(Goal.Flag,boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/GoalSelector.java:126
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Control Flag

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: enableControlFlag(), disableControlFlag().

Parameters

  • Goal.Flag flag
  • boolean bl

ตัวอย่างใช้งาน

GoalSelector instance = ...;
Goal.Flag flag = ...;
instance.setControlFlag(flag, true);

net.minecraft.world.entity.ai.goal.GoalSelector#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/GoalSelector.java:68
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: get(), push(), isRunning(), goalContainsAnyFlags(), canContinueToUse(), stop(), entrySet(), removeIf().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

GoalSelector instance = ...;
instance.tick();

net.minecraft.world.entity.ai.goal.GoalSelector#tickRunningGoals(boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/GoalSelector.java:101
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick Running Goals

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: get(), push(), isRunning(), requiresUpdateEveryTick(), tick(), pop().

Parameters

  • boolean bl

ตัวอย่างใช้งาน

GoalSelector instance = ...;
instance.tickRunningGoals(true);

GolemRandomStrollInVillageGoal

  • Full name: net.minecraft.world.entity.ai.goal.GolemRandomStrollInVillageGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/GolemRandomStrollInVillageGoal.java
  • Type: class
  • Modifiers: public
  • Extends: RandomStrollGoal

net.minecraft.world.entity.ai.goal.GolemRandomStrollInVillageGoal#getPosition()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/GolemRandomStrollInVillageGoal.java:27
  • Modifiers: protected
  • Return: Vec3

คืออะไร

อ่านค่า Position

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: level(), nextFloat(), getPositionTowardsAnywhere(), getPositionTowardsVillagerWhoWantsGolem(), getPositionTowardsPoi(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected Vec3 getPosition() {
    return super.getPosition();
}

net.minecraft.world.entity.ai.goal.GolemRandomStrollInVillageGoal#GolemRandomStrollInVillageGoal(PathfinderMob,double)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/GolemRandomStrollInVillageGoal.java:23
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ GolemRandomStrollInVillageGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • PathfinderMob pathfinderMob
  • double d

ตัวอย่างใช้งาน

PathfinderMob pathfinderMob = ...;
GolemRandomStrollInVillageGoal instance = new GolemRandomStrollInVillageGoal(pathfinderMob, 0.0D);

InteractGoal

  • Full name: net.minecraft.world.entity.ai.goal.InteractGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/InteractGoal.java
  • Type: class
  • Modifiers: public
  • Extends: LookAtPlayerGoal

net.minecraft.world.entity.ai.goal.InteractGoal#InteractGoal(Mob,Class<? extends LivingEntity>,float)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/InteractGoal.java:8
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ InteractGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

เรียกต่อ: setFlags(), of().

Parameters

  • Mob mob
  • Class<? extends LivingEntity> class_
  • float f

ตัวอย่างใช้งาน

Mob mob = ...;
Class<? extends LivingEntity> class_ = ...;
InteractGoal instance = new InteractGoal(mob, class_, 0.0F);

net.minecraft.world.entity.ai.goal.InteractGoal#InteractGoal(Mob,Class<? extends LivingEntity>,float,float)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/InteractGoal.java:13
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ InteractGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

เรียกต่อ: setFlags(), of().

Parameters

  • Mob mob
  • Class<? extends LivingEntity> class_
  • float f
  • float g

ตัวอย่างใช้งาน

Mob mob = ...;
Class<? extends LivingEntity> class_ = ...;
InteractGoal instance = new InteractGoal(mob, class_, 0.0F, 0.0F);

JumpGoal

  • Full name: net.minecraft.world.entity.ai.goal.JumpGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/JumpGoal.java
  • Type: class
  • Modifiers: public abstract
  • Extends: Goal

net.minecraft.world.entity.ai.goal.JumpGoal#JumpGoal()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/JumpGoal.java:6
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ JumpGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

เรียกต่อ: setFlags(), of().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

JumpGoal instance = new JumpGoal();

LandOnOwnersShoulderGoal

  • Full name: net.minecraft.world.entity.ai.goal.LandOnOwnersShoulderGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/LandOnOwnersShoulderGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.LandOnOwnersShoulderGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/LandOnOwnersShoulderGoal.java:15
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

เรียกต่อ: getOwner(), isSpectator(), getAbilities(), isInWater(), isOrderedToSit(), canSitOnShoulder(). คืนค่า: !this.entity.isOrderedToSit() && bl && this.entity.canSitOnShoulder().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

LandOnOwnersShoulderGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.LandOnOwnersShoulderGoal#isInterruptable()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/LandOnOwnersShoulderGoal.java:26
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Interruptable

ทำงานยังไง

คืนค่า: !this.isSittingOnShoulder.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

LandOnOwnersShoulderGoal instance = ...;
boolean result = instance.isInterruptable();

net.minecraft.world.entity.ai.goal.LandOnOwnersShoulderGoal#LandOnOwnersShoulderGoal(ShoulderRidingEntity)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/LandOnOwnersShoulderGoal.java:11
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ LandOnOwnersShoulderGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: entity.

Parameters

  • ShoulderRidingEntity shoulderRidingEntity

ตัวอย่างใช้งาน

ShoulderRidingEntity shoulderRidingEntity = ...;
LandOnOwnersShoulderGoal instance = new LandOnOwnersShoulderGoal(shoulderRidingEntity);

net.minecraft.world.entity.ai.goal.LandOnOwnersShoulderGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/LandOnOwnersShoulderGoal.java:31
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

แก้ state: owner, isSittingOnShoulder. เรียกต่อ: getOwner().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

LandOnOwnersShoulderGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.LandOnOwnersShoulderGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/LandOnOwnersShoulderGoal.java:37
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: isSittingOnShoulder. เรียกต่อ: isInSittingPose(), isLeashed(), getBoundingBox(), intersects(), setEntityOnShoulder().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

LandOnOwnersShoulderGoal instance = ...;
instance.tick();

LeapAtTargetGoal

  • Full name: net.minecraft.world.entity.ai.goal.LeapAtTargetGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/LeapAtTargetGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.LeapAtTargetGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/LeapAtTargetGoal.java:38
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

เรียกต่อ: onGround(). คืนค่า: !this.mob.onGround().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

LeapAtTargetGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.LeapAtTargetGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/LeapAtTargetGoal.java:19
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: target. เรียกต่อ: hasControllingPassenger(), getTarget(), distanceToSqr(), onGround(), getRandom(), nextInt(), reducedTickDelay(). มีจุด return อย่างน้อย 4 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

LeapAtTargetGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.LeapAtTargetGoal#LeapAtTargetGoal(Mob,float)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/LeapAtTargetGoal.java:13
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ LeapAtTargetGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: mob, yd. เรียกต่อ: setFlags(), of().

Parameters

  • Mob mob
  • float f

ตัวอย่างใช้งาน

Mob mob = ...;
LeapAtTargetGoal instance = new LeapAtTargetGoal(mob, 0.0F);

net.minecraft.world.entity.ai.goal.LeapAtTargetGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/LeapAtTargetGoal.java:43
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getDeltaMovement(), getX(), getZ(), lengthSqr(), normalize(), scale(), add(), setDeltaMovement(). สร้างออบเจ็กต์: Vec3.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

LeapAtTargetGoal instance = ...;
instance.start();

LlamaFollowCaravanGoal

  • Full name: net.minecraft.world.entity.ai.goal.LlamaFollowCaravanGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/LlamaFollowCaravanGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.LlamaFollowCaravanGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/LlamaFollowCaravanGoal.java:76
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: speedModifier, distCheckCounter. เรียกต่อ: inCaravan(), getCaravanHead(), isAlive(), firstIsLeashed(), distanceToSqr(), reducedTickDelay(). มีจุด return อย่างน้อย 4 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

LlamaFollowCaravanGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.LlamaFollowCaravanGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/LlamaFollowCaravanGoal.java:23
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: isLeashed(), inCaravan(), level(), getEntities(), getBoundingBox(), inflate(), getType(), hasCaravanTail(). มีจุด return อย่างน้อย 6 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

LlamaFollowCaravanGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.LlamaFollowCaravanGoal#LlamaFollowCaravanGoal(Llama,double)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/LlamaFollowCaravanGoal.java:17
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ LlamaFollowCaravanGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: llama, speedModifier. เรียกต่อ: setFlags(), of().

Parameters

  • Llama llama
  • double d

ตัวอย่างใช้งาน

Llama llama = ...;
LlamaFollowCaravanGoal instance = new LlamaFollowCaravanGoal(llama, 0.0D);

net.minecraft.world.entity.ai.goal.LlamaFollowCaravanGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/LlamaFollowCaravanGoal.java:102
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

แก้ state: speedModifier. เรียกต่อ: leaveCaravan().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

LlamaFollowCaravanGoal instance = ...;
instance.stop();

net.minecraft.world.entity.ai.goal.LlamaFollowCaravanGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/LlamaFollowCaravanGoal.java:108
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: inCaravan(), getLeashHolder(), getCaravanHead(), distanceTo(), getX(), getY(), getZ(), normalize(). สร้างออบเจ็กต์: Vec3.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

LlamaFollowCaravanGoal instance = ...;
instance.tick();

LookAtPlayerGoal

  • Full name: net.minecraft.world.entity.ai.goal.LookAtPlayerGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/LookAtPlayerGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.LookAtPlayerGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/LookAtPlayerGoal.java:76
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isAlive(), distanceToSqr(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

LookAtPlayerGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.LookAtPlayerGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/LookAtPlayerGoal.java:49
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: lookAt, lookAtType. เรียกต่อ: getRandom(), nextFloat(), getTarget(), getServerLevel(), getNearestPlayer(), getX(), getEyeY(), getZ(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

LookAtPlayerGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.LookAtPlayerGoal#LookAtPlayerGoal(Mob,Class<? extends LivingEntity>,float)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/LookAtPlayerGoal.java:26
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ LookAtPlayerGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • Mob mob
  • Class<? extends LivingEntity> class_
  • float f

ตัวอย่างใช้งาน

Mob mob = ...;
Class<? extends LivingEntity> class_ = ...;
LookAtPlayerGoal instance = new LookAtPlayerGoal(mob, class_, 0.0F);

net.minecraft.world.entity.ai.goal.LookAtPlayerGoal#LookAtPlayerGoal(Mob,Class<? extends LivingEntity>,float,float)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/LookAtPlayerGoal.java:30
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ LookAtPlayerGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • Mob mob
  • Class<? extends LivingEntity> class_
  • float f
  • float g

ตัวอย่างใช้งาน

Mob mob = ...;
Class<? extends LivingEntity> class_ = ...;
LookAtPlayerGoal instance = new LookAtPlayerGoal(mob, class_, 0.0F, 0.0F);

net.minecraft.world.entity.ai.goal.LookAtPlayerGoal#LookAtPlayerGoal(Mob,Class<? extends LivingEntity>,float,float,boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/LookAtPlayerGoal.java:34
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ LookAtPlayerGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: mob, lookAtType, lookDistance, probability, onlyHorizontal, lookAtContext. เรียกต่อ: setFlags(), of(), notRiding(), forNonCombat(), range(), selector(), test().

Parameters

  • Mob mob
  • Class<? extends LivingEntity> class_
  • float f
  • float g
  • boolean bl

ตัวอย่างใช้งาน

Mob mob = ...;
Class<? extends LivingEntity> class_ = ...;
LookAtPlayerGoal instance = new LookAtPlayerGoal(mob, class_, 0.0F, 0.0F, true);

net.minecraft.world.entity.ai.goal.LookAtPlayerGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/LookAtPlayerGoal.java:85
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

แก้ state: lookTime. เรียกต่อ: adjustedTickDelay(), getRandom(), nextInt().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

LookAtPlayerGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.LookAtPlayerGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/LookAtPlayerGoal.java:90
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

แก้ state: lookAt.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

LookAtPlayerGoal instance = ...;
instance.stop();

net.minecraft.world.entity.ai.goal.LookAtPlayerGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/LookAtPlayerGoal.java:95
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: lookTime. เรียกต่อ: isAlive(), getEyeY(), getLookControl(), setLookAt(), getX(), getZ().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

LookAtPlayerGoal instance = ...;
instance.tick();

LookAtTradingPlayerGoal

  • Full name: net.minecraft.world.entity.ai.goal.LookAtTradingPlayerGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/LookAtTradingPlayerGoal.java
  • Type: class
  • Modifiers: public
  • Extends: LookAtPlayerGoal

net.minecraft.world.entity.ai.goal.LookAtTradingPlayerGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/LookAtTradingPlayerGoal.java:14
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: lookAt. เรียกต่อ: isTrading(), getTradingPlayer(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

LookAtTradingPlayerGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.LookAtTradingPlayerGoal#LookAtTradingPlayerGoal(AbstractVillager)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/LookAtTradingPlayerGoal.java:9
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ LookAtTradingPlayerGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: villager.

Parameters

  • AbstractVillager abstractVillager

ตัวอย่างใช้งาน

AbstractVillager abstractVillager = ...;
LookAtTradingPlayerGoal instance = new LookAtTradingPlayerGoal(abstractVillager);

MeleeAttackGoal

  • Full name: net.minecraft.world.entity.ai.goal.MeleeAttackGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/MeleeAttackGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.MeleeAttackGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MeleeAttackGoal.java:53
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getTarget(), isAlive(), getNavigation(), isDone(), isWithinRestriction(), blockPosition(), isSpectator(), isCreative(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

MeleeAttackGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.MeleeAttackGoal#canPerformAttack(LivingEntity)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MeleeAttackGoal.java:145
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Perform Attack

ทำงานยังไง

เรียกต่อ: isTimeToAttack(), isWithinMeleeAttackRange(), getSensing(), hasLineOfSight(). คืนค่า: this.isTimeToAttack() && this.mob.isWithinMeleeAttackRange(livingEntity) && this.mob.getSensing().hasLineOfSight(livingEntity).

Parameters

  • LivingEntity livingEntity

ตัวอย่างใช้งาน

LivingEntity livingEntity = ...;
@Override
protected boolean canPerformAttack(LivingEntity livingEntity) {
    return super.canPerformAttack(livingEntity);
}

net.minecraft.world.entity.ai.goal.MeleeAttackGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MeleeAttackGoal.java:32
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: lastCanUseCheck, path. เรียกต่อ: level(), getGameTime(), getTarget(), isAlive(), getNavigation(), createPath(), isWithinMeleeAttackRange(). มีจุด return อย่างน้อย 4 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

MeleeAttackGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.MeleeAttackGoal#checkAndPerformAttack(LivingEntity)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MeleeAttackGoal.java:129
  • Modifiers: protected
  • Return: void

คืออะไร

ตรวจสอบ And Perform Attack

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: canPerformAttack(), resetAttackCooldown(), swing(), doHurtTarget(), getServerLevel().

Parameters

  • LivingEntity livingEntity

ตัวอย่างใช้งาน

LivingEntity livingEntity = ...;
@Override
protected void checkAndPerformAttack(LivingEntity livingEntity) {
    super.checkAndPerformAttack(livingEntity);
}

net.minecraft.world.entity.ai.goal.MeleeAttackGoal#getAttackInterval()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MeleeAttackGoal.java:153
  • Modifiers: protected
  • Return: int

คืออะไร

อ่านค่า Attack Interval

ทำงานยังไง

เรียกต่อ: adjustedTickDelay(). คืนค่า: this.adjustedTickDelay(20).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected int getAttackInterval() {
    return super.getAttackInterval();
}

net.minecraft.world.entity.ai.goal.MeleeAttackGoal#getTicksUntilNextAttack()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MeleeAttackGoal.java:149
  • Modifiers: protected
  • Return: int

คืออะไร

อ่านค่า Ticks Until Next Attack

ทำงานยังไง

คืนค่า: this.ticksUntilNextAttack.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected int getTicksUntilNextAttack() {
    return super.getTicksUntilNextAttack();
}

net.minecraft.world.entity.ai.goal.MeleeAttackGoal#isTimeToAttack()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MeleeAttackGoal.java:141
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Time To Attack

ทำงานยังไง

คืนค่า: this.ticksUntilNextAttack <= 0.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected boolean isTimeToAttack() {
    return super.isTimeToAttack();
}

net.minecraft.world.entity.ai.goal.MeleeAttackGoal#MeleeAttackGoal(PathfinderMob,double,boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MeleeAttackGoal.java:25
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ MeleeAttackGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: mob, speedModifier, followingTargetEvenIfNotSeen. เรียกต่อ: setFlags(), of().

Parameters

  • PathfinderMob pathfinderMob
  • double d
  • boolean bl

ตัวอย่างใช้งาน

PathfinderMob pathfinderMob = ...;
MeleeAttackGoal instance = new MeleeAttackGoal(pathfinderMob, 0.0D, true);

net.minecraft.world.entity.ai.goal.MeleeAttackGoal#requiresUpdateEveryTick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MeleeAttackGoal.java:88
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ requiresUpdateEveryTick ตาม implementation ของ MeleeAttackGoal

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

MeleeAttackGoal instance = ...;
boolean result = instance.requiresUpdateEveryTick();

net.minecraft.world.entity.ai.goal.MeleeAttackGoal#resetAttackCooldown()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MeleeAttackGoal.java:137
  • Modifiers: protected
  • Return: void

คืออะไร

รีเซ็ต Attack Cooldown

ทำงานยังไง

แก้ state: ticksUntilNextAttack. เรียกต่อ: adjustedTickDelay().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected void resetAttackCooldown() {
    super.resetAttackCooldown();
}

net.minecraft.world.entity.ai.goal.MeleeAttackGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MeleeAttackGoal.java:69
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

แก้ state: ticksUntilNextPathRecalculation, ticksUntilNextAttack. เรียกต่อ: getNavigation(), moveTo(), setAggressive().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

MeleeAttackGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.MeleeAttackGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MeleeAttackGoal.java:77
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getTarget(), test(), setTarget(), setAggressive(), getNavigation().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

MeleeAttackGoal instance = ...;
instance.stop();

net.minecraft.world.entity.ai.goal.MeleeAttackGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MeleeAttackGoal.java:93
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: ticksUntilNextPathRecalculation, pathedTargetX, pathedTargetY, pathedTargetZ, ticksUntilNextAttack. เรียกต่อ: getTarget(), getLookControl(), setLookAt(), max(), getSensing(), hasLineOfSight(), distanceToSqr(), getRandom().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

MeleeAttackGoal instance = ...;
instance.tick();

MoveBackToVillageGoal

  • Full name: net.minecraft.world.entity.ai.goal.MoveBackToVillageGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/MoveBackToVillageGoal.java
  • Type: class
  • Modifiers: public
  • Extends: RandomStrollGoal

net.minecraft.world.entity.ai.goal.MoveBackToVillageGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveBackToVillageGoal.java:20
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

เรียกต่อ: level(), blockPosition(), isVillage(). คืนค่า: serverLevel.isVillage(blockPos) ? false : super.canUse().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

MoveBackToVillageGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.MoveBackToVillageGoal#getPosition()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveBackToVillageGoal.java:27
  • Modifiers: protected
  • Return: Vec3

คืออะไร

อ่านค่า Position

ทำงานยังไง

เรียกต่อ: level(), blockPosition(), of(), findSectionClosestToVillage(), getPosTowards(), atBottomCenterOf(), center(). คืนค่า: sectionPos2 != sectionPos ? DefaultRandomPos.getPosTowards(this.mob, 10, 7, Vec3.atBottomCenterOf(sectionPos2.center()), (float) (Math.PI / 2)) : null.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected Vec3 getPosition() {
    return super.getPosition();
}

net.minecraft.world.entity.ai.goal.MoveBackToVillageGoal#MoveBackToVillageGoal(PathfinderMob,double,boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveBackToVillageGoal.java:16
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ MoveBackToVillageGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • PathfinderMob pathfinderMob
  • double d
  • boolean bl

ตัวอย่างใช้งาน

PathfinderMob pathfinderMob = ...;
MoveBackToVillageGoal instance = new MoveBackToVillageGoal(pathfinderMob, 0.0D, true);

MoveThroughVillageGoal

  • Full name: net.minecraft.world.entity.ai.goal.MoveThroughVillageGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/MoveThroughVillageGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.MoveThroughVillageGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveThroughVillageGoal.java:119
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

เรียกต่อ: getNavigation(), isDone(), closerToCenterThan(), position(), getBbWidth(). คืนค่า: this.mob.getNavigation().isDone() ? false : !this.poiPos.closerToCenterThan(this.mob.position(), this.mob.getBbWidth() + this.distanceToPoi).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

MoveThroughVillageGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.MoveThroughVillageGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveThroughVillageGoal.java:47
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: poiPos, path. เรียกต่อ: hasGroundPathNavigation(), updateVisited(), level(), isDay(), blockPosition(), isCloseToVillage(), getPos(), isVillage(). สร้างออบเจ็กต์: BlockPos. มีจุด return อย่างน้อย 10 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

MoveThroughVillageGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.MoveThroughVillageGoal#MoveThroughVillageGoal(PathfinderMob,double,boolean,int,BooleanSupplier)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveThroughVillageGoal.java:35
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ MoveThroughVillageGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: mob, speedModifier, onlyAtNight, distanceToPoi, canDealWithDoors. เรียกต่อ: setFlags(), of(), hasGroundPathNavigation(). สร้างออบเจ็กต์: IllegalArgumentException.

Parameters

  • PathfinderMob pathfinderMob
  • double d
  • boolean bl
  • int i
  • BooleanSupplier booleanSupplier

ตัวอย่างใช้งาน

PathfinderMob pathfinderMob = ...;
BooleanSupplier booleanSupplier = ...;
MoveThroughVillageGoal instance = new MoveThroughVillageGoal(pathfinderMob, 0.0D, true, 0, booleanSupplier);

net.minecraft.world.entity.ai.goal.MoveThroughVillageGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveThroughVillageGoal.java:124
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

เรียกต่อ: getNavigation(), moveTo().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

MoveThroughVillageGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.MoveThroughVillageGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveThroughVillageGoal.java:129
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getNavigation(), isDone(), closerToCenterThan(), position(), add().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

MoveThroughVillageGoal instance = ...;
instance.stop();

MoveToBlockGoal

  • Full name: net.minecraft.world.entity.ai.goal.MoveToBlockGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/MoveToBlockGoal.java
  • Type: class
  • Modifiers: public abstract
  • Extends: Goal

net.minecraft.world.entity.ai.goal.MoveToBlockGoal#acceptedDistance()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java:67
  • Modifiers: public
  • Return: double

คืออะไร

ดำเนินการ acceptedDistance ตาม implementation ของ MoveToBlockGoal

ทำงานยังไง

คืนค่า: 1.0.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

MoveToBlockGoal instance = ...;
double result = instance.acceptedDistance();

net.minecraft.world.entity.ai.goal.MoveToBlockGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java:51
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

เรียกต่อ: isValidTarget(), level(). คืนค่า: this.tryTicks >= -this.maxStayTicks && this.tryTicks <= 1200 && this.isValidTarget(this.mob.level(), this.blockPos).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

MoveToBlockGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.MoveToBlockGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java:36
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: nextStartTick. เรียกต่อ: nextStartTick(), findNearestBlock(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

MoveToBlockGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.MoveToBlockGoal#findNearestBlock()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java:103
  • Modifiers: protected
  • Return: boolean

คืออะไร

ค้นหา Nearest Block

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: blockPos. เรียกต่อ: blockPosition(), MutableBlockPos(), setWithOffset(), isWithinRestriction(), isValidTarget(), level(). สร้างออบเจ็กต์: BlockPos.MutableBlockPos. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected boolean findNearestBlock() {
    return super.findNearestBlock();
}

net.minecraft.world.entity.ai.goal.MoveToBlockGoal#getMoveToTarget()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java:71
  • Modifiers: protected
  • Return: BlockPos

คืออะไร

อ่านค่า Move To Target

ทำงานยังไง

เรียกต่อ: above(). คืนค่า: this.blockPos.above().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected BlockPos getMoveToTarget() {
    return super.getMoveToTarget();
}

net.minecraft.world.entity.ai.goal.MoveToBlockGoal#isReachedTarget()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java:99
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Reached Target

ทำงานยังไง

คืนค่า: this.reachedTarget.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected boolean isReachedTarget() {
    return super.isReachedTarget();
}

net.minecraft.world.entity.ai.goal.MoveToBlockGoal#isValidTarget(LevelReader,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java:126
  • Modifiers: protected abstract
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Valid Target

ทำงานยังไง

ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง

Parameters

  • LevelReader levelReader
  • BlockPos blockPos

ตัวอย่างใช้งาน

LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean isValidTarget(LevelReader levelReader, BlockPos blockPos) {
    return super.isValidTarget(levelReader, blockPos);
}

net.minecraft.world.entity.ai.goal.MoveToBlockGoal#moveMobToBlock()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java:63
  • Modifiers: protected
  • Return: void

คืออะไร

เคลื่อนที่ Mob To Block

ทำงานยังไง

เรียกต่อ: getNavigation(), moveTo(), getX(), getY(), getZ().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected void moveMobToBlock() {
    super.moveMobToBlock();
}

net.minecraft.world.entity.ai.goal.MoveToBlockGoal#MoveToBlockGoal(PathfinderMob,double,int)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java:23
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ MoveToBlockGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • PathfinderMob pathfinderMob
  • double d
  • int i

ตัวอย่างใช้งาน

PathfinderMob pathfinderMob = ...;
MoveToBlockGoal instance = new MoveToBlockGoal(pathfinderMob, 0.0D, 0);

net.minecraft.world.entity.ai.goal.MoveToBlockGoal#MoveToBlockGoal(PathfinderMob,double,int,int)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java:27
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ MoveToBlockGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: mob, speedModifier, searchRange, verticalSearchStart, verticalSearchRange. เรียกต่อ: setFlags(), of().

Parameters

  • PathfinderMob pathfinderMob
  • double d
  • int i
  • int j

ตัวอย่างใช้งาน

PathfinderMob pathfinderMob = ...;
MoveToBlockGoal instance = new MoveToBlockGoal(pathfinderMob, 0.0D, 0, 0);

net.minecraft.world.entity.ai.goal.MoveToBlockGoal#nextStartTick(PathfinderMob)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java:47
  • Modifiers: protected
  • Return: int

คืออะไร

ดำเนินการ nextStartTick ตาม implementation ของ MoveToBlockGoal

ทำงานยังไง

เรียกต่อ: reducedTickDelay(), getRandom(), nextInt(). คืนค่า: reducedTickDelay(200 + pathfinderMob.getRandom().nextInt(200)).

Parameters

  • PathfinderMob pathfinderMob

ตัวอย่างใช้งาน

PathfinderMob pathfinderMob = ...;
@Override
protected int nextStartTick(PathfinderMob pathfinderMob) {
    return super.nextStartTick(pathfinderMob);
}

net.minecraft.world.entity.ai.goal.MoveToBlockGoal#requiresUpdateEveryTick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java:75
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ requiresUpdateEveryTick ตาม implementation ของ MoveToBlockGoal

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

MoveToBlockGoal instance = ...;
boolean result = instance.requiresUpdateEveryTick();

net.minecraft.world.entity.ai.goal.MoveToBlockGoal#shouldRecalculatePath()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java:95
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Recalculate Path

ทำงานยังไง

คืนค่า: this.tryTicks % 40 == 0.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

MoveToBlockGoal instance = ...;
boolean result = instance.shouldRecalculatePath();

net.minecraft.world.entity.ai.goal.MoveToBlockGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java:56
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

แก้ state: tryTicks, maxStayTicks. เรียกต่อ: moveMobToBlock(), getRandom(), nextInt().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

MoveToBlockGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.MoveToBlockGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java:80
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: reachedTarget, tryTicks. เรียกต่อ: getMoveToTarget(), closerToCenterThan(), position(), acceptedDistance(), shouldRecalculatePath(), getNavigation(), moveTo(), getX().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

MoveToBlockGoal instance = ...;
instance.tick();

MoveTowardsRestrictionGoal

  • Full name: net.minecraft.world.entity.ai.goal.MoveTowardsRestrictionGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/MoveTowardsRestrictionGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.MoveTowardsRestrictionGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveTowardsRestrictionGoal.java:38
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

เรียกต่อ: getNavigation(), isDone(). คืนค่า: !this.mob.getNavigation().isDone().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

MoveTowardsRestrictionGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.MoveTowardsRestrictionGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveTowardsRestrictionGoal.java:21
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: wantedX, wantedY, wantedZ. เรียกต่อ: isWithinRestriction(), getPosTowards(), atBottomCenterOf(), getRestrictCenter(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

MoveTowardsRestrictionGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.MoveTowardsRestrictionGoal#MoveTowardsRestrictionGoal(PathfinderMob,double)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveTowardsRestrictionGoal.java:15
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ MoveTowardsRestrictionGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: mob, speedModifier. เรียกต่อ: setFlags(), of().

Parameters

  • PathfinderMob pathfinderMob
  • double d

ตัวอย่างใช้งาน

PathfinderMob pathfinderMob = ...;
MoveTowardsRestrictionGoal instance = new MoveTowardsRestrictionGoal(pathfinderMob, 0.0D);

net.minecraft.world.entity.ai.goal.MoveTowardsRestrictionGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveTowardsRestrictionGoal.java:43
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

เรียกต่อ: getNavigation(), moveTo().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

MoveTowardsRestrictionGoal instance = ...;
instance.start();

MoveTowardsTargetGoal

  • Full name: net.minecraft.world.entity.ai.goal.MoveTowardsTargetGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/MoveTowardsTargetGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.MoveTowardsTargetGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveTowardsTargetGoal.java:49
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

เรียกต่อ: getNavigation(), isDone(), isAlive(), distanceToSqr(). คืนค่า: !this.mob.getNavigation().isDone() && this.target.isAlive() && this.target.distanceToSqr(this.mob) < this.within * this.within.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

MoveTowardsTargetGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.MoveTowardsTargetGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveTowardsTargetGoal.java:27
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: target, wantedX, wantedY, wantedZ. เรียกต่อ: getTarget(), distanceToSqr(), getPosTowards(), position(). มีจุด return อย่างน้อย 4 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

MoveTowardsTargetGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.MoveTowardsTargetGoal#MoveTowardsTargetGoal(PathfinderMob,double,float)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveTowardsTargetGoal.java:20
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ MoveTowardsTargetGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: mob, speedModifier, within. เรียกต่อ: setFlags(), of().

Parameters

  • PathfinderMob pathfinderMob
  • double d
  • float f

ตัวอย่างใช้งาน

PathfinderMob pathfinderMob = ...;
MoveTowardsTargetGoal instance = new MoveTowardsTargetGoal(pathfinderMob, 0.0D, 0.0F);

net.minecraft.world.entity.ai.goal.MoveTowardsTargetGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveTowardsTargetGoal.java:59
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

เรียกต่อ: getNavigation(), moveTo().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

MoveTowardsTargetGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.MoveTowardsTargetGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/MoveTowardsTargetGoal.java:54
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

แก้ state: target.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

MoveTowardsTargetGoal instance = ...;
instance.stop();

OcelotAttackGoal

  • Full name: net.minecraft.world.entity.ai.goal.OcelotAttackGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/OcelotAttackGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.OcelotAttackGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/OcelotAttackGoal.java:28
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isAlive(), distanceToSqr(), getNavigation(), isDone(), canUse(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

OcelotAttackGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.OcelotAttackGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/OcelotAttackGoal.java:17
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: target. เรียกต่อ: getTarget(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

OcelotAttackGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.OcelotAttackGoal#OcelotAttackGoal(Mob)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/OcelotAttackGoal.java:12
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ OcelotAttackGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: mob. เรียกต่อ: setFlags(), of().

Parameters

  • Mob mob

ตัวอย่างใช้งาน

Mob mob = ...;
OcelotAttackGoal instance = new OcelotAttackGoal(mob);

net.minecraft.world.entity.ai.goal.OcelotAttackGoal#requiresUpdateEveryTick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/OcelotAttackGoal.java:43
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ requiresUpdateEveryTick ตาม implementation ของ OcelotAttackGoal

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

OcelotAttackGoal instance = ...;
boolean result = instance.requiresUpdateEveryTick();

net.minecraft.world.entity.ai.goal.OcelotAttackGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/OcelotAttackGoal.java:37
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

แก้ state: target. เรียกต่อ: getNavigation().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

OcelotAttackGoal instance = ...;
instance.stop();

net.minecraft.world.entity.ai.goal.OcelotAttackGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/OcelotAttackGoal.java:48
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: attackTime. เรียกต่อ: getLookControl(), setLookAt(), getBbWidth(), distanceToSqr(), getX(), getY(), getZ(), getNavigation().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

OcelotAttackGoal instance = ...;
instance.tick();

OfferFlowerGoal

  • Full name: net.minecraft.world.entity.ai.goal.OfferFlowerGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/OfferFlowerGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.OfferFlowerGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/OfferFlowerGoal.java:43
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

คืนค่า: this.tick > 0.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

OfferFlowerGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.OfferFlowerGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/OfferFlowerGoal.java:20
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: villager. เรียกต่อ: level(), isDay(), getRandom(), nextInt(), getServerLevel(), getNearestEntity(), getX(), getY(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

OfferFlowerGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.OfferFlowerGoal#OfferFlowerGoal(IronGolem)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/OfferFlowerGoal.java:15
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ OfferFlowerGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: golem. เรียกต่อ: setFlags(), of().

Parameters

  • IronGolem ironGolem

ตัวอย่างใช้งาน

IronGolem ironGolem = ...;
OfferFlowerGoal instance = new OfferFlowerGoal(ironGolem);

net.minecraft.world.entity.ai.goal.OfferFlowerGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/OfferFlowerGoal.java:48
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

แก้ state: tick. เรียกต่อ: adjustedTickDelay(), offerFlower().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

OfferFlowerGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.OfferFlowerGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/OfferFlowerGoal.java:54
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

แก้ state: villager. เรียกต่อ: offerFlower().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

OfferFlowerGoal instance = ...;
instance.stop();

net.minecraft.world.entity.ai.goal.OfferFlowerGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/OfferFlowerGoal.java:60
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

แก้ state: tick. เรียกต่อ: getLookControl(), setLookAt().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

OfferFlowerGoal instance = ...;
instance.tick();

OpenDoorGoal

  • Full name: net.minecraft.world.entity.ai.goal.OpenDoorGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/OpenDoorGoal.java
  • Type: class
  • Modifiers: public
  • Extends: DoorInteractGoal

net.minecraft.world.entity.ai.goal.OpenDoorGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/OpenDoorGoal.java:15
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

คืนค่า: this.closeDoor && this.forgetTime > 0 && super.canContinueToUse().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

OpenDoorGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.OpenDoorGoal#OpenDoorGoal(Mob,boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/OpenDoorGoal.java:9
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ OpenDoorGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: mob, closeDoor.

Parameters

  • Mob mob
  • boolean bl

ตัวอย่างใช้งาน

Mob mob = ...;
OpenDoorGoal instance = new OpenDoorGoal(mob, true);

net.minecraft.world.entity.ai.goal.OpenDoorGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/OpenDoorGoal.java:20
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

แก้ state: forgetTime. เรียกต่อ: setOpen().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

OpenDoorGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.OpenDoorGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/OpenDoorGoal.java:26
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

เรียกต่อ: setOpen().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

OpenDoorGoal instance = ...;
instance.stop();

net.minecraft.world.entity.ai.goal.OpenDoorGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/OpenDoorGoal.java:31
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

แก้ state: forgetTime.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

OpenDoorGoal instance = ...;
instance.tick();

PanicGoal

  • Full name: net.minecraft.world.entity.ai.goal.PanicGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/PanicGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.PanicGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/PanicGoal.java:92
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

เรียกต่อ: getNavigation(), isDone(). คืนค่า: !this.mob.getNavigation().isDone().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

PanicGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.PanicGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/PanicGoal.java:42
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: posX, posY, posZ. เรียกต่อ: shouldPanic(), isOnFire(), lookForWater(), level(), getX(), getY(), getZ(), findRandomPosition(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

PanicGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.PanicGoal#findRandomPosition()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/PanicGoal.java:65
  • Modifiers: protected
  • Return: boolean

คืออะไร

ค้นหา Random Position

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: posX, posY, posZ. เรียกต่อ: getPos(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected boolean findRandomPosition() {
    return super.findRandomPosition();
}

net.minecraft.world.entity.ai.goal.PanicGoal#isRunning()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/PanicGoal.java:77
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Running

ทำงานยังไง

คืนค่า: this.isRunning.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

PanicGoal instance = ...;
boolean result = instance.isRunning();

net.minecraft.world.entity.ai.goal.PanicGoal#lookForWater(BlockGetter,Entity,int)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/PanicGoal.java:97
  • Modifiers: protected
  • Return: BlockPos

คืออะไร

ดำเนินการ lookForWater ตาม implementation ของ PanicGoal

ทำงานยังไง

เรียกต่อ: blockPosition(), getBlockState(), getCollisionShape(), isEmpty(), findClosestMatch(), getFluidState(), is(), orElse().

Parameters

  • BlockGetter blockGetter
  • Entity entity
  • int i

ตัวอย่างใช้งาน

BlockGetter blockGetter = ...;
Entity entity = ...;
@Override
protected BlockPos lookForWater(BlockGetter blockGetter, Entity entity, int i) {
    return super.lookForWater(blockGetter, entity, i);
}

net.minecraft.world.entity.ai.goal.PanicGoal#PanicGoal(PathfinderMob,double)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/PanicGoal.java:27
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ PanicGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • PathfinderMob pathfinderMob
  • double d

ตัวอย่างใช้งาน

PathfinderMob pathfinderMob = ...;
PanicGoal instance = new PanicGoal(pathfinderMob, 0.0D);

net.minecraft.world.entity.ai.goal.PanicGoal#PanicGoal(PathfinderMob,double,Function<PathfinderMob, TagKey<DamageType>>)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/PanicGoal.java:35
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ PanicGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: mob, speedModifier, panicCausingDamageTypes. เรียกต่อ: setFlags(), of().

Parameters

  • PathfinderMob pathfinderMob
  • double d
  • Function<PathfinderMob, TagKey<DamageType>> function

ตัวอย่างใช้งาน

PathfinderMob pathfinderMob = ...;
Function<PathfinderMob, TagKey<DamageType>> function = ...;
PanicGoal instance = new PanicGoal(pathfinderMob, 0.0D, function);

net.minecraft.world.entity.ai.goal.PanicGoal#PanicGoal(PathfinderMob,double,TagKey<DamageType>)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/PanicGoal.java:31
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ PanicGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • PathfinderMob pathfinderMob
  • double d
  • TagKey<DamageType> tagKey

ตัวอย่างใช้งาน

PathfinderMob pathfinderMob = ...;
TagKey<DamageType> tagKey = ...;
PanicGoal instance = new PanicGoal(pathfinderMob, 0.0D, tagKey);

net.minecraft.world.entity.ai.goal.PanicGoal#shouldPanic()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/PanicGoal.java:61
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Panic

ทำงานยังไง

เรียกต่อ: getLastDamageSource(), is(), apply(). คืนค่า: this.mob.getLastDamageSource() != null && this.mob.getLastDamageSource().is(this.panicCausingDamageTypes.apply(this.mob)).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected boolean shouldPanic() {
    return super.shouldPanic();
}

net.minecraft.world.entity.ai.goal.PanicGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/PanicGoal.java:81
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

แก้ state: isRunning. เรียกต่อ: getNavigation(), moveTo().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

PanicGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.PanicGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/PanicGoal.java:87
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

แก้ state: isRunning.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

PanicGoal instance = ...;
instance.stop();

PathfindToRaidGoal

  • Full name: net.minecraft.world.entity.ai.goal.PathfindToRaidGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/PathfindToRaidGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.PathfindToRaidGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/PathfindToRaidGoal.java:34
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

เรียกต่อ: hasActiveRaid(), getCurrentRaid(), isOver(), level(), isVillage(), blockPosition().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

PathfindToRaidGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.PathfindToRaidGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/PathfindToRaidGoal.java:25
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

เรียกต่อ: getTarget(), hasControllingPassenger(), hasActiveRaid(), getCurrentRaid(), isOver(), level(), isVillage(), blockPosition().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

PathfindToRaidGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.PathfindToRaidGoal#PathfindToRaidGoal(T)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/PathfindToRaidGoal.java:20
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ PathfindToRaidGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: mob. เรียกต่อ: setFlags(), of().

Parameters

  • T raider

ตัวอย่างใช้งาน

T raider = ...;
PathfindToRaidGoal instance = new PathfindToRaidGoal(raider);

net.minecraft.world.entity.ai.goal.PathfindToRaidGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/PathfindToRaidGoal.java:42
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: recruitmentTick. เรียกต่อ: hasActiveRaid(), getCurrentRaid(), recruitNearby(), isPathFinding(), getPosTowards(), atBottomCenterOf(), getCenter(), getNavigation().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

PathfindToRaidGoal instance = ...;
instance.tick();

RandomLookAroundGoal

  • Full name: net.minecraft.world.entity.ai.goal.RandomLookAroundGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/RandomLookAroundGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.RandomLookAroundGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RandomLookAroundGoal.java:22
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

คืนค่า: this.lookTime >= 0.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RandomLookAroundGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.RandomLookAroundGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RandomLookAroundGoal.java:17
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

เรียกต่อ: getRandom(), nextFloat(). คืนค่า: this.mob.getRandom().nextFloat() < 0.02F.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RandomLookAroundGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.RandomLookAroundGoal#RandomLookAroundGoal(Mob)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RandomLookAroundGoal.java:12
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ RandomLookAroundGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: mob. เรียกต่อ: setFlags(), of().

Parameters

  • Mob mob

ตัวอย่างใช้งาน

Mob mob = ...;
RandomLookAroundGoal instance = new RandomLookAroundGoal(mob);

net.minecraft.world.entity.ai.goal.RandomLookAroundGoal#requiresUpdateEveryTick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RandomLookAroundGoal.java:35
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ requiresUpdateEveryTick ตาม implementation ของ RandomLookAroundGoal

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RandomLookAroundGoal instance = ...;
boolean result = instance.requiresUpdateEveryTick();

net.minecraft.world.entity.ai.goal.RandomLookAroundGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RandomLookAroundGoal.java:27
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

แก้ state: relX, relZ, lookTime. เรียกต่อ: getRandom(), nextDouble(), cos(), sin(), nextInt().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RandomLookAroundGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.RandomLookAroundGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RandomLookAroundGoal.java:40
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

แก้ state: lookTime. เรียกต่อ: getLookControl(), setLookAt(), getX(), getEyeY(), getZ().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RandomLookAroundGoal instance = ...;
instance.tick();

RandomStandGoal

  • Full name: net.minecraft.world.entity.ai.goal.RandomStandGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/RandomStandGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.RandomStandGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RandomStandGoal.java:28
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

คืนค่า: false.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RandomStandGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.RandomStandGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RandomStandGoal.java:33
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: nextStand. เรียกต่อ: getRandom(), nextInt(), resetStandInterval(), isImmobile(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RandomStandGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.RandomStandGoal#RandomStandGoal(AbstractHorse)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RandomStandGoal.java:10
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ RandomStandGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: horse. เรียกต่อ: resetStandInterval().

Parameters

  • AbstractHorse abstractHorse

ตัวอย่างใช้งาน

AbstractHorse abstractHorse = ...;
RandomStandGoal instance = new RandomStandGoal(abstractHorse);

net.minecraft.world.entity.ai.goal.RandomStandGoal#requiresUpdateEveryTick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RandomStandGoal.java:48
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ requiresUpdateEveryTick ตาม implementation ของ RandomStandGoal

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RandomStandGoal instance = ...;
boolean result = instance.requiresUpdateEveryTick();

net.minecraft.world.entity.ai.goal.RandomStandGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RandomStandGoal.java:15
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

เรียกต่อ: standIfPossible(), playStandSound().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RandomStandGoal instance = ...;
instance.start();

RandomStrollGoal

  • Full name: net.minecraft.world.entity.ai.goal.RandomStrollGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/RandomStrollGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.RandomStrollGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RandomStrollGoal.java:69
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

เรียกต่อ: getNavigation(), isDone(), hasControllingPassenger(). คืนค่า: !this.mob.getNavigation().isDone() && !this.mob.hasControllingPassenger().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RandomStrollGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.RandomStrollGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RandomStrollGoal.java:36
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: wantedX, wantedY, wantedZ, forceTrigger. เรียกต่อ: hasControllingPassenger(), getNoActionTime(), getRandom(), nextInt(), reducedTickDelay(), getPosition(). มีจุด return อย่างน้อย 5 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RandomStrollGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.RandomStrollGoal#getPosition()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RandomStrollGoal.java:64
  • Modifiers: protected
  • Return: Vec3

คืออะไร

อ่านค่า Position

ทำงานยังไง

เรียกต่อ: getPos(). คืนค่า: DefaultRandomPos.getPos(this.mob, 10, 7).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected Vec3 getPosition() {
    return super.getPosition();
}

net.minecraft.world.entity.ai.goal.RandomStrollGoal#RandomStrollGoal(PathfinderMob,double)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RandomStrollGoal.java:20
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ RandomStrollGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • PathfinderMob pathfinderMob
  • double d

ตัวอย่างใช้งาน

PathfinderMob pathfinderMob = ...;
RandomStrollGoal instance = new RandomStrollGoal(pathfinderMob, 0.0D);

net.minecraft.world.entity.ai.goal.RandomStrollGoal#RandomStrollGoal(PathfinderMob,double,int)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RandomStrollGoal.java:24
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ RandomStrollGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • PathfinderMob pathfinderMob
  • double d
  • int i

ตัวอย่างใช้งาน

PathfinderMob pathfinderMob = ...;
RandomStrollGoal instance = new RandomStrollGoal(pathfinderMob, 0.0D, 0);

net.minecraft.world.entity.ai.goal.RandomStrollGoal#RandomStrollGoal(PathfinderMob,double,int,boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RandomStrollGoal.java:28
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ RandomStrollGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: mob, speedModifier, interval, checkNoActionTime. เรียกต่อ: setFlags(), of().

Parameters

  • PathfinderMob pathfinderMob
  • double d
  • int i
  • boolean bl

ตัวอย่างใช้งาน

PathfinderMob pathfinderMob = ...;
RandomStrollGoal instance = new RandomStrollGoal(pathfinderMob, 0.0D, 0, true);

net.minecraft.world.entity.ai.goal.RandomStrollGoal#setInterval(int)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RandomStrollGoal.java:89
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Interval

ทำงานยังไง

แก้ state: interval.

Parameters

  • int i

ตัวอย่างใช้งาน

RandomStrollGoal instance = ...;
instance.setInterval(0);

net.minecraft.world.entity.ai.goal.RandomStrollGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RandomStrollGoal.java:74
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

เรียกต่อ: getNavigation(), moveTo().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RandomStrollGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.RandomStrollGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RandomStrollGoal.java:79
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

เรียกต่อ: getNavigation().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RandomStrollGoal instance = ...;
instance.stop();

net.minecraft.world.entity.ai.goal.RandomStrollGoal#trigger()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RandomStrollGoal.java:85
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ trigger ตาม implementation ของ RandomStrollGoal

ทำงานยังไง

แก้ state: forceTrigger.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RandomStrollGoal instance = ...;
instance.trigger();

RandomSwimmingGoal

  • Full name: net.minecraft.world.entity.ai.goal.RandomSwimmingGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/RandomSwimmingGoal.java
  • Type: class
  • Modifiers: public
  • Extends: RandomStrollGoal

net.minecraft.world.entity.ai.goal.RandomSwimmingGoal#getPosition()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RandomSwimmingGoal.java:13
  • Modifiers: protected
  • Return: Vec3

คืออะไร

อ่านค่า Position

ทำงานยังไง

เรียกต่อ: getRandomSwimmablePos(). คืนค่า: BehaviorUtils.getRandomSwimmablePos(this.mob, 10, 7).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected Vec3 getPosition() {
    return super.getPosition();
}

net.minecraft.world.entity.ai.goal.RandomSwimmingGoal#RandomSwimmingGoal(PathfinderMob,double,int)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RandomSwimmingGoal.java:9
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ RandomSwimmingGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • PathfinderMob pathfinderMob
  • double d
  • int i

ตัวอย่างใช้งาน

PathfinderMob pathfinderMob = ...;
RandomSwimmingGoal instance = new RandomSwimmingGoal(pathfinderMob, 0.0D, 0);

RangedAttackGoal

  • Full name: net.minecraft.world.entity.ai.goal.RangedAttackGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/RangedAttackGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.RangedAttackGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RangedAttackGoal.java:53
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

เรียกต่อ: canUse(), isAlive(), getNavigation(), isDone(). คืนค่า: this.canUse() || this.target.isAlive() && !this.mob.getNavigation().isDone().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RangedAttackGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.RangedAttackGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RangedAttackGoal.java:42
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: target. เรียกต่อ: getTarget(), isAlive(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RangedAttackGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.RangedAttackGoal#RangedAttackGoal(RangedAttackMob,double,int,float)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RangedAttackGoal.java:23
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ RangedAttackGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • RangedAttackMob rangedAttackMob
  • double d
  • int i
  • float f

ตัวอย่างใช้งาน

RangedAttackMob rangedAttackMob = ...;
RangedAttackGoal instance = new RangedAttackGoal(rangedAttackMob, 0.0D, 0, 0.0F);

net.minecraft.world.entity.ai.goal.RangedAttackGoal#RangedAttackGoal(RangedAttackMob,double,int,int,float)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RangedAttackGoal.java:27
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ RangedAttackGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: rangedAttackMob, mob, speedModifier, attackIntervalMin, attackIntervalMax, attackRadius. เรียกต่อ: setFlags(), of(). สร้างออบเจ็กต์: IllegalArgumentException.

Parameters

  • RangedAttackMob rangedAttackMob
  • double d
  • int i
  • int j
  • float f

ตัวอย่างใช้งาน

RangedAttackMob rangedAttackMob = ...;
RangedAttackGoal instance = new RangedAttackGoal(rangedAttackMob, 0.0D, 0, 0, 0.0F);

net.minecraft.world.entity.ai.goal.RangedAttackGoal#requiresUpdateEveryTick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RangedAttackGoal.java:65
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ requiresUpdateEveryTick ตาม implementation ของ RangedAttackGoal

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RangedAttackGoal instance = ...;
boolean result = instance.requiresUpdateEveryTick();

net.minecraft.world.entity.ai.goal.RangedAttackGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RangedAttackGoal.java:58
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

แก้ state: target, seeTime, attackTime.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RangedAttackGoal instance = ...;
instance.stop();

net.minecraft.world.entity.ai.goal.RangedAttackGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RangedAttackGoal.java:70
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: seeTime, attackTime. เรียกต่อ: distanceToSqr(), getX(), getY(), getZ(), getSensing(), hasLineOfSight(), getNavigation(), stop().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RangedAttackGoal instance = ...;
instance.tick();

RangedBowAttackGoal

  • Full name: net.minecraft.world.entity.ai.goal.RangedBowAttackGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.RangedBowAttackGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java:44
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

เรียกต่อ: canUse(), getNavigation(), isDone(), isHoldingBow(). คืนค่า: (this.canUse() || !this.mob.getNavigation().isDone()) && this.isHoldingBow().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RangedBowAttackGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.RangedBowAttackGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java:35
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

เรียกต่อ: getTarget(), isHoldingBow(). คืนค่า: this.mob.getTarget() == null ? false : this.isHoldingBow().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RangedBowAttackGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.RangedBowAttackGoal#isHoldingBow()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java:40
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Holding Bow

ทำงานยังไง

เรียกต่อ: isHolding(). คืนค่า: this.mob.isHolding(Items.BOW).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected boolean isHoldingBow() {
    return super.isHoldingBow();
}

net.minecraft.world.entity.ai.goal.RangedBowAttackGoal#RangedBowAttackGoal(T,double,int,float)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java:23
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ RangedBowAttackGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: mob, speedModifier, attackIntervalMin, attackRadiusSqr. เรียกต่อ: setFlags(), of().

Parameters

  • T monster
  • double d
  • int i
  • float f

ตัวอย่างใช้งาน

T monster = ...;
RangedBowAttackGoal instance = new RangedBowAttackGoal(monster, 0.0D, 0, 0.0F);

net.minecraft.world.entity.ai.goal.RangedBowAttackGoal#requiresUpdateEveryTick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java:64
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ requiresUpdateEveryTick ตาม implementation ของ RangedBowAttackGoal

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RangedBowAttackGoal instance = ...;
boolean result = instance.requiresUpdateEveryTick();

net.minecraft.world.entity.ai.goal.RangedBowAttackGoal#setMinAttackInterval(int)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java:31
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Min Attack Interval

ทำงานยังไง

แก้ state: attackIntervalMin.

Parameters

  • int i

ตัวอย่างใช้งาน

RangedBowAttackGoal instance = ...;
instance.setMinAttackInterval(0);

net.minecraft.world.entity.ai.goal.RangedBowAttackGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java:49
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

เรียกต่อ: setAggressive().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RangedBowAttackGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.RangedBowAttackGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java:55
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

แก้ state: seeTime, attackTime. เรียกต่อ: setAggressive(), stopUsingItem().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RangedBowAttackGoal instance = ...;
instance.stop();

net.minecraft.world.entity.ai.goal.RangedBowAttackGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java:69
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: seeTime, strafingTime, strafingClockwise, strafingBackwards, attackTime. เรียกต่อ: getTarget(), distanceToSqr(), getX(), getY(), getZ(), getSensing(), hasLineOfSight(), getNavigation().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RangedBowAttackGoal instance = ...;
instance.tick();

RangedCrossbowAttackGoal

  • Full name: net.minecraft.world.entity.ai.goal.RangedCrossbowAttackGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/RangedCrossbowAttackGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.RangedCrossbowAttackGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RangedCrossbowAttackGoal.java:43
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

เรียกต่อ: isValidTarget(), canUse(), getNavigation(), isDone(), isHoldingCrossbow(). คืนค่า: this.isValidTarget() && (this.canUse() || !this.mob.getNavigation().isDone()) && this.isHoldingCrossbow().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RangedCrossbowAttackGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.RangedCrossbowAttackGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RangedCrossbowAttackGoal.java:34
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

เรียกต่อ: isValidTarget(), isHoldingCrossbow(). คืนค่า: this.isValidTarget() && this.isHoldingCrossbow().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RangedCrossbowAttackGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.RangedCrossbowAttackGoal#RangedCrossbowAttackGoal(T,double,float)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RangedCrossbowAttackGoal.java:27
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ RangedCrossbowAttackGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: mob, speedModifier, attackRadiusSqr. เรียกต่อ: setFlags(), of().

Parameters

  • T monster
  • double d
  • float f

ตัวอย่างใช้งาน

T monster = ...;
RangedCrossbowAttackGoal instance = new RangedCrossbowAttackGoal(monster, 0.0D, 0.0F);

net.minecraft.world.entity.ai.goal.RangedCrossbowAttackGoal#requiresUpdateEveryTick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RangedCrossbowAttackGoal.java:65
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ requiresUpdateEveryTick ตาม implementation ของ RangedCrossbowAttackGoal

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RangedCrossbowAttackGoal instance = ...;
boolean result = instance.requiresUpdateEveryTick();

net.minecraft.world.entity.ai.goal.RangedCrossbowAttackGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RangedCrossbowAttackGoal.java:52
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: seeTime. เรียกต่อ: setAggressive(), setTarget(), isUsingItem(), stopUsingItem(), setChargingCrossbow(), getUseItem(), set().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RangedCrossbowAttackGoal instance = ...;
instance.stop();

net.minecraft.world.entity.ai.goal.RangedCrossbowAttackGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RangedCrossbowAttackGoal.java:70
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: seeTime, attackDelay, updatePathDelay, crossbowState. เรียกต่อ: getTarget(), getSensing(), hasLineOfSight(), distanceToSqr(), getNavigation(), moveTo(), canRun(), sample().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RangedCrossbowAttackGoal instance = ...;
instance.tick();

RemoveBlockGoal

  • Full name: net.minecraft.world.entity.ai.goal.RemoveBlockGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/RemoveBlockGoal.java
  • Type: class
  • Modifiers: public
  • Extends: MoveToBlockGoal

net.minecraft.world.entity.ai.goal.RemoveBlockGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java:36
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: nextStartTick. เรียกต่อ: getServerLevel(), getGameRules(), getBoolean(), findNearestBlock(), reducedTickDelay(), nextStartTick(). มีจุด return อย่างน้อย 4 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RemoveBlockGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.RemoveBlockGoal#isValidTarget(LevelReader,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java:141
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Valid Target

ทำงานยังไง

เรียกต่อ: getChunk(), blockToSectionCoord(), getX(), getZ(), getBlockState(), is(), above(), isAir().

Parameters

  • LevelReader levelReader
  • BlockPos blockPos

ตัวอย่างใช้งาน

LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean isValidTarget(LevelReader levelReader, BlockPos blockPos) {
    return super.isValidTarget(levelReader, blockPos);
}

net.minecraft.world.entity.ai.goal.RemoveBlockGoal#playBreakSound(Level,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java:67
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ playBreakSound ตาม implementation ของ RemoveBlockGoal

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • Level level
  • BlockPos blockPos

ตัวอย่างใช้งาน

RemoveBlockGoal instance = ...;
Level level = ...;
BlockPos blockPos = ...;
instance.playBreakSound(level, blockPos);

net.minecraft.world.entity.ai.goal.RemoveBlockGoal#playDestroyProgressSound(LevelAccessor,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java:64
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ playDestroyProgressSound ตาม implementation ของ RemoveBlockGoal

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • LevelAccessor levelAccessor
  • BlockPos blockPos

ตัวอย่างใช้งาน

RemoveBlockGoal instance = ...;
LevelAccessor levelAccessor = ...;
BlockPos blockPos = ...;
instance.playDestroyProgressSound(levelAccessor, blockPos);

net.minecraft.world.entity.ai.goal.RemoveBlockGoal#RemoveBlockGoal(Block,PathfinderMob,double,int)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java:30
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ RemoveBlockGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: blockToRemove, removerMob.

Parameters

  • Block block
  • PathfinderMob pathfinderMob
  • double d
  • int i

ตัวอย่างใช้งาน

Block block = ...;
PathfinderMob pathfinderMob = ...;
RemoveBlockGoal instance = new RemoveBlockGoal(block, pathfinderMob, 0.0D, 0);

net.minecraft.world.entity.ai.goal.RemoveBlockGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java:58
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

แก้ state: ticksSinceReachedGoal.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RemoveBlockGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.RemoveBlockGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java:52
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 2 statement).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RemoveBlockGoal instance = ...;
instance.stop();

net.minecraft.world.entity.ai.goal.RemoveBlockGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java:70
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: ticksSinceReachedGoal. เรียกต่อ: level(), blockPosition(), getPosWithBlock(), getRandom(), isReachedTarget(), getDeltaMovement(), setDeltaMovement(), sendParticles(). สร้างออบเจ็กต์: ItemParticleOption, ItemStack.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RemoveBlockGoal instance = ...;
instance.tick();

RestrictSunGoal

  • Full name: net.minecraft.world.entity.ai.goal.RestrictSunGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/RestrictSunGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.RestrictSunGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RestrictSunGoal.java:15
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

เรียกต่อ: level(), isDay(), getItemBySlot(), isEmpty(), hasGroundPathNavigation(). คืนค่า: this.mob.level().isDay() && this.mob.getItemBySlot(EquipmentSlot.HEAD).isEmpty() && GoalUtils.hasGroundPathNavigation(this.mob).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RestrictSunGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.RestrictSunGoal#RestrictSunGoal(PathfinderMob)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RestrictSunGoal.java:11
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ RestrictSunGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: mob.

Parameters

  • PathfinderMob pathfinderMob

ตัวอย่างใช้งาน

PathfinderMob pathfinderMob = ...;
RestrictSunGoal instance = new RestrictSunGoal(pathfinderMob);

net.minecraft.world.entity.ai.goal.RestrictSunGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RestrictSunGoal.java:20
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

เรียกต่อ: getNavigation(), setAvoidSun().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RestrictSunGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.RestrictSunGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RestrictSunGoal.java:25
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: hasGroundPathNavigation(), getNavigation(), setAvoidSun().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RestrictSunGoal instance = ...;
instance.stop();

RunAroundLikeCrazyGoal

  • Full name: net.minecraft.world.entity.ai.goal.RunAroundLikeCrazyGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.RunAroundLikeCrazyGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java:45
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

เรียกต่อ: isTamed(), getNavigation(), isDone(), isVehicle(). คืนค่า: !this.horse.isTamed() && !this.horse.getNavigation().isDone() && this.horse.isVehicle().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RunAroundLikeCrazyGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.RunAroundLikeCrazyGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java:23
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: posX, posY, posZ. เรียกต่อ: isTamed(), isVehicle(), getPos(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RunAroundLikeCrazyGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.RunAroundLikeCrazyGoal#RunAroundLikeCrazyGoal(AbstractHorse,double)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java:17
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ RunAroundLikeCrazyGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: horse, speedModifier. เรียกต่อ: setFlags(), of().

Parameters

  • AbstractHorse abstractHorse
  • double d

ตัวอย่างใช้งาน

AbstractHorse abstractHorse = ...;
RunAroundLikeCrazyGoal instance = new RunAroundLikeCrazyGoal(abstractHorse, 0.0D);

net.minecraft.world.entity.ai.goal.RunAroundLikeCrazyGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java:40
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

เรียกต่อ: getNavigation(), moveTo().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RunAroundLikeCrazyGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.RunAroundLikeCrazyGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java:50
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isTamed(), getRandom(), nextInt(), adjustedTickDelay(), getFirstPassenger(), getTemper(), getMaxTemper(), tameWithName().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RunAroundLikeCrazyGoal instance = ...;
instance.tick();

SitWhenOrderedToGoal

  • Full name: net.minecraft.world.entity.ai.goal.SitWhenOrderedToGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/SitWhenOrderedToGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.SitWhenOrderedToGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/SitWhenOrderedToGoal.java:15
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

เรียกต่อ: isOrderedToSit(). คืนค่า: this.mob.isOrderedToSit().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SitWhenOrderedToGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.SitWhenOrderedToGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/SitWhenOrderedToGoal.java:20
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isTame(), isInWaterOrBubble(), onGround(), getOwner(), distanceToSqr(), getLastHurtByMob(), isOrderedToSit(). มีจุด return อย่างน้อย 5 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SitWhenOrderedToGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.SitWhenOrderedToGoal#SitWhenOrderedToGoal(TamableAnimal)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/SitWhenOrderedToGoal.java:10
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ SitWhenOrderedToGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: mob. เรียกต่อ: setFlags(), of().

Parameters

  • TamableAnimal tamableAnimal

ตัวอย่างใช้งาน

TamableAnimal tamableAnimal = ...;
SitWhenOrderedToGoal instance = new SitWhenOrderedToGoal(tamableAnimal);

net.minecraft.world.entity.ai.goal.SitWhenOrderedToGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/SitWhenOrderedToGoal.java:38
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

เรียกต่อ: getNavigation(), stop(), setInSittingPose().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SitWhenOrderedToGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.SitWhenOrderedToGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/SitWhenOrderedToGoal.java:44
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

เรียกต่อ: setInSittingPose().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SitWhenOrderedToGoal instance = ...;
instance.stop();

StrollThroughVillageGoal

  • Full name: net.minecraft.world.entity.ai.goal.StrollThroughVillageGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/StrollThroughVillageGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.StrollThroughVillageGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/StrollThroughVillageGoal.java:53
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

เรียกต่อ: getNavigation(), isDone(), getTargetPos(), equals(). คืนค่า: this.wantedPos != null && !this.mob.getNavigation().isDone() && this.mob.getNavigation().getTargetPos().equals(this.wantedPos).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

StrollThroughVillageGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.StrollThroughVillageGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/StrollThroughVillageGoal.java:28
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: wantedPos. เรียกต่อ: hasControllingPassenger(), level(), isDay(), getRandom(), nextInt(), blockPosition(), isCloseToVillage(), getPos(). มีจุด return อย่างน้อย 5 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

StrollThroughVillageGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.StrollThroughVillageGoal#StrollThroughVillageGoal(PathfinderMob,int)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/StrollThroughVillageGoal.java:22
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ StrollThroughVillageGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: mob, interval. เรียกต่อ: reducedTickDelay(), setFlags(), of().

Parameters

  • PathfinderMob pathfinderMob
  • int i

ตัวอย่างใช้งาน

PathfinderMob pathfinderMob = ...;
StrollThroughVillageGoal instance = new StrollThroughVillageGoal(pathfinderMob, 0);

net.minecraft.world.entity.ai.goal.StrollThroughVillageGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/StrollThroughVillageGoal.java:58
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getNavigation(), isDone(), closerToCenterThan(), position(), atBottomCenterOf(), subtract(), scale(), add().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

StrollThroughVillageGoal instance = ...;
instance.tick();

SwellGoal

  • Full name: net.minecraft.world.entity.ai.goal.SwellGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/SwellGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.SwellGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/SwellGoal.java:18
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

เรียกต่อ: getTarget(), getSwellDir(), distanceToSqr(). คืนค่า: this.creeper.getSwellDir() > 0 || livingEntity != null && this.creeper.distanceToSqr(livingEntity) < 9.0.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SwellGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.SwellGoal#requiresUpdateEveryTick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/SwellGoal.java:35
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ requiresUpdateEveryTick ตาม implementation ของ SwellGoal

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SwellGoal instance = ...;
boolean result = instance.requiresUpdateEveryTick();

net.minecraft.world.entity.ai.goal.SwellGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/SwellGoal.java:24
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

แก้ state: target. เรียกต่อ: getNavigation(), stop(), getTarget().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SwellGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.SwellGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/SwellGoal.java:30
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

แก้ state: target.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SwellGoal instance = ...;
instance.stop();

net.minecraft.world.entity.ai.goal.SwellGoal#SwellGoal(Creeper)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/SwellGoal.java:13
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ SwellGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: creeper. เรียกต่อ: setFlags(), of().

Parameters

  • Creeper creeper

ตัวอย่างใช้งาน

Creeper creeper = ...;
SwellGoal instance = new SwellGoal(creeper);

net.minecraft.world.entity.ai.goal.SwellGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/SwellGoal.java:40
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: target. เรียกต่อ: setSwellDir(), distanceToSqr(), getSensing(), hasLineOfSight().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SwellGoal instance = ...;
instance.tick();

TemptGoal

  • Full name: net.minecraft.world.entity.ai.goal.TemptGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/TemptGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.TemptGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/TemptGoal.java:54
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: px, py, pz, pRotX, pRotY. เรียกต่อ: canScare(), distanceToSqr(), abs(), getXRot(), getYRot(), getX(), getY(), getZ(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

TemptGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.TemptGoal#canScare()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/TemptGoal.java:78
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Scare

ทำงานยังไง

คืนค่า: this.canScare.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected boolean canScare() {
    return super.canScare();
}

net.minecraft.world.entity.ai.goal.TemptGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/TemptGoal.java:39
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: calmDown, player. เรียกต่อ: getServerLevel(), getNearestPlayer(), range(), getAttributeValue(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

TemptGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.TemptGoal#isRunning()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/TemptGoal.java:108
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Running

ทำงานยังไง

คืนค่า: this.isRunning.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

TemptGoal instance = ...;
boolean result = instance.isRunning();

net.minecraft.world.entity.ai.goal.TemptGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/TemptGoal.java:82
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

แก้ state: px, py, pz, isRunning. เรียกต่อ: getX(), getY(), getZ().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

TemptGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.TemptGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/TemptGoal.java:90
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

แก้ state: player, calmDown, isRunning. เรียกต่อ: getNavigation(), reducedTickDelay().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

TemptGoal instance = ...;
instance.stop();

net.minecraft.world.entity.ai.goal.TemptGoal#TemptGoal(PathfinderMob,double,Predicate<ItemStack>,boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/TemptGoal.java:30
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ TemptGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: mob, speedModifier, items, canScare, targetingConditions. เรียกต่อ: setFlags(), of(), copy(), selector(), shouldFollow().

Parameters

  • PathfinderMob pathfinderMob
  • double d
  • Predicate<ItemStack> predicate
  • boolean bl

ตัวอย่างใช้งาน

PathfinderMob pathfinderMob = ...;
Predicate<ItemStack> predicate = ...;
TemptGoal instance = new TemptGoal(pathfinderMob, 0.0D, predicate, true);

net.minecraft.world.entity.ai.goal.TemptGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/TemptGoal.java:98
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getLookControl(), setLookAt(), getMaxHeadYRot(), getMaxHeadXRot(), distanceToSqr(), getNavigation(), stop(), moveTo().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

TemptGoal instance = ...;
instance.tick();

TradeWithPlayerGoal

  • Full name: net.minecraft.world.entity.ai.goal.TradeWithPlayerGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/TradeWithPlayerGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.TradeWithPlayerGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/TradeWithPlayerGoal.java:15
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isAlive(), isInWater(), onGround(), getTradingPlayer(), distanceToSqr(). มีจุด return อย่างน้อย 6 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

TradeWithPlayerGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.TradeWithPlayerGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/TradeWithPlayerGoal.java:35
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

เรียกต่อ: getNavigation(), stop().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

TradeWithPlayerGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.TradeWithPlayerGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/TradeWithPlayerGoal.java:40
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

เรียกต่อ: setTradingPlayer().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

TradeWithPlayerGoal instance = ...;
instance.stop();

net.minecraft.world.entity.ai.goal.TradeWithPlayerGoal#TradeWithPlayerGoal(AbstractVillager)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/TradeWithPlayerGoal.java:10
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ TradeWithPlayerGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: mob. เรียกต่อ: setFlags(), of().

Parameters

  • AbstractVillager abstractVillager

ตัวอย่างใช้งาน

AbstractVillager abstractVillager = ...;
TradeWithPlayerGoal instance = new TradeWithPlayerGoal(abstractVillager);

TryFindWaterGoal

  • Full name: net.minecraft.world.entity.ai.goal.TryFindWaterGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/TryFindWaterGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.TryFindWaterGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/TryFindWaterGoal.java:15
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

เรียกต่อ: onGround(), level(), getFluidState(), blockPosition(), is(). คืนค่า: this.mob.onGround() && !this.mob.level().getFluidState(this.mob.blockPosition()).is(FluidTags.WATER).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

TryFindWaterGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.TryFindWaterGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/TryFindWaterGoal.java:20
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: betweenClosed(), floor(), getX(), getY(), getZ(), getBlockY(), level(), getFluidState().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

TryFindWaterGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.TryFindWaterGoal#TryFindWaterGoal(PathfinderMob)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/TryFindWaterGoal.java:11
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ TryFindWaterGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: mob.

Parameters

  • PathfinderMob pathfinderMob

ตัวอย่างใช้งาน

PathfinderMob pathfinderMob = ...;
TryFindWaterGoal instance = new TryFindWaterGoal(pathfinderMob);

UseItemGoal

  • Full name: net.minecraft.world.entity.ai.goal.UseItemGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/UseItemGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.UseItemGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/UseItemGoal.java:30
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

เรียกต่อ: isUsingItem(). คืนค่า: this.mob.isUsingItem().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

UseItemGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.UseItemGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/UseItemGoal.java:25
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

เรียกต่อ: test(). คืนค่า: this.canUseSelector.test(this.mob).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

UseItemGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.UseItemGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/UseItemGoal.java:35
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

เรียกต่อ: setItemSlot(), copy(), startUsingItem().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

UseItemGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.UseItemGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/UseItemGoal.java:41
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: setItemSlot(), playSound(), getRandom(), nextFloat().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

UseItemGoal instance = ...;
instance.stop();

net.minecraft.world.entity.ai.goal.UseItemGoal#UseItemGoal(T,ItemStack,SoundEvent,Predicate<? super T>)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/UseItemGoal.java:18
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ UseItemGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: mob, item, finishUsingSound, canUseSelector.

Parameters

  • T mob
  • ItemStack itemStack
  • SoundEvent soundEvent
  • Predicate<? super T> predicate

ตัวอย่างใช้งาน

T mob = ...;
ItemStack itemStack = ...;
SoundEvent soundEvent = ...;
Predicate<? super T> predicate = ...;
UseItemGoal instance = new UseItemGoal(mob, itemStack, soundEvent, predicate);

WaterAvoidingRandomFlyingGoal

  • Full name: net.minecraft.world.entity.ai.goal.WaterAvoidingRandomFlyingGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/WaterAvoidingRandomFlyingGoal.java
  • Type: class
  • Modifiers: public
  • Extends: WaterAvoidingRandomStrollGoal

net.minecraft.world.entity.ai.goal.WaterAvoidingRandomFlyingGoal#getPosition()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/WaterAvoidingRandomFlyingGoal.java:14
  • Modifiers: protected
  • Return: Vec3

คืออะไร

อ่านค่า Position

ทำงานยังไง

เรียกต่อ: getViewVector(), getPos(). คืนค่า: vec32 != null ? vec32 : AirAndWaterRandomPos.getPos(this.mob, 8, 4, -2, vec3.x, vec3.z, (float) (Math.PI / 2)).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected Vec3 getPosition() {
    return super.getPosition();
}

net.minecraft.world.entity.ai.goal.WaterAvoidingRandomFlyingGoal#WaterAvoidingRandomFlyingGoal(PathfinderMob,double)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/WaterAvoidingRandomFlyingGoal.java:10
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ WaterAvoidingRandomFlyingGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • PathfinderMob pathfinderMob
  • double d

ตัวอย่างใช้งาน

PathfinderMob pathfinderMob = ...;
WaterAvoidingRandomFlyingGoal instance = new WaterAvoidingRandomFlyingGoal(pathfinderMob, 0.0D);

WaterAvoidingRandomStrollGoal

  • Full name: net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/WaterAvoidingRandomStrollGoal.java
  • Type: class
  • Modifiers: public
  • Extends: RandomStrollGoal

net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal#getPosition()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/WaterAvoidingRandomStrollGoal.java:21
  • Modifiers: protected
  • Return: Vec3

คืออะไร

อ่านค่า Position

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isInWaterOrBubble(), getPos(), getRandom(), nextFloat(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected Vec3 getPosition() {
    return super.getPosition();
}

net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal#WaterAvoidingRandomStrollGoal(PathfinderMob,double)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/WaterAvoidingRandomStrollGoal.java:12
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ WaterAvoidingRandomStrollGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • PathfinderMob pathfinderMob
  • double d

ตัวอย่างใช้งาน

PathfinderMob pathfinderMob = ...;
WaterAvoidingRandomStrollGoal instance = new WaterAvoidingRandomStrollGoal(pathfinderMob, 0.0D);

net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal#WaterAvoidingRandomStrollGoal(PathfinderMob,double,float)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/WaterAvoidingRandomStrollGoal.java:16
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ WaterAvoidingRandomStrollGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: probability.

Parameters

  • PathfinderMob pathfinderMob
  • double d
  • float f

ตัวอย่างใช้งาน

PathfinderMob pathfinderMob = ...;
WaterAvoidingRandomStrollGoal instance = new WaterAvoidingRandomStrollGoal(pathfinderMob, 0.0D, 0.0F);

WrappedGoal

  • Full name: net.minecraft.world.entity.ai.goal.WrappedGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/WrappedGoal.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.ai.goal.WrappedGoal#adjustedTickDelay(int)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/WrappedGoal.java:56
  • Modifiers: protected
  • Return: int

คืออะไร

ดำเนินการ adjustedTickDelay ตาม implementation ของ WrappedGoal

ทำงานยังไง

คืนค่า: this.goal.adjustedTickDelay(i).

Parameters

  • int i

ตัวอย่างใช้งาน

@Override
protected int adjustedTickDelay(int i) {
    return super.adjustedTickDelay(i);
}

net.minecraft.world.entity.ai.goal.WrappedGoal#canBeReplacedBy(WrappedGoal)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/WrappedGoal.java:16
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Be Replaced By

ทำงานยังไง

เรียกต่อ: isInterruptable(), getPriority(). คืนค่า: this.isInterruptable() && wrappedGoal.getPriority() < this.getPriority().

Parameters

  • WrappedGoal wrappedGoal

ตัวอย่างใช้งาน

WrappedGoal instance = ...;
WrappedGoal wrappedGoal = ...;
boolean result = instance.canBeReplacedBy(wrappedGoal);

net.minecraft.world.entity.ai.goal.WrappedGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/WrappedGoal.java:25
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Continue To Use

ทำงานยังไง

คืนค่า: this.goal.canContinueToUse().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

WrappedGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.ai.goal.WrappedGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/WrappedGoal.java:20
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Use

ทำงานยังไง

คืนค่า: this.goal.canUse().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

WrappedGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.ai.goal.WrappedGoal#equals(Object)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/WrappedGoal.java:88
  • Modifiers: public
  • Return: boolean

คืออะไร

เปรียบเทียบความเท่ากัน equals

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getClass(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • Object object

ตัวอย่างใช้งาน

WrappedGoal instance = ...;
Object object = ...;
boolean result = instance.equals(object);

net.minecraft.world.entity.ai.goal.WrappedGoal#getFlags()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/WrappedGoal.java:71
  • Modifiers: public
  • Return: EnumSet<Goal.Flag>

คืออะไร

อ่านค่า Flags

ทำงานยังไง

คืนค่า: this.goal.getFlags().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

WrappedGoal instance = ...;
EnumSet<Goal.Flag> result = instance.getFlags();

net.minecraft.world.entity.ai.goal.WrappedGoal#getGoal()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/WrappedGoal.java:84
  • Modifiers: public
  • Return: Goal

คืออะไร

อ่านค่า Goal

ทำงานยังไง

คืนค่า: this.goal.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

WrappedGoal instance = ...;
Goal result = instance.getGoal();

net.minecraft.world.entity.ai.goal.WrappedGoal#getPriority()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/WrappedGoal.java:80
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Priority

ทำงานยังไง

คืนค่า: this.priority.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

WrappedGoal instance = ...;
int result = instance.getPriority();

net.minecraft.world.entity.ai.goal.WrappedGoal#hashCode()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/WrappedGoal.java:97
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ hashCode ตาม implementation ของ WrappedGoal

ทำงานยังไง

คืนค่า: this.goal.hashCode().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

WrappedGoal instance = ...;
int result = instance.hashCode();

net.minecraft.world.entity.ai.goal.WrappedGoal#isInterruptable()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/WrappedGoal.java:30
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Interruptable

ทำงานยังไง

คืนค่า: this.goal.isInterruptable().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

WrappedGoal instance = ...;
boolean result = instance.isInterruptable();

net.minecraft.world.entity.ai.goal.WrappedGoal#isRunning()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/WrappedGoal.java:76
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Running

ทำงานยังไง

คืนค่า: this.isRunning.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

WrappedGoal instance = ...;
boolean result = instance.isRunning();

net.minecraft.world.entity.ai.goal.WrappedGoal#requiresUpdateEveryTick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/WrappedGoal.java:51
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ requiresUpdateEveryTick ตาม implementation ของ WrappedGoal

ทำงานยังไง

คืนค่า: this.goal.requiresUpdateEveryTick().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

WrappedGoal instance = ...;
boolean result = instance.requiresUpdateEveryTick();

net.minecraft.world.entity.ai.goal.WrappedGoal#setFlags(EnumSet<Goal.Flag>)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/WrappedGoal.java:66
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Flags

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • EnumSet<Goal.Flag> enumSet

ตัวอย่างใช้งาน

WrappedGoal instance = ...;
EnumSet<Goal.Flag> enumSet = ...;
instance.setFlags(enumSet);

net.minecraft.world.entity.ai.goal.WrappedGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/WrappedGoal.java:35
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: isRunning.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

WrappedGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.WrappedGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/WrappedGoal.java:43
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: isRunning.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

WrappedGoal instance = ...;
instance.stop();

net.minecraft.world.entity.ai.goal.WrappedGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/WrappedGoal.java:61
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

WrappedGoal instance = ...;
instance.tick();

net.minecraft.world.entity.ai.goal.WrappedGoal#WrappedGoal(int,Goal)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/WrappedGoal.java:11
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ WrappedGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: priority, goal.

Parameters

  • int i
  • Goal goal

ตัวอย่างใช้งาน

Goal goal = ...;
WrappedGoal instance = new WrappedGoal(0, goal);

ZombieAttackGoal

  • Full name: net.minecraft.world.entity.ai.goal.ZombieAttackGoal
  • Package: net.minecraft.world.entity.ai.goal
  • Source: commonnet/minecraft/world/entity/ai/goal/ZombieAttackGoal.java
  • Type: class
  • Modifiers: public
  • Extends: MeleeAttackGoal

net.minecraft.world.entity.ai.goal.ZombieAttackGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/ZombieAttackGoal.java:14
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

แก้ state: raiseArmTicks.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ZombieAttackGoal instance = ...;
instance.start();

net.minecraft.world.entity.ai.goal.ZombieAttackGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/ZombieAttackGoal.java:20
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

เรียกต่อ: setAggressive().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ZombieAttackGoal instance = ...;
instance.stop();

net.minecraft.world.entity.ai.goal.ZombieAttackGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/ZombieAttackGoal.java:26
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: raiseArmTicks. เรียกต่อ: getTicksUntilNextAttack(), getAttackInterval(), setAggressive().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ZombieAttackGoal instance = ...;
instance.tick();

net.minecraft.world.entity.ai.goal.ZombieAttackGoal#ZombieAttackGoal(Zombie,double,boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/ai/goal/ZombieAttackGoal.java:9
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ ZombieAttackGoal ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: zombie.

Parameters

  • Zombie zombie
  • double d
  • boolean bl

ตัวอย่างใช้งาน

Zombie zombie = ...;
ZombieAttackGoal instance = new ZombieAttackGoal(zombie, 0.0D, true);