Skip to content

Package net.minecraft.world.entity.boss.enderdragon

Part 1/1


DragonFlightHistory

  • Full name: net.minecraft.world.entity.boss.enderdragon.DragonFlightHistory
  • Package: net.minecraft.world.entity.boss.enderdragon
  • Source: commonnet/minecraft/world/entity/boss/enderdragon/DragonFlightHistory.java
  • Type: class
  • Modifiers: public

net.minecraft.world.entity.boss.enderdragon.DragonFlightHistory#copyFrom(DragonFlightHistory)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/DragonFlightHistory.java:16
  • Modifiers: public
  • Return: void

คืออะไร

คัดลอก From

ทำงานยังไง

แก้ state: head. เรียกต่อ: arraycopy().

Parameters

  • DragonFlightHistory dragonFlightHistory

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

DragonFlightHistory instance = ...;
DragonFlightHistory dragonFlightHistory = ...;
instance.copyFrom(dragonFlightHistory);

net.minecraft.world.entity.boss.enderdragon.DragonFlightHistory#DragonFlightHistory()

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/DragonFlightHistory.java:12
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

เรียกต่อ: fill(), Sample(). สร้างออบเจ็กต์: DragonFlightHistory.Sample.

Parameters

  • ไม่มี

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

DragonFlightHistory instance = new DragonFlightHistory();

net.minecraft.world.entity.boss.enderdragon.DragonFlightHistory#get(int)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/DragonFlightHistory.java:34
  • Modifiers: public
  • Return: DragonFlightHistory.Sample

คืออะไร

อ่านค่า get

ทำงานยังไง

คืนค่า: this.samples[this.head - i & 63].

Parameters

  • int i

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

DragonFlightHistory instance = ...;
DragonFlightHistory.Sample result = instance.get(0);

net.minecraft.world.entity.boss.enderdragon.DragonFlightHistory#get(int,float)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/DragonFlightHistory.java:38
  • Modifiers: public
  • Return: DragonFlightHistory.Sample

คืออะไร

อ่านค่า get

ทำงานยังไง

เรียกต่อ: Sample(), lerp(), rotLerp(). สร้างออบเจ็กต์: DragonFlightHistory.Sample. คืนค่า: new DragonFlightHistory.Sample(Mth.lerp(f, sample2.y, sample.y), Mth.rotLerp(f, sample2.yRot, sample.yRot)).

Parameters

  • int i
  • float f

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

DragonFlightHistory instance = ...;
DragonFlightHistory.Sample result = instance.get(0, 0.0F);

net.minecraft.world.entity.boss.enderdragon.DragonFlightHistory#record(double,float)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/DragonFlightHistory.java:21
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ record ตาม implementation ของ DragonFlightHistory

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: head. เรียกต่อ: Sample(), fill(). สร้างออบเจ็กต์: DragonFlightHistory.Sample.

Parameters

  • double d
  • float f

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

DragonFlightHistory instance = ...;
instance.record(0.0D, 0.0F);

EndCrystal

  • Full name: net.minecraft.world.entity.boss.enderdragon.EndCrystal
  • Package: net.minecraft.world.entity.boss.enderdragon
  • Source: commonnet/minecraft/world/entity/boss/enderdragon/EndCrystal.java
  • Type: class
  • Modifiers: public
  • Extends: Entity

net.minecraft.world.entity.boss.enderdragon.EndCrystal#addAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EndCrystal.java:64
  • Modifiers: protected
  • Return: void

คืออะไร

เพิ่ม Additional Save Data

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBeamTarget(), put(), writeBlockPos(), putBoolean(), showsBottom().

Parameters

  • CompoundTag compoundTag

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

CompoundTag compoundTag = ...;
@Override
protected void addAdditionalSaveData(CompoundTag compoundTag) {
    super.addAdditionalSaveData(compoundTag);
}

net.minecraft.world.entity.boss.enderdragon.EndCrystal#defineSynchedData(SynchedEntityData.Builder)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EndCrystal.java:45
  • Modifiers: protected
  • Return: void

คืออะไร

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

ทำงานยังไง

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

Parameters

  • SynchedEntityData.Builder builder

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

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

net.minecraft.world.entity.boss.enderdragon.EndCrystal#EndCrystal(EntityType<? extends EndCrystal>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EndCrystal.java:29
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: blocksBuilding, time. เรียกต่อ: nextInt().

Parameters

  • EntityType<? extends EndCrystal> entityType
  • Level level

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

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

net.minecraft.world.entity.boss.enderdragon.EndCrystal#EndCrystal(Level,double,double,double)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EndCrystal.java:35
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • Level level
  • double d
  • double e
  • double f

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

Level level = ...;
EndCrystal instance = new EndCrystal(level, 0.0D, 0.0D, 0.0D);

net.minecraft.world.entity.boss.enderdragon.EndCrystal#getBeamTarget()

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EndCrystal.java:131
  • Modifiers: public
  • Return: BlockPos

คืออะไร

อ่านค่า Beam Target

ทำงานยังไง

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

Parameters

  • ไม่มี

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

EndCrystal instance = ...;
BlockPos result = instance.getBeamTarget();

net.minecraft.world.entity.boss.enderdragon.EndCrystal#getMovementEmission()

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EndCrystal.java:40
  • Modifiers: protected
  • Return: Entity.MovementEmission

คืออะไร

อ่านค่า Movement Emission

ทำงานยังไง

คืนค่า: Entity.MovementEmission.NONE.

Parameters

  • ไม่มี

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

@Override
protected Entity.MovementEmission getMovementEmission() {
    return super.getMovementEmission();
}

net.minecraft.world.entity.boss.enderdragon.EndCrystal#getPickResult()

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EndCrystal.java:149
  • Modifiers: public
  • Return: ItemStack

คืออะไร

อ่านค่า Pick Result

ทำงานยังไง

สร้างออบเจ็กต์: ItemStack. คืนค่า: new ItemStack(Items.END_CRYSTAL).

Parameters

  • ไม่มี

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

EndCrystal instance = ...;
ItemStack result = instance.getPickResult();

net.minecraft.world.entity.boss.enderdragon.EndCrystal#hurtClient(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EndCrystal.java:86
  • Modifiers: public final
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: isInvulnerableToBase(), getEntity(). คืนค่า: this.isInvulnerableToBase(damageSource) ? false : !(damageSource.getEntity() instanceof EnderDragon).

Parameters

  • DamageSource damageSource

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

EndCrystal instance = ...;
DamageSource damageSource = ...;
boolean result = instance.hurtClient(damageSource);

net.minecraft.world.entity.boss.enderdragon.EndCrystal#hurtServer(ServerLevel,DamageSource,float)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EndCrystal.java:91
  • Modifiers: public final
  • Return: boolean

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isInvulnerableToBase(), getEntity(), isRemoved(), remove(), is(), damageSources(), explosion(), explode(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • ServerLevel serverLevel
  • DamageSource damageSource
  • float f

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

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

net.minecraft.world.entity.boss.enderdragon.EndCrystal#isPickable()

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EndCrystal.java:81
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

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

EndCrystal instance = ...;
boolean result = instance.isPickable();

net.minecraft.world.entity.boss.enderdragon.EndCrystal#kill(ServerLevel)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EndCrystal.java:114
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ kill ตาม implementation ของ EndCrystal

ทำงานยังไง

เรียกต่อ: onDestroyedBy(), damageSources(), generic().

Parameters

  • ServerLevel serverLevel

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

EndCrystal instance = ...;
ServerLevel serverLevel = ...;
instance.kill(serverLevel);

net.minecraft.world.entity.boss.enderdragon.EndCrystal#readAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EndCrystal.java:73
  • Modifiers: protected
  • Return: void

คืออะไร

อ่าน Additional Save Data

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: readBlockPos(), ifPresent(), contains(), setShowBottom(), getBoolean().

Parameters

  • CompoundTag compoundTag

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

CompoundTag compoundTag = ...;
@Override
protected void readAdditionalSaveData(CompoundTag compoundTag) {
    super.readAdditionalSaveData(compoundTag);
}

net.minecraft.world.entity.boss.enderdragon.EndCrystal#setBeamTarget(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EndCrystal.java:127
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Beam Target

ทำงานยังไง

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

Parameters

  • BlockPos blockPos

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

EndCrystal instance = ...;
BlockPos blockPos = ...;
instance.setBeamTarget(blockPos);

net.minecraft.world.entity.boss.enderdragon.EndCrystal#setShowBottom(boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EndCrystal.java:136
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Show Bottom

ทำงานยังไง

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

Parameters

  • boolean bl

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

EndCrystal instance = ...;
instance.setShowBottom(true);

net.minecraft.world.entity.boss.enderdragon.EndCrystal#shouldRenderAtSqrDistance(double)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EndCrystal.java:144
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Render At Sqr Distance

ทำงานยังไง

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

Parameters

  • double d

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

EndCrystal instance = ...;
boolean result = instance.shouldRenderAtSqrDistance(0.0D);

net.minecraft.world.entity.boss.enderdragon.EndCrystal#showsBottom()

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EndCrystal.java:140
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ showsBottom ตาม implementation ของ EndCrystal

ทำงานยังไง

เรียกต่อ: getEntityData(), get(). คืนค่า: this.getEntityData().get(DATA_SHOW_BOTTOM).

Parameters

  • ไม่มี

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

EndCrystal instance = ...;
boolean result = instance.showsBottom();

net.minecraft.world.entity.boss.enderdragon.EndCrystal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EndCrystal.java:51
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: time. เรียกต่อ: applyEffectsFromBlocks(), handlePortal(), level(), blockPosition(), getDragonFight(), getBlockState(), isAir(), setBlockAndUpdate().

Parameters

  • ไม่มี

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

EndCrystal instance = ...;
instance.tick();

EnderDragon

  • Full name: net.minecraft.world.entity.boss.enderdragon.EnderDragon
  • Package: net.minecraft.world.entity.boss.enderdragon
  • Source: commonnet/minecraft/world/entity/boss/enderdragon/EnderDragon.java
  • Type: class
  • Modifiers: public
  • Extends: Mob
  • Implements: Enemy

net.minecraft.world.entity.boss.enderdragon.EnderDragon#addAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:715
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Additional Save Data

ทำงานยังไง

เรียกต่อ: putInt(), getCurrentPhase(), getPhase(), getId().

Parameters

  • CompoundTag compoundTag

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

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

net.minecraft.world.entity.boss.enderdragon.EnderDragon#addEffect(MobEffectInstance,Entity)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:826
  • Modifiers: public
  • Return: boolean

คืออะไร

เพิ่ม Effect

ทำงานยังไง

คืนค่า: false.

Parameters

  • MobEffectInstance mobEffectInstance
  • Entity entity

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

EnderDragon instance = ...;
MobEffectInstance mobEffectInstance = ...;
Entity entity = ...;
boolean result = instance.addEffect(mobEffectInstance, entity);

net.minecraft.world.entity.boss.enderdragon.EnderDragon#aiStep()

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:145
  • Modifiers: public
  • Return: void

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: growlTime, dragonFight, oFlapTime, flapTime, yRotA, lerpSteps. เรียกต่อ: processFlappingMovement(), level(), setHealth(), getHealth(), isSilent(), getCurrentPhase(), isSitting(), playLocalSound(). สร้างออบเจ็กต์: Vec3.

Parameters

  • ไม่มี

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

EnderDragon instance = ...;
instance.aiStep();

net.minecraft.world.entity.boss.enderdragon.EnderDragon#canAttack(LivingEntity)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:851
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • LivingEntity livingEntity

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

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

net.minecraft.world.entity.boss.enderdragon.EnderDragon#canRide(Entity)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:831
  • Modifiers: protected
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: false.

Parameters

  • Entity entity

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

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

net.minecraft.world.entity.boss.enderdragon.EnderDragon#canUsePortal(boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:836
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: false.

Parameters

  • boolean bl

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

EnderDragon instance = ...;
boolean result = instance.canUsePortal(true);

net.minecraft.world.entity.boss.enderdragon.EnderDragon#checkDespawn()

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:734
  • Modifiers: public
  • Return: void

คืออะไร

ตรวจสอบ Despawn

ทำงานยังไง

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

Parameters

  • ไม่มี

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

EnderDragon instance = ...;
instance.checkDespawn();

net.minecraft.world.entity.boss.enderdragon.EnderDragon#createAttributes()

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:118
  • Modifiers: public static
  • Return: AttributeSupplier.Builder

คืออะไร

สร้าง Attributes

ทำงานยังไง

เรียกต่อ: createMobAttributes(), add(). คืนค่า: Mob.createMobAttributes().add(Attributes.MAX_HEALTH, 200.0).

Parameters

  • ไม่มี

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

AttributeSupplier.Builder result = EnderDragon.createAttributes();

net.minecraft.world.entity.boss.enderdragon.EnderDragon#defineSynchedData(SynchedEntityData.Builder)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:139
  • Modifiers: protected
  • Return: void

คืออะไร

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

ทำงานยังไง

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

Parameters

  • SynchedEntityData.Builder builder

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

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

net.minecraft.world.entity.boss.enderdragon.EnderDragon#EnderDragon(EntityType<? extends EnderDragon>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:90
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: head, neck, body, tail1, tail2, tail3. เรียกต่อ: setHealth(), getMaxHealth(). สร้างออบเจ็กต์: EnderDragonPart, EnderDragonPhaseManager.

Parameters

  • EntityType<? extends EnderDragon> entityType
  • Level level

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

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

net.minecraft.world.entity.boss.enderdragon.EnderDragon#findClosestNode()

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:542
  • Modifiers: public
  • Return: int

คืออะไร

ค้นหา Closest Node

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: floor(), cos(), sin(), max(), level(), getHeightmapPos(), getY(), getX(). สร้างออบเจ็กต์: BlockPos, Node. คืนค่า: this.findClosestNode(this.getX(), this.getY(), this.getZ()).

Parameters

  • ไม่มี

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

EnderDragon instance = ...;
int result = instance.findClosestNode();

net.minecraft.world.entity.boss.enderdragon.EnderDragon#findClosestNode(double,double,double)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:596
  • Modifiers: public
  • Return: int

คืออะไร

ค้นหา Closest Node

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: dragonFight. เรียกต่อ: floor(), getCrystalsAlive(), distanceToSqr(). สร้างออบเจ็กต์: Node. คืนค่า: i.

Parameters

  • double d
  • double e
  • double f

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

EnderDragon instance = ...;
int result = instance.findClosestNode(0.0D, 0.0D, 0.0D);

net.minecraft.world.entity.boss.enderdragon.EnderDragon#findPath(int,int,Node)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:618
  • Modifiers: public
  • Return: Path

คืออะไร

ค้นหา Path

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: dragonFight. เรียกต่อ: distanceTo(), clear(), insert(), getCrystalsAlive(), isEmpty(), pop(), equals(), reconstructPath(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • int i
  • int j
  • Node node

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

EnderDragon instance = ...;
Node node = ...;
Path result = instance.findPath(0, 0, node);

net.minecraft.world.entity.boss.enderdragon.EnderDragon#getAmbientSound()

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:752
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Ambient Sound

ทำงานยังไง

คืนค่า: SoundEvents.ENDER_DRAGON_AMBIENT.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.boss.enderdragon.EnderDragon#getDragonFight()

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:821
  • Modifiers: public
  • Return: EndDragonFight

คืออะไร

อ่านค่า Dragon Fight

ทำงานยังไง

คืนค่า: this.dragonFight.

Parameters

  • ไม่มี

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

EnderDragon instance = ...;
EndDragonFight result = instance.getDragonFight();

net.minecraft.world.entity.boss.enderdragon.EnderDragon#getFightOrigin()

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:114
  • Modifiers: public
  • Return: BlockPos

คืออะไร

อ่านค่า Fight Origin

ทำงานยังไง

คืนค่า: this.fightOrigin.

Parameters

  • ไม่มี

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

EnderDragon instance = ...;
BlockPos result = instance.getFightOrigin();

net.minecraft.world.entity.boss.enderdragon.EnderDragon#getHeadLookVector(float)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:767
  • Modifiers: public
  • Return: Vec3

คืออะไร

อ่านค่า Head Look Vector

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getCurrentPhase(), getPhase(), level(), getHeightmapPos(), getLocation(), max(), sqrt(), distToCenterSqr(). คืนค่า: vec3.

Parameters

  • float f

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

EnderDragon instance = ...;
Vec3 result = instance.getHeadLookVector(0.0F);

net.minecraft.world.entity.boss.enderdragon.EnderDragon#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:757
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

คืนค่า: SoundEvents.ENDER_DRAGON_HURT.

Parameters

  • DamageSource damageSource

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

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

net.minecraft.world.entity.boss.enderdragon.EnderDragon#getPhaseManager()

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:817
  • Modifiers: public
  • Return: EnderDragonPhaseManager

คืออะไร

อ่านค่า Phase Manager

ทำงานยังไง

คืนค่า: this.phaseManager.

Parameters

  • ไม่มี

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

EnderDragon instance = ...;
EnderDragonPhaseManager result = instance.getPhaseManager();

net.minecraft.world.entity.boss.enderdragon.EnderDragon#getSoundSource()

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:747
  • Modifiers: public
  • Return: SoundSource

คืออะไร

อ่านค่า Sound Source

ทำงานยังไง

คืนค่า: SoundSource.HOSTILE.

Parameters

  • ไม่มี

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

EnderDragon instance = ...;
SoundSource result = instance.getSoundSource();

net.minecraft.world.entity.boss.enderdragon.EnderDragon#getSoundVolume()

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:762
  • Modifiers: protected
  • Return: float

คืออะไร

อ่านค่า Sound Volume

ทำงานยังไง

คืนค่า: 5.0F.

Parameters

  • ไม่มี

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

@Override
protected float getSoundVolume() {
    return super.getSoundVolume();
}

net.minecraft.world.entity.boss.enderdragon.EnderDragon#getSubEntities()

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:738
  • Modifiers: public
  • Return: EnderDragonPart[]

คืออะไร

อ่านค่า Sub Entities

ทำงานยังไง

คืนค่า: this.subEntities.

Parameters

  • ไม่มี

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

EnderDragon instance = ...;
EnderDragonPart[] result = instance.getSubEntities();

net.minecraft.world.entity.boss.enderdragon.EnderDragon#hurt(ServerLevel,EnderDragonPart,DamageSource,float)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:438
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: sittingDamageReceived. เรียกต่อ: getCurrentPhase(), getPhase(), onHurt(), min(), getEntity(), is(), getHealth(), reallyHurt(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • ServerLevel serverLevel
  • EnderDragonPart enderDragonPart
  • DamageSource damageSource
  • float f

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

EnderDragon instance = ...;
ServerLevel serverLevel = ...;
EnderDragonPart enderDragonPart = ...;
DamageSource damageSource = ...;
boolean result = instance.hurt(serverLevel, enderDragonPart, damageSource, 0.0F);

net.minecraft.world.entity.boss.enderdragon.EnderDragon#hurtServer(ServerLevel,DamageSource,float)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:472
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: hurt(). คืนค่า: this.hurt(serverLevel, this.body, damageSource, f).

Parameters

  • ServerLevel serverLevel
  • DamageSource damageSource
  • float f

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

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

net.minecraft.world.entity.boss.enderdragon.EnderDragon#isFlapping()

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:122
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: cos(). คืนค่า: g <= -0.3F && f >= -0.3F.

Parameters

  • ไม่มี

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

EnderDragon instance = ...;
boolean result = instance.isFlapping();

net.minecraft.world.entity.boss.enderdragon.EnderDragon#isPickable()

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:742
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: false.

Parameters

  • ไม่มี

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

EnderDragon instance = ...;
boolean result = instance.isPickable();

net.minecraft.world.entity.boss.enderdragon.EnderDragon#kill(ServerLevel)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:481
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ kill ตาม implementation ของ EnderDragon

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: remove(), gameEvent(), updateDragon(), setDragonKilled().

Parameters

  • ServerLevel serverLevel

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

EnderDragon instance = ...;
ServerLevel serverLevel = ...;
instance.kill(serverLevel);

net.minecraft.world.entity.boss.enderdragon.EnderDragon#onCrystalDestroyed(ServerLevel,EndCrystal,BlockPos,DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:793
  • Modifiers: public
  • Return: void

คืออะไร

จัดการเหตุการณ์ Crystal Destroyed

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getEntity(), getNearestPlayer(), getX(), getY(), getZ(), hurt(), damageSources(), explosion().

Parameters

  • ServerLevel serverLevel
  • EndCrystal endCrystal
  • BlockPos blockPos
  • DamageSource damageSource

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

EnderDragon instance = ...;
ServerLevel serverLevel = ...;
EndCrystal endCrystal = ...;
BlockPos blockPos = ...;
DamageSource damageSource = ...;
instance.onCrystalDestroyed(serverLevel, endCrystal, blockPos, damageSource);

net.minecraft.world.entity.boss.enderdragon.EnderDragon#onFlap()

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:129
  • Modifiers: public
  • Return: void

คืออะไร

จัดการเหตุการณ์ Flap

ทำงานยังไง

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

Parameters

  • ไม่มี

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

EnderDragon instance = ...;
instance.onFlap();

net.minecraft.world.entity.boss.enderdragon.EnderDragon#onSyncedDataUpdated(EntityDataAccessor<?>)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:808
  • Modifiers: public
  • Return: void

คืออะไร

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

ทำงานยังไง

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

Parameters

  • EntityDataAccessor<?> entityDataAccessor

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

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

net.minecraft.world.entity.boss.enderdragon.EnderDragon#readAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:722
  • Modifiers: public
  • Return: void

คืออะไร

อ่าน Additional Save Data

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: dragonDeathTime. เรียกต่อ: contains(), setPhase(), getById(), getInt().

Parameters

  • CompoundTag compoundTag

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

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

net.minecraft.world.entity.boss.enderdragon.EnderDragon#reallyHurt(ServerLevel,DamageSource,float)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:477
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ reallyHurt ตาม implementation ของ EnderDragon

ทำงานยังไง

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

Parameters

  • ServerLevel serverLevel
  • DamageSource damageSource
  • float f

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

ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
@Override
protected void reallyHurt(ServerLevel serverLevel, DamageSource damageSource, float f) {
    super.reallyHurt(serverLevel, damageSource, f);
}

net.minecraft.world.entity.boss.enderdragon.EnderDragon#recreateFromPacket(ClientboundAddEntityPacket)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:841
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ recreateFromPacket ตาม implementation ของ EnderDragon

ทำงานยังไง

มีการวนลูป. เรียกต่อ: getSubEntities(), setId(), getId().

Parameters

  • ClientboundAddEntityPacket clientboundAddEntityPacket

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

EnderDragon instance = ...;
ClientboundAddEntityPacket clientboundAddEntityPacket = ...;
instance.recreateFromPacket(clientboundAddEntityPacket);

net.minecraft.world.entity.boss.enderdragon.EnderDragon#sanitizeScale(float)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:856
  • Modifiers: protected
  • Return: float

คืออะไร

ดำเนินการ sanitizeScale ตาม implementation ของ EnderDragon

ทำงานยังไง

คืนค่า: 1.0F.

Parameters

  • float f

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

@Override
protected float sanitizeScale(float f) {
    return super.sanitizeScale(f);
}

net.minecraft.world.entity.boss.enderdragon.EnderDragon#setDragonFight(EndDragonFight)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:106
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Dragon Fight

ทำงานยังไง

แก้ state: dragonFight.

Parameters

  • EndDragonFight endDragonFight

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

EnderDragon instance = ...;
EndDragonFight endDragonFight = ...;
instance.setDragonFight(endDragonFight);

net.minecraft.world.entity.boss.enderdragon.EnderDragon#setFightOrigin(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:110
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Fight Origin

ทำงานยังไง

แก้ state: fightOrigin.

Parameters

  • BlockPos blockPos

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

EnderDragon instance = ...;
BlockPos blockPos = ...;
instance.setFightOrigin(blockPos);

net.minecraft.world.entity.boss.enderdragon.EnderDragon#tickDeath()

  • Origin: common
  • Source: net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:491
  • Modifiers: protected
  • Return: void

คืออะไร

ประมวลผล tick Death

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: dragonDeathTime. เรียกต่อ: updateDragon(), nextFloat(), level(), addParticle(), getX(), getY(), getZ(), hasPreviouslyKilledDragon(). สร้างออบเจ็กต์: Vec3.

Parameters

  • ไม่มี

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

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