Skip to content

Package net.minecraft.world.entity.decoration

Part 1/1


ArmorStand

  • Full name: net.minecraft.world.entity.decoration.ArmorStand
  • Package: net.minecraft.world.entity.decoration
  • Source: commonnet/minecraft/world/entity/decoration/ArmorStand.java
  • Type: class
  • Modifiers: public
  • Extends: LivingEntity

net.minecraft.world.entity.decoration.ArmorStand#addAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:172
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Additional Save Data

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: add(), saveOptional(), registryAccess(), put(), putBoolean(), isInvisible(), isSmall(), showArms(). สร้างออบเจ็กต์: ListTag.

Parameters

  • CompoundTag compoundTag

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

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

net.minecraft.world.entity.decoration.ArmorStand#ArmorStand(EntityType<? extends ArmorStand>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:90
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • EntityType<? extends ArmorStand> entityType
  • Level level

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

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

net.minecraft.world.entity.decoration.ArmorStand#ArmorStand(Level,double,double,double)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:94
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

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

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

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

net.minecraft.world.entity.decoration.ArmorStand#attackable()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:782
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ attackable ตาม implementation ของ ArmorStand

ทำงานยังไง

คืนค่า: false.

Parameters

  • ไม่มี

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

ArmorStand instance = ...;
boolean result = instance.attackable();

net.minecraft.world.entity.decoration.ArmorStand#canBeSeenByAnyone()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:830
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Be Seen By Anyone

ทำงานยังไง

เรียกต่อ: isInvisible(), isMarker(). คืนค่า: !this.isInvisible() && !this.isMarker().

Parameters

  • ไม่มี

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

ArmorStand instance = ...;
boolean result = instance.canBeSeenByAnyone();

net.minecraft.world.entity.decoration.ArmorStand#canUseSlot(EquipmentSlot)

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

คืออะไร

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

ทำงานยังไง

เรียกต่อ: isDisabled(). คืนค่า: equipmentSlot != EquipmentSlot.BODY && !this.isDisabled(equipmentSlot).

Parameters

  • EquipmentSlot equipmentSlot

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

ArmorStand instance = ...;
EquipmentSlot equipmentSlot = ...;
boolean result = instance.canUseSlot(equipmentSlot);

net.minecraft.world.entity.decoration.ArmorStand#createAttributes()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:99
  • Modifiers: public static
  • Return: AttributeSupplier.Builder

คืออะไร

สร้าง Attributes

ทำงานยังไง

เรียกต่อ: createLivingAttributes(), add(). คืนค่า: createLivingAttributes().add(Attributes.STEP_HEIGHT, 0.0).

Parameters

  • ไม่มี

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

AttributeSupplier.Builder result = ArmorStand.createAttributes();

net.minecraft.world.entity.decoration.ArmorStand#defineSynchedData(SynchedEntityData.Builder)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:121
  • Modifiers: protected
  • Return: void

คืออะไร

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

ทำงานยังไง

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

Parameters

  • SynchedEntityData.Builder builder

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

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

net.minecraft.world.entity.decoration.ArmorStand#doPush(Entity)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:282
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ doPush ตาม implementation ของ ArmorStand

ทำงานยังไง

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

Parameters

  • Entity entity

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

Entity entity = ...;
@Override
protected void doPush(Entity entity) {
    super.doPush(entity);
}

net.minecraft.world.entity.decoration.ArmorStand#getArmorSlots()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:138
  • Modifiers: public
  • Return: Iterable<ItemStack>

คืออะไร

อ่านค่า Armor Slots

ทำงานยังไง

คืนค่า: this.armorItems.

Parameters

  • ไม่มี

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

ArmorStand instance = ...;
Iterable<ItemStack> result = instance.getArmorSlots();

net.minecraft.world.entity.decoration.ArmorStand#getBodyPose()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:711
  • Modifiers: public
  • Return: Rotations

คืออะไร

อ่านค่า Body Pose

ทำงานยังไง

คืนค่า: this.bodyPose.

Parameters

  • ไม่มี

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

ArmorStand instance = ...;
Rotations result = instance.getBodyPose();

net.minecraft.world.entity.decoration.ArmorStand#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:757
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

คืนค่า: SoundEvents.ARMOR_STAND_BREAK.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.decoration.ArmorStand#getDefaultDimensions(Pose)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:787
  • Modifiers: public
  • Return: EntityDimensions

คืออะไร

อ่านค่า Default Dimensions

ทำงานยังไง

เรียกต่อ: getDimensionsMarker(), isMarker(). คืนค่า: this.getDimensionsMarker(this.isMarker()).

Parameters

  • Pose pose

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

ArmorStand instance = ...;
Pose pose = ...;
EntityDimensions result = instance.getDefaultDimensions(pose);

net.minecraft.world.entity.decoration.ArmorStand#getFallSounds()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:746
  • Modifiers: public
  • Return: LivingEntity.Fallsounds

คืออะไร

อ่านค่า Fall Sounds

ทำงานยังไง

เรียกต่อ: Fallsounds(). สร้างออบเจ็กต์: LivingEntity.Fallsounds. คืนค่า: new LivingEntity.Fallsounds(SoundEvents.ARMOR_STAND_FALL, SoundEvents.ARMOR_STAND_FALL).

Parameters

  • ไม่มี

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

ArmorStand instance = ...;
LivingEntity.Fallsounds result = instance.getFallSounds();

net.minecraft.world.entity.decoration.ArmorStand#getHandSlots()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:133
  • Modifiers: public
  • Return: Iterable<ItemStack>

คืออะไร

อ่านค่า Hand Slots

ทำงานยังไง

คืนค่า: this.handItems.

Parameters

  • ไม่มี

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

ArmorStand instance = ...;
Iterable<ItemStack> result = instance.getHandSlots();

net.minecraft.world.entity.decoration.ArmorStand#getHeadPose()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:707
  • Modifiers: public
  • Return: Rotations

คืออะไร

อ่านค่า Head Pose

ทำงานยังไง

คืนค่า: this.headPose.

Parameters

  • ไม่มี

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

ArmorStand instance = ...;
Rotations result = instance.getHeadPose();

net.minecraft.world.entity.decoration.ArmorStand#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:751
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

คืนค่า: SoundEvents.ARMOR_STAND_HIT.

Parameters

  • DamageSource damageSource

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

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

net.minecraft.world.entity.decoration.ArmorStand#getItemBySlot(EquipmentSlot)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:143
  • Modifiers: public
  • Return: ItemStack

คืออะไร

อ่านค่า Item By Slot

ทำงานยังไง

แยกกรณีด้วย switch. เรียกต่อ: getType(), get(), getIndex(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • EquipmentSlot equipmentSlot

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

ArmorStand instance = ...;
EquipmentSlot equipmentSlot = ...;
ItemStack result = instance.getItemBySlot(equipmentSlot);

net.minecraft.world.entity.decoration.ArmorStand#getLeftArmPose()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:715
  • Modifiers: public
  • Return: Rotations

คืออะไร

อ่านค่า Left Arm Pose

ทำงานยังไง

คืนค่า: this.leftArmPose.

Parameters

  • ไม่มี

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

ArmorStand instance = ...;
Rotations result = instance.getLeftArmPose();

net.minecraft.world.entity.decoration.ArmorStand#getLeftLegPose()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:723
  • Modifiers: public
  • Return: Rotations

คืออะไร

อ่านค่า Left Leg Pose

ทำงานยังไง

คืนค่า: this.leftLegPose.

Parameters

  • ไม่มี

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

ArmorStand instance = ...;
Rotations result = instance.getLeftLegPose();

net.minecraft.world.entity.decoration.ArmorStand#getLightProbePosition(float)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:800
  • Modifiers: public
  • Return: Vec3

คืออะไร

อ่านค่า Light Probe Position

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: isMarker(), getDimensionsMarker(), makeBoundingBox(), position(), blockPosition(), betweenClosed(), containing(), max(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • float f

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

ArmorStand instance = ...;
Vec3 result = instance.getLightProbePosition(0.0F);

net.minecraft.world.entity.decoration.ArmorStand#getMainArm()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:741
  • Modifiers: public
  • Return: HumanoidArm

คืออะไร

อ่านค่า Main Arm

ทำงานยังไง

คืนค่า: HumanoidArm.RIGHT.

Parameters

  • ไม่มี

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

ArmorStand instance = ...;
HumanoidArm result = instance.getMainArm();

net.minecraft.world.entity.decoration.ArmorStand#getPickResult()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:825
  • Modifiers: public
  • Return: ItemStack

คืออะไร

อ่านค่า Pick Result

ทำงานยังไง

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

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.decoration.ArmorStand#getPistonPushReaction()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:625
  • Modifiers: public
  • Return: PushReaction

คืออะไร

อ่านค่า Piston Push Reaction

ทำงานยังไง

เรียกต่อ: isMarker(). คืนค่า: this.isMarker() ? PushReaction.IGNORE : super.getPistonPushReaction().

Parameters

  • ไม่มี

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

ArmorStand instance = ...;
PushReaction result = instance.getPistonPushReaction();

net.minecraft.world.entity.decoration.ArmorStand#getRightArmPose()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:719
  • Modifiers: public
  • Return: Rotations

คืออะไร

อ่านค่า Right Arm Pose

ทำงานยังไง

คืนค่า: this.rightArmPose.

Parameters

  • ไม่มี

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

ArmorStand instance = ...;
Rotations result = instance.getRightArmPose();

net.minecraft.world.entity.decoration.ArmorStand#getRightLegPose()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:727
  • Modifiers: public
  • Return: Rotations

คืออะไร

อ่านค่า Right Leg Pose

ทำงานยังไง

คืนค่า: this.rightLegPose.

Parameters

  • ไม่มี

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

ArmorStand instance = ...;
Rotations result = instance.getRightLegPose();

net.minecraft.world.entity.decoration.ArmorStand#handleEntityEvent(byte)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:454
  • Modifiers: public
  • Return: void

คืออะไร

จัดการ Entity Event

ทำงานยังไง

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

Parameters

  • byte b

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

ArmorStand instance = ...;
instance.handleEntityEvent(0);

net.minecraft.world.entity.decoration.ArmorStand#hurtServer(ServerLevel,DamageSource,float)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:387
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: lastHit. เรียกต่อ: isRemoved(), getGameRules(), getBoolean(), getEntity(), is(), kill(), isInvulnerableTo(), isMarker(). มีจุด return อย่างน้อย 11 จุด.

Parameters

  • ServerLevel serverLevel
  • DamageSource damageSource
  • float f

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

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

net.minecraft.world.entity.decoration.ArmorStand#ignoreExplosion(Explosion)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:620
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ ignoreExplosion ตาม implementation ของ ArmorStand

ทำงานยังไง

เรียกต่อ: shouldAffectBlocklikeEntities(), isInvisible(). คืนค่า: explosion.shouldAffectBlocklikeEntities() ? this.isInvisible() : true.

Parameters

  • Explosion explosion

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

ArmorStand instance = ...;
Explosion explosion = ...;
boolean result = instance.ignoreExplosion(explosion);

net.minecraft.world.entity.decoration.ArmorStand#interactAt(Player,Vec3,InteractionHand)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:295
  • Modifiers: public
  • Return: InteractionResult

คืออะไร

จัดการ interaction At

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getItemInHand(), isMarker(), is(), isSpectator(), level(), getEquipmentSlotForItem(), isEmpty(), getClickedSlot(). มีจุด return อย่างน้อย 8 จุด.

Parameters

  • Player player
  • Vec3 vec3
  • InteractionHand interactionHand

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

ArmorStand instance = ...;
Player player = ...;
Vec3 vec3 = ...;
InteractionHand interactionHand = ...;
InteractionResult result = instance.interactAt(player, vec3, interactionHand);

net.minecraft.world.entity.decoration.ArmorStand#isAffectedByPotions()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:767
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Affected By Potions

ทำงานยังไง

คืนค่า: false.

Parameters

  • ไม่มี

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

ArmorStand instance = ...;
boolean result = instance.isAffectedByPotions();

net.minecraft.world.entity.decoration.ArmorStand#isBaby()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:609
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ไม่มี

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

ArmorStand instance = ...;
boolean result = instance.isBaby();

net.minecraft.world.entity.decoration.ArmorStand#isEffectiveAi()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:116
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Effective Ai

ทำงานยังไง

เรียกต่อ: hasPhysics(). คืนค่า: super.isEffectiveAi() && this.hasPhysics().

Parameters

  • ไม่มี

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

ArmorStand instance = ...;
boolean result = instance.isEffectiveAi();

net.minecraft.world.entity.decoration.ArmorStand#isIgnoringBlockTriggers()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:630
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Ignoring Block Triggers

ทำงานยังไง

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

Parameters

  • ไม่มี

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

ArmorStand instance = ...;
boolean result = instance.isIgnoringBlockTriggers();

net.minecraft.world.entity.decoration.ArmorStand#isMarker()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:663
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: get(). คืนค่า: (this.entityData.get(DATA_CLIENT_FLAGS) & 16) != 0.

Parameters

  • ไม่มี

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

ArmorStand instance = ...;
boolean result = instance.isMarker();

net.minecraft.world.entity.decoration.ArmorStand#isPickable()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:731
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: isMarker(). คืนค่า: super.isPickable() && !this.isMarker().

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.decoration.ArmorStand#isPushable()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:277
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: false.

Parameters

  • ไม่มี

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

ArmorStand instance = ...;
boolean result = instance.isPushable();

net.minecraft.world.entity.decoration.ArmorStand#isSmall()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:639
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: get(). คืนค่า: (this.entityData.get(DATA_CLIENT_FLAGS) & 1) != 0.

Parameters

  • ไม่มี

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

ArmorStand instance = ...;
boolean result = instance.isSmall();

net.minecraft.world.entity.decoration.ArmorStand#kill(ServerLevel)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:614
  • Modifiers: public
  • Return: void

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ServerLevel serverLevel

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

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

net.minecraft.world.entity.decoration.ArmorStand#onSyncedDataUpdated(EntityDataAccessor<?>)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:772
  • Modifiers: public
  • Return: void

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: blocksBuilding. เรียกต่อ: equals(), refreshDimensions(), isMarker().

Parameters

  • EntityDataAccessor<?> entityDataAccessor

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

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

net.minecraft.world.entity.decoration.ArmorStand#pushEntities()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:286
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ pushEntities ตาม implementation ของ ArmorStand

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: level(), getEntities(), getBoundingBox(), distanceToSqr(), push().

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.decoration.ArmorStand#readAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:201
  • Modifiers: public
  • Return: void

คืออะไร

อ่าน Additional Save Data

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: disabledSlots, noPhysics. เรียกต่อ: contains(), getList(), size(), getCompound(), set(), parseOptional(), registryAccess(), setInvisible().

Parameters

  • CompoundTag compoundTag

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

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

net.minecraft.world.entity.decoration.ArmorStand#refreshDimensions()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:103
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ refreshDimensions ตาม implementation ของ ArmorStand

ทำงานยังไง

เรียกต่อ: getX(), getY(), getZ(), setPos().

Parameters

  • ไม่มี

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

ArmorStand instance = ...;
instance.refreshDimensions();

net.minecraft.world.entity.decoration.ArmorStand#setBodyPose(Rotations)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:682
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Body Pose

ทำงานยังไง

แก้ state: bodyPose. เรียกต่อ: set().

Parameters

  • Rotations rotations

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

ArmorStand instance = ...;
Rotations rotations = ...;
instance.setBodyPose(rotations);

net.minecraft.world.entity.decoration.ArmorStand#setHeadPose(Rotations)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:677
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Head Pose

ทำงานยังไง

แก้ state: headPose. เรียกต่อ: set().

Parameters

  • Rotations rotations

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

ArmorStand instance = ...;
Rotations rotations = ...;
instance.setHeadPose(rotations);

net.minecraft.world.entity.decoration.ArmorStand#setInvisible(boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:603
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Invisible

ทำงานยังไง

แก้ state: invisible.

Parameters

  • boolean bl

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

ArmorStand instance = ...;
instance.setInvisible(true);

net.minecraft.world.entity.decoration.ArmorStand#setItemSlot(EquipmentSlot,ItemStack)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:160
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Item Slot

ทำงานยังไง

แยกกรณีด้วย switch. เรียกต่อ: verifyEquippedItem(), getType(), onEquipItem(), set(), getIndex().

Parameters

  • EquipmentSlot equipmentSlot
  • ItemStack itemStack

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

ArmorStand instance = ...;
EquipmentSlot equipmentSlot = ...;
ItemStack itemStack = ...;
instance.setItemSlot(equipmentSlot, itemStack);

net.minecraft.world.entity.decoration.ArmorStand#setLeftArmPose(Rotations)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:687
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Left Arm Pose

ทำงานยังไง

แก้ state: leftArmPose. เรียกต่อ: set().

Parameters

  • Rotations rotations

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

ArmorStand instance = ...;
Rotations rotations = ...;
instance.setLeftArmPose(rotations);

net.minecraft.world.entity.decoration.ArmorStand#setLeftLegPose(Rotations)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:697
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Left Leg Pose

ทำงานยังไง

แก้ state: leftLegPose. เรียกต่อ: set().

Parameters

  • Rotations rotations

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

ArmorStand instance = ...;
Rotations rotations = ...;
instance.setLeftLegPose(rotations);

net.minecraft.world.entity.decoration.ArmorStand#setNoBasePlate(boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:651
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า No Base Plate

ทำงานยังไง

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

Parameters

  • boolean bl

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

ArmorStand instance = ...;
instance.setNoBasePlate(true);

net.minecraft.world.entity.decoration.ArmorStand#setRightArmPose(Rotations)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:692
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Right Arm Pose

ทำงานยังไง

แก้ state: rightArmPose. เรียกต่อ: set().

Parameters

  • Rotations rotations

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

ArmorStand instance = ...;
Rotations rotations = ...;
instance.setRightArmPose(rotations);

net.minecraft.world.entity.decoration.ArmorStand#setRightLegPose(Rotations)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:702
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Right Leg Pose

ทำงานยังไง

แก้ state: rightLegPose. เรียกต่อ: set().

Parameters

  • Rotations rotations

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

ArmorStand instance = ...;
Rotations rotations = ...;
instance.setRightLegPose(rotations);

net.minecraft.world.entity.decoration.ArmorStand#setShowArms(boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:643
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Show Arms

ทำงานยังไง

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

Parameters

  • boolean bl

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

ArmorStand instance = ...;
instance.setShowArms(true);

net.minecraft.world.entity.decoration.ArmorStand#setYBodyRot(float)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:552
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า YBody Rot

ทำงานยังไง

แก้ state: yBodyRotO, yRotO, yHeadRotO, yHeadRot.

Parameters

  • float f

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

ArmorStand instance = ...;
instance.setYBodyRot(0.0F);

net.minecraft.world.entity.decoration.ArmorStand#setYHeadRot(float)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:558
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า YHead Rot

ทำงานยังไง

แก้ state: yBodyRotO, yRotO, yHeadRotO, yHeadRot.

Parameters

  • float f

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

ArmorStand instance = ...;
instance.setYHeadRot(0.0F);

net.minecraft.world.entity.decoration.ArmorStand#shouldRenderAtSqrDistance(double)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:466
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBoundingBox(), getSize(), isNaN(). คืนค่า: d < e * e.

Parameters

  • double d

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

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

net.minecraft.world.entity.decoration.ArmorStand#showArms()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:647
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ showArms ตาม implementation ของ ArmorStand

ทำงานยังไง

เรียกต่อ: get(). คืนค่า: (this.entityData.get(DATA_CLIENT_FLAGS) & 4) != 0.

Parameters

  • ไม่มี

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

ArmorStand instance = ...;
boolean result = instance.showArms();

net.minecraft.world.entity.decoration.ArmorStand#showBasePlate()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:655
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ showBasePlate ตาม implementation ของ ArmorStand

ทำงานยังไง

เรียกต่อ: get(). คืนค่า: (this.entityData.get(DATA_CLIENT_FLAGS) & 8) == 0.

Parameters

  • ไม่มี

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

ArmorStand instance = ...;
boolean result = instance.showBasePlate();

net.minecraft.world.entity.decoration.ArmorStand#skipAttackInteraction(Entity)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:736
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ skipAttackInteraction ตาม implementation ของ ArmorStand

ทำงานยังไง

เรียกต่อ: level(), mayInteract(), blockPosition(). คืนค่า: entity instanceof Player && !this.level().mayInteract((Player)entity, this.blockPosition()).

Parameters

  • Entity entity

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

ArmorStand instance = ...;
Entity entity = ...;
boolean result = instance.skipAttackInteraction(entity);

net.minecraft.world.entity.decoration.ArmorStand#thunderHit(ServerLevel,LightningBolt)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:763
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ thunderHit ตาม implementation ของ ArmorStand

ทำงานยังไง

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

Parameters

  • ServerLevel serverLevel
  • LightningBolt lightningBolt

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

ArmorStand instance = ...;
ServerLevel serverLevel = ...;
LightningBolt lightningBolt = ...;
instance.thunderHit(serverLevel, lightningBolt);

net.minecraft.world.entity.decoration.ArmorStand#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:564
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: get(), equals(), setHeadPose(), setBodyPose(), setLeftArmPose(), setRightArmPose(), setLeftLegPose(), setRightLegPose().

Parameters

  • ไม่มี

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

ArmorStand instance = ...;
instance.tick();

net.minecraft.world.entity.decoration.ArmorStand#tickHeadTurn(float,float)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:538
  • Modifiers: protected
  • Return: float

คืออะไร

ประมวลผล tick Head Turn

ทำงานยังไง

แก้ state: yBodyRotO, yBodyRot. เรียกต่อ: getYRot(). คืนค่า: 0.0F.

Parameters

  • float f
  • float g

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

@Override
protected float tickHeadTurn(float f, float g) {
    return super.tickHeadTurn(f, g);
}

net.minecraft.world.entity.decoration.ArmorStand#travel(Vec3)

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

คืออะไร

ดำเนินการ travel ตาม implementation ของ ArmorStand

ทำงานยังไง

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

Parameters

  • Vec3 vec3

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

ArmorStand instance = ...;
Vec3 vec3 = ...;
instance.travel(vec3);

net.minecraft.world.entity.decoration.ArmorStand#updateInvisibilityStatus()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ArmorStand.java:598
  • Modifiers: protected
  • Return: void

คืออะไร

อัปเดต Invisibility Status

ทำงานยังไง

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

Parameters

  • ไม่มี

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

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

BlockAttachedEntity

  • Full name: net.minecraft.world.entity.decoration.BlockAttachedEntity
  • Package: net.minecraft.world.entity.decoration
  • Source: commonnet/minecraft/world/entity/decoration/BlockAttachedEntity.java
  • Type: class
  • Modifiers: public abstract
  • Extends: Entity

net.minecraft.world.entity.decoration.BlockAttachedEntity#addAdditionalSaveData(CompoundTag)

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

คืออะไร

เพิ่ม Additional Save Data

ทำงานยังไง

เรียกต่อ: getPos(), putInt(), getX(), getY(), getZ().

Parameters

  • CompoundTag compoundTag

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

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

net.minecraft.world.entity.decoration.BlockAttachedEntity#BlockAttachedEntity(EntityType<? extends BlockAttachedEntity>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/BlockAttachedEntity.java:26
  • Modifiers: protected
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • EntityType<? extends BlockAttachedEntity> entityType
  • Level level

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

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

net.minecraft.world.entity.decoration.BlockAttachedEntity#BlockAttachedEntity(EntityType<? extends BlockAttachedEntity>,Level,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/BlockAttachedEntity.java:30
  • Modifiers: protected
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: pos.

Parameters

  • EntityType<? extends BlockAttachedEntity> entityType
  • Level level
  • BlockPos blockPos

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

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

net.minecraft.world.entity.decoration.BlockAttachedEntity#dropItem(ServerLevel,Entity)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/BlockAttachedEntity.java:130
  • Modifiers: public abstract
  • Return: void

คืออะไร

ดำเนินการ dropItem ตาม implementation ของ BlockAttachedEntity

ทำงานยังไง

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

Parameters

  • ServerLevel serverLevel
  • Entity entity

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

BlockAttachedEntity instance = ...;
ServerLevel serverLevel = ...;
Entity entity = ...;
instance.dropItem(serverLevel, entity);

net.minecraft.world.entity.decoration.BlockAttachedEntity#getPos()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/BlockAttachedEntity.java:144
  • Modifiers: public
  • Return: BlockPos

คืออะไร

อ่านค่า Pos

ทำงานยังไง

คืนค่า: this.pos.

Parameters

  • ไม่มี

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

BlockAttachedEntity instance = ...;
BlockPos result = instance.getPos();

net.minecraft.world.entity.decoration.BlockAttachedEntity#hurtClient(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/BlockAttachedEntity.java:67
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • DamageSource damageSource

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

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

net.minecraft.world.entity.decoration.BlockAttachedEntity#hurtServer(ServerLevel,DamageSource,float)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/BlockAttachedEntity.java:72
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isInvulnerableToBase(), getGameRules(), getBoolean(), getEntity(), isRemoved(), kill(), markHurt(), dropItem(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • ServerLevel serverLevel
  • DamageSource damageSource
  • float f

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

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

net.minecraft.world.entity.decoration.BlockAttachedEntity#ignoreExplosion(Explosion)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/BlockAttachedEntity.java:91
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ ignoreExplosion ตาม implementation ของ BlockAttachedEntity

ทำงานยังไง

เรียกต่อ: shouldAffectBlocklikeEntities(). คืนค่า: explosion.shouldAffectBlocklikeEntities() ? super.ignoreExplosion(explosion) : true.

Parameters

  • Explosion explosion

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

BlockAttachedEntity instance = ...;
Explosion explosion = ...;
boolean result = instance.ignoreExplosion(explosion);

net.minecraft.world.entity.decoration.BlockAttachedEntity#isPickable()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/BlockAttachedEntity.java:53
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.decoration.BlockAttachedEntity#move(MoverType,Vec3)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/BlockAttachedEntity.java:96
  • Modifiers: public
  • Return: void

คืออะไร

เคลื่อนที่ move

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: level(), isRemoved(), lengthSqr(), kill(), dropItem().

Parameters

  • MoverType moverType
  • Vec3 vec3

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

BlockAttachedEntity instance = ...;
MoverType moverType = ...;
Vec3 vec3 = ...;
instance.move(moverType, vec3);

net.minecraft.world.entity.decoration.BlockAttachedEntity#push(double,double,double)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/BlockAttachedEntity.java:104
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ push ตาม implementation ของ BlockAttachedEntity

ทำงานยังไง

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

Parameters

  • double d
  • double e
  • double f

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

BlockAttachedEntity instance = ...;
instance.push(0.0D, 0.0D, 0.0D);

net.minecraft.world.entity.decoration.BlockAttachedEntity#readAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/BlockAttachedEntity.java:120
  • Modifiers: public
  • Return: void

คืออะไร

อ่าน Additional Save Data

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: pos. เรียกต่อ: getInt(), closerThan(), blockPosition(), error(). สร้างออบเจ็กต์: BlockPos.

Parameters

  • CompoundTag compoundTag

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

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

net.minecraft.world.entity.decoration.BlockAttachedEntity#recalculateBoundingBox()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/BlockAttachedEntity.java:35
  • Modifiers: protected abstract
  • Return: void

คืออะไร

ดำเนินการ recalculateBoundingBox ตาม implementation ของ BlockAttachedEntity

ทำงานยังไง

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

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.decoration.BlockAttachedEntity#refreshDimensions()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/BlockAttachedEntity.java:152
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ refreshDimensions ตาม implementation ของ BlockAttachedEntity

ทำงานยังไง

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

Parameters

  • ไม่มี

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

BlockAttachedEntity instance = ...;
instance.refreshDimensions();

net.minecraft.world.entity.decoration.BlockAttachedEntity#repositionEntityAfterLoad()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/BlockAttachedEntity.java:132
  • Modifiers: protected
  • Return: boolean

คืออะไร

ดำเนินการ repositionEntityAfterLoad ตาม implementation ของ BlockAttachedEntity

ทำงานยังไง

คืนค่า: false.

Parameters

  • ไม่มี

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

@Override
protected boolean repositionEntityAfterLoad() {
    return super.repositionEntityAfterLoad();
}

net.minecraft.world.entity.decoration.BlockAttachedEntity#setPos(double,double,double)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/BlockAttachedEntity.java:137
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Pos

ทำงานยังไง

แก้ state: pos, hasImpulse. เรียกต่อ: containing(), recalculateBoundingBox().

Parameters

  • double d
  • double e
  • double f

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

BlockAttachedEntity instance = ...;
instance.setPos(0.0D, 0.0D, 0.0D);

net.minecraft.world.entity.decoration.BlockAttachedEntity#skipAttackInteraction(Entity)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/BlockAttachedEntity.java:58
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ skipAttackInteraction ตาม implementation ของ BlockAttachedEntity

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: level(), mayInteract(), hurtOrSimulate(), damageSources(), playerAttack(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • Entity entity

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

BlockAttachedEntity instance = ...;
Entity entity = ...;
boolean result = instance.skipAttackInteraction(entity);

net.minecraft.world.entity.decoration.BlockAttachedEntity#survives()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/BlockAttachedEntity.java:51
  • Modifiers: public abstract
  • Return: boolean

คืออะไร

ดำเนินการ survives ตาม implementation ของ BlockAttachedEntity

ทำงานยังไง

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

Parameters

  • ไม่มี

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

BlockAttachedEntity instance = ...;
boolean result = instance.survives();

net.minecraft.world.entity.decoration.BlockAttachedEntity#thunderHit(ServerLevel,LightningBolt)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/BlockAttachedEntity.java:148
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ thunderHit ตาม implementation ของ BlockAttachedEntity

ทำงานยังไง

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

Parameters

  • ServerLevel serverLevel
  • LightningBolt lightningBolt

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

BlockAttachedEntity instance = ...;
ServerLevel serverLevel = ...;
LightningBolt lightningBolt = ...;
instance.thunderHit(serverLevel, lightningBolt);

net.minecraft.world.entity.decoration.BlockAttachedEntity#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/BlockAttachedEntity.java:37
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: checkInterval. เรียกต่อ: level(), checkBelowWorld(), isRemoved(), survives(), discard(), dropItem().

Parameters

  • ไม่มี

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

BlockAttachedEntity instance = ...;
instance.tick();

GlowItemFrame

  • Full name: net.minecraft.world.entity.decoration.GlowItemFrame
  • Package: net.minecraft.world.entity.decoration
  • Source: commonnet/minecraft/world/entity/decoration/GlowItemFrame.java
  • Type: class
  • Modifiers: public
  • Extends: ItemFrame

net.minecraft.world.entity.decoration.GlowItemFrame#getAddItemSound()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/GlowItemFrame.java:36
  • Modifiers: public
  • Return: SoundEvent

คืออะไร

อ่านค่า Add Item Sound

ทำงานยังไง

คืนค่า: SoundEvents.GLOW_ITEM_FRAME_ADD_ITEM.

Parameters

  • ไม่มี

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

GlowItemFrame instance = ...;
SoundEvent result = instance.getAddItemSound();

net.minecraft.world.entity.decoration.GlowItemFrame#getBreakSound()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/GlowItemFrame.java:26
  • Modifiers: public
  • Return: SoundEvent

คืออะไร

อ่านค่า Break Sound

ทำงานยังไง

คืนค่า: SoundEvents.GLOW_ITEM_FRAME_BREAK.

Parameters

  • ไม่มี

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

GlowItemFrame instance = ...;
SoundEvent result = instance.getBreakSound();

net.minecraft.world.entity.decoration.GlowItemFrame#getFrameItemStack()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/GlowItemFrame.java:46
  • Modifiers: protected
  • Return: ItemStack

คืออะไร

อ่านค่า Frame Item Stack

ทำงานยังไง

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

Parameters

  • ไม่มี

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

@Override
protected ItemStack getFrameItemStack() {
    return super.getFrameItemStack();
}

net.minecraft.world.entity.decoration.GlowItemFrame#getPlaceSound()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/GlowItemFrame.java:31
  • Modifiers: public
  • Return: SoundEvent

คืออะไร

อ่านค่า Place Sound

ทำงานยังไง

คืนค่า: SoundEvents.GLOW_ITEM_FRAME_PLACE.

Parameters

  • ไม่มี

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

GlowItemFrame instance = ...;
SoundEvent result = instance.getPlaceSound();

net.minecraft.world.entity.decoration.GlowItemFrame#getRemoveItemSound()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/GlowItemFrame.java:21
  • Modifiers: public
  • Return: SoundEvent

คืออะไร

อ่านค่า Remove Item Sound

ทำงานยังไง

คืนค่า: SoundEvents.GLOW_ITEM_FRAME_REMOVE_ITEM.

Parameters

  • ไม่มี

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

GlowItemFrame instance = ...;
SoundEvent result = instance.getRemoveItemSound();

net.minecraft.world.entity.decoration.GlowItemFrame#getRotateItemSound()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/GlowItemFrame.java:41
  • Modifiers: public
  • Return: SoundEvent

คืออะไร

อ่านค่า Rotate Item Sound

ทำงานยังไง

คืนค่า: SoundEvents.GLOW_ITEM_FRAME_ROTATE_ITEM.

Parameters

  • ไม่มี

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

GlowItemFrame instance = ...;
SoundEvent result = instance.getRotateItemSound();

net.minecraft.world.entity.decoration.GlowItemFrame#GlowItemFrame(EntityType<? extends ItemFrame>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/GlowItemFrame.java:13
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • EntityType<? extends ItemFrame> entityType
  • Level level

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

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

net.minecraft.world.entity.decoration.GlowItemFrame#GlowItemFrame(Level,BlockPos,Direction)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/GlowItemFrame.java:17
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • Level level
  • BlockPos blockPos
  • Direction direction

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

Level level = ...;
BlockPos blockPos = ...;
Direction direction = ...;
GlowItemFrame instance = new GlowItemFrame(level, blockPos, direction);

HangingEntity

  • Full name: net.minecraft.world.entity.decoration.HangingEntity
  • Package: net.minecraft.world.entity.decoration
  • Source: commonnet/minecraft/world/entity/decoration/HangingEntity.java
  • Type: class
  • Modifiers: public abstract
  • Extends: BlockAttachedEntity

net.minecraft.world.entity.decoration.HangingEntity#calculateBoundingBox(BlockPos,Direction)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/HangingEntity.java:54
  • Modifiers: protected abstract
  • Return: AABB

คืออะไร

คำนวณ Bounding Box

ทำงานยังไง

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

Parameters

  • BlockPos blockPos
  • Direction direction

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

BlockPos blockPos = ...;
Direction direction = ...;
@Override
protected AABB calculateBoundingBox(BlockPos blockPos, Direction direction) {
    return super.calculateBoundingBox(blockPos, direction);
}

net.minecraft.world.entity.decoration.HangingEntity#calculateSupportBox()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/HangingEntity.java:69
  • Modifiers: protected
  • Return: AABB

คืออะไร

คำนวณ Support Box

ทำงานยังไง

เรียกต่อ: getBoundingBox(), move(), step(), mul(), deflate(). คืนค่า: this.getBoundingBox().move(this.direction.step().mul(-0.5F)).deflate(1.0E-7).

Parameters

  • ไม่มี

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

@Override
protected AABB calculateSupportBox() {
    return super.calculateSupportBox();
}

net.minecraft.world.entity.decoration.HangingEntity#getDirection()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/HangingEntity.java:73
  • Modifiers: public
  • Return: Direction

คืออะไร

อ่านค่า Direction

ทำงานยังไง

คืนค่า: this.direction.

Parameters

  • ไม่มี

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

HangingEntity instance = ...;
Direction result = instance.getDirection();

net.minecraft.world.entity.decoration.HangingEntity#HangingEntity(EntityType<? extends HangingEntity>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/HangingEntity.java:26
  • Modifiers: protected
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • EntityType<? extends HangingEntity> entityType
  • Level level

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

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

net.minecraft.world.entity.decoration.HangingEntity#HangingEntity(EntityType<? extends HangingEntity>,Level,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/HangingEntity.java:30
  • Modifiers: protected
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: pos.

Parameters

  • EntityType<? extends HangingEntity> entityType
  • Level level
  • BlockPos blockPos

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

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

net.minecraft.world.entity.decoration.HangingEntity#mirror(Mirror)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/HangingEntity.java:115
  • Modifiers: public
  • Return: float

คืออะไร

ดำเนินการ mirror ตาม implementation ของ HangingEntity

ทำงานยังไง

เรียกต่อ: rotate(), getRotation(). คืนค่า: this.rotate(mirror.getRotation(this.direction)).

Parameters

  • Mirror mirror

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

HangingEntity instance = ...;
Mirror mirror = ...;
float result = instance.mirror(mirror);

net.minecraft.world.entity.decoration.HangingEntity#playPlacementSound()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/HangingEntity.java:78
  • Modifiers: public abstract
  • Return: void

คืออะไร

ดำเนินการ playPlacementSound ตาม implementation ของ HangingEntity

ทำงานยังไง

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

Parameters

  • ไม่มี

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

HangingEntity instance = ...;
instance.playPlacementSound();

net.minecraft.world.entity.decoration.HangingEntity#recalculateBoundingBox()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/HangingEntity.java:44
  • Modifiers: protected final
  • Return: void

คืออะไร

ดำเนินการ recalculateBoundingBox ตาม implementation ของ HangingEntity

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: calculateBoundingBox(), getCenter(), setPosRaw(), setBoundingBox().

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.decoration.HangingEntity#rotate(Rotation)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/HangingEntity.java:90
  • Modifiers: public
  • Return: float

คืออะไร

หมุน rotate

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; แยกกรณีด้วย switch. แก้ state: direction. เรียกต่อ: getAxis(), getOpposite(), getCounterClockWise(), getClockWise(), wrapDegrees(), getYRot(). คืนค่า: switch (rotation) { case CLOCKWISE_180 -> f + 180.0F.

Parameters

  • Rotation rotation

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

HangingEntity instance = ...;
Rotation rotation = ...;
float result = instance.rotate(rotation);

net.minecraft.world.entity.decoration.HangingEntity#setDirection(Direction)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/HangingEntity.java:35
  • Modifiers: protected
  • Return: void

คืออะไร

กำหนดค่า Direction

ทำงานยังไง

แก้ state: direction, yRotO. เรียกต่อ: requireNonNull(), isTrue(), getAxis(), isHorizontal(), setYRot(), get2DDataValue(), getYRot(), recalculateBoundingBox().

Parameters

  • Direction direction

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

Direction direction = ...;
@Override
protected void setDirection(Direction direction) {
    super.setDirection(direction);
}

net.minecraft.world.entity.decoration.HangingEntity#spawnAtLocation(ServerLevel,ItemStack,float)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/HangingEntity.java:80
  • Modifiers: public
  • Return: ItemEntity

คืออะไร

สร้าง entity ในโลก At Location

ทำงานยังไง

เรียกต่อ: level(), getX(), getStepX(), getY(), getZ(), getStepZ(), setDefaultPickUpDelay(), addFreshEntity(). สร้างออบเจ็กต์: ItemEntity. คืนค่า: itemEntity.

Parameters

  • ServerLevel serverLevel
  • ItemStack itemStack
  • float f

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

HangingEntity instance = ...;
ServerLevel serverLevel = ...;
ItemStack itemStack = ...;
ItemEntity result = instance.spawnAtLocation(serverLevel, itemStack, 0.0F);

net.minecraft.world.entity.decoration.HangingEntity#survives()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/HangingEntity.java:56
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ survives ตาม implementation ของ HangingEntity

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: level(), noCollision(), betweenClosedStream(), calculateSupportBox(), allMatch(), getBlockState(), isSolid(), isDiode(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • ไม่มี

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

HangingEntity instance = ...;
boolean result = instance.survives();

ItemFrame

  • Full name: net.minecraft.world.entity.decoration.ItemFrame
  • Package: net.minecraft.world.entity.decoration
  • Source: commonnet/minecraft/world/entity/decoration/ItemFrame.java
  • Type: class
  • Modifiers: public
  • Extends: HangingEntity

net.minecraft.world.entity.decoration.ItemFrame#addAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:308
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Additional Save Data

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getItem(), isEmpty(), put(), save(), registryAccess(), putByte(), getRotation(), putFloat().

Parameters

  • CompoundTag compoundTag

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

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

net.minecraft.world.entity.decoration.ItemFrame#calculateBoundingBox(BlockPos,Direction)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:89
  • Modifiers: protected
  • Return: AABB

คืออะไร

คำนวณ Bounding Box

ทำงานยังไง

เรียกต่อ: atCenterOf(), relative(), getAxis(), ofSize(). คืนค่า: AABB.ofSize(vec3, d, e, g).

Parameters

  • BlockPos blockPos
  • Direction direction

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

BlockPos blockPos = ...;
Direction direction = ...;
@Override
protected AABB calculateBoundingBox(BlockPos blockPos, Direction direction) {
    return super.calculateBoundingBox(blockPos, direction);
}

net.minecraft.world.entity.decoration.ItemFrame#defineSynchedData(SynchedEntityData.Builder)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:66
  • Modifiers: protected
  • Return: void

คืออะไร

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

ทำงานยังไง

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

Parameters

  • SynchedEntityData.Builder builder

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

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

net.minecraft.world.entity.decoration.ItemFrame#dropItem(ServerLevel,Entity)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:178
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ dropItem ตาม implementation ของ ItemFrame

ทำงานยังไง

เรียกต่อ: playSound(), getBreakSound(), gameEvent().

Parameters

  • ServerLevel serverLevel
  • Entity entity

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

ItemFrame instance = ...;
ServerLevel serverLevel = ...;
Entity entity = ...;
instance.dropItem(serverLevel, entity);

net.minecraft.world.entity.decoration.ItemFrame#getAddEntityPacket(ServerEntity)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:394
  • Modifiers: public
  • Return: Packet<ClientGamePacketListener>

คืออะไร

อ่านค่า Add Entity Packet

ทำงานยังไง

เรียกต่อ: get3DDataValue(), getPos(). สร้างออบเจ็กต์: ClientboundAddEntityPacket. คืนค่า: new ClientboundAddEntityPacket(this, this.direction.get3DDataValue(), this.getPos()).

Parameters

  • ServerEntity serverEntity

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

ItemFrame instance = ...;
ServerEntity serverEntity = ...;
Packet<ClientGamePacketListener> result = instance.getAddEntityPacket(serverEntity);

net.minecraft.world.entity.decoration.ItemFrame#getAddItemSound()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:269
  • Modifiers: public
  • Return: SoundEvent

คืออะไร

อ่านค่า Add Item Sound

ทำงานยังไง

คืนค่า: SoundEvents.ITEM_FRAME_ADD_ITEM.

Parameters

  • ไม่มี

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

ItemFrame instance = ...;
SoundEvent result = instance.getAddItemSound();

net.minecraft.world.entity.decoration.ItemFrame#getAnalogOutput()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:390
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Analog Output

ทำงานยังไง

เรียกต่อ: getItem(), isEmpty(), getRotation(). คืนค่า: this.getItem().isEmpty() ? 0 : this.getRotation() % 8 + 1.

Parameters

  • ไม่มี

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

ItemFrame instance = ...;
int result = instance.getAnalogOutput();

net.minecraft.world.entity.decoration.ItemFrame#getBreakSound()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:185
  • Modifiers: public
  • Return: SoundEvent

คืออะไร

อ่านค่า Break Sound

ทำงานยังไง

คืนค่า: SoundEvents.ITEM_FRAME_BREAK.

Parameters

  • ไม่มี

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

ItemFrame instance = ...;
SoundEvent result = instance.getBreakSound();

net.minecraft.world.entity.decoration.ItemFrame#getFramedMapId(ItemStack)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:240
  • Modifiers: public
  • Return: MapId

คืออะไร

อ่านค่า Framed Map Id

ทำงานยังไง

เรียกต่อ: get(). คืนค่า: itemStack.get(DataComponents.MAP_ID).

Parameters

  • ItemStack itemStack

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

ItemFrame instance = ...;
ItemStack itemStack = ...;
MapId result = instance.getFramedMapId(itemStack);

net.minecraft.world.entity.decoration.ItemFrame#getFrameItemStack()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:411
  • Modifiers: protected
  • Return: ItemStack

คืออะไร

อ่านค่า Frame Item Stack

ทำงานยังไง

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

Parameters

  • ไม่มี

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

@Override
protected ItemStack getFrameItemStack() {
    return super.getFrameItemStack();
}

net.minecraft.world.entity.decoration.ItemFrame#getItem()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:236
  • Modifiers: public
  • Return: ItemStack

คืออะไร

อ่านค่า Item

ทำงานยังไง

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

Parameters

  • ไม่มี

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

ItemFrame instance = ...;
ItemStack result = instance.getItem();

net.minecraft.world.entity.decoration.ItemFrame#getPickResult()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:405
  • Modifiers: public
  • Return: ItemStack

คืออะไร

อ่านค่า Pick Result

ทำงานยังไง

เรียกต่อ: getItem(), isEmpty(), getFrameItemStack(), copy(). คืนค่า: itemStack.isEmpty() ? this.getFrameItemStack() : itemStack.copy().

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.decoration.ItemFrame#getPlaceSound()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:194
  • Modifiers: public
  • Return: SoundEvent

คืออะไร

อ่านค่า Place Sound

ทำงานยังไง

คืนค่า: SoundEvents.ITEM_FRAME_PLACE.

Parameters

  • ไม่มี

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

ItemFrame instance = ...;
SoundEvent result = instance.getPlaceSound();

net.minecraft.world.entity.decoration.ItemFrame#getRemoveItemSound()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:167
  • Modifiers: public
  • Return: SoundEvent

คืออะไร

อ่านค่า Remove Item Sound

ทำงานยังไง

คืนค่า: SoundEvents.ITEM_FRAME_REMOVE_ITEM.

Parameters

  • ไม่มี

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

ItemFrame instance = ...;
SoundEvent result = instance.getRemoveItemSound();

net.minecraft.world.entity.decoration.ItemFrame#getRotateItemSound()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:386
  • Modifiers: public
  • Return: SoundEvent

คืออะไร

อ่านค่า Rotate Item Sound

ทำงานยังไง

คืนค่า: SoundEvents.ITEM_FRAME_ROTATE_ITEM.

Parameters

  • ไม่มี

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

ItemFrame instance = ...;
SoundEvent result = instance.getRotateItemSound();

net.minecraft.world.entity.decoration.ItemFrame#getRotation()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:293
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Rotation

ทำงานยังไง

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

Parameters

  • ไม่มี

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

ItemFrame instance = ...;
int result = instance.getRotation();

net.minecraft.world.entity.decoration.ItemFrame#getSlot(int)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:273
  • Modifiers: public
  • Return: SlotAccess

คืออะไร

อ่านค่า Slot

ทำงานยังไง

เรียกต่อ: of(). คืนค่า: i == 0 ? SlotAccess.of(this::getItem, this::setItem) : super.getSlot(i).

Parameters

  • int i

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

ItemFrame instance = ...;
SlotAccess result = instance.getSlot(0);

net.minecraft.world.entity.decoration.ItemFrame#getVisualRotationYInDegrees()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:415
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Visual Rotation YIn Degrees

ทำงานยังไง

เรียกต่อ: getDirection(), getAxis(), isVertical(), getAxisDirection(), getStep(), wrapDegrees(), get2DDataValue(), getRotation(). คืนค่า: Mth.wrapDegrees(180 + direction.get2DDataValue() * 90 + this.getRotation() * 45 + i).

Parameters

  • ไม่มี

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

ItemFrame instance = ...;
float result = instance.getVisualRotationYInDegrees();

net.minecraft.world.entity.decoration.ItemFrame#hasFramedMap()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:245
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Framed Map

ทำงานยังไง

เรียกต่อ: getItem(), has(). คืนค่า: this.getItem().has(DataComponents.MAP_ID).

Parameters

  • ไม่มี

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

ItemFrame instance = ...;
boolean result = instance.hasFramedMap();

net.minecraft.world.entity.decoration.ItemFrame#hurtClient(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:144
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: canHurtWhenFixed(), isInvulnerableToBase(). คืนค่า: this.fixed && !canHurtWhenFixed(damageSource) ? false : !this.isInvulnerableToBase(damageSource).

Parameters

  • DamageSource damageSource

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

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

net.minecraft.world.entity.decoration.ItemFrame#hurtServer(ServerLevel,DamageSource,float)

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

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isInvulnerableToBase(), shouldDamageDropItem(), dropItem(), getEntity(), gameEvent(), playSound(), getRemoveItemSound(), canHurtWhenFixed(). มีจุด return อย่างน้อย 4 จุด.

Parameters

  • ServerLevel serverLevel
  • DamageSource damageSource
  • float f

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

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

net.minecraft.world.entity.decoration.ItemFrame#interact(Player,InteractionHand)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:351
  • Modifiers: public
  • Return: InteractionResult

คืออะไร

จัดการ interaction interact

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getItemInHand(), getItem(), isEmpty(), level(), isRemoved(), getSavedData(), isTrackedCountOverLimit(), setItem(). มีจุด return อย่างน้อย 6 จุด.

Parameters

  • Player player
  • InteractionHand interactionHand

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

ItemFrame instance = ...;
Player player = ...;
InteractionHand interactionHand = ...;
InteractionResult result = instance.interact(player, interactionHand);

net.minecraft.world.entity.decoration.ItemFrame#ItemFrame(EntityType<? extends ItemFrame>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:53
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • EntityType<? extends ItemFrame> entityType
  • Level level

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

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

net.minecraft.world.entity.decoration.ItemFrame#ItemFrame(EntityType<? extends ItemFrame>,Level,BlockPos,Direction)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:61
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • EntityType<? extends ItemFrame> entityType
  • Level level
  • BlockPos blockPos
  • Direction direction

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

EntityType<? extends ItemFrame> entityType = ...;
Level level = ...;
BlockPos blockPos = ...;
Direction direction = ...;
ItemFrame instance = new ItemFrame(entityType, level, blockPos, direction);

net.minecraft.world.entity.decoration.ItemFrame#ItemFrame(Level,BlockPos,Direction)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:57
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • Level level
  • BlockPos blockPos
  • Direction direction

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

Level level = ...;
BlockPos blockPos = ...;
Direction direction = ...;
ItemFrame instance = new ItemFrame(level, blockPos, direction);

net.minecraft.world.entity.decoration.ItemFrame#kill(ServerLevel)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:130
  • Modifiers: public
  • Return: void

คืออะไร

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

ทำงานยังไง

เรียกต่อ: removeFramedMap(), getItem().

Parameters

  • ServerLevel serverLevel

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

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

net.minecraft.world.entity.decoration.ItemFrame#move(MoverType,Vec3)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:116
  • Modifiers: public
  • Return: void

คืออะไร

เคลื่อนที่ move

ทำงานยังไง

ตรวจเงื่อนไขด้วย if.

Parameters

  • MoverType moverType
  • Vec3 vec3

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

ItemFrame instance = ...;
MoverType moverType = ...;
Vec3 vec3 = ...;
instance.move(moverType, vec3);

net.minecraft.world.entity.decoration.ItemFrame#onSyncedDataUpdated(EntityDataAccessor<?>)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:278
  • Modifiers: public
  • Return: void

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: equals(), onItemChanged(), getItem().

Parameters

  • EntityDataAccessor<?> entityDataAccessor

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

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

net.minecraft.world.entity.decoration.ItemFrame#playPlacementSound()

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

คืออะไร

ดำเนินการ playPlacementSound ตาม implementation ของ ItemFrame

ทำงานยังไง

เรียกต่อ: playSound(), getPlaceSound().

Parameters

  • ไม่มี

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

ItemFrame instance = ...;
instance.playPlacementSound();

net.minecraft.world.entity.decoration.ItemFrame#push(double,double,double)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:123
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ push ตาม implementation ของ ItemFrame

ทำงานยังไง

ตรวจเงื่อนไขด้วย if.

Parameters

  • double d
  • double e
  • double f

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

ItemFrame instance = ...;
instance.push(0.0D, 0.0D, 0.0D);

net.minecraft.world.entity.decoration.ItemFrame#readAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:322
  • Modifiers: public
  • Return: void

คืออะไร

อ่าน Additional Save Data

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: dropChance, fixed. เรียกต่อ: contains(), getCompound(), parse(), registryAccess(), orElse(), getItem(), isEmpty(), matches().

Parameters

  • CompoundTag compoundTag

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

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

net.minecraft.world.entity.decoration.ItemFrame#recreateFromPacket(ClientboundAddEntityPacket)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:399
  • Modifiers: public
  • Return: void

คืออะไร

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

ทำงานยังไง

เรียกต่อ: setDirection(), from3DDataValue(), getData().

Parameters

  • ClientboundAddEntityPacket clientboundAddEntityPacket

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

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

net.minecraft.world.entity.decoration.ItemFrame#setDirection(Direction)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:72
  • Modifiers: protected
  • Return: void

คืออะไร

กำหนดค่า Direction

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: direction, xRotO, yRotO. เรียกต่อ: notNull(), getAxis(), isHorizontal(), setXRot(), setYRot(), get2DDataValue(), getAxisDirection(), getStep().

Parameters

  • Direction direction

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

Direction direction = ...;
@Override
protected void setDirection(Direction direction) {
    super.setDirection(direction);
}

net.minecraft.world.entity.decoration.ItemFrame#setItem(ItemStack)

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

คืออะไร

กำหนดค่า Item

ทำงานยังไง

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

Parameters

  • ItemStack itemStack

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

ItemFrame instance = ...;
ItemStack itemStack = ...;
instance.setItem(itemStack);

net.minecraft.world.entity.decoration.ItemFrame#setItem(ItemStack,boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:253
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Item

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isEmpty(), copyWithCount(), onItemChanged(), getEntityData(), set(), playSound(), getAddItemSound(), level().

Parameters

  • ItemStack itemStack
  • boolean bl

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

ItemFrame instance = ...;
ItemStack itemStack = ...;
instance.setItem(itemStack, true);

net.minecraft.world.entity.decoration.ItemFrame#setRotation(int)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:297
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Rotation

ทำงานยังไง

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

Parameters

  • int i

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

ItemFrame instance = ...;
instance.setRotation(0);

net.minecraft.world.entity.decoration.ItemFrame#shouldRenderAtSqrDistance(double)

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

คืออะไร

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

ทำงานยังไง

เรียกต่อ: getViewScale(). คืนค่า: d < e * e.

Parameters

  • double d

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

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

net.minecraft.world.entity.decoration.ItemFrame#survives()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/ItemFrame.java:100
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ survives ตาม implementation ของ ItemFrame

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: level(), noCollision(), getBlockState(), relative(), getOpposite(), isSolid(), getAxis(), isHorizontal(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

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

ItemFrame instance = ...;
boolean result = instance.survives();

LeashFenceKnotEntity

  • Full name: net.minecraft.world.entity.decoration.LeashFenceKnotEntity
  • Package: net.minecraft.world.entity.decoration
  • Source: commonnet/minecraft/world/entity/decoration/LeashFenceKnotEntity.java
  • Type: class
  • Modifiers: public
  • Extends: BlockAttachedEntity

net.minecraft.world.entity.decoration.LeashFenceKnotEntity#addAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java:63
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Additional Save Data

ทำงานยังไง

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

Parameters

  • CompoundTag compoundTag

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

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

net.minecraft.world.entity.decoration.LeashFenceKnotEntity#defineSynchedData(SynchedEntityData.Builder)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java:41
  • Modifiers: protected
  • Return: void

คืออะไร

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

ทำงานยังไง

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

Parameters

  • SynchedEntityData.Builder builder

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

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

net.minecraft.world.entity.decoration.LeashFenceKnotEntity#dropItem(ServerLevel,Entity)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java:58
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ dropItem ตาม implementation ของ LeashFenceKnotEntity

ทำงานยังไง

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

Parameters

  • ServerLevel serverLevel
  • Entity entity

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

LeashFenceKnotEntity instance = ...;
ServerLevel serverLevel = ...;
Entity entity = ...;
instance.dropItem(serverLevel, entity);

net.minecraft.world.entity.decoration.LeashFenceKnotEntity#getAddEntityPacket(ServerEntity)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java:137
  • Modifiers: public
  • Return: Packet<ClientGamePacketListener>

คืออะไร

อ่านค่า Add Entity Packet

ทำงานยังไง

เรียกต่อ: getPos(). สร้างออบเจ็กต์: ClientboundAddEntityPacket. คืนค่า: new ClientboundAddEntityPacket(this, 0, this.getPos()).

Parameters

  • ServerEntity serverEntity

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

LeashFenceKnotEntity instance = ...;
ServerEntity serverEntity = ...;
Packet<ClientGamePacketListener> result = instance.getAddEntityPacket(serverEntity);

net.minecraft.world.entity.decoration.LeashFenceKnotEntity#getOrCreateKnot(Level,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java:115
  • Modifiers: public static
  • Return: LeashFenceKnotEntity

คืออะไร

อ่านค่า Or Create Knot

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getX(), getY(), getZ(), getEntitiesOfClass(), getPos(), equals(), addFreshEntity(). สร้างออบเจ็กต์: AABB, LeashFenceKnotEntity. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • Level level
  • BlockPos blockPos

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

Level level = ...;
BlockPos blockPos = ...;
LeashFenceKnotEntity result = LeashFenceKnotEntity.getOrCreateKnot(level, blockPos);

net.minecraft.world.entity.decoration.LeashFenceKnotEntity#getPickResult()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java:147
  • Modifiers: public
  • Return: ItemStack

คืออะไร

อ่านค่า Pick Result

ทำงานยังไง

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

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.decoration.LeashFenceKnotEntity#getRopeHoldPosition(float)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java:142
  • Modifiers: public
  • Return: Vec3

คืออะไร

อ่านค่า Rope Hold Position

ทำงานยังไง

เรียกต่อ: getPosition(), add(). คืนค่า: this.getPosition(f).add(0.0, 0.2, 0.0).

Parameters

  • float f

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

LeashFenceKnotEntity instance = ...;
Vec3 result = instance.getRopeHoldPosition(0.0F);

net.minecraft.world.entity.decoration.LeashFenceKnotEntity#interact(Player,InteractionHand)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java:71
  • Modifiers: public
  • Return: InteractionResult

คืออะไร

จัดการ interaction interact

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: level(), leashableInArea(), getPos(), getLeashHolder(), setLeashedTo(), discard(), getAbilities(), isLeashed(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • Player player
  • InteractionHand interactionHand

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

LeashFenceKnotEntity instance = ...;
Player player = ...;
InteractionHand interactionHand = ...;
InteractionResult result = instance.interact(player, interactionHand);

net.minecraft.world.entity.decoration.LeashFenceKnotEntity#LeashFenceKnotEntity(EntityType<? extends LeashFenceKnotEntity>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java:32
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • EntityType<? extends LeashFenceKnotEntity> entityType
  • Level level

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

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

net.minecraft.world.entity.decoration.LeashFenceKnotEntity#LeashFenceKnotEntity(Level,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java:36
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

เรียกต่อ: setPos(), getX(), getY(), getZ().

Parameters

  • Level level
  • BlockPos blockPos

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

Level level = ...;
BlockPos blockPos = ...;
LeashFenceKnotEntity instance = new LeashFenceKnotEntity(level, blockPos);

net.minecraft.world.entity.decoration.LeashFenceKnotEntity#playPlacementSound()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java:133
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ playPlacementSound ตาม implementation ของ LeashFenceKnotEntity

ทำงานยังไง

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

Parameters

  • ไม่มี

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

LeashFenceKnotEntity instance = ...;
instance.playPlacementSound();

net.minecraft.world.entity.decoration.LeashFenceKnotEntity#readAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java:67
  • Modifiers: public
  • Return: void

คืออะไร

อ่าน Additional Save Data

ทำงานยังไง

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

Parameters

  • CompoundTag compoundTag

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

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

net.minecraft.world.entity.decoration.LeashFenceKnotEntity#recalculateBoundingBox()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java:45
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ recalculateBoundingBox ตาม implementation ของ LeashFenceKnotEntity

ทำงานยังไง

เรียกต่อ: setPosRaw(), getX(), getY(), getZ(), getType(), getWidth(), getHeight(), setBoundingBox(). สร้างออบเจ็กต์: AABB.

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.decoration.LeashFenceKnotEntity#shouldRenderAtSqrDistance(double)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java:53
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: d < 1024.0.

Parameters

  • double d

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

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

net.minecraft.world.entity.decoration.LeashFenceKnotEntity#survives()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java:110
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ survives ตาม implementation ของ LeashFenceKnotEntity

ทำงานยังไง

เรียกต่อ: level(), getBlockState(), is(). คืนค่า: this.level().getBlockState(this.pos).is(BlockTags.FENCES).

Parameters

  • ไม่มี

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

LeashFenceKnotEntity instance = ...;
boolean result = instance.survives();

Painting

  • Full name: net.minecraft.world.entity.decoration.Painting
  • Package: net.minecraft.world.entity.decoration
  • Source: commonnet/minecraft/world/entity/decoration/Painting.java
  • Type: class
  • Modifiers: public
  • Extends: HangingEntity
  • Implements: VariantHolder<Holder<PaintingVariant>>

net.minecraft.world.entity.decoration.Painting#addAdditionalSaveData(CompoundTag)

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

คืออะไร

เพิ่ม Additional Save Data

ทำงานยังไง

เรียกต่อ: encodeStart(), registryAccess(), createSerializationContext(), getVariant(), ifSuccess(), merge(), putByte(), get2DDataValue().

Parameters

  • CompoundTag compoundTag

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

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

net.minecraft.world.entity.decoration.Painting#calculateBoundingBox(BlockPos,Direction)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/Painting.java:128
  • Modifiers: protected
  • Return: AABB

คืออะไร

คำนวณ Bounding Box

ทำงานยังไง

เรียกต่อ: atCenterOf(), relative(), getVariant(), value(), offsetForPaintingSize(), width(), height(), getCounterClockWise(). คืนค่า: AABB.ofSize(vec32, g, h, i).

Parameters

  • BlockPos blockPos
  • Direction direction

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

BlockPos blockPos = ...;
Direction direction = ...;
@Override
protected AABB calculateBoundingBox(BlockPos blockPos, Direction direction) {
    return super.calculateBoundingBox(blockPos, direction);
}

net.minecraft.world.entity.decoration.Painting#create(Level,BlockPos,Direction)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/Painting.java:69
  • Modifiers: public static
  • Return: Optional<Painting>

คืออะไร

สร้าง create

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: registryAccess(), lookupOrThrow(), getTagOrEmpty(), forEach(), isEmpty(), empty(), setDirection(), removeIf(). สร้างออบเจ็กต์: Painting, ArrayList<>. มีจุด return อย่างน้อย 5 จุด.

Parameters

  • Level level
  • BlockPos blockPos
  • Direction direction

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

Level level = ...;
BlockPos blockPos = ...;
Direction direction = ...;
Optional<Painting> result = Painting.create(level, blockPos, direction);

net.minecraft.world.entity.decoration.Painting#defineSynchedData(SynchedEntityData.Builder)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/Painting.java:49
  • Modifiers: protected
  • Return: void

คืออะไร

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

ทำงานยังไง

เรียกต่อ: define(), registryAccess(), lookupOrThrow(), getAny(), orElseThrow().

Parameters

  • SynchedEntityData.Builder builder

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

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

net.minecraft.world.entity.decoration.Painting#dropItem(ServerLevel,Entity)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/Painting.java:148
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ dropItem ตาม implementation ของ Painting

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getGameRules(), getBoolean(), playSound(), hasInfiniteMaterials(), spawnAtLocation().

Parameters

  • ServerLevel serverLevel
  • Entity entity

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

Painting instance = ...;
ServerLevel serverLevel = ...;
Entity entity = ...;
instance.dropItem(serverLevel, entity);

net.minecraft.world.entity.decoration.Painting#getAddEntityPacket(ServerEntity)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/Painting.java:178
  • Modifiers: public
  • Return: Packet<ClientGamePacketListener>

คืออะไร

อ่านค่า Add Entity Packet

ทำงานยังไง

เรียกต่อ: get3DDataValue(), getPos(). สร้างออบเจ็กต์: ClientboundAddEntityPacket. คืนค่า: new ClientboundAddEntityPacket(this, this.direction.get3DDataValue(), this.getPos()).

Parameters

  • ServerEntity serverEntity

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

Painting instance = ...;
ServerEntity serverEntity = ...;
Packet<ClientGamePacketListener> result = instance.getAddEntityPacket(serverEntity);

net.minecraft.world.entity.decoration.Painting#getPickResult()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/Painting.java:189
  • Modifiers: public
  • Return: ItemStack

คืออะไร

อ่านค่า Pick Result

ทำงานยังไง

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

Parameters

  • ไม่มี

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

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

net.minecraft.world.entity.decoration.Painting#getVariant()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/Painting.java:65
  • Modifiers: public
  • Return: Holder<PaintingVariant>

คืออะไร

อ่านค่า Variant

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Painting instance = ...;
Holder<PaintingVariant> result = instance.getVariant();

net.minecraft.world.entity.decoration.Painting#lerpTo(double,double,double,float,float,int)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/Painting.java:168
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ lerpTo ตาม implementation ของ Painting

ทำงานยังไง

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

Parameters

  • double d
  • double e
  • double f
  • float g
  • float h
  • int i

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

Painting instance = ...;
instance.lerpTo(0.0D, 0.0D, 0.0D, 0.0F, 0.0F, 0);

net.minecraft.world.entity.decoration.Painting#moveTo(double,double,double,float,float)

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

คืออะไร

เคลื่อนที่ To

ทำงานยังไง

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

Parameters

  • double d
  • double e
  • double f
  • float g
  • float h

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

Painting instance = ...;
instance.moveTo(0.0D, 0.0D, 0.0D, 0.0F, 0.0F);

net.minecraft.world.entity.decoration.Painting#onSyncedDataUpdated(EntityDataAccessor<?>)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/Painting.java:54
  • Modifiers: public
  • Return: void

คืออะไร

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

ทำงานยังไง

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

Parameters

  • EntityDataAccessor<?> entityDataAccessor

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

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

net.minecraft.world.entity.decoration.Painting#Painting(EntityType<? extends Painting>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/Painting.java:45
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • EntityType<? extends Painting> entityType
  • Level level

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

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

net.minecraft.world.entity.decoration.Painting#Painting(Level,BlockPos,Direction,Holder<PaintingVariant>)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/Painting.java:106
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

เรียกต่อ: setVariant(), setDirection().

Parameters

  • Level level
  • BlockPos blockPos
  • Direction direction
  • Holder<PaintingVariant> holder

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

Level level = ...;
BlockPos blockPos = ...;
Direction direction = ...;
Holder<PaintingVariant> holder = ...;
Painting instance = new Painting(level, blockPos, direction, holder);

net.minecraft.world.entity.decoration.Painting#playPlacementSound()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/Painting.java:158
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ playPlacementSound ตาม implementation ของ Painting

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Painting instance = ...;
instance.playPlacementSound();

net.minecraft.world.entity.decoration.Painting#readAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/Painting.java:120
  • Modifiers: public
  • Return: void

คืออะไร

อ่าน Additional Save Data

ทำงานยังไง

แก้ state: direction. เรียกต่อ: parse(), registryAccess(), createSerializationContext(), ifSuccess(), from2DDataValue(), getByte(), setDirection().

Parameters

  • CompoundTag compoundTag

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

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

net.minecraft.world.entity.decoration.Painting#recreateFromPacket(ClientboundAddEntityPacket)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/Painting.java:183
  • Modifiers: public
  • Return: void

คืออะไร

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

ทำงานยังไง

เรียกต่อ: setDirection(), from3DDataValue(), getData().

Parameters

  • ClientboundAddEntityPacket clientboundAddEntityPacket

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

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

net.minecraft.world.entity.decoration.Painting#setVariant(Holder<PaintingVariant>)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/Painting.java:61
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Variant

ทำงานยังไง

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

Parameters

  • Holder<PaintingVariant> holder

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

Painting instance = ...;
Holder<PaintingVariant> holder = ...;
instance.setVariant(holder);

net.minecraft.world.entity.decoration.Painting#trackingPosition()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/Painting.java:173
  • Modifiers: public
  • Return: Vec3

คืออะไร

ดำเนินการ trackingPosition ตาม implementation ของ Painting

ทำงานยังไง

เรียกต่อ: atLowerCornerOf(). คืนค่า: Vec3.atLowerCornerOf(this.pos).

Parameters

  • ไม่มี

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

Painting instance = ...;
Vec3 result = instance.trackingPosition();

PaintingVariant

  • Full name: net.minecraft.world.entity.decoration.PaintingVariant
  • Package: net.minecraft.world.entity.decoration
  • Source: commonnet/minecraft/world/entity/decoration/PaintingVariant.java
  • Type: record
  • Modifiers: public

net.minecraft.world.entity.decoration.PaintingVariant#area()

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/PaintingVariant.java:46
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ area ตาม implementation ของ PaintingVariant

ทำงานยังไง

เรียกต่อ: width(), height(). คืนค่า: this.width() * this.height().

Parameters

  • ไม่มี

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

PaintingVariant instance = ...;
int result = instance.area();

PaintingVariants

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

net.minecraft.world.entity.decoration.PaintingVariants#bootstrap(BootstrapContext<PaintingVariant>)

  • Origin: common
  • Source: net/minecraft/world/entity/decoration/PaintingVariants.java:63
  • Modifiers: public static
  • Return: void

คืออะไร

ดำเนินการ bootstrap ตาม implementation ของ PaintingVariants

ทำงานยังไง

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

Parameters

  • BootstrapContext<PaintingVariant> bootstrapContext

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

BootstrapContext<PaintingVariant> bootstrapContext = ...;
PaintingVariants.bootstrap(bootstrapContext);