Skip to content

Package net.minecraft.world.entity.raid

Part 1/1


Raid

  • Full name: net.minecraft.world.entity.raid.Raid
  • Package: net.minecraft.world.entity.raid
  • Source: commonnet/minecraft/world/entity/raid/Raid.java
  • Type: class
  • Modifiers: public

net.minecraft.world.entity.raid.Raid#absorbRaidOmen(ServerPlayer)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:227
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ absorbRaidOmen ตาม implementation ของ Raid

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: raidOmenLevel. เรียกต่อ: getEffect(), getAmplifier(), clamp(), getMaxRaidOmenLevel(), hasFirstWaveSpawned(), awardStat(), trigger(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ServerPlayer serverPlayer

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

Raid instance = ...;
ServerPlayer serverPlayer = ...;
boolean result = instance.absorbRaidOmen(serverPlayer);

net.minecraft.world.entity.raid.Raid#addHeroOfTheVillage(Entity)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:789
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Hero Of The Village

ทำงานยังไง

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

Parameters

  • Entity entity

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

Raid instance = ...;
Entity entity = ...;
instance.addHeroOfTheVillage(entity);

net.minecraft.world.entity.raid.Raid#addWaveMob(int,Raider,boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:648
  • Modifiers: public
  • Return: boolean

คืออะไร

เพิ่ม Wave Mob

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: totalHealth. เรียกต่อ: computeIfAbsent(), newHashSet(), get(), getUUID(), equals(), remove(), add(), getHealth(). คืนค่า: true.

Parameters

  • int i
  • Raider raider
  • boolean bl

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

Raid instance = ...;
Raider raider = ...;
boolean result = instance.addWaveMob(0, raider, true);

net.minecraft.world.entity.raid.Raid#getAllRaiders()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:169
  • Modifiers: public
  • Return: Set<Raider>

คืออะไร

อ่านค่า All Raiders

ทำงานยังไง

มีการวนลูป. เรียกต่อ: newHashSet(), values(), addAll(). คืนค่า: set.

Parameters

  • ไม่มี

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

Raid instance = ...;
Set<Raider> result = instance.getAllRaiders();

net.minecraft.world.entity.raid.Raid#getCenter()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:685
  • Modifiers: public
  • Return: BlockPos

คืออะไร

อ่านค่า Center

ทำงานยังไง

คืนค่า: this.center.

Parameters

  • ไม่มี

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

Raid instance = ...;
BlockPos result = instance.getCenter();

net.minecraft.world.entity.raid.Raid#getEnchantOdds()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:776
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Enchant Odds

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getRaidOmenLevel(). มีจุด return อย่างน้อย 4 จุด.

Parameters

  • ไม่มี

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

Raid instance = ...;
float result = instance.getEnchantOdds();

net.minecraft.world.entity.raid.Raid#getGroupsSpawned()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:187
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Groups Spawned

ทำงานยังไง

คืนค่า: this.groupsSpawned.

Parameters

  • ไม่มี

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

Raid instance = ...;
int result = instance.getGroupsSpawned();

net.minecraft.world.entity.raid.Raid#getHealthOfLivingRaiders()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:549
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Health Of Living Raiders

ทำงานยังไง

มีการวนลูป. เรียกต่อ: values(), getHealth(). คืนค่า: f.

Parameters

  • ไม่มี

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

Raid instance = ...;
float result = instance.getHealthOfLivingRaiders();

net.minecraft.world.entity.raid.Raid#getId()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:693
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Id

ทำงานยังไง

คืนค่า: this.id.

Parameters

  • ไม่มี

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

Raid instance = ...;
int result = instance.getId();

net.minecraft.world.entity.raid.Raid#getLeader(int)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:608
  • Modifiers: public
  • Return: Raider

คืออะไร

อ่านค่า Leader

ทำงานยังไง

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

Parameters

  • int i

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

Raid instance = ...;
Raider result = instance.getLeader(0);

net.minecraft.world.entity.raid.Raid#getLevel()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:179
  • Modifiers: public
  • Return: Level

คืออะไร

อ่านค่า Level

ทำงานยังไง

คืนค่า: this.level.

Parameters

  • ไม่มี

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

Raid instance = ...;
Level result = instance.getLevel();

net.minecraft.world.entity.raid.Raid#getMaxRaidOmenLevel()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:215
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Max Raid Omen Level

ทำงานยังไง

คืนค่า: 5.

Parameters

  • ไม่มี

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

Raid instance = ...;
int result = instance.getMaxRaidOmenLevel();

net.minecraft.world.entity.raid.Raid#getNumGroups(Difficulty)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:763
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Num Groups

ทำงานยังไง

แยกกรณีด้วย switch. มีจุด return อย่างน้อย 4 จุด.

Parameters

  • Difficulty difficulty

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

Raid instance = ...;
Difficulty difficulty = ...;
int result = instance.getNumGroups(difficulty);

net.minecraft.world.entity.raid.Raid#getOminousBannerInstance(HolderGetter<BannerPattern>)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:589
  • Modifiers: public static
  • Return: ItemStack

คืออะไร

อ่านค่า Ominous Banner Instance

ทำงานยังไง

เรียกต่อ: Builder(), addIfRegistered(), build(), set(). สร้างออบเจ็กต์: ItemStack, BannerPatternLayers.Builder. คืนค่า: itemStack.

Parameters

  • HolderGetter<BannerPattern> holderGetter

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

HolderGetter<BannerPattern> holderGetter = ...;
ItemStack result = Raid.getOminousBannerInstance(holderGetter);

net.minecraft.world.entity.raid.Raid#getRaidOmenLevel()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:219
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Raid Omen Level

ทำงานยังไง

คืนค่า: this.raidOmenLevel.

Parameters

  • ไม่มี

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

Raid instance = ...;
int result = instance.getRaidOmenLevel();

net.minecraft.world.entity.raid.Raid#getTotalHealth()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:165
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Total Health

ทำงานยังไง

คืนค่า: this.totalHealth.

Parameters

  • ไม่มี

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

Raid instance = ...;
float result = instance.getTotalHealth();

net.minecraft.world.entity.raid.Raid#getTotalRaidersAlive()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:565
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Total Raiders Alive

ทำงานยังไง

เรียกต่อ: values(), stream(), mapToInt(), sum(). คืนค่า: this.groupRaiderMap.values().stream().mapToInt(Set::size).sum().

Parameters

  • ไม่มี

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

Raid instance = ...;
int result = instance.getTotalRaidersAlive();

net.minecraft.world.entity.raid.Raid#hasFirstWaveSpawned()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:149
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี First Wave Spawned

ทำงานยังไง

คืนค่า: this.groupsSpawned > 0.

Parameters

  • ไม่มี

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

Raid instance = ...;
boolean result = instance.hasFirstWaveSpawned();

net.minecraft.world.entity.raid.Raid#isActive()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:734
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: this.active.

Parameters

  • ไม่มี

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

Raid instance = ...;
boolean result = instance.isActive();

net.minecraft.world.entity.raid.Raid#isBetweenWaves()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:145
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Between Waves

ทำงานยังไง

เรียกต่อ: hasFirstWaveSpawned(), getTotalRaidersAlive(). คืนค่า: this.hasFirstWaveSpawned() && this.getTotalRaidersAlive() == 0 && this.raidCooldownTicks > 0.

Parameters

  • ไม่มี

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

Raid instance = ...;
boolean result = instance.isBetweenWaves();

net.minecraft.world.entity.raid.Raid#isLoss()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:161
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

แก้ state: status. คืนค่า: this.status == Raid.RaidStatus.LOSS.

Parameters

  • ไม่มี

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

Raid instance = ...;
boolean result = instance.isLoss();

net.minecraft.world.entity.raid.Raid#isOver()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:141
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: isVictory(), isLoss(). คืนค่า: this.isVictory() || this.isLoss().

Parameters

  • ไม่มี

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

Raid instance = ...;
boolean result = instance.isOver();

net.minecraft.world.entity.raid.Raid#isStarted()

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

คืออะไร

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

ทำงานยังไง

คืนค่า: this.started.

Parameters

  • ไม่มี

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

Raid instance = ...;
boolean result = instance.isStarted();

net.minecraft.world.entity.raid.Raid#isStopped()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:153
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

แก้ state: status. คืนค่า: this.status == Raid.RaidStatus.STOPPED.

Parameters

  • ไม่มี

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

Raid instance = ...;
boolean result = instance.isStopped();

net.minecraft.world.entity.raid.Raid#isVictory()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:157
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

แก้ state: status. คืนค่า: this.status == Raid.RaidStatus.VICTORY.

Parameters

  • ไม่มี

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

Raid instance = ...;
boolean result = instance.isVictory();

net.minecraft.world.entity.raid.Raid#joinRaid(int,Raider,BlockPos,boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:528
  • Modifiers: public
  • Return: void

คืออะไร

รวม/เข้าร่วม Raid

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: addWaveMob(), setCurrentRaid(), setWave(), setCanJoinRaid(), setTicksOutsideRaid(), setPos(), getX(), getY().

Parameters

  • int i
  • Raider raider
  • BlockPos blockPos
  • boolean bl

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

Raid instance = ...;
Raider raider = ...;
BlockPos blockPos = ...;
instance.joinRaid(0, raider, blockPos, true);

net.minecraft.world.entity.raid.Raid#Raid(int,ServerLevel,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:108
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: id, level, active, raidCooldownTicks, center, numGroups. เรียกต่อ: setProgress(), getNumGroups(), getDifficulty().

Parameters

  • int i
  • ServerLevel serverLevel
  • BlockPos blockPos

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

ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
Raid instance = new Raid(0, serverLevel, blockPos);

net.minecraft.world.entity.raid.Raid#Raid(ServerLevel,CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:119
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: level, id, started, active, ticksActive, raidOmenLevel. เรียกต่อ: getInt(), getBoolean(), getLong(), getFloat(), getByName(), getString(), clear(), contains(). สร้างออบเจ็กต์: BlockPos.

Parameters

  • ServerLevel serverLevel
  • CompoundTag compoundTag

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

ServerLevel serverLevel = ...;
CompoundTag compoundTag = ...;
Raid instance = new Raid(serverLevel, compoundTag);

net.minecraft.world.entity.raid.Raid#removeFromRaid(Raider,boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:569
  • Modifiers: public
  • Return: void

คืออะไร

ลบ From Raid

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: totalHealth. เรียกต่อ: get(), getWave(), remove(), getHealth(), setCurrentRaid(), updateBossbar(), setDirty().

Parameters

  • Raider raider
  • boolean bl

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

Raid instance = ...;
Raider raider = ...;
instance.removeFromRaid(raider, true);

net.minecraft.world.entity.raid.Raid#removeLeader(int)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:681
  • Modifiers: public
  • Return: void

คืออะไร

ลบ Leader

ทำงานยังไง

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

Parameters

  • int i

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

Raid instance = ...;
instance.removeLeader(0);

net.minecraft.world.entity.raid.Raid#save(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:738
  • Modifiers: public
  • Return: CompoundTag

คืออะไร

บันทึก save

ทำงานยังไง

มีการวนลูป. เรียกต่อ: putInt(), putBoolean(), putLong(), putFloat(), putString(), getName(), getX(), getY(). สร้างออบเจ็กต์: ListTag. คืนค่า: compoundTag.

Parameters

  • CompoundTag compoundTag

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

Raid instance = ...;
CompoundTag compoundTag = ...;
CompoundTag result = instance.save(compoundTag);

net.minecraft.world.entity.raid.Raid#setLeader(int,Raider)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:675
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Leader

ทำงานยังไง

เรียกต่อ: put(), setItemSlot(), getOminousBannerInstance(), registryAccess(), lookupOrThrow(), setDropChance().

Parameters

  • int i
  • Raider raider

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

Raid instance = ...;
Raider raider = ...;
instance.setLeader(0, raider);

net.minecraft.world.entity.raid.Raid#setRaidOmenLevel(int)

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

คืออะไร

กำหนดค่า Raid Omen Level

ทำงานยังไง

แก้ state: raidOmenLevel.

Parameters

  • int i

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

Raid instance = ...;
instance.setRaidOmenLevel(0);

net.minecraft.world.entity.raid.Raid#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:243
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

แก้ state: active, status. เรียกต่อ: removeAllPlayers().

Parameters

  • ไม่มี

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

Raid instance = ...;
instance.stop();

net.minecraft.world.entity.raid.Raid#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:249
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: status, active, ticksActive, raidCooldownTicks, waveSpawnPos, started. เรียกต่อ: isStopped(), hasChunkAt(), getDifficulty(), stop(), setVisible(), isVillage(), moveRaidCenterToNearbyVillageSection(), getTotalRaidersAlive(). สร้างออบเจ็กต์: MobEffectInstance.

Parameters

  • ไม่มี

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

Raid instance = ...;
instance.tick();

net.minecraft.world.entity.raid.Raid#updateBossbar()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raid.java:545
  • Modifiers: public
  • Return: void

คืออะไร

อัปเดต Bossbar

ทำงานยังไง

เรียกต่อ: setProgress(), clamp(), getHealthOfLivingRaiders().

Parameters

  • ไม่มี

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

Raid instance = ...;
instance.updateBossbar();

Raider

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

net.minecraft.world.entity.raid.Raider#addAdditionalSaveData(CompoundTag)

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

คืออะไร

เพิ่ม Additional Save Data

ทำงานยังไง

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

Parameters

  • CompoundTag compoundTag

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

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

net.minecraft.world.entity.raid.Raider#aiStep()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:83
  • Modifiers: public
  • Return: void

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: noActionTime. เรียกต่อ: level(), isAlive(), getCurrentRaid(), canJoinRaid(), getGameTime(), getRaidAt(), blockPosition(), joinRaid().

Parameters

  • ไม่มี

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

Raider instance = ...;
instance.aiStep();

net.minecraft.world.entity.raid.Raider#applyRaidBuffs(ServerLevel,int,boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:73
  • Modifiers: public abstract
  • Return: void

คืออะไร

นำไปใช้ Raid Buffs

ทำงานยังไง

ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง

Parameters

  • ServerLevel serverLevel
  • int i
  • boolean bl

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

Raider instance = ...;
ServerLevel serverLevel = ...;
instance.applyRaidBuffs(serverLevel, 0, true);

net.minecraft.world.entity.raid.Raider#canJoinPatrol()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:133
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Join Patrol

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Raider instance = ...;
boolean result = instance.canJoinPatrol();

net.minecraft.world.entity.raid.Raider#canJoinRaid()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:75
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Join Raid

ทำงานยังไง

คืนค่า: this.canJoinRaid.

Parameters

  • ไม่มี

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

Raider instance = ...;
boolean result = instance.canJoinRaid();

net.minecraft.world.entity.raid.Raider#defineSynchedData(SynchedEntityData.Builder)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:67
  • Modifiers: protected
  • Return: void

คืออะไร

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

ทำงานยังไง

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

Parameters

  • SynchedEntityData.Builder builder

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

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

net.minecraft.world.entity.raid.Raider#die(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:112
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ die ตาม implementation ของ Raider

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: level(), getEntity(), getCurrentRaid(), isPatrolLeader(), removeLeader(), getWave(), getType(), addHeroOfTheVillage().

Parameters

  • DamageSource damageSource

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

Raider instance = ...;
DamageSource damageSource = ...;
instance.die(damageSource);

net.minecraft.world.entity.raid.Raider#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:260
  • Modifiers: public
  • Return: SpawnGroupData

คืออะไร

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

ทำงานยังไง

เรียกต่อ: setCanJoinRaid(), getType(). คืนค่า: super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData).

Parameters

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

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

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

net.minecraft.world.entity.raid.Raider#getCelebrateSound()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:269
  • Modifiers: public abstract
  • Return: SoundEvent

คืออะไร

อ่านค่า Celebrate Sound

ทำงานยังไง

ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง

Parameters

  • ไม่มี

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

Raider instance = ...;
SoundEvent result = instance.getCelebrateSound();

net.minecraft.world.entity.raid.Raider#getCurrentRaid()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:142
  • Modifiers: public
  • Return: Raid

คืออะไร

อ่านค่า Current Raid

ทำงานยังไง

คืนค่า: this.raid.

Parameters

  • ไม่มี

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

Raider instance = ...;
Raid result = instance.getCurrentRaid();

net.minecraft.world.entity.raid.Raider#getTicksOutsideRaid()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:243
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Ticks Outside Raid

ทำงานยังไง

คืนค่า: this.ticksOutsideRaid.

Parameters

  • ไม่มี

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

Raider instance = ...;
int result = instance.getTicksOutsideRaid();

net.minecraft.world.entity.raid.Raider#getWave()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:167
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Wave

ทำงานยังไง

คืนค่า: this.wave.

Parameters

  • ไม่มี

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

Raider instance = ...;
int result = instance.getWave();

net.minecraft.world.entity.raid.Raider#hasActiveRaid()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:159
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Active Raid

ทำงานยังไง

เรียกต่อ: getCurrentRaid(), isActive(). คืนค่า: this.getCurrentRaid() != null && this.getCurrentRaid().isActive().

Parameters

  • ไม่มี

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

Raider instance = ...;
boolean result = instance.hasActiveRaid();

net.minecraft.world.entity.raid.Raider#hasRaid()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:155
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Raid

ทำงานยังไง

เรียกต่อ: level(), getCurrentRaid(), getRaidAt(), blockPosition(). คืนค่า: !(this.level() instanceof ServerLevel serverLevel) ? false : this.getCurrentRaid() != null || serverLevel.getRaidAt(this.blockPosition()) != null.

Parameters

  • ไม่มี

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

Raider instance = ...;
boolean result = instance.hasRaid();

net.minecraft.world.entity.raid.Raider#hurtServer(ServerLevel,DamageSource,float)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:251
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: hasActiveRaid(), getCurrentRaid(), updateBossbar(). คืนค่า: super.hurtServer(serverLevel, damageSource, f).

Parameters

  • ServerLevel serverLevel
  • DamageSource damageSource
  • float f

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

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

net.minecraft.world.entity.raid.Raider#isCaptain()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:147
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: getItemBySlot(), isEmpty(), matches(), getOminousBannerInstance(), registryAccess(), lookupOrThrow(), isPatrolLeader(). คืนค่า: bl && bl2.

Parameters

  • ไม่มี

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

Raider instance = ...;
boolean result = instance.isCaptain();

net.minecraft.world.entity.raid.Raider#isCelebrating()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:171
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Raider instance = ...;
boolean result = instance.isCelebrating();

net.minecraft.world.entity.raid.Raider#pickUpItem(ServerLevel,ItemEntity)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:208
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ pickUpItem ตาม implementation ของ Raider

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getItem(), hasActiveRaid(), getCurrentRaid(), getLeader(), getWave(), matches(), getOminousBannerInstance(), registryAccess().

Parameters

  • ServerLevel serverLevel
  • ItemEntity itemEntity

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

ServerLevel serverLevel = ...;
ItemEntity itemEntity = ...;
@Override
protected void pickUpItem(ServerLevel serverLevel, ItemEntity itemEntity) {
    super.pickUpItem(serverLevel, itemEntity);
}

net.minecraft.world.entity.raid.Raider#Raider(EntityType<? extends Raider>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:54
  • Modifiers: protected
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • EntityType<? extends Raider> entityType
  • Level level

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

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

net.minecraft.world.entity.raid.Raider#readAdditionalSaveData(CompoundTag)

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

คืออะไร

อ่าน Additional Save Data

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: wave, canJoinRaid, raid. เรียกต่อ: getInt(), getBoolean(), contains(), level(), getRaids(), get(), addWaveMob(), isPatrolLeader().

Parameters

  • CompoundTag compoundTag

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

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

net.minecraft.world.entity.raid.Raider#registerGoals()

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

คืออะไร

ลงทะเบียน Goals

ทำงานยังไง

เรียกต่อ: addGoal(), RaiderMoveThroughVillageGoal(), RaiderCelebration(). สร้างออบเจ็กต์: Raider.ObtainRaidLeaderBannerGoal<>, PathfindToRaidGoal<>, Raider.RaiderMoveThroughVillageGoal, Raider.RaiderCelebration.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.raid.Raider#removeWhenFarAway(double)

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

คืออะไร

ลบ When Far Away

ทำงานยังไง

เรียกต่อ: getCurrentRaid(). คืนค่า: this.getCurrentRaid() == null ? super.removeWhenFarAway(d) : false.

Parameters

  • double d

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

Raider instance = ...;
boolean result = instance.removeWhenFarAway(0.0D);

net.minecraft.world.entity.raid.Raider#requiresCustomPersistence()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:238
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.raid.Raider#setCanJoinRaid(boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:79
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Can Join Raid

ทำงานยังไง

แก้ state: canJoinRaid.

Parameters

  • boolean bl

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

Raider instance = ...;
instance.setCanJoinRaid(true);

net.minecraft.world.entity.raid.Raider#setCelebrating(boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:175
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Celebrating

ทำงานยังไง

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

Parameters

  • boolean bl

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

Raider instance = ...;
instance.setCelebrating(true);

net.minecraft.world.entity.raid.Raider#setCurrentRaid(Raid)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:138
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Current Raid

ทำงานยังไง

แก้ state: raid.

Parameters

  • Raid raid

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

Raider instance = ...;
Raid raid = ...;
instance.setCurrentRaid(raid);

net.minecraft.world.entity.raid.Raider#setTicksOutsideRaid(int)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:247
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Ticks Outside Raid

ทำงานยังไง

แก้ state: ticksOutsideRaid.

Parameters

  • int i

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

Raider instance = ...;
instance.setTicksOutsideRaid(0);

net.minecraft.world.entity.raid.Raider#setWave(int)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:163
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Wave

ทำงานยังไง

แก้ state: wave.

Parameters

  • int i

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

Raider instance = ...;
instance.setWave(0);

net.minecraft.world.entity.raid.Raider#updateNoActionTime()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:107
  • Modifiers: protected
  • Return: void

คืออะไร

อัปเดต No Action Time

ทำงานยังไง

แก้ state: noActionTime.

Parameters

  • ไม่มี

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

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

Raider$HoldGroundAttackGoal

  • Full name: net.minecraft.world.entity.raid.Raider$HoldGroundAttackGoal
  • Package: net.minecraft.world.entity.raid
  • Source: commonnet/minecraft/world/entity/raid/Raider.java
  • Type: class
  • Modifiers: protected static
  • Extends: Goal

net.minecraft.world.entity.raid.Raider$HoldGroundAttackGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:282
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: getLastHurtByMob(), getCurrentRaid(), isPatrolling(), getTarget(), isAggressive(), getType().

Parameters

  • ไม่มี

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

Raider.HoldGroundAttackGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.raid.Raider$HoldGroundAttackGoal#HoldGroundAttackGoal(AbstractIllager,float)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:276
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: mob, hostileRadiusSqr. เรียกต่อ: setFlags(), of().

Parameters

  • AbstractIllager abstractIllager
  • float f

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

AbstractIllager abstractIllager = ...;
Raider.HoldGroundAttackGoal instance = new Raider.HoldGroundAttackGoal(abstractIllager, 0.0F);

net.minecraft.world.entity.raid.Raider$HoldGroundAttackGoal#requiresUpdateEveryTick()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:318
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ requiresUpdateEveryTick ตาม implementation ของ Raider$HoldGroundAttackGoal

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

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

Raider.HoldGroundAttackGoal instance = ...;
boolean result = instance.requiresUpdateEveryTick();

net.minecraft.world.entity.raid.Raider$HoldGroundAttackGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:292
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

มีการวนลูป. เรียกต่อ: getNavigation(), stop(), getServerLevel(), getNearbyEntities(), getBoundingBox(), inflate(), setTarget(), getTarget().

Parameters

  • ไม่มี

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

Raider.HoldGroundAttackGoal instance = ...;
instance.start();

net.minecraft.world.entity.raid.Raider$HoldGroundAttackGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:303
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getTarget(), getServerLevel(), getNearbyEntities(), getBoundingBox(), inflate(), setTarget(), setAggressive().

Parameters

  • ไม่มี

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

Raider.HoldGroundAttackGoal instance = ...;
instance.stop();

net.minecraft.world.entity.raid.Raider$HoldGroundAttackGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:323
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getTarget(), distanceToSqr(), getLookControl(), setLookAt(), nextInt(), playAmbientSound(), setAggressive().

Parameters

  • ไม่มี

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

Raider.HoldGroundAttackGoal instance = ...;
instance.tick();

Raider$ObtainRaidLeaderBannerGoal

  • Full name: net.minecraft.world.entity.raid.Raider$ObtainRaidLeaderBannerGoal
  • Package: net.minecraft.world.entity.raid
  • Source: commonnet/minecraft/world/entity/raid/Raider.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.raid.Raider$ObtainRaidLeaderBannerGoal#canContinueToUse()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:383
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: pursuedBannerItemEntity, pathToBanner. เรียกต่อ: isRemoved(), isDone(), cannotPickUpBanner(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • ไม่มี

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

Raider.ObtainRaidLeaderBannerGoal instance = ...;
boolean result = instance.canContinueToUse();

net.minecraft.world.entity.raid.Raider$ObtainRaidLeaderBannerGoal#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:354
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: pathToBanner, pursuedBannerItemEntity, unreachableBannerCache. เรียกต่อ: cannotPickUpBanner(), getAttributeValue(), level(), getEntitiesOfClass(), getBoundingBox(), inflate(), getOrDefault(), getId(). สร้างออบเจ็กต์: Int2LongOpenHashMap. มีจุด return อย่างน้อย 3 จุด.

Parameters

  • ไม่มี

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

Raider.ObtainRaidLeaderBannerGoal instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.raid.Raider$ObtainRaidLeaderBannerGoal#ObtainRaidLeaderBannerGoal(T)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:349
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: mob. เรียกต่อ: setFlags(), of().

Parameters

  • T raider2

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

T raider2 = ...;
Raider.ObtainRaidLeaderBannerGoal instance = new Raider.ObtainRaidLeaderBannerGoal(raider2);

net.minecraft.world.entity.raid.Raider$ObtainRaidLeaderBannerGoal#start()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:417
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

เรียกต่อ: getNavigation(), moveTo().

Parameters

  • ไม่มี

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

Raider.ObtainRaidLeaderBannerGoal instance = ...;
instance.start();

net.minecraft.world.entity.raid.Raider$ObtainRaidLeaderBannerGoal#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:422
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

แก้ state: pathToBanner, pursuedBannerItemEntity.

Parameters

  • ไม่มี

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

Raider.ObtainRaidLeaderBannerGoal instance = ...;
instance.stop();

net.minecraft.world.entity.raid.Raider$ObtainRaidLeaderBannerGoal#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:428
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Raider.ObtainRaidLeaderBannerGoal instance = ...;
instance.tick();

Raider$RaiderCelebration

  • Full name: net.minecraft.world.entity.raid.Raider$RaiderCelebration
  • Package: net.minecraft.world.entity.raid
  • Source: commonnet/minecraft/world/entity/raid/Raider.java
  • Type: class
  • Modifiers: public
  • Extends: Goal

net.minecraft.world.entity.raid.Raider$RaiderCelebration#canUse()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:444
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: getCurrentRaid(), isAlive(), getTarget(), isLoss(). คืนค่า: this.mob.isAlive() && this.mob.getTarget() == null && raid != null && raid.isLoss().

Parameters

  • ไม่มี

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

Raider.RaiderCelebration instance = ...;
boolean result = instance.canUse();

net.minecraft.world.entity.raid.Raider$RaiderCelebration#start()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:450
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Raider.RaiderCelebration instance = ...;
instance.start();

net.minecraft.world.entity.raid.Raider$RaiderCelebration#stop()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:456
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Raider.RaiderCelebration instance = ...;
instance.stop();

net.minecraft.world.entity.raid.Raider$RaiderCelebration#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raider.java:462
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isSilent(), nextInt(), adjustedTickDelay(), makeSound(), getCelebrateSound(), isPassenger(), getJumpControl(), jump().

Parameters

  • ไม่มี

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

Raider.RaiderCelebration instance = ...;
instance.tick();

Raids

  • Full name: net.minecraft.world.entity.raid.Raids
  • Package: net.minecraft.world.entity.raid
  • Source: commonnet/minecraft/world/entity/raid/Raids.java
  • Type: class
  • Modifiers: public
  • Extends: SavedData

net.minecraft.world.entity.raid.Raids#canJoinRaid(Raider,Raid)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raids.java:72
  • Modifiers: public static
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Join Raid

ทำงานยังไง

เรียกต่อ: getLevel(), isAlive(), getNoActionTime(), level(), dimensionType().

Parameters

  • Raider raider
  • Raid raid

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

Raider raider = ...;
Raid raid = ...;
boolean result = Raids.canJoinRaid(raider, raid);

net.minecraft.world.entity.raid.Raids#createOrExtendRaid(ServerPlayer,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raids.java:78
  • Modifiers: public
  • Return: Raid

คืออะไร

สร้าง Or Extend Raid

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: isSpectator(), getGameRules(), getBoolean(), level(), dimensionType(), hasRaids(), getPoiManager(), getInRange(). มีจุด return อย่างน้อย 4 จุด.

Parameters

  • ServerPlayer serverPlayer
  • BlockPos blockPos

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

Raids instance = ...;
ServerPlayer serverPlayer = ...;
BlockPos blockPos = ...;
Raid result = instance.createOrExtendRaid(serverPlayer, blockPos);

net.minecraft.world.entity.raid.Raids#factory(ServerLevel)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raids.java:33
  • Modifiers: public static
  • Return: SavedData.Factory<Raids>

คืออะไร

ดำเนินการ factory ตาม implementation ของ Raids

ทำงานยังไง

เรียกต่อ: load(). สร้างออบเจ็กต์: SavedData.Factory<>, Raids. คืนค่า: new SavedData.Factory<>(() -> new Raids(serverLevel), (compoundTag, provider) -> load(serverLevel, compoundTag), DataFixTypes.SAVED_DATA_RAIDS).

Parameters

  • ServerLevel serverLevel

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

ServerLevel serverLevel = ...;
SavedData.Factory<Raids> result = Raids.factory(serverLevel);

net.minecraft.world.entity.raid.Raids#get(int)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raids.java:43
  • Modifiers: public
  • Return: Raid

คืออะไร

อ่านค่า get

ทำงานยังไง

คืนค่า: this.raidMap.get(i).

Parameters

  • int i

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

Raids instance = ...;
Raid result = instance.get(0);

net.minecraft.world.entity.raid.Raids#getFileId(Holder<DimensionType>)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raids.java:163
  • Modifiers: public static
  • Return: String

คืออะไร

อ่านค่า File Id

ทำงานยังไง

เรียกต่อ: is(). คืนค่า: holder.is(BuiltinDimensionTypes.END) ? "raids_end" : "raids".

Parameters

  • Holder<DimensionType> holder

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

Holder<DimensionType> holder = ...;
String result = Raids.getFileId(holder);

net.minecraft.world.entity.raid.Raids#getNearbyRaid(BlockPos,int)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raids.java:171
  • Modifiers: public
  • Return: Raid

คืออะไร

อ่านค่า Nearby Raid

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: values(), getCenter(), distSqr(), isActive(). คืนค่า: raid.

Parameters

  • BlockPos blockPos
  • int i

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

Raids instance = ...;
BlockPos blockPos = ...;
Raid result = instance.getNearbyRaid(blockPos, 0);

net.minecraft.world.entity.raid.Raids#load(ServerLevel,CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raids.java:132
  • Modifiers: public static
  • Return: Raids

คืออะไร

โหลด load

ทำงานยังไง

มีการวนลูป. เรียกต่อ: getInt(), getList(), size(), getCompound(), put(), getId(). สร้างออบเจ็กต์: Raids, Raid. คืนค่า: raids.

Parameters

  • ServerLevel serverLevel
  • CompoundTag compoundTag

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

ServerLevel serverLevel = ...;
CompoundTag compoundTag = ...;
Raids result = Raids.load(serverLevel, compoundTag);

net.minecraft.world.entity.raid.Raids#Raids(ServerLevel)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raids.java:37
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: level, nextAvailableID. เรียกต่อ: setDirty().

Parameters

  • ServerLevel serverLevel

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

ServerLevel serverLevel = ...;
Raids instance = new Raids(serverLevel);

net.minecraft.world.entity.raid.Raids#save(CompoundTag,HolderLookup.Provider)

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raids.java:147
  • Modifiers: public
  • Return: CompoundTag

คืออะไร

บันทึก save

ทำงานยังไง

มีการวนลูป. เรียกต่อ: putInt(), values(), add(), put(). สร้างออบเจ็กต์: ListTag, CompoundTag. คืนค่า: compoundTag.

Parameters

  • CompoundTag compoundTag
  • HolderLookup.Provider provider

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

Raids instance = ...;
CompoundTag compoundTag = ...;
HolderLookup.Provider provider = ...;
CompoundTag result = instance.save(compoundTag, provider);

net.minecraft.world.entity.raid.Raids#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/raid/Raids.java:47
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: tick. เรียกต่อ: values(), iterator(), hasNext(), next(), getGameRules(), getBoolean(), stop(), isStopped().

Parameters

  • ไม่มี

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

Raids instance = ...;
instance.tick();