Skip to content

Package net.minecraft.world.entity.monster

Part 1/1


AbstractIllager

  • Full name: net.minecraft.world.entity.monster.AbstractIllager
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/AbstractIllager.java
  • Type: class
  • Modifiers: public abstract
  • Extends: Raider

net.minecraft.world.entity.monster.AbstractIllager#AbstractIllager(EntityType<? extends AbstractIllager>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/AbstractIllager.java:13
  • Modifiers: protected
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • EntityType<? extends AbstractIllager> entityType
  • Level level

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

EntityType<? extends AbstractIllager> entityType = ...;
Level level = ...;
AbstractIllager instance = new AbstractIllager(entityType, level);

net.minecraft.world.entity.monster.AbstractIllager#canAttack(LivingEntity)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/AbstractIllager.java:26
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: isBaby(). คืนค่า: livingEntity instanceof AbstractVillager && livingEntity.isBaby() ? false : super.canAttack(livingEntity).

Parameters

  • LivingEntity livingEntity

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

AbstractIllager instance = ...;
LivingEntity livingEntity = ...;
boolean result = instance.canAttack(livingEntity);

net.minecraft.world.entity.monster.AbstractIllager#considersEntityAsAlly(Entity)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/AbstractIllager.java:31
  • Modifiers: protected
  • Return: boolean

คืออะไร

ดำเนินการ considersEntityAsAlly ตาม implementation ของ AbstractIllager

ทำงานยังไง

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

Parameters

  • Entity entity

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

Entity entity = ...;
@Override
protected boolean considersEntityAsAlly(Entity entity) {
    return super.considersEntityAsAlly(entity);
}

net.minecraft.world.entity.monster.AbstractIllager#getArmPose()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/AbstractIllager.java:22
  • Modifiers: public
  • Return: AbstractIllager.IllagerArmPose

คืออะไร

อ่านค่า Arm Pose

ทำงานยังไง

คืนค่า: AbstractIllager.IllagerArmPose.CROSSED.

Parameters

  • ไม่มี

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

AbstractIllager instance = ...;
AbstractIllager.IllagerArmPose result = instance.getArmPose();

net.minecraft.world.entity.monster.AbstractIllager#registerGoals()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/AbstractIllager.java:17
  • Modifiers: protected
  • Return: void

คืออะไร

ลงทะเบียน Goals

ทำงานยังไง

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

Parameters

  • ไม่มี

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

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

AbstractIllager$RaiderOpenDoorGoal

  • Full name: net.minecraft.world.entity.monster.AbstractIllager$RaiderOpenDoorGoal
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/AbstractIllager.java
  • Type: class
  • Modifiers: protected
  • Extends: OpenDoorGoal

net.minecraft.world.entity.monster.AbstractIllager$RaiderOpenDoorGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/AbstractIllager.java:56
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ไม่มี

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

AbstractIllager.RaiderOpenDoorGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.monster.AbstractIllager$RaiderOpenDoorGoal#RaiderOpenDoorGoal(Raider)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/AbstractIllager.java:52
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • Raider raider

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

Raider raider = ...;
AbstractIllager.RaiderOpenDoorGoal instance = new AbstractIllager.RaiderOpenDoorGoal(raider);

AbstractSkeleton

  • Full name: net.minecraft.world.entity.monster.AbstractSkeleton
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/AbstractSkeleton.java
  • Type: class
  • Modifiers: public abstract
  • Extends: Monster
  • Implements: RangedAttackMob

net.minecraft.world.entity.monster.AbstractSkeleton#AbstractSkeleton(EntityType<? extends AbstractSkeleton>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/AbstractSkeleton.java:68
  • Modifiers: protected
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • EntityType<? extends AbstractSkeleton> entityType
  • Level level

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

EntityType<? extends AbstractSkeleton> entityType = ...;
Level level = ...;
AbstractSkeleton instance = new AbstractSkeleton(entityType, level);

net.minecraft.world.entity.monster.AbstractSkeleton#aiStep()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/AbstractSkeleton.java:98
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ aiStep ตาม implementation ของ AbstractSkeleton

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isSunBurnTick(), getItemBySlot(), isEmpty(), isDamageableItem(), getItem(), setDamageValue(), getDamageValue(), nextInt().

Parameters

  • ไม่มี

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

AbstractSkeleton instance = ...;
instance.aiStep();

net.minecraft.world.entity.monster.AbstractSkeleton#canFireProjectileWeapon(ProjectileWeaponItem)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/AbstractSkeleton.java:209
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Fire Projectile Weapon

ทำงานยังไง

คืนค่า: projectileWeaponItem == Items.BOW.

Parameters

  • ProjectileWeaponItem projectileWeaponItem

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

AbstractSkeleton instance = ...;
ProjectileWeaponItem projectileWeaponItem = ...;
boolean result = instance.canFireProjectileWeapon(projectileWeaponItem);

net.minecraft.world.entity.monster.AbstractSkeleton#createAttributes()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/AbstractSkeleton.java:87
  • Modifiers: public static
  • Return: AttributeSupplier.Builder

คืออะไร

สร้าง Attributes

ทำงานยังไง

เรียกต่อ: createMonsterAttributes(), add(). คืนค่า: Monster.createMonsterAttributes().add(Attributes.MOVEMENT_SPEED, 0.25).

Parameters

  • ไม่มี

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

AttributeSupplier.Builder result = AbstractSkeleton.createAttributes();

net.minecraft.world.entity.monster.AbstractSkeleton#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/AbstractSkeleton.java:138
  • Modifiers: public
  • Return: SpawnGroupData

คืออะไร

ดำเนินการ finalizeSpawn ตาม implementation ของ AbstractSkeleton

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getRandom(), populateDefaultEquipmentSlots(), populateDefaultEquipmentEnchantments(), reassessWeaponGoal(), setCanPickUpLoot(), nextFloat(), getSpecialMultiplier(), getItemBySlot(). สร้างออบเจ็กต์: ItemStack. คืนค่า: spawnGroupData.

Parameters

  • ServerLevelAccessor serverLevelAccessor
  • DifficultyInstance difficultyInstance
  • EntitySpawnReason entitySpawnReason
  • SpawnGroupData spawnGroupData

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

AbstractSkeleton instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);

net.minecraft.world.entity.monster.AbstractSkeleton#getArrow(ItemStack,float,ItemStack)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/AbstractSkeleton.java:205
  • Modifiers: protected
  • Return: AbstractArrow

คืออะไร

อ่านค่า Arrow

ทำงานยังไง

เรียกต่อ: getMobArrow(). คืนค่า: ProjectileUtil.getMobArrow(this, itemStack, f, itemStack2).

Parameters

  • ItemStack itemStack
  • float f
  • ItemStack itemStack2

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

ItemStack itemStack = ...;
ItemStack itemStack2 = ...;
@Override
protected AbstractArrow getArrow(ItemStack itemStack, float f, ItemStack itemStack2) {
    return super.getArrow(itemStack, f, itemStack2);
}

net.minecraft.world.entity.monster.AbstractSkeleton#getAttackInterval()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/AbstractSkeleton.java:185
  • Modifiers: protected
  • Return: int

คืออะไร

อ่านค่า Attack Interval

ทำงานยังไง

คืนค่า: 40.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.AbstractSkeleton#getHardAttackInterval()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/AbstractSkeleton.java:181
  • Modifiers: protected
  • Return: int

คืออะไร

อ่านค่า Hard Attack Interval

ทำงานยังไง

คืนค่า: 20.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.AbstractSkeleton#getPreferredWeaponType()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/AbstractSkeleton.java:214
  • Modifiers: public
  • Return: TagKey<Item>

คืออะไร

อ่านค่า Preferred Weapon Type

ทำงานยังไง

คืนค่า: ItemTags.SKELETON_PREFERRED_WEAPONS.

Parameters

  • ไม่มี

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

AbstractSkeleton instance = ...;
TagKey<Item> result = instance.getPreferredWeaponType();

net.minecraft.world.entity.monster.AbstractSkeleton#isShaking()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/AbstractSkeleton.java:233
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ไม่มี

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

AbstractSkeleton instance = ...;
boolean result = instance.isShaking();

net.minecraft.world.entity.monster.AbstractSkeleton#performRangedAttack(LivingEntity,float)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/AbstractSkeleton.java:189
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ performRangedAttack ตาม implementation ของ AbstractSkeleton

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getItemInHand(), getWeaponHoldingHand(), getProjectile(), getArrow(), getX(), getY(), getZ(), sqrt().

Parameters

  • LivingEntity livingEntity
  • float f

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

AbstractSkeleton instance = ...;
LivingEntity livingEntity = ...;
instance.performRangedAttack(livingEntity, 0.0F);

net.minecraft.world.entity.monster.AbstractSkeleton#playStepSound(BlockPos,BlockState)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/AbstractSkeleton.java:91
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ playStepSound ตาม implementation ของ AbstractSkeleton

ทำงานยังไง

เรียกต่อ: playSound(), getStepSound().

Parameters

  • BlockPos blockPos
  • BlockState blockState

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

BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected void playStepSound(BlockPos blockPos, BlockState blockState) {
    super.playStepSound(blockPos, blockState);
}

net.minecraft.world.entity.monster.AbstractSkeleton#populateDefaultEquipmentSlots(RandomSource,DifficultyInstance)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/AbstractSkeleton.java:132
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ populateDefaultEquipmentSlots ตาม implementation ของ AbstractSkeleton

ทำงานยังไง

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

Parameters

  • RandomSource randomSource
  • DifficultyInstance difficultyInstance

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

RandomSource randomSource = ...;
DifficultyInstance difficultyInstance = ...;
@Override
protected void populateDefaultEquipmentSlots(RandomSource randomSource, DifficultyInstance difficultyInstance) {
    super.populateDefaultEquipmentSlots(randomSource, difficultyInstance);
}

net.minecraft.world.entity.monster.AbstractSkeleton#readAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/AbstractSkeleton.java:219
  • Modifiers: public
  • Return: void

คืออะไร

อ่าน Additional Save Data

ทำงานยังไง

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

Parameters

  • CompoundTag compoundTag

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

AbstractSkeleton instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.AbstractSkeleton#reassessWeaponGoal()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/AbstractSkeleton.java:162
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ reassessWeaponGoal ตาม implementation ของ AbstractSkeleton

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: level(), removeGoal(), getItemInHand(), getWeaponHoldingHand(), is(), getHardAttackInterval(), getDifficulty(), getAttackInterval().

Parameters

  • ไม่มี

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

AbstractSkeleton instance = ...;
instance.reassessWeaponGoal();

net.minecraft.world.entity.monster.AbstractSkeleton#registerGoals()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/AbstractSkeleton.java:73
  • Modifiers: protected
  • Return: void

คืออะไร

ลงทะเบียน Goals

ทำงานยังไง

เรียกต่อ: addGoal(). สร้างออบเจ็กต์: RestrictSunGoal, FleeSunGoal, AvoidEntityGoal<>, WaterAvoidingRandomStrollGoal.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.AbstractSkeleton#rideTick()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/AbstractSkeleton.java:124
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ rideTick ตาม implementation ของ AbstractSkeleton

ทำงานยังไง

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

Parameters

  • ไม่มี

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

AbstractSkeleton instance = ...;
instance.rideTick();

net.minecraft.world.entity.monster.AbstractSkeleton#setItemSlot(EquipmentSlot,ItemStack)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/AbstractSkeleton.java:225
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Item Slot

ทำงานยังไง

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

Parameters

  • EquipmentSlot equipmentSlot
  • ItemStack itemStack

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

AbstractSkeleton instance = ...;
EquipmentSlot equipmentSlot = ...;
ItemStack itemStack = ...;
instance.setItemSlot(equipmentSlot, itemStack);

Blaze

  • Full name: net.minecraft.world.entity.monster.Blaze
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/Blaze.java
  • Type: class
  • Modifiers: public
  • Extends: Monster

net.minecraft.world.entity.monster.Blaze#aiStep()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Blaze.java:84
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ aiStep ตาม implementation ของ Blaze

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: onGround(), getDeltaMovement(), setDeltaMovement(), multiply(), level(), nextInt(), isSilent(), playLocalSound().

Parameters

  • ไม่มี

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

Blaze instance = ...;
instance.aiStep();

net.minecraft.world.entity.monster.Blaze#Blaze(EntityType<? extends Blaze>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Blaze.java:34
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • EntityType<? extends Blaze> entityType
  • Level level

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

EntityType<? extends Blaze> entityType = ...;
Level level = ...;
Blaze instance = new Blaze(entityType, level);

net.minecraft.world.entity.monster.Blaze#createAttributes()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Blaze.java:54
  • Modifiers: public static
  • Return: AttributeSupplier.Builder

คืออะไร

สร้าง Attributes

ทำงานยังไง

เรียกต่อ: createMonsterAttributes(), add(). คืนค่า: Monster.createMonsterAttributes().add(Attributes.ATTACK_DAMAGE, 6.0).add(Attributes.MOVEMENT_SPEED, 0.23F).add(Attributes.FOLLOW_RANGE, 48.0).

Parameters

  • ไม่มี

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

AttributeSupplier.Builder result = Blaze.createAttributes();

net.minecraft.world.entity.monster.Blaze#customServerAiStep(ServerLevel)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Blaze.java:118
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ customServerAiStep ตาม implementation ของ Blaze

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: nextHeightOffsetChangeTick, allowedHeightOffset, hasImpulse. เรียกต่อ: triangle(), getTarget(), getEyeY(), canAttack(), getDeltaMovement(), setDeltaMovement(), add().

Parameters

  • ServerLevel serverLevel

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

ServerLevel serverLevel = ...;
@Override
protected void customServerAiStep(ServerLevel serverLevel) {
    super.customServerAiStep(serverLevel);
}

net.minecraft.world.entity.monster.Blaze#defineSynchedData(SynchedEntityData.Builder)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Blaze.java:58
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ defineSynchedData ตาม implementation ของ Blaze

ทำงานยังไง

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

Parameters

  • SynchedEntityData.Builder builder

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

SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
    super.defineSynchedData(builder);
}

net.minecraft.world.entity.monster.Blaze#getAmbientSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Blaze.java:64
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Ambient Sound

ทำงานยังไง

คืนค่า: SoundEvents.BLAZE_AMBIENT.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getAmbientSound() {
    return super.getAmbientSound();
}

net.minecraft.world.entity.monster.Blaze#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Blaze.java:74
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

คืนค่า: SoundEvents.BLAZE_DEATH.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.monster.Blaze#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Blaze.java:69
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

คืนค่า: SoundEvents.BLAZE_HURT.

Parameters

  • DamageSource damageSource

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

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

net.minecraft.world.entity.monster.Blaze#getLightLevelDependentMagicValue()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Blaze.java:79
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Light Level Dependent Magic Value

ทำงานยังไง

คืนค่า: 1.0F.

Parameters

  • ไม่มี

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

Blaze instance = ...;
float result = instance.getLightLevelDependentMagicValue();

net.minecraft.world.entity.monster.Blaze#isOnFire()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Blaze.java:136
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ On Fire

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Blaze instance = ...;
boolean result = instance.isOnFire();

net.minecraft.world.entity.monster.Blaze#isSensitiveToWater()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Blaze.java:113
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Sensitive To Water

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

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

Blaze instance = ...;
boolean result = instance.isSensitiveToWater();

net.minecraft.world.entity.monster.Blaze#registerGoals()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Blaze.java:43
  • Modifiers: protected
  • Return: void

คืออะไร

ลงทะเบียน Goals

ทำงานยังไง

เรียกต่อ: addGoal(), BlazeAttackGoal(), setAlertOthers(). สร้างออบเจ็กต์: Blaze.BlazeAttackGoal, MoveTowardsRestrictionGoal, WaterAvoidingRandomStrollGoal, LookAtPlayerGoal.

Parameters

  • ไม่มี

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

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

Bogged

  • Full name: net.minecraft.world.entity.monster.Bogged
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/Bogged.java
  • Type: class
  • Modifiers: public
  • Extends: AbstractSkeleton
  • Implements: Shearable

net.minecraft.world.entity.monster.Bogged#addAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Bogged.java:50
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Additional Save Data

ทำงานยังไง

เรียกต่อ: putBoolean(), isSheared().

Parameters

  • CompoundTag compoundTag

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

Bogged instance = ...;
CompoundTag compoundTag = ...;
instance.addAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Bogged#Bogged(EntityType<? extends Bogged>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Bogged.java:40
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • EntityType<? extends Bogged> entityType
  • Level level

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

EntityType<? extends Bogged> entityType = ...;
Level level = ...;
Bogged instance = new Bogged(entityType, level);

net.minecraft.world.entity.monster.Bogged#createAttributes()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Bogged.java:36
  • Modifiers: public static
  • Return: AttributeSupplier.Builder

คืออะไร

สร้าง Attributes

ทำงานยังไง

เรียกต่อ: add(). คืนค่า: AbstractSkeleton.createAttributes().add(Attributes.MAX_HEALTH, 16.0).

Parameters

  • ไม่มี

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

AttributeSupplier.Builder result = Bogged.createAttributes();

net.minecraft.world.entity.monster.Bogged#defineSynchedData(SynchedEntityData.Builder)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Bogged.java:44
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ defineSynchedData ตาม implementation ของ Bogged

ทำงานยังไง

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

Parameters

  • SynchedEntityData.Builder builder

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

SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
    super.defineSynchedData(builder);
}

net.minecraft.world.entity.monster.Bogged#getAmbientSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Bogged.java:86
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Ambient Sound

ทำงานยังไง

คืนค่า: SoundEvents.BOGGED_AMBIENT.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getAmbientSound() {
    return super.getAmbientSound();
}

net.minecraft.world.entity.monster.Bogged#getArrow(ItemStack,float,ItemStack)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Bogged.java:106
  • Modifiers: protected
  • Return: AbstractArrow

คืออะไร

อ่านค่า Arrow

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: addEffect(). สร้างออบเจ็กต์: MobEffectInstance. คืนค่า: abstractArrow.

Parameters

  • ItemStack itemStack
  • float f
  • ItemStack itemStack2

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

ItemStack itemStack = ...;
ItemStack itemStack2 = ...;
@Override
protected AbstractArrow getArrow(ItemStack itemStack, float f, ItemStack itemStack2) {
    return super.getArrow(itemStack, f, itemStack2);
}

net.minecraft.world.entity.monster.Bogged#getAttackInterval()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Bogged.java:121
  • Modifiers: protected
  • Return: int

คืออะไร

อ่านค่า Attack Interval

ทำงานยังไง

คืนค่า: 70.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Bogged#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Bogged.java:96
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

คืนค่า: SoundEvents.BOGGED_DEATH.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.monster.Bogged#getHardAttackInterval()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Bogged.java:116
  • Modifiers: protected
  • Return: int

คืออะไร

อ่านค่า Hard Attack Interval

ทำงานยังไง

คืนค่า: 50.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Bogged#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Bogged.java:91
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

คืนค่า: SoundEvents.BOGGED_HURT.

Parameters

  • DamageSource damageSource

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

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

net.minecraft.world.entity.monster.Bogged#getStepSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Bogged.java:101
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Step Sound

ทำงานยังไง

คืนค่า: SoundEvents.BOGGED_STEP.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getStepSound() {
    return super.getStepSound();
}

net.minecraft.world.entity.monster.Bogged#isSheared()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Bogged.java:62
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Bogged instance = ...;
boolean result = instance.isSheared();

net.minecraft.world.entity.monster.Bogged#mobInteract(Player,InteractionHand)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Bogged.java:70
  • Modifiers: protected
  • Return: InteractionResult

คืออะไร

ดำเนินการ mobInteract ตาม implementation ของ Bogged

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getItemInHand(), is(), readyForShearing(), level(), shear(), gameEvent(), hurtAndBreak(), getSlotForHand(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • Player player
  • InteractionHand interactionHand

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

Player player = ...;
InteractionHand interactionHand = ...;
@Override
protected InteractionResult mobInteract(Player player, InteractionHand interactionHand) {
    return super.mobInteract(player, interactionHand);
}

net.minecraft.world.entity.monster.Bogged#readAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Bogged.java:56
  • Modifiers: public
  • Return: void

คืออะไร

อ่าน Additional Save Data

ทำงานยังไง

เรียกต่อ: setSheared(), getBoolean().

Parameters

  • CompoundTag compoundTag

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

Bogged instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Bogged#readyForShearing()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Bogged.java:142
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ readyForShearing ตาม implementation ของ Bogged

ทำงานยังไง

เรียกต่อ: isSheared(), isAlive(). คืนค่า: !this.isSheared() && this.isAlive().

Parameters

  • ไม่มี

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

Bogged instance = ...;
boolean result = instance.readyForShearing();

net.minecraft.world.entity.monster.Bogged#setSheared(boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Bogged.java:66
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Sheared

ทำงานยังไง

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

Parameters

  • boolean bl

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

Bogged instance = ...;
instance.setSheared(true);

net.minecraft.world.entity.monster.Bogged#shear(ServerLevel,SoundSource,ItemStack)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Bogged.java:126
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ shear ตาม implementation ของ Bogged

ทำงานยังไง

เรียกต่อ: playSound(), spawnShearedMushrooms(), setSheared().

Parameters

  • ServerLevel serverLevel
  • SoundSource soundSource
  • ItemStack itemStack

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

Bogged instance = ...;
ServerLevel serverLevel = ...;
SoundSource soundSource = ...;
ItemStack itemStack = ...;
instance.shear(serverLevel, soundSource, itemStack);

CaveSpider

  • Full name: net.minecraft.world.entity.monster.CaveSpider
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/CaveSpider.java
  • Type: class
  • Modifiers: public
  • Extends: Spider

net.minecraft.world.entity.monster.CaveSpider#CaveSpider(EntityType<? extends CaveSpider>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/CaveSpider.java:21
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • EntityType<? extends CaveSpider> entityType
  • Level level

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

EntityType<? extends CaveSpider> entityType = ...;
Level level = ...;
CaveSpider instance = new CaveSpider(entityType, level);

net.minecraft.world.entity.monster.CaveSpider#createCaveSpider()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/CaveSpider.java:25
  • Modifiers: public static
  • Return: AttributeSupplier.Builder

คืออะไร

สร้าง Cave Spider

ทำงานยังไง

เรียกต่อ: createAttributes(), add(). คืนค่า: Spider.createAttributes().add(Attributes.MAX_HEALTH, 12.0).

Parameters

  • ไม่มี

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

AttributeSupplier.Builder result = CaveSpider.createCaveSpider();

net.minecraft.world.entity.monster.CaveSpider#doHurtTarget(ServerLevel,Entity)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/CaveSpider.java:29
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ doHurtTarget ตาม implementation ของ CaveSpider

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: level(), getDifficulty(), addEffect(). สร้างออบเจ็กต์: MobEffectInstance. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ServerLevel serverLevel
  • Entity entity

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

CaveSpider instance = ...;
ServerLevel serverLevel = ...;
Entity entity = ...;
boolean result = instance.doHurtTarget(serverLevel, entity);

net.minecraft.world.entity.monster.CaveSpider#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/CaveSpider.java:51
  • Modifiers: public
  • Return: SpawnGroupData

คืออะไร

ดำเนินการ finalizeSpawn ตาม implementation ของ CaveSpider

ทำงานยังไง

คืนค่า: spawnGroupData.

Parameters

  • ServerLevelAccessor serverLevelAccessor
  • DifficultyInstance difficultyInstance
  • EntitySpawnReason entitySpawnReason
  • SpawnGroupData spawnGroupData

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

CaveSpider instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);

net.minecraft.world.entity.monster.CaveSpider#getVehicleAttachmentPoint(Entity)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/CaveSpider.java:59
  • Modifiers: public
  • Return: Vec3

คืออะไร

อ่านค่า Vehicle Attachment Point

ทำงานยังไง

เรียกต่อ: getBbWidth(), getScale(). สร้างออบเจ็กต์: Vec3. คืนค่า: entity.getBbWidth() <= this.getBbWidth() ? new Vec3(0.0, 0.21875 * this.getScale(), 0.0) : super.getVehicleAttachmentPoint(entity).

Parameters

  • Entity entity

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

CaveSpider instance = ...;
Entity entity = ...;
Vec3 result = instance.getVehicleAttachmentPoint(entity);

Creeper

  • Full name: net.minecraft.world.entity.monster.Creeper
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/Creeper.java
  • Type: class
  • Modifiers: public
  • Extends: Monster

net.minecraft.world.entity.monster.Creeper#addAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Creeper.java:99
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Additional Save Data

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: get(), putBoolean(), putShort(), putByte(), isIgnited().

Parameters

  • CompoundTag compoundTag

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

Creeper instance = ...;
CompoundTag compoundTag = ...;
instance.addAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Creeper#canDropMobsSkull()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Creeper.java:268
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Drop Mobs Skull

ทำงานยังไง

เรียกต่อ: isPowered(). คืนค่า: this.isPowered() && this.droppedSkulls < 1.

Parameters

  • ไม่มี

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

Creeper instance = ...;
boolean result = instance.canDropMobsSkull();

net.minecraft.world.entity.monster.Creeper#causeFallDamage(float,float,DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Creeper.java:80
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ causeFallDamage ตาม implementation ของ Creeper

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: swell. คืนค่า: bl.

Parameters

  • float f
  • float g
  • DamageSource damageSource

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

Creeper instance = ...;
DamageSource damageSource = ...;
boolean result = instance.causeFallDamage(0.0F, 0.0F, damageSource);

net.minecraft.world.entity.monster.Creeper#createAttributes()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Creeper.java:71
  • Modifiers: public static
  • Return: AttributeSupplier.Builder

คืออะไร

สร้าง Attributes

ทำงานยังไง

เรียกต่อ: createMonsterAttributes(), add(). คืนค่า: Monster.createMonsterAttributes().add(Attributes.MOVEMENT_SPEED, 0.25).

Parameters

  • ไม่มี

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

AttributeSupplier.Builder result = Creeper.createAttributes();

net.minecraft.world.entity.monster.Creeper#Creeper(EntityType<? extends Creeper>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Creeper.java:53
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • EntityType<? extends Creeper> entityType
  • Level level

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

EntityType<? extends Creeper> entityType = ...;
Level level = ...;
Creeper instance = new Creeper(entityType, level);

net.minecraft.world.entity.monster.Creeper#defineSynchedData(SynchedEntityData.Builder)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Creeper.java:91
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ defineSynchedData ตาม implementation ของ Creeper

ทำงานยังไง

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

Parameters

  • SynchedEntityData.Builder builder

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

SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
    super.defineSynchedData(builder);
}

net.minecraft.world.entity.monster.Creeper#doHurtTarget(ServerLevel,Entity)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Creeper.java:183
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ doHurtTarget ตาม implementation ของ Creeper

ทำงานยังไง

คืนค่า: true.

Parameters

  • ServerLevel serverLevel
  • Entity entity

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

Creeper instance = ...;
ServerLevel serverLevel = ...;
Entity entity = ...;
boolean result = instance.doHurtTarget(serverLevel, entity);

net.minecraft.world.entity.monster.Creeper#dropCustomDeathLoot(ServerLevel,DamageSource,boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Creeper.java:173
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ dropCustomDeathLoot ตาม implementation ของ Creeper

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getEntity(), canDropMobsSkull(), increaseDroppedSkulls(), spawnAtLocation().

Parameters

  • ServerLevel serverLevel
  • DamageSource damageSource
  • boolean bl

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

ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
@Override
protected void dropCustomDeathLoot(ServerLevel serverLevel, DamageSource damageSource, boolean bl) {
    super.dropCustomDeathLoot(serverLevel, damageSource, bl);
}

net.minecraft.world.entity.monster.Creeper#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Creeper.java:168
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

คืนค่า: SoundEvents.CREEPER_DEATH.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.monster.Creeper#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Creeper.java:163
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

คืนค่า: SoundEvents.CREEPER_HURT.

Parameters

  • DamageSource damageSource

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

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

net.minecraft.world.entity.monster.Creeper#getMaxFallDistance()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Creeper.java:75
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Max Fall Distance

ทำงานยังไง

เรียกต่อ: getTarget(), getComfortableFallDistance(), getHealth(). คืนค่า: this.getTarget() == null ? this.getComfortableFallDistance(0.0F) : this.getComfortableFallDistance(this.getHealth() - 1.0F).

Parameters

  • ไม่มี

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

Creeper instance = ...;
int result = instance.getMaxFallDistance();

net.minecraft.world.entity.monster.Creeper#getSwellDir()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Creeper.java:196
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Swell Dir

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Creeper instance = ...;
int result = instance.getSwellDir();

net.minecraft.world.entity.monster.Creeper#getSwelling(float)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Creeper.java:192
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Swelling

ทำงานยังไง

เรียกต่อ: lerp(). คืนค่า: Mth.lerp(f, this.oldSwell, this.swell) / (this.maxSwell - 2).

Parameters

  • float f

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

Creeper instance = ...;
float result = instance.getSwelling(0.0F);

net.minecraft.world.entity.monster.Creeper#ignite()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Creeper.java:264
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ ignite ตาม implementation ของ Creeper

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Creeper instance = ...;
instance.ignite();

net.minecraft.world.entity.monster.Creeper#increaseDroppedSkulls()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Creeper.java:272
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ increaseDroppedSkulls ตาม implementation ของ Creeper

ทำงานยังไง

แก้ state: droppedSkulls.

Parameters

  • ไม่มี

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

Creeper instance = ...;
instance.increaseDroppedSkulls();

net.minecraft.world.entity.monster.Creeper#isIgnited()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Creeper.java:260
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Creeper instance = ...;
boolean result = instance.isIgnited();

net.minecraft.world.entity.monster.Creeper#isPowered()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Creeper.java:188
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Creeper instance = ...;
boolean result = instance.isPowered();

net.minecraft.world.entity.monster.Creeper#mobInteract(Player,InteractionHand)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Creeper.java:210
  • Modifiers: protected
  • Return: InteractionResult

คืออะไร

ดำเนินการ mobInteract ตาม implementation ของ Creeper

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getItemInHand(), is(), level(), playSound(), getX(), getY(), getZ(), getSoundSource(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • Player player
  • InteractionHand interactionHand

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

Player player = ...;
InteractionHand interactionHand = ...;
@Override
protected InteractionResult mobInteract(Player player, InteractionHand interactionHand) {
    return super.mobInteract(player, interactionHand);
}

net.minecraft.world.entity.monster.Creeper#readAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Creeper.java:111
  • Modifiers: public
  • Return: void

คืออะไร

อ่าน Additional Save Data

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: maxSwell, explosionRadius. เรียกต่อ: set(), getBoolean(), contains(), getShort(), getByte(), ignite().

Parameters

  • CompoundTag compoundTag

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

Creeper instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Creeper#registerGoals()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Creeper.java:57
  • Modifiers: protected
  • Return: void

คืออะไร

ลงทะเบียน Goals

ทำงานยังไง

เรียกต่อ: addGoal(). สร้างออบเจ็กต์: FloatGoal, SwellGoal, AvoidEntityGoal<>, MeleeAttackGoal.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Creeper#setSwellDir(int)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Creeper.java:200
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Swell Dir

ทำงานยังไง

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

Parameters

  • int i

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

Creeper instance = ...;
instance.setSwellDir(0);

net.minecraft.world.entity.monster.Creeper#setTarget(LivingEntity)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Creeper.java:156
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Target

ทำงานยังไง

ตรวจเงื่อนไขด้วย if.

Parameters

  • LivingEntity livingEntity

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

Creeper instance = ...;
LivingEntity livingEntity = ...;
instance.setTarget(livingEntity);

net.minecraft.world.entity.monster.Creeper#thunderHit(ServerLevel,LightningBolt)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Creeper.java:204
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ thunderHit ตาม implementation ของ Creeper

ทำงานยังไง

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

Parameters

  • ServerLevel serverLevel
  • LightningBolt lightningBolt

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

Creeper instance = ...;
ServerLevel serverLevel = ...;
LightningBolt lightningBolt = ...;
instance.thunderHit(serverLevel, lightningBolt);

net.minecraft.world.entity.monster.Creeper#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Creeper.java:128
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: oldSwell, swell. เรียกต่อ: isAlive(), isIgnited(), setSwellDir(), getSwellDir(), playSound(), gameEvent(), explodeCreeper().

Parameters

  • ไม่มี

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

Creeper instance = ...;
instance.tick();

CrossbowAttackMob

  • Full name: net.minecraft.world.entity.monster.CrossbowAttackMob
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/CrossbowAttackMob.java
  • Type: interface
  • Modifiers: public
  • Implements: RangedAttackMob

net.minecraft.world.entity.monster.CrossbowAttackMob#getTarget()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/CrossbowAttackMob.java:14
  • Modifiers: ``
  • Return: LivingEntity

คืออะไร

อ่านค่า Target

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

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

CrossbowAttackMob instance = ...;
LivingEntity result = instance.getTarget();

net.minecraft.world.entity.monster.CrossbowAttackMob#onCrossbowAttackPerformed()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/CrossbowAttackMob.java:17
  • Modifiers: ``
  • Return: void

คืออะไร

จัดการเหตุการณ์ Crossbow Attack Performed

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

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

CrossbowAttackMob instance = ...;
instance.onCrossbowAttackPerformed();

net.minecraft.world.entity.monster.CrossbowAttackMob#performCrossbowAttack(LivingEntity,float)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/CrossbowAttackMob.java:19
  • Modifiers: default
  • Return: void

คืออะไร

ดำเนินการ performCrossbowAttack ตาม implementation ของ CrossbowAttackMob

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getWeaponHoldingHand(), getItemInHand(), getItem(), performShooting(), level(), getDifficulty(), getId(), getTarget().

Parameters

  • LivingEntity livingEntity
  • float f

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

CrossbowAttackMob instance = ...;
LivingEntity livingEntity = ...;
instance.performCrossbowAttack(livingEntity, 0.0F);

net.minecraft.world.entity.monster.CrossbowAttackMob#setChargingCrossbow(boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/CrossbowAttackMob.java:12
  • Modifiers: ``
  • Return: void

คืออะไร

กำหนดค่า Charging Crossbow

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • boolean bl

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

CrossbowAttackMob instance = ...;
instance.setChargingCrossbow(true);

Drowned

  • Full name: net.minecraft.world.entity.monster.Drowned
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/Drowned.java
  • Type: class
  • Modifiers: public
  • Extends: Zombie
  • Implements: RangedAttackMob

net.minecraft.world.entity.monster.Drowned#addBehaviourGoals()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Drowned.java:78
  • Modifiers: protected
  • Return: void

คืออะไร

เพิ่ม Behaviour Goals

ทำงานยังไง

เรียกต่อ: addGoal(), DrownedGoToWaterGoal(), DrownedTridentAttackGoal(), DrownedAttackGoal(), DrownedGoToBeachGoal(), DrownedSwimUpGoal(), level(), getSeaLevel(). สร้างออบเจ็กต์: Drowned.DrownedGoToWaterGoal, Drowned.DrownedTridentAttackGoal, Drowned.DrownedAttackGoal, Drowned.DrownedGoToBeachGoal.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Drowned#canReplaceCurrentItem(ItemStack,ItemStack,EquipmentSlot)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Drowned.java:179
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Replace Current Item

ทำงานยังไง

เรียกต่อ: is(). คืนค่า: itemStack2.is(Items.NAUTILUS_SHELL) ? false : super.canReplaceCurrentItem(itemStack, itemStack2, equipmentSlot).

Parameters

  • ItemStack itemStack
  • ItemStack itemStack2
  • EquipmentSlot equipmentSlot

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

ItemStack itemStack = ...;
ItemStack itemStack2 = ...;
EquipmentSlot equipmentSlot = ...;
@Override
protected boolean canReplaceCurrentItem(ItemStack itemStack, ItemStack itemStack2, EquipmentSlot equipmentSlot) {
    return super.canReplaceCurrentItem(itemStack, itemStack2, equipmentSlot);
}

net.minecraft.world.entity.monster.Drowned#canSpawnInLiquids()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Drowned.java:157
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Spawn In Liquids

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Drowned#checkDrownedSpawnRules(EntityType<Drowned>,ServerLevelAccessor,EntitySpawnReason,BlockPos,RandomSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Drowned.java:108
  • Modifiers: public static
  • Return: boolean

คืออะไร

ตรวจสอบ Drowned Spawn Rules

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getFluidState(), below(), is(), isSpawner(), getBiome(), getDifficulty(), ignoresLightRequirements(), isDarkEnoughToSpawn(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • EntityType<Drowned> entityType
  • ServerLevelAccessor serverLevelAccessor
  • EntitySpawnReason entitySpawnReason
  • BlockPos blockPos
  • RandomSource randomSource

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

EntityType<Drowned> entityType = ...;
ServerLevelAccessor serverLevelAccessor = ...;
EntitySpawnReason entitySpawnReason = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
boolean result = Drowned.checkDrownedSpawnRules(entityType, serverLevelAccessor, entitySpawnReason, blockPos, randomSource);

net.minecraft.world.entity.monster.Drowned#checkSpawnObstruction(LevelReader)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Drowned.java:189
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบ Spawn Obstruction

ทำงานยังไง

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

Parameters

  • LevelReader levelReader

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

Drowned instance = ...;
LevelReader levelReader = ...;
boolean result = instance.checkSpawnObstruction(levelReader);

net.minecraft.world.entity.monster.Drowned#closeToNextPos()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Drowned.java:241
  • Modifiers: protected
  • Return: boolean

คืออะไร

ปิด To Next Pos

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getNavigation(), getPath(), getTarget(), distanceToSqr(), getX(), getY(), getZ(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Drowned#convertsInWater()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Drowned.java:184
  • Modifiers: protected
  • Return: boolean

คืออะไร

ดำเนินการ convertsInWater ตาม implementation ของ Drowned

ทำงานยังไง

คืนค่า: false.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Drowned#createAttributes()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Drowned.java:74
  • Modifiers: public static
  • Return: AttributeSupplier.Builder

คืออะไร

สร้าง Attributes

ทำงานยังไง

เรียกต่อ: add(). คืนค่า: Zombie.createAttributes().add(Attributes.STEP_HEIGHT, 1.0).

Parameters

  • ไม่มี

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

AttributeSupplier.Builder result = Drowned.createAttributes();

net.minecraft.world.entity.monster.Drowned#Drowned(EntityType<? extends Drowned>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Drowned.java:66
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: moveControl, waterNavigation, groundNavigation. เรียกต่อ: DrownedMoveControl(), setPathfindingMalus(). สร้างออบเจ็กต์: Drowned.DrownedMoveControl, WaterBoundPathNavigation, GroundPathNavigation.

Parameters

  • EntityType<? extends Drowned> entityType
  • Level level

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

EntityType<? extends Drowned> entityType = ...;
Level level = ...;
Drowned instance = new Drowned(entityType, level);

net.minecraft.world.entity.monster.Drowned#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Drowned.java:95
  • Modifiers: public
  • Return: SpawnGroupData

คืออะไร

ดำเนินการ finalizeSpawn ตาม implementation ของ Drowned

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getItemBySlot(), isEmpty(), getRandom(), nextFloat(), setItemSlot(), setGuaranteedDrop(). สร้างออบเจ็กต์: ItemStack. คืนค่า: spawnGroupData.

Parameters

  • ServerLevelAccessor serverLevelAccessor
  • DifficultyInstance difficultyInstance
  • EntitySpawnReason entitySpawnReason
  • SpawnGroupData spawnGroupData

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

Drowned instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);

net.minecraft.world.entity.monster.Drowned#getAmbientSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Drowned.java:132
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Ambient Sound

ทำงานยังไง

เรียกต่อ: isInWater(). คืนค่า: this.isInWater() ? SoundEvents.DROWNED_AMBIENT_WATER : SoundEvents.DROWNED_AMBIENT.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getAmbientSound() {
    return super.getAmbientSound();
}

net.minecraft.world.entity.monster.Drowned#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Drowned.java:142
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

เรียกต่อ: isInWater(). คืนค่า: this.isInWater() ? SoundEvents.DROWNED_DEATH_WATER : SoundEvents.DROWNED_DEATH.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.monster.Drowned#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Drowned.java:137
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

เรียกต่อ: isInWater(). คืนค่า: this.isInWater() ? SoundEvents.DROWNED_HURT_WATER : SoundEvents.DROWNED_HURT.

Parameters

  • DamageSource damageSource

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

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

net.minecraft.world.entity.monster.Drowned#getPreferredWeaponType()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Drowned.java:272
  • Modifiers: public
  • Return: TagKey<Item>

คืออะไร

อ่านค่า Preferred Weapon Type

ทำงานยังไง

คืนค่า: ItemTags.DROWNED_PREFERRED_WEAPONS.

Parameters

  • ไม่มี

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

Drowned instance = ...;
TagKey<Item> result = instance.getPreferredWeaponType();

net.minecraft.world.entity.monster.Drowned#getSkull()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Drowned.java:162
  • Modifiers: protected
  • Return: ItemStack

คืออะไร

อ่านค่า Skull

ทำงานยังไง

คืนค่า: ItemStack.EMPTY.

Parameters

  • ไม่มี

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

@Override
protected ItemStack getSkull() {
    return super.getSkull();
}

net.minecraft.world.entity.monster.Drowned#getStepSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Drowned.java:147
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Step Sound

ทำงานยังไง

คืนค่า: SoundEvents.DROWNED_STEP.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getStepSound() {
    return super.getStepSound();
}

net.minecraft.world.entity.monster.Drowned#getSwimSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Drowned.java:152
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Swim Sound

ทำงานยังไง

คืนค่า: SoundEvents.DROWNED_SWIM.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getSwimSound() {
    return super.getSwimSound();
}

net.minecraft.world.entity.monster.Drowned#isPushedByFluid()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Drowned.java:198
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Pushed By Fluid

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Drowned instance = ...;
boolean result = instance.isPushedByFluid();

net.minecraft.world.entity.monster.Drowned#isVisuallySwimming()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Drowned.java:236
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Visually Swimming

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Drowned instance = ...;
boolean result = instance.isVisuallySwimming();

net.minecraft.world.entity.monster.Drowned#okTarget(LivingEntity)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Drowned.java:194
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ okTarget ตาม implementation ของ Drowned

ทำงานยังไง

เรียกต่อ: level(), isDay(), isInWater(). คืนค่า: livingEntity != null ? !this.level().isDay() || livingEntity.isInWater() : false.

Parameters

  • LivingEntity livingEntity

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

Drowned instance = ...;
LivingEntity livingEntity = ...;
boolean result = instance.okTarget(livingEntity);

net.minecraft.world.entity.monster.Drowned#performRangedAttack(LivingEntity,float)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Drowned.java:256
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ performRangedAttack ตาม implementation ของ Drowned

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getMainHandItem(), is(), level(), getX(), getY(), getZ(), sqrt(), spawnProjectileUsingShoot(). สร้างออบเจ็กต์: ItemStack, ThrownTrident.

Parameters

  • LivingEntity livingEntity
  • float f

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

Drowned instance = ...;
LivingEntity livingEntity = ...;
instance.performRangedAttack(livingEntity, 0.0F);

net.minecraft.world.entity.monster.Drowned#populateDefaultEquipmentSlots(RandomSource,DifficultyInstance)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Drowned.java:167
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ populateDefaultEquipmentSlots ตาม implementation ของ Drowned

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: nextFloat(), nextInt(), setItemSlot(). สร้างออบเจ็กต์: ItemStack.

Parameters

  • RandomSource randomSource
  • DifficultyInstance difficultyInstance

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

RandomSource randomSource = ...;
DifficultyInstance difficultyInstance = ...;
@Override
protected void populateDefaultEquipmentSlots(RandomSource randomSource, DifficultyInstance difficultyInstance) {
    super.populateDefaultEquipmentSlots(randomSource, difficultyInstance);
}

net.minecraft.world.entity.monster.Drowned#setSearchingForLand(boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Drowned.java:277
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Searching For Land

ทำงานยังไง

แก้ state: searchingForLand.

Parameters

  • boolean bl

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

Drowned instance = ...;
instance.setSearchingForLand(true);

net.minecraft.world.entity.monster.Drowned#travel(Vec3)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Drowned.java:212
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ travel ตาม implementation ของ Drowned

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isControlledByLocalInstance(), isUnderWater(), wantsToSwim(), moveRelative(), move(), getDeltaMovement(), setDeltaMovement(), scale().

Parameters

  • Vec3 vec3

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

Drowned instance = ...;
Vec3 vec3 = ...;
instance.travel(vec3);

net.minecraft.world.entity.monster.Drowned#updateSwimming()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Drowned.java:223
  • Modifiers: public
  • Return: void

คืออะไร

อัปเดต Swimming

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: navigation. เรียกต่อ: level(), isEffectiveAi(), isUnderWater(), wantsToSwim(), setSwimming().

Parameters

  • ไม่มี

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

Drowned instance = ...;
instance.updateSwimming();

ElderGuardian

  • Full name: net.minecraft.world.entity.monster.ElderGuardian
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/ElderGuardian.java
  • Type: class
  • Modifiers: public
  • Extends: Guardian

net.minecraft.world.entity.monster.ElderGuardian#createAttributes()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ElderGuardian.java:34
  • Modifiers: public static
  • Return: AttributeSupplier.Builder

คืออะไร

สร้าง Attributes

ทำงานยังไง

เรียกต่อ: add(). คืนค่า: Guardian.createAttributes().add(Attributes.MOVEMENT_SPEED, 0.3F).add(Attributes.ATTACK_DAMAGE, 8.0).add(Attributes.MAX_HEALTH, 80.0).

Parameters

  • ไม่มี

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

AttributeSupplier.Builder result = ElderGuardian.createAttributes();

net.minecraft.world.entity.monster.ElderGuardian#customServerAiStep(ServerLevel)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ElderGuardian.java:63
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ customServerAiStep ตาม implementation ของ ElderGuardian

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getId(), addEffectToPlayersAround(), position(), forEach(), send(), isSilent(), hasRestriction(), restrictTo(). สร้างออบเจ็กต์: MobEffectInstance, ClientboundGameEventPacket.

Parameters

  • ServerLevel serverLevel

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

ServerLevel serverLevel = ...;
@Override
protected void customServerAiStep(ServerLevel serverLevel) {
    super.customServerAiStep(serverLevel);
}

net.minecraft.world.entity.monster.ElderGuardian#ElderGuardian(EntityType<? extends ElderGuardian>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ElderGuardian.java:26
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • EntityType<? extends ElderGuardian> entityType
  • Level level

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

EntityType<? extends ElderGuardian> entityType = ...;
Level level = ...;
ElderGuardian instance = new ElderGuardian(entityType, level);

net.minecraft.world.entity.monster.ElderGuardian#getAmbientSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ElderGuardian.java:43
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Ambient Sound

ทำงานยังไง

เรียกต่อ: isInWaterOrBubble(). คืนค่า: this.isInWaterOrBubble() ? SoundEvents.ELDER_GUARDIAN_AMBIENT : SoundEvents.ELDER_GUARDIAN_AMBIENT_LAND.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getAmbientSound() {
    return super.getAmbientSound();
}

net.minecraft.world.entity.monster.ElderGuardian#getAttackDuration()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ElderGuardian.java:38
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Attack Duration

ทำงานยังไง

คืนค่า: 60.

Parameters

  • ไม่มี

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

ElderGuardian instance = ...;
int result = instance.getAttackDuration();

net.minecraft.world.entity.monster.ElderGuardian#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ElderGuardian.java:53
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

เรียกต่อ: isInWaterOrBubble(). คืนค่า: this.isInWaterOrBubble() ? SoundEvents.ELDER_GUARDIAN_DEATH : SoundEvents.ELDER_GUARDIAN_DEATH_LAND.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.monster.ElderGuardian#getFlopSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ElderGuardian.java:58
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Flop Sound

ทำงานยังไง

คืนค่า: SoundEvents.ELDER_GUARDIAN_FLOP.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getFlopSound() {
    return super.getFlopSound();
}

net.minecraft.world.entity.monster.ElderGuardian#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ElderGuardian.java:48
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

เรียกต่อ: isInWaterOrBubble(). คืนค่า: this.isInWaterOrBubble() ? SoundEvents.ELDER_GUARDIAN_HURT : SoundEvents.ELDER_GUARDIAN_HURT_LAND.

Parameters

  • DamageSource damageSource

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

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

EnderMan

  • Full name: net.minecraft.world.entity.monster.EnderMan
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/EnderMan.java
  • Type: class
  • Modifiers: public
  • Extends: Monster
  • Implements: NeutralMob

net.minecraft.world.entity.monster.EnderMan#addAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/EnderMan.java:188
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Additional Save Data

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getCarriedBlock(), put(), writeBlockState(), addPersistentAngerSaveData().

Parameters

  • CompoundTag compoundTag

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

EnderMan instance = ...;
CompoundTag compoundTag = ...;
instance.addAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.EnderMan#aiStep()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/EnderMan.java:218
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ aiStep ตาม implementation ของ EnderMan

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: jumping. เรียกต่อ: level(), addParticle(), getRandomX(), getRandomY(), getRandomZ(), nextDouble(), updatePersistentAnger().

Parameters

  • ไม่มี

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

EnderMan instance = ...;
instance.aiStep();

net.minecraft.world.entity.monster.EnderMan#createAttributes()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/EnderMan.java:109
  • Modifiers: public static
  • Return: AttributeSupplier.Builder

คืออะไร

สร้าง Attributes

ทำงานยังไง

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

Parameters

  • ไม่มี

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

AttributeSupplier.Builder result = EnderMan.createAttributes();

net.minecraft.world.entity.monster.EnderMan#customServerAiStep(ServerLevel)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/EnderMan.java:248
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ customServerAiStep ตาม implementation ของ EnderMan

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isDay(), getLightLevelDependentMagicValue(), canSeeSky(), blockPosition(), nextFloat(), setTarget(), teleport().

Parameters

  • ServerLevel serverLevel

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

ServerLevel serverLevel = ...;
@Override
protected void customServerAiStep(ServerLevel serverLevel) {
    super.customServerAiStep(serverLevel);
}

net.minecraft.world.entity.monster.EnderMan#defineSynchedData(SynchedEntityData.Builder)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/EnderMan.java:136
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ defineSynchedData ตาม implementation ของ EnderMan

ทำงานยังไง

เรียกต่อ: define(), empty().

Parameters

  • SynchedEntityData.Builder builder

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

SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
    super.defineSynchedData(builder);
}

net.minecraft.world.entity.monster.EnderMan#dropCustomDeathLoot(ServerLevel,DamageSource,boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/EnderMan.java:324
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ dropCustomDeathLoot ตาม implementation ของ EnderMan

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getCarriedBlock(), enchantItemFromProvider(), registryAccess(), getCurrentDifficultyAt(), blockPosition(), getRandom(), Builder(), level(). สร้างออบเจ็กต์: ItemStack, LootParams.Builder.

Parameters

  • ServerLevel serverLevel
  • DamageSource damageSource
  • boolean bl

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

ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
@Override
protected void dropCustomDeathLoot(ServerLevel serverLevel, DamageSource damageSource, boolean bl) {
    super.dropCustomDeathLoot(serverLevel, damageSource, bl);
}

net.minecraft.world.entity.monster.EnderMan#EnderMan(EntityType<? extends EnderMan>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/EnderMan.java:88
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • EntityType<? extends EnderMan> entityType
  • Level level

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

EntityType<? extends EnderMan> entityType = ...;
Level level = ...;
EnderMan instance = new EnderMan(entityType, level);

net.minecraft.world.entity.monster.EnderMan#getAmbientSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/EnderMan.java:309
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Ambient Sound

ทำงานยังไง

เรียกต่อ: isCreepy(). คืนค่า: this.isCreepy() ? SoundEvents.ENDERMAN_SCREAM : SoundEvents.ENDERMAN_AMBIENT.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getAmbientSound() {
    return super.getAmbientSound();
}

net.minecraft.world.entity.monster.EnderMan#getCarriedBlock()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/EnderMan.java:352
  • Modifiers: public
  • Return: BlockState

คืออะไร

อ่านค่า Carried Block

ทำงานยังไง

เรียกต่อ: get(), orElse(). คืนค่า: this.entityData.get(DATA_CARRY_STATE).orElse(null).

Parameters

  • ไม่มี

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

EnderMan instance = ...;
BlockState result = instance.getCarriedBlock();

net.minecraft.world.entity.monster.EnderMan#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/EnderMan.java:319
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

คืนค่า: SoundEvents.ENDERMAN_DEATH.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.monster.EnderMan#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/EnderMan.java:314
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

คืนค่า: SoundEvents.ENDERMAN_HURT.

Parameters

  • DamageSource damageSource

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

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

net.minecraft.world.entity.monster.EnderMan#getPersistentAngerTarget()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/EnderMan.java:164
  • Modifiers: public
  • Return: UUID

คืออะไร

อ่านค่า Persistent Anger Target

ทำงานยังไง

คืนค่า: this.persistentAngerTarget.

Parameters

  • ไม่มี

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

EnderMan instance = ...;
UUID result = instance.getPersistentAngerTarget();

net.minecraft.world.entity.monster.EnderMan#getRemainingPersistentAngerTime()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/EnderMan.java:154
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Remaining Persistent Anger Time

ทำงานยังไง

คืนค่า: this.remainingPersistentAngerTime.

Parameters

  • ไม่มี

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

EnderMan instance = ...;
int result = instance.getRemainingPersistentAngerTime();

net.minecraft.world.entity.monster.EnderMan#hasBeenStaredAt()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/EnderMan.java:394
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Been Stared At

ทำงานยังไง

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

Parameters

  • ไม่มี

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

EnderMan instance = ...;
boolean result = instance.hasBeenStaredAt();

net.minecraft.world.entity.monster.EnderMan#hurtServer(ServerLevel,DamageSource,float)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/EnderMan.java:357
  • Modifiers: public
  • Return: boolean

คืออะไร

ประมวลผลความเสียหาย Server

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: isInvulnerableTo(), getDirectEntity(), is(), getEntity(), nextInt(), teleport(), hurtWithCleanWater(). มีจุด return อย่างน้อย 4 จุด.

Parameters

  • ServerLevel serverLevel
  • DamageSource damageSource
  • float f

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

EnderMan instance = ...;
ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
boolean result = instance.hurtServer(serverLevel, damageSource, 0.0F);

net.minecraft.world.entity.monster.EnderMan#isCreepy()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/EnderMan.java:390
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ไม่มี

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

EnderMan instance = ...;
boolean result = instance.isCreepy();

net.minecraft.world.entity.monster.EnderMan#isSensitiveToWater()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/EnderMan.java:243
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Sensitive To Water

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

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

EnderMan instance = ...;
boolean result = instance.isSensitiveToWater();

net.minecraft.world.entity.monster.EnderMan#onSyncedDataUpdated(EntityDataAccessor<?>)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/EnderMan.java:179
  • Modifiers: public
  • Return: void

คืออะไร

จัดการเหตุการณ์ Synced Data Updated

ทำงานยังไง

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

Parameters

  • EntityDataAccessor<?> entityDataAccessor

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

EnderMan instance = ...;
EntityDataAccessor<?> entityDataAccessor = ...;
instance.onSyncedDataUpdated(entityDataAccessor);

net.minecraft.world.entity.monster.EnderMan#playStareSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/EnderMan.java:170
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ playStareSound ตาม implementation ของ EnderMan

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: lastStareSound. เรียกต่อ: isSilent(), level(), playLocalSound(), getX(), getEyeY(), getZ(), getSoundSource().

Parameters

  • ไม่มี

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

EnderMan instance = ...;
instance.playStareSound();

net.minecraft.world.entity.monster.EnderMan#readAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/EnderMan.java:199
  • Modifiers: public
  • Return: void

คืออะไร

อ่าน Additional Save Data

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: contains(), readBlockState(), level(), holderLookup(), getCompound(), isAir(), setCarriedBlock(), readPersistentAngerSaveData().

Parameters

  • CompoundTag compoundTag

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

EnderMan instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.EnderMan#registerGoals()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/EnderMan.java:93
  • Modifiers: protected
  • Return: void

คืออะไร

ลงทะเบียน Goals

ทำงานยังไง

เรียกต่อ: addGoal(), EndermanFreezeWhenLookedAt(), EndermanLeaveBlockGoal(), EndermanTakeBlockGoal(), EndermanLookForPlayerGoal(). สร้างออบเจ็กต์: FloatGoal, EnderMan.EndermanFreezeWhenLookedAt, MeleeAttackGoal, WaterAvoidingRandomStrollGoal.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.EnderMan#requiresCustomPersistence()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/EnderMan.java:402
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ requiresCustomPersistence ตาม implementation ของ EnderMan

ทำงานยังไง

เรียกต่อ: getCarriedBlock(). คืนค่า: super.requiresCustomPersistence() || this.getCarriedBlock() != null.

Parameters

  • ไม่มี

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

EnderMan instance = ...;
boolean result = instance.requiresCustomPersistence();

net.minecraft.world.entity.monster.EnderMan#setBeingStaredAt()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/EnderMan.java:398
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Being Stared At

ทำงานยังไง

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

Parameters

  • ไม่มี

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

EnderMan instance = ...;
instance.setBeingStaredAt();

net.minecraft.world.entity.monster.EnderMan#setCarriedBlock(BlockState)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/EnderMan.java:348
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Carried Block

ทำงานยังไง

เรียกต่อ: set(), ofNullable().

Parameters

  • BlockState blockState

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

EnderMan instance = ...;
BlockState blockState = ...;
instance.setCarriedBlock(blockState);

net.minecraft.world.entity.monster.EnderMan#setPersistentAngerTarget(UUID)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/EnderMan.java:159
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Persistent Anger Target

ทำงานยังไง

แก้ state: persistentAngerTarget.

Parameters

  • UUID uUID

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

EnderMan instance = ...;
UUID uUID = ...;
instance.setPersistentAngerTarget(uUID);

net.minecraft.world.entity.monster.EnderMan#setRemainingPersistentAngerTime(int)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/EnderMan.java:149
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Remaining Persistent Anger Time

ทำงานยังไง

แก้ state: remainingPersistentAngerTime.

Parameters

  • int i

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

EnderMan instance = ...;
instance.setRemainingPersistentAngerTime(0);

net.minecraft.world.entity.monster.EnderMan#setTarget(LivingEntity)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/EnderMan.java:118
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Target

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: targetChangeTime. เรียกต่อ: getAttribute(), set(), removeModifier(), hasModifier(), addTransientModifier().

Parameters

  • LivingEntity livingEntity

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

EnderMan instance = ...;
LivingEntity livingEntity = ...;
instance.setTarget(livingEntity);

net.minecraft.world.entity.monster.EnderMan#startPersistentAngerTimer()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/EnderMan.java:144
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม Persistent Anger Timer

ทำงานยังไง

เรียกต่อ: setRemainingPersistentAngerTime(), sample().

Parameters

  • ไม่มี

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

EnderMan instance = ...;
instance.startPersistentAngerTimer();

net.minecraft.world.entity.monster.EnderMan#teleport()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/EnderMan.java:261
  • Modifiers: protected
  • Return: boolean

คืออะไร

ดำเนินการ teleport ตาม implementation ของ EnderMan

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: level(), isClientSide(), isAlive(), getX(), nextDouble(), getY(), nextInt(), getZ(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

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

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

Endermite

  • Full name: net.minecraft.world.entity.monster.Endermite
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/Endermite.java
  • Type: class
  • Modifiers: public
  • Extends: Monster

net.minecraft.world.entity.monster.Endermite#addAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Endermite.java:84
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Additional Save Data

ทำงานยังไง

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

Parameters

  • CompoundTag compoundTag

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

Endermite instance = ...;
CompoundTag compoundTag = ...;
instance.addAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Endermite#aiStep()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Endermite.java:102
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ aiStep ตาม implementation ของ Endermite

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: life. เรียกต่อ: level(), addParticle(), getRandomX(), getRandomY(), getRandomZ(), nextDouble(), isPersistenceRequired(), discard().

Parameters

  • ไม่มี

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

Endermite instance = ...;
instance.aiStep();

net.minecraft.world.entity.monster.Endermite#checkEndermiteSpawnRules(EntityType<Endermite>,LevelAccessor,EntitySpawnReason,BlockPos,RandomSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Endermite.java:129
  • Modifiers: public static
  • Return: boolean

คืออะไร

ตรวจสอบ Endermite Spawn Rules

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: checkAnyLightMonsterSpawnRules(), isSpawner(), getNearestPlayer(), getX(), getY(), getZ(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • EntityType<Endermite> entityType
  • LevelAccessor levelAccessor
  • EntitySpawnReason entitySpawnReason
  • BlockPos blockPos
  • RandomSource randomSource

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

EntityType<Endermite> entityType = ...;
LevelAccessor levelAccessor = ...;
EntitySpawnReason entitySpawnReason = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
boolean result = Endermite.checkEndermiteSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource);

net.minecraft.world.entity.monster.Endermite#createAttributes()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Endermite.java:49
  • Modifiers: public static
  • Return: AttributeSupplier.Builder

คืออะไร

สร้าง Attributes

ทำงานยังไง

เรียกต่อ: createMonsterAttributes(), add(). คืนค่า: Monster.createMonsterAttributes().add(Attributes.MAX_HEALTH, 8.0).add(Attributes.MOVEMENT_SPEED, 0.25).add(Attributes.ATTACK_DAMAGE, 2.0).

Parameters

  • ไม่มี

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

AttributeSupplier.Builder result = Endermite.createAttributes();

net.minecraft.world.entity.monster.Endermite#Endermite(EntityType<? extends Endermite>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Endermite.java:32
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: xpReward.

Parameters

  • EntityType<? extends Endermite> entityType
  • Level level

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

EntityType<? extends Endermite> entityType = ...;
Level level = ...;
Endermite instance = new Endermite(entityType, level);

net.minecraft.world.entity.monster.Endermite#getAmbientSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Endermite.java:58
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Ambient Sound

ทำงานยังไง

คืนค่า: SoundEvents.ENDERMITE_AMBIENT.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getAmbientSound() {
    return super.getAmbientSound();
}

net.minecraft.world.entity.monster.Endermite#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Endermite.java:68
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

คืนค่า: SoundEvents.ENDERMITE_DEATH.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.monster.Endermite#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Endermite.java:63
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

คืนค่า: SoundEvents.ENDERMITE_HURT.

Parameters

  • DamageSource damageSource

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

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

net.minecraft.world.entity.monster.Endermite#getMovementEmission()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Endermite.java:53
  • Modifiers: protected
  • Return: Entity.MovementEmission

คืออะไร

อ่านค่า Movement Emission

ทำงานยังไง

คืนค่า: Entity.MovementEmission.EVENTS.

Parameters

  • ไม่มี

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

@Override
protected Entity.MovementEmission getMovementEmission() {
    return super.getMovementEmission();
}

net.minecraft.world.entity.monster.Endermite#playStepSound(BlockPos,BlockState)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Endermite.java:73
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ playStepSound ตาม implementation ของ Endermite

ทำงานยังไง

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

Parameters

  • BlockPos blockPos
  • BlockState blockState

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

BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected void playStepSound(BlockPos blockPos, BlockState blockState) {
    super.playStepSound(blockPos, blockState);
}

net.minecraft.world.entity.monster.Endermite#readAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Endermite.java:78
  • Modifiers: public
  • Return: void

คืออะไร

อ่าน Additional Save Data

ทำงานยังไง

แก้ state: life. เรียกต่อ: getInt().

Parameters

  • CompoundTag compoundTag

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

Endermite instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Endermite#registerGoals()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Endermite.java:37
  • Modifiers: protected
  • Return: void

คืออะไร

ลงทะเบียน Goals

ทำงานยังไง

เรียกต่อ: addGoal(), level(), setAlertOthers(). สร้างออบเจ็กต์: FloatGoal, ClimbOnTopOfPowderSnowGoal, MeleeAttackGoal, WaterAvoidingRandomStrollGoal.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Endermite#setYBodyRot(float)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Endermite.java:96
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า YBody Rot

ทำงานยังไง

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

Parameters

  • float f

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

Endermite instance = ...;
instance.setYBodyRot(0.0F);

net.minecraft.world.entity.monster.Endermite#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Endermite.java:90
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

แก้ state: yBodyRot. เรียกต่อ: getYRot().

Parameters

  • ไม่มี

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

Endermite instance = ...;
instance.tick();

Evoker

  • Full name: net.minecraft.world.entity.monster.Evoker
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/Evoker.java
  • Type: class
  • Modifiers: public
  • Extends: SpellcasterIllager

net.minecraft.world.entity.monster.Evoker#addAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Evoker.java:91
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Additional Save Data

ทำงานยังไง

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

Parameters

  • CompoundTag compoundTag

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

Evoker instance = ...;
CompoundTag compoundTag = ...;
instance.addAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Evoker#applyRaidBuffs(ServerLevel,int,boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Evoker.java:136
  • Modifiers: public
  • Return: void

คืออะไร

นำไปใช้ Raid Buffs

ทำงานยังไง

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

Parameters

  • ServerLevel serverLevel
  • int i
  • boolean bl

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

Evoker instance = ...;
ServerLevel serverLevel = ...;
instance.applyRaidBuffs(serverLevel, 0, true);

net.minecraft.world.entity.monster.Evoker#considersEntityAsAlly(Entity)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Evoker.java:96
  • Modifiers: protected
  • Return: boolean

คืออะไร

ดำเนินการ considersEntityAsAlly ตาม implementation ของ Evoker

ทำงานยังไง

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

Parameters

  • Entity entity

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

Entity entity = ...;
@Override
protected boolean considersEntityAsAlly(Entity entity) {
    return super.considersEntityAsAlly(entity);
}

net.minecraft.world.entity.monster.Evoker#createAttributes()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Evoker.java:72
  • Modifiers: public static
  • Return: AttributeSupplier.Builder

คืออะไร

สร้าง Attributes

ทำงานยังไง

เรียกต่อ: createMonsterAttributes(), add(). คืนค่า: Monster.createMonsterAttributes().add(Attributes.MOVEMENT_SPEED, 0.5).add(Attributes.FOLLOW_RANGE, 12.0).add(Attributes.MAX_HEALTH, 24.0).

Parameters

  • ไม่มี

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

AttributeSupplier.Builder result = Evoker.createAttributes();

net.minecraft.world.entity.monster.Evoker#defineSynchedData(SynchedEntityData.Builder)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Evoker.java:76
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ defineSynchedData ตาม implementation ของ Evoker

ทำงานยังไง

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

Parameters

  • SynchedEntityData.Builder builder

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

SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
    super.defineSynchedData(builder);
}

net.minecraft.world.entity.monster.Evoker#Evoker(EntityType<? extends Evoker>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Evoker.java:48
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: xpReward.

Parameters

  • EntityType<? extends Evoker> entityType
  • Level level

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

EntityType<? extends Evoker> entityType = ...;
Level level = ...;
Evoker instance = new Evoker(entityType, level);

net.minecraft.world.entity.monster.Evoker#getAmbientSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Evoker.java:107
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Ambient Sound

ทำงานยังไง

คืนค่า: SoundEvents.EVOKER_AMBIENT.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getAmbientSound() {
    return super.getAmbientSound();
}

net.minecraft.world.entity.monster.Evoker#getCastingSoundEvent()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Evoker.java:131
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Casting Sound Event

ทำงานยังไง

คืนค่า: SoundEvents.EVOKER_CAST_SPELL.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getCastingSoundEvent() {
    return super.getCastingSoundEvent();
}

net.minecraft.world.entity.monster.Evoker#getCelebrateSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Evoker.java:86
  • Modifiers: public
  • Return: SoundEvent

คืออะไร

อ่านค่า Celebrate Sound

ทำงานยังไง

คืนค่า: SoundEvents.EVOKER_CELEBRATE.

Parameters

  • ไม่มี

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

Evoker instance = ...;
SoundEvent result = instance.getCelebrateSound();

net.minecraft.world.entity.monster.Evoker#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Evoker.java:112
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

คืนค่า: SoundEvents.EVOKER_DEATH.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.monster.Evoker#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Evoker.java:117
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

คืนค่า: SoundEvents.EVOKER_HURT.

Parameters

  • DamageSource damageSource

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

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

net.minecraft.world.entity.monster.Evoker#readAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Evoker.java:81
  • Modifiers: public
  • Return: void

คืออะไร

อ่าน Additional Save Data

ทำงานยังไง

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

Parameters

  • CompoundTag compoundTag

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

Evoker instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Evoker#registerGoals()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Evoker.java:53
  • Modifiers: protected
  • Return: void

คืออะไร

ลงทะเบียน Goals

ทำงานยังไง

เรียกต่อ: addGoal(), EvokerCastingSpellGoal(), EvokerSummonSpellGoal(), EvokerAttackSpellGoal(), EvokerWololoSpellGoal(), setAlertOthers(), setUnseenMemoryTicks(). สร้างออบเจ็กต์: FloatGoal, Evoker.EvokerCastingSpellGoal, AvoidEntityGoal<>, Evoker.EvokerSummonSpellGoal.

Parameters

  • ไม่มี

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

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

Evoker$EvokerWololoSpellGoal

  • Full name: net.minecraft.world.entity.monster.Evoker$EvokerWololoSpellGoal
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/Evoker.java
  • Type: class
  • Modifiers: public
  • Extends: SpellcasterIllager.SpellcasterUseSpellGoal

net.minecraft.world.entity.monster.Evoker$EvokerWololoSpellGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Evoker.java:321
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: getWololoTarget(). คืนค่า: Evoker.this.getWololoTarget() != null && this.attackWarmupDelay > 0.

Parameters

  • ไม่มี

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

Evoker.EvokerWololoSpellGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.monster.Evoker$EvokerWololoSpellGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Evoker.java:293
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getTarget(), isCastingSpell(), getServerLevel(), level(), getGameRules(), getBoolean(), getNearbyEntities(), getBoundingBox(). มีจุด return อย่างน้อย 6 จุด.

Parameters

  • ไม่มี

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

Evoker.EvokerWololoSpellGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.monster.Evoker$EvokerWololoSpellGoal#getCastingInterval()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Evoker.java:350
  • Modifiers: protected
  • Return: int

คืออะไร

อ่านค่า Casting Interval

ทำงานยังไง

คืนค่า: 140.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Evoker$EvokerWololoSpellGoal#getCastingTime()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Evoker.java:345
  • Modifiers: protected
  • Return: int

คืออะไร

อ่านค่า Casting Time

ทำงานยังไง

คืนค่า: 60.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Evoker$EvokerWololoSpellGoal#getCastWarmupTime()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Evoker.java:340
  • Modifiers: protected
  • Return: int

คืออะไร

อ่านค่า Cast Warmup Time

ทำงานยังไง

คืนค่า: 40.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Evoker$EvokerWololoSpellGoal#getSpell()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Evoker.java:360
  • Modifiers: protected
  • Return: SpellcasterIllager.IllagerSpell

คืออะไร

อ่านค่า Spell

ทำงานยังไง

คืนค่า: SpellcasterIllager.IllagerSpell.WOLOLO.

Parameters

  • ไม่มี

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

@Override
protected SpellcasterIllager.IllagerSpell getSpell() {
    return super.getSpell();
}

net.minecraft.world.entity.monster.Evoker$EvokerWololoSpellGoal#getSpellPrepareSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Evoker.java:355
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Spell Prepare Sound

ทำงานยังไง

คืนค่า: SoundEvents.EVOKER_PREPARE_WOLOLO.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getSpellPrepareSound() {
    return super.getSpellPrepareSound();
}

net.minecraft.world.entity.monster.Evoker$EvokerWololoSpellGoal#performSpellCasting()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Evoker.java:332
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ performSpellCasting ตาม implementation ของ Evoker$EvokerWololoSpellGoal

ทำงานยังไง

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

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Evoker$EvokerWololoSpellGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Evoker.java:326
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Evoker.EvokerWololoSpellGoal instance = ...;
instance.stop();

Ghast

  • Full name: net.minecraft.world.entity.monster.Ghast
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/Ghast.java
  • Type: class
  • Modifiers: public
  • Extends: FlyingMob
  • Implements: Enemy

net.minecraft.world.entity.monster.Ghast#addAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ghast.java:142
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Additional Save Data

ทำงานยังไง

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

Parameters

  • CompoundTag compoundTag

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

Ghast instance = ...;
CompoundTag compoundTag = ...;
instance.addAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Ghast#checkGhastSpawnRules(EntityType<Ghast>,LevelAccessor,EntitySpawnReason,BlockPos,RandomSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ghast.java:129
  • Modifiers: public static
  • Return: boolean

คืออะไร

ตรวจสอบ Ghast Spawn Rules

ทำงานยังไง

เรียกต่อ: getDifficulty(), nextInt(), checkMobSpawnRules().

Parameters

  • EntityType<Ghast> entityType
  • LevelAccessor levelAccessor
  • EntitySpawnReason entitySpawnReason
  • BlockPos blockPos
  • RandomSource randomSource

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

EntityType<Ghast> entityType = ...;
LevelAccessor levelAccessor = ...;
EntitySpawnReason entitySpawnReason = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
boolean result = Ghast.checkGhastSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource);

net.minecraft.world.entity.monster.Ghast#createAttributes()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ghast.java:100
  • Modifiers: public static
  • Return: AttributeSupplier.Builder

คืออะไร

สร้าง Attributes

ทำงานยังไง

เรียกต่อ: createMobAttributes(), add(). คืนค่า: Mob.createMobAttributes().add(Attributes.MAX_HEALTH, 10.0).add(Attributes.FOLLOW_RANGE, 100.0).

Parameters

  • ไม่มี

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

AttributeSupplier.Builder result = Ghast.createAttributes();

net.minecraft.world.entity.monster.Ghast#defineSynchedData(SynchedEntityData.Builder)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ghast.java:94
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ defineSynchedData ตาม implementation ของ Ghast

ทำงานยังไง

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

Parameters

  • SynchedEntityData.Builder builder

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

SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
    super.defineSynchedData(builder);
}

net.minecraft.world.entity.monster.Ghast#getAmbientSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ghast.java:109
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Ambient Sound

ทำงานยังไง

คืนค่า: SoundEvents.GHAST_AMBIENT.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getAmbientSound() {
    return super.getAmbientSound();
}

net.minecraft.world.entity.monster.Ghast#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ghast.java:119
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

คืนค่า: SoundEvents.GHAST_DEATH.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.monster.Ghast#getExplosionPower()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ghast.java:65
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Explosion Power

ทำงานยังไง

คืนค่า: this.explosionPower.

Parameters

  • ไม่มี

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

Ghast instance = ...;
int result = instance.getExplosionPower();

net.minecraft.world.entity.monster.Ghast#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ghast.java:114
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

คืนค่า: SoundEvents.GHAST_HURT.

Parameters

  • DamageSource damageSource

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

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

net.minecraft.world.entity.monster.Ghast#getMaxSpawnClusterSize()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ghast.java:137
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Max Spawn Cluster Size

ทำงานยังไง

คืนค่า: 1.

Parameters

  • ไม่มี

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

Ghast instance = ...;
int result = instance.getMaxSpawnClusterSize();

net.minecraft.world.entity.monster.Ghast#getSoundSource()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ghast.java:104
  • Modifiers: public
  • Return: SoundSource

คืออะไร

อ่านค่า Sound Source

ทำงานยังไง

คืนค่า: SoundSource.HOSTILE.

Parameters

  • ไม่มี

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

Ghast instance = ...;
SoundSource result = instance.getSoundSource();

net.minecraft.world.entity.monster.Ghast#getSoundVolume()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ghast.java:124
  • Modifiers: protected
  • Return: float

คืออะไร

อ่านค่า Sound Volume

ทำงานยังไง

คืนค่า: 5.0F.

Parameters

  • ไม่มี

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

@Override
protected float getSoundVolume() {
    return super.getSoundVolume();
}

net.minecraft.world.entity.monster.Ghast#Ghast(EntityType<? extends Ghast>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ghast.java:39
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: xpReward, moveControl. เรียกต่อ: GhastMoveControl(). สร้างออบเจ็กต์: Ghast.GhastMoveControl.

Parameters

  • EntityType<? extends Ghast> entityType
  • Level level

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

EntityType<? extends Ghast> entityType = ...;
Level level = ...;
Ghast instance = new Ghast(entityType, level);

net.minecraft.world.entity.monster.Ghast#hurtServer(ServerLevel,DamageSource,float)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ghast.java:84
  • Modifiers: public
  • Return: boolean

คืออะไร

ประมวลผลความเสียหาย Server

ทำงานยังไง

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

Parameters

  • ServerLevel serverLevel
  • DamageSource damageSource
  • float f

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

Ghast instance = ...;
ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
boolean result = instance.hurtServer(serverLevel, damageSource, 0.0F);

net.minecraft.world.entity.monster.Ghast#isCharging()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ghast.java:57
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Ghast instance = ...;
boolean result = instance.isCharging();

net.minecraft.world.entity.monster.Ghast#isInvulnerableTo(ServerLevel,DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ghast.java:78
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Invulnerable To

ทำงานยังไง

เรียกต่อ: isInvulnerable(), is(), isReflectedFireball().

Parameters

  • ServerLevel serverLevel
  • DamageSource damageSource

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

Ghast instance = ...;
ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
boolean result = instance.isInvulnerableTo(serverLevel, damageSource);

net.minecraft.world.entity.monster.Ghast#readAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ghast.java:148
  • Modifiers: public
  • Return: void

คืออะไร

อ่าน Additional Save Data

ทำงานยังไง

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

Parameters

  • CompoundTag compoundTag

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

Ghast instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Ghast#registerGoals()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ghast.java:45
  • Modifiers: protected
  • Return: void

คืออะไร

ลงทะเบียน Goals

ทำงานยังไง

เรียกต่อ: addGoal(), RandomFloatAroundGoal(), GhastLookGoal(), GhastShootFireballGoal(), abs(), getY(). สร้างออบเจ็กต์: Ghast.RandomFloatAroundGoal, Ghast.GhastLookGoal, Ghast.GhastShootFireballGoal, NearestAttackableTargetGoal<>.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Ghast#setCharging(boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ghast.java:61
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Charging

ทำงานยังไง

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

Parameters

  • boolean bl

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

Ghast instance = ...;
instance.setCharging(true);

net.minecraft.world.entity.monster.Ghast#shouldDespawnInPeaceful()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ghast.java:69
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Despawn In Peaceful

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

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

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

Giant

  • Full name: net.minecraft.world.entity.monster.Giant
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/Giant.java
  • Type: class
  • Modifiers: public
  • Extends: Monster

net.minecraft.world.entity.monster.Giant#createAttributes()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Giant.java:15
  • Modifiers: public static
  • Return: AttributeSupplier.Builder

คืออะไร

สร้าง Attributes

ทำงานยังไง

เรียกต่อ: createMonsterAttributes(), add(). คืนค่า: Monster.createMonsterAttributes().add(Attributes.MAX_HEALTH, 100.0).add(Attributes.MOVEMENT_SPEED, 0.5).add(Attributes.ATTACK_DAMAGE, 50.0).

Parameters

  • ไม่มี

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

AttributeSupplier.Builder result = Giant.createAttributes();

net.minecraft.world.entity.monster.Giant#getWalkTargetValue(BlockPos,LevelReader)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Giant.java:19
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Walk Target Value

ทำงานยังไง

เรียกต่อ: getPathfindingCostFromLightLevels(). คืนค่า: levelReader.getPathfindingCostFromLightLevels(blockPos).

Parameters

  • BlockPos blockPos
  • LevelReader levelReader

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

Giant instance = ...;
BlockPos blockPos = ...;
LevelReader levelReader = ...;
float result = instance.getWalkTargetValue(blockPos, levelReader);

net.minecraft.world.entity.monster.Giant#Giant(EntityType<? extends Giant>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Giant.java:11
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • EntityType<? extends Giant> entityType
  • Level level

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

EntityType<? extends Giant> entityType = ...;
Level level = ...;
Giant instance = new Giant(entityType, level);

Guardian

  • Full name: net.minecraft.world.entity.monster.Guardian
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/Guardian.java
  • Type: class
  • Modifiers: public
  • Extends: Monster

net.minecraft.world.entity.monster.Guardian#aiStep()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Guardian.java:187
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ aiStep ตาม implementation ของ Guardian

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: clientSideTailAnimationO, clientSideTailAnimationSpeed, clientSideTouchedGround, clientSideTailAnimation, clientSideSpikesAnimationO, clientSideSpikesAnimation. เรียกต่อ: isAlive(), level(), isInWater(), getDeltaMovement(), isSilent(), playLocalSound(), getX(), getY().

Parameters

  • ไม่มี

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

Guardian instance = ...;
instance.aiStep();

net.minecraft.world.entity.monster.Guardian#checkGuardianSpawnRules(EntityType<? extends Guardian>,LevelAccessor,EntitySpawnReason,BlockPos,RandomSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Guardian.java:300
  • Modifiers: public static
  • Return: boolean

คืออะไร

ตรวจสอบ Guardian Spawn Rules

ทำงานยังไง

เรียกต่อ: nextInt(), canSeeSkyFromBelowWater(), getDifficulty(), isSpawner(), getFluidState(), is(), below().

Parameters

  • EntityType<? extends Guardian> entityType
  • LevelAccessor levelAccessor
  • EntitySpawnReason entitySpawnReason
  • BlockPos blockPos
  • RandomSource randomSource

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

EntityType<? extends Guardian> entityType = ...;
LevelAccessor levelAccessor = ...;
EntitySpawnReason entitySpawnReason = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
boolean result = Guardian.checkGuardianSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource);

net.minecraft.world.entity.monster.Guardian#checkSpawnObstruction(LevelReader)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Guardian.java:295
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบ Spawn Obstruction

ทำงานยังไง

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

Parameters

  • LevelReader levelReader

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

Guardian instance = ...;
LevelReader levelReader = ...;
boolean result = instance.checkSpawnObstruction(levelReader);

net.minecraft.world.entity.monster.Guardian#createAttributes()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Guardian.java:87
  • Modifiers: public static
  • Return: AttributeSupplier.Builder

คืออะไร

สร้าง Attributes

ทำงานยังไง

เรียกต่อ: createMonsterAttributes(), add(). คืนค่า: Monster.createMonsterAttributes().add(Attributes.ATTACK_DAMAGE, 6.0).add(Attributes.MOVEMENT_SPEED, 0.5).add(Attributes.MAX_HEALTH, 30.0).

Parameters

  • ไม่มี

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

AttributeSupplier.Builder result = Guardian.createAttributes();

net.minecraft.world.entity.monster.Guardian#createNavigation(Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Guardian.java:91
  • Modifiers: protected
  • Return: PathNavigation

คืออะไร

สร้าง Navigation

ทำงานยังไง

สร้างออบเจ็กต์: WaterBoundPathNavigation. คืนค่า: new WaterBoundPathNavigation(this, level).

Parameters

  • Level level

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

Level level = ...;
@Override
protected PathNavigation createNavigation(Level level) {
    return super.createNavigation(level);
}

net.minecraft.world.entity.monster.Guardian#defineSynchedData(SynchedEntityData.Builder)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Guardian.java:96
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ defineSynchedData ตาม implementation ของ Guardian

ทำงานยังไง

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

Parameters

  • SynchedEntityData.Builder builder

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

SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
    super.defineSynchedData(builder);
}

net.minecraft.world.entity.monster.Guardian#getActiveAttackTarget()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Guardian.java:123
  • Modifiers: public
  • Return: LivingEntity

คืออะไร

อ่านค่า Active Attack Target

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: clientSideCachedAttackTarget. เรียกต่อ: hasActiveAttackTarget(), level(), getEntity(), get(), getTarget(). มีจุด return อย่างน้อย 5 จุด.

Parameters

  • ไม่มี

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

Guardian instance = ...;
LivingEntity result = instance.getActiveAttackTarget();

net.minecraft.world.entity.monster.Guardian#getAmbientSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Guardian.java:160
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Ambient Sound

ทำงานยังไง

เรียกต่อ: isInWaterOrBubble(). คืนค่า: this.isInWaterOrBubble() ? SoundEvents.GUARDIAN_AMBIENT : SoundEvents.GUARDIAN_AMBIENT_LAND.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getAmbientSound() {
    return super.getAmbientSound();
}

net.minecraft.world.entity.monster.Guardian#getAmbientSoundInterval()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Guardian.java:155
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Ambient Sound Interval

ทำงานยังไง

คืนค่า: 160.

Parameters

  • ไม่มี

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

Guardian instance = ...;
int result = instance.getAmbientSoundInterval();

net.minecraft.world.entity.monster.Guardian#getAttackAnimationScale(float)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Guardian.java:287
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Attack Animation Scale

ทำงานยังไง

เรียกต่อ: getAttackDuration(). คืนค่า: (this.clientSideAttackTime + f) / this.getAttackDuration().

Parameters

  • float f

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

Guardian instance = ...;
float result = instance.getAttackAnimationScale(0.0F);

net.minecraft.world.entity.monster.Guardian#getAttackDuration()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Guardian.java:111
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Attack Duration

ทำงานยังไง

คืนค่า: 80.

Parameters

  • ไม่มี

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

Guardian instance = ...;
int result = instance.getAttackDuration();

net.minecraft.world.entity.monster.Guardian#getClientSideAttackTime()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Guardian.java:291
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Client Side Attack Time

ทำงานยังไง

คืนค่า: this.clientSideAttackTime.

Parameters

  • ไม่มี

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

Guardian instance = ...;
float result = instance.getClientSideAttackTime();

net.minecraft.world.entity.monster.Guardian#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Guardian.java:170
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

เรียกต่อ: isInWaterOrBubble(). คืนค่า: this.isInWaterOrBubble() ? SoundEvents.GUARDIAN_DEATH : SoundEvents.GUARDIAN_DEATH_LAND.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.monster.Guardian#getFlopSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Guardian.java:275
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Flop Sound

ทำงานยังไง

คืนค่า: SoundEvents.GUARDIAN_FLOP.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getFlopSound() {
    return super.getFlopSound();
}

net.minecraft.world.entity.monster.Guardian#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Guardian.java:165
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

เรียกต่อ: isInWaterOrBubble(). คืนค่า: this.isInWaterOrBubble() ? SoundEvents.GUARDIAN_HURT : SoundEvents.GUARDIAN_HURT_LAND.

Parameters

  • DamageSource damageSource

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

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

net.minecraft.world.entity.monster.Guardian#getMaxHeadXRot()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Guardian.java:325
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Max Head XRot

ทำงานยังไง

คืนค่า: 180.

Parameters

  • ไม่มี

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

Guardian instance = ...;
int result = instance.getMaxHeadXRot();

net.minecraft.world.entity.monster.Guardian#getMovementEmission()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Guardian.java:175
  • Modifiers: protected
  • Return: Entity.MovementEmission

คืออะไร

อ่านค่า Movement Emission

ทำงานยังไง

คืนค่า: Entity.MovementEmission.EVENTS.

Parameters

  • ไม่มี

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

@Override
protected Entity.MovementEmission getMovementEmission() {
    return super.getMovementEmission();
}

net.minecraft.world.entity.monster.Guardian#getSpikesAnimation(float)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Guardian.java:283
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Spikes Animation

ทำงานยังไง

เรียกต่อ: lerp(). คืนค่า: Mth.lerp(f, this.clientSideSpikesAnimationO, this.clientSideSpikesAnimation).

Parameters

  • float f

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

Guardian instance = ...;
float result = instance.getSpikesAnimation(0.0F);

net.minecraft.world.entity.monster.Guardian#getTailAnimation(float)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Guardian.java:279
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Tail Animation

ทำงานยังไง

เรียกต่อ: lerp(). คืนค่า: Mth.lerp(f, this.clientSideTailAnimationO, this.clientSideTailAnimation).

Parameters

  • float f

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

Guardian instance = ...;
float result = instance.getTailAnimation(0.0F);

net.minecraft.world.entity.monster.Guardian#getWalkTargetValue(BlockPos,LevelReader)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Guardian.java:180
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Walk Target Value

ทำงานยังไง

เรียกต่อ: getFluidState(), is(), getPathfindingCostFromLightLevels().

Parameters

  • BlockPos blockPos
  • LevelReader levelReader

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

Guardian instance = ...;
BlockPos blockPos = ...;
LevelReader levelReader = ...;
float result = instance.getWalkTargetValue(blockPos, levelReader);

net.minecraft.world.entity.monster.Guardian#Guardian(EntityType<? extends Guardian>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Guardian.java:63
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: xpReward, moveControl, clientSideTailAnimation, clientSideTailAnimationO. เรียกต่อ: setPathfindingMalus(), GuardianMoveControl(), nextFloat(). สร้างออบเจ็กต์: Guardian.GuardianMoveControl.

Parameters

  • EntityType<? extends Guardian> entityType
  • Level level

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

EntityType<? extends Guardian> entityType = ...;
Level level = ...;
Guardian instance = new Guardian(entityType, level);

net.minecraft.world.entity.monster.Guardian#hasActiveAttackTarget()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Guardian.java:119
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Active Attack Target

ทำงานยังไง

เรียกต่อ: get(). คืนค่า: this.entityData.get(DATA_ID_ATTACK_TARGET) != 0.

Parameters

  • ไม่มี

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

Guardian instance = ...;
boolean result = instance.hasActiveAttackTarget();

net.minecraft.world.entity.monster.Guardian#hurtServer(ServerLevel,DamageSource,float)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Guardian.java:309
  • Modifiers: public
  • Return: boolean

คืออะไร

ประมวลผลความเสียหาย Server

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isMoving(), is(), getDirectEntity(), damageSources(), thorns(), trigger(). คืนค่า: super.hurtServer(serverLevel, damageSource, f).

Parameters

  • ServerLevel serverLevel
  • DamageSource damageSource
  • float f

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

Guardian instance = ...;
ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
boolean result = instance.hurtServer(serverLevel, damageSource, 0.0F);

net.minecraft.world.entity.monster.Guardian#isMoving()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Guardian.java:103
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Guardian instance = ...;
boolean result = instance.isMoving();

net.minecraft.world.entity.monster.Guardian#onSyncedDataUpdated(EntityDataAccessor<?>)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Guardian.java:146
  • Modifiers: public
  • Return: void

คืออะไร

จัดการเหตุการณ์ Synced Data Updated

ทำงานยังไง

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

Parameters

  • EntityDataAccessor<?> entityDataAccessor

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

Guardian instance = ...;
EntityDataAccessor<?> entityDataAccessor = ...;
instance.onSyncedDataUpdated(entityDataAccessor);

net.minecraft.world.entity.monster.Guardian#registerGoals()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Guardian.java:72
  • Modifiers: protected
  • Return: void

คืออะไร

ลงทะเบียน Goals

ทำงานยังไง

แก้ state: randomStrollGoal. เรียกต่อ: addGoal(), GuardianAttackGoal(), setFlags(), of(), GuardianAttackSelector(). สร้างออบเจ็กต์: MoveTowardsRestrictionGoal, RandomStrollGoal, Guardian.GuardianAttackGoal, LookAtPlayerGoal.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Guardian#travel(Vec3)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Guardian.java:330
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ travel ตาม implementation ของ Guardian

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isControlledByLocalInstance(), isInWater(), moveRelative(), move(), getDeltaMovement(), setDeltaMovement(), scale(), isMoving().

Parameters

  • Vec3 vec3

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

Guardian instance = ...;
Vec3 vec3 = ...;
instance.travel(vec3);

Husk

  • Full name: net.minecraft.world.entity.monster.Husk
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/Husk.java
  • Type: class
  • Modifiers: public
  • Extends: Zombie

net.minecraft.world.entity.monster.Husk#checkHuskSpawnRules(EntityType<Husk>,ServerLevelAccessor,EntitySpawnReason,BlockPos,RandomSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Husk.java:24
  • Modifiers: public static
  • Return: boolean

คืออะไร

ตรวจสอบ Husk Spawn Rules

ทำงานยังไง

เรียกต่อ: checkMonsterSpawnRules(), isSpawner(), canSeeSky().

Parameters

  • EntityType<Husk> entityType
  • ServerLevelAccessor serverLevelAccessor
  • EntitySpawnReason entitySpawnReason
  • BlockPos blockPos
  • RandomSource randomSource

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

EntityType<Husk> entityType = ...;
ServerLevelAccessor serverLevelAccessor = ...;
EntitySpawnReason entitySpawnReason = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
boolean result = Husk.checkHuskSpawnRules(entityType, serverLevelAccessor, entitySpawnReason, blockPos, randomSource);

net.minecraft.world.entity.monster.Husk#convertsInWater()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Husk.java:67
  • Modifiers: protected
  • Return: boolean

คืออะไร

ดำเนินการ convertsInWater ตาม implementation ของ Husk

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Husk#doHurtTarget(ServerLevel,Entity)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Husk.java:56
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ doHurtTarget ตาม implementation ของ Husk

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getMainHandItem(), isEmpty(), level(), getCurrentDifficultyAt(), blockPosition(), getEffectiveDifficulty(), addEffect(). สร้างออบเจ็กต์: MobEffectInstance. คืนค่า: bl.

Parameters

  • ServerLevel serverLevel
  • Entity entity

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

Husk instance = ...;
ServerLevel serverLevel = ...;
Entity entity = ...;
boolean result = instance.doHurtTarget(serverLevel, entity);

net.minecraft.world.entity.monster.Husk#doUnderWaterConversion()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Husk.java:72
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ doUnderWaterConversion ตาม implementation ของ Husk

ทำงานยังไง

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

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Husk#getAmbientSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Husk.java:36
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Ambient Sound

ทำงานยังไง

คืนค่า: SoundEvents.HUSK_AMBIENT.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getAmbientSound() {
    return super.getAmbientSound();
}

net.minecraft.world.entity.monster.Husk#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Husk.java:46
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

คืนค่า: SoundEvents.HUSK_DEATH.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.monster.Husk#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Husk.java:41
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

คืนค่า: SoundEvents.HUSK_HURT.

Parameters

  • DamageSource damageSource

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

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

net.minecraft.world.entity.monster.Husk#getSkull()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Husk.java:80
  • Modifiers: protected
  • Return: ItemStack

คืออะไร

อ่านค่า Skull

ทำงานยังไง

คืนค่า: ItemStack.EMPTY.

Parameters

  • ไม่มี

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

@Override
protected ItemStack getSkull() {
    return super.getSkull();
}

net.minecraft.world.entity.monster.Husk#getStepSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Husk.java:51
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Step Sound

ทำงานยังไง

คืนค่า: SoundEvents.HUSK_STEP.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getStepSound() {
    return super.getStepSound();
}

net.minecraft.world.entity.monster.Husk#Husk(EntityType<? extends Husk>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Husk.java:20
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • EntityType<? extends Husk> entityType
  • Level level

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

EntityType<? extends Husk> entityType = ...;
Level level = ...;
Husk instance = new Husk(entityType, level);

net.minecraft.world.entity.monster.Husk#isSunSensitive()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Husk.java:31
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Sun Sensitive

ทำงานยังไง

คืนค่า: false.

Parameters

  • ไม่มี

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

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

Illusioner

  • Full name: net.minecraft.world.entity.monster.Illusioner
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/Illusioner.java
  • Type: class
  • Modifiers: public
  • Extends: SpellcasterIllager
  • Implements: RangedAttackMob

net.minecraft.world.entity.monster.Illusioner#aiStep()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Illusioner.java:90
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ aiStep ตาม implementation ของ Illusioner

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: clientSideIllusionTicks, hurtTime. เรียกต่อ: level(), isInvisible(), nextInt(), max(), addParticle(), getRandomX(), getRandomY(), getZ(). สร้างออบเจ็กต์: Vec3.

Parameters

  • ไม่มี

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

Illusioner instance = ...;
instance.aiStep();

net.minecraft.world.entity.monster.Illusioner#applyRaidBuffs(ServerLevel,int,boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Illusioner.java:168
  • Modifiers: public
  • Return: void

คืออะไร

นำไปใช้ Raid Buffs

ทำงานยังไง

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

Parameters

  • ServerLevel serverLevel
  • int i
  • boolean bl

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

Illusioner instance = ...;
ServerLevel serverLevel = ...;
instance.applyRaidBuffs(serverLevel, 0, true);

net.minecraft.world.entity.monster.Illusioner#createAttributes()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Illusioner.java:78
  • Modifiers: public static
  • Return: AttributeSupplier.Builder

คืออะไร

สร้าง Attributes

ทำงานยังไง

เรียกต่อ: createMonsterAttributes(), add(). คืนค่า: Monster.createMonsterAttributes().add(Attributes.MOVEMENT_SPEED, 0.5).add(Attributes.FOLLOW_RANGE, 18.0).add(Attributes.MAX_HEALTH, 32.0).

Parameters

  • ไม่มี

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

AttributeSupplier.Builder result = Illusioner.createAttributes();

net.minecraft.world.entity.monster.Illusioner#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Illusioner.java:82
  • Modifiers: public
  • Return: SpawnGroupData

คืออะไร

ดำเนินการ finalizeSpawn ตาม implementation ของ Illusioner

ทำงานยังไง

เรียกต่อ: setItemSlot(). สร้างออบเจ็กต์: ItemStack. คืนค่า: super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData).

Parameters

  • ServerLevelAccessor serverLevelAccessor
  • DifficultyInstance difficultyInstance
  • EntitySpawnReason entitySpawnReason
  • SpawnGroupData spawnGroupData

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

Illusioner instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);

net.minecraft.world.entity.monster.Illusioner#getAmbientSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Illusioner.java:148
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Ambient Sound

ทำงานยังไง

คืนค่า: SoundEvents.ILLUSIONER_AMBIENT.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getAmbientSound() {
    return super.getAmbientSound();
}

net.minecraft.world.entity.monster.Illusioner#getArmPose()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Illusioner.java:188
  • Modifiers: public
  • Return: AbstractIllager.IllagerArmPose

คืออะไร

อ่านค่า Arm Pose

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Illusioner instance = ...;
AbstractIllager.IllagerArmPose result = instance.getArmPose();

net.minecraft.world.entity.monster.Illusioner#getCastingSoundEvent()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Illusioner.java:163
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Casting Sound Event

ทำงานยังไง

คืนค่า: SoundEvents.ILLUSIONER_CAST_SPELL.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getCastingSoundEvent() {
    return super.getCastingSoundEvent();
}

net.minecraft.world.entity.monster.Illusioner#getCelebrateSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Illusioner.java:127
  • Modifiers: public
  • Return: SoundEvent

คืออะไร

อ่านค่า Celebrate Sound

ทำงานยังไง

คืนค่า: SoundEvents.ILLUSIONER_AMBIENT.

Parameters

  • ไม่มี

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

Illusioner instance = ...;
SoundEvent result = instance.getCelebrateSound();

net.minecraft.world.entity.monster.Illusioner#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Illusioner.java:153
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

คืนค่า: SoundEvents.ILLUSIONER_DEATH.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.monster.Illusioner#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Illusioner.java:158
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

คืนค่า: SoundEvents.ILLUSIONER_HURT.

Parameters

  • DamageSource damageSource

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

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

net.minecraft.world.entity.monster.Illusioner#getIllusionOffsets(float)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Illusioner.java:132
  • Modifiers: public
  • Return: Vec3[]

คืออะไร

อ่านค่า Illusion Offsets

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: pow(), scale(), add(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • float f

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

Illusioner instance = ...;
Vec3[] result = instance.getIllusionOffsets(0.0F);

net.minecraft.world.entity.monster.Illusioner#Illusioner(EntityType<? extends Illusioner>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Illusioner.java:49
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

มีการวนลูป. แก้ state: xpReward, clientSideIllusionOffsets.

Parameters

  • EntityType<? extends Illusioner> entityType
  • Level level

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

EntityType<? extends Illusioner> entityType = ...;
Level level = ...;
Illusioner instance = new Illusioner(entityType, level);

net.minecraft.world.entity.monster.Illusioner#performRangedAttack(LivingEntity,float)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Illusioner.java:172
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ performRangedAttack ตาม implementation ของ Illusioner

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getItemInHand(), getWeaponHoldingHand(), getProjectile(), getMobArrow(), getX(), getY(), getZ(), sqrt().

Parameters

  • LivingEntity livingEntity
  • float f

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

Illusioner instance = ...;
LivingEntity livingEntity = ...;
instance.performRangedAttack(livingEntity, 0.0F);

net.minecraft.world.entity.monster.Illusioner#registerGoals()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Illusioner.java:60
  • Modifiers: protected
  • Return: void

คืออะไร

ลงทะเบียน Goals

ทำงานยังไง

เรียกต่อ: addGoal(), SpellcasterCastingSpellGoal(), IllusionerMirrorSpellGoal(), IllusionerBlindnessSpellGoal(), setAlertOthers(), setUnseenMemoryTicks(). สร้างออบเจ็กต์: FloatGoal, SpellcasterIllager.SpellcasterCastingSpellGoal, AvoidEntityGoal<>, Illusioner.IllusionerMirrorSpellGoal.

Parameters

  • ไม่มี

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

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

MagmaCube

  • Full name: net.minecraft.world.entity.monster.MagmaCube
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/MagmaCube.java
  • Type: class
  • Modifiers: public
  • Extends: Slime

net.minecraft.world.entity.monster.MagmaCube#checkMagmaCubeSpawnRules(EntityType<MagmaCube>,LevelAccessor,EntitySpawnReason,BlockPos,RandomSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/MagmaCube.java:31
  • Modifiers: public static
  • Return: boolean

คืออะไร

ตรวจสอบ Magma Cube Spawn Rules

ทำงานยังไง

เรียกต่อ: getDifficulty(). คืนค่า: levelAccessor.getDifficulty() != Difficulty.PEACEFUL.

Parameters

  • EntityType<MagmaCube> entityType
  • LevelAccessor levelAccessor
  • EntitySpawnReason entitySpawnReason
  • BlockPos blockPos
  • RandomSource randomSource

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

EntityType<MagmaCube> entityType = ...;
LevelAccessor levelAccessor = ...;
EntitySpawnReason entitySpawnReason = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
boolean result = MagmaCube.checkMagmaCubeSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource);

net.minecraft.world.entity.monster.MagmaCube#createAttributes()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/MagmaCube.java:27
  • Modifiers: public static
  • Return: AttributeSupplier.Builder

คืออะไร

สร้าง Attributes

ทำงานยังไง

เรียกต่อ: createMonsterAttributes(), add(). คืนค่า: Monster.createMonsterAttributes().add(Attributes.MOVEMENT_SPEED, 0.2F).

Parameters

  • ไม่มี

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

AttributeSupplier.Builder result = MagmaCube.createAttributes();

net.minecraft.world.entity.monster.MagmaCube#decreaseSquish()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/MagmaCube.java:63
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ decreaseSquish ตาม implementation ของ MagmaCube

ทำงานยังไง

แก้ state: targetSquish.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.MagmaCube#getAttackDamage()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/MagmaCube.java:92
  • Modifiers: protected
  • Return: float

คืออะไร

อ่านค่า Attack Damage

ทำงานยังไง

คืนค่า: super.getAttackDamage() + 2.0F.

Parameters

  • ไม่มี

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

@Override
protected float getAttackDamage() {
    return super.getAttackDamage();
}

net.minecraft.world.entity.monster.MagmaCube#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/MagmaCube.java:102
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

เรียกต่อ: isTiny(). คืนค่า: this.isTiny() ? SoundEvents.MAGMA_CUBE_DEATH_SMALL : SoundEvents.MAGMA_CUBE_DEATH.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.monster.MagmaCube#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/MagmaCube.java:97
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

เรียกต่อ: isTiny(). คืนค่า: this.isTiny() ? SoundEvents.MAGMA_CUBE_HURT_SMALL : SoundEvents.MAGMA_CUBE_HURT.

Parameters

  • DamageSource damageSource

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

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

net.minecraft.world.entity.monster.MagmaCube#getJumpDelay()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/MagmaCube.java:58
  • Modifiers: protected
  • Return: int

คืออะไร

อ่านค่า Jump Delay

ทำงานยังไง

คืนค่า: super.getJumpDelay() * 4.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.MagmaCube#getJumpSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/MagmaCube.java:112
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Jump Sound

ทำงานยังไง

คืนค่า: SoundEvents.MAGMA_CUBE_JUMP.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getJumpSound() {
    return super.getJumpSound();
}

net.minecraft.world.entity.monster.MagmaCube#getLightLevelDependentMagicValue()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/MagmaCube.java:43
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Light Level Dependent Magic Value

ทำงานยังไง

คืนค่า: 1.0F.

Parameters

  • ไม่มี

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

MagmaCube instance = ...;
float result = instance.getLightLevelDependentMagicValue();

net.minecraft.world.entity.monster.MagmaCube#getParticleType()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/MagmaCube.java:48
  • Modifiers: protected
  • Return: ParticleOptions

คืออะไร

อ่านค่า Particle Type

ทำงานยังไง

คืนค่า: ParticleTypes.FLAME.

Parameters

  • ไม่มี

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

@Override
protected ParticleOptions getParticleType() {
    return super.getParticleType();
}

net.minecraft.world.entity.monster.MagmaCube#getSquishSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/MagmaCube.java:107
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Squish Sound

ทำงานยังไง

เรียกต่อ: isTiny(). คืนค่า: this.isTiny() ? SoundEvents.MAGMA_CUBE_SQUISH_SMALL : SoundEvents.MAGMA_CUBE_SQUISH.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getSquishSound() {
    return super.getSquishSound();
}

net.minecraft.world.entity.monster.MagmaCube#isDealsDamage()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/MagmaCube.java:87
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Deals Damage

ทำงานยังไง

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

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.MagmaCube#isOnFire()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/MagmaCube.java:53
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ On Fire

ทำงานยังไง

คืนค่า: false.

Parameters

  • ไม่มี

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

MagmaCube instance = ...;
boolean result = instance.isOnFire();

net.minecraft.world.entity.monster.MagmaCube#jumpFromGround()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/MagmaCube.java:68
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ jumpFromGround ตาม implementation ของ MagmaCube

ทำงานยังไง

แก้ state: hasImpulse. เรียกต่อ: getDeltaMovement(), getSize(), setDeltaMovement(), getJumpPower().

Parameters

  • ไม่มี

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

MagmaCube instance = ...;
instance.jumpFromGround();

net.minecraft.world.entity.monster.MagmaCube#jumpInLiquid(TagKey<Fluid>)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/MagmaCube.java:76
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ jumpInLiquid ตาม implementation ของ MagmaCube

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: hasImpulse. เรียกต่อ: getDeltaMovement(), setDeltaMovement(), getSize().

Parameters

  • TagKey<Fluid> tagKey

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

TagKey<Fluid> tagKey = ...;
@Override
protected void jumpInLiquid(TagKey<Fluid> tagKey) {
    super.jumpInLiquid(tagKey);
}

net.minecraft.world.entity.monster.MagmaCube#MagmaCube(EntityType<? extends MagmaCube>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/MagmaCube.java:23
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • EntityType<? extends MagmaCube> entityType
  • Level level

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

EntityType<? extends MagmaCube> entityType = ...;
Level level = ...;
MagmaCube instance = new MagmaCube(entityType, level);

net.minecraft.world.entity.monster.MagmaCube#setSize(int,boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/MagmaCube.java:37
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Size

ทำงานยังไง

เรียกต่อ: getAttribute(), setBaseValue().

Parameters

  • int i
  • boolean bl

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

MagmaCube instance = ...;
instance.setSize(0, true);

Monster

  • Full name: net.minecraft.world.entity.monster.Monster
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/Monster.java
  • Type: class
  • Modifiers: public abstract
  • Extends: PathfinderMob
  • Implements: Enemy

net.minecraft.world.entity.monster.Monster#aiStep()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Monster.java:41
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ aiStep ตาม implementation ของ Monster

ทำงานยังไง

เรียกต่อ: updateSwingTime(), updateNoActionTime().

Parameters

  • ไม่มี

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

Monster instance = ...;
instance.aiStep();

net.minecraft.world.entity.monster.Monster#checkAnyLightMonsterSpawnRules(EntityType<? extends Monster>,LevelAccessor,EntitySpawnReason,BlockPos,RandomSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Monster.java:119
  • Modifiers: public static
  • Return: boolean

คืออะไร

ตรวจสอบ Any Light Monster Spawn Rules

ทำงานยังไง

เรียกต่อ: getDifficulty(), checkMobSpawnRules(). คืนค่า: levelAccessor.getDifficulty() != Difficulty.PEACEFUL && checkMobSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource).

Parameters

  • EntityType<? extends Monster> entityType
  • LevelAccessor levelAccessor
  • EntitySpawnReason entitySpawnReason
  • BlockPos blockPos
  • RandomSource randomSource

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

EntityType<? extends Monster> entityType = ...;
LevelAccessor levelAccessor = ...;
EntitySpawnReason entitySpawnReason = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
boolean result = Monster.checkAnyLightMonsterSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource);

net.minecraft.world.entity.monster.Monster#checkMonsterSpawnRules(EntityType<? extends Monster>,ServerLevelAccessor,EntitySpawnReason,BlockPos,RandomSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Monster.java:107
  • Modifiers: public static
  • Return: boolean

คืออะไร

ตรวจสอบ Monster Spawn Rules

ทำงานยังไง

เรียกต่อ: getDifficulty(), ignoresLightRequirements(), isDarkEnoughToSpawn(), checkMobSpawnRules().

Parameters

  • EntityType<? extends Monster> entityType
  • ServerLevelAccessor serverLevelAccessor
  • EntitySpawnReason entitySpawnReason
  • BlockPos blockPos
  • RandomSource randomSource

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

EntityType<? extends Monster> entityType = ...;
ServerLevelAccessor serverLevelAccessor = ...;
EntitySpawnReason entitySpawnReason = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
boolean result = Monster.checkMonsterSpawnRules(entityType, serverLevelAccessor, entitySpawnReason, blockPos, randomSource);

net.minecraft.world.entity.monster.Monster#createMonsterAttributes()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Monster.java:125
  • Modifiers: public static
  • Return: AttributeSupplier.Builder

คืออะไร

สร้าง Monster Attributes

ทำงานยังไง

เรียกต่อ: createMobAttributes(), add(). คืนค่า: Mob.createMobAttributes().add(Attributes.ATTACK_DAMAGE).

Parameters

  • ไม่มี

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

AttributeSupplier.Builder result = Monster.createMonsterAttributes();

net.minecraft.world.entity.monster.Monster#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Monster.java:75
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

คืนค่า: SoundEvents.HOSTILE_DEATH.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.monster.Monster#getFallSounds()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Monster.java:80
  • Modifiers: public
  • Return: LivingEntity.Fallsounds

คืออะไร

อ่านค่า Fall Sounds

ทำงานยังไง

เรียกต่อ: Fallsounds(). สร้างออบเจ็กต์: LivingEntity.Fallsounds. คืนค่า: new LivingEntity.Fallsounds(SoundEvents.HOSTILE_SMALL_FALL, SoundEvents.HOSTILE_BIG_FALL).

Parameters

  • ไม่มี

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

Monster instance = ...;
LivingEntity.Fallsounds result = instance.getFallSounds();

net.minecraft.world.entity.monster.Monster#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Monster.java:70
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

คืนค่า: SoundEvents.HOSTILE_HURT.

Parameters

  • DamageSource damageSource

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

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

net.minecraft.world.entity.monster.Monster#getProjectile(ItemStack)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Monster.java:143
  • Modifiers: public
  • Return: ItemStack

คืออะไร

อ่านค่า Projectile

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getItem(), getSupportedHeldProjectiles(), getHeldProjectile(), isEmpty(). สร้างออบเจ็กต์: ItemStack. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ItemStack itemStack

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

Monster instance = ...;
ItemStack itemStack = ...;
ItemStack result = instance.getProjectile(itemStack);

net.minecraft.world.entity.monster.Monster#getSoundSource()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Monster.java:36
  • Modifiers: public
  • Return: SoundSource

คืออะไร

อ่านค่า Sound Source

ทำงานยังไง

คืนค่า: SoundSource.HOSTILE.

Parameters

  • ไม่มี

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

Monster instance = ...;
SoundSource result = instance.getSoundSource();

net.minecraft.world.entity.monster.Monster#getSwimSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Monster.java:60
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Swim Sound

ทำงานยังไง

คืนค่า: SoundEvents.HOSTILE_SWIM.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getSwimSound() {
    return super.getSwimSound();
}

net.minecraft.world.entity.monster.Monster#getSwimSplashSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Monster.java:65
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Swim Splash Sound

ทำงานยังไง

คืนค่า: SoundEvents.HOSTILE_SPLASH.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getSwimSplashSound() {
    return super.getSwimSplashSound();
}

net.minecraft.world.entity.monster.Monster#getWalkTargetValue(BlockPos,LevelReader)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Monster.java:85
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Walk Target Value

ทำงานยังไง

เรียกต่อ: getPathfindingCostFromLightLevels(). คืนค่า: -levelReader.getPathfindingCostFromLightLevels(blockPos).

Parameters

  • BlockPos blockPos
  • LevelReader levelReader

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

Monster instance = ...;
BlockPos blockPos = ...;
LevelReader levelReader = ...;
float result = instance.getWalkTargetValue(blockPos, levelReader);

net.minecraft.world.entity.monster.Monster#isDarkEnoughToSpawn(ServerLevelAccessor,BlockPos,RandomSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Monster.java:90
  • Modifiers: public static
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Dark Enough To Spawn

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBrightness(), nextInt(), dimensionType(), monsterSpawnBlockLightLimit(), getLevel(), isThundering(), getMaxLocalRawBrightness(), monsterSpawnLightTest(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • ServerLevelAccessor serverLevelAccessor
  • BlockPos blockPos
  • RandomSource randomSource

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

ServerLevelAccessor serverLevelAccessor = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
boolean result = Monster.isDarkEnoughToSpawn(serverLevelAccessor, blockPos, randomSource);

net.minecraft.world.entity.monster.Monster#isPreventingPlayerRest(ServerLevel,Player)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Monster.java:139
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Preventing Player Rest

ทำงานยังไง

คืนค่า: true.

Parameters

  • ServerLevel serverLevel
  • Player player

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

Monster instance = ...;
ServerLevel serverLevel = ...;
Player player = ...;
boolean result = instance.isPreventingPlayerRest(serverLevel, player);

net.minecraft.world.entity.monster.Monster#Monster(EntityType<? extends Monster>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Monster.java:31
  • Modifiers: protected
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: xpReward.

Parameters

  • EntityType<? extends Monster> entityType
  • Level level

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

EntityType<? extends Monster> entityType = ...;
Level level = ...;
Monster instance = new Monster(entityType, level);

net.minecraft.world.entity.monster.Monster#shouldDespawnInPeaceful()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Monster.java:55
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Despawn In Peaceful

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Monster#shouldDropExperience()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Monster.java:129
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Drop Experience

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

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

Monster instance = ...;
boolean result = instance.shouldDropExperience();

net.minecraft.world.entity.monster.Monster#shouldDropLoot()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Monster.java:134
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Drop Loot

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Monster#updateNoActionTime()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Monster.java:48
  • Modifiers: protected
  • Return: void

คืออะไร

อัปเดต No Action Time

ทำงานยังไง

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

Parameters

  • ไม่มี

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

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

PatrollingMonster

  • Full name: net.minecraft.world.entity.monster.PatrollingMonster
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/PatrollingMonster.java
  • Type: class
  • Modifiers: public abstract
  • Extends: Monster

net.minecraft.world.entity.monster.PatrollingMonster#addAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/PatrollingMonster.java:42
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Additional Save Data

ทำงานยังไง

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

Parameters

  • CompoundTag compoundTag

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

PatrollingMonster instance = ...;
CompoundTag compoundTag = ...;
instance.addAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.PatrollingMonster#canBeLeader()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/PatrollingMonster.java:61
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Be Leader

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

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

PatrollingMonster instance = ...;
boolean result = instance.canBeLeader();

net.minecraft.world.entity.monster.PatrollingMonster#canJoinPatrol()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/PatrollingMonster.java:129
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Join Patrol

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

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

PatrollingMonster instance = ...;
boolean result = instance.canJoinPatrol();

net.minecraft.world.entity.monster.PatrollingMonster#checkPatrollingMonsterSpawnRules(EntityType<? extends PatrollingMonster>,LevelAccessor,EntitySpawnReason,BlockPos,RandomSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/PatrollingMonster.java:90
  • Modifiers: public static
  • Return: boolean

คืออะไร

ตรวจสอบ Patrolling Monster Spawn Rules

ทำงานยังไง

เรียกต่อ: getBrightness(), checkAnyLightMonsterSpawnRules().

Parameters

  • EntityType<? extends PatrollingMonster> entityType
  • LevelAccessor levelAccessor
  • EntitySpawnReason entitySpawnReason
  • BlockPos blockPos
  • RandomSource randomSource

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

EntityType<? extends PatrollingMonster> entityType = ...;
LevelAccessor levelAccessor = ...;
EntitySpawnReason entitySpawnReason = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
boolean result = PatrollingMonster.checkPatrollingMonsterSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource);

net.minecraft.world.entity.monster.PatrollingMonster#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/PatrollingMonster.java:65
  • Modifiers: public
  • Return: SpawnGroupData

คืออะไร

ดำเนินการ finalizeSpawn ตาม implementation ของ PatrollingMonster

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: patrolLeader, patrolling. เรียกต่อ: getRandom(), nextFloat(), canBeLeader(), isPatrolLeader(), setItemSlot(), getOminousBannerInstance(), registryAccess(), lookupOrThrow(). คืนค่า: super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData).

Parameters

  • ServerLevelAccessor serverLevelAccessor
  • DifficultyInstance difficultyInstance
  • EntitySpawnReason entitySpawnReason
  • SpawnGroupData spawnGroupData

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

PatrollingMonster instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);

net.minecraft.world.entity.monster.PatrollingMonster#findPatrolTarget()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/PatrollingMonster.java:133
  • Modifiers: public
  • Return: void

คืออะไร

ค้นหา Patrol Target

ทำงานยังไง

แก้ state: patrolTarget, patrolling. เรียกต่อ: blockPosition(), offset(), nextInt().

Parameters

  • ไม่มี

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

PatrollingMonster instance = ...;
instance.findPatrolTarget();

net.minecraft.world.entity.monster.PatrollingMonster#getPatrolTarget()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/PatrollingMonster.java:112
  • Modifiers: public
  • Return: BlockPos

คืออะไร

อ่านค่า Patrol Target

ทำงานยังไง

คืนค่า: this.patrolTarget.

Parameters

  • ไม่มี

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

PatrollingMonster instance = ...;
BlockPos result = instance.getPatrolTarget();

net.minecraft.world.entity.monster.PatrollingMonster#hasPatrolTarget()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/PatrollingMonster.java:116
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Patrol Target

ทำงานยังไง

คืนค่า: this.patrolTarget != null.

Parameters

  • ไม่มี

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

PatrollingMonster instance = ...;
boolean result = instance.hasPatrolTarget();

net.minecraft.world.entity.monster.PatrollingMonster#isPatrolLeader()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/PatrollingMonster.java:125
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Patrol Leader

ทำงานยังไง

คืนค่า: this.patrolLeader.

Parameters

  • ไม่มี

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

PatrollingMonster instance = ...;
boolean result = instance.isPatrolLeader();

net.minecraft.world.entity.monster.PatrollingMonster#isPatrolling()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/PatrollingMonster.java:138
  • Modifiers: protected
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: this.patrolling.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.PatrollingMonster#PatrollingMonster(EntityType<? extends PatrollingMonster>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/PatrollingMonster.java:32
  • Modifiers: protected
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • EntityType<? extends PatrollingMonster> entityType
  • Level level

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

EntityType<? extends PatrollingMonster> entityType = ...;
Level level = ...;
PatrollingMonster instance = new PatrollingMonster(entityType, level);

net.minecraft.world.entity.monster.PatrollingMonster#readAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/PatrollingMonster.java:53
  • Modifiers: public
  • Return: void

คืออะไร

อ่าน Additional Save Data

ทำงานยังไง

แก้ state: patrolTarget, patrolLeader, patrolling. เรียกต่อ: readBlockPos(), ifPresent(), getBoolean().

Parameters

  • CompoundTag compoundTag

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

PatrollingMonster instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.PatrollingMonster#registerGoals()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/PatrollingMonster.java:36
  • Modifiers: protected
  • Return: void

คืออะไร

ลงทะเบียน Goals

ทำงานยังไง

เรียกต่อ: addGoal(). สร้างออบเจ็กต์: PatrollingMonster.LongDistancePatrolGoal<>.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.PatrollingMonster#removeWhenFarAway(double)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/PatrollingMonster.java:102
  • Modifiers: public
  • Return: boolean

คืออะไร

ลบ When Far Away

ทำงานยังไง

คืนค่า: !this.patrolling || d > 16384.0.

Parameters

  • double d

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

PatrollingMonster instance = ...;
boolean result = instance.removeWhenFarAway(0.0D);

net.minecraft.world.entity.monster.PatrollingMonster#setPatrolLeader(boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/PatrollingMonster.java:120
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Patrol Leader

ทำงานยังไง

แก้ state: patrolLeader, patrolling.

Parameters

  • boolean bl

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

PatrollingMonster instance = ...;
instance.setPatrolLeader(true);

net.minecraft.world.entity.monster.PatrollingMonster#setPatrolling(boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/PatrollingMonster.java:142
  • Modifiers: protected
  • Return: void

คืออะไร

กำหนดค่า Patrolling

ทำงานยังไง

แก้ state: patrolling.

Parameters

  • boolean bl

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

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

net.minecraft.world.entity.monster.PatrollingMonster#setPatrolTarget(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/PatrollingMonster.java:107
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Patrol Target

ทำงานยังไง

แก้ state: patrolTarget, patrolling.

Parameters

  • BlockPos blockPos

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

PatrollingMonster instance = ...;
BlockPos blockPos = ...;
instance.setPatrolTarget(blockPos);

PatrollingMonster$LongDistancePatrolGoal

  • Full name: net.minecraft.world.entity.monster.PatrollingMonster$LongDistancePatrolGoal
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/PatrollingMonster.java
  • Type: class
  • Modifiers: public static
  • Extends: Goal

net.minecraft.world.entity.monster.PatrollingMonster$LongDistancePatrolGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/PatrollingMonster.java:161
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: level(), getGameTime(), isPatrolling(), getTarget(), hasControllingPassenger(), hasPatrolTarget(). คืนค่า: this.mob.isPatrolling() && this.mob.getTarget() == null && !this.mob.hasControllingPassenger() && this.mob.hasPatrolTarget() && !bl.

Parameters

  • ไม่มี

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

PatrollingMonster.LongDistancePatrolGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.monster.PatrollingMonster$LongDistancePatrolGoal#LongDistancePatrolGoal(T,double,double)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/PatrollingMonster.java:153
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • T patrollingMonster
  • double d
  • double e

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

T patrollingMonster = ...;
PatrollingMonster.LongDistancePatrolGoal instance = new PatrollingMonster.LongDistancePatrolGoal(patrollingMonster, 0.0D, 0.0D);

net.minecraft.world.entity.monster.PatrollingMonster$LongDistancePatrolGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/PatrollingMonster.java:167
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

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

Parameters

  • ไม่มี

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

PatrollingMonster.LongDistancePatrolGoal instance = ...;
instance.start();

net.minecraft.world.entity.monster.PatrollingMonster$LongDistancePatrolGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/PatrollingMonster.java:171
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

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

Parameters

  • ไม่มี

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

PatrollingMonster.LongDistancePatrolGoal instance = ...;
instance.stop();

net.minecraft.world.entity.monster.PatrollingMonster$LongDistancePatrolGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/PatrollingMonster.java:175
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: cooldownUntil. เรียกต่อ: isPatrolLeader(), getNavigation(), isDone(), findPatrolCompanions(), isPatrolling(), isEmpty(), setPatrolling(), getPatrolTarget().

Parameters

  • ไม่มี

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

PatrollingMonster.LongDistancePatrolGoal instance = ...;
instance.tick();

Phantom

  • Full name: net.minecraft.world.entity.monster.Phantom
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/Phantom.java
  • Type: class
  • Modifiers: public
  • Extends: FlyingMob
  • Implements: Enemy

net.minecraft.world.entity.monster.Phantom#addAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Phantom.java:170
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Additional Save Data

ทำงานยังไง

เรียกต่อ: putInt(), getX(), getY(), getZ(), getPhantomSize().

Parameters

  • CompoundTag compoundTag

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

Phantom instance = ...;
CompoundTag compoundTag = ...;
instance.addAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Phantom#aiStep()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Phantom.java:142
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ aiStep ตาม implementation ของ Phantom

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Phantom instance = ...;
instance.aiStep();

net.minecraft.world.entity.monster.Phantom#canAttackType(EntityType<?>)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Phantom.java:209
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Attack Type

ทำงานยังไง

คืนค่า: true.

Parameters

  • EntityType<?> entityType

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

Phantom instance = ...;
EntityType<?> entityType = ...;
boolean result = instance.canAttackType(entityType);

net.minecraft.world.entity.monster.Phantom#createBodyControl()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Phantom.java:63
  • Modifiers: protected
  • Return: BodyRotationControl

คืออะไร

สร้าง Body Control

ทำงานยังไง

เรียกต่อ: PhantomBodyRotationControl(). สร้างออบเจ็กต์: Phantom.PhantomBodyRotationControl. คืนค่า: new Phantom.PhantomBodyRotationControl(this).

Parameters

  • ไม่มี

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

@Override
protected BodyRotationControl createBodyControl() {
    return super.createBodyControl();
}

net.minecraft.world.entity.monster.Phantom#defineSynchedData(SynchedEntityData.Builder)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Phantom.java:76
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ defineSynchedData ตาม implementation ของ Phantom

ทำงานยังไง

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

Parameters

  • SynchedEntityData.Builder builder

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

SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
    super.defineSynchedData(builder);
}

net.minecraft.world.entity.monster.Phantom#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Phantom.java:151
  • Modifiers: public
  • Return: SpawnGroupData

คืออะไร

ดำเนินการ finalizeSpawn ตาม implementation ของ Phantom

ทำงานยังไง

แก้ state: anchorPoint. เรียกต่อ: blockPosition(), above(), setPhantomSize(). คืนค่า: super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData).

Parameters

  • ServerLevelAccessor serverLevelAccessor
  • DifficultyInstance difficultyInstance
  • EntitySpawnReason entitySpawnReason
  • SpawnGroupData spawnGroupData

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

Phantom instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);

net.minecraft.world.entity.monster.Phantom#getAmbientSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Phantom.java:189
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Ambient Sound

ทำงานยังไง

คืนค่า: SoundEvents.PHANTOM_AMBIENT.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getAmbientSound() {
    return super.getAmbientSound();
}

net.minecraft.world.entity.monster.Phantom#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Phantom.java:199
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

คืนค่า: SoundEvents.PHANTOM_DEATH.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.monster.Phantom#getDefaultDimensions(Pose)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Phantom.java:214
  • Modifiers: public
  • Return: EntityDimensions

คืออะไร

อ่านค่า Default Dimensions

ทำงานยังไง

เรียกต่อ: getPhantomSize(), scale(). คืนค่า: entityDimensions.scale(1.0F + 0.15F * i).

Parameters

  • Pose pose

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

Phantom instance = ...;
Pose pose = ...;
EntityDimensions result = instance.getDefaultDimensions(pose);

net.minecraft.world.entity.monster.Phantom#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Phantom.java:194
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

คืนค่า: SoundEvents.PHANTOM_HURT.

Parameters

  • DamageSource damageSource

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

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

net.minecraft.world.entity.monster.Phantom#getPhantomSize()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Phantom.java:91
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Phantom Size

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Phantom instance = ...;
int result = instance.getPhantomSize();

net.minecraft.world.entity.monster.Phantom#getSoundSource()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Phantom.java:184
  • Modifiers: public
  • Return: SoundSource

คืออะไร

อ่านค่า Sound Source

ทำงานยังไง

คืนค่า: SoundSource.HOSTILE.

Parameters

  • ไม่มี

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

Phantom instance = ...;
SoundSource result = instance.getSoundSource();

net.minecraft.world.entity.monster.Phantom#getSoundVolume()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Phantom.java:204
  • Modifiers: protected
  • Return: float

คืออะไร

อ่านค่า Sound Volume

ทำงานยังไง

คืนค่า: 1.0F.

Parameters

  • ไม่มี

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

@Override
protected float getSoundVolume() {
    return super.getSoundVolume();
}

net.minecraft.world.entity.monster.Phantom#getUniqueFlapTickOffset()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Phantom.java:104
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Unique Flap Tick Offset

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Phantom instance = ...;
int result = instance.getUniqueFlapTickOffset();

net.minecraft.world.entity.monster.Phantom#isFlapping()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Phantom.java:58
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: getUniqueFlapTickOffset(). คืนค่า: (this.getUniqueFlapTickOffset() + this.tickCount) % TICKS_PER_FLAP == 0.

Parameters

  • ไม่มี

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

Phantom instance = ...;
boolean result = instance.isFlapping();

net.minecraft.world.entity.monster.Phantom#onSyncedDataUpdated(EntityDataAccessor<?>)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Phantom.java:95
  • Modifiers: public
  • Return: void

คืออะไร

จัดการเหตุการณ์ Synced Data Updated

ทำงานยังไง

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

Parameters

  • EntityDataAccessor<?> entityDataAccessor

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

Phantom instance = ...;
EntityDataAccessor<?> entityDataAccessor = ...;
instance.onSyncedDataUpdated(entityDataAccessor);

net.minecraft.world.entity.monster.Phantom#Phantom(EntityType<? extends Phantom>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Phantom.java:51
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: xpReward, moveControl, lookControl. เรียกต่อ: PhantomMoveControl(), PhantomLookControl(). สร้างออบเจ็กต์: Phantom.PhantomMoveControl, Phantom.PhantomLookControl.

Parameters

  • EntityType<? extends Phantom> entityType
  • Level level

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

EntityType<? extends Phantom> entityType = ...;
Level level = ...;
Phantom instance = new Phantom(entityType, level);

net.minecraft.world.entity.monster.Phantom#readAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Phantom.java:160
  • Modifiers: public
  • Return: void

คืออะไร

อ่าน Additional Save Data

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: anchorPoint. เรียกต่อ: contains(), getInt(), setPhantomSize(). สร้างออบเจ็กต์: BlockPos.

Parameters

  • CompoundTag compoundTag

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

Phantom instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Phantom#registerGoals()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Phantom.java:68
  • Modifiers: protected
  • Return: void

คืออะไร

ลงทะเบียน Goals

ทำงานยังไง

เรียกต่อ: addGoal(), PhantomAttackStrategyGoal(), PhantomSweepAttackGoal(), PhantomCircleAroundAnchorGoal(), PhantomAttackPlayerTargetGoal(). สร้างออบเจ็กต์: Phantom.PhantomAttackStrategyGoal, Phantom.PhantomSweepAttackGoal, Phantom.PhantomCircleAroundAnchorGoal, Phantom.PhantomAttackPlayerTargetGoal.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Phantom#setPhantomSize(int)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Phantom.java:82
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Phantom Size

ทำงานยังไง

เรียกต่อ: set(), clamp().

Parameters

  • int i

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

Phantom instance = ...;
instance.setPhantomSize(0);

net.minecraft.world.entity.monster.Phantom#shouldDespawnInPeaceful()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Phantom.java:108
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Despawn In Peaceful

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Phantom#shouldRenderAtSqrDistance(double)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Phantom.java:179
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Render At Sqr Distance

ทำงานยังไง

คืนค่า: true.

Parameters

  • double d

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

Phantom instance = ...;
boolean result = instance.shouldRenderAtSqrDistance(0.0D);

net.minecraft.world.entity.monster.Phantom#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Phantom.java:113
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: level(), cos(), getUniqueFlapTickOffset(), playLocalSound(), getX(), getY(), getZ(), getSoundSource().

Parameters

  • ไม่มี

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

Phantom instance = ...;
instance.tick();

Pillager

  • Full name: net.minecraft.world.entity.monster.Pillager
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/Pillager.java
  • Type: class
  • Modifiers: public
  • Extends: AbstractIllager
  • Implements: CrossbowAttackMob,InventoryCarrier

net.minecraft.world.entity.monster.Pillager#addAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Pillager.java:120
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Additional Save Data

ทำงานยังไง

เรียกต่อ: writeInventoryToTag(), registryAccess().

Parameters

  • CompoundTag compoundTag

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

Pillager instance = ...;
CompoundTag compoundTag = ...;
instance.addAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Pillager#applyRaidBuffs(ServerLevel,int,boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Pillager.java:234
  • Modifiers: public
  • Return: void

คืออะไร

นำไปใช้ Raid Buffs

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getCurrentRaid(), nextFloat(), getEnchantOdds(), getNumGroups(), enchantItemFromProvider(), registryAccess(), getCurrentDifficultyAt(), blockPosition(). สร้างออบเจ็กต์: ItemStack.

Parameters

  • ServerLevel serverLevel
  • int i
  • boolean bl

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

Pillager instance = ...;
ServerLevel serverLevel = ...;
instance.applyRaidBuffs(serverLevel, 0, true);

net.minecraft.world.entity.monster.Pillager#canFireProjectileWeapon(ProjectileWeaponItem)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Pillager.java:96
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Fire Projectile Weapon

ทำงานยังไง

คืนค่า: projectileWeaponItem == Items.CROSSBOW.

Parameters

  • ProjectileWeaponItem projectileWeaponItem

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

Pillager instance = ...;
ProjectileWeaponItem projectileWeaponItem = ...;
boolean result = instance.canFireProjectileWeapon(projectileWeaponItem);

net.minecraft.world.entity.monster.Pillager#createAttributes()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Pillager.java:82
  • Modifiers: public static
  • Return: AttributeSupplier.Builder

คืออะไร

สร้าง Attributes

ทำงานยังไง

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

Parameters

  • ไม่มี

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

AttributeSupplier.Builder result = Pillager.createAttributes();

net.minecraft.world.entity.monster.Pillager#defineSynchedData(SynchedEntityData.Builder)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Pillager.java:90
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ defineSynchedData ตาม implementation ของ Pillager

ทำงานยังไง

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

Parameters

  • SynchedEntityData.Builder builder

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

SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
    super.defineSynchedData(builder);
}

net.minecraft.world.entity.monster.Pillager#enchantSpawnedWeapon(ServerLevelAccessor,RandomSource,DifficultyInstance)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Pillager.java:170
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ enchantSpawnedWeapon ตาม implementation ของ Pillager

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: nextInt(), getMainHandItem(), is(), enchantItemFromProvider(), registryAccess().

Parameters

  • ServerLevelAccessor serverLevelAccessor
  • RandomSource randomSource
  • DifficultyInstance difficultyInstance

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

ServerLevelAccessor serverLevelAccessor = ...;
RandomSource randomSource = ...;
DifficultyInstance difficultyInstance = ...;
@Override
protected void enchantSpawnedWeapon(ServerLevelAccessor serverLevelAccessor, RandomSource randomSource, DifficultyInstance difficultyInstance) {
    super.enchantSpawnedWeapon(serverLevelAccessor, randomSource, difficultyInstance);
}

net.minecraft.world.entity.monster.Pillager#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Pillager.java:154
  • Modifiers: public
  • Return: SpawnGroupData

คืออะไร

ดำเนินการ finalizeSpawn ตาม implementation ของ Pillager

ทำงานยังไง

เรียกต่อ: getRandom(), populateDefaultEquipmentSlots(), populateDefaultEquipmentEnchantments(). คืนค่า: super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData).

Parameters

  • ServerLevelAccessor serverLevelAccessor
  • DifficultyInstance difficultyInstance
  • EntitySpawnReason entitySpawnReason
  • SpawnGroupData spawnGroupData

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

Pillager instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);

net.minecraft.world.entity.monster.Pillager#getAmbientSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Pillager.java:183
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Ambient Sound

ทำงานยังไง

คืนค่า: SoundEvents.PILLAGER_AMBIENT.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getAmbientSound() {
    return super.getAmbientSound();
}

net.minecraft.world.entity.monster.Pillager#getArmPose()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Pillager.java:126
  • Modifiers: public
  • Return: AbstractIllager.IllagerArmPose

คืออะไร

อ่านค่า Arm Pose

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Pillager instance = ...;
AbstractIllager.IllagerArmPose result = instance.getArmPose();

net.minecraft.world.entity.monster.Pillager#getCelebrateSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Pillager.java:258
  • Modifiers: public
  • Return: SoundEvent

คืออะไร

อ่านค่า Celebrate Sound

ทำงานยังไง

คืนค่า: SoundEvents.PILLAGER_CELEBRATE.

Parameters

  • ไม่มี

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

Pillager instance = ...;
SoundEvent result = instance.getCelebrateSound();

net.minecraft.world.entity.monster.Pillager#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Pillager.java:188
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

คืนค่า: SoundEvents.PILLAGER_DEATH.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.monster.Pillager#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Pillager.java:193
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

คืนค่า: SoundEvents.PILLAGER_HURT.

Parameters

  • DamageSource damageSource

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

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

net.minecraft.world.entity.monster.Pillager#getInventory()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Pillager.java:203
  • Modifiers: public
  • Return: SimpleContainer

คืออะไร

อ่านค่า Inventory

ทำงานยังไง

คืนค่า: this.inventory.

Parameters

  • ไม่มี

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

Pillager instance = ...;
SimpleContainer result = instance.getInventory();

net.minecraft.world.entity.monster.Pillager#getMaxSpawnClusterSize()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Pillager.java:149
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Max Spawn Cluster Size

ทำงานยังไง

คืนค่า: 1.

Parameters

  • ไม่มี

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

Pillager instance = ...;
int result = instance.getMaxSpawnClusterSize();

net.minecraft.world.entity.monster.Pillager#getPreferredWeaponType()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Pillager.java:115
  • Modifiers: public
  • Return: TagKey<Item>

คืออะไร

อ่านค่า Preferred Weapon Type

ทำงานยังไง

คืนค่า: ItemTags.PILLAGER_PREFERRED_WEAPONS.

Parameters

  • ไม่มี

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

Pillager instance = ...;
TagKey<Item> result = instance.getPreferredWeaponType();

net.minecraft.world.entity.monster.Pillager#getSlot(int)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Pillager.java:228
  • Modifiers: public
  • Return: SlotAccess

คืออะไร

อ่านค่า Slot

ทำงานยังไง

เรียกต่อ: getContainerSize(), forContainer(). คืนค่า: j >= 0 && j < this.inventory.getContainerSize() ? SlotAccess.forContainer(this.inventory, j) : super.getSlot(i).

Parameters

  • int i

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

Pillager instance = ...;
SlotAccess result = instance.getSlot(0);

net.minecraft.world.entity.monster.Pillager#getWalkTargetValue(BlockPos,LevelReader)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Pillager.java:144
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Walk Target Value

ทำงานยังไง

คืนค่า: 0.0F.

Parameters

  • BlockPos blockPos
  • LevelReader levelReader

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

Pillager instance = ...;
BlockPos blockPos = ...;
LevelReader levelReader = ...;
float result = instance.getWalkTargetValue(blockPos, levelReader);

net.minecraft.world.entity.monster.Pillager#isChargingCrossbow()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Pillager.java:101
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Charging Crossbow

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Pillager instance = ...;
boolean result = instance.isChargingCrossbow();

net.minecraft.world.entity.monster.Pillager#onCrossbowAttackPerformed()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Pillager.java:110
  • Modifiers: public
  • Return: void

คืออะไร

จัดการเหตุการณ์ Crossbow Attack Performed

ทำงานยังไง

แก้ state: noActionTime.

Parameters

  • ไม่มี

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

Pillager instance = ...;
instance.onCrossbowAttackPerformed();

net.minecraft.world.entity.monster.Pillager#performRangedAttack(LivingEntity,float)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Pillager.java:198
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ performRangedAttack ตาม implementation ของ Pillager

ทำงานยังไง

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

Parameters

  • LivingEntity livingEntity
  • float f

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

Pillager instance = ...;
LivingEntity livingEntity = ...;
instance.performRangedAttack(livingEntity, 0.0F);

net.minecraft.world.entity.monster.Pillager#pickUpItem(ServerLevel,ItemEntity)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Pillager.java:208
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ pickUpItem ตาม implementation ของ Pillager

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getItem(), wantsItem(), onItemPickup(), addItem(), isEmpty(), discard(), setCount(), getCount().

Parameters

  • ServerLevel serverLevel
  • ItemEntity itemEntity

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

ServerLevel serverLevel = ...;
ItemEntity itemEntity = ...;
@Override
protected void pickUpItem(ServerLevel serverLevel, ItemEntity itemEntity) {
    super.pickUpItem(serverLevel, itemEntity);
}

net.minecraft.world.entity.monster.Pillager#Pillager(EntityType<? extends Pillager>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Pillager.java:62
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • EntityType<? extends Pillager> entityType
  • Level level

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

EntityType<? extends Pillager> entityType = ...;
Level level = ...;
Pillager instance = new Pillager(entityType, level);

net.minecraft.world.entity.monster.Pillager#populateDefaultEquipmentSlots(RandomSource,DifficultyInstance)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Pillager.java:165
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ populateDefaultEquipmentSlots ตาม implementation ของ Pillager

ทำงานยังไง

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

Parameters

  • RandomSource randomSource
  • DifficultyInstance difficultyInstance

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

RandomSource randomSource = ...;
DifficultyInstance difficultyInstance = ...;
@Override
protected void populateDefaultEquipmentSlots(RandomSource randomSource, DifficultyInstance difficultyInstance) {
    super.populateDefaultEquipmentSlots(randomSource, difficultyInstance);
}

net.minecraft.world.entity.monster.Pillager#readAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Pillager.java:137
  • Modifiers: public
  • Return: void

คืออะไร

อ่าน Additional Save Data

ทำงานยังไง

เรียกต่อ: readInventoryFromTag(), registryAccess(), setCanPickUpLoot().

Parameters

  • CompoundTag compoundTag

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

Pillager instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Pillager#registerGoals()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Pillager.java:66
  • Modifiers: protected
  • Return: void

คืออะไร

ลงทะเบียน Goals

ทำงานยังไง

เรียกต่อ: addGoal(), HoldGroundAttackGoal(), setAlertOthers(). สร้างออบเจ็กต์: FloatGoal, AvoidEntityGoal<>, Raider.HoldGroundAttackGoal, RangedCrossbowAttackGoal<>.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Pillager#setChargingCrossbow(boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Pillager.java:105
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Charging Crossbow

ทำงานยังไง

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

Parameters

  • boolean bl

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

Pillager instance = ...;
instance.setChargingCrossbow(true);

RangedAttackMob

  • Full name: net.minecraft.world.entity.monster.RangedAttackMob
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/RangedAttackMob.java
  • Type: interface
  • Modifiers: public

net.minecraft.world.entity.monster.RangedAttackMob#performRangedAttack(LivingEntity,float)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/RangedAttackMob.java:6
  • Modifiers: ``
  • Return: void

คืออะไร

ดำเนินการ performRangedAttack ตาม implementation ของ RangedAttackMob

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • LivingEntity livingEntity
  • float f

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

RangedAttackMob instance = ...;
LivingEntity livingEntity = ...;
instance.performRangedAttack(livingEntity, 0.0F);

Ravager

  • Full name: net.minecraft.world.entity.monster.Ravager
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/Ravager.java
  • Type: class
  • Modifiers: public
  • Extends: Raider

net.minecraft.world.entity.monster.Ravager#addAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ravager.java:104
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Additional Save Data

ทำงานยังไง

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

Parameters

  • CompoundTag compoundTag

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

Ravager instance = ...;
CompoundTag compoundTag = ...;
instance.addAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Ravager#aiStep()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ravager.java:130
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ aiStep ตาม implementation ของ Ravager

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: roarTick, attackTick, stunnedTick. เรียกต่อ: isAlive(), isImmobile(), getAttribute(), setBaseValue(), getTarget(), getBaseValue(), lerp(), level().

Parameters

  • ไม่มี

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

Ravager instance = ...;
instance.aiStep();

net.minecraft.world.entity.monster.Ravager#applyRaidBuffs(ServerLevel,int,boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ravager.java:316
  • Modifiers: public
  • Return: void

คืออะไร

นำไปใช้ Raid Buffs

ทำงานยังไง

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

Parameters

  • ServerLevel serverLevel
  • int i
  • boolean bl

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

Ravager instance = ...;
ServerLevel serverLevel = ...;
instance.applyRaidBuffs(serverLevel, 0, true);

net.minecraft.world.entity.monster.Ravager#blockedByShield(LivingEntity)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ravager.java:202
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ blockedByShield ตาม implementation ของ Ravager

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: roarTick, stunnedTick. เรียกต่อ: nextDouble(), playSound(), level(), broadcastEntityEvent(), push(), strongKnockback().

Parameters

  • LivingEntity livingEntity

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

LivingEntity livingEntity = ...;
@Override
protected void blockedByShield(LivingEntity livingEntity) {
    super.blockedByShield(livingEntity);
}

net.minecraft.world.entity.monster.Ravager#canBeLeader()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ravager.java:320
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Be Leader

ทำงานยังไง

คืนค่า: false.

Parameters

  • ไม่มี

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

Ravager instance = ...;
boolean result = instance.canBeLeader();

net.minecraft.world.entity.monster.Ravager#checkSpawnObstruction(LevelReader)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ravager.java:311
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบ Spawn Obstruction

ทำงานยังไง

เรียกต่อ: containsAnyLiquid(), getBoundingBox(). คืนค่า: !levelReader.containsAnyLiquid(this.getBoundingBox()).

Parameters

  • LevelReader levelReader

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

Ravager instance = ...;
LevelReader levelReader = ...;
boolean result = instance.checkSpawnObstruction(levelReader);

net.minecraft.world.entity.monster.Ravager#createAttributes()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ravager.java:93
  • Modifiers: public static
  • Return: AttributeSupplier.Builder

คืออะไร

สร้าง Attributes

ทำงานยังไง

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

Parameters

  • ไม่มี

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

AttributeSupplier.Builder result = Ravager.createAttributes();

net.minecraft.world.entity.monster.Ravager#doHurtTarget(ServerLevel,Entity)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ravager.java:282
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ doHurtTarget ตาม implementation ของ Ravager

ทำงานยังไง

แก้ state: attackTick. เรียกต่อ: broadcastEntityEvent(), playSound(). คืนค่า: super.doHurtTarget(serverLevel, entity).

Parameters

  • ServerLevel serverLevel
  • Entity entity

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

Ravager instance = ...;
ServerLevel serverLevel = ...;
Entity entity = ...;
boolean result = instance.doHurtTarget(serverLevel, entity);

net.minecraft.world.entity.monster.Ravager#getAmbientSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ravager.java:290
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Ambient Sound

ทำงานยังไง

คืนค่า: SoundEvents.RAVAGER_AMBIENT.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getAmbientSound() {
    return super.getAmbientSound();
}

net.minecraft.world.entity.monster.Ravager#getAttackBoundingBox()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ravager.java:325
  • Modifiers: protected
  • Return: AABB

คืออะไร

อ่านค่า Attack Bounding Box

ทำงานยังไง

เรียกต่อ: deflate(). คืนค่า: aABB.deflate(0.05, 0.0, 0.05).

Parameters

  • ไม่มี

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

@Override
protected AABB getAttackBoundingBox() {
    return super.getAttackBoundingBox();
}

net.minecraft.world.entity.monster.Ravager#getAttackTick()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ravager.java:270
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Attack Tick

ทำงานยังไง

คืนค่า: this.attackTick.

Parameters

  • ไม่มี

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

Ravager instance = ...;
int result = instance.getAttackTick();

net.minecraft.world.entity.monster.Ravager#getCelebrateSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ravager.java:120
  • Modifiers: public
  • Return: SoundEvent

คืออะไร

อ่านค่า Celebrate Sound

ทำงานยังไง

คืนค่า: SoundEvents.RAVAGER_CELEBRATE.

Parameters

  • ไม่มี

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

Ravager instance = ...;
SoundEvent result = instance.getCelebrateSound();

net.minecraft.world.entity.monster.Ravager#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ravager.java:301
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

คืนค่า: SoundEvents.RAVAGER_DEATH.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.monster.Ravager#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ravager.java:296
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

คืนค่า: SoundEvents.RAVAGER_HURT.

Parameters

  • DamageSource damageSource

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

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

net.minecraft.world.entity.monster.Ravager#getMaxHeadYRot()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ravager.java:125
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Max Head YRot

ทำงานยังไง

คืนค่า: 45.

Parameters

  • ไม่มี

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

Ravager instance = ...;
int result = instance.getMaxHeadYRot();

net.minecraft.world.entity.monster.Ravager#getRoarTick()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ravager.java:278
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Roar Tick

ทำงานยังไง

คืนค่า: this.roarTick.

Parameters

  • ไม่มี

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

Ravager instance = ...;
int result = instance.getRoarTick();

net.minecraft.world.entity.monster.Ravager#getStunnedTick()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ravager.java:274
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Stunned Tick

ทำงานยังไง

คืนค่า: this.stunnedTick.

Parameters

  • ไม่มี

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

Ravager instance = ...;
int result = instance.getStunnedTick();

net.minecraft.world.entity.monster.Ravager#handleEntityEvent(byte)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ravager.java:258
  • Modifiers: public
  • Return: void

คืออะไร

จัดการ Entity Event

ทำงานยังไง

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

Parameters

  • byte b

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

Ravager instance = ...;
instance.handleEntityEvent(0);

net.minecraft.world.entity.monster.Ravager#hasLineOfSight(Entity)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ravager.java:197
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Line Of Sight

ทำงานยังไง

คืนค่า: this.stunnedTick <= 0 && this.roarTick <= 0 ? super.hasLineOfSight(entity) : false.

Parameters

  • Entity entity

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

Ravager instance = ...;
Entity entity = ...;
boolean result = instance.hasLineOfSight(entity);

net.minecraft.world.entity.monster.Ravager#isImmobile()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ravager.java:192
  • Modifiers: protected
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: super.isImmobile() || this.attackTick > 0 || this.stunnedTick > 0 || this.roarTick > 0.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Ravager#playStepSound(BlockPos,BlockState)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ravager.java:306
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ playStepSound ตาม implementation ของ Ravager

ทำงานยังไง

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

Parameters

  • BlockPos blockPos
  • BlockState blockState

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

BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected void playStepSound(BlockPos blockPos, BlockState blockState) {
    super.playStepSound(blockPos, blockState);
}

net.minecraft.world.entity.monster.Ravager#Ravager(EntityType<? extends Ravager>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ravager.java:63
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • EntityType<? extends Ravager> entityType
  • Level level

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

EntityType<? extends Ravager> entityType = ...;
Level level = ...;
Ravager instance = new Ravager(entityType, level);

net.minecraft.world.entity.monster.Ravager#readAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ravager.java:112
  • Modifiers: public
  • Return: void

คืออะไร

อ่าน Additional Save Data

ทำงานยังไง

แก้ state: attackTick, stunnedTick, roarTick. เรียกต่อ: getInt().

Parameters

  • CompoundTag compoundTag

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

Ravager instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Ravager#registerGoals()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ravager.java:69
  • Modifiers: protected
  • Return: void

คืออะไร

ลงทะเบียน Goals

ทำงานยังไง

เรียกต่อ: addGoal(), setAlertOthers(), isBaby(). สร้างออบเจ็กต์: FloatGoal, MeleeAttackGoal, WaterAvoidingRandomStrollGoal, LookAtPlayerGoal.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Ravager#updateControlFlags()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Ravager.java:83
  • Modifiers: protected
  • Return: void

คืออะไร

อัปเดต Control Flags

ทำงานยังไง

เรียกต่อ: getControllingPassenger(), getType(), is(), getVehicle(), setControlFlag().

Parameters

  • ไม่มี

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

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

Shulker

  • Full name: net.minecraft.world.entity.monster.Shulker
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/Shulker.java
  • Type: class
  • Modifiers: public
  • Extends: AbstractGolem
  • Implements: VariantHolder<Optional<DyeColor>>,Enemy

net.minecraft.world.entity.monster.Shulker#addAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:159
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Additional Save Data

ทำงานยังไง

เรียกต่อ: putByte(), getAttachFace(), get3DDataValue(), get().

Parameters

  • CompoundTag compoundTag

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

Shulker instance = ...;
CompoundTag compoundTag = ...;
instance.addAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Shulker#canBeCollidedWith()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:452
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Be Collided With

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Shulker instance = ...;
boolean result = instance.canBeCollidedWith();

net.minecraft.world.entity.monster.Shulker#createAttributes()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:140
  • Modifiers: public static
  • Return: AttributeSupplier.Builder

คืออะไร

สร้าง Attributes

ทำงานยังไง

เรียกต่อ: createMobAttributes(), add(). คืนค่า: Mob.createMobAttributes().add(Attributes.MAX_HEALTH, 30.0).

Parameters

  • ไม่มี

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

AttributeSupplier.Builder result = Shulker.createAttributes();

net.minecraft.world.entity.monster.Shulker#createBodyControl()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:144
  • Modifiers: protected
  • Return: BodyRotationControl

คืออะไร

สร้าง Body Control

ทำงานยังไง

เรียกต่อ: ShulkerBodyRotationControl(). สร้างออบเจ็กต์: Shulker.ShulkerBodyRotationControl. คืนค่า: new Shulker.ShulkerBodyRotationControl(this).

Parameters

  • ไม่มี

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

@Override
protected BodyRotationControl createBodyControl() {
    return super.createBodyControl();
}

net.minecraft.world.entity.monster.Shulker#defineSynchedData(SynchedEntityData.Builder)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:132
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ defineSynchedData ตาม implementation ของ Shulker

ทำงานยังไง

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

Parameters

  • SynchedEntityData.Builder builder

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

SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
    super.defineSynchedData(builder);
}

net.minecraft.world.entity.monster.Shulker#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:278
  • Modifiers: public
  • Return: SpawnGroupData

คืออะไร

ดำเนินการ finalizeSpawn ตาม implementation ของ Shulker

ทำงานยังไง

แก้ state: yHeadRot. เรียกต่อ: setYRot(), getYRot(), setOldPosAndRot(). คืนค่า: super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData).

Parameters

  • ServerLevelAccessor serverLevelAccessor
  • DifficultyInstance difficultyInstance
  • EntitySpawnReason entitySpawnReason
  • SpawnGroupData spawnGroupData

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

Shulker instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);

net.minecraft.world.entity.monster.Shulker#findAttachableSurface(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:332
  • Modifiers: protected
  • Return: Direction

คืออะไร

ค้นหา Attachable Surface

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: values(), canStayAt(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • BlockPos blockPos

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

BlockPos blockPos = ...;
@Override
protected Direction findAttachableSurface(BlockPos blockPos) {
    return super.findAttachableSurface(blockPos);
}

net.minecraft.world.entity.monster.Shulker#getAmbientSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:110
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Ambient Sound

ทำงานยังไง

คืนค่า: SoundEvents.SHULKER_AMBIENT.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getAmbientSound() {
    return super.getAmbientSound();
}

net.minecraft.world.entity.monster.Shulker#getAttachFace()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:457
  • Modifiers: public
  • Return: Direction

คืออะไร

อ่านค่า Attach Face

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Shulker instance = ...;
Direction result = instance.getAttachFace();

net.minecraft.world.entity.monster.Shulker#getClientPeekAmount(float)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:494
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Client Peek Amount

ทำงานยังไง

เรียกต่อ: lerp(). คืนค่า: Mth.lerp(f, this.currentPeekAmountO, this.currentPeekAmount).

Parameters

  • float f

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

Shulker instance = ...;
float result = instance.getClientPeekAmount(0.0F);

net.minecraft.world.entity.monster.Shulker#getColor()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:548
  • Modifiers: public
  • Return: DyeColor

คืออะไร

อ่านค่า Color

ทำงานยังไง

เรียกต่อ: get(), byId(). คืนค่า: b != 16 && b <= 15 ? DyeColor.byId(b) : null.

Parameters

  • ไม่มี

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

Shulker instance = ...;
DyeColor result = instance.getColor();

net.minecraft.world.entity.monster.Shulker#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:122
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

คืนค่า: SoundEvents.SHULKER_DEATH.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.monster.Shulker#getDeltaMovement()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:298
  • Modifiers: public
  • Return: Vec3

คืออะไร

อ่านค่า Delta Movement

ทำงานยังไง

คืนค่า: Vec3.ZERO.

Parameters

  • ไม่มี

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

Shulker instance = ...;
Vec3 result = instance.getDeltaMovement();

net.minecraft.world.entity.monster.Shulker#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:127
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

เรียกต่อ: isClosed(). คืนค่า: this.isClosed() ? SoundEvents.SHULKER_HURT_CLOSED : SoundEvents.SHULKER_HURT.

Parameters

  • DamageSource damageSource

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

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

net.minecraft.world.entity.monster.Shulker#getMaxHeadXRot()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:505
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Max Head XRot

ทำงานยังไง

คืนค่า: 180.

Parameters

  • ไม่มี

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

Shulker instance = ...;
int result = instance.getMaxHeadXRot();

net.minecraft.world.entity.monster.Shulker#getMaxHeadYRot()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:510
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Max Head YRot

ทำงานยังไง

คืนค่า: 180.

Parameters

  • ไม่มี

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

Shulker instance = ...;
int result = instance.getMaxHeadYRot();

net.minecraft.world.entity.monster.Shulker#getMovementEmission()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:100
  • Modifiers: protected
  • Return: Entity.MovementEmission

คืออะไร

อ่านค่า Movement Emission

ทำงานยังไง

คืนค่า: Entity.MovementEmission.NONE.

Parameters

  • ไม่มี

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

@Override
protected Entity.MovementEmission getMovementEmission() {
    return super.getMovementEmission();
}

net.minecraft.world.entity.monster.Shulker#getProgressAabb(float,Direction,float,Vec3)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:243
  • Modifiers: public static
  • Return: AABB

คืออะไร

อ่านค่า Progress Aabb

ทำงานยังไง

เรียกต่อ: getProgressDeltaAabb(). คืนค่า: getProgressDeltaAabb(f, direction, -1.0F, g, vec3).

Parameters

  • float f
  • Direction direction
  • float g
  • Vec3 vec3

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

Direction direction = ...;
Vec3 vec3 = ...;
AABB result = Shulker.getProgressAabb(0.0F, direction, 0.0F, vec3);

net.minecraft.world.entity.monster.Shulker#getProgressDeltaAabb(float,Direction,float,float,Vec3)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:247
  • Modifiers: public static
  • Return: AABB

คืออะไร

อ่านค่า Progress Delta Aabb

ทำงานยังไง

เรียกต่อ: max(), min(), expandTowards(), getStepX(), getStepY(), getStepZ(), contract(), move(). สร้างออบเจ็กต์: AABB. คืนค่า: aABB2.move(vec3.x, vec3.y, vec3.z).

Parameters

  • float f
  • Direction direction
  • float g
  • float h
  • Vec3 vec3

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

Direction direction = ...;
Vec3 vec3 = ...;
AABB result = Shulker.getProgressDeltaAabb(0.0F, direction, 0.0F, 0.0F, vec3);

net.minecraft.world.entity.monster.Shulker#getRenderPosition(float)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:519
  • Modifiers: public
  • Return: Vec3

คืออะไร

อ่านค่า Render Position

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getScale(), blockPosition(), getX(), getY(), getZ(). สร้างออบเจ็กต์: Vec3. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • float f

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

Shulker instance = ...;
Vec3 result = instance.getRenderPosition(0.0F);

net.minecraft.world.entity.monster.Shulker#getSoundSource()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:105
  • Modifiers: public
  • Return: SoundSource

คืออะไร

อ่านค่า Sound Source

ทำงานยังไง

คืนค่า: SoundSource.HOSTILE.

Parameters

  • ไม่มี

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

Shulker instance = ...;
SoundSource result = instance.getSoundSource();

net.minecraft.world.entity.monster.Shulker#getVariant()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:544
  • Modifiers: public
  • Return: Optional<DyeColor>

คืออะไร

อ่านค่า Variant

ทำงานยังไง

เรียกต่อ: ofNullable(), getColor(). คืนค่า: Optional.ofNullable(this.getColor()).

Parameters

  • ไม่มี

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

Shulker instance = ...;
Optional<DyeColor> result = instance.getVariant();

net.minecraft.world.entity.monster.Shulker#hurtServer(ServerLevel,DamageSource,float)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:406
  • Modifiers: public
  • Return: boolean

คืออะไร

ประมวลผลความเสียหาย Server

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isClosed(), getDirectEntity(), getHealth(), getMaxHealth(), nextInt(), teleportSomewhere(), is(), getType(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • ServerLevel serverLevel
  • DamageSource damageSource
  • float f

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

Shulker instance = ...;
ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
boolean result = instance.hurtServer(serverLevel, damageSource, 0.0F);

net.minecraft.world.entity.monster.Shulker#lerpTo(double,double,double,float,float,int)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:399
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ lerpTo ตาม implementation ของ Shulker

ทำงานยังไง

แก้ state: lerpSteps. เรียกต่อ: setPos(), setRot().

Parameters

  • double d
  • double e
  • double f
  • float g
  • float h
  • int i

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

Shulker instance = ...;
instance.lerpTo(0.0D, 0.0D, 0.0D, 0.0F, 0.0F, 0);

net.minecraft.world.entity.monster.Shulker#makeBoundingBox(Vec3)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:196
  • Modifiers: protected
  • Return: AABB

คืออะไร

สร้าง Bounding Box

ทำงานยังไง

เรียกต่อ: getPhysicalPeek(), getAttachFace(), getOpposite(), getProgressAabb(), getScale(). คืนค่า: getProgressAabb(this.getScale(), direction, f, vec3).

Parameters

  • Vec3 vec3

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

Vec3 vec3 = ...;
@Override
protected AABB makeBoundingBox(Vec3 vec3) {
    return super.makeBoundingBox(vec3);
}

net.minecraft.world.entity.monster.Shulker#move(MoverType,Vec3)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:289
  • Modifiers: public
  • Return: void

คืออะไร

เคลื่อนที่ move

ทำงานยังไง

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

Parameters

  • MoverType moverType
  • Vec3 vec3

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

Shulker instance = ...;
MoverType moverType = ...;
Vec3 vec3 = ...;
instance.move(moverType, vec3);

net.minecraft.world.entity.monster.Shulker#onSyncedDataUpdated(EntityDataAccessor<?>)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:465
  • Modifiers: public
  • Return: void

คืออะไร

จัดการเหตุการณ์ Synced Data Updated

ทำงานยังไง

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

Parameters

  • EntityDataAccessor<?> entityDataAccessor

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

Shulker instance = ...;
EntityDataAccessor<?> entityDataAccessor = ...;
instance.onSyncedDataUpdated(entityDataAccessor);

net.minecraft.world.entity.monster.Shulker#playAmbientSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:115
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ playAmbientSound ตาม implementation ของ Shulker

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Shulker instance = ...;
instance.playAmbientSound();

net.minecraft.world.entity.monster.Shulker#push(Entity)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:515
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ push ตาม implementation ของ Shulker

ทำงานยังไง

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

Parameters

  • Entity entity

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

Shulker instance = ...;
Entity entity = ...;
instance.push(entity);

net.minecraft.world.entity.monster.Shulker#readAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:149
  • Modifiers: public
  • Return: void

คืออะไร

อ่าน Additional Save Data

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: setAttachFace(), from3DDataValue(), getByte(), set(), contains().

Parameters

  • CompoundTag compoundTag

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

Shulker instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Shulker#recreateFromPacket(ClientboundAddEntityPacket)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:498
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ recreateFromPacket ตาม implementation ของ Shulker

ทำงานยังไง

แก้ state: yBodyRot, yBodyRotO.

Parameters

  • ClientboundAddEntityPacket clientboundAddEntityPacket

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

Shulker instance = ...;
ClientboundAddEntityPacket clientboundAddEntityPacket = ...;
instance.recreateFromPacket(clientboundAddEntityPacket);

net.minecraft.world.entity.monster.Shulker#registerGoals()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:89
  • Modifiers: protected
  • Return: void

คืออะไร

ลงทะเบียน Goals

ทำงานยังไง

เรียกต่อ: addGoal(), ShulkerAttackGoal(), ShulkerPeekGoal(), getClass(), setAlertOthers(), ShulkerNearestAttackGoal(), ShulkerDefenseAttackGoal(). สร้างออบเจ็กต์: LookAtPlayerGoal, Shulker.ShulkerAttackGoal, Shulker.ShulkerPeekGoal, RandomLookAroundGoal.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Shulker#sanitizeScale(float)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:535
  • Modifiers: protected
  • Return: float

คืออะไร

ดำเนินการ sanitizeScale ตาม implementation ของ Shulker

ทำงานยังไง

เรียกต่อ: min(). คืนค่า: Math.min(f, 3.0F).

Parameters

  • float f

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

@Override
protected float sanitizeScale(float f) {
    return super.sanitizeScale(f);
}

net.minecraft.world.entity.monster.Shulker#setDeltaMovement(Vec3)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:303
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Delta Movement

ทำงานยังไง

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

Parameters

  • Vec3 vec3

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

Shulker instance = ...;
Vec3 vec3 = ...;
instance.setDeltaMovement(vec3);

net.minecraft.world.entity.monster.Shulker#setPos(double,double,double)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:307
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Pos

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: hasImpulse, clientOldAttachPosition, clientSideTeleportInterpolation, xOld, yOld, zOld. เรียกต่อ: blockPosition(), isPassenger(), floor(), equals(), set(), level(), getX(), getY().

Parameters

  • double d
  • double e
  • double f

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

Shulker instance = ...;
instance.setPos(0.0D, 0.0D, 0.0D);

net.minecraft.world.entity.monster.Shulker#setVariant(Optional<DyeColor>)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:540
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Variant

ทำงานยังไง

เรียกต่อ: set(), map(), getId(), orElse().

Parameters

  • Optional<DyeColor> optional

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

Shulker instance = ...;
Optional<DyeColor> optional = ...;
instance.setVariant(optional);

net.minecraft.world.entity.monster.Shulker#Shulker(EntityType<? extends Shulker>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:83
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: xpReward, lookControl. เรียกต่อ: ShulkerLookControl(). สร้างออบเจ็กต์: Shulker.ShulkerLookControl.

Parameters

  • EntityType<? extends Shulker> entityType
  • Level level

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

EntityType<? extends Shulker> entityType = ...;
Level level = ...;
Shulker instance = new Shulker(entityType, level);

net.minecraft.world.entity.monster.Shulker#startRiding(Entity,boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:256
  • Modifiers: public
  • Return: boolean

คืออะไร

เริ่ม Riding

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: clientOldAttachPosition, clientSideTeleportInterpolation. เรียกต่อ: level(), isClientSide(), setAttachFace(). คืนค่า: super.startRiding(entity, bl).

Parameters

  • Entity entity
  • boolean bl

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

Shulker instance = ...;
Entity entity = ...;
boolean result = instance.startRiding(entity, true);

net.minecraft.world.entity.monster.Shulker#stopRiding()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:267
  • Modifiers: public
  • Return: void

คืออะไร

หยุด Riding

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: clientOldAttachPosition, yBodyRotO, yBodyRot. เรียกต่อ: level(), blockPosition().

Parameters

  • ไม่มี

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

Shulker instance = ...;
instance.stopRiding();

net.minecraft.world.entity.monster.Shulker#teleportSomewhere()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:367
  • Modifiers: protected
  • Return: boolean

คืออะไร

ดำเนินการ teleportSomewhere ตาม implementation ของ Shulker

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: isNoAi(), isAlive(), blockPosition(), offset(), randomBetweenInclusive(), getY(), level(), getMinY(). สร้างออบเจ็กต์: AABB. มีจุด return อย่างน้อย 3 จุด.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Shulker#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Shulker.java:167
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: clientSideTeleportInterpolation, clientOldAttachPosition. เรียกต่อ: level(), isPassenger(), canStayAt(), blockPosition(), getAttachFace(), findNewAttachment(), updatePeekAmount(), onPeekAmountChange().

Parameters

  • ไม่มี

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

Shulker instance = ...;
instance.tick();

Silverfish

  • Full name: net.minecraft.world.entity.monster.Silverfish
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/Silverfish.java
  • Type: class
  • Modifiers: public
  • Extends: Monster

net.minecraft.world.entity.monster.Silverfish#checkSilverfishSpawnRules(EntityType<Silverfish>,LevelAccessor,EntitySpawnReason,BlockPos,RandomSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Silverfish.java:113
  • Modifiers: public static
  • Return: boolean

คืออะไร

ตรวจสอบ Silverfish Spawn Rules

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: checkAnyLightMonsterSpawnRules(), isSpawner(), getNearestPlayer(), getX(), getY(), getZ(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • EntityType<Silverfish> entityType
  • LevelAccessor levelAccessor
  • EntitySpawnReason entitySpawnReason
  • BlockPos blockPos
  • RandomSource randomSource

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

EntityType<Silverfish> entityType = ...;
LevelAccessor levelAccessor = ...;
EntitySpawnReason entitySpawnReason = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
boolean result = Silverfish.checkSilverfishSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource);

net.minecraft.world.entity.monster.Silverfish#createAttributes()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Silverfish.java:54
  • Modifiers: public static
  • Return: AttributeSupplier.Builder

คืออะไร

สร้าง Attributes

ทำงานยังไง

เรียกต่อ: createMonsterAttributes(), add(). คืนค่า: Monster.createMonsterAttributes().add(Attributes.MAX_HEALTH, 8.0).add(Attributes.MOVEMENT_SPEED, 0.25).add(Attributes.ATTACK_DAMAGE, 1.0).

Parameters

  • ไม่มี

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

AttributeSupplier.Builder result = Silverfish.createAttributes();

net.minecraft.world.entity.monster.Silverfish#getAmbientSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Silverfish.java:63
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Ambient Sound

ทำงานยังไง

คืนค่า: SoundEvents.SILVERFISH_AMBIENT.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getAmbientSound() {
    return super.getAmbientSound();
}

net.minecraft.world.entity.monster.Silverfish#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Silverfish.java:73
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

คืนค่า: SoundEvents.SILVERFISH_DEATH.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.monster.Silverfish#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Silverfish.java:68
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

คืนค่า: SoundEvents.SILVERFISH_HURT.

Parameters

  • DamageSource damageSource

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

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

net.minecraft.world.entity.monster.Silverfish#getMovementEmission()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Silverfish.java:58
  • Modifiers: protected
  • Return: Entity.MovementEmission

คืออะไร

อ่านค่า Movement Emission

ทำงานยังไง

คืนค่า: Entity.MovementEmission.EVENTS.

Parameters

  • ไม่มี

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

@Override
protected Entity.MovementEmission getMovementEmission() {
    return super.getMovementEmission();
}

net.minecraft.world.entity.monster.Silverfish#getWalkTargetValue(BlockPos,LevelReader)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Silverfish.java:108
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Walk Target Value

ทำงานยังไง

เรียกต่อ: isCompatibleHostBlock(), getBlockState(), below(). คืนค่า: InfestedBlock.isCompatibleHostBlock(levelReader.getBlockState(blockPos.below())) ? 10.0F : super.getWalkTargetValue(blockPos, levelReader).

Parameters

  • BlockPos blockPos
  • LevelReader levelReader

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

Silverfish instance = ...;
BlockPos blockPos = ...;
LevelReader levelReader = ...;
float result = instance.getWalkTargetValue(blockPos, levelReader);

net.minecraft.world.entity.monster.Silverfish#hurtServer(ServerLevel,DamageSource,float)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Silverfish.java:83
  • Modifiers: public
  • Return: boolean

คืออะไร

ประมวลผลความเสียหาย Server

ทำงานยังไง

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

Parameters

  • ServerLevel serverLevel
  • DamageSource damageSource
  • float f

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

Silverfish instance = ...;
ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
boolean result = instance.hurtServer(serverLevel, damageSource, 0.0F);

net.minecraft.world.entity.monster.Silverfish#playStepSound(BlockPos,BlockState)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Silverfish.java:78
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ playStepSound ตาม implementation ของ Silverfish

ทำงานยังไง

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

Parameters

  • BlockPos blockPos
  • BlockState blockState

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

BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected void playStepSound(BlockPos blockPos, BlockState blockState) {
    super.playStepSound(blockPos, blockState);
}

net.minecraft.world.entity.monster.Silverfish#registerGoals()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Silverfish.java:42
  • Modifiers: protected
  • Return: void

คืออะไร

ลงทะเบียน Goals

ทำงานยังไง

แก้ state: friendsGoal. เรียกต่อ: SilverfishWakeUpFriendsGoal(), addGoal(), level(), SilverfishMergeWithStoneGoal(), setAlertOthers(). สร้างออบเจ็กต์: Silverfish.SilverfishWakeUpFriendsGoal, FloatGoal, ClimbOnTopOfPowderSnowGoal, MeleeAttackGoal.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Silverfish#setYBodyRot(float)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Silverfish.java:102
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า YBody Rot

ทำงานยังไง

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

Parameters

  • float f

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

Silverfish instance = ...;
instance.setYBodyRot(0.0F);

net.minecraft.world.entity.monster.Silverfish#Silverfish(EntityType<? extends Silverfish>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Silverfish.java:38
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • EntityType<? extends Silverfish> entityType
  • Level level

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

EntityType<? extends Silverfish> entityType = ...;
Level level = ...;
Silverfish instance = new Silverfish(entityType, level);

net.minecraft.world.entity.monster.Silverfish#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Silverfish.java:96
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

แก้ state: yBodyRot. เรียกต่อ: getYRot().

Parameters

  • ไม่มี

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

Silverfish instance = ...;
instance.tick();

Skeleton

  • Full name: net.minecraft.world.entity.monster.Skeleton
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/Skeleton.java
  • Type: class
  • Modifiers: public
  • Extends: AbstractSkeleton

net.minecraft.world.entity.monster.Skeleton#addAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Skeleton.java:71
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Additional Save Data

ทำงานยังไง

เรียกต่อ: putInt(), isFreezeConverting().

Parameters

  • CompoundTag compoundTag

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

Skeleton instance = ...;
CompoundTag compoundTag = ...;
instance.addAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Skeleton#canFreeze()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Skeleton.java:99
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: false.

Parameters

  • ไม่มี

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

Skeleton instance = ...;
boolean result = instance.canFreeze();

net.minecraft.world.entity.monster.Skeleton#defineSynchedData(SynchedEntityData.Builder)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Skeleton.java:28
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ defineSynchedData ตาม implementation ของ Skeleton

ทำงานยังไง

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

Parameters

  • SynchedEntityData.Builder builder

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

SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
    super.defineSynchedData(builder);
}

net.minecraft.world.entity.monster.Skeleton#doFreezeConversion()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Skeleton.java:91
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ doFreezeConversion ตาม implementation ของ Skeleton

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: convertTo(), single(), isSilent(), level(), levelEvent(), blockPosition().

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Skeleton#dropCustomDeathLoot(ServerLevel,DamageSource,boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Skeleton.java:124
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ dropCustomDeathLoot ตาม implementation ของ Skeleton

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getEntity(), canDropMobsSkull(), increaseDroppedSkulls(), spawnAtLocation().

Parameters

  • ServerLevel serverLevel
  • DamageSource damageSource
  • boolean bl

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

ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
@Override
protected void dropCustomDeathLoot(ServerLevel serverLevel, DamageSource damageSource, boolean bl) {
    super.dropCustomDeathLoot(serverLevel, damageSource, bl);
}

net.minecraft.world.entity.monster.Skeleton#getAmbientSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Skeleton.java:104
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Ambient Sound

ทำงานยังไง

คืนค่า: SoundEvents.SKELETON_AMBIENT.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getAmbientSound() {
    return super.getAmbientSound();
}

net.minecraft.world.entity.monster.Skeleton#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Skeleton.java:114
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

คืนค่า: SoundEvents.SKELETON_DEATH.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.monster.Skeleton#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Skeleton.java:109
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

คืนค่า: SoundEvents.SKELETON_HURT.

Parameters

  • DamageSource damageSource

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

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

net.minecraft.world.entity.monster.Skeleton#isFreezeConverting()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Skeleton.java:34
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Freeze Converting

ทำงานยังไง

เรียกต่อ: getEntityData(), get(). คืนค่า: this.getEntityData().get(DATA_STRAY_CONVERSION_ID).

Parameters

  • ไม่มี

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

Skeleton instance = ...;
boolean result = instance.isFreezeConverting();

net.minecraft.world.entity.monster.Skeleton#isShaking()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Skeleton.java:42
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Skeleton instance = ...;
boolean result = instance.isShaking();

net.minecraft.world.entity.monster.Skeleton#readAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Skeleton.java:77
  • Modifiers: public
  • Return: void

คืออะไร

อ่าน Additional Save Data

ทำงานยังไง

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

Parameters

  • CompoundTag compoundTag

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

Skeleton instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Skeleton#setFreezeConverting(boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Skeleton.java:38
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Freeze Converting

ทำงานยังไง

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

Parameters

  • boolean bl

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

Skeleton instance = ...;
instance.setFreezeConverting(true);

net.minecraft.world.entity.monster.Skeleton#Skeleton(EntityType<? extends Skeleton>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Skeleton.java:24
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • EntityType<? extends Skeleton> entityType
  • Level level

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

EntityType<? extends Skeleton> entityType = ...;
Level level = ...;
Skeleton instance = new Skeleton(entityType, level);

net.minecraft.world.entity.monster.Skeleton#startFreezeConversion(int)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Skeleton.java:85
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม Freeze Conversion

ทำงานยังไง

แก้ state: conversionTime. เรียกต่อ: setFreezeConverting().

Parameters

  • int i

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

Skeleton instance = ...;
instance.startFreezeConversion(0);

net.minecraft.world.entity.monster.Skeleton#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Skeleton.java:47
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: conversionTime, inPowderSnowTime. เรียกต่อ: level(), isAlive(), isNoAi(), isFreezeConverting(), doFreezeConversion(), startFreezeConversion(), setFreezeConverting().

Parameters

  • ไม่มี

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

Skeleton instance = ...;
instance.tick();

Slime

  • Full name: net.minecraft.world.entity.monster.Slime
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/Slime.java
  • Type: class
  • Modifiers: public
  • Extends: Mob
  • Implements: Enemy

net.minecraft.world.entity.monster.Slime#addAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:111
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Additional Save Data

ทำงานยังไง

เรียกต่อ: putInt(), getSize(), putBoolean().

Parameters

  • CompoundTag compoundTag

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

Slime instance = ...;
CompoundTag compoundTag = ...;
instance.addAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Slime#checkSlimeSpawnRules(EntityType<Slime>,LevelAccessor,EntitySpawnReason,BlockPos,RandomSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:276
  • Modifiers: public static
  • Return: boolean

คืออะไร

ตรวจสอบ Slime Spawn Rules

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getDifficulty(), isSpawner(), checkMobSpawnRules(), getBiome(), is(), getY(), nextFloat(), getMoonBrightness(). สร้างออบเจ็กต์: ChunkPos. มีจุด return อย่างน้อย 5 จุด.

Parameters

  • EntityType<Slime> entityType
  • LevelAccessor levelAccessor
  • EntitySpawnReason entitySpawnReason
  • BlockPos blockPos
  • RandomSource randomSource

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

EntityType<Slime> entityType = ...;
LevelAccessor levelAccessor = ...;
EntitySpawnReason entitySpawnReason = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
boolean result = Slime.checkSlimeSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource);

net.minecraft.world.entity.monster.Slime#dealDamage(LivingEntity)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:239
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ dealDamage ตาม implementation ของ Slime

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: level(), isAlive(), isWithinMeleeAttackRange(), hasLineOfSight(), damageSources(), mobAttack(), hurtServer(), getAttackDamage().

Parameters

  • LivingEntity livingEntity

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

LivingEntity livingEntity = ...;
@Override
protected void dealDamage(LivingEntity livingEntity) {
    super.dealDamage(livingEntity);
}

net.minecraft.world.entity.monster.Slime#decreaseSquish()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:165
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ decreaseSquish ตาม implementation ของ Slime

ทำงานยังไง

แก้ state: targetSquish.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Slime#defineSynchedData(SynchedEntityData.Builder)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:85
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ defineSynchedData ตาม implementation ของ Slime

ทำงานยังไง

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

Parameters

  • SynchedEntityData.Builder builder

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

SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
    super.defineSynchedData(builder);
}

net.minecraft.world.entity.monster.Slime#doPlayJumpSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:317
  • Modifiers: protected
  • Return: boolean

คืออะไร

ดำเนินการ doPlayJumpSound ตาม implementation ของ Slime

ทำงานยังไง

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

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Slime#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:328
  • Modifiers: public
  • Return: SpawnGroupData

คืออะไร

ดำเนินการ finalizeSpawn ตาม implementation ของ Slime

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getRandom(), nextInt(), nextFloat(), getSpecialMultiplier(), setSize(). คืนค่า: super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData).

Parameters

  • ServerLevelAccessor serverLevelAccessor
  • DifficultyInstance difficultyInstance
  • EntitySpawnReason entitySpawnReason
  • SpawnGroupData spawnGroupData

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

Slime instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);

net.minecraft.world.entity.monster.Slime#getAttackDamage()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:258
  • Modifiers: protected
  • Return: float

คืออะไร

อ่านค่า Attack Damage

ทำงานยังไง

เรียกต่อ: getAttributeValue(). คืนค่า: (float)this.getAttributeValue(Attributes.ATTACK_DAMAGE).

Parameters

  • ไม่มี

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

@Override
protected float getAttackDamage() {
    return super.getAttackDamage();
}

net.minecraft.world.entity.monster.Slime#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:267
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

เรียกต่อ: isTiny(). คืนค่า: this.isTiny() ? SoundEvents.SLIME_DEATH_SMALL : SoundEvents.SLIME_DEATH.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.monster.Slime#getDefaultDimensions(Pose)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:353
  • Modifiers: public
  • Return: EntityDimensions

คืออะไร

อ่านค่า Default Dimensions

ทำงานยังไง

เรียกต่อ: scale(), getSize(). คืนค่า: super.getDefaultDimensions(pose).scale(this.getSize()).

Parameters

  • Pose pose

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

Slime instance = ...;
Pose pose = ...;
EntityDimensions result = instance.getDefaultDimensions(pose);

net.minecraft.world.entity.monster.Slime#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:262
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

เรียกต่อ: isTiny(). คืนค่า: this.isTiny() ? SoundEvents.SLIME_HURT_SMALL : SoundEvents.SLIME_HURT.

Parameters

  • DamageSource damageSource

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

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

net.minecraft.world.entity.monster.Slime#getJumpDelay()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:169
  • Modifiers: protected
  • Return: int

คืออะไร

อ่านค่า Jump Delay

ทำงานยังไง

เรียกต่อ: nextInt(). คืนค่า: this.random.nextInt(20) + 10.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Slime#getJumpSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:349
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Jump Sound

ทำงานยังไง

เรียกต่อ: isTiny(). คืนค่า: this.isTiny() ? SoundEvents.SLIME_JUMP_SMALL : SoundEvents.SLIME_JUMP.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getJumpSound() {
    return super.getJumpSound();
}

net.minecraft.world.entity.monster.Slime#getMaxHeadXRot()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:312
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Max Head XRot

ทำงานยังไง

คืนค่า: 0.

Parameters

  • ไม่มี

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

Slime instance = ...;
int result = instance.getMaxHeadXRot();

net.minecraft.world.entity.monster.Slime#getParticleType()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:129
  • Modifiers: protected
  • Return: ParticleOptions

คืออะไร

อ่านค่า Particle Type

ทำงานยังไง

คืนค่า: ParticleTypes.ITEM_SLIME.

Parameters

  • ไม่มี

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

@Override
protected ParticleOptions getParticleType() {
    return super.getParticleType();
}

net.minecraft.world.entity.monster.Slime#getPassengerAttachmentPoint(Entity,EntityDimensions,float)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:249
  • Modifiers: protected
  • Return: Vec3

คืออะไร

อ่านค่า Passenger Attachment Point

ทำงานยังไง

เรียกต่อ: height(), getSize(). สร้างออบเจ็กต์: Vec3. คืนค่า: new Vec3(0.0, entityDimensions.height() - 0.015625 * this.getSize() * f, 0.0).

Parameters

  • Entity entity
  • EntityDimensions entityDimensions
  • float f

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

Entity entity = ...;
EntityDimensions entityDimensions = ...;
@Override
protected Vec3 getPassengerAttachmentPoint(Entity entity, EntityDimensions entityDimensions, float f) {
    return super.getPassengerAttachmentPoint(entity, entityDimensions, f);
}

net.minecraft.world.entity.monster.Slime#getSize()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:107
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Size

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Slime instance = ...;
int result = instance.getSize();

net.minecraft.world.entity.monster.Slime#getSoundSource()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:80
  • Modifiers: public
  • Return: SoundSource

คืออะไร

อ่านค่า Sound Source

ทำงานยังไง

คืนค่า: SoundSource.HOSTILE.

Parameters

  • ไม่มี

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

Slime instance = ...;
SoundSource result = instance.getSoundSource();

net.minecraft.world.entity.monster.Slime#getSoundVolume()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:307
  • Modifiers: protected
  • Return: float

คืออะไร

อ่านค่า Sound Volume

ทำงานยังไง

เรียกต่อ: getSize(). คืนค่า: 0.4F * this.getSize().

Parameters

  • ไม่มี

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

@Override
protected float getSoundVolume() {
    return super.getSoundVolume();
}

net.minecraft.world.entity.monster.Slime#getSquishSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:272
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Squish Sound

ทำงานยังไง

เรียกต่อ: isTiny(). คืนค่า: this.isTiny() ? SoundEvents.SLIME_SQUISH_SMALL : SoundEvents.SLIME_SQUISH.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getSquishSound() {
    return super.getSquishSound();
}

net.minecraft.world.entity.monster.Slime#getType()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:196
  • Modifiers: public
  • Return: EntityType<? extends Slime>

คืออะไร

อ่านค่า Type

ทำงานยังไง

คืนค่า: (EntityType<? extends Slime>)super.getType().

Parameters

  • ไม่มี

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

Slime instance = ...;
EntityType<? extends Slime> result = instance.getType();

net.minecraft.world.entity.monster.Slime#isDealsDamage()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:254
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Deals Damage

ทำงานยังไง

เรียกต่อ: isTiny(), isEffectiveAi(). คืนค่า: !this.isTiny() && this.isEffectiveAi().

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Slime#isTiny()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:125
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: getSize(). คืนค่า: this.getSize() <= 1.

Parameters

  • ไม่มี

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

Slime instance = ...;
boolean result = instance.isTiny();

net.minecraft.world.entity.monster.Slime#jumpFromGround()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:321
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ jumpFromGround ตาม implementation ของ Slime

ทำงานยังไง

แก้ state: hasImpulse. เรียกต่อ: getDeltaMovement(), setDeltaMovement(), getJumpPower().

Parameters

  • ไม่มี

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

Slime instance = ...;
instance.jumpFromGround();

net.minecraft.world.entity.monster.Slime#onSyncedDataUpdated(EntityDataAccessor<?>)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:182
  • Modifiers: public
  • Return: void

คืออะไร

จัดการเหตุการณ์ Synced Data Updated

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: yBodyRot. เรียกต่อ: equals(), refreshDimensions(), setYRot(), isInWater(), nextInt(), doWaterSplashEffect().

Parameters

  • EntityDataAccessor<?> entityDataAccessor

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

Slime instance = ...;
EntityDataAccessor<?> entityDataAccessor = ...;
instance.onSyncedDataUpdated(entityDataAccessor);

net.minecraft.world.entity.monster.Slime#playerTouch(Player)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:232
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ playerTouch ตาม implementation ของ Slime

ทำงานยังไง

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

Parameters

  • Player player

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

Slime instance = ...;
Player player = ...;
instance.playerTouch(player);

net.minecraft.world.entity.monster.Slime#push(Entity)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:224
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ push ตาม implementation ของ Slime

ทำงานยังไง

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

Parameters

  • Entity entity

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

Slime instance = ...;
Entity entity = ...;
instance.push(entity);

net.minecraft.world.entity.monster.Slime#readAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:118
  • Modifiers: public
  • Return: void

คืออะไร

อ่าน Additional Save Data

ทำงานยังไง

แก้ state: wasOnGround. เรียกต่อ: setSize(), getInt(), getBoolean().

Parameters

  • CompoundTag compoundTag

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

Slime instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Slime#refreshDimensions()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:173
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ refreshDimensions ตาม implementation ของ Slime

ทำงานยังไง

เรียกต่อ: getX(), getY(), getZ(), setPos().

Parameters

  • ไม่มี

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

Slime instance = ...;
instance.refreshDimensions();

net.minecraft.world.entity.monster.Slime#registerGoals()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:66
  • Modifiers: protected
  • Return: void

คืออะไร

ลงทะเบียน Goals

ทำงานยังไง

เรียกต่อ: addGoal(), SlimeFloatGoal(), SlimeAttackGoal(), SlimeRandomDirectionGoal(), SlimeKeepOnJumpingGoal(), abs(), getY(). สร้างออบเจ็กต์: Slime.SlimeFloatGoal, Slime.SlimeAttackGoal, Slime.SlimeRandomDirectionGoal, Slime.SlimeKeepOnJumpingGoal.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Slime#remove(Entity.RemovalReason)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:201
  • Modifiers: public
  • Return: void

คืออะไร

ลบ remove

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getSize(), level(), isDeadOrDying(), getDimensions(), getPose(), width(), nextInt(), getTeam(). สร้างออบเจ็กต์: ConversionParams.

Parameters

  • Entity.RemovalReason removalReason

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

Slime instance = ...;
Entity.RemovalReason removalReason = ...;
instance.remove(removalReason);

net.minecraft.world.entity.monster.Slime#setSize(int,boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:91
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Size

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: xpReward. เรียกต่อ: clamp(), set(), reapplyPosition(), refreshDimensions(), getAttribute(), setBaseValue(), setHealth(), getMaxHealth().

Parameters

  • int i
  • boolean bl

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

Slime instance = ...;
instance.setSize(0, true);

net.minecraft.world.entity.monster.Slime#shouldDespawnInPeaceful()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:133
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Despawn In Peaceful

ทำงานยังไง

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

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Slime#Slime(EntityType<? extends Slime>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:60
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: moveControl. เรียกต่อ: fixupDimensions(), SlimeMoveControl(). สร้างออบเจ็กต์: Slime.SlimeMoveControl.

Parameters

  • EntityType<? extends Slime> entityType
  • Level level

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

EntityType<? extends Slime> entityType = ...;
Level level = ...;
Slime instance = new Slime(entityType, level);

net.minecraft.world.entity.monster.Slime#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Slime.java:138
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: oSquish, squish, targetSquish, wasOnGround. เรียกต่อ: onGround(), getDimensions(), getPose(), width(), nextFloat(), sin(), cos(), level().

Parameters

  • ไม่มี

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

Slime instance = ...;
instance.tick();

SpellcasterIllager

  • Full name: net.minecraft.world.entity.monster.SpellcasterIllager
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/SpellcasterIllager.java
  • Type: class
  • Modifiers: public abstract
  • Extends: AbstractIllager

net.minecraft.world.entity.monster.SpellcasterIllager#addAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/SpellcasterIllager.java:42
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Additional Save Data

ทำงานยังไง

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

Parameters

  • CompoundTag compoundTag

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

SpellcasterIllager instance = ...;
CompoundTag compoundTag = ...;
instance.addAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.SpellcasterIllager#customServerAiStep(ServerLevel)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/SpellcasterIllager.java:70
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ customServerAiStep ตาม implementation ของ SpellcasterIllager

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: spellCastingTickCount.

Parameters

  • ServerLevel serverLevel

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

ServerLevel serverLevel = ...;
@Override
protected void customServerAiStep(ServerLevel serverLevel) {
    super.customServerAiStep(serverLevel);
}

net.minecraft.world.entity.monster.SpellcasterIllager#defineSynchedData(SynchedEntityData.Builder)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/SpellcasterIllager.java:30
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ defineSynchedData ตาม implementation ของ SpellcasterIllager

ทำงานยังไง

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

Parameters

  • SynchedEntityData.Builder builder

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

SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
    super.defineSynchedData(builder);
}

net.minecraft.world.entity.monster.SpellcasterIllager#getArmPose()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/SpellcasterIllager.java:48
  • Modifiers: public
  • Return: AbstractIllager.IllagerArmPose

คืออะไร

อ่านค่า Arm Pose

ทำงานยังไง

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

Parameters

  • ไม่มี

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

SpellcasterIllager instance = ...;
AbstractIllager.IllagerArmPose result = instance.getArmPose();

net.minecraft.world.entity.monster.SpellcasterIllager#getCastingSoundEvent()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/SpellcasterIllager.java:102
  • Modifiers: protected abstract
  • Return: SoundEvent

คืออะไร

อ่านค่า Casting Sound Event

ทำงานยังไง

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

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getCastingSoundEvent() {
    return super.getCastingSoundEvent();
}

net.minecraft.world.entity.monster.SpellcasterIllager#getCurrentSpell()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/SpellcasterIllager.java:66
  • Modifiers: protected
  • Return: SpellcasterIllager.IllagerSpell

คืออะไร

อ่านค่า Current Spell

ทำงานยังไง

เรียกต่อ: level(), byId(), get(). คืนค่า: !this.level().isClientSide ? this.currentSpell : SpellcasterIllager.IllagerSpell.byId(this.entityData.get(DATA_SPELL_CASTING_ID)).

Parameters

  • ไม่มี

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

@Override
protected SpellcasterIllager.IllagerSpell getCurrentSpell() {
    return super.getCurrentSpell();
}

net.minecraft.world.entity.monster.SpellcasterIllager#getSpellCastingTime()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/SpellcasterIllager.java:98
  • Modifiers: protected
  • Return: int

คืออะไร

อ่านค่า Spell Casting Time

ทำงานยังไง

คืนค่า: this.spellCastingTickCount.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.SpellcasterIllager#isCastingSpell()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/SpellcasterIllager.java:57
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Casting Spell

ทำงานยังไง

เรียกต่อ: level(), get(). คืนค่า: this.level().isClientSide ? this.entityData.get(DATA_SPELL_CASTING_ID) > 0 : this.spellCastingTickCount > 0.

Parameters

  • ไม่มี

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

SpellcasterIllager instance = ...;
boolean result = instance.isCastingSpell();

net.minecraft.world.entity.monster.SpellcasterIllager#readAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/SpellcasterIllager.java:36
  • Modifiers: public
  • Return: void

คืออะไร

อ่าน Additional Save Data

ทำงานยังไง

แก้ state: spellCastingTickCount. เรียกต่อ: getInt().

Parameters

  • CompoundTag compoundTag

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

SpellcasterIllager instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.SpellcasterIllager#setIsCastingSpell(SpellcasterIllager.IllagerSpell)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/SpellcasterIllager.java:61
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Is Casting Spell

ทำงานยังไง

แก้ state: currentSpell. เรียกต่อ: set().

Parameters

  • SpellcasterIllager.IllagerSpell illagerSpell

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

SpellcasterIllager instance = ...;
SpellcasterIllager.IllagerSpell illagerSpell = ...;
instance.setIsCastingSpell(illagerSpell);

net.minecraft.world.entity.monster.SpellcasterIllager#SpellcasterIllager(EntityType<? extends SpellcasterIllager>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/SpellcasterIllager.java:26
  • Modifiers: protected
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • EntityType<? extends SpellcasterIllager> entityType
  • Level level

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

EntityType<? extends SpellcasterIllager> entityType = ...;
Level level = ...;
SpellcasterIllager instance = new SpellcasterIllager(entityType, level);

net.minecraft.world.entity.monster.SpellcasterIllager#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/SpellcasterIllager.java:78
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: level(), isCastingSpell(), getCurrentSpell(), cos(), sin(), getScale(), addParticle(), create().

Parameters

  • ไม่มี

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

SpellcasterIllager instance = ...;
instance.tick();

SpellcasterIllager$IllagerSpell

  • Full name: net.minecraft.world.entity.monster.SpellcasterIllager$IllagerSpell
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/SpellcasterIllager.java
  • Type: enum
  • Modifiers: protected

net.minecraft.world.entity.monster.SpellcasterIllager$IllagerSpell#byId(int)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/SpellcasterIllager.java:123
  • Modifiers: public static
  • Return: SpellcasterIllager.IllagerSpell

คืออะไร

ดำเนินการ byId ตาม implementation ของ SpellcasterIllager$IllagerSpell

ทำงานยังไง

เรียกต่อ: apply(). คืนค่า: BY_ID.apply(i).

Parameters

  • int i

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

SpellcasterIllager.IllagerSpell result = SpellcasterIllager.IllagerSpell.byId(0);

SpellcasterIllager$SpellcasterCastingSpellGoal

  • Full name: net.minecraft.world.entity.monster.SpellcasterIllager$SpellcasterCastingSpellGoal
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/SpellcasterIllager.java
  • Type: class
  • Modifiers: protected
  • Extends: Goal

net.minecraft.world.entity.monster.SpellcasterIllager$SpellcasterCastingSpellGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/SpellcasterIllager.java:133
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: getSpellCastingTime(). คืนค่า: SpellcasterIllager.this.getSpellCastingTime() > 0.

Parameters

  • ไม่มี

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

SpellcasterIllager.SpellcasterCastingSpellGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.monster.SpellcasterIllager$SpellcasterCastingSpellGoal#SpellcasterCastingSpellGoal()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/SpellcasterIllager.java:129
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ไม่มี

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

SpellcasterIllager.SpellcasterCastingSpellGoal instance = new SpellcasterIllager.SpellcasterCastingSpellGoal();

net.minecraft.world.entity.monster.SpellcasterIllager$SpellcasterCastingSpellGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/SpellcasterIllager.java:138
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

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

Parameters

  • ไม่มี

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

SpellcasterIllager.SpellcasterCastingSpellGoal instance = ...;
instance.start();

net.minecraft.world.entity.monster.SpellcasterIllager$SpellcasterCastingSpellGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/SpellcasterIllager.java:144
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

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

Parameters

  • ไม่มี

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

SpellcasterIllager.SpellcasterCastingSpellGoal instance = ...;
instance.stop();

net.minecraft.world.entity.monster.SpellcasterIllager$SpellcasterCastingSpellGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/SpellcasterIllager.java:150
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getTarget(), getLookControl(), setLookAt(), getMaxHeadYRot(), getMaxHeadXRot().

Parameters

  • ไม่มี

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

SpellcasterIllager.SpellcasterCastingSpellGoal instance = ...;
instance.tick();

SpellcasterIllager$SpellcasterUseSpellGoal

  • Full name: net.minecraft.world.entity.monster.SpellcasterIllager$SpellcasterUseSpellGoal
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/SpellcasterIllager.java
  • Type: class
  • Modifiers: protected abstract
  • Extends: Goal

net.minecraft.world.entity.monster.SpellcasterIllager$SpellcasterUseSpellGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/SpellcasterIllager.java:173
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: getTarget(), isAlive(). คืนค่า: livingEntity != null && livingEntity.isAlive() && this.attackWarmupDelay > 0.

Parameters

  • ไม่มี

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

SpellcasterIllager.SpellcasterUseSpellGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.monster.SpellcasterIllager$SpellcasterUseSpellGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/SpellcasterIllager.java:163
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ไม่มี

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

SpellcasterIllager.SpellcasterUseSpellGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.monster.SpellcasterIllager$SpellcasterUseSpellGoal#getCastingInterval()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/SpellcasterIllager.java:209
  • Modifiers: protected abstract
  • Return: int

คืออะไร

อ่านค่า Casting Interval

ทำงานยังไง

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

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.SpellcasterIllager$SpellcasterUseSpellGoal#getCastingTime()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/SpellcasterIllager.java:207
  • Modifiers: protected abstract
  • Return: int

คืออะไร

อ่านค่า Casting Time

ทำงานยังไง

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

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.SpellcasterIllager$SpellcasterUseSpellGoal#getCastWarmupTime()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/SpellcasterIllager.java:203
  • Modifiers: protected
  • Return: int

คืออะไร

อ่านค่า Cast Warmup Time

ทำงานยังไง

คืนค่า: 20.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.SpellcasterIllager$SpellcasterUseSpellGoal#getSpell()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/SpellcasterIllager.java:214
  • Modifiers: protected abstract
  • Return: SpellcasterIllager.IllagerSpell

คืออะไร

อ่านค่า Spell

ทำงานยังไง

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

Parameters

  • ไม่มี

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

@Override
protected SpellcasterIllager.IllagerSpell getSpell() {
    return super.getSpell();
}

net.minecraft.world.entity.monster.SpellcasterIllager$SpellcasterUseSpellGoal#getSpellPrepareSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/SpellcasterIllager.java:211
  • Modifiers: protected abstract
  • Return: SoundEvent

คืออะไร

อ่านค่า Spell Prepare Sound

ทำงานยังไง

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

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getSpellPrepareSound() {
    return super.getSpellPrepareSound();
}

net.minecraft.world.entity.monster.SpellcasterIllager$SpellcasterUseSpellGoal#performSpellCasting()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/SpellcasterIllager.java:201
  • Modifiers: protected abstract
  • Return: void

คืออะไร

ดำเนินการ performSpellCasting ตาม implementation ของ SpellcasterIllager$SpellcasterUseSpellGoal

ทำงานยังไง

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

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.SpellcasterIllager$SpellcasterUseSpellGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/SpellcasterIllager.java:179
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: attackWarmupDelay, spellCastingTickCount, nextAttackTickCount. เรียกต่อ: adjustedTickDelay(), getCastWarmupTime(), getCastingTime(), getCastingInterval(), getSpellPrepareSound(), playSound(), setIsCastingSpell(), getSpell().

Parameters

  • ไม่มี

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

SpellcasterIllager.SpellcasterUseSpellGoal instance = ...;
instance.start();

net.minecraft.world.entity.monster.SpellcasterIllager$SpellcasterUseSpellGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/SpellcasterIllager.java:192
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: attackWarmupDelay. เรียกต่อ: performSpellCasting(), playSound(), getCastingSoundEvent().

Parameters

  • ไม่มี

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

SpellcasterIllager.SpellcasterUseSpellGoal instance = ...;
instance.tick();

Spider

  • Full name: net.minecraft.world.entity.monster.Spider
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/Spider.java
  • Type: class
  • Modifiers: public
  • Extends: Monster

net.minecraft.world.entity.monster.Spider#canBeAffected(MobEffectInstance)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Spider.java:122
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Be Affected

ทำงานยังไง

เรียกต่อ: is(). คืนค่า: mobEffectInstance.is(MobEffects.POISON) ? false : super.canBeAffected(mobEffectInstance).

Parameters

  • MobEffectInstance mobEffectInstance

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

Spider instance = ...;
MobEffectInstance mobEffectInstance = ...;
boolean result = instance.canBeAffected(mobEffectInstance);

net.minecraft.world.entity.monster.Spider#createAttributes()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Spider.java:86
  • Modifiers: public static
  • Return: AttributeSupplier.Builder

คืออะไร

สร้าง Attributes

ทำงานยังไง

เรียกต่อ: createMonsterAttributes(), add(). คืนค่า: Monster.createMonsterAttributes().add(Attributes.MAX_HEALTH, 16.0).add(Attributes.MOVEMENT_SPEED, 0.3F).

Parameters

  • ไม่มี

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

AttributeSupplier.Builder result = Spider.createAttributes();

net.minecraft.world.entity.monster.Spider#createNavigation(Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Spider.java:67
  • Modifiers: protected
  • Return: PathNavigation

คืออะไร

สร้าง Navigation

ทำงานยังไง

สร้างออบเจ็กต์: WallClimberNavigation. คืนค่า: new WallClimberNavigation(this, level).

Parameters

  • Level level

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

Level level = ...;
@Override
protected PathNavigation createNavigation(Level level) {
    return super.createNavigation(level);
}

net.minecraft.world.entity.monster.Spider#defineSynchedData(SynchedEntityData.Builder)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Spider.java:72
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ defineSynchedData ตาม implementation ของ Spider

ทำงานยังไง

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

Parameters

  • SynchedEntityData.Builder builder

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

SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
    super.defineSynchedData(builder);
}

net.minecraft.world.entity.monster.Spider#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Spider.java:142
  • Modifiers: public
  • Return: SpawnGroupData

คืออะไร

ดำเนินการ finalizeSpawn ตาม implementation ของ Spider

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getRandom(), nextInt(), create(), level(), moveTo(), getX(), getY(), getZ(). สร้างออบเจ็กต์: Spider.SpiderEffectsGroupData, MobEffectInstance. คืนค่า: spawnGroupData.

Parameters

  • ServerLevelAccessor serverLevelAccessor
  • DifficultyInstance difficultyInstance
  • EntitySpawnReason entitySpawnReason
  • SpawnGroupData spawnGroupData

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

Spider instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);

net.minecraft.world.entity.monster.Spider#getAmbientSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Spider.java:90
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Ambient Sound

ทำงานยังไง

คืนค่า: SoundEvents.SPIDER_AMBIENT.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getAmbientSound() {
    return super.getAmbientSound();
}

net.minecraft.world.entity.monster.Spider#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Spider.java:100
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

คืนค่า: SoundEvents.SPIDER_DEATH.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.monster.Spider#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Spider.java:95
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

คืนค่า: SoundEvents.SPIDER_HURT.

Parameters

  • DamageSource damageSource

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

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

net.minecraft.world.entity.monster.Spider#getVehicleAttachmentPoint(Entity)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Spider.java:175
  • Modifiers: public
  • Return: Vec3

คืออะไร

อ่านค่า Vehicle Attachment Point

ทำงานยังไง

เรียกต่อ: getBbWidth(), getScale(). สร้างออบเจ็กต์: Vec3. คืนค่า: entity.getBbWidth() <= this.getBbWidth() ? new Vec3(0.0, 0.3125 * this.getScale(), 0.0) : super.getVehicleAttachmentPoint(entity).

Parameters

  • Entity entity

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

Spider instance = ...;
Entity entity = ...;
Vec3 result = instance.getVehicleAttachmentPoint(entity);

net.minecraft.world.entity.monster.Spider#isClimbing()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Spider.java:127
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: get(). คืนค่า: (this.entityData.get(DATA_FLAGS_ID) & 1) != 0.

Parameters

  • ไม่มี

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

Spider instance = ...;
boolean result = instance.isClimbing();

net.minecraft.world.entity.monster.Spider#makeStuckInBlock(BlockState,Vec3)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Spider.java:115
  • Modifiers: public
  • Return: void

คืออะไร

สร้าง Stuck In Block

ทำงานยังไง

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

Parameters

  • BlockState blockState
  • Vec3 vec3

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

Spider instance = ...;
BlockState blockState = ...;
Vec3 vec3 = ...;
instance.makeStuckInBlock(blockState, vec3);

net.minecraft.world.entity.monster.Spider#onClimbable()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Spider.java:110
  • Modifiers: public
  • Return: boolean

คืออะไร

จัดการเหตุการณ์ Climbable

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Spider instance = ...;
boolean result = instance.onClimbable();

net.minecraft.world.entity.monster.Spider#playStepSound(BlockPos,BlockState)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Spider.java:105
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ playStepSound ตาม implementation ของ Spider

ทำงานยังไง

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

Parameters

  • BlockPos blockPos
  • BlockState blockState

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

BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected void playStepSound(BlockPos blockPos, BlockState blockState) {
    super.playStepSound(blockPos, blockState);
}

net.minecraft.world.entity.monster.Spider#registerGoals()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Spider.java:53
  • Modifiers: protected
  • Return: void

คืออะไร

ลงทะเบียน Goals

ทำงานยังไง

เรียกต่อ: addGoal(), isScared(), SpiderAttackGoal(). สร้างออบเจ็กต์: FloatGoal, AvoidEntityGoal<>, LeapAtTargetGoal, Spider.SpiderAttackGoal.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.monster.Spider#setClimbing(boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Spider.java:131
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Climbing

ทำงานยังไง

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

Parameters

  • boolean bl

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

Spider instance = ...;
instance.setClimbing(true);

net.minecraft.world.entity.monster.Spider#Spider(EntityType<? extends Spider>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Spider.java:49
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • EntityType<? extends Spider> entityType
  • Level level

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

EntityType<? extends Spider> entityType = ...;
Level level = ...;
Spider instance = new Spider(entityType, level);

net.minecraft.world.entity.monster.Spider#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Spider.java:78
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Spider instance = ...;
instance.tick();

Spider$SpiderEffectsGroupData

  • Full name: net.minecraft.world.entity.monster.Spider$SpiderEffectsGroupData
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/Spider.java
  • Type: class
  • Modifiers: public static
  • Implements: SpawnGroupData

net.minecraft.world.entity.monster.Spider$SpiderEffectsGroupData#setRandomEffect(RandomSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Spider.java:206
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Random Effect

ทำงานยังไง

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

Parameters

  • RandomSource randomSource

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

Spider.SpiderEffectsGroupData instance = ...;
RandomSource randomSource = ...;
instance.setRandomEffect(randomSource);

Stray

  • Full name: net.minecraft.world.entity.monster.Stray
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/Stray.java
  • Type: class
  • Modifiers: public
  • Extends: AbstractSkeleton

net.minecraft.world.entity.monster.Stray#checkStraySpawnRules(EntityType<Stray>,ServerLevelAccessor,EntitySpawnReason,BlockPos,RandomSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Stray.java:25
  • Modifiers: public static
  • Return: boolean

คืออะไร

ตรวจสอบ Stray Spawn Rules

ทำงานยังไง

มีการวนลูป. เรียกต่อ: above(), getBlockState(), is(), checkMonsterSpawnRules(), isSpawner(), canSeeSky(), below().

Parameters

  • EntityType<Stray> entityType
  • ServerLevelAccessor serverLevelAccessor
  • EntitySpawnReason entitySpawnReason
  • BlockPos blockPos
  • RandomSource randomSource

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

EntityType<Stray> entityType = ...;
ServerLevelAccessor serverLevelAccessor = ...;
EntitySpawnReason entitySpawnReason = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
boolean result = Stray.checkStraySpawnRules(entityType, serverLevelAccessor, entitySpawnReason, blockPos, randomSource);

net.minecraft.world.entity.monster.Stray#getAmbientSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Stray.java:38
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Ambient Sound

ทำงานยังไง

คืนค่า: SoundEvents.STRAY_AMBIENT.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getAmbientSound() {
    return super.getAmbientSound();
}

net.minecraft.world.entity.monster.Stray#getArrow(ItemStack,float,ItemStack)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Stray.java:58
  • Modifiers: protected
  • Return: AbstractArrow

คืออะไร

อ่านค่า Arrow

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: addEffect(). สร้างออบเจ็กต์: MobEffectInstance. คืนค่า: abstractArrow.

Parameters

  • ItemStack itemStack
  • float f
  • ItemStack itemStack2

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

ItemStack itemStack = ...;
ItemStack itemStack2 = ...;
@Override
protected AbstractArrow getArrow(ItemStack itemStack, float f, ItemStack itemStack2) {
    return super.getArrow(itemStack, f, itemStack2);
}

net.minecraft.world.entity.monster.Stray#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Stray.java:48
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

คืนค่า: SoundEvents.STRAY_DEATH.

Parameters

  • ไม่มี

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

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.monster.Stray#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Stray.java:43
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

คืนค่า: SoundEvents.STRAY_HURT.

Parameters

  • DamageSource damageSource

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

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

net.minecraft.world.entity.monster.Stray#Stray(EntityType<? extends Stray>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Stray.java:21
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • EntityType<? extends Stray> entityType
  • Level level

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

EntityType<? extends Stray> entityType = ...;
Level level = ...;
Stray instance = new Stray(entityType, level);

Strider

  • Full name: net.minecraft.world.entity.monster.Strider
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/Strider.java
  • Type: class
  • Modifiers: public
  • Extends: Animal
  • Implements: ItemSteerable,Saddleable

net.minecraft.world.entity.monster.Strider#addAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:126
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Additional Save Data

ทำงานยังไง

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

Parameters

  • CompoundTag compoundTag

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

Strider instance = ...;
CompoundTag compoundTag = ...;
instance.addAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Strider#boost()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:283
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ boost ตาม implementation ของ Strider

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Strider instance = ...;
boolean result = instance.boost();

net.minecraft.world.entity.monster.Strider#canAddPassenger(Entity)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:357
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Add Passenger

ทำงานยังไง

เรียกต่อ: isVehicle(), isEyeInFluid(). คืนค่า: !this.isVehicle() && !this.isEyeInFluid(FluidTags.LAVA).

Parameters

  • Entity entity

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

Entity entity = ...;
@Override
protected boolean canAddPassenger(Entity entity) {
    return super.canAddPassenger(entity);
}

net.minecraft.world.entity.monster.Strider#canStandOnFluid(FluidState)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:186
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Stand On Fluid

ทำงานยังไง

เรียกต่อ: is(). คืนค่า: fluidState.is(FluidTags.LAVA).

Parameters

  • FluidState fluidState

ตัวอย่างใช้งาน

Strider instance = ...;
FluidState fluidState = ...;
boolean result = instance.canStandOnFluid(fluidState);

net.minecraft.world.entity.monster.Strider#checkFallDamage(double,boolean,BlockState,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:288
  • Modifiers: protected
  • Return: void

คืออะไร

ตรวจสอบ Fall Damage

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isInLava(), resetFallDistance().

Parameters

  • double d
  • boolean bl
  • BlockState blockState
  • BlockPos blockPos

ตัวอย่างใช้งาน

BlockState blockState = ...;
BlockPos blockPos = ...;
@Override
protected void checkFallDamage(double d, boolean bl, BlockState blockState, BlockPos blockPos) {
    super.checkFallDamage(d, bl, blockState, blockPos);
}

net.minecraft.world.entity.monster.Strider#checkSpawnObstruction(LevelReader)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:199
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบ Spawn Obstruction

ทำงานยังไง

เรียกต่อ: isUnobstructed(). คืนค่า: levelReader.isUnobstructed(this).

Parameters

  • LevelReader levelReader

ตัวอย่างใช้งาน

Strider instance = ...;
LevelReader levelReader = ...;
boolean result = instance.checkSpawnObstruction(levelReader);

net.minecraft.world.entity.monster.Strider#checkStriderSpawnRules(EntityType<Strider>,LevelAccessor,EntitySpawnReason,BlockPos,RandomSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:97
  • Modifiers: public static
  • Return: boolean

คืออะไร

ตรวจสอบ Strider Spawn Rules

ทำงานยังไง

มีการวนลูป. เรียกต่อ: mutable(), move(), getFluidState(), is(), getBlockState(), isAir(). คืนค่า: levelAccessor.getBlockState(mutableBlockPos).isAir().

Parameters

  • EntityType<Strider> entityType
  • LevelAccessor levelAccessor
  • EntitySpawnReason entitySpawnReason
  • BlockPos blockPos
  • RandomSource randomSource

ตัวอย่างใช้งาน

EntityType<Strider> entityType = ...;
LevelAccessor levelAccessor = ...;
EntitySpawnReason entitySpawnReason = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
boolean result = Strider.checkStriderSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource);

net.minecraft.world.entity.monster.Strider#createAttributes()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:338
  • Modifiers: public static
  • Return: AttributeSupplier.Builder

คืออะไร

สร้าง Attributes

ทำงานยังไง

เรียกต่อ: createAnimalAttributes(), add(). คืนค่า: Animal.createAnimalAttributes().add(Attributes.MOVEMENT_SPEED, 0.175F).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

AttributeSupplier.Builder result = Strider.createAttributes();

net.minecraft.world.entity.monster.Strider#createNavigation(Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:372
  • Modifiers: protected
  • Return: PathNavigation

คืออะไร

สร้าง Navigation

ทำงานยังไง

เรียกต่อ: StriderPathNavigation(). สร้างออบเจ็กต์: Strider.StriderPathNavigation. คืนค่า: new Strider.StriderPathNavigation(this, level).

Parameters

  • Level level

ตัวอย่างใช้งาน

Level level = ...;
@Override
protected PathNavigation createNavigation(Level level) {
    return super.createNavigation(level);
}

net.minecraft.world.entity.monster.Strider#defineSynchedData(SynchedEntityData.Builder)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:118
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ defineSynchedData ตาม implementation ของ Strider

ทำงานยังไง

เรียกต่อ: define().

Parameters

  • SynchedEntityData.Builder builder

ตัวอย่างใช้งาน

SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
    super.defineSynchedData(builder);
}

net.minecraft.world.entity.monster.Strider#dropEquipment(ServerLevel)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:396
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ dropEquipment ตาม implementation ของ Strider

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isSaddled(), spawnAtLocation().

Parameters

  • ServerLevel serverLevel

ตัวอย่างใช้งาน

ServerLevel serverLevel = ...;
@Override
protected void dropEquipment(ServerLevel serverLevel) {
    super.dropEquipment(serverLevel);
}

net.minecraft.world.entity.monster.Strider#equipSaddle(ItemStack,SoundSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:148
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ equipSaddle ตาม implementation ของ Strider

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: setSaddle(), level(), playSound().

Parameters

  • ItemStack itemStack
  • SoundSource soundSource

ตัวอย่างใช้งาน

Strider instance = ...;
ItemStack itemStack = ...;
SoundSource soundSource = ...;
instance.equipSaddle(itemStack, soundSource);

net.minecraft.world.entity.monster.Strider#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:443
  • Modifiers: public
  • Return: SpawnGroupData

คืออะไร

ดำเนินการ finalizeSpawn ตาม implementation ของ Strider

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isBaby(), getRandom(), nextInt(), create(), getLevel(), spawnJockey(), ZombieGroupData(), getSpawnAsBabyOdds(). สร้างออบเจ็กต์: Zombie.ZombieGroupData, ItemStack, AgeableMob.AgeableMobGroupData. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ServerLevelAccessor serverLevelAccessor
  • DifficultyInstance difficultyInstance
  • EntitySpawnReason entitySpawnReason
  • SpawnGroupData spawnGroupData

ตัวอย่างใช้งาน

Strider instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);

net.minecraft.world.entity.monster.Strider#getAmbientSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:342
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Ambient Sound

ทำงานยังไง

เรียกต่อ: isPanicking(), isBeingTempted(). คืนค่า: !this.isPanicking() && !this.isBeingTempted() ? SoundEvents.STRIDER_AMBIENT : null.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected SoundEvent getAmbientSound() {
    return super.getAmbientSound();
}

net.minecraft.world.entity.monster.Strider#getBreedOffspring(ServerLevel,AgeableMob)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:386
  • Modifiers: public
  • Return: Strider

คืออะไร

อ่านค่า Breed Offspring

ทำงานยังไง

เรียกต่อ: create(). คืนค่า: EntityType.STRIDER.create(serverLevel, EntitySpawnReason.BREEDING).

Parameters

  • ServerLevel serverLevel
  • AgeableMob ageableMob

ตัวอย่างใช้งาน

Strider instance = ...;
ServerLevel serverLevel = ...;
AgeableMob ageableMob = ...;
Strider result = instance.getBreedOffspring(serverLevel, ageableMob);

net.minecraft.world.entity.monster.Strider#getControllingPassenger()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:204
  • Modifiers: public
  • Return: LivingEntity

คืออะไร

อ่านค่า Controlling Passenger

ทำงานยังไง

เรียกต่อ: isSaddled(), getFirstPassenger(), isHolding().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Strider instance = ...;
LivingEntity result = instance.getControllingPassenger();

net.minecraft.world.entity.monster.Strider#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:352
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

คืนค่า: SoundEvents.STRIDER_DEATH.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.monster.Strider#getDismountLocationForPassenger(LivingEntity)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:212
  • Modifiers: public
  • Return: Vec3

คืออะไร

อ่านค่า Dismount Location For Passenger

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getCollisionHorizontalEscapeVector(), getBbWidth(), getYRot(), newLinkedHashSet(), getBoundingBox(), MutableBlockPos(), set(), getX(). สร้างออบเจ็กต์: BlockPos.MutableBlockPos, Vec3. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • LivingEntity livingEntity

ตัวอย่างใช้งาน

Strider instance = ...;
LivingEntity livingEntity = ...;
Vec3 result = instance.getDismountLocationForPassenger(livingEntity);

net.minecraft.world.entity.monster.Strider#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:347
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

คืนค่า: SoundEvents.STRIDER_HURT.

Parameters

  • DamageSource damageSource

ตัวอย่างใช้งาน

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

net.minecraft.world.entity.monster.Strider#getLeashOffset()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:438
  • Modifiers: public
  • Return: Vec3

คืออะไร

อ่านค่า Leash Offset

ทำงานยังไง

เรียกต่อ: getEyeHeight(), getBbWidth(). สร้างออบเจ็กต์: Vec3. คืนค่า: new Vec3(0.0, 0.6F * this.getEyeHeight(), this.getBbWidth() * 0.4F).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Strider instance = ...;
Vec3 result = instance.getLeashOffset();

net.minecraft.world.entity.monster.Strider#getPassengerAttachmentPoint(Entity,EntityDimensions,float)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:191
  • Modifiers: protected
  • Return: Vec3

คืออะไร

อ่านค่า Passenger Attachment Point

ทำงานยังไง

เรียกต่อ: min(), speed(), position(), cos(), add(). คืนค่า: super.getPassengerAttachmentPoint(entity, entityDimensions, f).add(0.0, i * f, 0.0).

Parameters

  • Entity entity
  • EntityDimensions entityDimensions
  • float f

ตัวอย่างใช้งาน

Entity entity = ...;
EntityDimensions entityDimensions = ...;
@Override
protected Vec3 getPassengerAttachmentPoint(Entity entity, EntityDimensions entityDimensions, float f) {
    return super.getPassengerAttachmentPoint(entity, entityDimensions, f);
}

net.minecraft.world.entity.monster.Strider#getRiddenInput(Player,Vec3)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:263
  • Modifiers: protected
  • Return: Vec3

คืออะไร

อ่านค่า Ridden Input

ทำงานยังไง

สร้างออบเจ็กต์: Vec3. คืนค่า: new Vec3(0.0, 0.0, 1.0).

Parameters

  • Player player
  • Vec3 vec3

ตัวอย่างใช้งาน

Player player = ...;
Vec3 vec3 = ...;
@Override
protected Vec3 getRiddenInput(Player player, Vec3 vec3) {
    return super.getRiddenInput(player, vec3);
}

net.minecraft.world.entity.monster.Strider#getRiddenSpeed(Player)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:268
  • Modifiers: protected
  • Return: float

คืออะไร

อ่านค่า Ridden Speed

ทำงานยังไง

เรียกต่อ: getAttributeValue(), isSuffocating(), boostFactor(). คืนค่า: (float)(this.getAttributeValue(Attributes.MOVEMENT_SPEED) * (this.isSuffocating() ? 0.35F : 0.55F) * this.steering.boostFactor()).

Parameters

  • Player player

ตัวอย่างใช้งาน

Player player = ...;
@Override
protected float getRiddenSpeed(Player player) {
    return super.getRiddenSpeed(player);
}

net.minecraft.world.entity.monster.Strider#getWalkTargetValue(BlockPos,LevelReader)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:377
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Walk Target Value

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockState(), getFluidState(), is(), isInLava(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • BlockPos blockPos
  • LevelReader levelReader

ตัวอย่างใช้งาน

Strider instance = ...;
BlockPos blockPos = ...;
LevelReader levelReader = ...;
float result = instance.getWalkTargetValue(blockPos, levelReader);

net.minecraft.world.entity.monster.Strider#isFood(ItemStack)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:391
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Food

ทำงานยังไง

เรียกต่อ: is(). คืนค่า: itemStack.is(ItemTags.STRIDER_FOOD).

Parameters

  • ItemStack itemStack

ตัวอย่างใช้งาน

Strider instance = ...;
ItemStack itemStack = ...;
boolean result = instance.isFood(itemStack);

net.minecraft.world.entity.monster.Strider#isOnFire()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:367
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ On Fire

ทำงานยังไง

คืนค่า: false.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Strider instance = ...;
boolean result = instance.isOnFire();

net.minecraft.world.entity.monster.Strider#isSaddleable()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:143
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Saddleable

ทำงานยังไง

เรียกต่อ: isAlive(), isBaby(). คืนค่า: this.isAlive() && !this.isBaby().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Strider instance = ...;
boolean result = instance.isSaddleable();

net.minecraft.world.entity.monster.Strider#isSaddled()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:138
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Saddled

ทำงานยังไง

เรียกต่อ: hasSaddle(). คืนค่า: this.steering.hasSaddle().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Strider instance = ...;
boolean result = instance.isSaddled();

net.minecraft.world.entity.monster.Strider#isSensitiveToWater()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:362
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Sensitive To Water

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Strider instance = ...;
boolean result = instance.isSensitiveToWater();

net.minecraft.world.entity.monster.Strider#isSuffocating()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:182
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Suffocating

ทำงานยังไง

เรียกต่อ: get(). คืนค่า: this.entityData.get(DATA_SUFFOCATING).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Strider instance = ...;
boolean result = instance.isSuffocating();

net.minecraft.world.entity.monster.Strider#mobInteract(Player,InteractionHand)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:404
  • Modifiers: public
  • Return: InteractionResult

คืออะไร

ดำเนินการ mobInteract ตาม implementation ของ Strider

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isFood(), getItemInHand(), isSaddled(), isVehicle(), isSecondaryUseActive(), level(), startRiding(), consumesAction(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • Player player
  • InteractionHand interactionHand

ตัวอย่างใช้งาน

Strider instance = ...;
Player player = ...;
InteractionHand interactionHand = ...;
InteractionResult result = instance.mobInteract(player, interactionHand);

net.minecraft.world.entity.monster.Strider#nextStep()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:273
  • Modifiers: protected
  • Return: float

คืออะไร

ดำเนินการ nextStep ตาม implementation ของ Strider

ทำงานยังไง

คืนค่า: this.moveDist + 0.6F.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected float nextStep() {
    return super.nextStep();
}

net.minecraft.world.entity.monster.Strider#onSyncedDataUpdated(EntityDataAccessor<?>)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:109
  • Modifiers: public
  • Return: void

คืออะไร

จัดการเหตุการณ์ Synced Data Updated

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: equals(), level(), onSynced().

Parameters

  • EntityDataAccessor<?> entityDataAccessor

ตัวอย่างใช้งาน

Strider instance = ...;
EntityDataAccessor<?> entityDataAccessor = ...;
instance.onSyncedDataUpdated(entityDataAccessor);

net.minecraft.world.entity.monster.Strider#playStepSound(BlockPos,BlockState)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:278
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ playStepSound ตาม implementation ของ Strider

ทำงานยังไง

เรียกต่อ: playSound(), isInLava().

Parameters

  • BlockPos blockPos
  • BlockState blockState

ตัวอย่างใช้งาน

BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected void playStepSound(BlockPos blockPos, BlockState blockState) {
    super.playStepSound(blockPos, blockState);
}

net.minecraft.world.entity.monster.Strider#readAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:132
  • Modifiers: public
  • Return: void

คืออะไร

อ่าน Additional Save Data

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 2 statement).

Parameters

  • CompoundTag compoundTag

ตัวอย่างใช้งาน

Strider instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Strider#registerGoals()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:156
  • Modifiers: protected
  • Return: void

คืออะไร

ลงทะเบียน Goals

ทำงานยังไง

แก้ state: temptGoal. เรียกต่อ: addGoal(), is(), StriderGoToLavaGoal(). สร้างออบเจ็กต์: PanicGoal, BreedGoal, TemptGoal, Strider.StriderGoToLavaGoal.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected void registerGoals() {
    super.registerGoals();
}

net.minecraft.world.entity.monster.Strider#setSuffocating(boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:170
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Suffocating

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: set(), getAttribute(), addOrUpdateTransientModifier(), removeModifier().

Parameters

  • boolean bl

ตัวอย่างใช้งาน

Strider instance = ...;
instance.setSuffocating(true);

net.minecraft.world.entity.monster.Strider#shouldPassengersInheritMalus()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:321
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Passengers Inherit Malus

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected boolean shouldPassengersInheritMalus() {
    return super.shouldPassengersInheritMalus();
}

net.minecraft.world.entity.monster.Strider#Strider(EntityType<? extends Strider>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:88
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ Strider ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: blocksBuilding. เรียกต่อ: setPathfindingMalus().

Parameters

  • EntityType<? extends Strider> entityType
  • Level level

ตัวอย่างใช้งาน

EntityType<? extends Strider> entityType = ...;
Level level = ...;
Strider instance = new Strider(entityType, level);

net.minecraft.world.entity.monster.Strider#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:297
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isBeingTempted(), nextInt(), makeSound(), isPanicking(), isNoAi(), level(), getBlockState(), blockPosition().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Strider instance = ...;
instance.tick();

net.minecraft.world.entity.monster.Strider#tickRidden(Player,Vec3)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Strider.java:255
  • Modifiers: protected
  • Return: void

คืออะไร

ประมวลผล tick Ridden

ทำงานยังไง

แก้ state: yRotO, yBodyRot, yHeadRot. เรียกต่อ: setRot(), getYRot(), getXRot(), tickBoost().

Parameters

  • Player player
  • Vec3 vec3

ตัวอย่างใช้งาน

Player player = ...;
Vec3 vec3 = ...;
@Override
protected void tickRidden(Player player, Vec3 vec3) {
    super.tickRidden(player, vec3);
}

Vex

  • Full name: net.minecraft.world.entity.monster.Vex
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/Vex.java
  • Type: class
  • Modifiers: public
  • Extends: Monster
  • Implements: TraceableEntity

net.minecraft.world.entity.monster.Vex#addAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vex.java:126
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Additional Save Data

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: putInt(), getX(), getY(), getZ().

Parameters

  • CompoundTag compoundTag

ตัวอย่างใช้งาน

Vex instance = ...;
CompoundTag compoundTag = ...;
instance.addAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Vex#createAttributes()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vex.java:96
  • Modifiers: public static
  • Return: AttributeSupplier.Builder

คืออะไร

สร้าง Attributes

ทำงานยังไง

เรียกต่อ: createMonsterAttributes(), add(). คืนค่า: Monster.createMonsterAttributes().add(Attributes.MAX_HEALTH, 14.0).add(Attributes.ATTACK_DAMAGE, 4.0).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

AttributeSupplier.Builder result = Vex.createAttributes();

net.minecraft.world.entity.monster.Vex#defineSynchedData(SynchedEntityData.Builder)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vex.java:100
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ defineSynchedData ตาม implementation ของ Vex

ทำงานยังไง

เรียกต่อ: define().

Parameters

  • SynchedEntityData.Builder builder

ตัวอย่างใช้งาน

SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
    super.defineSynchedData(builder);
}

net.minecraft.world.entity.monster.Vex#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vex.java:207
  • Modifiers: public
  • Return: SpawnGroupData

คืออะไร

ดำเนินการ finalizeSpawn ตาม implementation ของ Vex

ทำงานยังไง

เรียกต่อ: getRandom(), populateDefaultEquipmentSlots(), populateDefaultEquipmentEnchantments(). คืนค่า: super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData).

Parameters

  • ServerLevelAccessor serverLevelAccessor
  • DifficultyInstance difficultyInstance
  • EntitySpawnReason entitySpawnReason
  • SpawnGroupData spawnGroupData

ตัวอย่างใช้งาน

Vex instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);

net.minecraft.world.entity.monster.Vex#getAmbientSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vex.java:187
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Ambient Sound

ทำงานยังไง

คืนค่า: SoundEvents.VEX_AMBIENT.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected SoundEvent getAmbientSound() {
    return super.getAmbientSound();
}

net.minecraft.world.entity.monster.Vex#getBoundOrigin()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vex.java:145
  • Modifiers: public
  • Return: BlockPos

คืออะไร

อ่านค่า Bound Origin

ทำงานยังไง

คืนค่า: this.boundOrigin.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Vex instance = ...;
BlockPos result = instance.getBoundOrigin();

net.minecraft.world.entity.monster.Vex#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vex.java:192
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

คืนค่า: SoundEvents.VEX_DEATH.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.monster.Vex#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vex.java:197
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

คืนค่า: SoundEvents.VEX_HURT.

Parameters

  • DamageSource damageSource

ตัวอย่างใช้งาน

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

net.minecraft.world.entity.monster.Vex#getLightLevelDependentMagicValue()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vex.java:202
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Light Level Dependent Magic Value

ทำงานยังไง

คืนค่า: 1.0F.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Vex instance = ...;
float result = instance.getLightLevelDependentMagicValue();

net.minecraft.world.entity.monster.Vex#getOwner()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vex.java:140
  • Modifiers: public
  • Return: Mob

คืออะไร

อ่านค่า Owner

ทำงานยังไง

คืนค่า: this.owner.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Vex instance = ...;
Mob result = instance.getOwner();

net.minecraft.world.entity.monster.Vex#isAffectedByBlocks()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vex.java:66
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Affected By Blocks

ทำงานยังไง

เรียกต่อ: isRemoved(). คืนค่า: !this.isRemoved().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected boolean isAffectedByBlocks() {
    return super.isAffectedByBlocks();
}

net.minecraft.world.entity.monster.Vex#isCharging()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vex.java:170
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Charging

ทำงานยังไง

เรียกต่อ: getVexFlag(). คืนค่า: this.getVexFlag(1).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Vex instance = ...;
boolean result = instance.isCharging();

net.minecraft.world.entity.monster.Vex#isFlapping()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vex.java:61
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Flapping

ทำงานยังไง

คืนค่า: this.tickCount % TICKS_PER_FLAP == 0.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Vex instance = ...;
boolean result = instance.isFlapping();

net.minecraft.world.entity.monster.Vex#populateDefaultEquipmentSlots(RandomSource,DifficultyInstance)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vex.java:218
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ populateDefaultEquipmentSlots ตาม implementation ของ Vex

ทำงานยังไง

เรียกต่อ: setItemSlot(), setDropChance(). สร้างออบเจ็กต์: ItemStack.

Parameters

  • RandomSource randomSource
  • DifficultyInstance difficultyInstance

ตัวอย่างใช้งาน

RandomSource randomSource = ...;
DifficultyInstance difficultyInstance = ...;
@Override
protected void populateDefaultEquipmentSlots(RandomSource randomSource, DifficultyInstance difficultyInstance) {
    super.populateDefaultEquipmentSlots(randomSource, difficultyInstance);
}

net.minecraft.world.entity.monster.Vex#readAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vex.java:106
  • Modifiers: public
  • Return: void

คืออะไร

อ่าน Additional Save Data

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: boundOrigin. เรียกต่อ: contains(), getInt(), setLimitedLife(). สร้างออบเจ็กต์: BlockPos.

Parameters

  • CompoundTag compoundTag

ตัวอย่างใช้งาน

Vex instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Vex#registerGoals()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vex.java:83
  • Modifiers: protected
  • Return: void

คืออะไร

ลงทะเบียน Goals

ทำงานยังไง

เรียกต่อ: addGoal(), VexChargeAttackGoal(), VexRandomMoveGoal(), setAlertOthers(), VexCopyOwnerTargetGoal(). สร้างออบเจ็กต์: FloatGoal, Vex.VexChargeAttackGoal, Vex.VexRandomMoveGoal, LookAtPlayerGoal.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected void registerGoals() {
    super.registerGoals();
}

net.minecraft.world.entity.monster.Vex#restoreFrom(Entity)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vex.java:118
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ restoreFrom ตาม implementation ของ Vex

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: owner. เรียกต่อ: getOwner().

Parameters

  • Entity entity

ตัวอย่างใช้งาน

Vex instance = ...;
Entity entity = ...;
instance.restoreFrom(entity);

net.minecraft.world.entity.monster.Vex#setBoundOrigin(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vex.java:150
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Bound Origin

ทำงานยังไง

แก้ state: boundOrigin.

Parameters

  • BlockPos blockPos

ตัวอย่างใช้งาน

Vex instance = ...;
BlockPos blockPos = ...;
instance.setBoundOrigin(blockPos);

net.minecraft.world.entity.monster.Vex#setIsCharging(boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vex.java:174
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Is Charging

ทำงานยังไง

เรียกต่อ: setVexFlag().

Parameters

  • boolean bl

ตัวอย่างใช้งาน

Vex instance = ...;
instance.setIsCharging(true);

net.minecraft.world.entity.monster.Vex#setLimitedLife(int)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vex.java:182
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Limited Life

ทำงานยังไง

แก้ state: hasLimitedLife, limitedLifeTicks.

Parameters

  • int i

ตัวอย่างใช้งาน

Vex instance = ...;
instance.setLimitedLife(0);

net.minecraft.world.entity.monster.Vex#setOwner(Mob)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vex.java:178
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Owner

ทำงานยังไง

แก้ state: owner.

Parameters

  • Mob mob

ตัวอย่างใช้งาน

Vex instance = ...;
Mob mob = ...;
instance.setOwner(mob);

net.minecraft.world.entity.monster.Vex#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vex.java:71
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: noPhysics, limitedLifeTicks. เรียกต่อ: setNoGravity(), hurt(), damageSources(), starve().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Vex instance = ...;
instance.tick();

net.minecraft.world.entity.monster.Vex#Vex(EntityType<? extends Vex>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vex.java:55
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ Vex ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: moveControl, xpReward. เรียกต่อ: VexMoveControl(). สร้างออบเจ็กต์: Vex.VexMoveControl.

Parameters

  • EntityType<? extends Vex> entityType
  • Level level

ตัวอย่างใช้งาน

EntityType<? extends Vex> entityType = ...;
Level level = ...;
Vex instance = new Vex(entityType, level);

Vindicator

  • Full name: net.minecraft.world.entity.monster.Vindicator
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/Vindicator.java
  • Type: class
  • Modifiers: public
  • Extends: AbstractIllager

net.minecraft.world.entity.monster.Vindicator#addAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vindicator.java:95
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Additional Save Data

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: putBoolean().

Parameters

  • CompoundTag compoundTag

ตัวอย่างใช้งาน

Vindicator instance = ...;
CompoundTag compoundTag = ...;
instance.addAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Vindicator#applyRaidBuffs(ServerLevel,int,boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vindicator.java:168
  • Modifiers: public
  • Return: void

คืออะไร

นำไปใช้ Raid Buffs

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getCurrentRaid(), nextFloat(), getEnchantOdds(), getNumGroups(), enchantItemFromProvider(), registryAccess(), getCurrentDifficultyAt(), blockPosition(). สร้างออบเจ็กต์: ItemStack.

Parameters

  • ServerLevel serverLevel
  • int i
  • boolean bl

ตัวอย่างใช้งาน

Vindicator instance = ...;
ServerLevel serverLevel = ...;
instance.applyRaidBuffs(serverLevel, 0, true);

net.minecraft.world.entity.monster.Vindicator#createAttributes()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vindicator.java:87
  • Modifiers: public static
  • Return: AttributeSupplier.Builder

คืออะไร

สร้าง Attributes

ทำงานยังไง

เรียกต่อ: createMonsterAttributes(), add().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

AttributeSupplier.Builder result = Vindicator.createAttributes();

net.minecraft.world.entity.monster.Vindicator#customServerAiStep(ServerLevel)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vindicator.java:77
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ customServerAiStep ตาม implementation ของ Vindicator

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isNoAi(), hasGroundPathNavigation(), isRaided(), blockPosition(), getNavigation(), setCanOpenDoors().

Parameters

  • ServerLevel serverLevel

ตัวอย่างใช้งาน

ServerLevel serverLevel = ...;
@Override
protected void customServerAiStep(ServerLevel serverLevel) {
    super.customServerAiStep(serverLevel);
}

net.minecraft.world.entity.monster.Vindicator#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vindicator.java:125
  • Modifiers: public
  • Return: SpawnGroupData

คืออะไร

ดำเนินการ finalizeSpawn ตาม implementation ของ Vindicator

ทำงานยังไง

เรียกต่อ: getNavigation(), setCanOpenDoors(), getRandom(), populateDefaultEquipmentSlots(), populateDefaultEquipmentEnchantments(). คืนค่า: spawnGroupData2.

Parameters

  • ServerLevelAccessor serverLevelAccessor
  • DifficultyInstance difficultyInstance
  • EntitySpawnReason entitySpawnReason
  • SpawnGroupData spawnGroupData

ตัวอย่างใช้งาน

Vindicator instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);

net.minecraft.world.entity.monster.Vindicator#getAmbientSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vindicator.java:153
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Ambient Sound

ทำงานยังไง

คืนค่า: SoundEvents.VINDICATOR_AMBIENT.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected SoundEvent getAmbientSound() {
    return super.getAmbientSound();
}

net.minecraft.world.entity.monster.Vindicator#getArmPose()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vindicator.java:103
  • Modifiers: public
  • Return: AbstractIllager.IllagerArmPose

คืออะไร

อ่านค่า Arm Pose

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isAggressive(), isCelebrating(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Vindicator instance = ...;
AbstractIllager.IllagerArmPose result = instance.getArmPose();

net.minecraft.world.entity.monster.Vindicator#getCelebrateSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vindicator.java:120
  • Modifiers: public
  • Return: SoundEvent

คืออะไร

อ่านค่า Celebrate Sound

ทำงานยังไง

คืนค่า: SoundEvents.VINDICATOR_CELEBRATE.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Vindicator instance = ...;
SoundEvent result = instance.getCelebrateSound();

net.minecraft.world.entity.monster.Vindicator#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vindicator.java:158
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

คืนค่า: SoundEvents.VINDICATOR_DEATH.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.monster.Vindicator#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vindicator.java:163
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

คืนค่า: SoundEvents.VINDICATOR_HURT.

Parameters

  • DamageSource damageSource

ตัวอย่างใช้งาน

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

net.minecraft.world.entity.monster.Vindicator#populateDefaultEquipmentSlots(RandomSource,DifficultyInstance)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vindicator.java:138
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ populateDefaultEquipmentSlots ตาม implementation ของ Vindicator

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getCurrentRaid(), setItemSlot(). สร้างออบเจ็กต์: ItemStack.

Parameters

  • RandomSource randomSource
  • DifficultyInstance difficultyInstance

ตัวอย่างใช้งาน

RandomSource randomSource = ...;
DifficultyInstance difficultyInstance = ...;
@Override
protected void populateDefaultEquipmentSlots(RandomSource randomSource, DifficultyInstance difficultyInstance) {
    super.populateDefaultEquipmentSlots(randomSource, difficultyInstance);
}

net.minecraft.world.entity.monster.Vindicator#readAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vindicator.java:112
  • Modifiers: public
  • Return: void

คืออะไร

อ่าน Additional Save Data

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: isJohnny. เรียกต่อ: contains(), getBoolean().

Parameters

  • CompoundTag compoundTag

ตัวอย่างใช้งาน

Vindicator instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Vindicator#registerGoals()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vindicator.java:58
  • Modifiers: protected
  • Return: void

คืออะไร

ลงทะเบียน Goals

ทำงานยังไง

เรียกต่อ: addGoal(), VindicatorBreakDoorGoal(), RaiderOpenDoorGoal(), HoldGroundAttackGoal(), setAlertOthers(), VindicatorJohnnyAttackGoal(). สร้างออบเจ็กต์: FloatGoal, AvoidEntityGoal<>, Vindicator.VindicatorBreakDoorGoal, AbstractIllager.RaiderOpenDoorGoal.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected void registerGoals() {
    super.registerGoals();
}

net.minecraft.world.entity.monster.Vindicator#setCustomName(Component)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vindicator.java:145
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Custom Name

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: isJohnny. เรียกต่อ: getString(), equals().

Parameters

  • Component component

ตัวอย่างใช้งาน

Vindicator instance = ...;
Component component = ...;
instance.setCustomName(component);

net.minecraft.world.entity.monster.Vindicator#Vindicator(EntityType<? extends Vindicator>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Vindicator.java:54
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ Vindicator ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • EntityType<? extends Vindicator> entityType
  • Level level

ตัวอย่างใช้งาน

EntityType<? extends Vindicator> entityType = ...;
Level level = ...;
Vindicator instance = new Vindicator(entityType, level);

Witch

  • Full name: net.minecraft.world.entity.monster.Witch
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/Witch.java
  • Type: class
  • Modifiers: public
  • Extends: Raider
  • Implements: RangedAttackMob

net.minecraft.world.entity.monster.Witch#aiStep()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Witch.java:109
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ aiStep ตาม implementation ของ Witch

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: usingTime. เรียกต่อ: level(), isAlive(), decrementCooldown(), getCooldown(), setCanAttack(), isDrinkingPotion(), setUsingItem(), getMainHandItem().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Witch instance = ...;
instance.aiStep();

net.minecraft.world.entity.monster.Witch#applyRaidBuffs(ServerLevel,int,boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Witch.java:248
  • Modifiers: public
  • Return: void

คืออะไร

นำไปใช้ Raid Buffs

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • ServerLevel serverLevel
  • int i
  • boolean bl

ตัวอย่างใช้งาน

Witch instance = ...;
ServerLevel serverLevel = ...;
instance.applyRaidBuffs(serverLevel, 0, true);

net.minecraft.world.entity.monster.Witch#canBeLeader()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Witch.java:252
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Be Leader

ทำงานยังไง

คืนค่า: false.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Witch instance = ...;
boolean result = instance.canBeLeader();

net.minecraft.world.entity.monster.Witch#createAttributes()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Witch.java:105
  • Modifiers: public static
  • Return: AttributeSupplier.Builder

คืออะไร

สร้าง Attributes

ทำงานยังไง

เรียกต่อ: createMonsterAttributes(), add(). คืนค่า: Monster.createMonsterAttributes().add(Attributes.MAX_HEALTH, 26.0).add(Attributes.MOVEMENT_SPEED, 0.25).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

AttributeSupplier.Builder result = Witch.createAttributes();

net.minecraft.world.entity.monster.Witch#defineSynchedData(SynchedEntityData.Builder)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Witch.java:76
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ defineSynchedData ตาม implementation ของ Witch

ทำงานยังไง

เรียกต่อ: define().

Parameters

  • SynchedEntityData.Builder builder

ตัวอย่างใช้งาน

SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
    super.defineSynchedData(builder);
}

net.minecraft.world.entity.monster.Witch#getAmbientSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Witch.java:82
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Ambient Sound

ทำงานยังไง

คืนค่า: SoundEvents.WITCH_AMBIENT.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected SoundEvent getAmbientSound() {
    return super.getAmbientSound();
}

net.minecraft.world.entity.monster.Witch#getCelebrateSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Witch.java:172
  • Modifiers: public
  • Return: SoundEvent

คืออะไร

อ่านค่า Celebrate Sound

ทำงานยังไง

คืนค่า: SoundEvents.WITCH_CELEBRATE.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Witch instance = ...;
SoundEvent result = instance.getCelebrateSound();

net.minecraft.world.entity.monster.Witch#getDamageAfterMagicAbsorb(DamageSource,float)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Witch.java:197
  • Modifiers: protected
  • Return: float

คืออะไร

อ่านค่า Damage After Magic Absorb

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getEntity(), is(). คืนค่า: f.

Parameters

  • DamageSource damageSource
  • float f

ตัวอย่างใช้งาน

DamageSource damageSource = ...;
@Override
protected float getDamageAfterMagicAbsorb(DamageSource damageSource, float f) {
    return super.getDamageAfterMagicAbsorb(damageSource, f);
}

net.minecraft.world.entity.monster.Witch#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Witch.java:92
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

คืนค่า: SoundEvents.WITCH_DEATH.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.monster.Witch#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Witch.java:87
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

คืนค่า: SoundEvents.WITCH_HURT.

Parameters

  • DamageSource damageSource

ตัวอย่างใช้งาน

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

net.minecraft.world.entity.monster.Witch#handleEntityEvent(byte)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Witch.java:177
  • Modifiers: public
  • Return: void

คืออะไร

จัดการ Entity Event

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: nextInt(), level(), addParticle(), getX(), nextGaussian(), getBoundingBox(), getZ().

Parameters

  • byte b

ตัวอย่างใช้งาน

Witch instance = ...;
instance.handleEntityEvent(0);

net.minecraft.world.entity.monster.Witch#isDrinkingPotion()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Witch.java:101
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Drinking Potion

ทำงานยังไง

เรียกต่อ: getEntityData(), get(). คืนค่า: this.getEntityData().get(DATA_USING_ITEM).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Witch instance = ...;
boolean result = instance.isDrinkingPotion();

net.minecraft.world.entity.monster.Witch#performRangedAttack(LivingEntity,float)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Witch.java:211
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ performRangedAttack ตาม implementation ของ Witch

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isDrinkingPotion(), getDeltaMovement(), getX(), getEyeY(), getY(), getZ(), sqrt(), getHealth().

Parameters

  • LivingEntity livingEntity
  • float f

ตัวอย่างใช้งาน

Witch instance = ...;
LivingEntity livingEntity = ...;
instance.performRangedAttack(livingEntity, 0.0F);

net.minecraft.world.entity.monster.Witch#registerGoals()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Witch.java:59
  • Modifiers: protected
  • Return: void

คืออะไร

ลงทะเบียน Goals

ทำงานยังไง

แก้ state: healRaidersGoal, attackPlayersGoal. เรียกต่อ: hasActiveRaid(), getType(), addGoal(). สร้างออบเจ็กต์: NearestHealableRaiderTargetGoal<>, NearestAttackableWitchTargetGoal<>, FloatGoal, RangedAttackGoal.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected void registerGoals() {
    super.registerGoals();
}

net.minecraft.world.entity.monster.Witch#setUsingItem(boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Witch.java:97
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Using Item

ทำงานยังไง

เรียกต่อ: getEntityData(), set().

Parameters

  • boolean bl

ตัวอย่างใช้งาน

Witch instance = ...;
instance.setUsingItem(true);

net.minecraft.world.entity.monster.Witch#Witch(EntityType<? extends Witch>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Witch.java:55
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ Witch ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • EntityType<? extends Witch> entityType
  • Level level

ตัวอย่างใช้งาน

EntityType<? extends Witch> entityType = ...;
Level level = ...;
Witch instance = new Witch(entityType, level);

WitherSkeleton

  • Full name: net.minecraft.world.entity.monster.WitherSkeleton
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/WitherSkeleton.java
  • Type: class
  • Modifiers: public
  • Extends: AbstractSkeleton

net.minecraft.world.entity.monster.WitherSkeleton#canBeAffected(MobEffectInstance)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/WitherSkeleton.java:122
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Be Affected

ทำงานยังไง

เรียกต่อ: is(). คืนค่า: mobEffectInstance.is(MobEffects.WITHER) ? false : super.canBeAffected(mobEffectInstance).

Parameters

  • MobEffectInstance mobEffectInstance

ตัวอย่างใช้งาน

WitherSkeleton instance = ...;
MobEffectInstance mobEffectInstance = ...;
boolean result = instance.canBeAffected(mobEffectInstance);

net.minecraft.world.entity.monster.WitherSkeleton#canHoldItem(ItemStack)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/WitherSkeleton.java:68
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Hold Item

ทำงานยังไง

เรียกต่อ: is(). คืนค่า: !itemStack.is(ItemTags.WITHER_SKELETON_DISLIKED_WEAPONS) && super.canHoldItem(itemStack).

Parameters

  • ItemStack itemStack

ตัวอย่างใช้งาน

WitherSkeleton instance = ...;
ItemStack itemStack = ...;
boolean result = instance.canHoldItem(itemStack);

net.minecraft.world.entity.monster.WitherSkeleton#doHurtTarget(ServerLevel,Entity)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/WitherSkeleton.java:102
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ doHurtTarget ตาม implementation ของ WitherSkeleton

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: addEffect(). สร้างออบเจ็กต์: MobEffectInstance. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ServerLevel serverLevel
  • Entity entity

ตัวอย่างใช้งาน

WitherSkeleton instance = ...;
ServerLevel serverLevel = ...;
Entity entity = ...;
boolean result = instance.doHurtTarget(serverLevel, entity);

net.minecraft.world.entity.monster.WitherSkeleton#dropCustomDeathLoot(ServerLevel,DamageSource,boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/WitherSkeleton.java:73
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ dropCustomDeathLoot ตาม implementation ของ WitherSkeleton

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getEntity(), canDropMobsSkull(), increaseDroppedSkulls(), spawnAtLocation().

Parameters

  • ServerLevel serverLevel
  • DamageSource damageSource
  • boolean bl

ตัวอย่างใช้งาน

ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
@Override
protected void dropCustomDeathLoot(ServerLevel serverLevel, DamageSource damageSource, boolean bl) {
    super.dropCustomDeathLoot(serverLevel, damageSource, bl);
}

net.minecraft.world.entity.monster.WitherSkeleton#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/WitherSkeleton.java:91
  • Modifiers: public
  • Return: SpawnGroupData

คืออะไร

ดำเนินการ finalizeSpawn ตาม implementation ของ WitherSkeleton

ทำงานยังไง

เรียกต่อ: getAttribute(), setBaseValue(), reassessWeaponGoal(). คืนค่า: spawnGroupData2.

Parameters

  • ServerLevelAccessor serverLevelAccessor
  • DifficultyInstance difficultyInstance
  • EntitySpawnReason entitySpawnReason
  • SpawnGroupData spawnGroupData

ตัวอย่างใช้งาน

WitherSkeleton instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);

net.minecraft.world.entity.monster.WitherSkeleton#getAmbientSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/WitherSkeleton.java:43
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Ambient Sound

ทำงานยังไง

คืนค่า: SoundEvents.WITHER_SKELETON_AMBIENT.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected SoundEvent getAmbientSound() {
    return super.getAmbientSound();
}

net.minecraft.world.entity.monster.WitherSkeleton#getArrow(ItemStack,float,ItemStack)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/WitherSkeleton.java:115
  • Modifiers: protected
  • Return: AbstractArrow

คืออะไร

อ่านค่า Arrow

ทำงานยังไง

เรียกต่อ: igniteForSeconds(). คืนค่า: abstractArrow.

Parameters

  • ItemStack itemStack
  • float f
  • ItemStack itemStack2

ตัวอย่างใช้งาน

ItemStack itemStack = ...;
ItemStack itemStack2 = ...;
@Override
protected AbstractArrow getArrow(ItemStack itemStack, float f, ItemStack itemStack2) {
    return super.getArrow(itemStack, f, itemStack2);
}

net.minecraft.world.entity.monster.WitherSkeleton#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/WitherSkeleton.java:53
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

คืนค่า: SoundEvents.WITHER_SKELETON_DEATH.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.monster.WitherSkeleton#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/WitherSkeleton.java:48
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

คืนค่า: SoundEvents.WITHER_SKELETON_HURT.

Parameters

  • DamageSource damageSource

ตัวอย่างใช้งาน

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

net.minecraft.world.entity.monster.WitherSkeleton#getPreferredWeaponType()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/WitherSkeleton.java:63
  • Modifiers: public
  • Return: TagKey<Item>

คืออะไร

อ่านค่า Preferred Weapon Type

ทำงานยังไง

คืนค่า: null.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

WitherSkeleton instance = ...;
TagKey<Item> result = instance.getPreferredWeaponType();

net.minecraft.world.entity.monster.WitherSkeleton#populateDefaultEquipmentEnchantments(ServerLevelAccessor,RandomSource,DifficultyInstance)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/WitherSkeleton.java:87
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ populateDefaultEquipmentEnchantments ตาม implementation ของ WitherSkeleton

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • ServerLevelAccessor serverLevelAccessor
  • RandomSource randomSource
  • DifficultyInstance difficultyInstance

ตัวอย่างใช้งาน

ServerLevelAccessor serverLevelAccessor = ...;
RandomSource randomSource = ...;
DifficultyInstance difficultyInstance = ...;
@Override
protected void populateDefaultEquipmentEnchantments(ServerLevelAccessor serverLevelAccessor, RandomSource randomSource, DifficultyInstance difficultyInstance) {
    super.populateDefaultEquipmentEnchantments(serverLevelAccessor, randomSource, difficultyInstance);
}

net.minecraft.world.entity.monster.WitherSkeleton#populateDefaultEquipmentSlots(RandomSource,DifficultyInstance)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/WitherSkeleton.java:82
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ populateDefaultEquipmentSlots ตาม implementation ของ WitherSkeleton

ทำงานยังไง

เรียกต่อ: setItemSlot(). สร้างออบเจ็กต์: ItemStack.

Parameters

  • RandomSource randomSource
  • DifficultyInstance difficultyInstance

ตัวอย่างใช้งาน

RandomSource randomSource = ...;
DifficultyInstance difficultyInstance = ...;
@Override
protected void populateDefaultEquipmentSlots(RandomSource randomSource, DifficultyInstance difficultyInstance) {
    super.populateDefaultEquipmentSlots(randomSource, difficultyInstance);
}

net.minecraft.world.entity.monster.WitherSkeleton#registerGoals()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/WitherSkeleton.java:37
  • Modifiers: protected
  • Return: void

คืออะไร

ลงทะเบียน Goals

ทำงานยังไง

เรียกต่อ: addGoal(). สร้างออบเจ็กต์: NearestAttackableTargetGoal<>.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected void registerGoals() {
    super.registerGoals();
}

net.minecraft.world.entity.monster.WitherSkeleton#WitherSkeleton(EntityType<? extends WitherSkeleton>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/WitherSkeleton.java:32
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ WitherSkeleton ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

เรียกต่อ: setPathfindingMalus().

Parameters

  • EntityType<? extends WitherSkeleton> entityType
  • Level level

ตัวอย่างใช้งาน

EntityType<? extends WitherSkeleton> entityType = ...;
Level level = ...;
WitherSkeleton instance = new WitherSkeleton(entityType, level);

Zoglin

  • Full name: net.minecraft.world.entity.monster.Zoglin
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/Zoglin.java
  • Type: class
  • Modifiers: public
  • Extends: Monster
  • Implements: HoglinBase

net.minecraft.world.entity.monster.Zoglin#addAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zoglin.java:333
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Additional Save Data

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isBaby(), putBoolean().

Parameters

  • CompoundTag compoundTag

ตัวอย่างใช้งาน

Zoglin instance = ...;
CompoundTag compoundTag = ...;
instance.addAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Zoglin#aiStep()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zoglin.java:269
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ aiStep ตาม implementation ของ Zoglin

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: attackAnimationRemainingTicks.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Zoglin instance = ...;
instance.aiStep();

net.minecraft.world.entity.monster.Zoglin#blockedByShield(LivingEntity)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zoglin.java:205
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ blockedByShield ตาม implementation ของ Zoglin

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isBaby(), throwTarget().

Parameters

  • LivingEntity livingEntity

ตัวอย่างใช้งาน

LivingEntity livingEntity = ...;
@Override
protected void blockedByShield(LivingEntity livingEntity) {
    super.blockedByShield(livingEntity);
}

net.minecraft.world.entity.monster.Zoglin#brainProvider()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zoglin.java:88
  • Modifiers: protected
  • Return: Brain.Provider<Zoglin>

คืออะไร

ดำเนินการ brainProvider ตาม implementation ของ Zoglin

ทำงานยังไง

เรียกต่อ: provider(). คืนค่า: Brain.provider(MEMORY_TYPES, SENSOR_TYPES).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected Brain.Provider<Zoglin> brainProvider() {
    return super.brainProvider();
}

net.minecraft.world.entity.monster.Zoglin#canBeLeashed()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zoglin.java:200
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Be Leashed

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Zoglin instance = ...;
boolean result = instance.canBeLeashed();

net.minecraft.world.entity.monster.Zoglin#createAttributes()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zoglin.java:175
  • Modifiers: public static
  • Return: AttributeSupplier.Builder

คืออะไร

สร้าง Attributes

ทำงานยังไง

เรียกต่อ: createMonsterAttributes(), add().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

AttributeSupplier.Builder result = Zoglin.createAttributes();

net.minecraft.world.entity.monster.Zoglin#customServerAiStep(ServerLevel)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zoglin.java:247
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ customServerAiStep ตาม implementation ของ Zoglin

ทำงานยังไง

เรียกต่อ: get(), push(), getBrain(), tick(), pop(), updateActivity().

Parameters

  • ServerLevel serverLevel

ตัวอย่างใช้งาน

ServerLevel serverLevel = ...;
@Override
protected void customServerAiStep(ServerLevel serverLevel) {
    super.customServerAiStep(serverLevel);
}

net.minecraft.world.entity.monster.Zoglin#defineSynchedData(SynchedEntityData.Builder)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zoglin.java:149
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ defineSynchedData ตาม implementation ของ Zoglin

ทำงานยังไง

เรียกต่อ: define().

Parameters

  • SynchedEntityData.Builder builder

ตัวอย่างใช้งาน

SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
    super.defineSynchedData(builder);
}

net.minecraft.world.entity.monster.Zoglin#doHurtTarget(ServerLevel,Entity)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zoglin.java:188
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ doHurtTarget ตาม implementation ของ Zoglin

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: attackAnimationRemainingTicks. เรียกต่อ: broadcastEntityEvent(), makeSound(), hurtAndThrowTarget(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ServerLevel serverLevel
  • Entity entity

ตัวอย่างใช้งาน

Zoglin instance = ...;
ServerLevel serverLevel = ...;
Entity entity = ...;
boolean result = instance.doHurtTarget(serverLevel, entity);

net.minecraft.world.entity.monster.Zoglin#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zoglin.java:163
  • Modifiers: public
  • Return: SpawnGroupData

คืออะไร

ดำเนินการ finalizeSpawn ตาม implementation ของ Zoglin

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getRandom(), nextFloat(), setBaby(). คืนค่า: super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData).

Parameters

  • ServerLevelAccessor serverLevelAccessor
  • DifficultyInstance difficultyInstance
  • EntitySpawnReason entitySpawnReason
  • SpawnGroupData spawnGroupData

ตัวอย่างใช้งาน

Zoglin instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);

net.minecraft.world.entity.monster.Zoglin#getAmbientSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zoglin.java:293
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Ambient Sound

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: level(), hasMemoryValue(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected SoundEvent getAmbientSound() {
    return super.getAmbientSound();
}

net.minecraft.world.entity.monster.Zoglin#getAttackAnimationRemainingTicks()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zoglin.java:288
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Attack Animation Remaining Ticks

ทำงานยังไง

คืนค่า: this.attackAnimationRemainingTicks.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Zoglin instance = ...;
int result = instance.getAttackAnimationRemainingTicks();

net.minecraft.world.entity.monster.Zoglin#getBrain()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zoglin.java:231
  • Modifiers: public
  • Return: Brain<Zoglin>

คืออะไร

อ่านค่า Brain

ทำงานยังไง

คืนค่า: (Brain<Zoglin>)super.getBrain().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Zoglin instance = ...;
Brain<Zoglin> result = instance.getBrain();

net.minecraft.world.entity.monster.Zoglin#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zoglin.java:307
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

คืนค่า: SoundEvents.ZOGLIN_DEATH.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.monster.Zoglin#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zoglin.java:302
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

คืนค่า: SoundEvents.ZOGLIN_HURT.

Parameters

  • DamageSource damageSource

ตัวอย่างใช้งาน

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

net.minecraft.world.entity.monster.Zoglin#getTarget()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zoglin.java:321
  • Modifiers: public
  • Return: LivingEntity

คืออะไร

อ่านค่า Target

ทำงานยังไง

เรียกต่อ: getTargetFromBrain(). คืนค่า: this.getTargetFromBrain().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Zoglin instance = ...;
LivingEntity result = instance.getTarget();

net.minecraft.world.entity.monster.Zoglin#handleEntityEvent(byte)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zoglin.java:278
  • Modifiers: public
  • Return: void

คืออะไร

จัดการ Entity Event

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: attackAnimationRemainingTicks. เรียกต่อ: makeSound().

Parameters

  • byte b

ตัวอย่างใช้งาน

Zoglin instance = ...;
instance.handleEntityEvent(0);

net.minecraft.world.entity.monster.Zoglin#hurtServer(ServerLevel,DamageSource,float)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zoglin.java:212
  • Modifiers: public
  • Return: boolean

คืออะไร

ประมวลผลความเสียหาย Server

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getEntity(), canAttack(), isOtherTargetMuchFurtherAwayThanCurrentAttackTarget(), setAttackTarget(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ServerLevel serverLevel
  • DamageSource damageSource
  • float f

ตัวอย่างใช้งาน

Zoglin instance = ...;
ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
boolean result = instance.hurtServer(serverLevel, damageSource, 0.0F);

net.minecraft.world.entity.monster.Zoglin#isAdult()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zoglin.java:184
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Adult

ทำงานยังไง

เรียกต่อ: isBaby(). คืนค่า: !this.isBaby().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Zoglin instance = ...;
boolean result = instance.isAdult();

net.minecraft.world.entity.monster.Zoglin#isBaby()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zoglin.java:264
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Baby

ทำงานยังไง

เรียกต่อ: getEntityData(), get(). คืนค่า: this.getEntityData().get(DATA_BABY_ID).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Zoglin instance = ...;
boolean result = instance.isBaby();

net.minecraft.world.entity.monster.Zoglin#makeBrain(Dynamic<?>)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zoglin.java:93
  • Modifiers: protected
  • Return: Brain<?>

คืออะไร

สร้าง Brain

ทำงานยังไง

เรียกต่อ: brainProvider(), initCoreActivity(), initIdleActivity(), initFightActivity(), setCoreActivities(), of(), setDefaultActivity(), useDefaultActivity(). คืนค่า: brain.

Parameters

  • Dynamic<?> dynamic

ตัวอย่างใช้งาน

Dynamic<?> dynamic = ...;
@Override
protected Brain<?> makeBrain(Dynamic<?> dynamic) {
    return super.makeBrain(dynamic);
}

net.minecraft.world.entity.monster.Zoglin#onSyncedDataUpdated(EntityDataAccessor<?>)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zoglin.java:155
  • Modifiers: public
  • Return: void

คืออะไร

จัดการเหตุการณ์ Synced Data Updated

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: equals(), refreshDimensions().

Parameters

  • EntityDataAccessor<?> entityDataAccessor

ตัวอย่างใช้งาน

Zoglin instance = ...;
EntityDataAccessor<?> entityDataAccessor = ...;
instance.onSyncedDataUpdated(entityDataAccessor);

net.minecraft.world.entity.monster.Zoglin#playAngrySound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zoglin.java:317
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ playAngrySound ตาม implementation ของ Zoglin

ทำงานยังไง

เรียกต่อ: makeSound().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected void playAngrySound() {
    super.playAngrySound();
}

net.minecraft.world.entity.monster.Zoglin#playStepSound(BlockPos,BlockState)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zoglin.java:312
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ playStepSound ตาม implementation ของ Zoglin

ทำงานยังไง

เรียกต่อ: playSound().

Parameters

  • BlockPos blockPos
  • BlockState blockState

ตัวอย่างใช้งาน

BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected void playStepSound(BlockPos blockPos, BlockState blockState) {
    super.playStepSound(blockPos, blockState);
}

net.minecraft.world.entity.monster.Zoglin#readAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zoglin.java:341
  • Modifiers: public
  • Return: void

คืออะไร

อ่าน Additional Save Data

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBoolean(), setBaby().

Parameters

  • CompoundTag compoundTag

ตัวอย่างใช้งาน

Zoglin instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Zoglin#sendDebugPackets()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zoglin.java:327
  • Modifiers: protected
  • Return: void

คืออะไร

ส่ง Debug Packets

ทำงานยังไง

เรียกต่อ: sendEntityBrain().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected void sendDebugPackets() {
    super.sendDebugPackets();
}

net.minecraft.world.entity.monster.Zoglin#setBaby(boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zoglin.java:256
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Baby

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getEntityData(), set(), level(), getAttribute(), setBaseValue().

Parameters

  • boolean bl

ตัวอย่างใช้งาน

Zoglin instance = ...;
instance.setBaby(true);

net.minecraft.world.entity.monster.Zoglin#updateActivity()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zoglin.java:236
  • Modifiers: protected
  • Return: void

คืออะไร

อัปเดต Activity

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getActiveNonCoreActivity(), orElse(), setActiveActivityToFirstValid(), of(), playAngrySound(), setAggressive(), hasMemoryValue().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected void updateActivity() {
    super.updateActivity();
}

net.minecraft.world.entity.monster.Zoglin#Zoglin(EntityType<? extends Zoglin>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zoglin.java:83
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ Zoglin ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: xpReward.

Parameters

  • EntityType<? extends Zoglin> entityType
  • Level level

ตัวอย่างใช้งาน

EntityType<? extends Zoglin> entityType = ...;
Level level = ...;
Zoglin instance = new Zoglin(entityType, level);

Zombie

  • Full name: net.minecraft.world.entity.monster.Zombie
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/Zombie.java
  • Type: class
  • Modifiers: public
  • Extends: Monster

net.minecraft.world.entity.monster.Zombie#addAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:412
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Additional Save Data

ทำงานยังไง

เรียกต่อ: putBoolean(), isBaby(), canBreakDoors(), putInt(), isInWater(), isUnderWaterConverting().

Parameters

  • CompoundTag compoundTag

ตัวอย่างใช้งาน

Zombie instance = ...;
CompoundTag compoundTag = ...;
instance.addAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Zombie#addBehaviourGoals()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:111
  • Modifiers: protected
  • Return: void

คืออะไร

เพิ่ม Behaviour Goals

ทำงานยังไง

เรียกต่อ: addGoal(), setAlertOthers(). สร้างออบเจ็กต์: ZombieAttackGoal, MoveThroughVillageGoal, WaterAvoidingRandomStrollGoal, HurtByTargetGoal.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected void addBehaviourGoals() {
    super.addBehaviourGoals();
}

net.minecraft.world.entity.monster.Zombie#aiStep()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:226
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ aiStep ตาม implementation ของ Zombie

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isAlive(), isSunSensitive(), isSunBurnTick(), getItemBySlot(), isEmpty(), isDamageableItem(), getItem(), setDamageValue().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Zombie instance = ...;
instance.aiStep();

net.minecraft.world.entity.monster.Zombie#canBreakDoors()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:143
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Break Doors

ทำงานยังไง

คืนค่า: this.canBreakDoors.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Zombie instance = ...;
boolean result = instance.canBreakDoors();

net.minecraft.world.entity.monster.Zombie#canHoldItem(ItemStack)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:453
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Hold Item

ทำงานยังไง

เรียกต่อ: is(), isBaby(), isPassenger(). คืนค่า: itemStack.is(Items.EGG) && this.isBaby() && this.isPassenger() ? false : super.canHoldItem(itemStack).

Parameters

  • ItemStack itemStack

ตัวอย่างใช้งาน

Zombie instance = ...;
ItemStack itemStack = ...;
boolean result = instance.canHoldItem(itemStack);

net.minecraft.world.entity.monster.Zombie#canSpawnInLiquids()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:395
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Spawn In Liquids

ทำงานยังไง

คืนค่า: false.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected boolean canSpawnInLiquids() {
    return super.canSpawnInLiquids();
}

net.minecraft.world.entity.monster.Zombie#convertsInWater()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:199
  • Modifiers: protected
  • Return: boolean

คืออะไร

ดำเนินการ convertsInWater ตาม implementation ของ Zombie

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected boolean convertsInWater() {
    return super.convertsInWater();
}

net.minecraft.world.entity.monster.Zombie#convertToZombieType(EntityType<? extends Zombie>)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:266
  • Modifiers: protected
  • Return: void

คืออะไร

แปลง To Zombie Type

ทำงานยังไง

เรียกต่อ: convertTo(), single(), handleAttributes(), level(), getCurrentDifficultyAt(), blockPosition(), getSpecialMultiplier().

Parameters

  • EntityType<? extends Zombie> entityType

ตัวอย่างใช้งาน

EntityType<? extends Zombie> entityType = ...;
@Override
protected void convertToZombieType(EntityType<? extends Zombie> entityType) {
    super.convertToZombieType(entityType);
}

net.minecraft.world.entity.monster.Zombie#convertVillagerToZombieVillager(ServerLevel,Villager)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:274
  • Modifiers: public
  • Return: boolean

คืออะไร

แปลง Villager To Zombie Villager

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: convertTo(), single(), finalizeSpawn(), getCurrentDifficultyAt(), blockPosition(), ZombieGroupData(), setVillagerData(), getVillagerData(). สร้างออบเจ็กต์: Zombie.ZombieGroupData. คืนค่า: zombieVillager != null.

Parameters

  • ServerLevel serverLevel
  • Villager villager

ตัวอย่างใช้งาน

Zombie instance = ...;
ServerLevel serverLevel = ...;
Villager villager = ...;
boolean result = instance.convertVillagerToZombieVillager(serverLevel, villager);

net.minecraft.world.entity.monster.Zombie#createAttributes()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:122
  • Modifiers: public static
  • Return: AttributeSupplier.Builder

คืออะไร

สร้าง Attributes

ทำงานยังไง

เรียกต่อ: createMonsterAttributes(), add().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

AttributeSupplier.Builder result = Zombie.createAttributes();

net.minecraft.world.entity.monster.Zombie#defineSynchedData(SynchedEntityData.Builder)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:131
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ defineSynchedData ตาม implementation ของ Zombie

ทำงานยังไง

เรียกต่อ: define().

Parameters

  • SynchedEntityData.Builder builder

ตัวอย่างใช้งาน

SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
    super.defineSynchedData(builder);
}

net.minecraft.world.entity.monster.Zombie#doHurtTarget(ServerLevel,Entity)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:353
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ doHurtTarget ตาม implementation ของ Zombie

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: level(), getCurrentDifficultyAt(), blockPosition(), getEffectiveDifficulty(), getMainHandItem(), isEmpty(), isOnFire(), nextFloat(). คืนค่า: bl.

Parameters

  • ServerLevel serverLevel
  • Entity entity

ตัวอย่างใช้งาน

Zombie instance = ...;
ServerLevel serverLevel = ...;
Entity entity = ...;
boolean result = instance.doHurtTarget(serverLevel, entity);

net.minecraft.world.entity.monster.Zombie#doUnderWaterConversion()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:259
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ doUnderWaterConversion ตาม implementation ของ Zombie

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: convertToZombieType(), isSilent(), level(), levelEvent(), blockPosition().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected void doUnderWaterConversion() {
    super.doUnderWaterConversion();
}

net.minecraft.world.entity.monster.Zombie#dropCustomDeathLoot(ServerLevel,DamageSource,boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:565
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ dropCustomDeathLoot ตาม implementation ของ Zombie

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getEntity(), canDropMobsSkull(), getSkull(), isEmpty(), increaseDroppedSkulls(), spawnAtLocation().

Parameters

  • ServerLevel serverLevel
  • DamageSource damageSource
  • boolean bl

ตัวอย่างใช้งาน

ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
@Override
protected void dropCustomDeathLoot(ServerLevel serverLevel, DamageSource damageSource, boolean bl) {
    super.dropCustomDeathLoot(serverLevel, damageSource, bl);
}

net.minecraft.world.entity.monster.Zombie#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:463
  • Modifiers: public
  • Return: SpawnGroupData

คืออะไร

ดำเนินการ finalizeSpawn ตาม implementation ของ Zombie

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getRandom(), getSpecialMultiplier(), setCanPickUpLoot(), nextFloat(), ZombieGroupData(), getSpawnAsBabyOdds(), setBaby(), getEntitiesOfClass(). สร้างออบเจ็กต์: Zombie.ZombieGroupData, ItemStack. คืนค่า: spawnGroupData.

Parameters

  • ServerLevelAccessor serverLevelAccessor
  • DifficultyInstance difficultyInstance
  • EntitySpawnReason entitySpawnReason
  • SpawnGroupData spawnGroupData

ตัวอย่างใช้งาน

Zombie instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);

net.minecraft.world.entity.monster.Zombie#getAmbientSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:366
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Ambient Sound

ทำงานยังไง

คืนค่า: SoundEvents.ZOMBIE_AMBIENT.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected SoundEvent getAmbientSound() {
    return super.getAmbientSound();
}

net.minecraft.world.entity.monster.Zombie#getBaseExperienceReward(ServerLevel)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:169
  • Modifiers: protected
  • Return: int

คืออะไร

อ่านค่า Base Experience Reward

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: xpReward. เรียกต่อ: isBaby(). คืนค่า: super.getBaseExperienceReward(serverLevel).

Parameters

  • ServerLevel serverLevel

ตัวอย่างใช้งาน

ServerLevel serverLevel = ...;
@Override
protected int getBaseExperienceReward(ServerLevel serverLevel) {
    return super.getBaseExperienceReward(serverLevel);
}

net.minecraft.world.entity.monster.Zombie#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:376
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

คืนค่า: SoundEvents.ZOMBIE_DEATH.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.monster.Zombie#getDefaultDimensions(Pose)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:448
  • Modifiers: public
  • Return: EntityDimensions

คืออะไร

อ่านค่า Default Dimensions

ทำงานยังไง

เรียกต่อ: isBaby(). คืนค่า: this.isBaby() ? BABY_DIMENSIONS : super.getDefaultDimensions(pose).

Parameters

  • Pose pose

ตัวอย่างใช้งาน

Zombie instance = ...;
Pose pose = ...;
EntityDimensions result = instance.getDefaultDimensions(pose);

net.minecraft.world.entity.monster.Zombie#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:371
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

คืนค่า: SoundEvents.ZOMBIE_HURT.

Parameters

  • DamageSource damageSource

ตัวอย่างใช้งาน

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

net.minecraft.world.entity.monster.Zombie#getSkull()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:577
  • Modifiers: protected
  • Return: ItemStack

คืออะไร

อ่านค่า Skull

ทำงานยังไง

สร้างออบเจ็กต์: ItemStack. คืนค่า: new ItemStack(Items.ZOMBIE_HEAD).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected ItemStack getSkull() {
    return super.getSkull();
}

net.minecraft.world.entity.monster.Zombie#getSpawnAsBabyOdds(RandomSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:536
  • Modifiers: public static
  • Return: boolean

คืออะไร

อ่านค่า Spawn As Baby Odds

ทำงานยังไง

เรียกต่อ: nextFloat(). คืนค่า: randomSource.nextFloat() < 0.05F.

Parameters

  • RandomSource randomSource

ตัวอย่างใช้งาน

RandomSource randomSource = ...;
boolean result = Zombie.getSpawnAsBabyOdds(randomSource);

net.minecraft.world.entity.monster.Zombie#getStepSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:381
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Step Sound

ทำงานยังไง

คืนค่า: SoundEvents.ZOMBIE_STEP.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected SoundEvent getStepSound() {
    return super.getStepSound();
}

net.minecraft.world.entity.monster.Zombie#getType()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:390
  • Modifiers: public
  • Return: EntityType<? extends Zombie>

คืออะไร

อ่านค่า Type

ทำงานยังไง

คืนค่า: (EntityType<? extends Zombie>)super.getType().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Zombie instance = ...;
EntityType<? extends Zombie> result = instance.getType();

net.minecraft.world.entity.monster.Zombie#handleAttributes(float)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:540
  • Modifiers: protected
  • Return: void

คืออะไร

จัดการ Attributes

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: randomizeReinforcementsChance(), getAttribute(), addOrReplacePermanentModifier(), nextDouble(), nextFloat(), setCanBreakDoors(). สร้างออบเจ็กต์: AttributeModifier.

Parameters

  • float f

ตัวอย่างใช้งาน

@Override
protected void handleAttributes(float f) {
    super.handleAttributes(f);
}

net.minecraft.world.entity.monster.Zombie#hurtServer(ServerLevel,DamageSource,float)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:299
  • Modifiers: public
  • Return: boolean

คืออะไร

ประมวลผลความเสียหาย Server

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getTarget(), getEntity(), getDifficulty(), nextFloat(), getAttributeValue(), getGameRules(), getBoolean(), floor(). สร้างออบเจ็กต์: BlockPos, AttributeModifier. มีจุด return อย่างน้อย 3 จุด.

Parameters

  • ServerLevel serverLevel
  • DamageSource damageSource
  • float f

ตัวอย่างใช้งาน

Zombie instance = ...;
ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
boolean result = instance.hurtServer(serverLevel, damageSource, 0.0F);

net.minecraft.world.entity.monster.Zombie#isBaby()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:164
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Baby

ทำงานยังไง

เรียกต่อ: getEntityData(), get(). คืนค่า: this.getEntityData().get(DATA_BABY_ID).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Zombie instance = ...;
boolean result = instance.isBaby();

net.minecraft.world.entity.monster.Zombie#isSunSensitive()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:295
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Sun Sensitive

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected boolean isSunSensitive() {
    return super.isSunSensitive();
}

net.minecraft.world.entity.monster.Zombie#isUnderWaterConverting()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:139
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Under Water Converting

ทำงานยังไง

เรียกต่อ: getEntityData(), get(). คืนค่า: this.getEntityData().get(DATA_DROWNED_CONVERSION_ID).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Zombie instance = ...;
boolean result = instance.isUnderWaterConverting();

net.minecraft.world.entity.monster.Zombie#killedEntity(ServerLevel,LivingEntity)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:432
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ killedEntity ตาม implementation ของ Zombie

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getDifficulty(), nextBoolean(), convertVillagerToZombieVillager(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ServerLevel serverLevel
  • LivingEntity livingEntity

ตัวอย่างใช้งาน

Zombie instance = ...;
ServerLevel serverLevel = ...;
LivingEntity livingEntity = ...;
boolean result = instance.killedEntity(serverLevel, livingEntity);

net.minecraft.world.entity.monster.Zombie#onSyncedDataUpdated(EntityDataAccessor<?>)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:190
  • Modifiers: public
  • Return: void

คืออะไร

จัดการเหตุการณ์ Synced Data Updated

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: equals(), refreshDimensions().

Parameters

  • EntityDataAccessor<?> entityDataAccessor

ตัวอย่างใช้งาน

Zombie instance = ...;
EntityDataAccessor<?> entityDataAccessor = ...;
instance.onSyncedDataUpdated(entityDataAccessor);

net.minecraft.world.entity.monster.Zombie#playStepSound(BlockPos,BlockState)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:385
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ playStepSound ตาม implementation ของ Zombie

ทำงานยังไง

เรียกต่อ: playSound(), getStepSound().

Parameters

  • BlockPos blockPos
  • BlockState blockState

ตัวอย่างใช้งาน

BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected void playStepSound(BlockPos blockPos, BlockState blockState) {
    super.playStepSound(blockPos, blockState);
}

net.minecraft.world.entity.monster.Zombie#populateDefaultEquipmentSlots(RandomSource,DifficultyInstance)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:399
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ populateDefaultEquipmentSlots ตาม implementation ของ Zombie

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: nextFloat(), level(), getDifficulty(), nextInt(), setItemSlot(). สร้างออบเจ็กต์: ItemStack.

Parameters

  • RandomSource randomSource
  • DifficultyInstance difficultyInstance

ตัวอย่างใช้งาน

RandomSource randomSource = ...;
DifficultyInstance difficultyInstance = ...;
@Override
protected void populateDefaultEquipmentSlots(RandomSource randomSource, DifficultyInstance difficultyInstance) {
    super.populateDefaultEquipmentSlots(randomSource, difficultyInstance);
}

net.minecraft.world.entity.monster.Zombie#randomizeReinforcementsChance()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:561
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ randomizeReinforcementsChance ตาม implementation ของ Zombie

ทำงานยังไง

เรียกต่อ: getAttribute(), setBaseValue(), nextDouble().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected void randomizeReinforcementsChance() {
    super.randomizeReinforcementsChance();
}

net.minecraft.world.entity.monster.Zombie#readAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:421
  • Modifiers: public
  • Return: void

คืออะไร

อ่าน Additional Save Data

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: inWaterTime. เรียกต่อ: setBaby(), getBoolean(), setCanBreakDoors(), getInt(), contains(), startUnderWaterConversion().

Parameters

  • CompoundTag compoundTag

ตัวอย่างใช้งาน

Zombie instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.Zombie#registerGoals()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:103
  • Modifiers: protected
  • Return: void

คืออะไร

ลงทะเบียน Goals

ทำงานยังไง

เรียกต่อ: addGoal(), ZombieAttackTurtleEggGoal(), addBehaviourGoals(). สร้างออบเจ็กต์: Zombie.ZombieAttackTurtleEggGoal, LookAtPlayerGoal, RandomLookAroundGoal.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected void registerGoals() {
    super.registerGoals();
}

net.minecraft.world.entity.monster.Zombie#setBaby(boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:178
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Baby

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getEntityData(), set(), level(), getAttribute(), removeModifier(), addTransientModifier().

Parameters

  • boolean bl

ตัวอย่างใช้งาน

Zombie instance = ...;
instance.setBaby(true);

net.minecraft.world.entity.monster.Zombie#setCanBreakDoors(boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:147
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Can Break Doors

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: canBreakDoors. เรียกต่อ: hasGroundPathNavigation(), getNavigation(), setCanOpenDoors(), addGoal(), removeGoal().

Parameters

  • boolean bl

ตัวอย่างใช้งาน

Zombie instance = ...;
instance.setCanBreakDoors(true);

net.minecraft.world.entity.monster.Zombie#setConversionTime(int)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:531
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Conversion Time

ทำงานยังไง

แก้ state: conversionTime.

Parameters

  • int i

ตัวอย่างใช้งาน

Zombie instance = ...;
instance.setConversionTime(0);

net.minecraft.world.entity.monster.Zombie#setInWaterTime(int)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:526
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า In Water Time

ทำงานยังไง

แก้ state: inWaterTime.

Parameters

  • int i

ตัวอย่างใช้งาน

Zombie instance = ...;
instance.setInWaterTime(0);

net.minecraft.world.entity.monster.Zombie#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:203
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: conversionTime, inWaterTime. เรียกต่อ: level(), isAlive(), isNoAi(), isUnderWaterConverting(), doUnderWaterConversion(), convertsInWater(), isEyeInFluid(), startUnderWaterConversion().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Zombie instance = ...;
instance.tick();

net.minecraft.world.entity.monster.Zombie#wantsToPickUp(ServerLevel,ItemStack)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:458
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ wantsToPickUp ตาม implementation ของ Zombie

ทำงานยังไง

เรียกต่อ: is(). คืนค่า: itemStack.is(Items.GLOW_INK_SAC) ? false : super.wantsToPickUp(serverLevel, itemStack).

Parameters

  • ServerLevel serverLevel
  • ItemStack itemStack

ตัวอย่างใช้งาน

Zombie instance = ...;
ServerLevel serverLevel = ...;
ItemStack itemStack = ...;
boolean result = instance.wantsToPickUp(serverLevel, itemStack);

net.minecraft.world.entity.monster.Zombie#Zombie(EntityType<? extends Zombie>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:95
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ Zombie ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • EntityType<? extends Zombie> entityType
  • Level level

ตัวอย่างใช้งาน

EntityType<? extends Zombie> entityType = ...;
Level level = ...;
Zombie instance = new Zombie(entityType, level);

net.minecraft.world.entity.monster.Zombie#Zombie(Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:99
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ Zombie ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • Level level

ตัวอย่างใช้งาน

Level level = ...;
Zombie instance = new Zombie(level);

Zombie$ZombieGroupData

  • Full name: net.minecraft.world.entity.monster.Zombie$ZombieGroupData
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/Zombie.java
  • Type: class
  • Modifiers: public static
  • Implements: SpawnGroupData

net.minecraft.world.entity.monster.Zombie$ZombieGroupData#ZombieGroupData(boolean,boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/Zombie.java:606
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ Zombie.ZombieGroupData ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: isBaby, canSpawnJockey.

Parameters

  • boolean bl
  • boolean bl2

ตัวอย่างใช้งาน

Zombie.ZombieGroupData instance = new Zombie.ZombieGroupData(true, true);

ZombieVillager

  • Full name: net.minecraft.world.entity.monster.ZombieVillager
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/ZombieVillager.java
  • Type: class
  • Modifiers: public
  • Extends: Zombie
  • Implements: VillagerDataHolder

net.minecraft.world.entity.monster.ZombieVillager#addAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombieVillager.java:86
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Additional Save Data

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: encodeStart(), getVillagerData(), resultOrPartial(), ifPresent(), put(), registryAccess(), createSerializationContext(), getOrThrow().

Parameters

  • CompoundTag compoundTag

ตัวอย่างใช้งาน

ZombieVillager instance = ...;
CompoundTag compoundTag = ...;
instance.addAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.ZombieVillager#convertsInWater()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombieVillager.java:166
  • Modifiers: protected
  • Return: boolean

คืออะไร

ดำเนินการ convertsInWater ตาม implementation ของ ZombieVillager

ทำงานยังไง

คืนค่า: false.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected boolean convertsInWater() {
    return super.convertsInWater();
}

net.minecraft.world.entity.monster.ZombieVillager#defineSynchedData(SynchedEntityData.Builder)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombieVillager.java:79
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ defineSynchedData ตาม implementation ของ ZombieVillager

ทำงานยังไง

เรียกต่อ: define(). สร้างออบเจ็กต์: VillagerData.

Parameters

  • SynchedEntityData.Builder builder

ตัวอย่างใช้งาน

SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
    super.defineSynchedData(builder);
}

net.minecraft.world.entity.monster.ZombieVillager#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombieVillager.java:318
  • Modifiers: public
  • Return: SpawnGroupData

คืออะไร

ดำเนินการ finalizeSpawn ตาม implementation ของ ZombieVillager

ทำงานยังไง

เรียกต่อ: setVillagerData(), getVillagerData(), setType(), byBiome(), getBiome(), blockPosition(). คืนค่า: super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData).

Parameters

  • ServerLevelAccessor serverLevelAccessor
  • DifficultyInstance difficultyInstance
  • EntitySpawnReason entitySpawnReason
  • SpawnGroupData spawnGroupData

ตัวอย่างใช้งาน

ZombieVillager instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);

net.minecraft.world.entity.monster.ZombieVillager#getAmbientSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombieVillager.java:285
  • Modifiers: public
  • Return: SoundEvent

คืออะไร

อ่านค่า Ambient Sound

ทำงานยังไง

คืนค่า: SoundEvents.ZOMBIE_VILLAGER_AMBIENT.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ZombieVillager instance = ...;
SoundEvent result = instance.getAmbientSound();

net.minecraft.world.entity.monster.ZombieVillager#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombieVillager.java:295
  • Modifiers: public
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

คืนค่า: SoundEvents.ZOMBIE_VILLAGER_DEATH.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ZombieVillager instance = ...;
SoundEvent result = instance.getDeathSound();

net.minecraft.world.entity.monster.ZombieVillager#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombieVillager.java:290
  • Modifiers: public
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

คืนค่า: SoundEvents.ZOMBIE_VILLAGER_HURT.

Parameters

  • DamageSource damageSource

ตัวอย่างใช้งาน

ZombieVillager instance = ...;
DamageSource damageSource = ...;
SoundEvent result = instance.getHurtSound(damageSource);

net.minecraft.world.entity.monster.ZombieVillager#getSkull()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombieVillager.java:305
  • Modifiers: protected
  • Return: ItemStack

คืออะไร

อ่านค่า Skull

ทำงานยังไง

คืนค่า: ItemStack.EMPTY.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected ItemStack getSkull() {
    return super.getSkull();
}

net.minecraft.world.entity.monster.ZombieVillager#getStepSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombieVillager.java:300
  • Modifiers: public
  • Return: SoundEvent

คืออะไร

อ่านค่า Step Sound

ทำงานยังไง

คืนค่า: SoundEvents.ZOMBIE_VILLAGER_STEP.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ZombieVillager instance = ...;
SoundEvent result = instance.getStepSound();

net.minecraft.world.entity.monster.ZombieVillager#getVillagerData()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombieVillager.java:337
  • Modifiers: public
  • Return: VillagerData

คืออะไร

อ่านค่า Villager Data

ทำงานยังไง

เรียกต่อ: get(). คืนค่า: this.entityData.get(DATA_VILLAGER_DATA).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ZombieVillager instance = ...;
VillagerData result = instance.getVillagerData();

net.minecraft.world.entity.monster.ZombieVillager#getVillagerXp()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombieVillager.java:342
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Villager Xp

ทำงานยังไง

คืนค่า: this.villagerXp.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ZombieVillager instance = ...;
int result = instance.getVillagerXp();

net.minecraft.world.entity.monster.ZombieVillager#getVoicePitch()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombieVillager.java:280
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Voice Pitch

ทำงานยังไง

เรียกต่อ: isBaby(), nextFloat(). คืนค่า: this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 2.0F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ZombieVillager instance = ...;
float result = instance.getVoicePitch();

net.minecraft.world.entity.monster.ZombieVillager#handleEntityEvent(byte)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombieVillager.java:189
  • Modifiers: public
  • Return: void

คืออะไร

จัดการ Entity Event

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isSilent(), level(), playLocalSound(), getX(), getEyeY(), getZ(), getSoundSource(), nextFloat().

Parameters

  • byte b

ตัวอย่างใช้งาน

ZombieVillager instance = ...;
instance.handleEntityEvent(0);

net.minecraft.world.entity.monster.ZombieVillager#isConverting()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombieVillager.java:176
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Converting

ทำงานยังไง

เรียกต่อ: getEntityData(), get(). คืนค่า: this.getEntityData().get(DATA_CONVERTING_ID).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ZombieVillager instance = ...;
boolean result = instance.isConverting();

net.minecraft.world.entity.monster.ZombieVillager#mobInteract(Player,InteractionHand)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombieVillager.java:147
  • Modifiers: public
  • Return: InteractionResult

คืออะไร

ดำเนินการ mobInteract ตาม implementation ของ ZombieVillager

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getItemInHand(), is(), hasEffect(), consume(), level(), startConverting(), getUUID(), nextInt(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • Player player
  • InteractionHand interactionHand

ตัวอย่างใช้งาน

ZombieVillager instance = ...;
Player player = ...;
InteractionHand interactionHand = ...;
InteractionResult result = instance.mobInteract(player, interactionHand);

net.minecraft.world.entity.monster.ZombieVillager#readAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombieVillager.java:106
  • Modifiers: public
  • Return: void

คืออะไร

อ่าน Additional Save Data

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: tradeOffers, gossips, villagerXp. เรียกต่อ: contains(), parse(), get(), resultOrPartial(), ifPresent(), registryAccess(), createSerializationContext(), prefix(). สร้างออบเจ็กต์: Dynamic<>.

Parameters

  • CompoundTag compoundTag

ตัวอย่างใช้งาน

ZombieVillager instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.ZombieVillager#removeWhenFarAway(double)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombieVillager.java:171
  • Modifiers: public
  • Return: boolean

คืออะไร

ลบ When Far Away

ทำงานยังไง

แก้ state: villagerXp. เรียกต่อ: isConverting(). คืนค่า: !this.isConverting() && this.villagerXp == 0.

Parameters

  • double d

ตัวอย่างใช้งาน

ZombieVillager instance = ...;
boolean result = instance.removeWhenFarAway(0.0D);

net.minecraft.world.entity.monster.ZombieVillager#setGossips(Tag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombieVillager.java:314
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Gossips

ทำงานยังไง

แก้ state: gossips.

Parameters

  • Tag tag

ตัวอย่างใช้งาน

ZombieVillager instance = ...;
Tag tag = ...;
instance.setGossips(tag);

net.minecraft.world.entity.monster.ZombieVillager#setTradeOffers(MerchantOffers)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombieVillager.java:310
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Trade Offers

ทำงานยังไง

แก้ state: tradeOffers.

Parameters

  • MerchantOffers merchantOffers

ตัวอย่างใช้งาน

ZombieVillager instance = ...;
MerchantOffers merchantOffers = ...;
instance.setTradeOffers(merchantOffers);

net.minecraft.world.entity.monster.ZombieVillager#setVillagerConversionTime(int)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombieVillager.java:250
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Villager Conversion Time

ทำงานยังไง

แก้ state: villagerConversionTime.

Parameters

  • int i

ตัวอย่างใช้งาน

ZombieVillager instance = ...;
instance.setVillagerConversionTime(0);

net.minecraft.world.entity.monster.ZombieVillager#setVillagerData(VillagerData)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombieVillager.java:327
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Villager Data

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: tradeOffers. เรียกต่อ: getVillagerData(), getProfession(), set().

Parameters

  • VillagerData villagerData

ตัวอย่างใช้งาน

ZombieVillager instance = ...;
VillagerData villagerData = ...;
instance.setVillagerData(villagerData);

net.minecraft.world.entity.monster.ZombieVillager#setVillagerXp(int)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombieVillager.java:346
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Villager Xp

ทำงานยังไง

แก้ state: villagerXp.

Parameters

  • int i

ตัวอย่างใช้งาน

ZombieVillager instance = ...;
instance.setVillagerXp(0);

net.minecraft.world.entity.monster.ZombieVillager#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombieVillager.java:134
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: villagerConversionTime. เรียกต่อ: level(), isAlive(), isConverting(), getConversionProgress(), finishConversion().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ZombieVillager instance = ...;
instance.tick();

net.minecraft.world.entity.monster.ZombieVillager#ZombieVillager(EntityType<? extends ZombieVillager>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombieVillager.java:72
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ ZombieVillager ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

เรียกต่อ: getRandom(), ifPresent(), setVillagerData(), getVillagerData(), setProfession(), value().

Parameters

  • EntityType<? extends ZombieVillager> entityType
  • Level level

ตัวอย่างใช้งาน

EntityType<? extends ZombieVillager> entityType = ...;
Level level = ...;
ZombieVillager instance = new ZombieVillager(entityType, level);

ZombifiedPiglin

  • Full name: net.minecraft.world.entity.monster.ZombifiedPiglin
  • Package: net.minecraft.world.entity.monster
  • Source: commonnet/minecraft/world/entity/monster/ZombifiedPiglin.java
  • Type: class
  • Modifiers: public
  • Extends: Zombie
  • Implements: NeutralMob

net.minecraft.world.entity.monster.ZombifiedPiglin#addAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombifiedPiglin.java:185
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Additional Save Data

ทำงานยังไง

เรียกต่อ: addPersistentAngerSaveData().

Parameters

  • CompoundTag compoundTag

ตัวอย่างใช้งาน

ZombifiedPiglin instance = ...;
CompoundTag compoundTag = ...;
instance.addAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.ZombifiedPiglin#addBehaviourGoals()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombifiedPiglin.java:70
  • Modifiers: protected
  • Return: void

คืออะไร

เพิ่ม Behaviour Goals

ทำงานยังไง

เรียกต่อ: addGoal(), setAlertOthers(). สร้างออบเจ็กต์: ZombieAttackGoal, WaterAvoidingRandomStrollGoal, HurtByTargetGoal, NearestAttackableTargetGoal<>.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected void addBehaviourGoals() {
    super.addBehaviourGoals();
}

net.minecraft.world.entity.monster.ZombifiedPiglin#checkSpawnObstruction(LevelReader)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombifiedPiglin.java:180
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบ Spawn Obstruction

ทำงานยังไง

เรียกต่อ: isUnobstructed(), containsAnyLiquid(), getBoundingBox(). คืนค่า: levelReader.isUnobstructed(this) && !levelReader.containsAnyLiquid(this.getBoundingBox()).

Parameters

  • LevelReader levelReader

ตัวอย่างใช้งาน

ZombifiedPiglin instance = ...;
LevelReader levelReader = ...;
boolean result = instance.checkSpawnObstruction(levelReader);

net.minecraft.world.entity.monster.ZombifiedPiglin#checkZombifiedPiglinSpawnRules(EntityType<ZombifiedPiglin>,LevelAccessor,EntitySpawnReason,BlockPos,RandomSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombifiedPiglin.java:174
  • Modifiers: public static
  • Return: boolean

คืออะไร

ตรวจสอบ Zombified Piglin Spawn Rules

ทำงานยังไง

เรียกต่อ: getDifficulty(), getBlockState(), below(), is(). คืนค่า: levelAccessor.getDifficulty() != Difficulty.PEACEFUL && !levelAccessor.getBlockState(blockPos.below()).is(Blocks.NETHER_WART_BLOCK).

Parameters

  • EntityType<ZombifiedPiglin> entityType
  • LevelAccessor levelAccessor
  • EntitySpawnReason entitySpawnReason
  • BlockPos blockPos
  • RandomSource randomSource

ตัวอย่างใช้งาน

EntityType<ZombifiedPiglin> entityType = ...;
LevelAccessor levelAccessor = ...;
EntitySpawnReason entitySpawnReason = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
boolean result = ZombifiedPiglin.checkZombifiedPiglinSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource);

net.minecraft.world.entity.monster.ZombifiedPiglin#convertsInWater()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombifiedPiglin.java:88
  • Modifiers: protected
  • Return: boolean

คืออะไร

ดำเนินการ convertsInWater ตาม implementation ของ ZombifiedPiglin

ทำงานยังไง

คืนค่า: false.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected boolean convertsInWater() {
    return super.convertsInWater();
}

net.minecraft.world.entity.monster.ZombifiedPiglin#createAttributes()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombifiedPiglin.java:79
  • Modifiers: public static
  • Return: AttributeSupplier.Builder

คืออะไร

สร้าง Attributes

ทำงานยังไง

เรียกต่อ: add(). คืนค่า: Zombie.createAttributes().add(Attributes.SPAWN_REINFORCEMENTS_CHANCE, 0.0).add(Attributes.MOVEMENT_SPEED, 0.23F).add(Attributes.ATTACK_DAMAGE, 5.0).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

AttributeSupplier.Builder result = ZombifiedPiglin.createAttributes();

net.minecraft.world.entity.monster.ZombifiedPiglin#customServerAiStep(ServerLevel)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombifiedPiglin.java:93
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ customServerAiStep ตาม implementation ของ ZombifiedPiglin

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: lastHurtByPlayerTime. เรียกต่อ: getAttribute(), isAngry(), isBaby(), hasModifier(), addTransientModifier(), maybePlayFirstAngerSound(), removeModifier(), updatePersistentAnger().

Parameters

  • ServerLevel serverLevel

ตัวอย่างใช้งาน

ServerLevel serverLevel = ...;
@Override
protected void customServerAiStep(ServerLevel serverLevel) {
    super.customServerAiStep(serverLevel);
}

net.minecraft.world.entity.monster.ZombifiedPiglin#getAmbientSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombifiedPiglin.java:207
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Ambient Sound

ทำงานยังไง

เรียกต่อ: isAngry(). คืนค่า: this.isAngry() ? SoundEvents.ZOMBIFIED_PIGLIN_ANGRY : SoundEvents.ZOMBIFIED_PIGLIN_AMBIENT.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected SoundEvent getAmbientSound() {
    return super.getAmbientSound();
}

net.minecraft.world.entity.monster.ZombifiedPiglin#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombifiedPiglin.java:217
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

คืนค่า: SoundEvents.ZOMBIFIED_PIGLIN_DEATH.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.monster.ZombifiedPiglin#getDefaultDimensions(Pose)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombifiedPiglin.java:83
  • Modifiers: public
  • Return: EntityDimensions

คืออะไร

อ่านค่า Default Dimensions

ทำงานยังไง

เรียกต่อ: isBaby(). คืนค่า: this.isBaby() ? BABY_DIMENSIONS : super.getDefaultDimensions(pose).

Parameters

  • Pose pose

ตัวอย่างใช้งาน

ZombifiedPiglin instance = ...;
Pose pose = ...;
EntityDimensions result = instance.getDefaultDimensions(pose);

net.minecraft.world.entity.monster.ZombifiedPiglin#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombifiedPiglin.java:212
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

คืนค่า: SoundEvents.ZOMBIFIED_PIGLIN_HURT.

Parameters

  • DamageSource damageSource

ตัวอย่างใช้งาน

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

net.minecraft.world.entity.monster.ZombifiedPiglin#getPersistentAngerTarget()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombifiedPiglin.java:237
  • Modifiers: public
  • Return: UUID

คืออะไร

อ่านค่า Persistent Anger Target

ทำงานยังไง

คืนค่า: this.persistentAngerTarget.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ZombifiedPiglin instance = ...;
UUID result = instance.getPersistentAngerTarget();

net.minecraft.world.entity.monster.ZombifiedPiglin#getRemainingPersistentAngerTime()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombifiedPiglin.java:202
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Remaining Persistent Anger Time

ทำงานยังไง

คืนค่า: this.remainingPersistentAngerTime.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ZombifiedPiglin instance = ...;
int result = instance.getRemainingPersistentAngerTime();

net.minecraft.world.entity.monster.ZombifiedPiglin#getSkull()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombifiedPiglin.java:227
  • Modifiers: protected
  • Return: ItemStack

คืออะไร

อ่านค่า Skull

ทำงานยังไง

คืนค่า: ItemStack.EMPTY.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected ItemStack getSkull() {
    return super.getSkull();
}

net.minecraft.world.entity.monster.ZombifiedPiglin#isPreventingPlayerRest(ServerLevel,Player)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombifiedPiglin.java:243
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Preventing Player Rest

ทำงานยังไง

เรียกต่อ: isAngryAt(). คืนค่า: this.isAngryAt(player, serverLevel).

Parameters

  • ServerLevel serverLevel
  • Player player

ตัวอย่างใช้งาน

ZombifiedPiglin instance = ...;
ServerLevel serverLevel = ...;
Player player = ...;
boolean result = instance.isPreventingPlayerRest(serverLevel, player);

net.minecraft.world.entity.monster.ZombifiedPiglin#populateDefaultEquipmentSlots(RandomSource,DifficultyInstance)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombifiedPiglin.java:222
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ populateDefaultEquipmentSlots ตาม implementation ของ ZombifiedPiglin

ทำงานยังไง

เรียกต่อ: setItemSlot(). สร้างออบเจ็กต์: ItemStack.

Parameters

  • RandomSource randomSource
  • DifficultyInstance difficultyInstance

ตัวอย่างใช้งาน

RandomSource randomSource = ...;
DifficultyInstance difficultyInstance = ...;
@Override
protected void populateDefaultEquipmentSlots(RandomSource randomSource, DifficultyInstance difficultyInstance) {
    super.populateDefaultEquipmentSlots(randomSource, difficultyInstance);
}

net.minecraft.world.entity.monster.ZombifiedPiglin#randomizeReinforcementsChance()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombifiedPiglin.java:232
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ randomizeReinforcementsChance ตาม implementation ของ ZombifiedPiglin

ทำงานยังไง

เรียกต่อ: getAttribute(), setBaseValue().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected void randomizeReinforcementsChance() {
    super.randomizeReinforcementsChance();
}

net.minecraft.world.entity.monster.ZombifiedPiglin#readAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombifiedPiglin.java:191
  • Modifiers: public
  • Return: void

คืออะไร

อ่าน Additional Save Data

ทำงานยังไง

เรียกต่อ: readPersistentAngerSaveData(), level().

Parameters

  • CompoundTag compoundTag

ตัวอย่างใช้งาน

ZombifiedPiglin instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);

net.minecraft.world.entity.monster.ZombifiedPiglin#setPersistentAngerTarget(UUID)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombifiedPiglin.java:65
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Persistent Anger Target

ทำงานยังไง

แก้ state: persistentAngerTarget.

Parameters

  • UUID uUID

ตัวอย่างใช้งาน

ZombifiedPiglin instance = ...;
UUID uUID = ...;
instance.setPersistentAngerTarget(uUID);

net.minecraft.world.entity.monster.ZombifiedPiglin#setRemainingPersistentAngerTime(int)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombifiedPiglin.java:197
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Remaining Persistent Anger Time

ทำงานยังไง

แก้ state: remainingPersistentAngerTime.

Parameters

  • int i

ตัวอย่างใช้งาน

ZombifiedPiglin instance = ...;
instance.setRemainingPersistentAngerTime(0);

net.minecraft.world.entity.monster.ZombifiedPiglin#setTarget(LivingEntity)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombifiedPiglin.java:155
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Target

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: playFirstAngerSoundIn, ticksUntilNextAlert. เรียกต่อ: getTarget(), sample(), setLastHurtByPlayer().

Parameters

  • LivingEntity livingEntity

ตัวอย่างใช้งาน

ZombifiedPiglin instance = ...;
LivingEntity livingEntity = ...;
instance.setTarget(livingEntity);

net.minecraft.world.entity.monster.ZombifiedPiglin#startPersistentAngerTimer()

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombifiedPiglin.java:169
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม Persistent Anger Timer

ทำงานยังไง

เรียกต่อ: setRemainingPersistentAngerTime(), sample().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ZombifiedPiglin instance = ...;
instance.startPersistentAngerTimer();

net.minecraft.world.entity.monster.ZombifiedPiglin#wantsToPickUp(ServerLevel,ItemStack)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombifiedPiglin.java:248
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ wantsToPickUp ตาม implementation ของ ZombifiedPiglin

ทำงานยังไง

เรียกต่อ: canHoldItem(). คืนค่า: this.canHoldItem(itemStack).

Parameters

  • ServerLevel serverLevel
  • ItemStack itemStack

ตัวอย่างใช้งาน

ZombifiedPiglin instance = ...;
ServerLevel serverLevel = ...;
ItemStack itemStack = ...;
boolean result = instance.wantsToPickUp(serverLevel, itemStack);

net.minecraft.world.entity.monster.ZombifiedPiglin#ZombifiedPiglin(EntityType<? extends ZombifiedPiglin>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/monster/ZombifiedPiglin.java:60
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ ZombifiedPiglin ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

เรียกต่อ: setPathfindingMalus().

Parameters

  • EntityType<? extends ZombifiedPiglin> entityType
  • Level level

ตัวอย่างใช้งาน

EntityType<? extends ZombifiedPiglin> entityType = ...;
Level level = ...;
ZombifiedPiglin instance = new ZombifiedPiglin(entityType, level);