Package net.minecraft.world.entity.animal
Part 1/1
AbstractFish
- Full name:
net.minecraft.world.entity.animal.AbstractFish - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/AbstractFish.java - Type:
class - Modifiers:
public abstract - Extends:
WaterAnimal - Implements:
Bucketable
net.minecraft.world.entity.animal.AbstractFish#AbstractFish(EntityType<? extends AbstractFish>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractFish.java:35 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ AbstractFish ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: moveControl. เรียกต่อ: FishMoveControl(). สร้างออบเจ็กต์: AbstractFish.FishMoveControl.
Parameters
EntityType<? extends AbstractFish> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends AbstractFish> entityType = ...;
Level level = ...;
AbstractFish instance = new AbstractFish(entityType, level);
net.minecraft.world.entity.animal.AbstractFish#addAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractFish.java:75 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Additional Save Data
ทำงานยังไง
เรียกต่อ: putBoolean(), fromBucket().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
AbstractFish instance = ...;
CompoundTag compoundTag = ...;
instance.addAdditionalSaveData(compoundTag);
net.minecraft.world.entity.animal.AbstractFish#aiStep()
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractFish.java:114 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ aiStep ตาม implementation ของ AbstractFish
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: hasImpulse. เรียกต่อ: isInWater(), onGround(), setDeltaMovement(), getDeltaMovement(), add(), nextFloat(), setOnGround(), makeSound().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.AbstractFish#canRandomSwim()
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractFish.java:146 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Random Swim
ทำงานยังไง
คืนค่า: true.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.AbstractFish#createAttributes()
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractFish.java:40 - Modifiers:
public static - Return:
AttributeSupplier.Builder
คืออะไร
สร้าง Attributes
ทำงานยังไง
เรียกต่อ: createMobAttributes(), add(). คืนค่า: Mob.createMobAttributes().add(Attributes.MAX_HEALTH, 3.0).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.AbstractFish#createNavigation(Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractFish.java:95 - 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.animal.AbstractFish#defineSynchedData(SynchedEntityData.Builder)
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractFish.java:59 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ defineSynchedData ตาม implementation ของ AbstractFish
ทำงานยังไง
เรียกต่อ: define().
Parameters
SynchedEntityData.Builder builder
ตัวอย่างใช้งาน
SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder);
}
net.minecraft.world.entity.animal.AbstractFish#fromBucket()
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractFish.java:65 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ fromBucket ตาม implementation ของ AbstractFish
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: this.entityData.get(FROM_BUCKET).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.AbstractFish#getFlopSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractFish.java:150 - Modifiers:
protected abstract - Return:
SoundEvent
คืออะไร
อ่านค่า Flop Sound
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.AbstractFish#getMaxSpawnClusterSize()
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractFish.java:54 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Max Spawn Cluster Size
ทำงานยังไง
คืนค่า: 8.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.AbstractFish#getPickupSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractFish.java:141 - Modifiers:
public - Return:
SoundEvent
คืออะไร
อ่านค่า Pickup Sound
ทำงานยังไง
คืนค่า: SoundEvents.BUCKET_FILL_FISH.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.AbstractFish#getSwimSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractFish.java:152 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Swim Sound
ทำงานยังไง
คืนค่า: SoundEvents.FISH_SWIM.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.AbstractFish#loadFromBucketTag(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractFish.java:136 - Modifiers:
public - Return:
void
คืออะไร
โหลด From Bucket Tag
ทำงานยังไง
เรียกต่อ: loadDefaultDataFromBucketTag().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
AbstractFish instance = ...;
CompoundTag compoundTag = ...;
instance.loadFromBucketTag(compoundTag);
net.minecraft.world.entity.animal.AbstractFish#mobInteract(Player,InteractionHand)
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractFish.java:126 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ดำเนินการ mobInteract ตาม implementation ของ AbstractFish
ทำงานยังไง
เรียกต่อ: bucketMobPickup(), orElse(). คืนค่า: Bucketable.bucketMobPickup(player, interactionHand, this).orElse(super.mobInteract(player, interactionHand)).
Parameters
Player playerInteractionHand interactionHand
ตัวอย่างใช้งาน
Player player = ...;
InteractionHand interactionHand = ...;
@Override
protected InteractionResult mobInteract(Player player, InteractionHand interactionHand) {
return super.mobInteract(player, interactionHand);
}
net.minecraft.world.entity.animal.AbstractFish#playStepSound(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractFish.java:157 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ playStepSound ตาม implementation ของ AbstractFish
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected void playStepSound(BlockPos blockPos, BlockState blockState) {
super.playStepSound(blockPos, blockState);
}
net.minecraft.world.entity.animal.AbstractFish#readAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractFish.java:81 - Modifiers:
public - Return:
void
คืออะไร
อ่าน Additional Save Data
ทำงานยังไง
เรียกต่อ: setFromBucket(), getBoolean().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
AbstractFish instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);
net.minecraft.world.entity.animal.AbstractFish#registerGoals()
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractFish.java:87 - Modifiers:
protected - Return:
void
คืออะไร
ลงทะเบียน Goals
ทำงานยังไง
เรียกต่อ: addGoal(), FishSwimGoal(). สร้างออบเจ็กต์: PanicGoal, AvoidEntityGoal<>, AbstractFish.FishSwimGoal.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.AbstractFish#removeWhenFarAway(double)
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractFish.java:49 - Modifiers:
public - Return:
boolean
คืออะไร
ลบ When Far Away
ทำงานยังไง
เรียกต่อ: fromBucket(), hasCustomName(). คืนค่า: !this.fromBucket() && !this.hasCustomName().
Parameters
double d
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.AbstractFish#requiresCustomPersistence()
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractFish.java:44 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ requiresCustomPersistence ตาม implementation ของ AbstractFish
ทำงานยังไง
เรียกต่อ: fromBucket(). คืนค่า: super.requiresCustomPersistence() || this.fromBucket().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.AbstractFish#saveToBucketTag(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractFish.java:131 - Modifiers:
public - Return:
void
คืออะไร
บันทึก To Bucket Tag
ทำงานยังไง
เรียกต่อ: saveDefaultDataToBucketTag().
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.AbstractFish#setFromBucket(boolean)
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractFish.java:70 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า From Bucket
ทำงานยังไง
เรียกต่อ: set().
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.AbstractFish#travel(Vec3)
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractFish.java:100 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ travel ตาม implementation ของ AbstractFish
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isControlledByLocalInstance(), isInWater(), moveRelative(), move(), getDeltaMovement(), setDeltaMovement(), scale(), getTarget().
Parameters
Vec3 vec3
ตัวอย่างใช้งาน
AbstractGolem
- Full name:
net.minecraft.world.entity.animal.AbstractGolem - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/AbstractGolem.java - Type:
class - Modifiers:
public abstract - Extends:
PathfinderMob
net.minecraft.world.entity.animal.AbstractGolem#AbstractGolem(EntityType<? extends AbstractGolem>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractGolem.java:11 - Modifiers:
protected - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ AbstractGolem ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
EntityType<? extends AbstractGolem> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends AbstractGolem> entityType = ...;
Level level = ...;
AbstractGolem instance = new AbstractGolem(entityType, level);
net.minecraft.world.entity.animal.AbstractGolem#getAmbientSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractGolem.java:15 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Ambient Sound
ทำงานยังไง
คืนค่า: null.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.AbstractGolem#getAmbientSoundInterval()
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractGolem.java:33 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Ambient Sound Interval
ทำงานยังไง
คืนค่า: 120.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.AbstractGolem#getDeathSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractGolem.java:27 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Death Sound
ทำงานยังไง
คืนค่า: null.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.AbstractGolem#getHurtSound(DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractGolem.java:21 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Hurt Sound
ทำงานยังไง
คืนค่า: null.
Parameters
DamageSource damageSource
ตัวอย่างใช้งาน
DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
return super.getHurtSound(damageSource);
}
net.minecraft.world.entity.animal.AbstractGolem#removeWhenFarAway(double)
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractGolem.java:38 - Modifiers:
public - Return:
boolean
คืออะไร
ลบ When Far Away
ทำงานยังไง
คืนค่า: false.
Parameters
double d
ตัวอย่างใช้งาน
AbstractSchoolingFish
- Full name:
net.minecraft.world.entity.animal.AbstractSchoolingFish - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/AbstractSchoolingFish.java - Type:
class - Modifiers:
public abstract - Extends:
AbstractFish
net.minecraft.world.entity.animal.AbstractSchoolingFish#AbstractSchoolingFish(EntityType<? extends AbstractSchoolingFish>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractSchoolingFish.java:19 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ AbstractSchoolingFish ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
EntityType<? extends AbstractSchoolingFish> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends AbstractSchoolingFish> entityType = ...;
Level level = ...;
AbstractSchoolingFish instance = new AbstractSchoolingFish(entityType, level);
net.minecraft.world.entity.animal.AbstractSchoolingFish#addFollowers(Stream<? extends AbstractSchoolingFish>)
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractSchoolingFish.java:96 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Followers
ทำงานยังไง
เรียกต่อ: limit(), getMaxSchoolSize(), filter(), forEach(), startFollowing().
Parameters
Stream<? extends AbstractSchoolingFish> stream
ตัวอย่างใช้งาน
AbstractSchoolingFish instance = ...;
Stream<? extends AbstractSchoolingFish> stream = ...;
instance.addFollowers(stream);
net.minecraft.world.entity.animal.AbstractSchoolingFish#canBeFollowed()
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractSchoolingFish.java:66 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Be Followed
ทำงานยังไง
เรียกต่อ: hasFollowers(), getMaxSchoolSize(). คืนค่า: this.hasFollowers() && this.schoolSize < this.getMaxSchoolSize().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.AbstractSchoolingFish#canRandomSwim()
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractSchoolingFish.java:38 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Random Swim
ทำงานยังไง
เรียกต่อ: isFollower(). คืนค่า: !this.isFollower().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.AbstractSchoolingFish#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractSchoolingFish.java:102 - Modifiers:
public - Return:
SpawnGroupData
คืออะไร
ดำเนินการ finalizeSpawn ตาม implementation ของ AbstractSchoolingFish
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: SchoolSpawnGroupData(), startFollowing(). สร้างออบเจ็กต์: AbstractSchoolingFish.SchoolSpawnGroupData. คืนค่า: spawnGroupData.
Parameters
ServerLevelAccessor serverLevelAccessorDifficultyInstance difficultyInstanceEntitySpawnReason entitySpawnReasonSpawnGroupData spawnGroupData
ตัวอย่างใช้งาน
AbstractSchoolingFish instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);
net.minecraft.world.entity.animal.AbstractSchoolingFish#getMaxSchoolSize()
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractSchoolingFish.java:34 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Max School Size
ทำงานยังไง
เรียกต่อ: getMaxSpawnClusterSize(). คืนค่า: super.getMaxSpawnClusterSize().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.AbstractSchoolingFish#getMaxSpawnClusterSize()
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractSchoolingFish.java:29 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Max Spawn Cluster Size
ทำงานยังไง
เรียกต่อ: getMaxSchoolSize(). คืนค่า: this.getMaxSchoolSize().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.AbstractSchoolingFish#hasFollowers()
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractSchoolingFish.java:82 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Followers
ทำงานยังไง
คืนค่า: this.schoolSize > 1.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.AbstractSchoolingFish#inRangeOfLeader()
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractSchoolingFish.java:86 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ inRangeOfLeader ตาม implementation ของ AbstractSchoolingFish
ทำงานยังไง
เรียกต่อ: distanceToSqr(). คืนค่า: this.distanceToSqr(this.leader) <= 121.0.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.AbstractSchoolingFish#isFollower()
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractSchoolingFish.java:43 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Follower
ทำงานยังไง
เรียกต่อ: isAlive(). คืนค่า: this.leader != null && this.leader.isAlive().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.AbstractSchoolingFish#pathToLeader()
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractSchoolingFish.java:90 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ pathToLeader ตาม implementation ของ AbstractSchoolingFish
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isFollower(), getNavigation(), moveTo().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.AbstractSchoolingFish#registerGoals()
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractSchoolingFish.java:23 - Modifiers:
protected - Return:
void
คืออะไร
ลงทะเบียน Goals
ทำงานยังไง
เรียกต่อ: addGoal(). สร้างออบเจ็กต์: FollowFlockLeaderGoal.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.AbstractSchoolingFish#startFollowing(AbstractSchoolingFish)
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractSchoolingFish.java:47 - Modifiers:
public - Return:
AbstractSchoolingFish
คืออะไร
เริ่ม Following
ทำงานยังไง
แก้ state: leader. เรียกต่อ: addFollower(). คืนค่า: abstractSchoolingFish.
Parameters
AbstractSchoolingFish abstractSchoolingFish
ตัวอย่างใช้งาน
AbstractSchoolingFish instance = ...;
AbstractSchoolingFish abstractSchoolingFish = ...;
AbstractSchoolingFish result = instance.startFollowing(abstractSchoolingFish);
net.minecraft.world.entity.animal.AbstractSchoolingFish#stopFollowing()
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractSchoolingFish.java:53 - Modifiers:
public - Return:
void
คืออะไร
หยุด Following
ทำงานยังไง
แก้ state: leader. เรียกต่อ: removeFollower().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.AbstractSchoolingFish#tick()
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractSchoolingFish.java:70 - Modifiers:
public - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: schoolSize. เรียกต่อ: hasFollowers(), level(), nextInt(), getEntitiesOfClass(), getClass(), getBoundingBox(), inflate(), size().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
AbstractSchoolingFish$SchoolSpawnGroupData
- Full name:
net.minecraft.world.entity.animal.AbstractSchoolingFish$SchoolSpawnGroupData - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/AbstractSchoolingFish.java - Type:
class - Modifiers:
public static - Implements:
SpawnGroupData
net.minecraft.world.entity.animal.AbstractSchoolingFish$SchoolSpawnGroupData#SchoolSpawnGroupData(AbstractSchoolingFish)
- Origin:
common - Source:
net/minecraft/world/entity/animal/AbstractSchoolingFish.java:120 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ AbstractSchoolingFish.SchoolSpawnGroupData ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: leader.
Parameters
AbstractSchoolingFish abstractSchoolingFish
ตัวอย่างใช้งาน
AbstractSchoolingFish abstractSchoolingFish = ...;
AbstractSchoolingFish.SchoolSpawnGroupData instance = new AbstractSchoolingFish.SchoolSpawnGroupData(abstractSchoolingFish);
AgeableWaterCreature
- Full name:
net.minecraft.world.entity.animal.AgeableWaterCreature - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/AgeableWaterCreature.java - Type:
class - Modifiers:
public abstract - Extends:
AgeableMob
net.minecraft.world.entity.animal.AgeableWaterCreature#AgeableWaterCreature(EntityType<? extends AgeableWaterCreature>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/AgeableWaterCreature.java:17 - Modifiers:
protected - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ AgeableWaterCreature ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: setPathfindingMalus().
Parameters
EntityType<? extends AgeableWaterCreature> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends AgeableWaterCreature> entityType = ...;
Level level = ...;
AgeableWaterCreature instance = new AgeableWaterCreature(entityType, level);
net.minecraft.world.entity.animal.AgeableWaterCreature#baseTick()
- Origin:
common - Source:
net/minecraft/world/entity/animal/AgeableWaterCreature.java:49 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ baseTick ตาม implementation ของ AgeableWaterCreature
ทำงานยังไง
เรียกต่อ: getAirSupply(), handleAirSupply().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.AgeableWaterCreature#canBeLeashed()
- Origin:
common - Source:
net/minecraft/world/entity/animal/AgeableWaterCreature.java:61 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Be Leashed
ทำงานยังไง
คืนค่า: false.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.AgeableWaterCreature#checkSpawnObstruction(LevelReader)
- Origin:
common - Source:
net/minecraft/world/entity/animal/AgeableWaterCreature.java:22 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบ Spawn Obstruction
ทำงานยังไง
เรียกต่อ: isUnobstructed(). คืนค่า: levelReader.isUnobstructed(this).
Parameters
LevelReader levelReader
ตัวอย่างใช้งาน
AgeableWaterCreature instance = ...;
LevelReader levelReader = ...;
boolean result = instance.checkSpawnObstruction(levelReader);
net.minecraft.world.entity.animal.AgeableWaterCreature#checkSurfaceAgeableWaterCreatureSpawnRules(EntityType<? extends AgeableWaterCreature>,LevelAccessor,EntitySpawnReason,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/AgeableWaterCreature.java:66 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบ Surface Ageable Water Creature Spawn Rules
ทำงานยังไง
เรียกต่อ: getSeaLevel(), getY(), getFluidState(), below(), is(), getBlockState(), above().
Parameters
EntityType<? extends AgeableWaterCreature> entityTypeLevelAccessor levelAccessorEntitySpawnReason entitySpawnReasonBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
EntityType<? extends AgeableWaterCreature> entityType = ...;
LevelAccessor levelAccessor = ...;
EntitySpawnReason entitySpawnReason = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
boolean result = AgeableWaterCreature.checkSurfaceAgeableWaterCreatureSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource);
net.minecraft.world.entity.animal.AgeableWaterCreature#getAmbientSoundInterval()
- Origin:
common - Source:
net/minecraft/world/entity/animal/AgeableWaterCreature.java:27 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Ambient Sound Interval
ทำงานยังไง
คืนค่า: 120.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.AgeableWaterCreature#getBaseExperienceReward(ServerLevel)
- Origin:
common - Source:
net/minecraft/world/entity/animal/AgeableWaterCreature.java:32 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Base Experience Reward
ทำงานยังไง
เรียกต่อ: nextInt(). คืนค่า: 1 + this.random.nextInt(3).
Parameters
ServerLevel serverLevel
ตัวอย่างใช้งาน
AgeableWaterCreature instance = ...;
ServerLevel serverLevel = ...;
int result = instance.getBaseExperienceReward(serverLevel);
net.minecraft.world.entity.animal.AgeableWaterCreature#handleAirSupply(int)
- Origin:
common - Source:
net/minecraft/world/entity/animal/AgeableWaterCreature.java:37 - Modifiers:
protected - Return:
void
คืออะไร
จัดการ Air Supply
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isAlive(), isInWaterOrBubble(), setAirSupply(), getAirSupply(), hurt(), damageSources(), drown().
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.AgeableWaterCreature#isPushedByFluid()
- Origin:
common - Source:
net/minecraft/world/entity/animal/AgeableWaterCreature.java:56 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pushed By Fluid
ทำงานยังไง
คืนค่า: false.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
Animal
- Full name:
net.minecraft.world.entity.animal.Animal - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Animal.java - Type:
class - Modifiers:
public abstract - Extends:
AgeableMob
net.minecraft.world.entity.animal.Animal#actuallyHurt(ServerLevel,DamageSource,float)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Animal.java:80 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ actuallyHurt ตาม implementation ของ Animal
ทำงานยังไง
เรียกต่อ: resetLove().
Parameters
ServerLevel serverLevelDamageSource damageSourcefloat f
ตัวอย่างใช้งาน
ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
@Override
protected void actuallyHurt(ServerLevel serverLevel, DamageSource damageSource, float f) {
super.actuallyHurt(serverLevel, damageSource, f);
}
net.minecraft.world.entity.animal.Animal#addAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Animal.java:91 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Additional Save Data
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: putInt(), putUUID().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Animal#aiStep()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Animal.java:62 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ aiStep ตาม implementation ของ Animal
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: inLove. เรียกต่อ: getAge(), nextGaussian(), level(), addParticle(), getRandomX(), getRandomY(), getRandomZ().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Animal#Animal(EntityType<? extends Animal>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Animal.java:43 - Modifiers:
protected - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ Animal ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: setPathfindingMalus().
Parameters
EntityType<? extends Animal> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends Animal> entityType = ...;
Level level = ...;
Animal instance = new Animal(entityType, level);
net.minecraft.world.entity.animal.Animal#canFallInLove()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Animal.java:175 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Fall In Love
ทำงานยังไง
คืนค่า: this.inLove <= 0.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Animal#canMate(Animal)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Animal.java:214 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Mate
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getClass(), isInLove(). มีจุด return อย่างน้อย 2 จุด.
Parameters
Animal animal
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Animal#checkAnimalSpawnRules(EntityType<? extends Animal>,LevelAccessor,EntitySpawnReason,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Animal.java:107 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบ Animal Spawn Rules
ทำงานยังไง
เรียกต่อ: ignoresLightRequirements(), isBrightEnoughToSpawn(), getBlockState(), below(), is(). คืนค่า: levelAccessor.getBlockState(blockPos.below()).is(BlockTags.ANIMALS_SPAWNABLE_ON) && bl.
Parameters
EntityType<? extends Animal> entityTypeLevelAccessor levelAccessorEntitySpawnReason entitySpawnReasonBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
EntityType<? extends Animal> entityType = ...;
LevelAccessor levelAccessor = ...;
EntitySpawnReason entitySpawnReason = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
boolean result = Animal.checkAnimalSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource);
net.minecraft.world.entity.animal.Animal#createAnimalAttributes()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Animal.java:49 - Modifiers:
public static - Return:
AttributeSupplier.Builder
คืออะไร
สร้าง Animal Attributes
ทำงานยังไง
เรียกต่อ: createMobAttributes(), add(). คืนค่า: Mob.createMobAttributes().add(Attributes.TEMPT_RANGE, 10.0).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Animal#customServerAiStep(ServerLevel)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Animal.java:53 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ customServerAiStep ตาม implementation ของ Animal
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: inLove. เรียกต่อ: getAge().
Parameters
ServerLevel serverLevel
ตัวอย่างใช้งาน
ServerLevel serverLevel = ...;
@Override
protected void customServerAiStep(ServerLevel serverLevel) {
super.customServerAiStep(serverLevel);
}
net.minecraft.world.entity.animal.Animal#finalizeSpawnChildFromBreeding(ServerLevel,Animal,AgeableMob)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Animal.java:232 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ finalizeSpawnChildFromBreeding ตาม implementation ของ Animal
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: ofNullable(), getLoveCause(), or(), ifPresent(), awardStat(), trigger(), setAge(), resetLove(). สร้างออบเจ็กต์: ExperienceOrb.
Parameters
ServerLevel serverLevelAnimal animalAgeableMob ageableMob
ตัวอย่างใช้งาน
Animal instance = ...;
ServerLevel serverLevel = ...;
Animal animal = ...;
AgeableMob ageableMob = ...;
instance.finalizeSpawnChildFromBreeding(serverLevel, animal, ageableMob);
net.minecraft.world.entity.animal.Animal#getAmbientSoundInterval()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Animal.java:118 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Ambient Sound Interval
ทำงานยังไง
คืนค่า: 120.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Animal#getBaseExperienceReward(ServerLevel)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Animal.java:128 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Base Experience Reward
ทำงานยังไง
เรียกต่อ: nextInt(). คืนค่า: 1 + this.random.nextInt(3).
Parameters
ServerLevel serverLevel
ตัวอย่างใช้งาน
ServerLevel serverLevel = ...;
@Override
protected int getBaseExperienceReward(ServerLevel serverLevel) {
return super.getBaseExperienceReward(serverLevel);
}
net.minecraft.world.entity.animal.Animal#getInLoveTime()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Animal.java:192 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า In Love Time
ทำงานยังไง
คืนค่า: this.inLove.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Animal#getLoveCause()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Animal.java:196 - Modifiers:
public - Return:
ServerPlayer
คืออะไร
อ่านค่า Love Cause
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: loveCause. เรียกต่อ: level(), getPlayerByUUID(). มีจุด return อย่างน้อย 2 จุด.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Animal#getWalkTargetValue(BlockPos,LevelReader)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Animal.java:86 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Walk Target Value
ทำงานยังไง
เรียกต่อ: getBlockState(), below(), is(), getPathfindingCostFromLightLevels(). คืนค่า: levelReader.getBlockState(blockPos.below()).is(Blocks.GRASS_BLOCK) ? 10.0F : levelReader.getPathfindingCostFromLightLevels(blockPos).
Parameters
BlockPos blockPosLevelReader levelReader
ตัวอย่างใช้งาน
Animal instance = ...;
BlockPos blockPos = ...;
LevelReader levelReader = ...;
float result = instance.getWalkTargetValue(blockPos, levelReader);
net.minecraft.world.entity.animal.Animal#handleEntityEvent(byte)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Animal.java:247 - Modifiers:
public - Return:
void
คืออะไร
จัดการ Entity Event
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: nextGaussian(), level(), addParticle(), getRandomX(), getRandomY(), getRandomZ().
Parameters
byte b
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Animal#isBrightEnoughToSpawn(BlockAndTintGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Animal.java:114 - Modifiers:
protected static - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Bright Enough To Spawn
ทำงานยังไง
เรียกต่อ: getRawBrightness(). คืนค่า: blockAndTintGetter.getRawBrightness(blockPos, 0) > 8.
Parameters
BlockAndTintGetter blockAndTintGetterBlockPos blockPos
ตัวอย่างใช้งาน
BlockAndTintGetter blockAndTintGetter = ...;
BlockPos blockPos = ...;
@Override
protected boolean isBrightEnoughToSpawn(BlockAndTintGetter blockAndTintGetter, BlockPos blockPos) {
return super.isBrightEnoughToSpawn(blockAndTintGetter, blockPos);
}
net.minecraft.world.entity.animal.Animal#isFood(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Animal.java:133 - Modifiers:
public abstract - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Food
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Animal#isInLove()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Animal.java:206 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ In Love
ทำงานยังไง
คืนค่า: this.inLove > 0.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Animal#mobInteract(Player,InteractionHand)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Animal.java:135 - Modifiers:
public - Return:
InteractionResult
คืออะไร
ดำเนินการ mobInteract ตาม implementation ของ Animal
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getItemInHand(), isFood(), getAge(), level(), canFallInLove(), usePlayerItem(), setInLove(), playEatingSound(). มีจุด return อย่างน้อย 4 จุด.
Parameters
Player playerInteractionHand interactionHand
ตัวอย่างใช้งาน
Animal instance = ...;
Player player = ...;
InteractionHand interactionHand = ...;
InteractionResult result = instance.mobInteract(player, interactionHand);
net.minecraft.world.entity.animal.Animal#playEatingSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Animal.java:162 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ playEatingSound ตาม implementation ของ Animal
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Animal#readAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Animal.java:100 - Modifiers:
public - Return:
void
คืออะไร
อ่าน Additional Save Data
ทำงานยังไง
แก้ state: inLove, loveCause. เรียกต่อ: getInt(), hasUUID(), getUUID().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Animal#removeWhenFarAway(double)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Animal.java:123 - Modifiers:
public - Return:
boolean
คืออะไร
ลบ When Far Away
ทำงานยังไง
คืนค่า: false.
Parameters
double d
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Animal#resetLove()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Animal.java:210 - Modifiers:
public - Return:
void
คืออะไร
รีเซ็ต Love
ทำงานยังไง
แก้ state: inLove.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Animal#setInLove(Player)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Animal.java:179 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า In Love
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: inLove, loveCause. เรียกต่อ: getUUID(), level(), broadcastEntityEvent().
Parameters
Player player
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Animal#setInLoveTime(int)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Animal.java:188 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า In Love Time
ทำงานยังไง
แก้ state: inLove.
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Animal#spawnChildFromBreeding(ServerLevel,Animal)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Animal.java:222 - Modifiers:
public - Return:
void
คืออะไร
สร้าง entity ในโลก Child From Breeding
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBreedOffspring(), setBaby(), moveTo(), getX(), getY(), getZ(), finalizeSpawnChildFromBreeding(), addFreshEntityWithPassengers().
Parameters
ServerLevel serverLevelAnimal animal
ตัวอย่างใช้งาน
Animal instance = ...;
ServerLevel serverLevel = ...;
Animal animal = ...;
instance.spawnChildFromBreeding(serverLevel, animal);
net.minecraft.world.entity.animal.Animal#usePlayerItem(Player,InteractionHand,ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Animal.java:165 - Modifiers:
protected - Return:
void
คืออะไร
ใช้งาน Player Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getCount(), get(), consume(), convertIntoRemainder(), hasInfiniteMaterials(), setItemInHand().
Parameters
Player playerInteractionHand interactionHandItemStack itemStack
ตัวอย่างใช้งาน
Player player = ...;
InteractionHand interactionHand = ...;
ItemStack itemStack = ...;
@Override
protected void usePlayerItem(Player player, InteractionHand interactionHand, ItemStack itemStack) {
super.usePlayerItem(player, interactionHand, itemStack);
}
Bee
- Full name:
net.minecraft.world.entity.animal.Bee - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Bee.java - Type:
class - Modifiers:
public - Extends:
Animal - Implements:
NeutralMob,FlyingAnimal
net.minecraft.world.entity.animal.Bee#addAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:192 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Additional Save Data
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: hasHive(), put(), writeBlockPos(), getHivePos(), hasSavedFlowerPos(), getSavedFlowerPos(), putBoolean(), hasNectar().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#aiStep()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:464 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ aiStep ตาม implementation ของ Bee
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: stayOutOfHiveCountdown, remainingCooldownBeforeLocatingNewHive, remainingCooldownBeforeLocatingNewFlower, hivePos. เรียกต่อ: level(), isAngry(), hasStung(), getTarget(), distanceToSqr(), setRolling(), isHiveValid().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#attractsBees(BlockState)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:673 - Modifiers:
public static - Return:
boolean
คืออะไร
ดำเนินการ attractsBees ตาม implementation ของ Bee
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), getValueOrElse(), getValue(). มีจุด return อย่างน้อย 3 จุด.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#Bee(EntityType<? extends Bee>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:145 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ Bee ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: moveControl, lookControl. เรียกต่อ: BeeLookControl(), setPathfindingMalus(). สร้างออบเจ็กต์: FlyingMoveControl, Bee.BeeLookControl.
Parameters
EntityType<? extends Bee> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends Bee> entityType = ...;
Level level = ...;
Bee instance = new Bee(entityType, level);
net.minecraft.world.entity.animal.Bee#checkFallDamage(double,boolean,BlockState,BlockPos)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:626 - Modifiers:
protected - Return:
void
คืออะไร
ตรวจสอบ Fall Damage
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
double dboolean blBlockState blockStateBlockPos 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.animal.Bee#createAttributes()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:545 - Modifiers:
public static - Return:
AttributeSupplier.Builder
คืออะไร
สร้าง Attributes
ทำงานยังไง
เรียกต่อ: createAnimalAttributes(), add().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#createNavigation(Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:553 - Modifiers:
protected - Return:
PathNavigation
คืออะไร
สร้าง Navigation
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isStableDestination(), getBlockState(), below(), isAir(), tick(), isPollinating(), setCanOpenDoors(), setCanFloat(). สร้างออบเจ็กต์: FlyingPathNavigation. มีจุด return อย่างน้อย 2 จุด.
Parameters
Level level
ตัวอย่างใช้งาน
Level level = ...;
@Override
protected PathNavigation createNavigation(Level level) {
return super.createNavigation(level);
}
net.minecraft.world.entity.animal.Bee#customServerAiStep(ServerLevel)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:363 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ customServerAiStep ตาม implementation ของ Bee
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: underWaterTicks, timeSinceSting, ticksWithoutNectarSinceExitingHive. เรียกต่อ: hasStung(), isInWaterOrBubble(), hurtServer(), damageSources(), drown(), nextInt(), clamp(), generic().
Parameters
ServerLevel serverLevel
ตัวอย่างใช้งาน
ServerLevel serverLevel = ...;
@Override
protected void customServerAiStep(ServerLevel serverLevel) {
super.customServerAiStep(serverLevel);
}
net.minecraft.world.entity.animal.Bee#defineSynchedData(SynchedEntityData.Builder)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:156 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ defineSynchedData ตาม implementation ของ Bee
ทำงานยังไง
เรียกต่อ: define().
Parameters
SynchedEntityData.Builder builder
ตัวอย่างใช้งาน
SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder);
}
net.minecraft.world.entity.animal.Bee#doHurtTarget(ServerLevel,Entity)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:224 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ doHurtTarget ตาม implementation ของ Bee
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: damageSources(), sting(), hurtServer(), getAttributeValue(), doPostAttackEffects(), setStingerCount(), getStingerCount(), level(). สร้างออบเจ็กต์: MobEffectInstance. คืนค่า: bl.
Parameters
ServerLevel serverLevelEntity entity
ตัวอย่างใช้งาน
Bee instance = ...;
ServerLevel serverLevel = ...;
Entity entity = ...;
boolean result = instance.doHurtTarget(serverLevel, entity);
net.minecraft.world.entity.animal.Bee#dropOffNectar()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:640 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ dropOffNectar ตาม implementation ของ Bee
ทำงานยังไง
เรียกต่อ: setHasNectar(), resetNumCropsGrownSincePollination().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#getAmbientSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:601 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Ambient Sound
ทำงานยังไง
คืนค่า: null.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#getBlacklistedHives()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:314 - Modifiers:
public - Return:
List<BlockPos>
คืออะไร
อ่านค่า Blacklisted Hives
ทำงานยังไง
คืนค่า: this.goToHiveGoal.blacklistedTargets.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#getBreedOffspring(ServerLevel,AgeableMob)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:621 - Modifiers:
public - Return:
Bee
คืออะไร
อ่านค่า Breed Offspring
ทำงานยังไง
เรียกต่อ: create(). คืนค่า: EntityType.BEE.create(serverLevel, EntitySpawnReason.BREEDING).
Parameters
ServerLevel serverLevelAgeableMob ageableMob
ตัวอย่างใช้งาน
Bee instance = ...;
ServerLevel serverLevel = ...;
AgeableMob ageableMob = ...;
Bee result = instance.getBreedOffspring(serverLevel, ageableMob);
net.minecraft.world.entity.animal.Bee#getDeathSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:611 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Death Sound
ทำงานยังไง
คืนค่า: SoundEvents.BEE_DEATH.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#getGoalSelector()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:441 - Modifiers:
public - Return:
GoalSelector
คืออะไร
อ่านค่า Goal Selector
ทำงานยังไง
คืนค่า: this.goalSelector.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#getHivePos()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:435 - Modifiers:
public - Return:
BlockPos
คืออะไร
อ่านค่า Hive Pos
ทำงานยังไง
คืนค่า: this.hivePos.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#getHurtSound(DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:606 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Hurt Sound
ทำงานยังไง
คืนค่า: SoundEvents.BEE_HURT.
Parameters
DamageSource damageSource
ตัวอย่างใช้งาน
DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
return super.getHurtSound(damageSource);
}
net.minecraft.world.entity.animal.Bee#getLeashOffset()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:660 - Modifiers:
public - Return:
Vec3
คืออะไร
อ่านค่า Leash Offset
ทำงานยังไง
เรียกต่อ: getEyeHeight(), getBbWidth(). สร้างออบเจ็กต์: Vec3. คืนค่า: new Vec3(0.0, 0.5F * this.getEyeHeight(), this.getBbWidth() * 0.2F).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#getPersistentAngerTarget()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:409 - Modifiers:
public - Return:
UUID
คืออะไร
อ่านค่า Persistent Anger Target
ทำงานยังไง
คืนค่า: this.persistentAngerTarget.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#getRemainingPersistentAngerTime()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:399 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Remaining Persistent Anger Time
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: this.entityData.get(DATA_REMAINING_ANGER_TIME).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#getRollAmount(float)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:350 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Roll Amount
ทำงานยังไง
เรียกต่อ: lerp(). คืนค่า: Mth.lerp(f, this.rollAmountO, this.rollAmount).
Parameters
float f
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#getSavedFlowerPos()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:296 - Modifiers:
public - Return:
BlockPos
คืออะไร
อ่านค่า Saved Flower Pos
ทำงานยังไง
คืนค่า: this.savedFlowerPos.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#getSoundVolume()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:616 - Modifiers:
protected - Return:
float
คืออะไร
อ่านค่า Sound Volume
ทำงานยังไง
คืนค่า: 0.4F.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#getTravellingTicks()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:309 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Travelling Ticks
ทำงานยังไง
เรียกต่อ: max(). คืนค่า: Math.max(this.goToHiveGoal.travellingTicks, this.goToKnownFlowerGoal.travellingTicks).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#getWalkTargetValue(BlockPos,LevelReader)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:163 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Walk Target Value
ทำงานยังไง
เรียกต่อ: getBlockState(), isAir(). คืนค่า: levelReader.getBlockState(blockPos).isAir() ? 10.0F : 0.0F.
Parameters
BlockPos blockPosLevelReader levelReader
ตัวอย่างใช้งาน
Bee instance = ...;
BlockPos blockPos = ...;
LevelReader levelReader = ...;
float result = instance.getWalkTargetValue(blockPos, levelReader);
net.minecraft.world.entity.animal.Bee#hasHive()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:430 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Hive
ทำงานยังไง
คืนค่า: this.hivePos != null.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#hasNectar()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:501 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Nectar
ทำงานยังไง
เรียกต่อ: getFlag(). คืนค่า: this.getFlag(8).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#hasSavedFlowerPos()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:301 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Saved Flower Pos
ทำงานยังไง
คืนค่า: this.savedFlowerPos != null.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#hasStung()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:513 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Stung
ทำงานยังไง
เรียกต่อ: getFlag(). คืนค่า: this.getFlag(4).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#hurtServer(ServerLevel,DamageSource,float)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:645 - Modifiers:
public - Return:
boolean
คืออะไร
ประมวลผลความเสียหาย Server
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isInvulnerableTo(), stopPollinating(). มีจุด return อย่างน้อย 2 จุด.
Parameters
ServerLevel serverLevelDamageSource damageSourcefloat f
ตัวอย่างใช้งาน
Bee instance = ...;
ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
boolean result = instance.hurtServer(serverLevel, damageSource, 0.0F);
net.minecraft.world.entity.animal.Bee#isFlapping()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:630 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Flapping
ทำงานยังไง
เรียกต่อ: isFlying(). คืนค่า: this.isFlying() && this.tickCount % TICKS_PER_FLAP == 0.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#isFlying()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:635 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Flying
ทำงานยังไง
เรียกต่อ: onGround(). คืนค่า: !this.onGround().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#isFood(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:592 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Food
ทำงานยังไง
เรียกต่อ: is(). คืนค่า: itemStack.is(ItemTags.BEE_FOOD).
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#isNightOrRaining(Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:342 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Night Or Raining
ทำงานยังไง
เรียกต่อ: dimensionType(), hasSkyLight(), isNight(), isRaining(). คืนค่า: level.dimensionType().hasSkyLight() && (level.isNight() || level.isRaining()).
Parameters
Level level
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#jumpInLiquid(TagKey<Fluid>)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:655 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ jumpInLiquid ตาม implementation ของ Bee
ทำงานยังไง
เรียกต่อ: setDeltaMovement(), getDeltaMovement(), add().
Parameters
TagKey<Fluid> tagKey
ตัวอย่างใช้งาน
TagKey<Fluid> tagKey = ...;
@Override
protected void jumpInLiquid(TagKey<Fluid> tagKey) {
super.jumpInLiquid(tagKey);
}
net.minecraft.world.entity.animal.Bee#mobInteract(Player,InteractionHand)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:574 - Modifiers:
public - Return:
InteractionResult
คืออะไร
ดำเนินการ mobInteract ตาม implementation ของ Bee
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getItemInHand(), isFood(), getItem(), getBlock(), getBeeInteractionEffect(), usePlayerItem(), level(), addEffect(). มีจุด return อย่างน้อย 2 จุด.
Parameters
Player playerInteractionHand interactionHand
ตัวอย่างใช้งาน
Bee instance = ...;
Player player = ...;
InteractionHand interactionHand = ...;
InteractionResult result = instance.mobInteract(player, interactionHand);
net.minecraft.world.entity.animal.Bee#playStepSound(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:597 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ playStepSound ตาม implementation ของ Bee
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected void playStepSound(BlockPos blockPos, BlockState blockState) {
super.playStepSound(blockPos, blockState);
}
net.minecraft.world.entity.animal.Bee#readAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:211 - Modifiers:
public - Return:
void
คืออะไร
อ่าน Additional Save Data
ทำงานยังไง
แก้ state: ticksWithoutNectarSinceExitingHive, stayOutOfHiveCountdown, numCropsGrownSincePollination, hivePos, savedFlowerPos. เรียกต่อ: setHasNectar(), getBoolean(), setHasStung(), getInt(), readBlockPos(), orElse(), readPersistentAngerSaveData(), level().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#registerGoals()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:168 - Modifiers:
protected - Return:
void
คืออะไร
ลงทะเบียน Goals
ทำงานยังไง
แก้ state: beePollinateGoal, goToHiveGoal, goToKnownFlowerGoal. เรียกต่อ: addGoal(), BeeAttackGoal(), BeeEnterHiveGoal(), is(), ValidateHiveGoal(), ValidateFlowerGoal(), BeePollinateGoal(), BeeLocateHiveGoal(). สร้างออบเจ็กต์: Bee.BeeAttackGoal, Bee.BeeEnterHiveGoal, BreedGoal, TemptGoal.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#resetTicksWithoutNectarSinceExitingHive()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:390 - Modifiers:
public - Return:
void
คืออะไร
รีเซ็ต Ticks Without Nectar Since Exiting Hive
ทำงานยังไง
แก้ state: ticksWithoutNectarSinceExitingHive.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#sendDebugPackets()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:446 - Modifiers:
protected - Return:
void
คืออะไร
ส่ง Debug Packets
ทำงานยังไง
เรียกต่อ: sendBeeInfo().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#setHivePos(BlockPos)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:669 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Hive Pos
ทำงานยังไง
แก้ state: hivePos.
Parameters
BlockPos blockPos
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#setPersistentAngerTarget(UUID)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:415 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Persistent Anger Target
ทำงานยังไง
แก้ state: persistentAngerTarget.
Parameters
UUID uUID
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#setRemainingPersistentAngerTime(int)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:404 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Remaining Persistent Anger Time
ทำงานยังไง
เรียกต่อ: set().
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#setSavedFlowerPos(BlockPos)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:305 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Saved Flower Pos
ทำงานยังไง
แก้ state: savedFlowerPos.
Parameters
BlockPos blockPos
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#setStayOutOfHiveCountdown(int)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:346 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Stay Out Of Hive Countdown
ทำงานยังไง
แก้ state: stayOutOfHiveCountdown.
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#startPersistentAngerTimer()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:420 - Modifiers:
public - Return:
void
คืออะไร
เริ่ม Persistent Anger Timer
ทำงานยังไง
เรียกต่อ: setRemainingPersistentAngerTime(), sample().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee#tick()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:252 - Modifiers:
public - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: hasNectar(), getCropsGrownSincePollination(), nextFloat(), nextInt(), spawnFluidParticle(), level(), getX(), getZ().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
Bee$BeeGoToHiveGoal
- Full name:
net.minecraft.world.entity.animal.Bee$BeeGoToHiveGoal - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Bee.java - Type:
class - Modifiers:
public - Extends:
Bee.BaseBeeGoal
net.minecraft.world.entity.animal.Bee$BeeGoToHiveGoal#canBeeContinueToUse()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:800 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Bee Continue To Use
ทำงานยังไง
เรียกต่อ: canBeeUse(). คืนค่า: this.canBeeUse().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee$BeeGoToHiveGoal#canBeeUse()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:790 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Bee Use
ทำงานยังไง
เรียกต่อ: isTooFarAway(), hasRestriction(), wantsToEnterHive(), hasReachedTarget(), level(), getBlockState(), is().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee$BeeGoToHiveGoal#start()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:805 - Modifiers:
public - Return:
void
คืออะไร
เริ่ม start
ทำงานยังไง
แก้ state: travellingTicks, ticksStuck.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee$BeeGoToHiveGoal#stop()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:812 - Modifiers:
public - Return:
void
คืออะไร
หยุด stop
ทำงานยังไง
แก้ state: travellingTicks, ticksStuck. เรียกต่อ: resetMaxVisitedNodesMultiplier().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee$BeeGoToHiveGoal#tick()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:820 - Modifiers:
public - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: travellingTicks, ticksStuck, lastPath. เรียกต่อ: adjustedTickDelay(), dropAndBlacklistHive(), isInProgress(), closerThan(), isTooFarAway(), dropHive(), pathfindRandomlyTowards(), pathfindDirectlyTowards().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
Bee$BeeGoToKnownFlowerGoal
- Full name:
net.minecraft.world.entity.animal.Bee$BeeGoToKnownFlowerGoal - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Bee.java - Type:
class - Modifiers:
public - Extends:
Bee.BaseBeeGoal
net.minecraft.world.entity.animal.Bee$BeeGoToKnownFlowerGoal#canBeeContinueToUse()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:905 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Bee Continue To Use
ทำงานยังไง
เรียกต่อ: canBeeUse(). คืนค่า: this.canBeeUse().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee$BeeGoToKnownFlowerGoal#canBeeUse()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:900 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Bee Use
ทำงานยังไง
เรียกต่อ: hasRestriction(), wantsToGoToKnownFlower(), closerThan(). คืนค่า: Bee.this.savedFlowerPos != null && !Bee.this.hasRestriction() && this.wantsToGoToKnownFlower() && !Bee.this.closerThan(Bee.this.savedFlowerPos, 2).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee$BeeGoToKnownFlowerGoal#start()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:910 - Modifiers:
public - Return:
void
คืออะไร
เริ่ม start
ทำงานยังไง
แก้ state: travellingTicks.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee$BeeGoToKnownFlowerGoal#stop()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:916 - Modifiers:
public - Return:
void
คืออะไร
หยุด stop
ทำงานยังไง
แก้ state: travellingTicks. เรียกต่อ: resetMaxVisitedNodesMultiplier().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bee$BeeGoToKnownFlowerGoal#tick()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bee.java:923 - Modifiers:
public - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: travellingTicks. เรียกต่อ: adjustedTickDelay(), dropFlower(), isInProgress(), isTooFarAway(), pathfindRandomlyTowards().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
Bucketable
- Full name:
net.minecraft.world.entity.animal.Bucketable - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Bucketable.java - Type:
interface - Modifiers:
public
net.minecraft.world.entity.animal.Bucketable#bucketMobPickup(Player,InteractionHand,T)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bucketable.java:88 - Modifiers:
static - Return:
Optional<InteractionResult>
คืออะไร
ดำเนินการ bucketMobPickup ตาม implementation ของ Bucketable
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getItemInHand(), getItem(), isAlive(), playSound(), getPickupSound(), getBucketItemStack(), saveToBucketTag(), createFilledResult(). มีจุด return อย่างน้อย 2 จุด.
Parameters
Player playerInteractionHand interactionHandT livingEntity
ตัวอย่างใช้งาน
Player player = ...;
InteractionHand interactionHand = ...;
T livingEntity = ...;
Optional<InteractionResult> result = Bucketable.bucketMobPickup(player, interactionHand, livingEntity);
net.minecraft.world.entity.animal.Bucketable#fromBucket()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bucketable.java:21 - Modifiers: ``
- Return:
boolean
คืออะไร
ดำเนินการ fromBucket ตาม implementation ของ Bucketable
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bucketable#getBucketItemStack()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bucketable.java:29 - Modifiers: ``
- Return:
ItemStack
คืออะไร
อ่านค่า Bucket Item Stack
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bucketable#getPickupSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bucketable.java:31 - Modifiers: ``
- Return:
SoundEvent
คืออะไร
อ่านค่า Pickup Sound
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bucketable#loadDefaultDataFromBucketTag(Mob,CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bucketable.java:61 - Modifiers:
static - Return:
void
คืออะไร
โหลด Default Data From Bucket Tag
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: contains(), setNoAi(), getBoolean(), setSilent(), setNoGravity(), setGlowingTag(), setInvulnerable(), setHealth().
Parameters
Mob mobCompoundTag compoundTag
ตัวอย่างใช้งาน
Mob mob = ...;
CompoundTag compoundTag = ...;
Bucketable.loadDefaultDataFromBucketTag(mob, compoundTag);
net.minecraft.world.entity.animal.Bucketable#loadFromBucketTag(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bucketable.java:27 - Modifiers: ``
- Return:
void
คืออะไร
โหลด From Bucket Tag
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bucketable#saveDefaultDataToBucketTag(Mob,ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bucketable.java:33 - Modifiers:
static - Return:
void
คืออะไร
บันทึก Default Data To Bucket Tag
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: set(), getCustomName(), update(), isNoAi(), putBoolean(), isSilent(), isNoGravity(), hasGlowingTag().
Parameters
Mob mobItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bucketable#saveToBucketTag(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bucketable.java:25 - Modifiers: ``
- Return:
void
คืออะไร
บันทึก To Bucket Tag
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Bucketable#setFromBucket(boolean)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Bucketable.java:23 - Modifiers: ``
- Return:
void
คืออะไร
กำหนดค่า From Bucket
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
boolean bl
ตัวอย่างใช้งาน
Cat
- Full name:
net.minecraft.world.entity.animal.Cat - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Cat.java - Type:
class - Modifiers:
public - Extends:
TamableAnimal - Implements:
VariantHolder<Holder<CatVariant>>
net.minecraft.world.entity.animal.Cat#addAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:157 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Additional Save Data
ทำงานยังไง
เรียกต่อ: putString(), getVariant(), unwrapKey(), orElse(), location(), toString(), putByte(), getCollarColor().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cat#canMate(Animal)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:327 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Mate
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isTame(). มีจุด return อย่างน้อย 2 จุด.
Parameters
Animal animal
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cat#Cat(EntityType<? extends Cat>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:91 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ Cat ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: reassessTameGoals().
Parameters
EntityType<? extends Cat> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends Cat> entityType = ...;
Level level = ...;
Cat instance = new Cat(entityType, level);
net.minecraft.world.entity.animal.Cat#createAttributes()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:229 - Modifiers:
public static - Return:
AttributeSupplier.Builder
คืออะไร
สร้าง Attributes
ทำงานยังไง
เรียกต่อ: createAnimalAttributes(), add(). คืนค่า: Animal.createAnimalAttributes().add(Attributes.MAX_HEALTH, 10.0).add(Attributes.MOVEMENT_SPEED, 0.3F).add(Attributes.ATTACK_DAMAGE, 3.0).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cat#customServerAiStep(ServerLevel)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:176 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ customServerAiStep ตาม implementation ของ Cat
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getMoveControl(), hasWanted(), getSpeedModifier(), setPose(), setSprinting().
Parameters
ServerLevel serverLevel
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cat#defineSynchedData(SynchedEntityData.Builder)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:148 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ defineSynchedData ตาม implementation ของ Cat
ทำงานยังไง
เรียกต่อ: define(), getOrThrow(), getId().
Parameters
SynchedEntityData.Builder builder
ตัวอย่างใช้งาน
SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder);
}
net.minecraft.world.entity.animal.Cat#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:336 - Modifiers:
public - Return:
SpawnGroupData
คืออะไร
ดำเนินการ finalizeSpawn ตาม implementation ของ Cat
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getMoonBrightness(), getRandomElementOf(), getRandom(), ifPresent(), getLevel(), structureManager(), getStructureWithPieceAt(), blockPosition(). คืนค่า: spawnGroupData.
Parameters
ServerLevelAccessor serverLevelAccessorDifficultyInstance difficultyInstanceEntitySpawnReason entitySpawnReasonSpawnGroupData spawnGroupData
ตัวอย่างใช้งาน
Cat instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);
net.minecraft.world.entity.animal.Cat#getAmbientSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:196 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Ambient Sound
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isTame(), isInLove(), nextInt(). มีจุด return อย่างน้อย 3 จุด.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cat#getAmbientSoundInterval()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:210 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Ambient Sound Interval
ทำงานยังไง
คืนค่า: 120.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cat#getBreedOffspring(ServerLevel,AgeableMob)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:305 - Modifiers:
public - Return:
Cat
คืออะไร
อ่านค่า Breed Offspring
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: create(), nextBoolean(), setVariant(), getVariant(), isTame(), setOwnerUUID(), getOwnerUUID(), setTame(). คืนค่า: cat.
Parameters
ServerLevel serverLevelAgeableMob ageableMob
ตัวอย่างใช้งาน
Cat instance = ...;
ServerLevel serverLevel = ...;
AgeableMob ageableMob = ...;
Cat result = instance.getBreedOffspring(serverLevel, ageableMob);
net.minecraft.world.entity.animal.Cat#getCollarColor()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:140 - Modifiers:
public - Return:
DyeColor
คืออะไร
อ่านค่า Collar Color
ทำงานยังไง
เรียกต่อ: byId(), get(). คืนค่า: DyeColor.byId(this.entityData.get(DATA_COLLAR_COLOR)).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cat#getDeathSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:224 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Death Sound
ทำงานยังไง
คืนค่า: SoundEvents.CAT_DEATH.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cat#getHurtSound(DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:219 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Hurt Sound
ทำงานยังไง
คืนค่า: SoundEvents.CAT_HURT.
Parameters
DamageSource damageSource
ตัวอย่างใช้งาน
DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
return super.getHurtSound(damageSource);
}
net.minecraft.world.entity.animal.Cat#getLieDownAmount(float)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:293 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Lie Down Amount
ทำงานยังไง
เรียกต่อ: lerp(). คืนค่า: Mth.lerp(f, this.lieDownAmountO, this.lieDownAmount).
Parameters
float f
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cat#getLieDownAmountTail(float)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:297 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Lie Down Amount Tail
ทำงานยังไง
เรียกต่อ: lerp(). คืนค่า: Mth.lerp(f, this.lieDownAmountOTail, this.lieDownAmountTail).
Parameters
float f
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cat#getRelaxStateOneAmount(float)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:301 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Relax State One Amount
ทำงานยังไง
เรียกต่อ: lerp(). คืนค่า: Mth.lerp(f, this.relaxStateOneAmountO, this.relaxStateOneAmount).
Parameters
float f
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cat#getVariant()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:116 - Modifiers:
public - Return:
Holder<CatVariant>
คืออะไร
อ่านค่า Variant
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: this.entityData.get(DATA_VARIANT_ID).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cat#hiss()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:215 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ hiss ตาม implementation ของ Cat
ทำงานยังไง
เรียกต่อ: makeSound().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cat#isFood(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:409 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Food
ทำงานยังไง
เรียกต่อ: is(). คืนค่า: itemStack.is(ItemTags.CAT_FOOD).
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cat#isLying()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:128 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Lying
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: this.entityData.get(IS_LYING).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cat#isLyingOnTopOfSleepingPlayer()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:268 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Lying On Top Of Sleeping Player
ทำงานยังไง
คืนค่า: this.isLyingOnTopOfSleepingPlayer.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cat#isSteppingCarefully()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:446 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Stepping Carefully
ทำงานยังไง
เรียกต่อ: isCrouching(). คืนค่า: this.isCrouching() || super.isSteppingCarefully().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cat#mobInteract(Player,InteractionHand)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:354 - Modifiers:
public - Return:
InteractionResult
คืออะไร
ดำเนินการ mobInteract ตาม implementation ของ Cat
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getItemInHand(), getItem(), isTame(), isOwnedBy(), getDyeColor(), getCollarColor(), level(), isClientSide(). มีจุด return อย่างน้อย 6 จุด.
Parameters
Player playerInteractionHand interactionHand
ตัวอย่างใช้งาน
Cat instance = ...;
Player player = ...;
InteractionHand interactionHand = ...;
InteractionResult result = instance.mobInteract(player, interactionHand);
net.minecraft.world.entity.animal.Cat#playEatingSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:233 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ playEatingSound ตาม implementation ของ Cat
ทำงานยังไง
เรียกต่อ: playSound().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cat#readAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:164 - Modifiers:
public - Return:
void
คืออะไร
อ่าน Additional Save Data
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: ofNullable(), tryParse(), getString(), map(), create(), flatMap(), ifPresent(), contains().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cat#reassessTameGoals()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:425 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ reassessTameGoals ตาม implementation ของ Cat
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: avoidPlayersGoal. เรียกต่อ: removeGoal(), isTame(), addGoal(). สร้างออบเจ็กต์: Cat.CatAvoidEntityGoal<>.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cat#registerGoals()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:96 - Modifiers:
protected - Return:
void
คืออะไร
ลงทะเบียน Goals
ทำงานยังไง
แก้ state: temptGoal. เรียกต่อ: CatTemptGoal(), is(), addGoal(), TamableAnimalPanicGoal(), CatRelaxOnOwnerGoal(). สร้างออบเจ็กต์: Cat.CatTemptGoal, FloatGoal, TamableAnimal.TamableAnimalPanicGoal, SitWhenOrderedToGoal.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cat#removeWhenFarAway(double)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:414 - Modifiers:
public - Return:
boolean
คืออะไร
ลบ When Far Away
ทำงานยังไง
เรียกต่อ: isTame(). คืนค่า: !this.isTame() && this.tickCount > 2400.
Parameters
double d
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cat#setLying(boolean)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:124 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Lying
ทำงานยังไง
เรียกต่อ: set().
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cat#setTame(boolean,boolean)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:419 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Tame
ทำงานยังไง
เรียกต่อ: reassessTameGoals().
Parameters
boolean blboolean bl2
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cat#setVariant(Holder<CatVariant>)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:120 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Variant
ทำงานยังไง
เรียกต่อ: set().
Parameters
Holder<CatVariant> holder
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cat#tick()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cat.java:238 - Modifiers:
public - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isRunning(), isTame(), playSound(), handleLieDown().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
CatVariant
- Full name:
net.minecraft.world.entity.animal.CatVariant - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/CatVariant.java - Type:
record - Modifiers:
public
net.minecraft.world.entity.animal.CatVariant#bootstrap(Registry<CatVariant>)
- Origin:
common - Source:
net/minecraft/world/entity/animal/CatVariant.java:30 - Modifiers:
public static - Return:
CatVariant
คืออะไร
ดำเนินการ bootstrap ตาม implementation ของ CatVariant
ทำงานยังไง
เรียกต่อ: register(). คืนค่า: register(registry, ALL_BLACK, "textures/entity/cat/all_black.png").
Parameters
Registry<CatVariant> registry
ตัวอย่างใช้งาน
Chicken
- Full name:
net.minecraft.world.entity.animal.Chicken - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Chicken.java - Type:
class - Modifiers:
public - Extends:
Animal
net.minecraft.world.entity.animal.Chicken#addAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Chicken.java:157 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Additional Save Data
ทำงานยังไง
เรียกต่อ: putBoolean(), putInt().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Chicken#aiStep()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Chicken.java:75 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ aiStep ตาม implementation ของ Chicken
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: oFlap, oFlapSpeed, flapSpeed, flapping, flap, eggTime. เรียกต่อ: onGround(), clamp(), getDeltaMovement(), setDeltaMovement(), multiply(), level(), isAlive(), isBaby().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Chicken#Chicken(EntityType<? extends Chicken>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Chicken.java:49 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ Chicken ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: setPathfindingMalus().
Parameters
EntityType<? extends Chicken> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends Chicken> entityType = ...;
Level level = ...;
Chicken instance = new Chicken(entityType, level);
net.minecraft.world.entity.animal.Chicken#createAttributes()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Chicken.java:71 - Modifiers:
public static - Return:
AttributeSupplier.Builder
คืออะไร
สร้าง Attributes
ทำงานยังไง
เรียกต่อ: createAnimalAttributes(), add(). คืนค่า: Animal.createAnimalAttributes().add(Attributes.MAX_HEALTH, 4.0).add(Attributes.MOVEMENT_SPEED, 0.25).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Chicken#getAmbientSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Chicken.java:113 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Ambient Sound
ทำงานยังไง
คืนค่า: SoundEvents.CHICKEN_AMBIENT.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Chicken#getBaseExperienceReward(ServerLevel)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Chicken.java:143 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Base Experience Reward
ทำงานยังไง
เรียกต่อ: isChickenJockey(). คืนค่า: this.isChickenJockey() ? 10 : super.getBaseExperienceReward(serverLevel).
Parameters
ServerLevel serverLevel
ตัวอย่างใช้งาน
ServerLevel serverLevel = ...;
@Override
protected int getBaseExperienceReward(ServerLevel serverLevel) {
return super.getBaseExperienceReward(serverLevel);
}
net.minecraft.world.entity.animal.Chicken#getBreedOffspring(ServerLevel,AgeableMob)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Chicken.java:133 - Modifiers:
public - Return:
Chicken
คืออะไร
อ่านค่า Breed Offspring
ทำงานยังไง
เรียกต่อ: create(). คืนค่า: EntityType.CHICKEN.create(serverLevel, EntitySpawnReason.BREEDING).
Parameters
ServerLevel serverLevelAgeableMob ageableMob
ตัวอย่างใช้งาน
Chicken instance = ...;
ServerLevel serverLevel = ...;
AgeableMob ageableMob = ...;
Chicken result = instance.getBreedOffspring(serverLevel, ageableMob);
net.minecraft.world.entity.animal.Chicken#getDeathSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Chicken.java:123 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Death Sound
ทำงานยังไง
คืนค่า: SoundEvents.CHICKEN_DEATH.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Chicken#getDefaultDimensions(Pose)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Chicken.java:66 - Modifiers:
public - Return:
EntityDimensions
คืออะไร
อ่านค่า Default Dimensions
ทำงานยังไง
เรียกต่อ: isBaby(). คืนค่า: this.isBaby() ? BABY_DIMENSIONS : super.getDefaultDimensions(pose).
Parameters
Pose pose
ตัวอย่างใช้งาน
Chicken instance = ...;
Pose pose = ...;
EntityDimensions result = instance.getDefaultDimensions(pose);
net.minecraft.world.entity.animal.Chicken#getHurtSound(DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Chicken.java:118 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Hurt Sound
ทำงานยังไง
คืนค่า: SoundEvents.CHICKEN_HURT.
Parameters
DamageSource damageSource
ตัวอย่างใช้งาน
DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
return super.getHurtSound(damageSource);
}
net.minecraft.world.entity.animal.Chicken#isChickenJockey()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Chicken.java:177 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Chicken Jockey
ทำงานยังไง
คืนค่า: this.isChickenJockey.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Chicken#isFlapping()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Chicken.java:103 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Flapping
ทำงานยังไง
คืนค่า: this.flyDist > this.nextFlap.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Chicken#isFood(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Chicken.java:138 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Food
ทำงานยังไง
เรียกต่อ: is(). คืนค่า: itemStack.is(ItemTags.CHICKEN_FOOD).
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Chicken#onFlap()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Chicken.java:108 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Flap
ทำงานยังไง
แก้ state: nextFlap.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Chicken#playStepSound(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Chicken.java:128 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ playStepSound ตาม implementation ของ Chicken
ทำงานยังไง
เรียกต่อ: playSound().
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected void playStepSound(BlockPos blockPos, BlockState blockState) {
super.playStepSound(blockPos, blockState);
}
net.minecraft.world.entity.animal.Chicken#positionRider(Entity,Entity.MoveFunction)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Chicken.java:169 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ positionRider ตาม implementation ของ Chicken
ทำงานยังไง
ตรวจเงื่อนไขด้วย if.
Parameters
Entity entityEntity.MoveFunction moveFunction
ตัวอย่างใช้งาน
Entity entity = ...;
Entity.MoveFunction moveFunction = ...;
@Override
protected void positionRider(Entity entity, Entity.MoveFunction moveFunction) {
super.positionRider(entity, moveFunction);
}
net.minecraft.world.entity.animal.Chicken#readAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Chicken.java:148 - Modifiers:
public - Return:
void
คืออะไร
อ่าน Additional Save Data
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: isChickenJockey, eggTime. เรียกต่อ: getBoolean(), contains(), getInt().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
Chicken instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);
net.minecraft.world.entity.animal.Chicken#registerGoals()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Chicken.java:54 - Modifiers:
protected - Return:
void
คืออะไร
ลงทะเบียน Goals
ทำงานยังไง
เรียกต่อ: addGoal(), is(). สร้างออบเจ็กต์: FloatGoal, PanicGoal, BreedGoal, TemptGoal.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Chicken#removeWhenFarAway(double)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Chicken.java:164 - Modifiers:
public - Return:
boolean
คืออะไร
ลบ When Far Away
ทำงานยังไง
เรียกต่อ: isChickenJockey(). คืนค่า: this.isChickenJockey().
Parameters
double d
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Chicken#setChickenJockey(boolean)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Chicken.java:181 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Chicken Jockey
ทำงานยังไง
แก้ state: isChickenJockey.
Parameters
boolean bl
ตัวอย่างใช้งาน
Cod
- Full name:
net.minecraft.world.entity.animal.Cod - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Cod.java - Type:
class - Modifiers:
public - Extends:
AbstractSchoolingFish
net.minecraft.world.entity.animal.Cod#Cod(EntityType<? extends Cod>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cod.java:12 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ Cod ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
EntityType<? extends Cod> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends Cod> entityType = ...;
Level level = ...;
Cod instance = new Cod(entityType, level);
net.minecraft.world.entity.animal.Cod#getAmbientSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cod.java:21 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Ambient Sound
ทำงานยังไง
คืนค่า: SoundEvents.COD_AMBIENT.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cod#getBucketItemStack()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cod.java:16 - Modifiers:
public - Return:
ItemStack
คืออะไร
อ่านค่า Bucket Item Stack
ทำงานยังไง
สร้างออบเจ็กต์: ItemStack. คืนค่า: new ItemStack(Items.COD_BUCKET).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cod#getDeathSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cod.java:26 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Death Sound
ทำงานยังไง
คืนค่า: SoundEvents.COD_DEATH.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cod#getFlopSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cod.java:36 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Flop Sound
ทำงานยังไง
คืนค่า: SoundEvents.COD_FLOP.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cod#getHurtSound(DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cod.java:31 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Hurt Sound
ทำงานยังไง
คืนค่า: SoundEvents.COD_HURT.
Parameters
DamageSource damageSource
ตัวอย่างใช้งาน
DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
return super.getHurtSound(damageSource);
}
Cow
- Full name:
net.minecraft.world.entity.animal.Cow - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Cow.java - Type:
class - Modifiers:
public - Extends:
Animal
net.minecraft.world.entity.animal.Cow#Cow(EntityType<? extends Cow>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cow.java:37 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ Cow ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
EntityType<? extends Cow> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends Cow> entityType = ...;
Level level = ...;
Cow instance = new Cow(entityType, level);
net.minecraft.world.entity.animal.Cow#createAttributes()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cow.java:58 - Modifiers:
public static - Return:
AttributeSupplier.Builder
คืออะไร
สร้าง Attributes
ทำงานยังไง
เรียกต่อ: createAnimalAttributes(), add(). คืนค่า: Animal.createAnimalAttributes().add(Attributes.MAX_HEALTH, 10.0).add(Attributes.MOVEMENT_SPEED, 0.2F).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cow#getAmbientSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cow.java:62 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Ambient Sound
ทำงานยังไง
คืนค่า: SoundEvents.COW_AMBIENT.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cow#getBreedOffspring(ServerLevel,AgeableMob)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cow.java:100 - Modifiers:
public - Return:
Cow
คืออะไร
อ่านค่า Breed Offspring
ทำงานยังไง
เรียกต่อ: create(). คืนค่า: EntityType.COW.create(serverLevel, EntitySpawnReason.BREEDING).
Parameters
ServerLevel serverLevelAgeableMob ageableMob
ตัวอย่างใช้งาน
Cow instance = ...;
ServerLevel serverLevel = ...;
AgeableMob ageableMob = ...;
Cow result = instance.getBreedOffspring(serverLevel, ageableMob);
net.minecraft.world.entity.animal.Cow#getDeathSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cow.java:72 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Death Sound
ทำงานยังไง
คืนค่า: SoundEvents.COW_DEATH.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cow#getDefaultDimensions(Pose)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cow.java:105 - Modifiers:
public - Return:
EntityDimensions
คืออะไร
อ่านค่า Default Dimensions
ทำงานยังไง
เรียกต่อ: isBaby(). คืนค่า: this.isBaby() ? BABY_DIMENSIONS : super.getDefaultDimensions(pose).
Parameters
Pose pose
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cow#getHurtSound(DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cow.java:67 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Hurt Sound
ทำงานยังไง
คืนค่า: SoundEvents.COW_HURT.
Parameters
DamageSource damageSource
ตัวอย่างใช้งาน
DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
return super.getHurtSound(damageSource);
}
net.minecraft.world.entity.animal.Cow#getSoundVolume()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cow.java:82 - Modifiers:
protected - Return:
float
คืออะไร
อ่านค่า Sound Volume
ทำงานยังไง
คืนค่า: 0.4F.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cow#isFood(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cow.java:53 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Food
ทำงานยังไง
เรียกต่อ: is(). คืนค่า: itemStack.is(ItemTags.COW_FOOD).
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Cow#mobInteract(Player,InteractionHand)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cow.java:87 - Modifiers:
public - Return:
InteractionResult
คืออะไร
ดำเนินการ mobInteract ตาม implementation ของ Cow
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getItemInHand(), is(), isBaby(), playSound(), createFilledResult(), getDefaultInstance(), setItemInHand(). มีจุด return อย่างน้อย 2 จุด.
Parameters
Player playerInteractionHand interactionHand
ตัวอย่างใช้งาน
Cow instance = ...;
Player player = ...;
InteractionHand interactionHand = ...;
InteractionResult result = instance.mobInteract(player, interactionHand);
net.minecraft.world.entity.animal.Cow#playStepSound(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cow.java:77 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ playStepSound ตาม implementation ของ Cow
ทำงานยังไง
เรียกต่อ: playSound().
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected void playStepSound(BlockPos blockPos, BlockState blockState) {
super.playStepSound(blockPos, blockState);
}
net.minecraft.world.entity.animal.Cow#registerGoals()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Cow.java:41 - Modifiers:
protected - Return:
void
คืออะไร
ลงทะเบียน Goals
ทำงานยังไง
เรียกต่อ: addGoal(), is(). สร้างออบเจ็กต์: FloatGoal, PanicGoal, BreedGoal, TemptGoal.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
Dolphin
- Full name:
net.minecraft.world.entity.animal.Dolphin - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Dolphin.java - Type:
class - Modifiers:
public - Extends:
AgeableWaterCreature
net.minecraft.world.entity.animal.Dolphin#addAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:139 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Additional Save Data
ทำงานยังไง
เรียกต่อ: putInt(), getTreasurePos(), getX(), getY(), getZ(), putBoolean(), gotFish(), getMoistnessLevel().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Dolphin#canAttack(LivingEntity)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:191 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Attack
ทำงานยังไง
เรียกต่อ: isBaby(). คืนค่า: !this.isBaby() && super.canAttack(livingEntity).
Parameters
LivingEntity livingEntity
ตัวอย่างใช้งาน
Dolphin instance = ...;
LivingEntity livingEntity = ...;
boolean result = instance.canAttack(livingEntity);
net.minecraft.world.entity.animal.Dolphin#canBeLeashed()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:362 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Be Leashed
ทำงานยังไง
คืนค่า: true.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Dolphin#canDispenserEquipIntoSlot(EquipmentSlot)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:221 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Dispenser Equip Into Slot
ทำงานยังไง
เรียกต่อ: canPickUpLoot(). คืนค่า: equipmentSlot == EquipmentSlot.MAINHAND && this.canPickUpLoot().
Parameters
EquipmentSlot equipmentSlot
ตัวอย่างใช้งาน
EquipmentSlot equipmentSlot = ...;
@Override
protected boolean canDispenserEquipIntoSlot(EquipmentSlot equipmentSlot) {
return super.canDispenserEquipIntoSlot(equipmentSlot);
}
net.minecraft.world.entity.animal.Dolphin#canRide(Entity)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:216 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Ride
ทำงานยังไง
คืนค่า: true.
Parameters
Entity entity
ตัวอย่างใช้งาน
Entity entity = ...;
@Override
protected boolean canRide(Entity entity) {
return super.canRide(entity);
}
net.minecraft.world.entity.animal.Dolphin#closeToNextPos()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:343 - Modifiers:
protected - Return:
boolean
คืออะไร
ปิด To Next Pos
ทำงานยังไง
เรียกต่อ: getNavigation(), getTargetPos(), closerToCenterThan(), position(). คืนค่า: blockPos != null ? blockPos.closerToCenterThan(this.position(), 12.0) : false.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Dolphin#createAttributes()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:177 - Modifiers:
public static - Return:
AttributeSupplier.Builder
คืออะไร
สร้าง Attributes
ทำงานยังไง
เรียกต่อ: createMobAttributes(), add(). คืนค่า: Mob.createMobAttributes().add(Attributes.MAX_HEALTH, 10.0).add(Attributes.MOVEMENT_SPEED, 1.2F).add(Attributes.ATTACK_DAMAGE, 3.0).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Dolphin#createNavigation(Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:181 - 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.animal.Dolphin#defineSynchedData(SynchedEntityData.Builder)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:131 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ defineSynchedData ตาม implementation ของ Dolphin
ทำงานยังไง
เรียกต่อ: define().
Parameters
SynchedEntityData.Builder builder
ตัวอย่างใช้งาน
SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder);
}
net.minecraft.world.entity.animal.Dolphin#Dolphin(EntityType<? extends Dolphin>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:75 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ Dolphin ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: moveControl, lookControl. เรียกต่อ: setCanPickUpLoot(). สร้างออบเจ็กต์: SmoothSwimmingMoveControl, SmoothSwimmingLookControl.
Parameters
EntityType<? extends Dolphin> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends Dolphin> entityType = ...;
Level level = ...;
Dolphin instance = new Dolphin(entityType, level);
net.minecraft.world.entity.animal.Dolphin#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:82 - Modifiers:
public - Return:
SpawnGroupData
คืออะไร
ดำเนินการ finalizeSpawn ตาม implementation ของ Dolphin
ทำงานยังไง
เรียกต่อ: setAirSupply(), getMaxAirSupply(), setXRot(), requireNonNullElseGet(), AgeableMobGroupData(). สร้างออบเจ็กต์: AgeableMob.AgeableMobGroupData. คืนค่า: super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData2).
Parameters
ServerLevelAccessor serverLevelAccessorDifficultyInstance difficultyInstanceEntitySpawnReason entitySpawnReasonSpawnGroupData spawnGroupData
ตัวอย่างใช้งาน
Dolphin instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);
net.minecraft.world.entity.animal.Dolphin#getAgeScale()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:98 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Age Scale
ทำงานยังไง
เรียกต่อ: isBaby(). คืนค่า: this.isBaby() ? 0.65F : 1.0F.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Dolphin#getAmbientSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:327 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Ambient Sound
ทำงานยังไง
เรียกต่อ: isInWater(). คืนค่า: this.isInWater() ? SoundEvents.DOLPHIN_AMBIENT_WATER : SoundEvents.DOLPHIN_AMBIENT.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Dolphin#getBreedOffspring(ServerLevel,AgeableMob)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:93 - Modifiers:
public - Return:
Dolphin
คืออะไร
อ่านค่า Breed Offspring
ทำงานยังไง
เรียกต่อ: create(). คืนค่า: EntityType.DOLPHIN.create(serverLevel, EntitySpawnReason.BREEDING).
Parameters
ServerLevel serverLevelAgeableMob ageableMob
ตัวอย่างใช้งาน
Dolphin instance = ...;
ServerLevel serverLevel = ...;
AgeableMob ageableMob = ...;
Dolphin result = instance.getBreedOffspring(serverLevel, ageableMob);
net.minecraft.world.entity.animal.Dolphin#getDeathSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:321 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Death Sound
ทำงานยังไง
คืนค่า: SoundEvents.DOLPHIN_DEATH.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Dolphin#getHurtSound(DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:316 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Hurt Sound
ทำงานยังไง
คืนค่า: SoundEvents.DOLPHIN_HURT.
Parameters
DamageSource damageSource
ตัวอย่างใช้งาน
DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
return super.getHurtSound(damageSource);
}
net.minecraft.world.entity.animal.Dolphin#getMaxAirSupply()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:196 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Max Air Supply
ทำงานยังไง
คืนค่า: 4800.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Dolphin#getMaxHeadXRot()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:206 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Max Head XRot
ทำงานยังไง
คืนค่า: 1.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Dolphin#getMaxHeadYRot()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:211 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Max Head YRot
ทำงานยังไง
คืนค่า: 1.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Dolphin#getMoistnessLevel()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:123 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Moistness Level
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: this.entityData.get(MOISTNESS_LEVEL).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Dolphin#getSwimSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:338 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Swim Sound
ทำงานยังไง
คืนค่า: SoundEvents.DOLPHIN_SWIM.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Dolphin#getSwimSplashSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:333 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Swim Splash Sound
ทำงานยังไง
คืนค่า: SoundEvents.DOLPHIN_SPLASH.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Dolphin#getTreasurePos()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:111 - Modifiers:
public - Return:
BlockPos
คืออะไร
อ่านค่า Treasure Pos
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: this.entityData.get(TREASURE_POS).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Dolphin#gotFish()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:115 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ gotFish ตาม implementation ของ Dolphin
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: this.entityData.get(GOT_FISH).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Dolphin#handleAirSupply(int)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:103 - Modifiers:
protected - Return:
void
คืออะไร
จัดการ Air Supply
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Dolphin#handleEntityEvent(byte)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:276 - Modifiers:
public - Return:
void
คืออะไร
จัดการ Entity Event
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: addParticlesAroundSelf().
Parameters
byte b
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Dolphin#increaseAirSupply(int)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:201 - Modifiers:
protected - Return:
int
คืออะไร
ดำเนินการ increaseAirSupply ตาม implementation ของ Dolphin
ทำงานยังไง
เรียกต่อ: getMaxAirSupply(). คืนค่า: this.getMaxAirSupply().
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Dolphin#mobInteract(Player,InteractionHand)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:294 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ดำเนินการ mobInteract ตาม implementation ของ Dolphin
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getItemInHand(), isEmpty(), is(), level(), playSound(), isBaby(), consume(), ageUp(). มีจุด return อย่างน้อย 2 จุด.
Parameters
Player playerInteractionHand interactionHand
ตัวอย่างใช้งาน
Player player = ...;
InteractionHand interactionHand = ...;
@Override
protected InteractionResult mobInteract(Player player, InteractionHand interactionHand) {
return super.mobInteract(player, interactionHand);
}
net.minecraft.world.entity.animal.Dolphin#pickUpItem(ServerLevel,ItemEntity)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:226 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ pickUpItem ตาม implementation ของ Dolphin
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getItemBySlot(), isEmpty(), getItem(), canHoldItem(), onItemPickup(), setItemSlot(), setGuaranteedDrop(), take().
Parameters
ServerLevel serverLevelItemEntity itemEntity
ตัวอย่างใช้งาน
ServerLevel serverLevel = ...;
ItemEntity itemEntity = ...;
@Override
protected void pickUpItem(ServerLevel serverLevel, ItemEntity itemEntity) {
super.pickUpItem(serverLevel, itemEntity);
}
net.minecraft.world.entity.animal.Dolphin#playAttackSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:186 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ playAttackSound ตาม implementation ของ Dolphin
ทำงานยังไง
เรียกต่อ: playSound().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Dolphin#readAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:149 - Modifiers:
public - Return:
void
คืออะไร
อ่าน Additional Save Data
ทำงานยังไง
เรียกต่อ: getInt(), setTreasurePos(), setGotFish(), getBoolean(), setMoisntessLevel(). สร้างออบเจ็กต์: BlockPos.
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
Dolphin instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);
net.minecraft.world.entity.animal.Dolphin#registerGoals()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:160 - Modifiers:
protected - Return:
void
คืออะไร
ลงทะเบียน Goals
ทำงานยังไง
เรียกต่อ: addGoal(), DolphinSwimToTreasureGoal(), DolphinSwimWithPlayerGoal(), PlayWithItemsGoal(), setAlertOthers(). สร้างออบเจ็กต์: BreathAirGoal, TryFindWaterGoal, Dolphin.DolphinSwimToTreasureGoal, Dolphin.DolphinSwimWithPlayerGoal.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Dolphin#setGotFish(boolean)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:119 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Got Fish
ทำงานยังไง
เรียกต่อ: set().
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Dolphin#setMoisntessLevel(int)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:127 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Moisntess Level
ทำงานยังไง
เรียกต่อ: set().
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Dolphin#setTreasurePos(BlockPos)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:107 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Treasure Pos
ทำงานยังไง
เรียกต่อ: set().
Parameters
BlockPos blockPos
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Dolphin#tick()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:240 - Modifiers:
public - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: hasImpulse. เรียกต่อ: isNoAi(), setAirSupply(), getMaxAirSupply(), isInWaterRainOrBubble(), setMoisntessLevel(), getMoistnessLevel(), hurt(), damageSources().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Dolphin#travel(Vec3)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Dolphin.java:348 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ travel ตาม implementation ของ Dolphin
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isControlledByLocalInstance(), isInWater(), moveRelative(), getSpeed(), move(), getDeltaMovement(), setDeltaMovement(), scale().
Parameters
Vec3 vec3
ตัวอย่างใช้งาน
FlyingAnimal
- Full name:
net.minecraft.world.entity.animal.FlyingAnimal - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/FlyingAnimal.java - Type:
interface - Modifiers:
public
net.minecraft.world.entity.animal.FlyingAnimal#isFlying()
- Origin:
common - Source:
net/minecraft/world/entity/animal/FlyingAnimal.java:4 - Modifiers: ``
- Return:
boolean
คืออะไร
ตรวจสอบสถานะ Flying
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
Fox
- Full name:
net.minecraft.world.entity.animal.Fox - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Fox.java - Type:
class - Modifiers:
public - Extends:
Animal - Implements:
VariantHolder<Fox.Variant>
net.minecraft.world.entity.animal.Fox#addAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:387 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Additional Save Data
ทำงานยังไง
มีการวนลูป. เรียกต่อ: getTrustedUUIDs(), add(), createUUID(), put(), putBoolean(), isSleeping(), putString(), getVariant(). สร้างออบเจ็กต์: ListTag.
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#aiStep()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:186 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ aiStep ตาม implementation ของ Fox
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: ticksSinceEaten, jumping, xxa, zza. เรียกต่อ: level(), isAlive(), isEffectiveAi(), getItemBySlot(), canEat(), finishUsingItem(), isEmpty(), setItemSlot().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#canDispenserEquipIntoSlot(EquipmentSlot)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:466 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Dispenser Equip Into Slot
ทำงานยังไง
เรียกต่อ: canPickUpLoot(). คืนค่า: equipmentSlot == EquipmentSlot.MAINHAND && this.canPickUpLoot().
Parameters
EquipmentSlot equipmentSlot
ตัวอย่างใช้งาน
EquipmentSlot equipmentSlot = ...;
@Override
protected boolean canDispenserEquipIntoSlot(EquipmentSlot equipmentSlot) {
return super.canDispenserEquipIntoSlot(equipmentSlot);
}
net.minecraft.world.entity.animal.Fox#canHoldItem(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:471 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Hold Item
ทำงานยังไง
เรียกต่อ: getItemBySlot(), isEmpty(), has(). คืนค่า: itemStack2.isEmpty() || this.ticksSinceEaten > 0 && itemStack.has(DataComponents.FOOD) && !itemStack2.has(DataComponents.FOOD).
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#checkFoxSpawnRules(EntityType<Fox>,LevelAccessor,EntitySpawnReason,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:301 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบ Fox Spawn Rules
ทำงานยังไง
เรียกต่อ: getBlockState(), below(), is(), isBrightEnoughToSpawn(). คืนค่า: levelAccessor.getBlockState(blockPos.below()).is(BlockTags.FOXES_SPAWNABLE_ON) && isBrightEnoughToSpawn(levelAccessor, blockPos).
Parameters
EntityType<Fox> entityTypeLevelAccessor levelAccessorEntitySpawnReason entitySpawnReasonBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
EntityType<Fox> entityType = ...;
LevelAccessor levelAccessor = ...;
EntitySpawnReason entitySpawnReason = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
boolean result = Fox.checkFoxSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource);
net.minecraft.world.entity.animal.Fox#createAttributes()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:282 - Modifiers:
public static - Return:
AttributeSupplier.Builder
คืออะไร
สร้าง Attributes
ทำงานยังไง
เรียกต่อ: createAnimalAttributes(), add().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#defineSynchedData(SynchedEntityData.Builder)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:132 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ defineSynchedData ตาม implementation ของ Fox
ทำงานยังไง
เรียกต่อ: define(), empty().
Parameters
SynchedEntityData.Builder builder
ตัวอย่างใช้งาน
SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder);
}
net.minecraft.world.entity.animal.Fox#dropAllDeathLoot(ServerLevel,DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:669 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ dropAllDeathLoot ตาม implementation ของ Fox
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getItemBySlot(), isEmpty(), spawnAtLocation(), setItemSlot().
Parameters
ServerLevel serverLevelDamageSource damageSource
ตัวอย่างใช้งาน
ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
@Override
protected void dropAllDeathLoot(ServerLevel serverLevel, DamageSource damageSource) {
super.dropAllDeathLoot(serverLevel, damageSource);
}
net.minecraft.world.entity.animal.Fox#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:307 - Modifiers:
public - Return:
SpawnGroupData
คืออะไร
ดำเนินการ finalizeSpawn ตาม implementation ของ Fox
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBiome(), blockPosition(), byBiome(), getGroupSize(), FoxGroupData(), setVariant(), setAge(), setTargetGoals(). สร้างออบเจ็กต์: Fox.FoxGroupData. คืนค่า: super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData).
Parameters
ServerLevelAccessor serverLevelAccessorDifficultyInstance difficultyInstanceEntitySpawnReason entitySpawnReasonSpawnGroupData spawnGroupData
ตัวอย่างใช้งาน
Fox instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);
net.minecraft.world.entity.animal.Fox#Fox(EntityType<? extends Fox>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:122 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ Fox ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: lookControl, moveControl. เรียกต่อ: FoxLookControl(), FoxMoveControl(), setPathfindingMalus(), setCanPickUpLoot(), getNavigation(), setRequiredPathLength(). สร้างออบเจ็กต์: Fox.FoxLookControl, Fox.FoxMoveControl.
Parameters
EntityType<? extends Fox> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends Fox> entityType = ...;
Level level = ...;
Fox instance = new Fox(entityType, level);
net.minecraft.world.entity.animal.Fox#getAmbientSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:636 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Ambient Sound
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isSleeping(), level(), isDay(), nextFloat(), getEntitiesOfClass(), getBoundingBox(), inflate(), isEmpty(). มีจุด return อย่างน้อย 3 จุด.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#getBreedOffspring(ServerLevel,AgeableMob)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:291 - Modifiers:
public - Return:
Fox
คืออะไร
อ่านค่า Breed Offspring
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: create(), setVariant(), nextBoolean(), getVariant(). คืนค่า: fox.
Parameters
ServerLevel serverLevelAgeableMob ageableMob
ตัวอย่างใช้งาน
Fox instance = ...;
ServerLevel serverLevel = ...;
AgeableMob ageableMob = ...;
Fox result = instance.getBreedOffspring(serverLevel, ageableMob);
net.minecraft.world.entity.animal.Fox#getCrouchAmount(float)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:596 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Crouch Amount
ทำงานยังไง
เรียกต่อ: lerp(). คืนค่า: Mth.lerp(f, this.crouchAmountO, this.crouchAmount).
Parameters
float f
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#getDeathSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:659 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Death Sound
ทำงานยังไง
คืนค่า: SoundEvents.FOX_DEATH.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#getDefaultDimensions(Pose)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:354 - Modifiers:
public - Return:
EntityDimensions
คืออะไร
อ่านค่า Default Dimensions
ทำงานยังไง
เรียกต่อ: isBaby(). คืนค่า: this.isBaby() ? BABY_DIMENSIONS : super.getDefaultDimensions(pose).
Parameters
Pose pose
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#getHeadRollAngle(float)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:592 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Head Roll Angle
ทำงานยังไง
เรียกต่อ: lerp(). คืนค่า: Mth.lerp(f, this.interestedAngleO, this.interestedAngle) * 0.11F * (float) Math.PI.
Parameters
float f
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#getHurtSound(DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:653 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Hurt Sound
ทำงานยังไง
คืนค่า: SoundEvents.FOX_HURT.
Parameters
DamageSource damageSource
ตัวอย่างใช้งาน
DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
return super.getHurtSound(damageSource);
}
net.minecraft.world.entity.animal.Fox#getLeashOffset()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:700 - Modifiers:
public - Return:
Vec3
คืออะไร
อ่านค่า Leash Offset
ทำงานยังไง
เรียกต่อ: getEyeHeight(), getBbWidth(). สร้างออบเจ็กต์: Vec3. คืนค่า: new Vec3(0.0, 0.55F * this.getEyeHeight(), this.getBbWidth() * 0.4F).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#getVariant()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:359 - Modifiers:
public - Return:
Fox.Variant
คืออะไร
อ่านค่า Variant
ทำงานยังไง
เรียกต่อ: byId(), get(). คืนค่า: Fox.Variant.byId(this.entityData.get(DATA_TYPE_ID)).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#handleEntityEvent(byte)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:256 - Modifiers:
public - Return:
void
คืออะไร
จัดการ Entity Event
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getItemBySlot(), isEmpty(), nextFloat(), random(), xRot(), getXRot(), yRot(), getYRot(). สร้างออบเจ็กต์: Vec3, ItemParticleOption.
Parameters
byte b
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#isCrouching()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:579 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Crouching
ทำงานยังไง
เรียกต่อ: getFlag(). คืนค่า: this.getFlag(4).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#isFaceplanted()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:429 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Faceplanted
ทำงานยังไง
เรียกต่อ: getFlag(). คืนค่า: this.getFlag(64).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#isFood(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:549 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Food
ทำงานยังไง
เรียกต่อ: is(). คืนค่า: itemStack.is(ItemTags.FOX_FOOD).
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#isFullyCrouched()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:571 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Fully Crouched
ทำงานยังไง
แก้ state: crouchAmount. คืนค่า: this.crouchAmount == 3.0F.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#isImmobile()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:224 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Immobile
ทำงานยังไง
เรียกต่อ: isDeadOrDying(). คืนค่า: this.isDeadOrDying().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#isInterested()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:588 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Interested
ทำงานยังไง
เรียกต่อ: getFlag(). คืนค่า: this.getFlag(8).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#isJumping()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:567 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Jumping
ทำงานยังไง
คืนค่า: this.jumping.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#isPathClear(Fox,LivingEntity)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:680 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Path Clear
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getZ(), getX(), level(), getBlockState(), containing(), getY(), canBeReplaced(). มีจุด return อย่างน้อย 2 จุด.
Parameters
Fox foxLivingEntity livingEntity
ตัวอย่างใช้งาน
Fox fox = ...;
LivingEntity livingEntity = ...;
boolean result = Fox.isPathClear(fox, livingEntity);
net.minecraft.world.entity.animal.Fox#isPouncing()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:559 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pouncing
ทำงานยังไง
เรียกต่อ: getFlag(). คืนค่า: this.getFlag(16).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#isSitting()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:421 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Sitting
ทำงานยังไง
เรียกต่อ: getFlag(). คืนค่า: this.getFlag(1).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#isSleeping()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:445 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Sleeping
ทำงานยังไง
เรียกต่อ: getFlag(). คืนค่า: this.getFlag(32).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#onOffspringSpawnedFromEgg(Player,Mob)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:554 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Offspring Spawned From Egg
ทำงานยังไง
เรียกต่อ: addTrustedUUID(), getUUID().
Parameters
Player playerMob mob
ตัวอย่างใช้งาน
Player player = ...;
Mob mob = ...;
@Override
protected void onOffspringSpawnedFromEgg(Player player, Mob mob) {
super.onOffspringSpawnedFromEgg(player, mob);
}
net.minecraft.world.entity.animal.Fox#pickUpItem(ServerLevel,ItemEntity)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:492 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ pickUpItem ตาม implementation ของ Fox
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: ticksSinceEaten. เรียกต่อ: getItem(), canHoldItem(), getCount(), dropItemStack(), split(), spitOutItem(), getItemBySlot(), onItemPickup().
Parameters
ServerLevel serverLevelItemEntity itemEntity
ตัวอย่างใช้งาน
ServerLevel serverLevel = ...;
ItemEntity itemEntity = ...;
@Override
protected void pickUpItem(ServerLevel serverLevel, ItemEntity itemEntity) {
super.pickUpItem(serverLevel, itemEntity);
}
net.minecraft.world.entity.animal.Fox#playAmbientSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:626 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ playAmbientSound ตาม implementation ของ Fox
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getAmbientSound(), playSound(), getVoicePitch().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#playEatingSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:349 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ playEatingSound ตาม implementation ของ Fox
ทำงานยังไง
เรียกต่อ: playSound().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#populateDefaultEquipmentSlots(RandomSource,DifficultyInstance)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:233 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ populateDefaultEquipmentSlots ตาม implementation ของ Fox
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: nextFloat(), nextBoolean(), setItemSlot(). สร้างออบเจ็กต์: ItemStack.
Parameters
RandomSource randomSourceDifficultyInstance difficultyInstance
ตัวอย่างใช้งาน
RandomSource randomSource = ...;
DifficultyInstance difficultyInstance = ...;
@Override
protected void populateDefaultEquipmentSlots(RandomSource randomSource, DifficultyInstance difficultyInstance) {
super.populateDefaultEquipmentSlots(randomSource, difficultyInstance);
}
net.minecraft.world.entity.animal.Fox#readAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:404 - Modifiers:
public - Return:
void
คืออะไร
อ่าน Additional Save Data
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getList(), addTrustedUUID(), loadUUID(), setSleeping(), getBoolean(), setVariant(), byName(), getString().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#registerGoals()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:141 - Modifiers:
protected - Return:
void
คืออะไร
ลงทะเบียน Goals
ทำงานยังไง
แก้ state: landTargetGoal, turtleEggTargetGoal, fishTargetGoal. เรียกต่อ: addGoal(), FoxFloatGoal(), level(), FaceplantGoal(), FoxPanicGoal(), FoxBreedGoal(), test(), trusts(). สร้างออบเจ็กต์: NearestAttackableTargetGoal<>, Fox.FoxFloatGoal, ClimbOnTopOfPowderSnowGoal, Fox.FaceplantGoal.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#setIsCrouching(boolean)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:575 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Is Crouching
ทำงานยังไง
เรียกต่อ: setFlag().
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#setIsInterested(boolean)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:584 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Is Interested
ทำงานยังไง
เรียกต่อ: setFlag().
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#setIsPouncing(boolean)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:563 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Is Pouncing
ทำงานยังไง
เรียกต่อ: setFlag().
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#setSitting(boolean)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:425 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Sitting
ทำงานยังไง
เรียกต่อ: setFlag().
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#setTarget(LivingEntity)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:600 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Target
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isDefending(), setDefending().
Parameters
LivingEntity livingEntity
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#setVariant(Fox.Variant)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:363 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Variant
ทำงานยังไง
เรียกต่อ: set(), getId().
Parameters
Fox.Variant variant
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox#tick()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:511 - Modifiers:
public - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: interestedAngleO, interestedAngle, crouchAmountO, crouchAmount. เรียกต่อ: isEffectiveAi(), isInWater(), getTarget(), level(), isThundering(), wakeUp(), isSleeping(), setSitting().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
Fox$FoxAlertableEntitiesSelector
- Full name:
net.minecraft.world.entity.animal.Fox$FoxAlertableEntitiesSelector - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Fox.java - Type:
class - Modifiers:
public - Implements:
TargetingConditions.Selector
net.minecraft.world.entity.animal.Fox$FoxAlertableEntitiesSelector#test(LivingEntity,ServerLevel)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:785 - Modifiers:
public - Return:
boolean
คืออะไร
ทดสอบเงื่อนไข test
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isTame(), isSpectator(), isCreative(), trusts(), getUUID(), isSleeping(), isDiscrete(). มีจุด return อย่างน้อย 5 จุด.
Parameters
LivingEntity livingEntityServerLevel serverLevel
ตัวอย่างใช้งาน
Fox.FoxAlertableEntitiesSelector instance = ...;
LivingEntity livingEntity = ...;
ServerLevel serverLevel = ...;
boolean result = instance.test(livingEntity, serverLevel);
Fox$FoxEatBerriesGoal
- Full name:
net.minecraft.world.entity.animal.Fox$FoxEatBerriesGoal - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Fox.java - Type:
class - Modifiers:
public - Extends:
MoveToBlockGoal
net.minecraft.world.entity.animal.Fox$FoxEatBerriesGoal#acceptedDistance()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:878 - Modifiers:
public - Return:
double
คืออะไร
ดำเนินการ acceptedDistance ตาม implementation ของ Fox$FoxEatBerriesGoal
ทำงานยังไง
คืนค่า: 2.0.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox$FoxEatBerriesGoal#canUse()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:943 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Use
ทำงานยังไง
เรียกต่อ: isSleeping(). คืนค่า: !Fox.this.isSleeping() && super.canUse().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox$FoxEatBerriesGoal#FoxEatBerriesGoal(double,int,int)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:874 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ Fox.FoxEatBerriesGoal ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
double dint iint j
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox$FoxEatBerriesGoal#isValidTarget(LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:888 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Valid Target
ทำงานยังไง
เรียกต่อ: getBlockState(), is(), getValue(), hasGlowBerries(). คืนค่า: blockState.is(Blocks.SWEET_BERRY_BUSH) && blockState.getValue(SweetBerryBushBlock.AGE) >= 2 || CaveVines.hasGlowBerries(blockState).
Parameters
LevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean isValidTarget(LevelReader levelReader, BlockPos blockPos) {
return super.isValidTarget(levelReader, blockPos);
}
net.minecraft.world.entity.animal.Fox$FoxEatBerriesGoal#onReachedTarget()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:909 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Reached Target
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getServerLevel(), level(), getGameRules(), getBoolean(), getBlockState(), is(), pickSweetBerries(), hasGlowBerries().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox$FoxEatBerriesGoal#shouldRecalculatePath()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:883 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าควร Recalculate Path
ทำงานยังไง
คืนค่า: this.tryTicks % 100 == 0.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox$FoxEatBerriesGoal#start()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:948 - Modifiers:
public - Return:
void
คืออะไร
เริ่ม start
ทำงานยังไง
แก้ state: ticksWaited. เรียกต่อ: setSitting().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox$FoxEatBerriesGoal#tick()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:894 - Modifiers:
public - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: ticksWaited. เรียกต่อ: isReachedTarget(), onReachedTarget(), nextFloat(), playSound().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
Fox$FoxGroupData
- Full name:
net.minecraft.world.entity.animal.Fox$FoxGroupData - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Fox.java - Type:
class - Modifiers:
public static - Extends:
AgeableMob.AgeableMobGroupData
net.minecraft.world.entity.animal.Fox$FoxGroupData#FoxGroupData(Fox.Variant)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:1001 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ Fox.FoxGroupData ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: variant.
Parameters
Fox.Variant variant
ตัวอย่างใช้งาน
Fox$FoxLookControl
- Full name:
net.minecraft.world.entity.animal.Fox$FoxLookControl - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Fox.java - Type:
class - Modifiers:
public - Extends:
LookControl
net.minecraft.world.entity.animal.Fox$FoxLookControl#FoxLookControl()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:1024 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ Fox.FoxLookControl ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox$FoxLookControl#resetXRotOnTick()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:1035 - Modifiers:
protected - Return:
boolean
คืออะไร
รีเซ็ต XRot On Tick
ทำงานยังไง
เรียกต่อ: isPouncing(), isCrouching(), isInterested(), isFaceplanted(). คืนค่า: !Fox.this.isPouncing() && !Fox.this.isCrouching() && !Fox.this.isInterested() && !Fox.this.isFaceplanted().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox$FoxLookControl#tick()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:1028 - Modifiers:
public - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isSleeping().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
Fox$FoxPounceGoal
- Full name:
net.minecraft.world.entity.animal.Fox$FoxPounceGoal - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Fox.java - Type:
class - Modifiers:
public - Extends:
JumpGoal
net.minecraft.world.entity.animal.Fox$FoxPounceGoal#canContinueToUse()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:1117 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Continue To Use
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getTarget(), isAlive(), getDeltaMovement(), abs(), getXRot(), onGround(), isFaceplanted(). มีจุด return อย่างน้อย 2 จุด.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox$FoxPounceGoal#canUse()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:1092 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Use
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isFullyCrouched(), getTarget(), isAlive(), getMotionDirection(), getDirection(), isPathClear(), getNavigation(), createPath(). มีจุด return อย่างน้อย 4 จุด.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox$FoxPounceGoal#isInterruptable()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:1128 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Interruptable
ทำงานยังไง
คืนค่า: false.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox$FoxPounceGoal#start()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:1133 - Modifiers:
public - Return:
void
คืออะไร
เริ่ม start
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: setJumping(), setIsPouncing(), setIsInterested(), getTarget(), getLookControl(), setLookAt(), getX(), getY(). สร้างออบเจ็กต์: Vec3.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox$FoxPounceGoal#stop()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:1148 - Modifiers:
public - Return:
void
คืออะไร
หยุด stop
ทำงานยังไง
แก้ state: crouchAmount, crouchAmountO. เรียกต่อ: setIsCrouching(), setIsInterested(), setIsPouncing().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox$FoxPounceGoal#tick()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:1157 - Modifiers:
public - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getTarget(), getLookControl(), setLookAt(), isFaceplanted(), getDeltaMovement(), getXRot(), setXRot(), rotLerp().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
Fox$Variant
- Full name:
net.minecraft.world.entity.animal.Fox$Variant - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Fox.java - Type:
enum - Modifiers:
public - Implements:
StringRepresentable
net.minecraft.world.entity.animal.Fox$Variant#byBiome(Holder<Biome>)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:1484 - Modifiers:
public static - Return:
Fox.Variant
คืออะไร
ดำเนินการ byBiome ตาม implementation ของ Fox$Variant
ทำงานยังไง
เรียกต่อ: is(). คืนค่า: holder.is(BiomeTags.SPAWNS_SNOW_FOXES) ? SNOW : RED.
Parameters
Holder<Biome> holder
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox$Variant#byId(int)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:1480 - Modifiers:
public static - Return:
Fox.Variant
คืออะไร
ดำเนินการ byId ตาม implementation ของ Fox$Variant
ทำงานยังไง
เรียกต่อ: apply(). คืนค่า: BY_ID.apply(i).
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox$Variant#byName(String)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:1476 - Modifiers:
public static - Return:
Fox.Variant
คืออะไร
ดำเนินการ byName ตาม implementation ของ Fox$Variant
ทำงานยังไง
คืนค่า: CODEC.byName(string, RED).
Parameters
String string
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox$Variant#getId()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:1472 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Id
ทำงานยังไง
คืนค่า: this.id.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Fox$Variant#getSerializedName()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Fox.java:1467 - Modifiers:
public - Return:
String
คืออะไร
อ่านค่า Serialized Name
ทำงานยังไง
คืนค่า: this.name.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
FrogVariant
- Full name:
net.minecraft.world.entity.animal.FrogVariant - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/FrogVariant.java - Type:
record - Modifiers:
public
net.minecraft.world.entity.animal.FrogVariant#bootstrap(Registry<FrogVariant>)
- Origin:
common - Source:
net/minecraft/world/entity/animal/FrogVariant.java:22 - Modifiers:
public static - Return:
FrogVariant
คืออะไร
ดำเนินการ bootstrap ตาม implementation ของ FrogVariant
ทำงานยังไง
เรียกต่อ: register(). คืนค่า: register(registry, COLD, "textures/entity/frog/cold_frog.png").
Parameters
Registry<FrogVariant> registry
ตัวอย่างใช้งาน
IronGolem
- Full name:
net.minecraft.world.entity.animal.IronGolem - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/IronGolem.java - Type:
class - Modifiers:
public - Extends:
AbstractGolem - Implements:
NeutralMob
net.minecraft.world.entity.animal.IronGolem#addAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:145 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Additional Save Data
ทำงานยังไง
เรียกต่อ: putBoolean(), isPlayerCreated(), addPersistentAngerSaveData().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
IronGolem instance = ...;
CompoundTag compoundTag = ...;
instance.addAdditionalSaveData(compoundTag);
net.minecraft.world.entity.animal.IronGolem#aiStep()
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:115 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ aiStep ตาม implementation ของ IronGolem
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: attackAnimationTick, offerFlowerTick. เรียกต่อ: level(), updatePersistentAnger().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.IronGolem#canAttackType(EntityType<?>)
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:136 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Attack Type
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isPlayerCreated(). มีจุด return อย่างน้อย 2 จุด.
Parameters
EntityType<?> entityType
ตัวอย่างใช้งาน
IronGolem instance = ...;
EntityType<?> entityType = ...;
boolean result = instance.canAttackType(entityType);
net.minecraft.world.entity.animal.IronGolem#canSpawnSprintParticle()
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:131 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Spawn Sprint Particle
ทำงานยังไง
เรียกต่อ: getDeltaMovement(), horizontalDistanceSqr(), nextInt(). คืนค่า: this.getDeltaMovement().horizontalDistanceSqr() > 2.5000003E-7F && this.random.nextInt(5) == 0.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.IronGolem#checkSpawnObstruction(LevelReader)
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:307 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบ Spawn Obstruction
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: blockPosition(), below(), getBlockState(), entityCanStandOn(), above(), isValidEmptySpawnBlock(), getFluidState(), defaultFluidState(). มีจุด return อย่างน้อย 2 จุด.
Parameters
LevelReader levelReader
ตัวอย่างใช้งาน
IronGolem instance = ...;
LevelReader levelReader = ...;
boolean result = instance.checkSpawnObstruction(levelReader);
net.minecraft.world.entity.animal.IronGolem#createAttributes()
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:92 - Modifiers:
public static - Return:
AttributeSupplier.Builder
คืออะไร
สร้าง Attributes
ทำงานยังไง
เรียกต่อ: createMobAttributes(), add().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.IronGolem#decreaseAirSupply(int)
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:101 - Modifiers:
protected - Return:
int
คืออะไร
ดำเนินการ decreaseAirSupply ตาม implementation ของ IronGolem
ทำงานยังไง
คืนค่า: i.
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.IronGolem#defineSynchedData(SynchedEntityData.Builder)
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:86 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ defineSynchedData ตาม implementation ของ IronGolem
ทำงานยังไง
เรียกต่อ: define().
Parameters
SynchedEntityData.Builder builder
ตัวอย่างใช้งาน
SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder);
}
net.minecraft.world.entity.animal.IronGolem#die(DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:302 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ die ตาม implementation ของ IronGolem
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
DamageSource damageSource
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.IronGolem#doHurtTarget(ServerLevel,Entity)
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:189 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ doHurtTarget ตาม implementation ของ IronGolem
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: attackAnimationTick. เรียกต่อ: broadcastEntityEvent(), getAttackDamage(), nextInt(), damageSources(), mobAttack(), hurtServer(), getAttributeValue(), max(). คืนค่า: bl.
Parameters
ServerLevel serverLevelEntity entity
ตัวอย่างใช้งาน
IronGolem instance = ...;
ServerLevel serverLevel = ...;
Entity entity = ...;
boolean result = instance.doHurtTarget(serverLevel, entity);
net.minecraft.world.entity.animal.IronGolem#doPush(Entity)
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:106 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ doPush ตาม implementation ของ IronGolem
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getRandom(), nextInt(), setTarget().
Parameters
Entity entity
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.IronGolem#getAttackAnimationTick()
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:237 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Attack Animation Tick
ทำงานยังไง
คืนค่า: this.attackAnimationTick.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.IronGolem#getCrackiness()
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:219 - Modifiers:
public - Return:
Crackiness.Level
คืออะไร
อ่านค่า Crackiness
ทำงานยังไง
เรียกต่อ: byFraction(), getHealth(), getMaxHealth(). คืนค่า: Crackiness.GOLEM.byFraction(this.getHealth() / this.getMaxHealth()).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.IronGolem#getDeathSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:256 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Death Sound
ทำงานยังไง
คืนค่า: SoundEvents.IRON_GOLEM_DEATH.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.IronGolem#getHurtSound(DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:251 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Hurt Sound
ทำงานยังไง
คืนค่า: SoundEvents.IRON_GOLEM_HURT.
Parameters
DamageSource damageSource
ตัวอย่างใช้งาน
DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
return super.getHurtSound(damageSource);
}
net.minecraft.world.entity.animal.IronGolem#getLeashOffset()
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:330 - Modifiers:
public - Return:
Vec3
คืออะไร
อ่านค่า Leash Offset
ทำงานยังไง
เรียกต่อ: getEyeHeight(), getBbWidth(). สร้างออบเจ็กต์: Vec3. คืนค่า: new Vec3(0.0, 0.875F * this.getEyeHeight(), this.getBbWidth() * 0.4F).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.IronGolem#getOfferFlowerTick()
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:285 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Offer Flower Tick
ทำงานยังไง
คืนค่า: this.offerFlowerTick.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.IronGolem#getPersistentAngerTarget()
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:179 - Modifiers:
public - Return:
UUID
คืออะไร
อ่านค่า Persistent Anger Target
ทำงานยังไง
คืนค่า: this.persistentAngerTarget.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.IronGolem#getRemainingPersistentAngerTime()
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:169 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Remaining Persistent Anger Time
ทำงานยังไง
คืนค่า: this.remainingPersistentAngerTime.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.IronGolem#handleEntityEvent(byte)
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:223 - Modifiers:
public - Return:
void
คืออะไร
จัดการ Entity Event
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: attackAnimationTick, offerFlowerTick. เรียกต่อ: playSound().
Parameters
byte b
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.IronGolem#hurtServer(ServerLevel,DamageSource,float)
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:208 - Modifiers:
public - Return:
boolean
คืออะไร
ประมวลผลความเสียหาย Server
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getCrackiness(), playSound(). คืนค่า: bl.
Parameters
ServerLevel serverLevelDamageSource damageSourcefloat f
ตัวอย่างใช้งาน
IronGolem instance = ...;
ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
boolean result = instance.hurtServer(serverLevel, damageSource, 0.0F);
net.minecraft.world.entity.animal.IronGolem#IronGolem(EntityType<? extends IronGolem>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:60 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ IronGolem ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
EntityType<? extends IronGolem> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends IronGolem> entityType = ...;
Level level = ...;
IronGolem instance = new IronGolem(entityType, level);
net.minecraft.world.entity.animal.IronGolem#isPlayerCreated()
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:289 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Player Created
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: (this.entityData.get(DATA_FLAGS_ID) & 1) != 0.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.IronGolem#mobInteract(Player,InteractionHand)
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:261 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ดำเนินการ mobInteract ตาม implementation ของ IronGolem
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getItemInHand(), is(), getHealth(), heal(), nextFloat(), playSound(), consume(). มีจุด return อย่างน้อย 3 จุด.
Parameters
Player playerInteractionHand interactionHand
ตัวอย่างใช้งาน
Player player = ...;
InteractionHand interactionHand = ...;
@Override
protected InteractionResult mobInteract(Player player, InteractionHand interactionHand) {
return super.mobInteract(player, interactionHand);
}
net.minecraft.world.entity.animal.IronGolem#offerFlower(boolean)
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:241 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ offerFlower ตาม implementation ของ IronGolem
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: offerFlowerTick. เรียกต่อ: level(), broadcastEntityEvent().
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.IronGolem#playStepSound(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:280 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ playStepSound ตาม implementation ของ IronGolem
ทำงานยังไง
เรียกต่อ: playSound().
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected void playStepSound(BlockPos blockPos, BlockState blockState) {
super.playStepSound(blockPos, blockState);
}
net.minecraft.world.entity.animal.IronGolem#readAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:152 - Modifiers:
public - Return:
void
คืออะไร
อ่าน Additional Save Data
ทำงานยังไง
เรียกต่อ: setPlayerCreated(), getBoolean(), readPersistentAngerSaveData(), level().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
IronGolem instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);
net.minecraft.world.entity.animal.IronGolem#registerGoals()
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:64 - Modifiers:
protected - Return:
void
คืออะไร
ลงทะเบียน Goals
ทำงานยังไง
เรียกต่อ: addGoal(). สร้างออบเจ็กต์: MeleeAttackGoal, MoveTowardsTargetGoal, MoveBackToVillageGoal, GolemRandomStrollInVillageGoal.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.IronGolem#setPersistentAngerTarget(UUID)
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:174 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Persistent Anger Target
ทำงานยังไง
แก้ state: persistentAngerTarget.
Parameters
UUID uUID
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.IronGolem#setPlayerCreated(boolean)
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:293 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Player Created
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: get(), set().
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.IronGolem#setRemainingPersistentAngerTime(int)
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:164 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Remaining Persistent Anger Time
ทำงานยังไง
แก้ state: remainingPersistentAngerTime.
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.IronGolem#startPersistentAngerTimer()
- Origin:
common - Source:
net/minecraft/world/entity/animal/IronGolem.java:159 - Modifiers:
public - Return:
void
คืออะไร
เริ่ม Persistent Anger Timer
ทำงานยังไง
เรียกต่อ: setRemainingPersistentAngerTime(), sample().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
MushroomCow
- Full name:
net.minecraft.world.entity.animal.MushroomCow - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/MushroomCow.java - Type:
class - Modifiers:
public - Extends:
Cow - Implements:
Shearable,VariantHolder<MushroomCow.Variant>
net.minecraft.world.entity.animal.MushroomCow#addAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/MushroomCow.java:182 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Additional Save Data
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: putString(), getVariant(), getSerializedName(), encodeStart(), ifSuccess(), put().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
MushroomCow instance = ...;
CompoundTag compoundTag = ...;
instance.addAdditionalSaveData(compoundTag);
net.minecraft.world.entity.animal.MushroomCow#checkMushroomSpawnRules(EntityType<MushroomCow>,LevelAccessor,EntitySpawnReason,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/MushroomCow.java:63 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบ Mushroom Spawn Rules
ทำงานยังไง
เรียกต่อ: getBlockState(), below(), is(), isBrightEnoughToSpawn(). คืนค่า: levelAccessor.getBlockState(blockPos.below()).is(BlockTags.MOOSHROOMS_SPAWNABLE_ON) && isBrightEnoughToSpawn(levelAccessor, blockPos).
Parameters
EntityType<MushroomCow> entityTypeLevelAccessor levelAccessorEntitySpawnReason entitySpawnReasonBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
EntityType<MushroomCow> entityType = ...;
LevelAccessor levelAccessor = ...;
EntitySpawnReason entitySpawnReason = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
boolean result = MushroomCow.checkMushroomSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource);
net.minecraft.world.entity.animal.MushroomCow#defineSynchedData(SynchedEntityData.Builder)
- Origin:
common - Source:
net/minecraft/world/entity/animal/MushroomCow.java:79 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ defineSynchedData ตาม implementation ของ MushroomCow
ทำงานยังไง
เรียกต่อ: define().
Parameters
SynchedEntityData.Builder builder
ตัวอย่างใช้งาน
SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder);
}
net.minecraft.world.entity.animal.MushroomCow#getBreedOffspring(ServerLevel,AgeableMob)
- Origin:
common - Source:
net/minecraft/world/entity/animal/MushroomCow.java:215 - Modifiers:
public - Return:
MushroomCow
คืออะไร
อ่านค่า Breed Offspring
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: create(), setVariant(), getOffspringVariant(). คืนค่า: mushroomCow.
Parameters
ServerLevel serverLevelAgeableMob ageableMob
ตัวอย่างใช้งาน
MushroomCow instance = ...;
ServerLevel serverLevel = ...;
AgeableMob ageableMob = ...;
MushroomCow result = instance.getBreedOffspring(serverLevel, ageableMob);
net.minecraft.world.entity.animal.MushroomCow#getVariant()
- Origin:
common - Source:
net/minecraft/world/entity/animal/MushroomCow.java:211 - Modifiers:
public - Return:
MushroomCow.Variant
คืออะไร
อ่านค่า Variant
ทำงานยังไง
เรียกต่อ: byName(), get(). คืนค่า: MushroomCow.Variant.byName(this.entityData.get(DATA_TYPE)).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.MushroomCow#getWalkTargetValue(BlockPos,LevelReader)
- Origin:
common - Source:
net/minecraft/world/entity/animal/MushroomCow.java:58 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Walk Target Value
ทำงานยังไง
เรียกต่อ: getBlockState(), below(), is(), getPathfindingCostFromLightLevels(). คืนค่า: levelReader.getBlockState(blockPos.below()).is(Blocks.MYCELIUM) ? 10.0F : levelReader.getPathfindingCostFromLightLevels(blockPos).
Parameters
BlockPos blockPosLevelReader levelReader
ตัวอย่างใช้งาน
MushroomCow instance = ...;
BlockPos blockPos = ...;
LevelReader levelReader = ...;
float result = instance.getWalkTargetValue(blockPos, levelReader);
net.minecraft.world.entity.animal.MushroomCow#mobInteract(Player,InteractionHand)
- Origin:
common - Source:
net/minecraft/world/entity/animal/MushroomCow.java:85 - Modifiers:
public - Return:
InteractionResult
คืออะไร
ดำเนินการ mobInteract ตาม implementation ของ MushroomCow
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: stewEffects. เรียกต่อ: getItemInHand(), is(), isBaby(), set(), createFilledResult(), setItemInHand(), playSound(), readyForShearing(). สร้างออบเจ็กต์: ItemStack. มีจุด return อย่างน้อย 5 จุด.
Parameters
Player playerInteractionHand interactionHand
ตัวอย่างใช้งาน
MushroomCow instance = ...;
Player player = ...;
InteractionHand interactionHand = ...;
InteractionResult result = instance.mobInteract(player, interactionHand);
net.minecraft.world.entity.animal.MushroomCow#MushroomCow(EntityType<? extends MushroomCow>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/MushroomCow.java:54 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ MushroomCow ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
EntityType<? extends MushroomCow> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends MushroomCow> entityType = ...;
Level level = ...;
MushroomCow instance = new MushroomCow(entityType, level);
net.minecraft.world.entity.animal.MushroomCow#readAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/MushroomCow.java:191 - Modifiers:
public - Return:
void
คืออะไร
อ่าน Additional Save Data
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: stewEffects. เรียกต่อ: setVariant(), byName(), getString(), contains(), parse(), get(), ifSuccess().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
MushroomCow instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);
net.minecraft.world.entity.animal.MushroomCow#readyForShearing()
- Origin:
common - Source:
net/minecraft/world/entity/animal/MushroomCow.java:177 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ readyForShearing ตาม implementation ของ MushroomCow
ทำงานยังไง
เรียกต่อ: isAlive(), isBaby(). คืนค่า: this.isAlive() && !this.isBaby().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.MushroomCow#setVariant(MushroomCow.Variant)
- Origin:
common - Source:
net/minecraft/world/entity/animal/MushroomCow.java:207 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Variant
ทำงานยังไง
เรียกต่อ: set().
Parameters
MushroomCow.Variant variant
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.MushroomCow#shear(ServerLevel,SoundSource,ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/animal/MushroomCow.java:164 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ shear ตาม implementation ของ MushroomCow
ทำงานยังไง
มีการวนลูป. เรียกต่อ: playSound(), convertTo(), single(), sendParticles(), getX(), getY(), getZ(), dropFromShearingLootTable(). สร้างออบเจ็กต์: ItemEntity.
Parameters
ServerLevel serverLevelSoundSource soundSourceItemStack itemStack
ตัวอย่างใช้งาน
MushroomCow instance = ...;
ServerLevel serverLevel = ...;
SoundSource soundSource = ...;
ItemStack itemStack = ...;
instance.shear(serverLevel, soundSource, itemStack);
net.minecraft.world.entity.animal.MushroomCow#thunderHit(ServerLevel,LightningBolt)
- Origin:
common - Source:
net/minecraft/world/entity/animal/MushroomCow.java:69 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ thunderHit ตาม implementation ของ MushroomCow
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: lastLightningBoltUUID. เรียกต่อ: getUUID(), equals(), setVariant(), getVariant(), playSound().
Parameters
ServerLevel serverLevelLightningBolt lightningBolt
ตัวอย่างใช้งาน
MushroomCow instance = ...;
ServerLevel serverLevel = ...;
LightningBolt lightningBolt = ...;
instance.thunderHit(serverLevel, lightningBolt);
MushroomCow$Variant
- Full name:
net.minecraft.world.entity.animal.MushroomCow$Variant - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/MushroomCow.java - Type:
enum - Modifiers:
public - Implements:
StringRepresentable
net.minecraft.world.entity.animal.MushroomCow$Variant#getBlockState()
- Origin:
common - Source:
net/minecraft/world/entity/animal/MushroomCow.java:251 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า Block State
ทำงานยังไง
คืนค่า: this.blockState.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.MushroomCow$Variant#getSerializedName()
- Origin:
common - Source:
net/minecraft/world/entity/animal/MushroomCow.java:255 - Modifiers:
public - Return:
String
คืออะไร
อ่านค่า Serialized Name
ทำงานยังไง
คืนค่า: this.type.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
Ocelot
- Full name:
net.minecraft.world.entity.animal.Ocelot - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Ocelot.java - Type:
class - Modifiers:
public - Extends:
Animal
net.minecraft.world.entity.animal.Ocelot#addAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Ocelot.java:74 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Additional Save Data
ทำงานยังไง
เรียกต่อ: putBoolean(), isTrusting().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Ocelot#checkOcelotSpawnRules(EntityType<Ocelot>,LevelAccessor,EntitySpawnReason,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Ocelot.java:224 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบ Ocelot Spawn Rules
ทำงานยังไง
เรียกต่อ: nextInt(). คืนค่า: randomSource.nextInt(3) != 0.
Parameters
EntityType<Ocelot> entityTypeLevelAccessor levelAccessorEntitySpawnReason entitySpawnReasonBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
EntityType<Ocelot> entityType = ...;
LevelAccessor levelAccessor = ...;
EntitySpawnReason entitySpawnReason = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
boolean result = Ocelot.checkOcelotSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource);
net.minecraft.world.entity.animal.Ocelot#checkSpawnObstruction(LevelReader)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Ocelot.java:230 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบ Spawn Obstruction
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isUnobstructed(), containsAnyLiquid(), getBoundingBox(), blockPosition(), getY(), getSeaLevel(), getBlockState(), below(). มีจุด return อย่างน้อย 3 จุด.
Parameters
LevelReader levelReader
ตัวอย่างใช้งาน
Ocelot instance = ...;
LevelReader levelReader = ...;
boolean result = instance.checkSpawnObstruction(levelReader);
net.minecraft.world.entity.animal.Ocelot#createAttributes()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Ocelot.java:131 - Modifiers:
public static - Return:
AttributeSupplier.Builder
คืออะไร
สร้าง Attributes
ทำงานยังไง
เรียกต่อ: createAnimalAttributes(), add(). คืนค่า: Animal.createAnimalAttributes().add(Attributes.MAX_HEALTH, 10.0).add(Attributes.MOVEMENT_SPEED, 0.3F).add(Attributes.ATTACK_DAMAGE, 3.0).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Ocelot#customServerAiStep(ServerLevel)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Ocelot.java:106 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ customServerAiStep ตาม implementation ของ Ocelot
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getMoveControl(), hasWanted(), getSpeedModifier(), setPose(), setSprinting().
Parameters
ServerLevel serverLevel
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Ocelot#defineSynchedData(SynchedEntityData.Builder)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Ocelot.java:86 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ defineSynchedData ตาม implementation ของ Ocelot
ทำงานยังไง
เรียกต่อ: define().
Parameters
SynchedEntityData.Builder builder
ตัวอย่างใช้งาน
SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder);
}
net.minecraft.world.entity.animal.Ocelot#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Ocelot.java:247 - Modifiers:
public - Return:
SpawnGroupData
คืออะไร
ดำเนินการ finalizeSpawn ตาม implementation ของ Ocelot
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: AgeableMobGroupData(). สร้างออบเจ็กต์: AgeableMob.AgeableMobGroupData. คืนค่า: super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData).
Parameters
ServerLevelAccessor serverLevelAccessorDifficultyInstance difficultyInstanceEntitySpawnReason entitySpawnReasonSpawnGroupData spawnGroupData
ตัวอย่างใช้งาน
Ocelot instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);
net.minecraft.world.entity.animal.Ocelot#getAmbientSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Ocelot.java:135 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Ambient Sound
ทำงานยังไง
คืนค่า: SoundEvents.OCELOT_AMBIENT.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Ocelot#getAmbientSoundInterval()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Ocelot.java:141 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Ambient Sound Interval
ทำงานยังไง
คืนค่า: 900.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Ocelot#getBreedOffspring(ServerLevel,AgeableMob)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Ocelot.java:214 - Modifiers:
public - Return:
Ocelot
คืออะไร
อ่านค่า Breed Offspring
ทำงานยังไง
เรียกต่อ: create(). คืนค่า: EntityType.OCELOT.create(serverLevel, EntitySpawnReason.BREEDING).
Parameters
ServerLevel serverLevelAgeableMob ageableMob
ตัวอย่างใช้งาน
Ocelot instance = ...;
ServerLevel serverLevel = ...;
AgeableMob ageableMob = ...;
Ocelot result = instance.getBreedOffspring(serverLevel, ageableMob);
net.minecraft.world.entity.animal.Ocelot#getDeathSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Ocelot.java:151 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Death Sound
ทำงานยังไง
คืนค่า: SoundEvents.OCELOT_DEATH.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Ocelot#getHurtSound(DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Ocelot.java:146 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Hurt Sound
ทำงานยังไง
คืนค่า: SoundEvents.OCELOT_HURT.
Parameters
DamageSource damageSource
ตัวอย่างใช้งาน
DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
return super.getHurtSound(damageSource);
}
net.minecraft.world.entity.animal.Ocelot#getLeashOffset()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Ocelot.java:259 - Modifiers:
public - Return:
Vec3
คืออะไร
อ่านค่า Leash Offset
ทำงานยังไง
เรียกต่อ: getEyeHeight(), getBbWidth(). สร้างออบเจ็กต์: Vec3. คืนค่า: new Vec3(0.0, 0.5F * this.getEyeHeight(), this.getBbWidth() * 0.4F).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Ocelot#handleEntityEvent(byte)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Ocelot.java:178 - Modifiers:
public - Return:
void
คืออะไร
จัดการ Entity Event
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: spawnTrustingParticles().
Parameters
byte b
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Ocelot#isFood(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Ocelot.java:219 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Food
ทำงานยังไง
เรียกต่อ: is(). คืนค่า: itemStack.is(ItemTags.OCELOT_FOOD).
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Ocelot#isSteppingCarefully()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Ocelot.java:264 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Stepping Carefully
ทำงานยังไง
เรียกต่อ: isCrouching(). คืนค่า: this.isCrouching() || super.isSteppingCarefully().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Ocelot#mobInteract(Player,InteractionHand)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Ocelot.java:156 - Modifiers:
public - Return:
InteractionResult
คืออะไร
ดำเนินการ mobInteract ตาม implementation ของ Ocelot
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: temptGoal. เรียกต่อ: getItemInHand(), isRunning(), isTrusting(), isFood(), distanceToSqr(), usePlayerItem(), level(), nextInt(). มีจุด return อย่างน้อย 2 จุด.
Parameters
Player playerInteractionHand interactionHand
ตัวอย่างใช้งาน
Ocelot instance = ...;
Player player = ...;
InteractionHand interactionHand = ...;
InteractionResult result = instance.mobInteract(player, interactionHand);
net.minecraft.world.entity.animal.Ocelot#Ocelot(EntityType<? extends Ocelot>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Ocelot.java:60 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ Ocelot ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: reassessTrustingGoals().
Parameters
EntityType<? extends Ocelot> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends Ocelot> entityType = ...;
Level level = ...;
Ocelot instance = new Ocelot(entityType, level);
net.minecraft.world.entity.animal.Ocelot#readAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Ocelot.java:80 - Modifiers:
public - Return:
void
คืออะไร
อ่าน Additional Save Data
ทำงานยังไง
เรียกต่อ: setTrusting(), getBoolean().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Ocelot#reassessTrustingGoals()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Ocelot.java:203 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ reassessTrustingGoals ตาม implementation ของ Ocelot
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: ocelotAvoidPlayersGoal. เรียกต่อ: removeGoal(), isTrusting(), addGoal(). สร้างออบเจ็กต์: Ocelot.OcelotAvoidEntityGoal<>.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Ocelot#registerGoals()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Ocelot.java:92 - Modifiers:
protected - Return:
void
คืออะไร
ลงทะเบียน Goals
ทำงานยังไง
แก้ state: temptGoal. เรียกต่อ: OcelotTemptGoal(), is(), addGoal(). สร้างออบเจ็กต์: Ocelot.OcelotTemptGoal, FloatGoal, LeapAtTargetGoal, OcelotAttackGoal.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Ocelot#removeWhenFarAway(double)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Ocelot.java:126 - Modifiers:
public - Return:
boolean
คืออะไร
ลบ When Far Away
ทำงานยังไง
เรียกต่อ: isTrusting(). คืนค่า: !this.isTrusting() && this.tickCount > 2400.
Parameters
double d
ตัวอย่างใช้งาน
Panda
- Full name:
net.minecraft.world.entity.animal.Panda - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Panda.java - Type:
class - Modifiers:
public - Extends:
Animal
net.minecraft.world.entity.animal.Panda#addAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:228 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Additional Save Data
ทำงานยังไง
เรียกต่อ: putString(), getMainGene(), getSerializedName(), getHiddenGene().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#canBeLeashed()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:311 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Be Leashed
ทำงานยังไง
คืนค่า: false.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#canDispenserEquipIntoSlot(EquipmentSlot)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:108 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Dispenser Equip Into Slot
ทำงานยังไง
เรียกต่อ: canPickUpLoot(). คืนค่า: equipmentSlot == EquipmentSlot.MAINHAND && this.canPickUpLoot().
Parameters
EquipmentSlot equipmentSlot
ตัวอย่างใช้งาน
EquipmentSlot equipmentSlot = ...;
@Override
protected boolean canDispenserEquipIntoSlot(EquipmentSlot equipmentSlot) {
return super.canDispenserEquipIntoSlot(equipmentSlot);
}
net.minecraft.world.entity.animal.Panda#canPerformAction()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:681 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Perform Action
ทำงานยังไง
เรียกต่อ: isOnBack(), isScared(), isEating(), isRolling(), isSitting(). คืนค่า: !this.isOnBack() && !this.isScared() && !this.isEating() && !this.isRolling() && !this.isSitting().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#createAttributes()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:278 - Modifiers:
public static - Return:
AttributeSupplier.Builder
คืออะไร
สร้าง Attributes
ทำงานยังไง
เรียกต่อ: createAnimalAttributes(), add(). คืนค่า: Animal.createAnimalAttributes().add(Attributes.MOVEMENT_SPEED, 0.15F).add(Attributes.ATTACK_DAMAGE, 6.0).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#defineSynchedData(SynchedEntityData.Builder)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:204 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ defineSynchedData ตาม implementation ของ Panda
ทำงานยังไง
เรียกต่อ: define().
Parameters
SynchedEntityData.Builder builder
ตัวอย่างใช้งาน
SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder);
}
net.minecraft.world.entity.animal.Panda#doHurtTarget(ServerLevel,Entity)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:316 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ doHurtTarget ตาม implementation ของ Panda
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: didBite. เรียกต่อ: isAggressive(). คืนค่า: super.doHurtTarget(serverLevel, entity).
Parameters
ServerLevel serverLevelEntity entity
ตัวอย่างใช้งาน
Panda instance = ...;
ServerLevel serverLevel = ...;
Entity entity = ...;
boolean result = instance.doHurtTarget(serverLevel, entity);
net.minecraft.world.entity.animal.Panda#eat(boolean)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:145 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ eat ตาม implementation ของ Panda
ทำงานยังไง
เรียกต่อ: set().
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:540 - Modifiers:
public - Return:
SpawnGroupData
คืออะไร
ดำเนินการ finalizeSpawn ตาม implementation ของ Panda
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getRandom(), setMainGene(), setHiddenGene(), setAttributes(), AgeableMobGroupData(). สร้างออบเจ็กต์: AgeableMob.AgeableMobGroupData. คืนค่า: super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData).
Parameters
ServerLevelAccessor serverLevelAccessorDifficultyInstance difficultyInstanceEntitySpawnReason entitySpawnReasonSpawnGroupData spawnGroupData
ตัวอย่างใช้งาน
Panda instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);
net.minecraft.world.entity.animal.Panda#getAmbientSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:649 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Ambient Sound
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isAggressive(), isWorried(). มีจุด return อย่างน้อย 2 จุด.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#getBreedOffspring(ServerLevel,AgeableMob)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:242 - Modifiers:
public - Return:
AgeableMob
คืออะไร
อ่านค่า Breed Offspring
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: create(), setGeneFromParents(), setAttributes(). คืนค่า: panda.
Parameters
ServerLevel serverLevelAgeableMob ageableMob
ตัวอย่างใช้งาน
Panda instance = ...;
ServerLevel serverLevel = ...;
AgeableMob ageableMob = ...;
AgeableMob result = instance.getBreedOffspring(serverLevel, ageableMob);
net.minecraft.world.entity.animal.Panda#getDeathSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:669 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Death Sound
ทำงานยังไง
คืนค่า: SoundEvents.PANDA_DEATH.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#getDefaultDimensions(Pose)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:685 - Modifiers:
public - Return:
EntityDimensions
คืออะไร
อ่านค่า Default Dimensions
ทำงานยังไง
เรียกต่อ: isBaby(). คืนค่า: this.isBaby() ? BABY_DIMENSIONS : super.getDefaultDimensions(pose).
Parameters
Pose pose
ตัวอย่างใช้งาน
Panda instance = ...;
Pose pose = ...;
EntityDimensions result = instance.getDefaultDimensions(pose);
net.minecraft.world.entity.animal.Panda#getHiddenGene()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:184 - Modifiers:
public - Return:
Panda.Gene
คืออะไร
อ่านค่า Hidden Gene
ทำงานยังไง
เรียกต่อ: byId(), get(). คืนค่า: Panda.Gene.byId(this.entityData.get(HIDDEN_GENE_ID)).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#getHurtSound(DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:675 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Hurt Sound
ทำงานยังไง
คืนค่า: SoundEvents.PANDA_HURT.
Parameters
DamageSource damageSource
ตัวอย่างใช้งาน
DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
return super.getHurtSound(damageSource);
}
net.minecraft.world.entity.animal.Panda#getLieOnBackAmount(float)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:468 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Lie On Back Amount
ทำงานยังไง
เรียกต่อ: lerp(). คืนค่า: Mth.lerp(f, this.onBackAmountO, this.onBackAmount).
Parameters
float f
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#getMainGene()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:172 - Modifiers:
public - Return:
Panda.Gene
คืออะไร
อ่านค่า Main Gene
ทำงานยังไง
เรียกต่อ: byId(), get(). คืนค่า: Panda.Gene.byId(this.entityData.get(MAIN_GENE_ID)).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#getRollAmount(float)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:472 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Roll Amount
ทำงานยังไง
เรียกต่อ: lerp(). คืนค่า: Mth.lerp(f, this.rollAmountO, this.rollAmount).
Parameters
float f
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#getSitAmount(float)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:464 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Sit Amount
ทำงานยังไง
เรียกต่อ: lerp(). คืนค่า: Mth.lerp(f, this.sitAmountO, this.sitAmount).
Parameters
float f
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#getSneezeCounter()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:164 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Sneeze Counter
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: this.entityData.get(SNEEZE_COUNTER).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#getUnhappyCounter()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:113 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Unhappy Counter
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: this.entityData.get(UNHAPPY_COUNTER).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#getVariant()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:282 - Modifiers:
public - Return:
Panda.Gene
คืออะไร
อ่านค่า Variant
ทำงานยังไง
เรียกต่อ: getVariantFromGenes(), getMainGene(), getHiddenGene(). คืนค่า: Panda.Gene.getVariantFromGenes(this.getMainGene(), this.getHiddenGene()).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#hurtServer(ServerLevel,DamageSource,float)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:534 - Modifiers:
public - Return:
boolean
คืออะไร
ประมวลผลความเสียหาย Server
ทำงานยังไง
เรียกต่อ: sit(). คืนค่า: super.hurtServer(serverLevel, damageSource, f).
Parameters
ServerLevel serverLevelDamageSource damageSourcefloat f
ตัวอย่างใช้งาน
Panda instance = ...;
ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
boolean result = instance.hurtServer(serverLevel, damageSource, 0.0F);
net.minecraft.world.entity.animal.Panda#isAggressive()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:306 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Aggressive
ทำงานยังไง
เรียกต่อ: getVariant(). คืนค่า: this.getVariant() == Panda.Gene.AGGRESSIVE.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#isBrown()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:298 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Brown
ทำงานยังไง
เรียกต่อ: getVariant(). คืนค่า: this.getVariant() == Panda.Gene.BROWN.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#isEating()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:141 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Eating
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: this.entityData.get(EAT_COUNTER) > 0.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#isFood(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:664 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Food
ทำงานยังไง
เรียกต่อ: is(). คืนค่า: itemStack.is(ItemTags.PANDA_FOOD).
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#isLazy()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:286 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Lazy
ทำงานยังไง
เรียกต่อ: getVariant(). คืนค่า: this.getVariant() == Panda.Gene.LAZY.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#isOnBack()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:133 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ On Back
ทำงานยังไง
เรียกต่อ: getFlag(). คืนค่า: this.getFlag(16).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#isPlayful()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:294 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Playful
ทำงานยังไง
เรียกต่อ: getVariant(). คืนค่า: this.getVariant() == Panda.Gene.PLAYFUL.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#isRolling()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:196 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Rolling
ทำงานยังไง
เรียกต่อ: getFlag(). คืนค่า: this.getFlag(4).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#isScared()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:386 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Scared
ทำงานยังไง
เรียกต่อ: isWorried(), level(), isThundering(). คืนค่า: this.isWorried() && this.level().isThundering().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#isSitting()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:125 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Sitting
ทำงานยังไง
เรียกต่อ: getFlag(). คืนค่า: this.getFlag(8).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#isSneezing()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:121 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Sneezing
ทำงานยังไง
เรียกต่อ: getFlag(). คืนค่า: this.getFlag(2).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#isWeak()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:302 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Weak
ทำงานยังไง
เรียกต่อ: getVariant(). คืนค่า: this.getVariant() == Panda.Gene.WEAK.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#isWorried()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:290 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Worried
ทำงานยังไง
เรียกต่อ: getVariant(). คืนค่า: this.getVariant() == Panda.Gene.WORRIED.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#mobInteract(Player,InteractionHand)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:604 - Modifiers:
public - Return:
InteractionResult
คืออะไร
ดำเนินการ mobInteract ตาม implementation ของ Panda
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: gotBamboo. เรียกต่อ: getItemInHand(), isScared(), isOnBack(), setOnBack(), isFood(), getTarget(), isBaby(), usePlayerItem(). สร้างออบเจ็กต์: ItemStack. มีจุด return อย่างน้อย 5 จุด.
Parameters
Player playerInteractionHand interactionHand
ตัวอย่างใช้งาน
Panda instance = ...;
Player player = ...;
InteractionHand interactionHand = ...;
InteractionResult result = instance.mobInteract(player, interactionHand);
net.minecraft.world.entity.animal.Panda#Panda(EntityType<? extends Panda>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:100 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ Panda ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: moveControl. เรียกต่อ: PandaMoveControl(), isBaby(), setCanPickUpLoot(). สร้างออบเจ็กต์: Panda.PandaMoveControl.
Parameters
EntityType<? extends Panda> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends Panda> entityType = ...;
Level level = ...;
Panda instance = new Panda(entityType, level);
net.minecraft.world.entity.animal.Panda#pickUpItem(ServerLevel,ItemEntity)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:522 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ pickUpItem ตาม implementation ของ Panda
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getItemBySlot(), isEmpty(), canPickUpAndEat(), onItemPickup(), getItem(), setItemSlot(), setGuaranteedDrop(), take().
Parameters
ServerLevel serverLevelItemEntity itemEntity
ตัวอย่างใช้งาน
ServerLevel serverLevel = ...;
ItemEntity itemEntity = ...;
@Override
protected void pickUpItem(ServerLevel serverLevel, ItemEntity itemEntity) {
super.pickUpItem(serverLevel, itemEntity);
}
net.minecraft.world.entity.animal.Panda#playAttackSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:325 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ playAttackSound ตาม implementation ของ Panda
ทำงานยังไง
เรียกต่อ: playSound().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#playStepSound(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:659 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ playStepSound ตาม implementation ของ Panda
ทำงานยังไง
เรียกต่อ: playSound().
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected void playStepSound(BlockPos blockPos, BlockState blockState) {
super.playStepSound(blockPos, blockState);
}
net.minecraft.world.entity.animal.Panda#readAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:235 - Modifiers:
public - Return:
void
คืออะไร
อ่าน Additional Save Data
ทำงานยังไง
เรียกต่อ: setMainGene(), byName(), getString(), setHiddenGene().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#registerGoals()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:257 - Modifiers:
protected - Return:
void
คืออะไร
ลงทะเบียน Goals
ทำงานยังไง
แก้ state: lookAtPlayerGoal. เรียกต่อ: addGoal(), PandaPanicGoal(), PandaBreedGoal(), PandaAttackGoal(), is(), PandaSitGoal(), PandaLieOnBackGoal(), PandaSneezeGoal(). สร้างออบเจ็กต์: FloatGoal, Panda.PandaPanicGoal, Panda.PandaBreedGoal, Panda.PandaAttackGoal.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#roll(boolean)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:200 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ roll ตาม implementation ของ Panda
ทำงานยังไง
เรียกต่อ: setFlag().
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#setAttributes()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:586 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Attributes
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isWeak(), getAttribute(), setBaseValue(), isLazy().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#setGeneFromParents(Panda,Panda)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:556 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Gene From Parents
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: nextBoolean(), setMainGene(), getOneOfGenesRandomly(), setHiddenGene(), getRandom(), nextInt().
Parameters
Panda pandaPanda panda2
ตัวอย่างใช้งาน
Panda instance = ...;
Panda panda = ...;
Panda panda2 = ...;
instance.setGeneFromParents(panda, panda2);
net.minecraft.world.entity.animal.Panda#setHiddenGene(Panda.Gene)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:188 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Hidden Gene
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getId(), getRandom(), set().
Parameters
Panda.Gene gene
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#setMainGene(Panda.Gene)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:176 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Main Gene
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getId(), getRandom(), set().
Parameters
Panda.Gene gene
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#setOnBack(boolean)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:137 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า On Back
ทำงานยังไง
เรียกต่อ: setFlag().
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#setSneezeCounter(int)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:168 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Sneeze Counter
ทำงานยังไง
เรียกต่อ: set().
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#setUnhappyCounter(int)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:117 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Unhappy Counter
ทำงานยังไง
เรียกต่อ: set().
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#sit(boolean)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:129 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ sit ตาม implementation ของ Panda
ทำงานยังไง
เรียกต่อ: setFlag().
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#sneeze(boolean)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:157 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ sneeze ตาม implementation ของ Panda
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: setFlag(), setSneezeCounter().
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda#tick()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:330 - Modifiers:
public - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: gotBamboo, didBite, rollCounter. เรียกต่อ: isWorried(), level(), isThundering(), isInWater(), sit(), eat(), isEating(), getTarget().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
Panda$Gene
- Full name:
net.minecraft.world.entity.animal.Panda$Gene - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Panda.java - Type:
enum - Modifiers:
public - Implements:
StringRepresentable
net.minecraft.world.entity.animal.Panda$Gene#byId(int)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:737 - Modifiers:
public static - Return:
Panda.Gene
คืออะไร
ดำเนินการ byId ตาม implementation ของ Panda$Gene
ทำงานยังไง
เรียกต่อ: apply(). คืนค่า: BY_ID.apply(i).
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda$Gene#byName(String)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:741 - Modifiers:
public static - Return:
Panda.Gene
คืออะไร
ดำเนินการ byName ตาม implementation ของ Panda$Gene
ทำงานยังไง
คืนค่า: CODEC.byName(string, NORMAL).
Parameters
String string
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda$Gene#getId()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:716 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Id
ทำงานยังไง
คืนค่า: this.id.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda$Gene#getRandom(RandomSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:745 - Modifiers:
public static - Return:
Panda.Gene
คืออะไร
อ่านค่า Random
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: nextInt(). มีจุด return อย่างน้อย 6 จุด.
Parameters
RandomSource randomSource
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda$Gene#getSerializedName()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:720 - Modifiers:
public - Return:
String
คืออะไร
อ่านค่า Serialized Name
ทำงานยังไง
คืนค่า: this.name.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Panda$Gene#isRecessive()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Panda.java:725 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Recessive
ทำงานยังไง
คืนค่า: this.isRecessive.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
Parrot
- Full name:
net.minecraft.world.entity.animal.Parrot - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Parrot.java - Type:
class - Modifiers:
public - Extends:
ShoulderRidingEntity - Implements:
VariantHolder<Parrot.Variant>,FlyingAnimal
net.minecraft.world.entity.animal.Parrot#addAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:410 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Additional Save Data
ทำงานยังไง
เรียกต่อ: putInt(), getVariant().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Parrot#aiStep()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:178 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ aiStep ตาม implementation ของ Parrot
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: jukebox, partyParrot. เรียกต่อ: closerToCenterThan(), position(), level(), getBlockState(), is(), nextInt(), imitateNearbyMobs(), calculateFlapping().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Parrot#canFlyToOwner()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:427 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Fly To Owner
ทำงานยังไง
คืนค่า: true.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Parrot#canMate(Animal)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:304 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Mate
ทำงานยังไง
คืนค่า: false.
Parameters
Animal animal
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Parrot#checkFallDamage(double,boolean,BlockState,BlockPos)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:300 - Modifiers:
protected - Return:
void
คืออะไร
ตรวจสอบ Fall Damage
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
double dboolean blBlockState blockStateBlockPos 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.animal.Parrot#checkParrotSpawnRules(EntityType<Parrot>,LevelAccessor,EntitySpawnReason,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:294 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบ Parrot Spawn Rules
ทำงานยังไง
เรียกต่อ: getBlockState(), below(), is(), isBrightEnoughToSpawn(). คืนค่า: levelAccessor.getBlockState(blockPos.below()).is(BlockTags.PARROTS_SPAWNABLE_ON) && isBrightEnoughToSpawn(levelAccessor, blockPos).
Parameters
EntityType<Parrot> entityTypeLevelAccessor levelAccessorEntitySpawnReason entitySpawnReasonBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
EntityType<Parrot> entityType = ...;
LevelAccessor levelAccessor = ...;
EntitySpawnReason entitySpawnReason = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
boolean result = Parrot.checkParrotSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource);
net.minecraft.world.entity.animal.Parrot#createAttributes()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:162 - Modifiers:
public static - Return:
AttributeSupplier.Builder
คืออะไร
สร้าง Attributes
ทำงานยังไง
เรียกต่อ: createAnimalAttributes(), add().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Parrot#createNavigation(Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:170 - Modifiers:
protected - Return:
PathNavigation
คืออะไร
สร้าง Navigation
ทำงานยังไง
เรียกต่อ: setCanOpenDoors(), setCanFloat(). สร้างออบเจ็กต์: FlyingPathNavigation. คืนค่า: flyingPathNavigation.
Parameters
Level level
ตัวอย่างใช้งาน
Level level = ...;
@Override
protected PathNavigation createNavigation(Level level) {
return super.createNavigation(level);
}
net.minecraft.world.entity.animal.Parrot#defineSynchedData(SynchedEntityData.Builder)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:404 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ defineSynchedData ตาม implementation ของ Parrot
ทำงานยังไง
เรียกต่อ: define().
Parameters
SynchedEntityData.Builder builder
ตัวอย่างใช้งาน
SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder);
}
net.minecraft.world.entity.animal.Parrot#doPush(Entity)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:379 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ doPush ตาม implementation ของ Parrot
ทำงานยังไง
ตรวจเงื่อนไขด้วย if.
Parameters
Entity entity
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Parrot#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:132 - Modifiers:
public - Return:
SpawnGroupData
คืออะไร
ดำเนินการ finalizeSpawn ตาม implementation ของ Parrot
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: setVariant(), getRandom(), values(), AgeableMobGroupData(). สร้างออบเจ็กต์: AgeableMob.AgeableMobGroupData. คืนค่า: super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData).
Parameters
ServerLevelAccessor serverLevelAccessorDifficultyInstance difficultyInstanceEntitySpawnReason entitySpawnReasonSpawnGroupData spawnGroupData
ตัวอย่างใช้งาน
Parrot instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);
net.minecraft.world.entity.animal.Parrot#getAmbient(Level,RandomSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:321 - Modifiers:
public static - Return:
SoundEvent
คืออะไร
อ่านค่า Ambient
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getDifficulty(), nextInt(), newArrayList(), keySet(), getImitatedSound(), get(), size(). มีจุด return อย่างน้อย 2 จุด.
Parameters
Level levelRandomSource randomSource
ตัวอย่างใช้งาน
Level level = ...;
RandomSource randomSource = ...;
SoundEvent result = Parrot.getAmbient(level, randomSource);
net.minecraft.world.entity.animal.Parrot#getAmbientSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:315 - Modifiers:
public - Return:
SoundEvent
คืออะไร
อ่านค่า Ambient Sound
ทำงานยังไง
เรียกต่อ: getAmbient(), level(). คืนค่า: getAmbient(this.level(), this.level().random).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Parrot#getBreedOffspring(ServerLevel,AgeableMob)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:309 - Modifiers:
public - Return:
AgeableMob
คืออะไร
อ่านค่า Breed Offspring
ทำงานยังไง
คืนค่า: null.
Parameters
ServerLevel serverLevelAgeableMob ageableMob
ตัวอย่างใช้งาน
Parrot instance = ...;
ServerLevel serverLevel = ...;
AgeableMob ageableMob = ...;
AgeableMob result = instance.getBreedOffspring(serverLevel, ageableMob);
net.minecraft.world.entity.animal.Parrot#getDeathSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:339 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Death Sound
ทำงานยังไง
คืนค่า: SoundEvents.PARROT_DEATH.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Parrot#getHurtSound(DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:334 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Hurt Sound
ทำงานยังไง
คืนค่า: SoundEvents.PARROT_HURT.
Parameters
DamageSource damageSource
ตัวอย่างใช้งาน
DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
return super.getHurtSound(damageSource);
}
net.minecraft.world.entity.animal.Parrot#getLeashOffset()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:432 - Modifiers:
public - Return:
Vec3
คืออะไร
อ่านค่า Leash Offset
ทำงานยังไง
เรียกต่อ: getEyeHeight(), getBbWidth(). สร้างออบเจ็กต์: Vec3. คืนค่า: new Vec3(0.0, 0.5F * this.getEyeHeight(), this.getBbWidth() * 0.4F).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Parrot#getPitch(RandomSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:365 - Modifiers:
public static - Return:
float
คืออะไร
อ่านค่า Pitch
ทำงานยังไง
เรียกต่อ: nextFloat(). คืนค่า: (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F.
Parameters
RandomSource randomSource
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Parrot#getSoundSource()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:369 - Modifiers:
public - Return:
SoundSource
คืออะไร
อ่านค่า Sound Source
ทำงานยังไง
คืนค่า: SoundSource.NEUTRAL.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Parrot#getVariant()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:396 - Modifiers:
public - Return:
Parrot.Variant
คืออะไร
อ่านค่า Variant
ทำงานยังไง
เรียกต่อ: byId(), get(). คืนค่า: Parrot.Variant.byId(this.entityData.get(DATA_VARIANT_ID)).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Parrot#getVoicePitch()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:360 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Voice Pitch
ทำงานยังไง
เรียกต่อ: getPitch(). คืนค่า: getPitch(this.random).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Parrot#hurtServer(ServerLevel,DamageSource,float)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:386 - Modifiers:
public - Return:
boolean
คืออะไร
ประมวลผลความเสียหาย Server
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isInvulnerableTo(), setOrderedToSit(). มีจุด return อย่างน้อย 2 จุด.
Parameters
ServerLevel serverLevelDamageSource damageSourcefloat f
ตัวอย่างใช้งาน
Parrot instance = ...;
ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
boolean result = instance.hurtServer(serverLevel, damageSource, 0.0F);
net.minecraft.world.entity.animal.Parrot#imitateNearbyMobs(Level,Entity)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:221 - Modifiers:
public static - Return:
boolean
คืออะไร
ดำเนินการ imitateNearbyMobs ตาม implementation ของ Parrot
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isAlive(), isSilent(), nextInt(), getEntitiesOfClass(), getBoundingBox(), inflate(), isEmpty(), get(). มีจุด return อย่างน้อย 3 จุด.
Parameters
Level levelEntity entity
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Parrot#isBaby()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:145 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Baby
ทำงานยังไง
คืนค่า: false.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Parrot#isFlapping()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:349 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Flapping
ทำงานยังไง
คืนค่า: this.flyDist > this.nextFlap.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Parrot#isFlying()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:422 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Flying
ทำงานยังไง
เรียกต่อ: onGround(). คืนค่า: !this.onGround().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Parrot#isFood(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:289 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Food
ทำงานยังไง
คืนค่า: false.
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Parrot#isPartyParrot()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:199 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Party Parrot
ทำงานยังไง
คืนค่า: this.partyParrot.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Parrot#isPushable()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:374 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pushable
ทำงานยังไง
คืนค่า: true.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Parrot#mobInteract(Player,InteractionHand)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:239 - Modifiers:
public - Return:
InteractionResult
คืออะไร
ดำเนินการ mobInteract ตาม implementation ของ Parrot
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getItemInHand(), isTame(), is(), usePlayerItem(), isSilent(), level(), playSound(), getX(). สร้างออบเจ็กต์: MobEffectInstance. มีจุด return อย่างน้อย 4 จุด.
Parameters
Player playerInteractionHand interactionHand
ตัวอย่างใช้งาน
Parrot instance = ...;
Player player = ...;
InteractionHand interactionHand = ...;
InteractionResult result = instance.mobInteract(player, interactionHand);
net.minecraft.world.entity.animal.Parrot#onFlap()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:354 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Flap
ทำงานยังไง
แก้ state: nextFlap. เรียกต่อ: playSound().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Parrot#Parrot(EntityType<? extends Parrot>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:124 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ Parrot ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: moveControl. เรียกต่อ: setPathfindingMalus(). สร้างออบเจ็กต์: FlyingMoveControl.
Parameters
EntityType<? extends Parrot> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends Parrot> entityType = ...;
Level level = ...;
Parrot instance = new Parrot(entityType, level);
net.minecraft.world.entity.animal.Parrot#playStepSound(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:344 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ playStepSound ตาม implementation ของ Parrot
ทำงานยังไง
เรียกต่อ: playSound().
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected void playStepSound(BlockPos blockPos, BlockState blockState) {
super.playStepSound(blockPos, blockState);
}
net.minecraft.world.entity.animal.Parrot#readAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:416 - Modifiers:
public - Return:
void
คืออะไร
อ่าน Additional Save Data
ทำงานยังไง
เรียกต่อ: setVariant(), byId(), getInt().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Parrot#registerGoals()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:150 - Modifiers:
protected - Return:
void
คืออะไร
ลงทะเบียน Goals
ทำงานยังไง
เรียกต่อ: addGoal(), TamableAnimalPanicGoal(), ParrotWanderGoal(). สร้างออบเจ็กต์: TamableAnimal.TamableAnimalPanicGoal, FloatGoal, LookAtPlayerGoal, SitWhenOrderedToGoal.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Parrot#setRecordPlayingNearby(BlockPos,boolean)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:193 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Record Playing Nearby
ทำงานยังไง
แก้ state: jukebox, partyParrot.
Parameters
BlockPos blockPosboolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Parrot#setVariant(Parrot.Variant)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:400 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Variant
ทำงานยังไง
เรียกต่อ: set().
Parameters
Parrot.Variant variant
ตัวอย่างใช้งาน
Parrot$Variant
- Full name:
net.minecraft.world.entity.animal.Parrot$Variant - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Parrot.java - Type:
enum - Modifiers:
public - Implements:
StringRepresentable
net.minecraft.world.entity.animal.Parrot$Variant#byId(int)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:505 - Modifiers:
public static - Return:
Parrot.Variant
คืออะไร
ดำเนินการ byId ตาม implementation ของ Parrot$Variant
ทำงานยังไง
เรียกต่อ: apply(). คืนค่า: BY_ID.apply(i).
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Parrot$Variant#getId()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:501 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Id
ทำงานยังไง
คืนค่า: this.id.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Parrot$Variant#getSerializedName()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Parrot.java:509 - Modifiers:
public - Return:
String
คืออะไร
อ่านค่า Serialized Name
ทำงานยังไง
คืนค่า: this.name.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
Pig
- Full name:
net.minecraft.world.entity.animal.Pig - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Pig.java - Type:
class - Modifiers:
public - Extends:
Animal - Implements:
ItemSteerable,Saddleable
net.minecraft.world.entity.animal.Pig#addAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pig.java:100 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Additional Save Data
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 2 statement).
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Pig#boost()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pig.java:244 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ boost ตาม implementation ของ Pig
ทำงานยังไง
เรียกต่อ: getRandom(). คืนค่า: this.steering.boost(this.getRandom()).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Pig#createAttributes()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pig.java:72 - Modifiers:
public static - Return:
AttributeSupplier.Builder
คืออะไร
สร้าง Attributes
ทำงานยังไง
เรียกต่อ: createAnimalAttributes(), add(). คืนค่า: Animal.createAnimalAttributes().add(Attributes.MAX_HEALTH, 10.0).add(Attributes.MOVEMENT_SPEED, 0.25).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Pig#defineSynchedData(SynchedEntityData.Builder)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pig.java:93 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ defineSynchedData ตาม implementation ของ Pig
ทำงานยังไง
เรียกต่อ: define().
Parameters
SynchedEntityData.Builder builder
ตัวอย่างใช้งาน
SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder);
}
net.minecraft.world.entity.animal.Pig#dropEquipment(ServerLevel)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pig.java:157 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ dropEquipment ตาม implementation ของ Pig
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isSaddled(), spawnAtLocation().
Parameters
ServerLevel serverLevel
ตัวอย่างใช้งาน
ServerLevel serverLevel = ...;
@Override
protected void dropEquipment(ServerLevel serverLevel) {
super.dropEquipment(serverLevel);
}
net.minecraft.world.entity.animal.Pig#equipSaddle(ItemStack,SoundSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pig.java:170 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ equipSaddle ตาม implementation ของ Pig
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: setSaddle(), level(), playSound().
Parameters
ItemStack itemStackSoundSource soundSource
ตัวอย่างใช้งาน
Pig instance = ...;
ItemStack itemStack = ...;
SoundSource soundSource = ...;
instance.equipSaddle(itemStack, soundSource);
net.minecraft.world.entity.animal.Pig#getAmbientSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pig.java:112 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Ambient Sound
ทำงานยังไง
คืนค่า: SoundEvents.PIG_AMBIENT.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Pig#getBreedOffspring(ServerLevel,AgeableMob)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pig.java:249 - Modifiers:
public - Return:
Pig
คืออะไร
อ่านค่า Breed Offspring
ทำงานยังไง
เรียกต่อ: create(). คืนค่า: EntityType.PIG.create(serverLevel, EntitySpawnReason.BREEDING).
Parameters
ServerLevel serverLevelAgeableMob ageableMob
ตัวอย่างใช้งาน
Pig instance = ...;
ServerLevel serverLevel = ...;
AgeableMob ageableMob = ...;
Pig result = instance.getBreedOffspring(serverLevel, ageableMob);
net.minecraft.world.entity.animal.Pig#getControllingPassenger()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pig.java:76 - Modifiers:
public - Return:
LivingEntity
คืออะไร
อ่านค่า Controlling Passenger
ทำงานยังไง
เรียกต่อ: isSaddled(), getFirstPassenger(), isHolding().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Pig#getDeathSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pig.java:122 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Death Sound
ทำงานยังไง
คืนค่า: SoundEvents.PIG_DEATH.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Pig#getDismountLocationForPassenger(LivingEntity)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pig.java:178 - Modifiers:
public - Return:
Vec3
คืออะไร
อ่านค่า Dismount Location For Passenger
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getMotionDirection(), getAxis(), offsetsForDirection(), blockPosition(), MutableBlockPos(), getDismountPoses(), getLocalBoundsForPose(), set(). สร้างออบเจ็กต์: BlockPos.MutableBlockPos. มีจุด return อย่างน้อย 3 จุด.
Parameters
LivingEntity livingEntity
ตัวอย่างใช้งาน
Pig instance = ...;
LivingEntity livingEntity = ...;
Vec3 result = instance.getDismountLocationForPassenger(livingEntity);
net.minecraft.world.entity.animal.Pig#getHurtSound(DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pig.java:117 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Hurt Sound
ทำงานยังไง
คืนค่า: SoundEvents.PIG_HURT.
Parameters
DamageSource damageSource
ตัวอย่างใช้งาน
DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
return super.getHurtSound(damageSource);
}
net.minecraft.world.entity.animal.Pig#getLeashOffset()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pig.java:259 - Modifiers:
public - Return:
Vec3
คืออะไร
อ่านค่า Leash Offset
ทำงานยังไง
เรียกต่อ: getEyeHeight(), getBbWidth(). สร้างออบเจ็กต์: Vec3. คืนค่า: new Vec3(0.0, 0.6F * this.getEyeHeight(), this.getBbWidth() * 0.4F).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Pig#getRiddenInput(Player,Vec3)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pig.java:234 - Modifiers:
protected - Return:
Vec3
คืออะไร
อ่านค่า Ridden Input
ทำงานยังไง
สร้างออบเจ็กต์: Vec3. คืนค่า: new Vec3(0.0, 0.0, 1.0).
Parameters
Player playerVec3 vec3
ตัวอย่างใช้งาน
Player player = ...;
Vec3 vec3 = ...;
@Override
protected Vec3 getRiddenInput(Player player, Vec3 vec3) {
return super.getRiddenInput(player, vec3);
}
net.minecraft.world.entity.animal.Pig#getRiddenSpeed(Player)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pig.java:239 - Modifiers:
protected - Return:
float
คืออะไร
อ่านค่า Ridden Speed
ทำงานยังไง
เรียกต่อ: getAttributeValue(), boostFactor(). คืนค่า: (float)(this.getAttributeValue(Attributes.MOVEMENT_SPEED) * 0.225 * this.steering.boostFactor()).
Parameters
Player player
ตัวอย่างใช้งาน
Player player = ...;
@Override
protected float getRiddenSpeed(Player player) {
return super.getRiddenSpeed(player);
}
net.minecraft.world.entity.animal.Pig#isFood(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pig.java:254 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Food
ทำงานยังไง
เรียกต่อ: is(). คืนค่า: itemStack.is(ItemTags.PIG_FOOD).
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Pig#isSaddleable()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pig.java:152 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Saddleable
ทำงานยังไง
เรียกต่อ: isAlive(), isBaby(). คืนค่า: this.isAlive() && !this.isBaby().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Pig#isSaddled()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pig.java:165 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Saddled
ทำงานยังไง
เรียกต่อ: hasSaddle(). คืนค่า: this.steering.hasSaddle().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Pig#mobInteract(Player,InteractionHand)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pig.java:132 - Modifiers:
public - Return:
InteractionResult
คืออะไร
ดำเนินการ mobInteract ตาม implementation ของ Pig
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isFood(), getItemInHand(), isSaddled(), isVehicle(), isSecondaryUseActive(), level(), startRiding(), consumesAction(). มีจุด return อย่างน้อย 3 จุด.
Parameters
Player playerInteractionHand interactionHand
ตัวอย่างใช้งาน
Pig instance = ...;
Player player = ...;
InteractionHand interactionHand = ...;
InteractionResult result = instance.mobInteract(player, interactionHand);
net.minecraft.world.entity.animal.Pig#onSyncedDataUpdated(EntityDataAccessor<?>)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pig.java:84 - Modifiers:
public - Return:
void
คืออะไร
จัดการเหตุการณ์ Synced Data Updated
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: equals(), level(), onSynced().
Parameters
EntityDataAccessor<?> entityDataAccessor
ตัวอย่างใช้งาน
Pig instance = ...;
EntityDataAccessor<?> entityDataAccessor = ...;
instance.onSyncedDataUpdated(entityDataAccessor);
net.minecraft.world.entity.animal.Pig#Pig(EntityType<? extends Pig>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pig.java:55 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ Pig ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
EntityType<? extends Pig> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends Pig> entityType = ...;
Level level = ...;
Pig instance = new Pig(entityType, level);
net.minecraft.world.entity.animal.Pig#playStepSound(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pig.java:127 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ playStepSound ตาม implementation ของ Pig
ทำงานยังไง
เรียกต่อ: playSound().
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected void playStepSound(BlockPos blockPos, BlockState blockState) {
super.playStepSound(blockPos, blockState);
}
net.minecraft.world.entity.animal.Pig#readAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pig.java:106 - Modifiers:
public - Return:
void
คืออะไร
อ่าน Additional Save Data
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 2 statement).
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Pig#registerGoals()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pig.java:59 - Modifiers:
protected - Return:
void
คืออะไร
ลงทะเบียน Goals
ทำงานยังไง
เรียกต่อ: addGoal(), is(). สร้างออบเจ็กต์: FloatGoal, PanicGoal, BreedGoal, TemptGoal.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Pig#thunderHit(ServerLevel,LightningBolt)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pig.java:208 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ thunderHit ตาม implementation ของ Pig
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getDifficulty(), convertTo(), single(), getMainHandItem(), isEmpty(), setItemSlot(), setPersistenceRequired(). สร้างออบเจ็กต์: ItemStack.
Parameters
ServerLevel serverLevelLightningBolt lightningBolt
ตัวอย่างใช้งาน
Pig instance = ...;
ServerLevel serverLevel = ...;
LightningBolt lightningBolt = ...;
instance.thunderHit(serverLevel, lightningBolt);
net.minecraft.world.entity.animal.Pig#tickRidden(Player,Vec3)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pig.java:226 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick Ridden
ทำงานยังไง
แก้ state: yRotO, yBodyRot, yHeadRot. เรียกต่อ: setRot(), getYRot(), getXRot(), tickBoost().
Parameters
Player playerVec3 vec3
ตัวอย่างใช้งาน
Player player = ...;
Vec3 vec3 = ...;
@Override
protected void tickRidden(Player player, Vec3 vec3) {
super.tickRidden(player, vec3);
}
PolarBear
- Full name:
net.minecraft.world.entity.animal.PolarBear - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/PolarBear.java - Type:
class - Modifiers:
public - Extends:
Animal - Implements:
NeutralMob
net.minecraft.world.entity.animal.PolarBear#addAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/PolarBear.java:119 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Additional Save Data
ทำงานยังไง
เรียกต่อ: addPersistentAngerSaveData().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
PolarBear instance = ...;
CompoundTag compoundTag = ...;
instance.addAdditionalSaveData(compoundTag);
net.minecraft.world.entity.animal.PolarBear#checkPolarBearSpawnRules(EntityType<PolarBear>,LevelAccessor,EntitySpawnReason,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/PolarBear.java:104 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบ Polar Bear Spawn Rules
ทำงานยังไง
เรียกต่อ: getBiome(), is(), checkAnimalSpawnRules(), isBrightEnoughToSpawn(), getBlockState(), below().
Parameters
EntityType<PolarBear> entityTypeLevelAccessor levelAccessorEntitySpawnReason entitySpawnReasonBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
EntityType<PolarBear> entityType = ...;
LevelAccessor levelAccessor = ...;
EntitySpawnReason entitySpawnReason = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
boolean result = PolarBear.checkPolarBearSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource);
net.minecraft.world.entity.animal.PolarBear#createAttributes()
- Origin:
common - Source:
net/minecraft/world/entity/animal/PolarBear.java:96 - Modifiers:
public static - Return:
AttributeSupplier.Builder
คืออะไร
สร้าง Attributes
ทำงานยังไง
เรียกต่อ: createAnimalAttributes(), add().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.PolarBear#defineSynchedData(SynchedEntityData.Builder)
- Origin:
common - Source:
net/minecraft/world/entity/animal/PolarBear.java:178 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ defineSynchedData ตาม implementation ของ PolarBear
ทำงานยังไง
เรียกต่อ: define().
Parameters
SynchedEntityData.Builder builder
ตัวอย่างใช้งาน
SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder);
}
net.minecraft.world.entity.animal.PolarBear#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)
- Origin:
common - Source:
net/minecraft/world/entity/animal/PolarBear.java:237 - Modifiers:
public - Return:
SpawnGroupData
คืออะไร
ดำเนินการ finalizeSpawn ตาม implementation ของ PolarBear
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: AgeableMobGroupData(). สร้างออบเจ็กต์: AgeableMob.AgeableMobGroupData. คืนค่า: super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData).
Parameters
ServerLevelAccessor serverLevelAccessorDifficultyInstance difficultyInstanceEntitySpawnReason entitySpawnReasonSpawnGroupData spawnGroupData
ตัวอย่างใช้งาน
PolarBear instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);
net.minecraft.world.entity.animal.PolarBear#getAmbientSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/PolarBear.java:151 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Ambient Sound
ทำงานยังไง
เรียกต่อ: isBaby(). คืนค่า: this.isBaby() ? SoundEvents.POLAR_BEAR_AMBIENT_BABY : SoundEvents.POLAR_BEAR_AMBIENT.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.PolarBear#getBreedOffspring(ServerLevel,AgeableMob)
- Origin:
common - Source:
net/minecraft/world/entity/animal/PolarBear.java:67 - Modifiers:
public - Return:
AgeableMob
คืออะไร
อ่านค่า Breed Offspring
ทำงานยังไง
เรียกต่อ: create(). คืนค่า: EntityType.POLAR_BEAR.create(serverLevel, EntitySpawnReason.BREEDING).
Parameters
ServerLevel serverLevelAgeableMob ageableMob
ตัวอย่างใช้งาน
PolarBear instance = ...;
ServerLevel serverLevel = ...;
AgeableMob ageableMob = ...;
AgeableMob result = instance.getBreedOffspring(serverLevel, ageableMob);
net.minecraft.world.entity.animal.PolarBear#getDeathSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/PolarBear.java:161 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Death Sound
ทำงานยังไง
คืนค่า: SoundEvents.POLAR_BEAR_DEATH.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.PolarBear#getDefaultDimensions(Pose)
- Origin:
common - Source:
net/minecraft/world/entity/animal/PolarBear.java:209 - Modifiers:
public - Return:
EntityDimensions
คืออะไร
อ่านค่า Default Dimensions
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: scale(). มีจุด return อย่างน้อย 2 จุด.
Parameters
Pose pose
ตัวอย่างใช้งาน
PolarBear instance = ...;
Pose pose = ...;
EntityDimensions result = instance.getDefaultDimensions(pose);
net.minecraft.world.entity.animal.PolarBear#getHurtSound(DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/PolarBear.java:156 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Hurt Sound
ทำงานยังไง
คืนค่า: SoundEvents.POLAR_BEAR_HURT.
Parameters
DamageSource damageSource
ตัวอย่างใช้งาน
DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
return super.getHurtSound(damageSource);
}
net.minecraft.world.entity.animal.PolarBear#getPersistentAngerTarget()
- Origin:
common - Source:
net/minecraft/world/entity/animal/PolarBear.java:145 - Modifiers:
public - Return:
UUID
คืออะไร
อ่านค่า Persistent Anger Target
ทำงานยังไง
คืนค่า: this.persistentAngerTarget.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.PolarBear#getRemainingPersistentAngerTime()
- Origin:
common - Source:
net/minecraft/world/entity/animal/PolarBear.java:135 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Remaining Persistent Anger Time
ทำงานยังไง
คืนค่า: this.remainingPersistentAngerTime.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.PolarBear#getStandingAnimationScale(float)
- Origin:
common - Source:
net/minecraft/world/entity/animal/PolarBear.java:228 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Standing Animation Scale
ทำงานยังไง
เรียกต่อ: lerp(). คืนค่า: Mth.lerp(f, this.clientSideStandAnimationO, this.clientSideStandAnimation) / 6.0F.
Parameters
float f
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.PolarBear#getWaterSlowDown()
- Origin:
common - Source:
net/minecraft/world/entity/animal/PolarBear.java:232 - Modifiers:
protected - Return:
float
คืออะไร
อ่านค่า Water Slow Down
ทำงานยังไง
คืนค่า: 0.98F.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.PolarBear#isFood(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/animal/PolarBear.java:73 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Food
ทำงานยังไง
คืนค่า: false.
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.PolarBear#isStanding()
- Origin:
common - Source:
net/minecraft/world/entity/animal/PolarBear.java:220 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Standing
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: this.entityData.get(DATA_STANDING_ID).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.PolarBear#playStepSound(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/entity/animal/PolarBear.java:166 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ playStepSound ตาม implementation ของ PolarBear
ทำงานยังไง
เรียกต่อ: playSound().
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected void playStepSound(BlockPos blockPos, BlockState blockState) {
super.playStepSound(blockPos, blockState);
}
net.minecraft.world.entity.animal.PolarBear#playWarningSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/PolarBear.java:171 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ playWarningSound ตาม implementation ของ PolarBear
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: warningSoundTicks. เรียกต่อ: makeSound().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.PolarBear#PolarBear(EntityType<? extends PolarBear>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/PolarBear.java:63 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ PolarBear ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
EntityType<? extends PolarBear> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends PolarBear> entityType = ...;
Level level = ...;
PolarBear instance = new PolarBear(entityType, level);
net.minecraft.world.entity.animal.PolarBear#readAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/PolarBear.java:113 - Modifiers:
public - Return:
void
คืออะไร
อ่าน Additional Save Data
ทำงานยังไง
เรียกต่อ: readPersistentAngerSaveData(), level().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
PolarBear instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);
net.minecraft.world.entity.animal.PolarBear#registerGoals()
- Origin:
common - Source:
net/minecraft/world/entity/animal/PolarBear.java:78 - Modifiers:
protected - Return:
void
คืออะไร
ลงทะเบียน Goals
ทำงานยังไง
เรียกต่อ: addGoal(), PolarBearMeleeAttackGoal(), isBaby(), PolarBearHurtByTargetGoal(), PolarBearAttackPlayersGoal(). สร้างออบเจ็กต์: FloatGoal, PolarBear.PolarBearMeleeAttackGoal, PanicGoal, FollowParentGoal.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.PolarBear#setPersistentAngerTarget(UUID)
- Origin:
common - Source:
net/minecraft/world/entity/animal/PolarBear.java:140 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Persistent Anger Target
ทำงานยังไง
แก้ state: persistentAngerTarget.
Parameters
UUID uUID
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.PolarBear#setRemainingPersistentAngerTime(int)
- Origin:
common - Source:
net/minecraft/world/entity/animal/PolarBear.java:130 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Remaining Persistent Anger Time
ทำงานยังไง
แก้ state: remainingPersistentAngerTime.
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.PolarBear#setStanding(boolean)
- Origin:
common - Source:
net/minecraft/world/entity/animal/PolarBear.java:224 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Standing
ทำงานยังไง
เรียกต่อ: set().
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.PolarBear#startPersistentAngerTimer()
- Origin:
common - Source:
net/minecraft/world/entity/animal/PolarBear.java:125 - Modifiers:
public - Return:
void
คืออะไร
เริ่ม Persistent Anger Timer
ทำงานยังไง
เรียกต่อ: setRemainingPersistentAngerTime(), sample().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.PolarBear#tick()
- Origin:
common - Source:
net/minecraft/world/entity/animal/PolarBear.java:184 - Modifiers:
public - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: clientSideStandAnimationO, clientSideStandAnimation, warningSoundTicks. เรียกต่อ: level(), refreshDimensions(), isStanding(), clamp(), updatePersistentAnger().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
Pufferfish
- Full name:
net.minecraft.world.entity.animal.Pufferfish - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Pufferfish.java - Type:
class - Modifiers:
public - Extends:
AbstractFish
net.minecraft.world.entity.animal.Pufferfish#addAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pufferfish.java:69 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Additional Save Data
ทำงานยังไง
เรียกต่อ: putInt(), getPuffState().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
Pufferfish instance = ...;
CompoundTag compoundTag = ...;
instance.addAdditionalSaveData(compoundTag);
net.minecraft.world.entity.animal.Pufferfish#aiStep()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pufferfish.java:121 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ aiStep ตาม implementation ของ Pufferfish
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: level(), isAlive(), getPuffState(), getEntitiesOfClass(), getBoundingBox(), inflate(), test(), touch().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Pufferfish#defineSynchedData(SynchedEntityData.Builder)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pufferfish.java:46 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ defineSynchedData ตาม implementation ของ Pufferfish
ทำงานยังไง
เรียกต่อ: define().
Parameters
SynchedEntityData.Builder builder
ตัวอย่างใช้งาน
SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder);
}
net.minecraft.world.entity.animal.Pufferfish#getAmbientSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pufferfish.java:153 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Ambient Sound
ทำงานยังไง
คืนค่า: SoundEvents.PUFFER_FISH_AMBIENT.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Pufferfish#getBucketItemStack()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pufferfish.java:81 - Modifiers:
public - Return:
ItemStack
คืออะไร
อ่านค่า Bucket Item Stack
ทำงานยังไง
สร้างออบเจ็กต์: ItemStack. คืนค่า: new ItemStack(Items.PUFFERFISH_BUCKET).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Pufferfish#getDeathSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pufferfish.java:158 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Death Sound
ทำงานยังไง
คืนค่า: SoundEvents.PUFFER_FISH_DEATH.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Pufferfish#getDefaultDimensions(Pose)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pufferfish.java:173 - Modifiers:
public - Return:
EntityDimensions
คืออะไร
อ่านค่า Default Dimensions
ทำงานยังไง
เรียกต่อ: scale(), getScale(), getPuffState(). คืนค่า: super.getDefaultDimensions(pose).scale(getScale(this.getPuffState())).
Parameters
Pose pose
ตัวอย่างใช้งาน
Pufferfish instance = ...;
Pose pose = ...;
EntityDimensions result = instance.getDefaultDimensions(pose);
net.minecraft.world.entity.animal.Pufferfish#getFlopSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pufferfish.java:168 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Flop Sound
ทำงานยังไง
คืนค่า: SoundEvents.PUFFER_FISH_FLOP.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Pufferfish#getHurtSound(DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pufferfish.java:163 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Hurt Sound
ทำงานยังไง
คืนค่า: SoundEvents.PUFFER_FISH_HURT.
Parameters
DamageSource damageSource
ตัวอย่างใช้งาน
DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
return super.getHurtSound(damageSource);
}
net.minecraft.world.entity.animal.Pufferfish#getPuffState()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pufferfish.java:52 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Puff State
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: this.entityData.get(PUFF_STATE).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Pufferfish#onSyncedDataUpdated(EntityDataAccessor<?>)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pufferfish.java:60 - Modifiers:
public - Return:
void
คืออะไร
จัดการเหตุการณ์ Synced Data Updated
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: equals(), refreshDimensions().
Parameters
EntityDataAccessor<?> entityDataAccessor
ตัวอย่างใช้งาน
Pufferfish instance = ...;
EntityDataAccessor<?> entityDataAccessor = ...;
instance.onSyncedDataUpdated(entityDataAccessor);
net.minecraft.world.entity.animal.Pufferfish#playerTouch(Player)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pufferfish.java:141 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ playerTouch ตาม implementation ของ Pufferfish
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getPuffState(), hurtServer(), serverLevel(), damageSources(), mobAttack(), isSilent(), send(), addEffect(). สร้างออบเจ็กต์: ClientboundGameEventPacket, MobEffectInstance.
Parameters
Player player
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Pufferfish#Pufferfish(EntityType<? extends Pufferfish>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pufferfish.java:41 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ Pufferfish ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: refreshDimensions().
Parameters
EntityType<? extends Pufferfish> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends Pufferfish> entityType = ...;
Level level = ...;
Pufferfish instance = new Pufferfish(entityType, level);
net.minecraft.world.entity.animal.Pufferfish#readAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pufferfish.java:75 - Modifiers:
public - Return:
void
คืออะไร
อ่าน Additional Save Data
ทำงานยังไง
เรียกต่อ: setPuffState(), min(), getInt().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
Pufferfish instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);
net.minecraft.world.entity.animal.Pufferfish#registerGoals()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pufferfish.java:86 - Modifiers:
protected - Return:
void
คืออะไร
ลงทะเบียน Goals
ทำงานยังไง
เรียกต่อ: addGoal(), PufferfishPuffGoal(). สร้างออบเจ็กต์: Pufferfish.PufferfishPuffGoal.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Pufferfish#setPuffState(int)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pufferfish.java:56 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Puff State
ทำงานยังไง
เรียกต่อ: set().
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Pufferfish#tick()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Pufferfish.java:92 - Modifiers:
public - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: inflateCounter, deflateTimer. เรียกต่อ: level(), isAlive(), isEffectiveAi(), getPuffState(), makeSound(), setPuffState().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
Rabbit
- Full name:
net.minecraft.world.entity.animal.Rabbit - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Rabbit.java - Type:
class - Modifiers:
public - Extends:
Animal - Implements:
VariantHolder<Rabbit.Variant>
net.minecraft.world.entity.animal.Rabbit#addAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:271 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Additional Save Data
ทำงานยังไง
เรียกต่อ: putInt(), getVariant().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Rabbit#aiStep()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:255 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ aiStep ตาม implementation ของ Rabbit
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: jumpTicks, jumpDuration. เรียกต่อ: setJumping().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Rabbit#canSpawnSprintParticle()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:225 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Spawn Sprint Particle
ทำงานยังไง
คืนค่า: false.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Rabbit#checkRabbitSpawnRules(EntityType<Rabbit>,LevelAccessor,EntitySpawnReason,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:391 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบ Rabbit Spawn Rules
ทำงานยังไง
เรียกต่อ: getBlockState(), below(), is(), isBrightEnoughToSpawn(). คืนค่า: levelAccessor.getBlockState(blockPos.below()).is(BlockTags.RABBITS_SPAWNABLE_ON) && isBrightEnoughToSpawn(levelAccessor, blockPos).
Parameters
EntityType<Rabbit> entityTypeLevelAccessor levelAccessorEntitySpawnReason entitySpawnReasonBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
EntityType<Rabbit> entityType = ...;
LevelAccessor levelAccessor = ...;
EntitySpawnReason entitySpawnReason = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
boolean result = Rabbit.checkRabbitSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource);
net.minecraft.world.entity.animal.Rabbit#createAttributes()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:267 - Modifiers:
public static - Return:
AttributeSupplier.Builder
คืออะไร
สร้าง Attributes
ทำงานยังไง
เรียกต่อ: createAnimalAttributes(), add(). คืนค่า: Animal.createAnimalAttributes().add(Attributes.MAX_HEALTH, 3.0).add(Attributes.MOVEMENT_SPEED, 0.3F).add(Attributes.ATTACK_DAMAGE, 3.0).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Rabbit#customServerAiStep(ServerLevel)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:176 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ customServerAiStep ตาม implementation ของ Rabbit
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: jumpDelayTicks, moreCarrotTicks, wasOnGround. เรียกต่อ: nextInt(), onGround(), setJumping(), checkLandingDelay(), getVariant(), getTarget(), distanceToSqr(), facePoint(). สร้างออบเจ็กต์: Vec3.
Parameters
ServerLevel serverLevel
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Rabbit#defineSynchedData(SynchedEntityData.Builder)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:170 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ defineSynchedData ตาม implementation ของ Rabbit
ทำงานยังไง
เรียกต่อ: define().
Parameters
SynchedEntityData.Builder builder
ตัวอย่างใช้งาน
SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder);
}
net.minecraft.world.entity.animal.Rabbit#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:363 - Modifiers:
public - Return:
SpawnGroupData
คืออะไร
ดำเนินการ finalizeSpawn ตาม implementation ของ Rabbit
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getRandomRabbitVariant(), blockPosition(), RabbitGroupData(), setVariant(). สร้างออบเจ็กต์: Rabbit.RabbitGroupData. คืนค่า: super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData).
Parameters
ServerLevelAccessor serverLevelAccessorDifficultyInstance difficultyInstanceEntitySpawnReason entitySpawnReasonSpawnGroupData spawnGroupData
ตัวอย่างใช้งาน
Rabbit instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);
net.minecraft.world.entity.animal.Rabbit#getAmbientSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:289 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Ambient Sound
ทำงานยังไง
คืนค่า: SoundEvents.RABBIT_AMBIENT.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Rabbit#getBreedOffspring(ServerLevel,AgeableMob)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:316 - Modifiers:
public - Return:
Rabbit
คืออะไร
อ่านค่า Breed Offspring
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: create(), getRandomRabbitVariant(), blockPosition(), nextInt(), nextBoolean(), getVariant(), setVariant(). คืนค่า: rabbit.
Parameters
ServerLevel serverLevelAgeableMob ageableMob
ตัวอย่างใช้งาน
Rabbit instance = ...;
ServerLevel serverLevel = ...;
AgeableMob ageableMob = ...;
Rabbit result = instance.getBreedOffspring(serverLevel, ageableMob);
net.minecraft.world.entity.animal.Rabbit#getDeathSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:299 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Death Sound
ทำงานยังไง
คืนค่า: SoundEvents.RABBIT_DEATH.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Rabbit#getHurtSound(DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:294 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Hurt Sound
ทำงานยังไง
คืนค่า: SoundEvents.RABBIT_HURT.
Parameters
DamageSource damageSource
ตัวอย่างใช้งาน
DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
return super.getHurtSound(damageSource);
}
net.minecraft.world.entity.animal.Rabbit#getJumpCompletion(float)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:147 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Jump Completion
ทำงานยังไง
แก้ state: jumpDuration. คืนค่า: this.jumpDuration == 0 ? 0.0F : (this.jumpTicks + f) / this.jumpDuration.
Parameters
float f
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Rabbit#getJumpPower()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:109 - Modifiers:
protected - Return:
float
คืออะไร
อ่านค่า Jump Power
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getSpeedModifier(), getPath(), isDone(), getNextEntityPos(), getY(), getWantedY(). คืนค่า: super.getJumpPower(f / 0.42F).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Rabbit#getJumpSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:285 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Jump Sound
ทำงานยังไง
คืนค่า: SoundEvents.RABBIT_JUMP.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Rabbit#getLeashOffset()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:412 - Modifiers:
public - Return:
Vec3
คืออะไร
อ่านค่า Leash Offset
ทำงานยังไง
เรียกต่อ: getEyeHeight(), getBbWidth(). สร้างออบเจ็กต์: Vec3. คืนค่า: new Vec3(0.0, 0.6F * this.getEyeHeight(), this.getBbWidth() * 0.4F).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Rabbit#getSoundSource()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:311 - Modifiers:
public - Return:
SoundSource
คืออะไร
อ่านค่า Sound Source
ทำงานยังไง
เรียกต่อ: getVariant(). คืนค่า: this.getVariant() == Rabbit.Variant.EVIL ? SoundSource.HOSTILE : SoundSource.NEUTRAL.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Rabbit#getVariant()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:340 - Modifiers:
public - Return:
Rabbit.Variant
คืออะไร
อ่านค่า Variant
ทำงานยังไง
เรียกต่อ: byId(), get(). คืนค่า: Rabbit.Variant.byId(this.entityData.get(DATA_TYPE_ID)).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Rabbit#handleEntityEvent(byte)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:401 - Modifiers:
public - Return:
void
คืออะไร
จัดการ Entity Event
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: jumpDuration, jumpTicks. เรียกต่อ: spawnSprintParticle().
Parameters
byte b
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Rabbit#isFood(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:335 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Food
ทำงานยังไง
เรียกต่อ: is(). คืนค่า: itemStack.is(ItemTags.RABBIT_FOOD).
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Rabbit#jumpFromGround()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:131 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ jumpFromGround ตาม implementation ของ Rabbit
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getSpeedModifier(), getDeltaMovement(), horizontalDistanceSqr(), moveRelative(), level(), broadcastEntityEvent(). สร้างออบเจ็กต์: Vec3.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Rabbit#playAttackSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:304 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ playAttackSound ตาม implementation ของ Rabbit
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getVariant(), playSound(), nextFloat().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Rabbit#Rabbit(EntityType<? extends Rabbit>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:87 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ Rabbit ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: jumpControl, moveControl. เรียกต่อ: RabbitJumpControl(), RabbitMoveControl(), setSpeedModifier(). สร้างออบเจ็กต์: Rabbit.RabbitJumpControl, Rabbit.RabbitMoveControl.
Parameters
EntityType<? extends Rabbit> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends Rabbit> entityType = ...;
Level level = ...;
Rabbit instance = new Rabbit(entityType, level);
net.minecraft.world.entity.animal.Rabbit#readAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:278 - Modifiers:
public - Return:
void
คืออะไร
อ่าน Additional Save Data
ทำงานยังไง
แก้ state: moreCarrotTicks. เรียกต่อ: setVariant(), byId(), getInt().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Rabbit#registerGoals()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:94 - Modifiers:
protected - Return:
void
คืออะไร
ลงทะเบียน Goals
ทำงานยังไง
เรียกต่อ: addGoal(), level(), RabbitPanicGoal(), is(), RaidGardenGoal(). สร้างออบเจ็กต์: FloatGoal, ClimbOnTopOfPowderSnowGoal, Rabbit.RabbitPanicGoal, BreedGoal.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Rabbit#setJumping(boolean)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:156 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Jumping
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: playSound(), getJumpSound(), getSoundVolume(), nextFloat().
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Rabbit#setSpeedModifier(double)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:151 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Speed Modifier
ทำงานยังไง
เรียกต่อ: getNavigation(), setWantedPosition(), getWantedX(), getWantedY(), getWantedZ().
Parameters
double d
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Rabbit#setVariant(Rabbit.Variant)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:344 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Variant
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getAttribute(), setBaseValue(), addGoal(), setAlertOthers(), addOrUpdateTransientModifier(), hasCustomName(), setCustomName(), translatable(). สร้างออบเจ็กต์: MeleeAttackGoal, HurtByTargetGoal, NearestAttackableTargetGoal<>, AttributeModifier.
Parameters
Rabbit.Variant variant
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Rabbit#startJumping()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:164 - Modifiers:
public - Return:
void
คืออะไร
เริ่ม Jumping
ทำงานยังไง
แก้ state: jumpDuration, jumpTicks. เรียกต่อ: setJumping().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
Rabbit$RabbitGroupData
- Full name:
net.minecraft.world.entity.animal.Rabbit$RabbitGroupData - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Rabbit.java - Type:
class - Modifiers:
public static - Extends:
AgeableMob.AgeableMobGroupData
net.minecraft.world.entity.animal.Rabbit$RabbitGroupData#RabbitGroupData(Rabbit.Variant)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:434 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ Rabbit.RabbitGroupData ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: variant.
Parameters
Rabbit.Variant variant
ตัวอย่างใช้งาน
Rabbit.Variant variant = ...;
Rabbit.RabbitGroupData instance = new Rabbit.RabbitGroupData(variant);
Rabbit$RabbitJumpControl
- Full name:
net.minecraft.world.entity.animal.Rabbit$RabbitJumpControl - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Rabbit.java - Type:
class - Modifiers:
public static - Extends:
JumpControl
net.minecraft.world.entity.animal.Rabbit$RabbitJumpControl#canJump()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:453 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Jump
ทำงานยังไง
คืนค่า: this.canJump.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Rabbit$RabbitJumpControl#RabbitJumpControl(Rabbit)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:444 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ Rabbit.RabbitJumpControl ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: rabbit.
Parameters
Rabbit rabbit
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Rabbit$RabbitJumpControl#setCanJump(boolean)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:457 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Can Jump
ทำงานยังไง
แก้ state: canJump.
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Rabbit$RabbitJumpControl#tick()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:461 - Modifiers:
public - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: jump. เรียกต่อ: startJumping().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Rabbit$RabbitJumpControl#wantJump()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:449 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ wantJump ตาม implementation ของ Rabbit$RabbitJumpControl
ทำงานยังไง
คืนค่า: this.jump.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
Rabbit$Variant
- Full name:
net.minecraft.world.entity.animal.Rabbit$Variant - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Rabbit.java - Type:
enum - Modifiers:
public - Implements:
StringRepresentable
net.minecraft.world.entity.animal.Rabbit$Variant#byId(int)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:620 - Modifiers:
public static - Return:
Rabbit.Variant
คืออะไร
ดำเนินการ byId ตาม implementation ของ Rabbit$Variant
ทำงานยังไง
เรียกต่อ: apply(). คืนค่า: BY_ID.apply(i).
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Rabbit$Variant#getSerializedName()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:611 - Modifiers:
public - Return:
String
คืออะไร
อ่านค่า Serialized Name
ทำงานยังไง
คืนค่า: this.name.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Rabbit$Variant#id()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Rabbit.java:616 - Modifiers:
public - Return:
int
คืออะไร
ดำเนินการ id ตาม implementation ของ Rabbit$Variant
ทำงานยังไง
คืนค่า: this.id.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
Salmon
- Full name:
net.minecraft.world.entity.animal.Salmon - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Salmon.java - Type:
class - Modifiers:
public - Extends:
AbstractSchoolingFish - Implements:
VariantHolder<Salmon.Variant>
net.minecraft.world.entity.animal.Salmon#addAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Salmon.java:82 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Additional Save Data
ทำงานยังไง
เรียกต่อ: putString(), getVariant(), getSerializedName().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Salmon#defineSynchedData(SynchedEntityData.Builder)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Salmon.java:68 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ defineSynchedData ตาม implementation ของ Salmon
ทำงานยังไง
เรียกต่อ: define(), id().
Parameters
SynchedEntityData.Builder builder
ตัวอย่างใช้งาน
SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder);
}
net.minecraft.world.entity.animal.Salmon#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Salmon.java:114 - Modifiers:
public - Return:
SpawnGroupData
คืออะไร
ดำเนินการ finalizeSpawn ตาม implementation ของ Salmon
ทำงานยังไง
เรียกต่อ: builder(), add(), build(), getRandomValue(), ifPresent(). คืนค่า: super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData).
Parameters
ServerLevelAccessor serverLevelAccessorDifficultyInstance difficultyInstanceEntitySpawnReason entitySpawnReasonSpawnGroupData spawnGroupData
ตัวอย่างใช้งาน
Salmon instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);
net.minecraft.world.entity.animal.Salmon#getAmbientSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Salmon.java:48 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Ambient Sound
ทำงานยังไง
คืนค่า: SoundEvents.SALMON_AMBIENT.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Salmon#getBucketItemStack()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Salmon.java:43 - Modifiers:
public - Return:
ItemStack
คืออะไร
อ่านค่า Bucket Item Stack
ทำงานยังไง
สร้างออบเจ็กต์: ItemStack. คืนค่า: new ItemStack(Items.SALMON_BUCKET).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Salmon#getDeathSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Salmon.java:53 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Death Sound
ทำงานยังไง
คืนค่า: SoundEvents.SALMON_DEATH.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Salmon#getDefaultDimensions(Pose)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Salmon.java:131 - Modifiers:
protected - Return:
EntityDimensions
คืออะไร
อ่านค่า Default Dimensions
ทำงานยังไง
เรียกต่อ: scale(), getSalmonScale(). คืนค่า: super.getDefaultDimensions(pose).scale(this.getSalmonScale()).
Parameters
Pose pose
ตัวอย่างใช้งาน
Pose pose = ...;
@Override
protected EntityDimensions getDefaultDimensions(Pose pose) {
return super.getDefaultDimensions(pose);
}
net.minecraft.world.entity.animal.Salmon#getFlopSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Salmon.java:63 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Flop Sound
ทำงานยังไง
คืนค่า: SoundEvents.SALMON_FLOP.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Salmon#getHurtSound(DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Salmon.java:58 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Hurt Sound
ทำงานยังไง
คืนค่า: SoundEvents.SALMON_HURT.
Parameters
DamageSource damageSource
ตัวอย่างใช้งาน
DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
return super.getHurtSound(damageSource);
}
net.minecraft.world.entity.animal.Salmon#getMaxSchoolSize()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Salmon.java:38 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Max School Size
ทำงานยังไง
คืนค่า: 5.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Salmon#getSalmonScale()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Salmon.java:127 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Salmon Scale
ทำงานยังไง
เรียกต่อ: getVariant(). คืนค่า: this.getVariant().boundingBoxScale.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Salmon#getVariant()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Salmon.java:110 - Modifiers:
public - Return:
Salmon.Variant
คืออะไร
อ่านค่า Variant
ทำงานยังไง
เรียกต่อ: apply(), get(). คืนค่า: Salmon.Variant.BY_ID.apply(this.entityData.get(DATA_TYPE)).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Salmon#loadFromBucketTag(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Salmon.java:100 - Modifiers:
public - Return:
void
คืออะไร
โหลด From Bucket Tag
ทำงานยังไง
เรียกต่อ: loadDefaultDataFromBucketTag(), setVariant(), byName(), getString().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Salmon#onSyncedDataUpdated(EntityDataAccessor<?>)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Salmon.java:74 - Modifiers:
public - Return:
void
คืออะไร
จัดการเหตุการณ์ Synced Data Updated
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: equals(), refreshDimensions().
Parameters
EntityDataAccessor<?> entityDataAccessor
ตัวอย่างใช้งาน
Salmon instance = ...;
EntityDataAccessor<?> entityDataAccessor = ...;
instance.onSyncedDataUpdated(entityDataAccessor);
net.minecraft.world.entity.animal.Salmon#readAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Salmon.java:88 - Modifiers:
public - Return:
void
คืออะไร
อ่าน Additional Save Data
ทำงานยังไง
เรียกต่อ: setVariant(), byName(), getString().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Salmon#Salmon(EntityType<? extends Salmon>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Salmon.java:33 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ Salmon ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: refreshDimensions().
Parameters
EntityType<? extends Salmon> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends Salmon> entityType = ...;
Level level = ...;
Salmon instance = new Salmon(entityType, level);
net.minecraft.world.entity.animal.Salmon#saveToBucketTag(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Salmon.java:94 - Modifiers:
public - Return:
void
คืออะไร
บันทึก To Bucket Tag
ทำงานยังไง
เรียกต่อ: saveDefaultDataToBucketTag(), update(), putString(), getVariant(), getSerializedName().
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Salmon#setVariant(Salmon.Variant)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Salmon.java:106 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Variant
ทำงานยังไง
เรียกต่อ: set().
Parameters
Salmon.Variant variant
ตัวอย่างใช้งาน
Salmon$Variant
- Full name:
net.minecraft.world.entity.animal.Salmon$Variant - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Salmon.java - Type:
enum - Modifiers:
public - Implements:
StringRepresentable
net.minecraft.world.entity.animal.Salmon$Variant#getSerializedName()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Salmon.java:153 - Modifiers:
public - Return:
String
คืออะไร
อ่านค่า Serialized Name
ทำงานยังไง
คืนค่า: this.name.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
Sheep
- Full name:
net.minecraft.world.entity.animal.Sheep - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Sheep.java - Type:
class - Modifiers:
public - Extends:
Animal - Implements:
Shearable
net.minecraft.world.entity.animal.Sheep#addAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Sheep.java:199 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Additional Save Data
ทำงานยังไง
เรียกต่อ: putBoolean(), isSheared(), putByte(), getColor(), getId().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Sheep#aiStep()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Sheep.java:104 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ aiStep ตาม implementation ของ Sheep
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: eatAnimationTick. เรียกต่อ: level(), max().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Sheep#ate()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Sheep.java:282 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ ate ตาม implementation ของ Sheep
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: setSheared(), isBaby(), ageUp().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Sheep#createAttributes()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Sheep.java:113 - Modifiers:
public static - Return:
AttributeSupplier.Builder
คืออะไร
สร้าง Attributes
ทำงานยังไง
เรียกต่อ: createAnimalAttributes(), add(). คืนค่า: Animal.createAnimalAttributes().add(Attributes.MAX_HEALTH, 8.0).add(Attributes.MOVEMENT_SPEED, 0.23F).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Sheep#customServerAiStep(ServerLevel)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Sheep.java:98 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ customServerAiStep ตาม implementation ของ Sheep
ทำงานยังไง
แก้ state: eatAnimationTick. เรียกต่อ: getEatAnimationTick().
Parameters
ServerLevel serverLevel
ตัวอย่างใช้งาน
ServerLevel serverLevel = ...;
@Override
protected void customServerAiStep(ServerLevel serverLevel) {
super.customServerAiStep(serverLevel);
}
net.minecraft.world.entity.animal.Sheep#defineSynchedData(SynchedEntityData.Builder)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Sheep.java:117 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ defineSynchedData ตาม implementation ของ Sheep
ทำงานยังไง
เรียกต่อ: define().
Parameters
SynchedEntityData.Builder builder
ตัวอย่างใช้งาน
SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder);
}
net.minecraft.world.entity.animal.Sheep#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Sheep.java:291 - Modifiers:
public - Return:
SpawnGroupData
คืออะไร
ดำเนินการ finalizeSpawn ตาม implementation ของ Sheep
ทำงานยังไง
เรียกต่อ: setColor(), getRandomSheepColor(), getRandom(). คืนค่า: super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData).
Parameters
ServerLevelAccessor serverLevelAccessorDifficultyInstance difficultyInstanceEntitySpawnReason entitySpawnReasonSpawnGroupData spawnGroupData
ตัวอย่างใช้งาน
Sheep instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);
net.minecraft.world.entity.animal.Sheep#getAmbientSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Sheep.java:213 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Ambient Sound
ทำงานยังไง
คืนค่า: SoundEvents.SHEEP_AMBIENT.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Sheep#getBreedOffspring(ServerLevel,AgeableMob)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Sheep.java:270 - Modifiers:
public - Return:
Sheep
คืออะไร
อ่านค่า Breed Offspring
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: create(), getColor(), setColor(), getMixedColor(). คืนค่า: sheep.
Parameters
ServerLevel serverLevelAgeableMob ageableMob
ตัวอย่างใช้งาน
Sheep instance = ...;
ServerLevel serverLevel = ...;
AgeableMob ageableMob = ...;
Sheep result = instance.getBreedOffspring(serverLevel, ageableMob);
net.minecraft.world.entity.animal.Sheep#getColor()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Sheep.java:233 - Modifiers:
public - Return:
DyeColor
คืออะไร
อ่านค่า Color
ทำงานยังไง
เรียกต่อ: byId(), get(). คืนค่า: DyeColor.byId(this.entityData.get(DATA_WOOL_ID) & 15).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Sheep#getColor(DyeColor)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Sheep.java:71 - Modifiers:
public static - Return:
int
คืออะไร
อ่านค่า Color
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: COLOR_BY_DYE.get(dyeColor).
Parameters
DyeColor dyeColor
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Sheep#getDeathSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Sheep.java:223 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Death Sound
ทำงานยังไง
คืนค่า: SoundEvents.SHEEP_DEATH.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Sheep#getHeadEatAngleScale(float)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Sheep.java:142 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Head Eat Angle Scale
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: sin(), getXRot(). มีจุด return อย่างน้อย 2 จุด.
Parameters
float f
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Sheep#getHeadEatPositionScale(float)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Sheep.java:132 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Head Eat Position Scale
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. มีจุด return อย่างน้อย 3 จุด.
Parameters
float f
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Sheep#getHurtSound(DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Sheep.java:218 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Hurt Sound
ทำงานยังไง
คืนค่า: SoundEvents.SHEEP_HURT.
Parameters
DamageSource damageSource
ตัวอย่างใช้งาน
DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
return super.getHurtSound(damageSource);
}
net.minecraft.world.entity.animal.Sheep#getRandomSheepColor(RandomSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Sheep.java:255 - Modifiers:
public static - Return:
DyeColor
คืออะไร
อ่านค่า Random Sheep Color
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: nextInt(). มีจุด return อย่างน้อย 5 จุด.
Parameters
RandomSource randomSource
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Sheep#handleEntityEvent(byte)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Sheep.java:123 - Modifiers:
public - Return:
void
คืออะไร
จัดการ Entity Event
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: eatAnimationTick.
Parameters
byte b
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Sheep#isFood(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Sheep.java:93 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Food
ทำงานยังไง
เรียกต่อ: is(). คืนค่า: itemStack.is(ItemTags.SHEEP_FOOD).
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Sheep#isSheared()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Sheep.java:242 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Sheared
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: (this.entityData.get(DATA_WOOL_ID) & 16) != 0.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Sheep#mobInteract(Player,InteractionHand)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Sheep.java:151 - Modifiers:
public - Return:
InteractionResult
คืออะไร
ดำเนินการ mobInteract ตาม implementation ของ Sheep
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getItemInHand(), is(), level(), readyForShearing(), shear(), gameEvent(), hurtAndBreak(), getSlotForHand(). มีจุด return อย่างน้อย 3 จุด.
Parameters
Player playerInteractionHand interactionHand
ตัวอย่างใช้งาน
Sheep instance = ...;
Player player = ...;
InteractionHand interactionHand = ...;
InteractionResult result = instance.mobInteract(player, interactionHand);
net.minecraft.world.entity.animal.Sheep#playStepSound(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Sheep.java:228 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ playStepSound ตาม implementation ของ Sheep
ทำงานยังไง
เรียกต่อ: playSound().
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected void playStepSound(BlockPos blockPos, BlockState blockState) {
super.playStepSound(blockPos, blockState);
}
net.minecraft.world.entity.animal.Sheep#readAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Sheep.java:206 - Modifiers:
public - Return:
void
คืออะไร
อ่าน Additional Save Data
ทำงานยังไง
เรียกต่อ: setSheared(), getBoolean(), setColor(), byId(), getByte().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Sheep#readyForShearing()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Sheep.java:194 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ readyForShearing ตาม implementation ของ Sheep
ทำงานยังไง
เรียกต่อ: isAlive(), isSheared(), isBaby(). คืนค่า: this.isAlive() && !this.isSheared() && !this.isBaby().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Sheep#registerGoals()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Sheep.java:79 - Modifiers:
protected - Return:
void
คืออะไร
ลงทะเบียน Goals
ทำงานยังไง
แก้ state: eatBlockGoal. เรียกต่อ: addGoal(), is(). สร้างออบเจ็กต์: EatBlockGoal, FloatGoal, PanicGoal, BreedGoal.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Sheep#setColor(DyeColor)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Sheep.java:237 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Color
ทำงานยังไง
เรียกต่อ: get(), set(), getId().
Parameters
DyeColor dyeColor
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Sheep#setSheared(boolean)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Sheep.java:246 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Sheared
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: get(), set().
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Sheep#shear(ServerLevel,SoundSource,ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Sheep.java:168 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ shear ตาม implementation ของ Sheep
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: playSound(), dropFromShearingLootTable(), getCount(), spawnAtLocation(), copyWithCount(), setDeltaMovement(), getDeltaMovement(), add().
Parameters
ServerLevel serverLevelSoundSource soundSourceItemStack itemStack
ตัวอย่างใช้งาน
Sheep instance = ...;
ServerLevel serverLevel = ...;
SoundSource soundSource = ...;
ItemStack itemStack = ...;
instance.shear(serverLevel, soundSource, itemStack);
net.minecraft.world.entity.animal.Sheep#Sheep(EntityType<? extends Sheep>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Sheep.java:75 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ Sheep ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
EntityType<? extends Sheep> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends Sheep> entityType = ...;
Level level = ...;
Sheep instance = new Sheep(entityType, level);
ShoulderRidingEntity
- Full name:
net.minecraft.world.entity.animal.ShoulderRidingEntity - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/ShoulderRidingEntity.java - Type:
class - Modifiers:
public abstract - Extends:
TamableAnimal
net.minecraft.world.entity.animal.ShoulderRidingEntity#canSitOnShoulder()
- Origin:
common - Source:
net/minecraft/world/entity/animal/ShoulderRidingEntity.java:35 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Sit On Shoulder
ทำงานยังไง
คืนค่า: this.rideCooldownCounter > 100.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.ShoulderRidingEntity#setEntityOnShoulder(ServerPlayer)
- Origin:
common - Source:
net/minecraft/world/entity/animal/ShoulderRidingEntity.java:17 - Modifiers:
public - Return:
boolean
คืออะไร
กำหนดค่า Entity On Shoulder
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: putString(), getEncodeId(), saveWithoutId(), discard(). สร้างออบเจ็กต์: CompoundTag. มีจุด return อย่างน้อย 2 จุด.
Parameters
ServerPlayer serverPlayer
ตัวอย่างใช้งาน
ShoulderRidingEntity instance = ...;
ServerPlayer serverPlayer = ...;
boolean result = instance.setEntityOnShoulder(serverPlayer);
net.minecraft.world.entity.animal.ShoulderRidingEntity#ShoulderRidingEntity(EntityType<? extends ShoulderRidingEntity>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/ShoulderRidingEntity.java:13 - Modifiers:
protected - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ ShoulderRidingEntity ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
EntityType<? extends ShoulderRidingEntity> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends ShoulderRidingEntity> entityType = ...;
Level level = ...;
ShoulderRidingEntity instance = new ShoulderRidingEntity(entityType, level);
net.minecraft.world.entity.animal.ShoulderRidingEntity#tick()
- Origin:
common - Source:
net/minecraft/world/entity/animal/ShoulderRidingEntity.java:29 - Modifiers:
public - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
แก้ state: rideCooldownCounter.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SnowGolem
- Full name:
net.minecraft.world.entity.animal.SnowGolem - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/SnowGolem.java - Type:
class - Modifiers:
public - Extends:
AbstractGolem - Implements:
Shearable,RangedAttackMob
net.minecraft.world.entity.animal.SnowGolem#addAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/SnowGolem.java:72 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Additional Save Data
ทำงานยังไง
เรียกต่อ: putBoolean(), hasPumpkin().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
SnowGolem instance = ...;
CompoundTag compoundTag = ...;
instance.addAdditionalSaveData(compoundTag);
net.minecraft.world.entity.animal.SnowGolem#aiStep()
- Origin:
common - Source:
net/minecraft/world/entity/animal/SnowGolem.java:91 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ aiStep ตาม implementation ของ SnowGolem
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: level(), getBiome(), blockPosition(), is(), hurtServer(), damageSources(), onFire(), getGameRules(). สร้างออบเจ็กต์: BlockPos.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.SnowGolem#createAttributes()
- Origin:
common - Source:
net/minecraft/world/entity/animal/SnowGolem.java:62 - Modifiers:
public static - Return:
AttributeSupplier.Builder
คืออะไร
สร้าง Attributes
ทำงานยังไง
เรียกต่อ: createMobAttributes(), add(). คืนค่า: Mob.createMobAttributes().add(Attributes.MAX_HEALTH, 4.0).add(Attributes.MOVEMENT_SPEED, 0.2F).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.SnowGolem#defineSynchedData(SynchedEntityData.Builder)
- Origin:
common - Source:
net/minecraft/world/entity/animal/SnowGolem.java:66 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ defineSynchedData ตาม implementation ของ SnowGolem
ทำงานยังไง
เรียกต่อ: define().
Parameters
SynchedEntityData.Builder builder
ตัวอย่างใช้งาน
SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder);
}
net.minecraft.world.entity.animal.SnowGolem#getAmbientSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/SnowGolem.java:180 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Ambient Sound
ทำงานยังไง
คืนค่า: SoundEvents.SNOW_GOLEM_AMBIENT.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.SnowGolem#getDeathSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/SnowGolem.java:192 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Death Sound
ทำงานยังไง
คืนค่า: SoundEvents.SNOW_GOLEM_DEATH.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.SnowGolem#getHurtSound(DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/SnowGolem.java:186 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Hurt Sound
ทำงานยังไง
คืนค่า: SoundEvents.SNOW_GOLEM_HURT.
Parameters
DamageSource damageSource
ตัวอย่างใช้งาน
DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
return super.getHurtSound(damageSource);
}
net.minecraft.world.entity.animal.SnowGolem#getLeashOffset()
- Origin:
common - Source:
net/minecraft/world/entity/animal/SnowGolem.java:198 - Modifiers:
public - Return:
Vec3
คืออะไร
อ่านค่า Leash Offset
ทำงานยังไง
เรียกต่อ: getEyeHeight(), getBbWidth(). สร้างออบเจ็กต์: Vec3. คืนค่า: new Vec3(0.0, 0.75F * this.getEyeHeight(), this.getBbWidth() * 0.4F).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.SnowGolem#hasPumpkin()
- Origin:
common - Source:
net/minecraft/world/entity/animal/SnowGolem.java:167 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Pumpkin
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: (this.entityData.get(DATA_PUMPKIN_ID) & 16) != 0.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.SnowGolem#isSensitiveToWater()
- Origin:
common - Source:
net/minecraft/world/entity/animal/SnowGolem.java:86 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Sensitive To Water
ทำงานยังไง
คืนค่า: true.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.SnowGolem#mobInteract(Player,InteractionHand)
- Origin:
common - Source:
net/minecraft/world/entity/animal/SnowGolem.java:134 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ดำเนินการ mobInteract ตาม implementation ของ SnowGolem
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getItemInHand(), is(), readyForShearing(), level(), shear(), gameEvent(), hurtAndBreak(), getSlotForHand(). มีจุด return อย่างน้อย 2 จุด.
Parameters
Player playerInteractionHand interactionHand
ตัวอย่างใช้งาน
Player player = ...;
InteractionHand interactionHand = ...;
@Override
protected InteractionResult mobInteract(Player player, InteractionHand interactionHand) {
return super.mobInteract(player, interactionHand);
}
net.minecraft.world.entity.animal.SnowGolem#performRangedAttack(LivingEntity,float)
- Origin:
common - Source:
net/minecraft/world/entity/animal/SnowGolem.java:118 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ performRangedAttack ตาม implementation ของ SnowGolem
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getX(), getEyeY(), getZ(), sqrt(), level(), spawnProjectile(), shoot(), getY(). สร้างออบเจ็กต์: ItemStack, Snowball.
Parameters
LivingEntity livingEntityfloat f
ตัวอย่างใช้งาน
SnowGolem instance = ...;
LivingEntity livingEntity = ...;
instance.performRangedAttack(livingEntity, 0.0F);
net.minecraft.world.entity.animal.SnowGolem#readAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/SnowGolem.java:78 - Modifiers:
public - Return:
void
คืออะไร
อ่าน Additional Save Data
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: contains(), setPumpkin(), getBoolean().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
SnowGolem instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);
net.minecraft.world.entity.animal.SnowGolem#readyForShearing()
- Origin:
common - Source:
net/minecraft/world/entity/animal/SnowGolem.java:162 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ readyForShearing ตาม implementation ของ SnowGolem
ทำงานยังไง
เรียกต่อ: isAlive(), hasPumpkin(). คืนค่า: this.isAlive() && this.hasPumpkin().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.SnowGolem#registerGoals()
- Origin:
common - Source:
net/minecraft/world/entity/animal/SnowGolem.java:52 - Modifiers:
protected - Return:
void
คืออะไร
ลงทะเบียน Goals
ทำงานยังไง
เรียกต่อ: addGoal(). สร้างออบเจ็กต์: RangedAttackGoal, WaterAvoidingRandomStrollGoal, LookAtPlayerGoal, RandomLookAroundGoal.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.SnowGolem#setPumpkin(boolean)
- Origin:
common - Source:
net/minecraft/world/entity/animal/SnowGolem.java:171 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Pumpkin
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: get(), set().
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.SnowGolem#shear(ServerLevel,SoundSource,ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/animal/SnowGolem.java:150 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ shear ตาม implementation ของ SnowGolem
ทำงานยังไง
เรียกต่อ: playSound(), setPumpkin(), dropFromShearingLootTable(), spawnAtLocation(), getEyeHeight().
Parameters
ServerLevel serverLevelSoundSource soundSourceItemStack itemStack
ตัวอย่างใช้งาน
SnowGolem instance = ...;
ServerLevel serverLevel = ...;
SoundSource soundSource = ...;
ItemStack itemStack = ...;
instance.shear(serverLevel, soundSource, itemStack);
net.minecraft.world.entity.animal.SnowGolem#SnowGolem(EntityType<? extends SnowGolem>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/SnowGolem.java:48 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ SnowGolem ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
EntityType<? extends SnowGolem> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends SnowGolem> entityType = ...;
Level level = ...;
SnowGolem instance = new SnowGolem(entityType, level);
Squid
- Full name:
net.minecraft.world.entity.animal.Squid - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Squid.java - Type:
class - Modifiers:
public - Extends:
AgeableWaterCreature
net.minecraft.world.entity.animal.Squid#aiStep()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Squid.java:108 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ aiStep ตาม implementation ของ Squid
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: xBodyRotO, zBodyRotO, oldTentacleMovement, oldTentacleAngle, tentacleMovement, tentacleSpeed. เรียกต่อ: level(), nextInt(), nextFloat(), broadcastEntityEvent(), isInWaterOrBubble(), sin(), isControlledByLocalInstance(), setDeltaMovement().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Squid#canBeLeashed()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Squid.java:82 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Be Leashed
ทำงานยังไง
คืนค่า: true.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Squid#createAttributes()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Squid.java:59 - Modifiers:
public static - Return:
AttributeSupplier.Builder
คืออะไร
สร้าง Attributes
ทำงานยังไง
เรียกต่อ: createMobAttributes(), add(). คืนค่า: Mob.createMobAttributes().add(Attributes.MAX_HEALTH, 10.0).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Squid#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Squid.java:225 - Modifiers:
public - Return:
SpawnGroupData
คืออะไร
ดำเนินการ finalizeSpawn ตาม implementation ของ Squid
ทำงานยังไง
เรียกต่อ: requireNonNullElseGet(), AgeableMobGroupData(). สร้างออบเจ็กต์: AgeableMob.AgeableMobGroupData. คืนค่า: super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData2).
Parameters
ServerLevelAccessor serverLevelAccessorDifficultyInstance difficultyInstanceEntitySpawnReason entitySpawnReasonSpawnGroupData spawnGroupData
ตัวอย่างใช้งาน
Squid instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);
net.minecraft.world.entity.animal.Squid#getAmbientSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Squid.java:63 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Ambient Sound
ทำงานยังไง
คืนค่า: SoundEvents.SQUID_AMBIENT.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Squid#getBreedOffspring(ServerLevel,AgeableMob)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Squid.java:97 - Modifiers:
public - Return:
AgeableMob
คืออะไร
อ่านค่า Breed Offspring
ทำงานยังไง
เรียกต่อ: create(). คืนค่า: EntityType.SQUID.create(serverLevel, EntitySpawnReason.BREEDING).
Parameters
ServerLevel serverLevelAgeableMob ageableMob
ตัวอย่างใช้งาน
Squid instance = ...;
ServerLevel serverLevel = ...;
AgeableMob ageableMob = ...;
AgeableMob result = instance.getBreedOffspring(serverLevel, ageableMob);
net.minecraft.world.entity.animal.Squid#getDeathSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Squid.java:73 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Death Sound
ทำงานยังไง
คืนค่า: SoundEvents.SQUID_DEATH.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Squid#getDefaultGravity()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Squid.java:103 - Modifiers:
protected - Return:
double
คืออะไร
อ่านค่า Default Gravity
ทำงานยังไง
คืนค่า: 0.08.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Squid#getHurtSound(DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Squid.java:68 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Hurt Sound
ทำงานยังไง
คืนค่า: SoundEvents.SQUID_HURT.
Parameters
DamageSource damageSource
ตัวอย่างใช้งาน
DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
return super.getHurtSound(damageSource);
}
net.minecraft.world.entity.animal.Squid#getInkParticle()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Squid.java:201 - Modifiers:
protected - Return:
ParticleOptions
คืออะไร
อ่านค่า Ink Particle
ทำงานยังไง
คืนค่า: ParticleTypes.SQUID_INK.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Squid#getMovementEmission()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Squid.java:92 - Modifiers:
protected - Return:
Entity.MovementEmission
คืออะไร
อ่านค่า Movement Emission
ทำงานยังไง
คืนค่า: Entity.MovementEmission.EVENTS.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
@Override
protected Entity.MovementEmission getMovementEmission() {
return super.getMovementEmission();
}
net.minecraft.world.entity.animal.Squid#getSoundVolume()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Squid.java:87 - Modifiers:
protected - Return:
float
คืออะไร
อ่านค่า Sound Volume
ทำงานยังไง
คืนค่า: 0.4F.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Squid#getSquirtSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Squid.java:78 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Squirt Sound
ทำงานยังไง
คืนค่า: SoundEvents.SQUID_SQUIRT.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Squid#handleEntityEvent(byte)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Squid.java:212 - Modifiers:
public - Return:
void
คืออะไร
จัดการ Entity Event
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: tentacleMovement.
Parameters
byte b
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Squid#hasMovementVector()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Squid.java:221 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Movement Vector
ทำงานยังไง
เรียกต่อ: lengthSqr(). คืนค่า: this.movementVector.lengthSqr() > 1.0E-5F.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Squid#hurtServer(ServerLevel,DamageSource,float)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Squid.java:174 - Modifiers:
public - Return:
boolean
คืออะไร
ประมวลผลความเสียหาย Server
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getLastHurtByMob(), spawnInk(). มีจุด return อย่างน้อย 2 จุด.
Parameters
ServerLevel serverLevelDamageSource damageSourcefloat f
ตัวอย่างใช้งาน
Squid instance = ...;
ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
boolean result = instance.hurtServer(serverLevel, damageSource, 0.0F);
net.minecraft.world.entity.animal.Squid#registerGoals()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Squid.java:53 - Modifiers:
protected - Return:
void
คืออะไร
ลงทะเบียน Goals
ทำงานยังไง
เรียกต่อ: addGoal(), SquidRandomMovementGoal(), SquidFleeGoal(). สร้างออบเจ็กต์: Squid.SquidRandomMovementGoal, Squid.SquidFleeGoal.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Squid#Squid(EntityType<? extends Squid>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Squid.java:47 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ Squid ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: tentacleSpeed. เรียกต่อ: setSeed(), getId(), nextFloat().
Parameters
EntityType<? extends Squid> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends Squid> entityType = ...;
Level level = ...;
Squid instance = new Squid(entityType, level);
net.minecraft.world.entity.animal.Squid#travel(Vec3)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Squid.java:205 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ travel ตาม implementation ของ Squid
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isControlledByLocalInstance(), move(), getDeltaMovement().
Parameters
Vec3 vec3
ตัวอย่างใช้งาน
TropicalFish
- Full name:
net.minecraft.world.entity.animal.TropicalFish - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/TropicalFish.java - Type:
class - Modifiers:
public - Extends:
AbstractSchoolingFish - Implements:
VariantHolder<TropicalFish.Pattern>
net.minecraft.world.entity.animal.TropicalFish#addAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/TropicalFish.java:96 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Additional Save Data
ทำงานยังไง
เรียกต่อ: putInt(), getPackedVariant().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
TropicalFish instance = ...;
CompoundTag compoundTag = ...;
instance.addAdditionalSaveData(compoundTag);
net.minecraft.world.entity.animal.TropicalFish#checkTropicalFishSpawnRules(EntityType<TropicalFish>,LevelAccessor,EntitySpawnReason,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/TropicalFish.java:206 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบ Tropical Fish Spawn Rules
ทำงานยังไง
เรียกต่อ: getFluidState(), below(), is(), getBlockState(), above(), getBiome(), checkSurfaceWaterAnimalSpawnRules().
Parameters
EntityType<TropicalFish> entityTypeLevelAccessor levelAccessorEntitySpawnReason entitySpawnReasonBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
EntityType<TropicalFish> entityType = ...;
LevelAccessor levelAccessor = ...;
EntitySpawnReason entitySpawnReason = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
boolean result = TropicalFish.checkTropicalFishSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource);
net.minecraft.world.entity.animal.TropicalFish#defineSynchedData(SynchedEntityData.Builder)
- Origin:
common - Source:
net/minecraft/world/entity/animal/TropicalFish.java:90 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ defineSynchedData ตาม implementation ของ TropicalFish
ทำงานยังไง
เรียกต่อ: define().
Parameters
SynchedEntityData.Builder builder
ตัวอย่างใช้งาน
SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder);
}
net.minecraft.world.entity.animal.TropicalFish#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)
- Origin:
common - Source:
net/minecraft/world/entity/animal/TropicalFish.java:179 - Modifiers:
public - Return:
SpawnGroupData
คืออะไร
ดำเนินการ finalizeSpawn ตาม implementation ของ TropicalFish
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: isSchool. เรียกต่อ: getRandom(), nextFloat(), TropicalFishGroupData(), values(), Variant(), setPackedVariant(), getPackedId(). สร้างออบเจ็กต์: TropicalFish.TropicalFishGroupData, TropicalFish.Variant. คืนค่า: spawnGroupData.
Parameters
ServerLevelAccessor serverLevelAccessorDifficultyInstance difficultyInstanceEntitySpawnReason entitySpawnReasonSpawnGroupData spawnGroupData
ตัวอย่างใช้งาน
TropicalFish instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);
net.minecraft.world.entity.animal.TropicalFish#getAmbientSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/TropicalFish.java:151 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Ambient Sound
ทำงานยังไง
คืนค่า: SoundEvents.TROPICAL_FISH_AMBIENT.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.TropicalFish#getBaseColor()
- Origin:
common - Source:
net/minecraft/world/entity/animal/TropicalFish.java:121 - Modifiers:
public - Return:
DyeColor
คืออะไร
อ่านค่า Base Color
ทำงานยังไง
เรียกต่อ: getPackedVariant(). คืนค่า: getBaseColor(this.getPackedVariant()).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.TropicalFish#getBaseColor(int)
- Origin:
common - Source:
net/minecraft/world/entity/animal/TropicalFish.java:78 - Modifiers:
public static - Return:
DyeColor
คืออะไร
อ่านค่า Base Color
ทำงานยังไง
เรียกต่อ: byId(). คืนค่า: DyeColor.byId(i >> 16 & 0xFF).
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.TropicalFish#getBucketItemStack()
- Origin:
common - Source:
net/minecraft/world/entity/animal/TropicalFish.java:146 - Modifiers:
public - Return:
ItemStack
คืออะไร
อ่านค่า Bucket Item Stack
ทำงานยังไง
สร้างออบเจ็กต์: ItemStack. คืนค่า: new ItemStack(Items.TROPICAL_FISH_BUCKET).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.TropicalFish#getDeathSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/TropicalFish.java:156 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Death Sound
ทำงานยังไง
คืนค่า: SoundEvents.TROPICAL_FISH_DEATH.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.TropicalFish#getFlopSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/TropicalFish.java:166 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Flop Sound
ทำงานยังไง
คืนค่า: SoundEvents.TROPICAL_FISH_FLOP.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.TropicalFish#getHurtSound(DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/TropicalFish.java:161 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Hurt Sound
ทำงานยังไง
คืนค่า: SoundEvents.TROPICAL_FISH_HURT.
Parameters
DamageSource damageSource
ตัวอย่างใช้งาน
DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
return super.getHurtSound(damageSource);
}
net.minecraft.world.entity.animal.TropicalFish#getPattern(int)
- Origin:
common - Source:
net/minecraft/world/entity/animal/TropicalFish.java:86 - Modifiers:
public static - Return:
TropicalFish.Pattern
คืออะไร
อ่านค่า Pattern
ทำงานยังไง
เรียกต่อ: byId(). คืนค่า: TropicalFish.Pattern.byId(i & 65535).
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.TropicalFish#getPatternColor()
- Origin:
common - Source:
net/minecraft/world/entity/animal/TropicalFish.java:125 - Modifiers:
public - Return:
DyeColor
คืออะไร
อ่านค่า Pattern Color
ทำงานยังไง
เรียกต่อ: getPackedVariant(). คืนค่า: getPatternColor(this.getPackedVariant()).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.TropicalFish#getPatternColor(int)
- Origin:
common - Source:
net/minecraft/world/entity/animal/TropicalFish.java:82 - Modifiers:
public static - Return:
DyeColor
คืออะไร
อ่านค่า Pattern Color
ทำงานยังไง
เรียกต่อ: byId(). คืนค่า: DyeColor.byId(i >> 24 & 0xFF).
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.TropicalFish#getPredefinedName(int)
- Origin:
common - Source:
net/minecraft/world/entity/animal/TropicalFish.java:70 - Modifiers:
public static - Return:
String
คืออะไร
อ่านค่า Predefined Name
ทำงานยังไง
คืนค่า: "entity.minecraft.tropical_fish.predefined." + i.
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.TropicalFish#getVariant()
- Origin:
common - Source:
net/minecraft/world/entity/animal/TropicalFish.java:129 - Modifiers:
public - Return:
TropicalFish.Pattern
คืออะไร
อ่านค่า Variant
ทำงานยังไง
เรียกต่อ: getPattern(), getPackedVariant(). คืนค่า: getPattern(this.getPackedVariant()).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.TropicalFish#isMaxGroupSizeReached(int)
- Origin:
common - Source:
net/minecraft/world/entity/animal/TropicalFish.java:112 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Max Group Size Reached
ทำงานยังไง
คืนค่า: !this.isSchool.
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.TropicalFish#loadFromBucketTag(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/TropicalFish.java:171 - Modifiers:
public - Return:
void
คืออะไร
โหลด From Bucket Tag
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: contains(), setPackedVariant(), getInt().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
TropicalFish instance = ...;
CompoundTag compoundTag = ...;
instance.loadFromBucketTag(compoundTag);
net.minecraft.world.entity.animal.TropicalFish#readAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/TropicalFish.java:102 - Modifiers:
public - Return:
void
คืออะไร
อ่าน Additional Save Data
ทำงานยังไง
เรียกต่อ: setPackedVariant(), getInt().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
TropicalFish instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);
net.minecraft.world.entity.animal.TropicalFish#saveToBucketTag(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/animal/TropicalFish.java:140 - Modifiers:
public - Return:
void
คืออะไร
บันทึก To Bucket Tag
ทำงานยังไง
เรียกต่อ: update(), putInt(), getPackedVariant().
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.TropicalFish#setVariant(TropicalFish.Pattern)
- Origin:
common - Source:
net/minecraft/world/entity/animal/TropicalFish.java:133 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Variant
ทำงานยังไง
เรียกต่อ: getPackedVariant(), getBaseColor(), getPatternColor(), setPackedVariant(), packVariant().
Parameters
TropicalFish.Pattern pattern
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.TropicalFish#TropicalFish(EntityType<? extends TropicalFish>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/TropicalFish.java:66 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ TropicalFish ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
EntityType<? extends TropicalFish> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends TropicalFish> entityType = ...;
Level level = ...;
TropicalFish instance = new TropicalFish(entityType, level);
TropicalFish$Pattern
- Full name:
net.minecraft.world.entity.animal.TropicalFish$Pattern - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/TropicalFish.java - Type:
enum - Modifiers:
public - Implements:
StringRepresentable
net.minecraft.world.entity.animal.TropicalFish$Pattern#base()
- Origin:
common - Source:
net/minecraft/world/entity/animal/TropicalFish.java:260 - Modifiers:
public - Return:
TropicalFish.Base
คืออะไร
ดำเนินการ base ตาม implementation ของ TropicalFish$Pattern
ทำงานยังไง
คืนค่า: this.base.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.TropicalFish$Pattern#byId(int)
- Origin:
common - Source:
net/minecraft/world/entity/animal/TropicalFish.java:256 - Modifiers:
public static - Return:
TropicalFish.Pattern
คืออะไร
ดำเนินการ byId ตาม implementation ของ TropicalFish$Pattern
ทำงานยังไง
เรียกต่อ: apply(). คืนค่า: BY_ID.apply(i).
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.TropicalFish$Pattern#displayName()
- Origin:
common - Source:
net/minecraft/world/entity/animal/TropicalFish.java:273 - Modifiers:
public - Return:
Component
คืออะไร
ดำเนินการ displayName ตาม implementation ของ TropicalFish$Pattern
ทำงานยังไง
คืนค่า: this.displayName.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.TropicalFish$Pattern#getPackedId()
- Origin:
common - Source:
net/minecraft/world/entity/animal/TropicalFish.java:264 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Packed Id
ทำงานยังไง
คืนค่า: this.packedId.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.TropicalFish$Pattern#getSerializedName()
- Origin:
common - Source:
net/minecraft/world/entity/animal/TropicalFish.java:268 - Modifiers:
public - Return:
String
คืออะไร
อ่านค่า Serialized Name
ทำงานยังไง
คืนค่า: this.name.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
TropicalFish$Variant
- Full name:
net.minecraft.world.entity.animal.TropicalFish$Variant - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/TropicalFish.java - Type:
record - Modifiers:
public
net.minecraft.world.entity.animal.TropicalFish$Variant#getPackedId()
- Origin:
common - Source:
net/minecraft/world/entity/animal/TropicalFish.java:294 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Packed Id
ทำงานยังไง
เรียกต่อ: packVariant(). คืนค่า: TropicalFish.packVariant(this.pattern, this.baseColor, this.patternColor).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.TropicalFish$Variant#Variant(int)
- Origin:
common - Source:
net/minecraft/world/entity/animal/TropicalFish.java:290 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ TropicalFish.Variant ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: getPattern(), getBaseColor(), getPatternColor().
Parameters
int i
ตัวอย่างใช้งาน
Turtle
- Full name:
net.minecraft.world.entity.animal.Turtle - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Turtle.java - Type:
class - Modifiers:
public - Extends:
Animal
net.minecraft.world.entity.animal.Turtle#addAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:147 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Additional Save Data
ทำงานยังไง
เรียกต่อ: putInt(), getHomePos(), getX(), getY(), getZ(), putBoolean(), hasEgg(), getTravelPos().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Turtle#ageBoundaryReached()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:302 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ ageBoundaryReached ตาม implementation ของ Turtle
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isBaby(), level(), getGameRules(), getBoolean(), spawnAtLocation().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Turtle#aiStep()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:290 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ aiStep ตาม implementation ของ Turtle
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isAlive(), isLayingEgg(), blockPosition(), onSand(), level(), levelEvent(), getId(), getBlockState().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Turtle#canBeLeashed()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:324 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Be Leashed
ทำงานยังไง
คืนค่า: false.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Turtle#canFallInLove()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:250 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Fall In Love
ทำงานยังไง
เรียกต่อ: hasEgg(). คืนค่า: super.canFallInLove() && !this.hasEgg().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Turtle#checkTurtleSpawnRules(EntityType<Turtle>,LevelAccessor,EntitySpawnReason,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:183 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบ Turtle Spawn Rules
ทำงานยังไง
เรียกต่อ: getY(), getSeaLevel(), onSand(), isBrightEnoughToSpawn(). คืนค่า: blockPos.getY() < levelAccessor.getSeaLevel() + 4 && TurtleEggBlock.onSand(levelAccessor, blockPos) && isBrightEnoughToSpawn(levelAccessor, blockPos).
Parameters
EntityType<Turtle> entityTypeLevelAccessor levelAccessorEntitySpawnReason entitySpawnReasonBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
EntityType<Turtle> entityType = ...;
LevelAccessor levelAccessor = ...;
EntitySpawnReason entitySpawnReason = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
boolean result = Turtle.checkTurtleSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource);
net.minecraft.world.entity.animal.Turtle#createAttributes()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:202 - Modifiers:
public static - Return:
AttributeSupplier.Builder
คืออะไร
สร้าง Attributes
ทำงานยังไง
เรียกต่อ: createAnimalAttributes(), add(). คืนค่า: Animal.createAnimalAttributes().add(Attributes.MAX_HEALTH, 30.0).add(Attributes.MOVEMENT_SPEED, 0.25).add(Attributes.STEP_HEIGHT, 1.0).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Turtle#createNavigation(Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:265 - Modifiers:
protected - Return:
PathNavigation
คืออะไร
สร้าง Navigation
ทำงานยังไง
เรียกต่อ: TurtlePathNavigation(). สร้างออบเจ็กต์: Turtle.TurtlePathNavigation. คืนค่า: new Turtle.TurtlePathNavigation(this, level).
Parameters
Level level
ตัวอย่างใช้งาน
Level level = ...;
@Override
protected PathNavigation createNavigation(Level level) {
return super.createNavigation(level);
}
net.minecraft.world.entity.animal.Turtle#defineSynchedData(SynchedEntityData.Builder)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:136 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ defineSynchedData ตาม implementation ของ Turtle
ทำงานยังไง
เรียกต่อ: define().
Parameters
SynchedEntityData.Builder builder
ตัวอย่างใช้งาน
SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder);
}
net.minecraft.world.entity.animal.Turtle#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:173 - Modifiers:
public - Return:
SpawnGroupData
คืออะไร
ดำเนินการ finalizeSpawn ตาม implementation ของ Turtle
ทำงานยังไง
เรียกต่อ: setHomePos(), blockPosition(), setTravelPos(). คืนค่า: super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData).
Parameters
ServerLevelAccessor serverLevelAccessorDifficultyInstance difficultyInstanceEntitySpawnReason entitySpawnReasonSpawnGroupData spawnGroupData
ตัวอย่างใช้งาน
Turtle instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);
net.minecraft.world.entity.animal.Turtle#getAgeScale()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:260 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Age Scale
ทำงานยังไง
เรียกต่อ: isBaby(). คืนค่า: this.isBaby() ? 0.3F : 1.0F.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Turtle#getAmbientSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:216 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Ambient Sound
ทำงานยังไง
เรียกต่อ: isInWater(), onGround(), isBaby(). คืนค่า: !this.isInWater() && this.onGround() && !this.isBaby() ? SoundEvents.TURTLE_AMBIENT_LAND : super.getAmbientSound().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Turtle#getAmbientSoundInterval()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:211 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Ambient Sound Interval
ทำงานยังไง
คืนค่า: 200.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Turtle#getBreedOffspring(ServerLevel,AgeableMob)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:270 - Modifiers:
public - Return:
AgeableMob
คืออะไร
อ่านค่า Breed Offspring
ทำงานยังไง
เรียกต่อ: create(). คืนค่า: EntityType.TURTLE.create(serverLevel, EntitySpawnReason.BREEDING).
Parameters
ServerLevel serverLevelAgeableMob ageableMob
ตัวอย่างใช้งาน
Turtle instance = ...;
ServerLevel serverLevel = ...;
AgeableMob ageableMob = ...;
AgeableMob result = instance.getBreedOffspring(serverLevel, ageableMob);
net.minecraft.world.entity.animal.Turtle#getDeathSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:238 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Death Sound
ทำงานยังไง
เรียกต่อ: isBaby(). คืนค่า: this.isBaby() ? SoundEvents.TURTLE_DEATH_BABY : SoundEvents.TURTLE_DEATH.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Turtle#getDefaultDimensions(Pose)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:334 - Modifiers:
public - Return:
EntityDimensions
คืออะไร
อ่านค่า Default Dimensions
ทำงานยังไง
เรียกต่อ: isBaby(). คืนค่า: this.isBaby() ? BABY_DIMENSIONS : super.getDefaultDimensions(pose).
Parameters
Pose pose
ตัวอย่างใช้งาน
Turtle instance = ...;
Pose pose = ...;
EntityDimensions result = instance.getDefaultDimensions(pose);
net.minecraft.world.entity.animal.Turtle#getHurtSound(DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:232 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Hurt Sound
ทำงานยังไง
เรียกต่อ: isBaby(). คืนค่า: this.isBaby() ? SoundEvents.TURTLE_HURT_BABY : SoundEvents.TURTLE_HURT.
Parameters
DamageSource damageSource
ตัวอย่างใช้งาน
DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
return super.getHurtSound(damageSource);
}
net.minecraft.world.entity.animal.Turtle#getSwimSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:227 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Swim Sound
ทำงานยังไง
คืนค่า: SoundEvents.TURTLE_SWIM.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Turtle#getWalkTargetValue(BlockPos,LevelReader)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:281 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Walk Target Value
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isGoingHome(), getFluidState(), is(), onSand(), getPathfindingCostFromLightLevels(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockPos blockPosLevelReader levelReader
ตัวอย่างใช้งาน
Turtle instance = ...;
BlockPos blockPos = ...;
LevelReader levelReader = ...;
float result = instance.getWalkTargetValue(blockPos, levelReader);
net.minecraft.world.entity.animal.Turtle#hasEgg()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:103 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Egg
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: this.entityData.get(HAS_EGG).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Turtle#isFood(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:276 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Food
ทำงานยังไง
เรียกต่อ: is(). คืนค่า: itemStack.is(ItemTags.TURTLE_FOOD).
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Turtle#isLayingEgg()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:111 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Laying Egg
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: this.entityData.get(LAYING_EGG).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Turtle#isPushedByFluid()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:206 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pushed By Fluid
ทำงานยังไง
คืนค่า: false.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Turtle#nextStep()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:255 - Modifiers:
protected - Return:
float
คืออะไร
ดำเนินการ nextStep ตาม implementation ของ Turtle
ทำงานยังไง
คืนค่า: this.moveDist + 0.15F.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Turtle#playStepSound(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:244 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ playStepSound ตาม implementation ของ Turtle
ทำงานยังไง
เรียกต่อ: isBaby(), playSound().
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected void playStepSound(BlockPos blockPos, BlockState blockState) {
super.playStepSound(blockPos, blockState);
}
net.minecraft.world.entity.animal.Turtle#playSwimSound(float)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:222 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ playSwimSound ตาม implementation ของ Turtle
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
float f
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Turtle#readAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:159 - Modifiers:
public - Return:
void
คืออะไร
อ่าน Additional Save Data
ทำงานยังไง
เรียกต่อ: getInt(), setHomePos(), setHasEgg(), getBoolean(), setTravelPos(). สร้างออบเจ็กต์: BlockPos.
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Turtle#registerGoals()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:189 - Modifiers:
protected - Return:
void
คืออะไร
ลงทะเบียน Goals
ทำงานยังไง
เรียกต่อ: addGoal(), TurtlePanicGoal(), TurtleBreedGoal(), TurtleLayEggGoal(), is(), TurtleGoToWaterGoal(), TurtleGoHomeGoal(), TurtleTravelGoal(). สร้างออบเจ็กต์: Turtle.TurtlePanicGoal, Turtle.TurtleBreedGoal, Turtle.TurtleLayEggGoal, TemptGoal.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Turtle#setHomePos(BlockPos)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:87 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Home Pos
ทำงานยังไง
เรียกต่อ: set().
Parameters
BlockPos blockPos
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Turtle#thunderHit(ServerLevel,LightningBolt)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:329 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ thunderHit ตาม implementation ของ Turtle
ทำงานยังไง
เรียกต่อ: hurtServer(), damageSources(), lightningBolt().
Parameters
ServerLevel serverLevelLightningBolt lightningBolt
ตัวอย่างใช้งาน
Turtle instance = ...;
ServerLevel serverLevel = ...;
LightningBolt lightningBolt = ...;
instance.thunderHit(serverLevel, lightningBolt);
net.minecraft.world.entity.animal.Turtle#travel(Vec3)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:310 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ travel ตาม implementation ของ Turtle
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isControlledByLocalInstance(), isInWater(), moveRelative(), move(), getDeltaMovement(), setDeltaMovement(), scale(), getTarget().
Parameters
Vec3 vec3
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Turtle#Turtle(EntityType<? extends Turtle>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Turtle.java:78 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ Turtle ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: moveControl. เรียกต่อ: setPathfindingMalus(), TurtleMoveControl(). สร้างออบเจ็กต์: Turtle.TurtleMoveControl.
Parameters
EntityType<? extends Turtle> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends Turtle> entityType = ...;
Level level = ...;
Turtle instance = new Turtle(entityType, level);
WaterAnimal
- Full name:
net.minecraft.world.entity.animal.WaterAnimal - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/WaterAnimal.java - Type:
class - Modifiers:
public abstract - Extends:
PathfinderMob
net.minecraft.world.entity.animal.WaterAnimal#baseTick()
- Origin:
common - Source:
net/minecraft/world/entity/animal/WaterAnimal.java:51 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ baseTick ตาม implementation ของ WaterAnimal
ทำงานยังไง
เรียกต่อ: getAirSupply(), handleAirSupply().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.WaterAnimal#canBeLeashed()
- Origin:
common - Source:
net/minecraft/world/entity/animal/WaterAnimal.java:63 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Be Leashed
ทำงานยังไง
คืนค่า: false.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.WaterAnimal#checkSpawnObstruction(LevelReader)
- Origin:
common - Source:
net/minecraft/world/entity/animal/WaterAnimal.java:24 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบ Spawn Obstruction
ทำงานยังไง
เรียกต่อ: isUnobstructed(). คืนค่า: levelReader.isUnobstructed(this).
Parameters
LevelReader levelReader
ตัวอย่างใช้งาน
WaterAnimal instance = ...;
LevelReader levelReader = ...;
boolean result = instance.checkSpawnObstruction(levelReader);
net.minecraft.world.entity.animal.WaterAnimal#checkSurfaceWaterAnimalSpawnRules(EntityType<? extends WaterAnimal>,LevelAccessor,EntitySpawnReason,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/WaterAnimal.java:68 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบ Surface Water Animal Spawn Rules
ทำงานยังไง
เรียกต่อ: getSeaLevel(), getY(), getFluidState(), below(), is(), getBlockState(), above().
Parameters
EntityType<? extends WaterAnimal> entityTypeLevelAccessor levelAccessorEntitySpawnReason entitySpawnReasonBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
EntityType<? extends WaterAnimal> entityType = ...;
LevelAccessor levelAccessor = ...;
EntitySpawnReason entitySpawnReason = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
boolean result = WaterAnimal.checkSurfaceWaterAnimalSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource);
net.minecraft.world.entity.animal.WaterAnimal#getAmbientSoundInterval()
- Origin:
common - Source:
net/minecraft/world/entity/animal/WaterAnimal.java:29 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Ambient Sound Interval
ทำงานยังไง
คืนค่า: 120.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.WaterAnimal#getBaseExperienceReward(ServerLevel)
- Origin:
common - Source:
net/minecraft/world/entity/animal/WaterAnimal.java:34 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Base Experience Reward
ทำงานยังไง
เรียกต่อ: nextInt(). คืนค่า: 1 + this.random.nextInt(3).
Parameters
ServerLevel serverLevel
ตัวอย่างใช้งาน
ServerLevel serverLevel = ...;
@Override
protected int getBaseExperienceReward(ServerLevel serverLevel) {
return super.getBaseExperienceReward(serverLevel);
}
net.minecraft.world.entity.animal.WaterAnimal#handleAirSupply(int)
- Origin:
common - Source:
net/minecraft/world/entity/animal/WaterAnimal.java:39 - Modifiers:
protected - Return:
void
คืออะไร
จัดการ Air Supply
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isAlive(), isInWaterOrBubble(), setAirSupply(), getAirSupply(), hurt(), damageSources(), drown().
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.WaterAnimal#isPushedByFluid()
- Origin:
common - Source:
net/minecraft/world/entity/animal/WaterAnimal.java:58 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pushed By Fluid
ทำงานยังไง
คืนค่า: false.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.WaterAnimal#WaterAnimal(EntityType<? extends WaterAnimal>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/WaterAnimal.java:19 - Modifiers:
protected - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ WaterAnimal ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: setPathfindingMalus().
Parameters
EntityType<? extends WaterAnimal> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends WaterAnimal> entityType = ...;
Level level = ...;
WaterAnimal instance = new WaterAnimal(entityType, level);
Wolf
- Full name:
net.minecraft.world.entity.animal.Wolf - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Wolf.java - Type:
class - Modifiers:
public - Extends:
TamableAnimal - Implements:
NeutralMob,VariantHolder<Holder<WolfVariant>>
net.minecraft.world.entity.animal.Wolf#actuallyHurt(ServerLevel,DamageSource,float)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:354 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ actuallyHurt ตาม implementation ของ Wolf
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canArmorAbsorb(), getBodyArmorItem(), getDamageValue(), getMaxDamage(), hurtAndBreak(), ceil(), byDamage(), playSound(). สร้างออบเจ็กต์: ItemParticleOption.
Parameters
ServerLevel serverLevelDamageSource damageSourcefloat f
ตัวอย่างใช้งาน
ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
@Override
protected void actuallyHurt(ServerLevel serverLevel, DamageSource damageSource, float f) {
super.actuallyHurt(serverLevel, damageSource, f);
}
net.minecraft.world.entity.animal.Wolf#addAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:179 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Additional Save Data
ทำงานยังไง
เรียกต่อ: putByte(), getCollarColor(), getId(), getVariant(), unwrapKey(), ifPresent(), putString(), location().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#aiStep()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:245 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ aiStep ตาม implementation ของ Wolf
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: isShaking, shakeAnim, shakeAnimO. เรียกต่อ: level(), isPathFinding(), onGround(), broadcastEntityEvent(), updatePersistentAnger().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#applyTamingSideEffects()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:384 - Modifiers:
protected - Return:
void
คืออะไร
นำไปใช้ Taming Side Effects
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isTame(), getAttribute(), setBaseValue(), setHealth().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#canBeLeashed()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:615 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Be Leashed
ทำงานยังไง
เรียกต่อ: isAngry(). คืนค่า: !this.isAngry().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#canMate(Animal)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:581 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Mate
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isTame(), isInSittingPose(), isInLove(). มีจุด return อย่างน้อย 5 จุด.
Parameters
Animal animal
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#canUseSlot(EquipmentSlot)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:349 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Use Slot
ทำงานยังไง
คืนค่า: true.
Parameters
EquipmentSlot equipmentSlot
ตัวอย่างใช้งาน
Wolf instance = ...;
EquipmentSlot equipmentSlot = ...;
boolean result = instance.canUseSlot(equipmentSlot);
net.minecraft.world.entity.animal.Wolf#checkWolfSpawnRules(EntityType<Wolf>,LevelAccessor,EntitySpawnReason,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:625 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบ Wolf Spawn Rules
ทำงานยังไง
เรียกต่อ: getBlockState(), below(), is(), isBrightEnoughToSpawn(). คืนค่า: levelAccessor.getBlockState(blockPos.below()).is(BlockTags.WOLVES_SPAWNABLE_ON) && isBrightEnoughToSpawn(levelAccessor, blockPos).
Parameters
EntityType<Wolf> entityTypeLevelAccessor levelAccessorEntitySpawnReason entitySpawnReasonBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
EntityType<Wolf> entityType = ...;
LevelAccessor levelAccessor = ...;
EntitySpawnReason entitySpawnReason = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
boolean result = Wolf.checkWolfSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource);
net.minecraft.world.entity.animal.Wolf#createAttributes()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:159 - Modifiers:
public static - Return:
AttributeSupplier.Builder
คืออะไร
สร้าง Attributes
ทำงานยังไง
เรียกต่อ: createAnimalAttributes(), add(). คืนค่า: Animal.createAnimalAttributes().add(Attributes.MOVEMENT_SPEED, 0.3F).add(Attributes.MAX_HEALTH, 8.0).add(Attributes.ATTACK_DAMAGE, 4.0).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#defineSynchedData(SynchedEntityData.Builder)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:163 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ defineSynchedData ตาม implementation ของ Wolf
ทำงานยังไง
เรียกต่อ: registryAccess(), lookupOrThrow(), define(), get(), or(), orElseThrow(), getId().
Parameters
SynchedEntityData.Builder builder
ตัวอย่างใช้งาน
SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder);
}
net.minecraft.world.entity.animal.Wolf#die(DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:313 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ die ตาม implementation ของ Wolf
ทำงานยังไง
แก้ state: isWet, isShaking, shakeAnimO, shakeAnim.
Parameters
DamageSource damageSource
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:201 - Modifiers:
public - Return:
SpawnGroupData
คืออะไร
ดำเนินการ finalizeSpawn ตาม implementation ของ Wolf
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBiome(), blockPosition(), getSpawnVariant(), registryAccess(), WolfPackData(), setVariant(). สร้างออบเจ็กต์: Wolf.WolfPackData. คืนค่า: super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData).
Parameters
ServerLevelAccessor serverLevelAccessorDifficultyInstance difficultyInstanceEntitySpawnReason entitySpawnReasonSpawnGroupData spawnGroupData
ตัวอย่างใช้งาน
Wolf instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);
net.minecraft.world.entity.animal.Wolf#getAmbientSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:219 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Ambient Sound
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isAngry(), nextInt(), isTame(), getHealth(). มีจุด return อย่างน้อย 3 จุด.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#getBreedOffspring(ServerLevel,AgeableMob)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:555 - Modifiers:
public - Return:
Wolf
คืออะไร
อ่านค่า Breed Offspring
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: create(), nextBoolean(), setVariant(), getVariant(), isTame(), setOwnerUUID(), getOwnerUUID(), setTame(). คืนค่า: wolf.
Parameters
ServerLevel serverLevelAgeableMob ageableMob
ตัวอย่างใช้งาน
Wolf instance = ...;
ServerLevel serverLevel = ...;
AgeableMob ageableMob = ...;
Wolf result = instance.getBreedOffspring(serverLevel, ageableMob);
net.minecraft.world.entity.animal.Wolf#getCollarColor()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:547 - Modifiers:
public - Return:
DyeColor
คืออะไร
อ่านค่า Collar Color
ทำงานยังไง
เรียกต่อ: byId(), get(). คืนค่า: DyeColor.byId(this.entityData.get(DATA_COLLAR_COLOR)).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#getDeathSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:235 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Death Sound
ทำงานยังไง
คืนค่า: SoundEvents.WOLF_DEATH.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#getHeadRollAngle(float)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:330 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Head Roll Angle
ทำงานยังไง
เรียกต่อ: lerp(). คืนค่า: Mth.lerp(f, this.interestedAngleO, this.interestedAngle) * 0.15F * (float) Math.PI.
Parameters
float f
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#getHurtSound(DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:230 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Hurt Sound
ทำงานยังไง
เรียกต่อ: canArmorAbsorb(). คืนค่า: this.canArmorAbsorb(damageSource) ? SoundEvents.WOLF_ARMOR_DAMAGE : SoundEvents.WOLF_HURT.
Parameters
DamageSource damageSource
ตัวอย่างใช้งาน
DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
return super.getHurtSound(damageSource);
}
net.minecraft.world.entity.animal.Wolf#getLeashOffset()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:620 - Modifiers:
public - Return:
Vec3
คืออะไร
อ่านค่า Leash Offset
ทำงานยังไง
เรียกต่อ: getEyeHeight(), getBbWidth(). สร้างออบเจ็กต์: Vec3. คืนค่า: new Vec3(0.0, 0.6F * this.getEyeHeight(), this.getBbWidth() * 0.4F).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#getMaxHeadXRot()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:334 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Max Head XRot
ทำงานยังไง
เรียกต่อ: isInSittingPose(). คืนค่า: this.isInSittingPose() ? 20 : super.getMaxHeadXRot().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#getMaxSpawnClusterSize()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:516 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Max Spawn Cluster Size
ทำงานยังไง
คืนค่า: 8.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#getPersistentAngerTarget()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:536 - Modifiers:
public - Return:
UUID
คืออะไร
อ่านค่า Persistent Anger Target
ทำงานยังไง
คืนค่า: this.persistentAngerTarget.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#getRemainingPersistentAngerTime()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:521 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Remaining Persistent Anger Time
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: this.entityData.get(DATA_REMAINING_ANGER_TIME).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#getShakeAnim(float)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:326 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Shake Anim
ทำงานยังไง
เรียกต่อ: lerp(). คืนค่า: Mth.lerp(f, this.shakeAnimO, this.shakeAnim).
Parameters
float f
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#getSoundVolume()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:240 - Modifiers:
protected - Return:
float
คืออะไร
อ่านค่า Sound Volume
ทำงานยังไง
คืนค่า: 0.4F.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#getTailAngle()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:499 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Tail Angle
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isAngry(), isTame(), getMaxHealth(), getHealth(). มีจุด return อย่างน้อย 3 จุด.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#getTexture()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:142 - Modifiers:
public - Return:
ResourceLocation
คืออะไร
อ่านค่า Texture
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getVariant(), value(), isTame(), tameTexture(), isAngry(), angryTexture(), wildTexture(). มีจุด return อย่างน้อย 2 จุด.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#getVariant()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:151 - Modifiers:
public - Return:
Holder<WolfVariant>
คืออะไร
อ่านค่า Variant
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: this.entityData.get(DATA_VARIANT_ID).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#getWetShade(float)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:322 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Wet Shade
ทำงานยังไง
เรียกต่อ: min(), lerp(). คืนค่า: !this.isWet ? 1.0F : Math.min(0.75F + Mth.lerp(f, this.shakeAnimO, this.shakeAnim) / 2.0F * 0.25F, 1.0F).
Parameters
float f
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#handleEntityEvent(byte)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:486 - Modifiers:
public - Return:
void
คืออะไร
จัดการ Entity Event
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: isShaking, shakeAnim, shakeAnimO. เรียกต่อ: cancelShake().
Parameters
byte b
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#hurtArmor(DamageSource,float)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:394 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผลความเสียหาย Armor
ทำงานยังไง
เรียกต่อ: doHurtEquipment().
Parameters
DamageSource damageSourcefloat f
ตัวอย่างใช้งาน
DamageSource damageSource = ...;
@Override
protected void hurtArmor(DamageSource damageSource, float f) {
super.hurtArmor(damageSource, f);
}
net.minecraft.world.entity.animal.Wolf#hurtServer(ServerLevel,DamageSource,float)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:339 - Modifiers:
public - Return:
boolean
คืออะไร
ประมวลผลความเสียหาย Server
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isInvulnerableTo(), setOrderedToSit(). มีจุด return อย่างน้อย 2 จุด.
Parameters
ServerLevel serverLevelDamageSource damageSourcefloat f
ตัวอย่างใช้งาน
Wolf instance = ...;
ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
boolean result = instance.hurtServer(serverLevel, damageSource, 0.0F);
net.minecraft.world.entity.animal.Wolf#isFood(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:511 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Food
ทำงานยังไง
เรียกต่อ: is(). คืนค่า: itemStack.is(ItemTags.WOLF_FOOD).
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#isInterested()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:596 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Interested
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: this.entityData.get(DATA_INTERESTED_ID).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#mobInteract(Player,InteractionHand)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:399 - Modifiers:
public - Return:
InteractionResult
คืออะไร
ดำเนินการ mobInteract ตาม implementation ของ Wolf
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: jumping. เรียกต่อ: getItemInHand(), getItem(), isTame(), isFood(), getHealth(), getMaxHealth(), usePlayerItem(), get(). มีจุด return อย่างน้อย 9 จุด.
Parameters
Player playerInteractionHand interactionHand
ตัวอย่างใช้งาน
Wolf instance = ...;
Player player = ...;
InteractionHand interactionHand = ...;
InteractionResult result = instance.mobInteract(player, interactionHand);
net.minecraft.world.entity.animal.Wolf#playStepSound(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:174 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ playStepSound ตาม implementation ของ Wolf
ทำงานยังไง
เรียกต่อ: playSound().
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected void playStepSound(BlockPos blockPos, BlockState blockState) {
super.playStepSound(blockPos, blockState);
}
net.minecraft.world.entity.animal.Wolf#readAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:187 - Modifiers:
public - Return:
void
คืออะไร
อ่าน Additional Save Data
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: ofNullable(), tryParse(), getString(), map(), create(), flatMap(), registryAccess(), lookupOrThrow().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#registerGoals()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:118 - Modifiers:
protected - Return:
void
คืออะไร
ลงทะเบียน Goals
ทำงานยังไง
เรียกต่อ: addGoal(), TamableAnimalPanicGoal(), setAlertOthers(). สร้างออบเจ็กต์: FloatGoal, TamableAnimal.TamableAnimalPanicGoal, SitWhenOrderedToGoal, Wolf.WolfAvoidEntityGoal<>.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#setIsInterested(boolean)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:577 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Is Interested
ทำงานยังไง
เรียกต่อ: set().
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#setPersistentAngerTarget(UUID)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:542 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Persistent Anger Target
ทำงานยังไง
แก้ state: persistentAngerTarget.
Parameters
UUID uUID
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#setRemainingPersistentAngerTime(int)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:526 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Remaining Persistent Anger Time
ทำงานยังไง
เรียกต่อ: set().
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#setVariant(Holder<WolfVariant>)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:155 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Variant
ทำงานยังไง
เรียกต่อ: set().
Parameters
Holder<WolfVariant> holder
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#startPersistentAngerTimer()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:531 - Modifiers:
public - Return:
void
คืออะไร
เริ่ม Persistent Anger Timer
ทำงานยังไง
เรียกต่อ: setRemainingPersistentAngerTime(), sample().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#tick()
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:260 - Modifiers:
public - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: interestedAngleO, interestedAngle, isWet, shakeAnim, shakeAnimO, isShaking. เรียกต่อ: isAlive(), isInterested(), isInWaterRainOrBubble(), level(), broadcastEntityEvent(), cancelShake(), playSound(), getSoundVolume().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.Wolf#wantsToAttack(LivingEntity,LivingEntity)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:600 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ wantsToAttack ตาม implementation ของ Wolf
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isTame(), getOwner(), canHarmPlayer(), isTamed(). มีจุด return อย่างน้อย 3 จุด.
Parameters
LivingEntity livingEntityLivingEntity livingEntity2
ตัวอย่างใช้งาน
Wolf instance = ...;
LivingEntity livingEntity = ...;
LivingEntity livingEntity2 = ...;
boolean result = instance.wantsToAttack(livingEntity, livingEntity2);
net.minecraft.world.entity.animal.Wolf#Wolf(EntityType<? extends Wolf>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:111 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ Wolf ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: setTame(), setPathfindingMalus().
Parameters
EntityType<? extends Wolf> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends Wolf> entityType = ...;
Level level = ...;
Wolf instance = new Wolf(entityType, level);
Wolf$WolfPackData
- Full name:
net.minecraft.world.entity.animal.Wolf$WolfPackData - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/Wolf.java - Type:
class - Modifiers:
public static - Extends:
AgeableMob.AgeableMobGroupData
net.minecraft.world.entity.animal.Wolf$WolfPackData#WolfPackData(Holder<WolfVariant>)
- Origin:
common - Source:
net/minecraft/world/entity/animal/Wolf.java:664 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ Wolf.WolfPackData ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: type.
Parameters
Holder<WolfVariant> holder
ตัวอย่างใช้งาน
WolfVariant
- Full name:
net.minecraft.world.entity.animal.WolfVariant - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/WolfVariant.java - Type:
class - Modifiers:
public final
net.minecraft.world.entity.animal.WolfVariant#angryTexture()
- Origin:
common - Source:
net/minecraft/world/entity/animal/WolfVariant.java:70 - Modifiers:
public - Return:
ResourceLocation
คืออะไร
ดำเนินการ angryTexture ตาม implementation ของ WolfVariant
ทำงานยังไง
คืนค่า: this.angryTextureFull.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.WolfVariant#biomes()
- Origin:
common - Source:
net/minecraft/world/entity/animal/WolfVariant.java:74 - Modifiers:
public - Return:
HolderSet<Biome>
คืออะไร
ดำเนินการ biomes ตาม implementation ของ WolfVariant
ทำงานยังไง
คืนค่า: this.biomes.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.WolfVariant#equals(Object)
- Origin:
common - Source:
net/minecraft/world/entity/animal/WolfVariant.java:78 - Modifiers:
public - Return:
boolean
คืออะไร
เปรียบเทียบความเท่ากัน equals
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. คืนค่า: true.
Parameters
Object object
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.WolfVariant#hashCode()
- Origin:
common - Source:
net/minecraft/world/entity/animal/WolfVariant.java:92 - Modifiers:
public - Return:
int
คืออะไร
ดำเนินการ hashCode ตาม implementation ของ WolfVariant
ทำงานยังไง
คืนค่า: 31 * i + this.biomes.hashCode().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.WolfVariant#tameTexture()
- Origin:
common - Source:
net/minecraft/world/entity/animal/WolfVariant.java:66 - Modifiers:
public - Return:
ResourceLocation
คืออะไร
ดำเนินการ tameTexture ตาม implementation ของ WolfVariant
ทำงานยังไง
คืนค่า: this.tameTextureFull.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.WolfVariant#wildTexture()
- Origin:
common - Source:
net/minecraft/world/entity/animal/WolfVariant.java:62 - Modifiers:
public - Return:
ResourceLocation
คืออะไร
ดำเนินการ wildTexture ตาม implementation ของ WolfVariant
ทำงานยังไง
คืนค่า: this.wildTextureFull.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.WolfVariant#WolfVariant(ResourceLocation,ResourceLocation,ResourceLocation,HolderSet<Biome>)
- Origin:
common - Source:
net/minecraft/world/entity/animal/WolfVariant.java:48 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ WolfVariant ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: wildTexture, wildTextureFull, tameTexture, tameTextureFull, angryTexture, angryTextureFull. เรียกต่อ: fullTextureId().
Parameters
ResourceLocation resourceLocationResourceLocation resourceLocation2ResourceLocation resourceLocation3HolderSet<Biome> holderSet
ตัวอย่างใช้งาน
ResourceLocation resourceLocation = ...;
ResourceLocation resourceLocation2 = ...;
ResourceLocation resourceLocation3 = ...;
HolderSet<Biome> holderSet = ...;
WolfVariant instance = new WolfVariant(resourceLocation, resourceLocation2, resourceLocation3, holderSet);
WolfVariants
- Full name:
net.minecraft.world.entity.animal.WolfVariants - Package:
net.minecraft.world.entity.animal - Source:
common—net/minecraft/world/entity/animal/WolfVariants.java - Type:
class - Modifiers:
public
net.minecraft.world.entity.animal.WolfVariants#bootstrap(BootstrapContext<WolfVariant>)
- Origin:
common - Source:
net/minecraft/world/entity/animal/WolfVariants.java:57 - Modifiers:
public static - Return:
void
คืออะไร
ดำเนินการ bootstrap ตาม implementation ของ WolfVariants
ทำงานยังไง
เรียกต่อ: register().
Parameters
BootstrapContext<WolfVariant> bootstrapContext
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.WolfVariants#getSpawnVariant(RegistryAccess,Holder<Biome>)
- Origin:
common - Source:
net/minecraft/world/entity/animal/WolfVariants.java:47 - Modifiers:
public static - Return:
Holder<WolfVariant>
คืออะไร
อ่านค่า Spawn Variant
ทำงานยังไง
เรียกต่อ: lookupOrThrow(), listElements(), filter(), value(), biomes(), contains(), findFirst(), or().
Parameters
RegistryAccess registryAccessHolder<Biome> holder
ตัวอย่างใช้งาน
RegistryAccess registryAccess = ...;
Holder<Biome> holder = ...;
Holder<WolfVariant> result = WolfVariants.getSpawnVariant(registryAccess, holder);