Package net.minecraft.world.entity.animal.allay
Part 1/1
Allay
- Full name:
net.minecraft.world.entity.animal.allay.Allay - Package:
net.minecraft.world.entity.animal.allay - Source:
common—net/minecraft/world/entity/animal/allay/Allay.java - Type:
class - Modifiers:
public - Extends:
PathfinderMob - Implements:
InventoryCarrier,VibrationSystem
net.minecraft.world.entity.animal.allay.Allay#addAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:471 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Additional Save Data
ทำงานยังไง
มีการวนลูป. เรียกต่อ: writeInventoryToTag(), registryAccess(), createSerializationContext(), encodeStart(), resultOrPartial(), error(), ifPresent(), put().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.allay.Allay#aiStep()
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:251 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ aiStep ตาม implementation ของ Allay
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: jukeboxPos. เรียกต่อ: level(), isAlive(), heal(), isDancing(), shouldStopDancing(), setDancing(), updateDuplicationCooldown().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.allay.Allay#Allay(EntityType<? extends Allay>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:122 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ Allay ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: moveControl, vibrationUser, vibrationData, dynamicVibrationListener, dynamicJukeboxListener. เรียกต่อ: setCanPickUpLoot(), canPickUpLoot(), VibrationUser(), Data(), Listener(), JukeboxListener(), getPositionSource(), value(). สร้างออบเจ็กต์: FlyingMoveControl, Allay.VibrationUser, VibrationSystem.Data, DynamicGameEventListener<>.
Parameters
EntityType<? extends Allay> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends Allay> entityType = ...;
Level level = ...;
Allay instance = new Allay(entityType, level);
net.minecraft.world.entity.animal.allay.Allay#brainProvider()
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:134 - Modifiers:
protected - Return:
Brain.Provider<Allay>
คืออะไร
ดำเนินการ brainProvider ตาม implementation ของ Allay
ทำงานยังไง
เรียกต่อ: provider(). คืนค่า: Brain.provider(MEMORY_TYPES, SENSOR_TYPES).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.allay.Allay#canDispenserEquipIntoSlot(EquipmentSlot)
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:309 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Dispenser Equip Into Slot
ทำงานยังไง
คืนค่า: false.
Parameters
EquipmentSlot equipmentSlot
ตัวอย่างใช้งาน
EquipmentSlot equipmentSlot = ...;
@Override
protected boolean canDispenserEquipIntoSlot(EquipmentSlot equipmentSlot) {
return super.canDispenserEquipIntoSlot(equipmentSlot);
}
net.minecraft.world.entity.animal.allay.Allay#canPickUpLoot()
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:300 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Pick Up Loot
ทำงานยังไง
เรียกต่อ: isOnPickupCooldown(), hasItemInHand(). คืนค่า: !this.isOnPickupCooldown() && this.hasItemInHand().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.allay.Allay#checkFallDamage(double,boolean,BlockState,BlockPos)
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:215 - 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.allay.Allay#considersEntityAsAlly(Entity)
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:197 - Modifiers:
protected - Return:
boolean
คืออะไร
ดำเนินการ considersEntityAsAlly ตาม implementation ของ Allay
ทำงานยังไง
เรียกต่อ: isLikedPlayer(). คืนค่า: this.isLikedPlayer(entity) || super.considersEntityAsAlly(entity).
Parameters
Entity entity
ตัวอย่างใช้งาน
Entity entity = ...;
@Override
protected boolean considersEntityAsAlly(Entity entity) {
return super.considersEntityAsAlly(entity);
}
net.minecraft.world.entity.animal.allay.Allay#createAttributes()
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:149 - Modifiers:
public static - Return:
AttributeSupplier.Builder
คืออะไร
สร้าง Attributes
ทำงานยังไง
เรียกต่อ: createMobAttributes(), add().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.allay.Allay#createNavigation(Level)
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:157 - Modifiers:
protected - Return:
PathNavigation
คืออะไร
สร้าง Navigation
ทำงานยังไง
เรียกต่อ: setCanOpenDoors(), setCanFloat(), setRequiredPathLength(). สร้างออบเจ็กต์: FlyingPathNavigation. คืนค่า: flyingPathNavigation.
Parameters
Level level
ตัวอย่างใช้งาน
Level level = ...;
@Override
protected PathNavigation createNavigation(Level level) {
return super.createNavigation(level);
}
net.minecraft.world.entity.animal.allay.Allay#customServerAiStep(ServerLevel)
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:239 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ customServerAiStep ตาม implementation ของ Allay
ทำงานยังไง
เรียกต่อ: get(), push(), getBrain(), tick(), pop(), updateActivity().
Parameters
ServerLevel serverLevel
ตัวอย่างใช้งาน
ServerLevel serverLevel = ...;
@Override
protected void customServerAiStep(ServerLevel serverLevel) {
super.customServerAiStep(serverLevel);
}
net.minecraft.world.entity.animal.allay.Allay#defineSynchedData(SynchedEntityData.Builder)
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:166 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ defineSynchedData ตาม implementation ของ Allay
ทำงานยังไง
เรียกต่อ: define().
Parameters
SynchedEntityData.Builder builder
ตัวอย่างใช้งาน
SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder);
}
net.minecraft.world.entity.animal.allay.Allay#dropEquipment(ServerLevel)
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:455 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ dropEquipment ตาม implementation ของ Allay
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: removeAllItems(), forEach(), spawnAtLocation(), getItemBySlot(), isEmpty(), has(), setItemSlot().
Parameters
ServerLevel serverLevel
ตัวอย่างใช้งาน
ServerLevel serverLevel = ...;
@Override
protected void dropEquipment(ServerLevel serverLevel) {
super.dropEquipment(serverLevel);
}
net.minecraft.world.entity.animal.allay.Allay#equipmentHasChanged(ItemStack,ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:450 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ equipmentHasChanged ตาม implementation ของ Allay
ทำงานยังไง
เรียกต่อ: allayConsidersItemEqual(). คืนค่า: !this.allayConsidersItemEqual(itemStack, itemStack2).
Parameters
ItemStack itemStackItemStack itemStack2
ตัวอย่างใช้งาน
Allay instance = ...;
ItemStack itemStack = ...;
ItemStack itemStack2 = ...;
boolean result = instance.equipmentHasChanged(itemStack, itemStack2);
net.minecraft.world.entity.animal.allay.Allay#getAmbientSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:219 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Ambient Sound
ทำงานยังไง
เรียกต่อ: hasItemInSlot(). คืนค่า: this.hasItemInSlot(EquipmentSlot.MAINHAND) ? SoundEvents.ALLAY_AMBIENT_WITH_ITEM : SoundEvents.ALLAY_AMBIENT_WITHOUT_ITEM.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.allay.Allay#getBrain()
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:144 - Modifiers:
public - Return:
Brain<Allay>
คืออะไร
อ่านค่า Brain
ทำงานยังไง
คืนค่า: (Brain<Allay>)super.getBrain().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.allay.Allay#getDeathSound()
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:229 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Death Sound
ทำงานยังไง
คืนค่า: SoundEvents.ALLAY_DEATH.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.allay.Allay#getHoldingItemAnimationProgress(float)
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:437 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Holding Item Animation Progress
ทำงานยังไง
เรียกต่อ: lerp(). คืนค่า: Mth.lerp(f, this.holdingItemAnimationTicks0, this.holdingItemAnimationTicks) / 5.0F.
Parameters
float f
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.allay.Allay#getHurtSound(DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:224 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Hurt Sound
ทำงานยังไง
คืนค่า: SoundEvents.ALLAY_HURT.
Parameters
DamageSource damageSource
ตัวอย่างใช้งาน
DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
return super.getHurtSound(damageSource);
}
net.minecraft.world.entity.animal.allay.Allay#getInventory()
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:368 - Modifiers:
public - Return:
SimpleContainer
คืออะไร
อ่านค่า Inventory
ทำงานยังไง
คืนค่า: this.inventory.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.allay.Allay#getLeashOffset()
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:539 - Modifiers:
public - Return:
Vec3
คืออะไร
อ่านค่า Leash Offset
ทำงานยังไง
เรียกต่อ: getEyeHeight(), getBbWidth(). สร้างออบเจ็กต์: Vec3. คืนค่า: new Vec3(0.0, this.getEyeHeight() * 0.6, this.getBbWidth() * 0.1).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.allay.Allay#getPickupReach()
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:373 - Modifiers:
protected - Return:
Vec3i
คืออะไร
อ่านค่า Pickup Reach
ทำงานยังไง
คืนค่า: ITEM_PICKUP_REACH.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.allay.Allay#getSoundVolume()
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:234 - Modifiers:
protected - Return:
float
คืออะไร
อ่านค่า Sound Volume
ทำงานยังไง
คืนค่า: 0.4F.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.allay.Allay#getSpinningProgress(float)
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:446 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Spinning Progress
ทำงานยังไง
เรียกต่อ: lerp(). คืนค่า: Mth.lerp(f, this.spinningAnimationTicks0, this.spinningAnimationTicks) / 15.0F.
Parameters
float f
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.allay.Allay#getVibrationData()
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:562 - Modifiers:
public - Return:
VibrationSystem.Data
คืออะไร
อ่านค่า Vibration Data
ทำงานยังไง
คืนค่า: this.vibrationData.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.allay.Allay#getVibrationUser()
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:567 - Modifiers:
public - Return:
VibrationSystem.User
คืออะไร
อ่านค่า Vibration User
ทำงานยังไง
คืนค่า: this.vibrationUser.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.allay.Allay#handleEntityEvent(byte)
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:544 - Modifiers:
public - Return:
void
คืออะไร
จัดการ Entity Event
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: spawnHeartParticle().
Parameters
byte b
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.allay.Allay#hasItemInHand()
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:305 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Item In Hand
ทำงานยังไง
เรียกต่อ: getItemInHand(), isEmpty(). คืนค่า: !this.getItemInHand(InteractionHand.MAIN_HAND).isEmpty().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.allay.Allay#hurtServer(ServerLevel,DamageSource,float)
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:192 - Modifiers:
public - Return:
boolean
คืออะไร
ประมวลผลความเสียหาย Server
ทำงานยังไง
เรียกต่อ: isLikedPlayer(), getEntity(). คืนค่า: this.isLikedPlayer(damageSource.getEntity()) ? false : super.hurtServer(serverLevel, damageSource, f).
Parameters
ServerLevel serverLevelDamageSource damageSourcefloat f
ตัวอย่างใช้งาน
Allay instance = ...;
ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
boolean result = instance.hurtServer(serverLevel, damageSource, 0.0F);
net.minecraft.world.entity.animal.allay.Allay#isDancing()
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:421 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Dancing
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: this.entityData.get(DATA_DANCING).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.allay.Allay#isFlapping()
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:408 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Flapping
ทำงานยังไง
เรียกต่อ: onGround(). คืนค่า: !this.onGround().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.allay.Allay#isSpinning()
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:441 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Spinning
ทำงานยังไง
คืนค่า: f < 15.0F.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.allay.Allay#makeBrain(Dynamic<?>)
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:139 - Modifiers:
protected - Return:
Brain<?>
คืออะไร
สร้าง Brain
ทำงานยังไง
เรียกต่อ: brainProvider(). คืนค่า: AllayAi.makeBrain(this.brainProvider().makeBrain(dynamic)).
Parameters
Dynamic<?> dynamic
ตัวอย่างใช้งาน
Dynamic<?> dynamic = ...;
@Override
protected Brain<?> makeBrain(Dynamic<?> dynamic) {
return super.makeBrain(dynamic);
}
net.minecraft.world.entity.animal.allay.Allay#mobInteract(Player,InteractionHand)
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:318 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ดำเนินการ mobInteract ตาม implementation ของ Allay
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getItemInHand(), isDancing(), is(), canDuplicate(), duplicateAllay(), level(), broadcastEntityEvent(), playSound(). มีจุด return อย่างน้อย 4 จุด.
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.allay.Allay#pickUpItem(ServerLevel,ItemEntity)
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:397 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ pickUpItem ตาม implementation ของ Allay
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
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.allay.Allay#playStepSound(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:211 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ playStepSound ตาม implementation ของ Allay
ทำงานยังไง
ทำงานตาม 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.allay.Allay#readAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:484 - Modifiers:
public - Return:
void
คืออะไร
อ่าน Additional Save Data
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: vibrationData, duplicationCooldown. เรียกต่อ: readInventoryFromTag(), registryAccess(), createSerializationContext(), contains(), parse(), getCompound(), resultOrPartial(), error().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.allay.Allay#removeWhenFarAway(double)
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:466 - Modifiers:
public - Return:
boolean
คืออะไร
ลบ When Far Away
ทำงานยังไง
คืนค่า: false.
Parameters
double d
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.allay.Allay#sendDebugPackets()
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:402 - Modifiers:
protected - Return:
void
คืออะไร
ส่ง Debug Packets
ทำงานยังไง
เรียกต่อ: sendEntityBrain().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.allay.Allay#setDancing(boolean)
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:425 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Dancing
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: level(), isEffectiveAi(), isPanicking(), set().
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.allay.Allay#setJukeboxPlaying(BlockPos,boolean)
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:356 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Jukebox Playing
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: jukeboxPos. เรียกต่อ: isDancing(), setDancing(), equals().
Parameters
BlockPos blockPosboolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.allay.Allay#shouldStayCloseToLeashHolder()
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:500 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าควร Stay Close To Leash Holder
ทำงานยังไง
คืนค่า: false.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
@Override
protected boolean shouldStayCloseToLeashHolder() {
return super.shouldStayCloseToLeashHolder();
}
net.minecraft.world.entity.animal.allay.Allay#tick()
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:266 - Modifiers:
public - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: holdingItemAnimationTicks0, holdingItemAnimationTicks, dancingAnimationTicks, spinningAnimationTicks0, spinningAnimationTicks. เรียกต่อ: level(), hasItemInHand(), clamp(), isDancing(), isSpinning(), isPanicking(), setDancing().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.allay.Allay#travel(Vec3)
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:173 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ travel ตาม implementation ของ Allay
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isControlledByLocalInstance(), isInWater(), moveRelative(), move(), getDeltaMovement(), setDeltaMovement(), scale(), isInLava().
Parameters
Vec3 vec3
ตัวอย่างใช้งาน
net.minecraft.world.entity.animal.allay.Allay#updateDynamicGameEventListener(BiConsumer<DynamicGameEventListener<?>, ServerLevel>)
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:413 - Modifiers:
public - Return:
void
คืออะไร
อัปเดต Dynamic Game Event Listener
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: level(), accept().
Parameters
BiConsumer<DynamicGameEventListener<?>, ServerLevel> biConsumer
ตัวอย่างใช้งาน
Allay instance = ...;
BiConsumer<DynamicGameEventListener<?>, ServerLevel> biConsumer = ...;
instance.updateDynamicGameEventListener(biConsumer);
net.minecraft.world.entity.animal.allay.Allay#wantsToPickUp(ServerLevel,ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/Allay.java:378 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ wantsToPickUp ตาม implementation ของ Allay
ทำงานยังไง
เรียกต่อ: getItemInHand(), isEmpty(), getGameRules(), getBoolean(), canAddItem(), allayConsidersItemEqual().
Parameters
ServerLevel serverLevelItemStack itemStack
ตัวอย่างใช้งาน
Allay instance = ...;
ServerLevel serverLevel = ...;
ItemStack itemStack = ...;
boolean result = instance.wantsToPickUp(serverLevel, itemStack);
AllayAi
- Full name:
net.minecraft.world.entity.animal.allay.AllayAi - Package:
net.minecraft.world.entity.animal.allay - Source:
common—net/minecraft/world/entity/animal/allay/AllayAi.java - Type:
class - Modifiers:
public
net.minecraft.world.entity.animal.allay.AllayAi#getLikedPlayer(LivingEntity)
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/AllayAi.java:142 - Modifiers:
public static - Return:
Optional<ServerPlayer>
คืออะไร
อ่านค่า Liked Player
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: level(), isClientSide(), getBrain(), getMemory(), isPresent(), getEntity(), get(), isSurvival(). มีจุด return อย่างน้อย 3 จุด.
Parameters
LivingEntity livingEntity
ตัวอย่างใช้งาน
LivingEntity livingEntity = ...;
Optional<ServerPlayer> result = AllayAi.getLikedPlayer(livingEntity);
net.minecraft.world.entity.animal.allay.AllayAi#hearNoteblock(LivingEntity,BlockPos)
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/AllayAi.java:98 - Modifiers:
public static - Return:
void
คืออะไร
ดำเนินการ hearNoteblock ตาม implementation ของ AllayAi
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBrain(), of(), level(), dimension(), getMemory(), isEmpty(), setMemory(), get().
Parameters
LivingEntity livingEntityBlockPos blockPos
ตัวอย่างใช้งาน
LivingEntity livingEntity = ...;
BlockPos blockPos = ...;
AllayAi.hearNoteblock(livingEntity, blockPos);
net.minecraft.world.entity.animal.allay.AllayAi#makeBrain(Brain<Allay>)
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/AllayAi.java:51 - Modifiers:
protected static - Return:
Brain<?>
คืออะไร
สร้าง Brain
ทำงานยังไง
เรียกต่อ: initCoreActivity(), initIdleActivity(), setCoreActivities(), of(), setDefaultActivity(), useDefaultActivity(). คืนค่า: brain.
Parameters
Brain<Allay> brain
ตัวอย่างใช้งาน
Brain<Allay> brain = ...;
@Override
protected Brain<?> makeBrain(Brain<Allay> brain) {
return super.makeBrain(brain);
}
net.minecraft.world.entity.animal.allay.AllayAi#updateActivity(Allay)
- Origin:
common - Source:
net/minecraft/world/entity/animal/allay/AllayAi.java:94 - Modifiers:
public static - Return:
void
คืออะไร
อัปเดต Activity
ทำงานยังไง
เรียกต่อ: getBrain(), setActiveActivityToFirstValid(), of().
Parameters
Allay allay