Package net.minecraft.world.entity.monster.hoglin
Part 1/1
Hoglin
- Full name:
net.minecraft.world.entity.monster.hoglin.Hoglin - Package:
net.minecraft.world.entity.monster.hoglin - Source:
common—net/minecraft/world/entity/monster/hoglin/Hoglin.java - Type:
class - Modifiers:
public - Extends:
Animal - Implements:
Enemy,HoglinBase
net.minecraft.world.entity.monster.hoglin.Hoglin#addAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:283 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Additional Save Data
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isImmuneToZombification(), putBoolean(), putInt().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.monster.hoglin.Hoglin#ageBoundaryReached()
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:186 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ ageBoundaryReached ตาม implementation ของ Hoglin
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: xpReward. เรียกต่อ: isBaby(), getAttribute(), setBaseValue().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.monster.hoglin.Hoglin#aiStep()
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:177 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ aiStep ตาม implementation ของ Hoglin
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: attackAnimationRemainingTicks.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.monster.hoglin.Hoglin#blockedByShield(LivingEntity)
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:127 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ blockedByShield ตาม implementation ของ Hoglin
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isAdult(), throwTarget().
Parameters
LivingEntity livingEntity
ตัวอย่างใช้งาน
LivingEntity livingEntity = ...;
@Override
protected void blockedByShield(LivingEntity livingEntity) {
super.blockedByShield(livingEntity);
}
net.minecraft.world.entity.monster.hoglin.Hoglin#brainProvider()
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:144 - Modifiers:
protected - Return:
Brain.Provider<Hoglin>
คืออะไร
ดำเนินการ brainProvider ตาม implementation ของ Hoglin
ทำงานยังไง
เรียกต่อ: provider(). คืนค่า: Brain.provider(MEMORY_TYPES, SENSOR_TYPES).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.monster.hoglin.Hoglin#canBeHunted()
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:320 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Be Hunted
ทำงานยังไง
เรียกต่อ: isAdult(). คืนค่า: this.isAdult() && !this.cannotBeHunted.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.monster.hoglin.Hoglin#canBeLeashed()
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:100 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Be Leashed
ทำงานยังไง
คืนค่า: true.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.monster.hoglin.Hoglin#canFallInLove()
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:335 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Fall In Love
ทำงานยังไง
เรียกต่อ: isPacified(). คืนค่า: !HoglinAi.isPacified(this) && super.canFallInLove().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.monster.hoglin.Hoglin#checkHoglinSpawnRules(EntityType<Hoglin>,LevelAccessor,EntitySpawnReason,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:197 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบ Hoglin Spawn Rules
ทำงานยังไง
เรียกต่อ: getBlockState(), below(), is(). คืนค่า: !levelAccessor.getBlockState(blockPos.below()).is(Blocks.NETHER_WART_BLOCK).
Parameters
EntityType<Hoglin> entityTypeLevelAccessor levelAccessorEntitySpawnReason entitySpawnReasonBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
EntityType<Hoglin> entityType = ...;
LevelAccessor levelAccessor = ...;
EntitySpawnReason entitySpawnReason = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
boolean result = Hoglin.checkHoglinSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource);
net.minecraft.world.entity.monster.hoglin.Hoglin#createAttributes()
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:105 - Modifiers:
public static - Return:
AttributeSupplier.Builder
คืออะไร
สร้าง Attributes
ทำงานยังไง
เรียกต่อ: createMonsterAttributes(), add().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.monster.hoglin.Hoglin#customServerAiStep(ServerLevel)
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:159 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ customServerAiStep ตาม implementation ของ Hoglin
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: timeInOverworld. เรียกต่อ: get(), push(), getBrain(), tick(), pop(), updateActivity(), isConverting(), makeSound().
Parameters
ServerLevel serverLevel
ตัวอย่างใช้งาน
ServerLevel serverLevel = ...;
@Override
protected void customServerAiStep(ServerLevel serverLevel) {
super.customServerAiStep(serverLevel);
}
net.minecraft.world.entity.monster.hoglin.Hoglin#defineSynchedData(SynchedEntityData.Builder)
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:277 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ defineSynchedData ตาม implementation ของ Hoglin
ทำงานยังไง
เรียกต่อ: define().
Parameters
SynchedEntityData.Builder builder
ตัวอย่างใช้งาน
SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder);
}
net.minecraft.world.entity.monster.hoglin.Hoglin#doHurtTarget(ServerLevel,Entity)
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:114 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ doHurtTarget ตาม implementation ของ Hoglin
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: attackAnimationRemainingTicks. เรียกต่อ: level(), broadcastEntityEvent(), makeSound(), onHitTarget(), hurtAndThrowTarget(). มีจุด return อย่างน้อย 2 จุด.
Parameters
ServerLevel serverLevelEntity entity
ตัวอย่างใช้งาน
Hoglin instance = ...;
ServerLevel serverLevel = ...;
Entity entity = ...;
boolean result = instance.doHurtTarget(serverLevel, entity);
net.minecraft.world.entity.monster.hoglin.Hoglin#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:203 - Modifiers:
public - Return:
SpawnGroupData
คืออะไร
ดำเนินการ finalizeSpawn ตาม implementation ของ Hoglin
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getRandom(), nextFloat(), setBaby(). คืนค่า: super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData).
Parameters
ServerLevelAccessor serverLevelAccessorDifficultyInstance difficultyInstanceEntitySpawnReason entitySpawnReasonSpawnGroupData spawnGroupData
ตัวอย่างใช้งาน
Hoglin instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);
net.minecraft.world.entity.monster.hoglin.Hoglin#getAmbientSound()
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:345 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Ambient Sound
ทำงานยังไง
เรียกต่อ: level(), getSoundForCurrentActivity(), orElse(). คืนค่า: this.level().isClientSide ? null : HoglinAi.getSoundForCurrentActivity(this).orElse(null).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.monster.hoglin.Hoglin#getAttackAnimationRemainingTicks()
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:249 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Attack Animation Remaining Ticks
ทำงานยังไง
คืนค่า: this.attackAnimationRemainingTicks.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.monster.hoglin.Hoglin#getBaseExperienceReward(ServerLevel)
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:259 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Base Experience Reward
ทำงานยังไง
คืนค่า: this.xpReward.
Parameters
ServerLevel serverLevel
ตัวอย่างใช้งาน
ServerLevel serverLevel = ...;
@Override
protected int getBaseExperienceReward(ServerLevel serverLevel) {
return super.getBaseExperienceReward(serverLevel);
}
net.minecraft.world.entity.monster.hoglin.Hoglin#getBrain()
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:154 - Modifiers:
public - Return:
Brain<Hoglin>
คืออะไร
อ่านค่า Brain
ทำงานยังไง
คืนค่า: (Brain<Hoglin>)super.getBrain().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.monster.hoglin.Hoglin#getBreedOffspring(ServerLevel,AgeableMob)
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:324 - Modifiers:
public - Return:
AgeableMob
คืออะไร
อ่านค่า Breed Offspring
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: create(), setPersistenceRequired(). คืนค่า: hoglin.
Parameters
ServerLevel serverLevelAgeableMob ageableMob
ตัวอย่างใช้งาน
Hoglin instance = ...;
ServerLevel serverLevel = ...;
AgeableMob ageableMob = ...;
AgeableMob result = instance.getBreedOffspring(serverLevel, ageableMob);
net.minecraft.world.entity.monster.hoglin.Hoglin#getDeathSound()
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:355 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Death Sound
ทำงานยังไง
คืนค่า: SoundEvents.HOGLIN_DEATH.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.monster.hoglin.Hoglin#getHurtSound(DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:350 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Hurt Sound
ทำงานยังไง
คืนค่า: SoundEvents.HOGLIN_HURT.
Parameters
DamageSource damageSource
ตัวอย่างใช้งาน
DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
return super.getHurtSound(damageSource);
}
net.minecraft.world.entity.monster.hoglin.Hoglin#getSoundSource()
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:340 - Modifiers:
public - Return:
SoundSource
คืออะไร
อ่านค่า Sound Source
ทำงานยังไง
คืนค่า: SoundSource.HOSTILE.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.monster.hoglin.Hoglin#getSwimSound()
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:360 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Swim Sound
ทำงานยังไง
คืนค่า: SoundEvents.HOSTILE_SWIM.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.monster.hoglin.Hoglin#getSwimSplashSound()
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:365 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Swim Splash Sound
ทำงานยังไง
คืนค่า: SoundEvents.HOSTILE_SPLASH.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.monster.hoglin.Hoglin#getTarget()
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:381 - Modifiers:
public - Return:
LivingEntity
คืออะไร
อ่านค่า Target
ทำงานยังไง
เรียกต่อ: getTargetFromBrain(). คืนค่า: this.getTargetFromBrain().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.monster.hoglin.Hoglin#getWalkTargetValue(BlockPos,LevelReader)
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:220 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Walk Target Value
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isPosNearNearestRepellent(), getBlockState(), below(), is(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockPos blockPosLevelReader levelReader
ตัวอย่างใช้งาน
Hoglin instance = ...;
BlockPos blockPos = ...;
LevelReader levelReader = ...;
float result = instance.getWalkTargetValue(blockPos, levelReader);
net.minecraft.world.entity.monster.hoglin.Hoglin#handleEntityEvent(byte)
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:239 - Modifiers:
public - Return:
void
คืออะไร
จัดการ Entity Event
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: attackAnimationRemainingTicks. เรียกต่อ: makeSound().
Parameters
byte b
ตัวอย่างใช้งาน
net.minecraft.world.entity.monster.hoglin.Hoglin#Hoglin(EntityType<? extends Hoglin>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:90 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ Hoglin ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: xpReward.
Parameters
EntityType<? extends Hoglin> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends Hoglin> entityType = ...;
Level level = ...;
Hoglin instance = new Hoglin(entityType, level);
net.minecraft.world.entity.monster.hoglin.Hoglin#hurtServer(ServerLevel,DamageSource,float)
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:134 - Modifiers:
public - Return:
boolean
คืออะไร
ประมวลผลความเสียหาย Server
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getEntity(), wasHurtBy(). คืนค่า: bl.
Parameters
ServerLevel serverLevelDamageSource damageSourcefloat f
ตัวอย่างใช้งาน
Hoglin instance = ...;
ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
boolean result = instance.hurtServer(serverLevel, damageSource, 0.0F);
net.minecraft.world.entity.monster.hoglin.Hoglin#isAdult()
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:273 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Adult
ทำงานยังไง
เรียกต่อ: isBaby(). คืนค่า: !this.isBaby().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.monster.hoglin.Hoglin#isConverting()
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:312 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Converting
ทำงานยังไง
เรียกต่อ: level(), dimensionType(), piglinSafe(), isImmuneToZombification(), isNoAi(). คืนค่า: !this.level().dimensionType().piglinSafe() && !this.isImmuneToZombification() && !this.isNoAi().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.monster.hoglin.Hoglin#isFood(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:268 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Food
ทำงานยังไง
เรียกต่อ: is(). คืนค่า: itemStack.is(ItemTags.HOGLIN_FOOD).
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.monster.hoglin.Hoglin#makeBrain(Dynamic<?>)
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:149 - Modifiers:
protected - Return:
Brain<?>
คืออะไร
สร้าง Brain
ทำงานยังไง
เรียกต่อ: brainProvider(). คืนค่า: HoglinAi.makeBrain(this.brainProvider().makeBrain(dynamic)).
Parameters
Dynamic<?> dynamic
ตัวอย่างใช้งาน
Dynamic<?> dynamic = ...;
@Override
protected Brain<?> makeBrain(Dynamic<?> dynamic) {
return super.makeBrain(dynamic);
}
net.minecraft.world.entity.monster.hoglin.Hoglin#mobInteract(Player,InteractionHand)
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:229 - Modifiers:
public - Return:
InteractionResult
คืออะไร
ดำเนินการ mobInteract ตาม implementation ของ Hoglin
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: consumesAction(), setPersistenceRequired(). คืนค่า: interactionResult.
Parameters
Player playerInteractionHand interactionHand
ตัวอย่างใช้งาน
Hoglin instance = ...;
Player player = ...;
InteractionHand interactionHand = ...;
InteractionResult result = instance.mobInteract(player, interactionHand);
net.minecraft.world.entity.monster.hoglin.Hoglin#playStepSound(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:370 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ playStepSound ตาม implementation ของ Hoglin
ทำงานยังไง
เรียกต่อ: 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.monster.hoglin.Hoglin#readAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:296 - Modifiers:
public - Return:
void
คืออะไร
อ่าน Additional Save Data
ทำงานยังไง
แก้ state: timeInOverworld. เรียกต่อ: setImmuneToZombification(), getBoolean(), getInt(), setCannotBeHunted().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.monster.hoglin.Hoglin#removeWhenFarAway(double)
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:215 - Modifiers:
public - Return:
boolean
คืออะไร
ลบ When Far Away
ทำงานยังไง
เรียกต่อ: isPersistenceRequired(). คืนค่า: !this.isPersistenceRequired().
Parameters
double d
ตัวอย่างใช้งาน
net.minecraft.world.entity.monster.hoglin.Hoglin#sendDebugPackets()
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:375 - Modifiers:
protected - Return:
void
คืออะไร
ส่ง Debug Packets
ทำงานยังไง
เรียกต่อ: sendEntityBrain().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.monster.hoglin.Hoglin#setImmuneToZombification(boolean)
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:304 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Immune To Zombification
ทำงานยังไง
เรียกต่อ: getEntityData(), set().
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.monster.hoglin.Hoglin#setTimeInOverworld(int)
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:95 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Time In Overworld
ทำงานยังไง
แก้ state: timeInOverworld.
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.monster.hoglin.Hoglin#shouldDropExperience()
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/Hoglin.java:254 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าควร Drop Experience
ทำงานยังไง
คืนค่า: true.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
HoglinAi
- Full name:
net.minecraft.world.entity.monster.hoglin.HoglinAi - Package:
net.minecraft.world.entity.monster.hoglin - Source:
common—net/minecraft/world/entity/monster/hoglin/HoglinAi.java - Type:
class - Modifiers:
public
net.minecraft.world.entity.monster.hoglin.HoglinAi#getSoundForCurrentActivity(Hoglin)
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/HoglinAi.java:234 - Modifiers:
public static - Return:
Optional<SoundEvent>
คืออะไร
อ่านค่า Sound For Current Activity
ทำงานยังไง
เรียกต่อ: getBrain(), getActiveNonCoreActivity(), map(), getSoundForActivity(). คืนค่า: hoglin.getBrain().getActiveNonCoreActivity().map(activity -> getSoundForActivity(hoglin, activity)).
Parameters
Hoglin hoglin
ตัวอย่างใช้งาน
net.minecraft.world.entity.monster.hoglin.HoglinAi#isPacified(Hoglin)
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/HoglinAi.java:260 - Modifiers:
protected static - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pacified
ทำงานยังไง
เรียกต่อ: getBrain(), hasMemoryValue(). คืนค่า: hoglin.getBrain().hasMemoryValue(MemoryModuleType.PACIFIED).
Parameters
Hoglin hoglin
ตัวอย่างใช้งาน
Hoglin hoglin = ...;
@Override
protected boolean isPacified(Hoglin hoglin) {
return super.isPacified(hoglin);
}
net.minecraft.world.entity.monster.hoglin.HoglinAi#makeBrain(Brain<Hoglin>)
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/HoglinAi.java:58 - Modifiers:
protected static - Return:
Brain<?>
คืออะไร
สร้าง Brain
ทำงานยังไง
เรียกต่อ: initCoreActivity(), initIdleActivity(), initFightActivity(), initRetreatActivity(), setCoreActivities(), of(), setDefaultActivity(), useDefaultActivity(). คืนค่า: brain.
Parameters
Brain<Hoglin> brain
ตัวอย่างใช้งาน
Brain<Hoglin> brain = ...;
@Override
protected Brain<?> makeBrain(Brain<Hoglin> brain) {
return super.makeBrain(brain);
}
net.minecraft.world.entity.monster.hoglin.HoglinAi#onHitTarget(Hoglin,LivingEntity)
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/HoglinAi.java:139 - Modifiers:
protected static - Return:
void
คืออะไร
จัดการเหตุการณ์ Hit Target
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isBaby(), getType(), piglinsOutnumberHoglins(), setAvoidTarget(), broadcastRetreat(), broadcastAttackTarget().
Parameters
Hoglin hoglinLivingEntity livingEntity
ตัวอย่างใช้งาน
Hoglin hoglin = ...;
LivingEntity livingEntity = ...;
@Override
protected void onHitTarget(Hoglin hoglin, LivingEntity livingEntity) {
super.onHitTarget(hoglin, livingEntity);
}
net.minecraft.world.entity.monster.hoglin.HoglinAi#updateActivity(Hoglin)
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/HoglinAi.java:127 - Modifiers:
protected static - Return:
void
คืออะไร
อัปเดต Activity
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBrain(), getActiveNonCoreActivity(), orElse(), setActiveActivityToFirstValid(), of(), getSoundForCurrentActivity(), ifPresent(), setAggressive().
Parameters
Hoglin hoglin
ตัวอย่างใช้งาน
Hoglin hoglin = ...;
@Override
protected void updateActivity(Hoglin hoglin) {
super.updateActivity(hoglin);
}
net.minecraft.world.entity.monster.hoglin.HoglinAi#wasHurtBy(ServerLevel,Hoglin,LivingEntity)
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/HoglinAi.java:191 - Modifiers:
protected static - Return:
void
คืออะไร
ดำเนินการ wasHurtBy ตาม implementation ของ HoglinAi
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBrain(), eraseMemory(), isBaby(), retreatFromNearestTarget(), maybeRetaliate().
Parameters
ServerLevel serverLevelHoglin hoglinLivingEntity livingEntity
ตัวอย่างใช้งาน
ServerLevel serverLevel = ...;
Hoglin hoglin = ...;
LivingEntity livingEntity = ...;
@Override
protected void wasHurtBy(ServerLevel serverLevel, Hoglin hoglin, LivingEntity livingEntity) {
super.wasHurtBy(serverLevel, hoglin, livingEntity);
}
HoglinBase
- Full name:
net.minecraft.world.entity.monster.hoglin.HoglinBase - Package:
net.minecraft.world.entity.monster.hoglin - Source:
common—net/minecraft/world/entity/monster/hoglin/HoglinBase.java - Type:
interface - Modifiers:
public
net.minecraft.world.entity.monster.hoglin.HoglinBase#getAttackAnimationRemainingTicks()
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/HoglinBase.java:14 - Modifiers: ``
- Return:
int
คืออะไร
อ่านค่า Attack Animation Remaining Ticks
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.monster.hoglin.HoglinBase#hurtAndThrowTarget(ServerLevel,LivingEntity,LivingEntity)
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/HoglinBase.java:16 - Modifiers:
static - Return:
boolean
คืออะไร
ประมวลผลความเสียหาย And Throw Target
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getAttributeValue(), isBaby(), nextInt(), damageSources(), mobAttack(), hurtServer(), doPostAttackEffects(), throwTarget(). คืนค่า: bl.
Parameters
ServerLevel serverLevelLivingEntity livingEntityLivingEntity livingEntity2
ตัวอย่างใช้งาน
ServerLevel serverLevel = ...;
LivingEntity livingEntity = ...;
LivingEntity livingEntity2 = ...;
boolean result = HoglinBase.hurtAndThrowTarget(serverLevel, livingEntity, livingEntity2);
net.minecraft.world.entity.monster.hoglin.HoglinBase#throwTarget(LivingEntity,LivingEntity)
- Origin:
common - Source:
net/minecraft/world/entity/monster/hoglin/HoglinBase.java:37 - Modifiers:
static - Return:
void
คืออะไร
ดำเนินการ throwTarget ตาม implementation ของ HoglinBase
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getAttributeValue(), getX(), getZ(), level(), nextInt(), nextFloat(), normalize(), scale(). สร้างออบเจ็กต์: Vec3.
Parameters
LivingEntity livingEntityLivingEntity livingEntity2
ตัวอย่างใช้งาน
LivingEntity livingEntity = ...;
LivingEntity livingEntity2 = ...;
HoglinBase.throwTarget(livingEntity, livingEntity2);