Package net.minecraft.world.entity.item
Part 1/1
FallingBlockEntity
- Full name:
net.minecraft.world.entity.item.FallingBlockEntity - Package:
net.minecraft.world.entity.item - Source:
common—net/minecraft/world/entity/item/FallingBlockEntity.java - Type:
class - Modifiers:
public - Extends:
Entity
net.minecraft.world.entity.item.FallingBlockEntity#addAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/item/FallingBlockEntity.java:271 - Modifiers:
protected - Return:
void
คืออะไร
เพิ่ม Additional Save Data
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: put(), writeBlockState(), putInt(), putBoolean(), putFloat().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
CompoundTag compoundTag = ...;
@Override
protected void addAdditionalSaveData(CompoundTag compoundTag) {
super.addAdditionalSaveData(compoundTag);
}
net.minecraft.world.entity.item.FallingBlockEntity#callOnBrokenAfterFall(Block,BlockPos)
- Origin:
common - Source:
net/minecraft/world/entity/item/FallingBlockEntity.java:235 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ callOnBrokenAfterFall ตาม implementation ของ FallingBlockEntity
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: onBrokenAfterFall(), level().
Parameters
Block blockBlockPos blockPos
ตัวอย่างใช้งาน
FallingBlockEntity instance = ...;
Block block = ...;
BlockPos blockPos = ...;
instance.callOnBrokenAfterFall(block, blockPos);
net.minecraft.world.entity.item.FallingBlockEntity#causeFallDamage(float,float,DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/item/FallingBlockEntity.java:241 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ causeFallDamage ตาม implementation ของ FallingBlockEntity
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: cancelDrop, blockState. เรียกต่อ: ceil(), and(), getBlock(), getFallDamageSource(), damageSources(), fallingBlock(), min(), floor(). มีจุด return อย่างน้อย 3 จุด.
Parameters
float ffloat gDamageSource damageSource
ตัวอย่างใช้งาน
FallingBlockEntity instance = ...;
DamageSource damageSource = ...;
boolean result = instance.causeFallDamage(0.0F, 0.0F, damageSource);
net.minecraft.world.entity.item.FallingBlockEntity#defineSynchedData(SynchedEntityData.Builder)
- Origin:
common - Source:
net/minecraft/world/entity/item/FallingBlockEntity.java:122 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ defineSynchedData ตาม implementation ของ FallingBlockEntity
ทำงานยังไง
เรียกต่อ: define().
Parameters
SynchedEntityData.Builder builder
ตัวอย่างใช้งาน
SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder);
}
net.minecraft.world.entity.item.FallingBlockEntity#disableDrop()
- Origin:
common - Source:
net/minecraft/world/entity/item/FallingBlockEntity.java:318 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ disableDrop ตาม implementation ของ FallingBlockEntity
ทำงานยังไง
แก้ state: cancelDrop.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.FallingBlockEntity#displayFireAnimation()
- Origin:
common - Source:
net/minecraft/world/entity/item/FallingBlockEntity.java:322 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ displayFireAnimation ตาม implementation ของ FallingBlockEntity
ทำงานยังไง
คืนค่า: false.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.FallingBlockEntity#fall(Level,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/entity/item/FallingBlockEntity.java:82 - Modifiers:
public static - Return:
FallingBlockEntity
คืออะไร
ดำเนินการ fall ตาม implementation ของ FallingBlockEntity
ทำงานยังไง
เรียกต่อ: getX(), getY(), getZ(), hasProperty(), setValue(), setBlock(), getFluidState(), createLegacyBlock(). สร้างออบเจ็กต์: FallingBlockEntity. คืนค่า: fallingBlockEntity.
Parameters
Level levelBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
FallingBlockEntity result = FallingBlockEntity.fall(level, blockPos, blockState);
net.minecraft.world.entity.item.FallingBlockEntity#FallingBlockEntity(EntityType<? extends FallingBlockEntity>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/item/FallingBlockEntity.java:66 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ FallingBlockEntity ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
EntityType<? extends FallingBlockEntity> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends FallingBlockEntity> entityType = ...;
Level level = ...;
FallingBlockEntity instance = new FallingBlockEntity(entityType, level);
net.minecraft.world.entity.item.FallingBlockEntity#fillCrashReportCategory(CrashReportCategory)
- Origin:
common - Source:
net/minecraft/world/entity/item/FallingBlockEntity.java:327 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ fillCrashReportCategory ตาม implementation ของ FallingBlockEntity
ทำงานยังไง
เรียกต่อ: setDetail(), toString().
Parameters
CrashReportCategory crashReportCategory
ตัวอย่างใช้งาน
FallingBlockEntity instance = ...;
CrashReportCategory crashReportCategory = ...;
instance.fillCrashReportCategory(crashReportCategory);
net.minecraft.world.entity.item.FallingBlockEntity#getAddEntityPacket(ServerEntity)
- Origin:
common - Source:
net/minecraft/world/entity/item/FallingBlockEntity.java:342 - Modifiers:
public - Return:
Packet<ClientGamePacketListener>
คืออะไร
อ่านค่า Add Entity Packet
ทำงานยังไง
เรียกต่อ: getId(), getBlockState(). สร้างออบเจ็กต์: ClientboundAddEntityPacket. คืนค่า: new ClientboundAddEntityPacket(this, serverEntity, Block.getId(this.getBlockState())).
Parameters
ServerEntity serverEntity
ตัวอย่างใช้งาน
FallingBlockEntity instance = ...;
ServerEntity serverEntity = ...;
Packet<ClientGamePacketListener> result = instance.getAddEntityPacket(serverEntity);
net.minecraft.world.entity.item.FallingBlockEntity#getBlockState()
- Origin:
common - Source:
net/minecraft/world/entity/item/FallingBlockEntity.java:333 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า Block State
ทำงานยังไง
คืนค่า: this.blockState.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.FallingBlockEntity#getDefaultGravity()
- Origin:
common - Source:
net/minecraft/world/entity/item/FallingBlockEntity.java:132 - Modifiers:
protected - Return:
double
คืออะไร
อ่านค่า Default Gravity
ทำงานยังไง
คืนค่า: 0.04.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.FallingBlockEntity#getMovementEmission()
- Origin:
common - Source:
net/minecraft/world/entity/item/FallingBlockEntity.java:117 - Modifiers:
protected - Return:
Entity.MovementEmission
คืออะไร
อ่านค่า Movement Emission
ทำงานยังไง
คืนค่า: Entity.MovementEmission.NONE.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
@Override
protected Entity.MovementEmission getMovementEmission() {
return super.getMovementEmission();
}
net.minecraft.world.entity.item.FallingBlockEntity#getStartPos()
- Origin:
common - Source:
net/minecraft/world/entity/item/FallingBlockEntity.java:113 - Modifiers:
public - Return:
BlockPos
คืออะไร
อ่านค่า Start Pos
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: this.entityData.get(DATA_START_POS).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.FallingBlockEntity#getTypeName()
- Origin:
common - Source:
net/minecraft/world/entity/item/FallingBlockEntity.java:337 - Modifiers:
protected - Return:
Component
คืออะไร
อ่านค่า Type Name
ทำงานยังไง
เรียกต่อ: translatable(), getBlock(), getName(). คืนค่า: Component.translatable("entity.minecraft.falling_block_type", this.blockState.getBlock().getName()).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.FallingBlockEntity#hurtServer(ServerLevel,DamageSource,float)
- Origin:
common - Source:
net/minecraft/world/entity/item/FallingBlockEntity.java:100 - Modifiers:
public final - Return:
boolean
คืออะไร
ประมวลผลความเสียหาย Server
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isInvulnerableToBase(), markHurt(). คืนค่า: false.
Parameters
ServerLevel serverLevelDamageSource damageSourcefloat f
ตัวอย่างใช้งาน
FallingBlockEntity instance = ...;
ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
boolean result = instance.hurtServer(serverLevel, damageSource, 0.0F);
net.minecraft.world.entity.item.FallingBlockEntity#isAttackable()
- Origin:
common - Source:
net/minecraft/world/entity/item/FallingBlockEntity.java:95 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Attackable
ทำงานยังไง
คืนค่า: false.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.FallingBlockEntity#isPickable()
- Origin:
common - Source:
net/minecraft/world/entity/item/FallingBlockEntity.java:127 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pickable
ทำงานยังไง
เรียกต่อ: isRemoved(). คืนค่า: !this.isRemoved().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.FallingBlockEntity#readAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/item/FallingBlockEntity.java:286 - Modifiers:
protected - Return:
void
คืออะไร
อ่าน Additional Save Data
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: blockState, time, hurtEntities, fallDamagePerDistance, fallDamageMax, dropItem. เรียกต่อ: readBlockState(), level(), holderLookup(), getCompound(), getInt(), contains(), getBoolean(), getFloat().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
CompoundTag compoundTag = ...;
@Override
protected void readAdditionalSaveData(CompoundTag compoundTag) {
super.readAdditionalSaveData(compoundTag);
}
net.minecraft.world.entity.item.FallingBlockEntity#recreateFromPacket(ClientboundAddEntityPacket)
- Origin:
common - Source:
net/minecraft/world/entity/item/FallingBlockEntity.java:347 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ recreateFromPacket ตาม implementation ของ FallingBlockEntity
ทำงานยังไง
แก้ state: blockState, blocksBuilding. เรียกต่อ: stateById(), getData(), getX(), getY(), getZ(), setPos(), setStartPos(), blockPosition().
Parameters
ClientboundAddEntityPacket clientboundAddEntityPacket
ตัวอย่างใช้งาน
FallingBlockEntity instance = ...;
ClientboundAddEntityPacket clientboundAddEntityPacket = ...;
instance.recreateFromPacket(clientboundAddEntityPacket);
net.minecraft.world.entity.item.FallingBlockEntity#setHurtsEntities(float,int)
- Origin:
common - Source:
net/minecraft/world/entity/item/FallingBlockEntity.java:312 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Hurts Entities
ทำงานยังไง
แก้ state: hurtEntities, fallDamagePerDistance, fallDamageMax.
Parameters
float fint i
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.FallingBlockEntity#setStartPos(BlockPos)
- Origin:
common - Source:
net/minecraft/world/entity/item/FallingBlockEntity.java:109 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Start Pos
ทำงานยังไง
เรียกต่อ: set().
Parameters
BlockPos blockPos
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.FallingBlockEntity#teleport(TeleportTransition)
- Origin:
common - Source:
net/minecraft/world/entity/item/FallingBlockEntity.java:359 - Modifiers:
public - Return:
Entity
คืออะไร
ดำเนินการ teleport ตาม implementation ของ FallingBlockEntity
ทำงานยังไง
แก้ state: forceTickAfterTeleportToDuplicate. เรียกต่อ: newLevel(), dimension(), level(). คืนค่า: entity.
Parameters
TeleportTransition teleportTransition
ตัวอย่างใช้งาน
FallingBlockEntity instance = ...;
TeleportTransition teleportTransition = ...;
Entity result = instance.teleport(teleportTransition);
net.minecraft.world.entity.item.FallingBlockEntity#tick()
- Origin:
common - Source:
net/minecraft/world/entity/item/FallingBlockEntity.java:137 - Modifiers:
public - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป ; มีการจัดการ exception. แก้ state: time, blockState. เรียกต่อ: isAir(), discard(), getBlock(), applyGravity(), move(), getDeltaMovement(), applyEffectsFromBlocks(), handlePortal(). สร้างออบเจ็กต์: ClipContext, Vec3, DirectionalPlaceContext, ClientboundBlockUpdatePacket.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
ItemEntity
- Full name:
net.minecraft.world.entity.item.ItemEntity - Package:
net.minecraft.world.entity.item - Source:
common—net/minecraft/world/entity/item/ItemEntity.java - Type:
class - Modifiers:
public - Extends:
Entity - Implements:
TraceableEntity
net.minecraft.world.entity.item.ItemEntity#addAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:310 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Additional Save Data
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: putShort(), putUUID(), getItem(), isEmpty(), put(), save(), registryAccess().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
ItemEntity instance = ...;
CompoundTag compoundTag = ...;
instance.addAdditionalSaveData(compoundTag);
net.minecraft.world.entity.item.ItemEntity#areMergable(ItemStack,ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:240 - Modifiers:
public static - Return:
boolean
คืออะไร
ดำเนินการ areMergable ตาม implementation ของ ItemEntity
ทำงานยังไง
เรียกต่อ: getCount(), getMaxStackSize(), isSameItemSameComponents(). คืนค่า: itemStack2.getCount() + itemStack.getCount() > itemStack2.getMaxStackSize() ? false : ItemStack.isSameItemSameComponents(itemStack, itemStack2).
Parameters
ItemStack itemStackItemStack itemStack2
ตัวอย่างใช้งาน
ItemStack itemStack = ...;
ItemStack itemStack2 = ...;
boolean result = ItemEntity.areMergable(itemStack, itemStack2);
net.minecraft.world.entity.item.ItemEntity#copy()
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:464 - Modifiers:
public - Return:
ItemEntity
คืออะไร
คัดลอก copy
ทำงานยังไง
สร้างออบเจ็กต์: ItemEntity. คืนค่า: new ItemEntity(this).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.ItemEntity#dampensVibrations()
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:78 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ dampensVibrations ตาม implementation ของ ItemEntity
ทำงานยังไง
เรียกต่อ: getItem(), is(). คืนค่า: this.getItem().is(ItemTags.DAMPENS_VIBRATIONS).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.ItemEntity#defineSynchedData(SynchedEntityData.Builder)
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:109 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ defineSynchedData ตาม implementation ของ ItemEntity
ทำงานยังไง
เรียกต่อ: define().
Parameters
SynchedEntityData.Builder builder
ตัวอย่างใช้งาน
SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder);
}
net.minecraft.world.entity.item.ItemEntity#fireImmune()
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:265 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ fireImmune ตาม implementation ของ ItemEntity
ทำงานยังไง
เรียกต่อ: getItem(), canBeHurtBy(), damageSources(), inFire(). คืนค่า: !this.getItem().canBeHurtBy(this.damageSources().inFire()) || super.fireImmune().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.ItemEntity#getAge()
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:423 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Age
ทำงานยังไง
คืนค่า: this.age.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.ItemEntity#getBlockPosBelowThatAffectsMyMovement()
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:191 - Modifiers:
public - Return:
BlockPos
คืออะไร
อ่านค่า Block Pos Below That Affects My Movement
ทำงานยังไง
เรียกต่อ: getOnPos(). คืนค่า: this.getOnPos(0.999999F).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.ItemEntity#getDefaultGravity()
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:114 - Modifiers:
protected - Return:
double
คืออะไร
อ่านค่า Default Gravity
ทำงานยังไง
คืนค่า: 0.04.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.ItemEntity#getItem()
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:398 - Modifiers:
public - Return:
ItemStack
คืออะไร
อ่านค่า Item
ทำงานยังไง
เรียกต่อ: getEntityData(), get(). คืนค่า: this.getEntityData().get(DATA_ITEM).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.ItemEntity#getMovementEmission()
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:104 - Modifiers:
protected - Return:
Entity.MovementEmission
คืออะไร
อ่านค่า Movement Emission
ทำงานยังไง
คืนค่า: Entity.MovementEmission.NONE.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
@Override
protected Entity.MovementEmission getMovementEmission() {
return super.getMovementEmission();
}
net.minecraft.world.entity.item.ItemEntity#getName()
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:376 - Modifiers:
public - Return:
Component
คืออะไร
อ่านค่า Name
ทำงานยังไง
เรียกต่อ: getCustomName(), getItem(), getItemName(). คืนค่า: component != null ? component : this.getItem().getItemName().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.ItemEntity#getOwner()
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:83 - Modifiers:
public - Return:
Entity
คืออะไร
อ่านค่า Owner
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: cachedThrower. เรียกต่อ: isRemoved(), level(), getEntity(). มีจุด return อย่างน้อย 3 จุด.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.ItemEntity#getSlot(int)
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:478 - Modifiers:
public - Return:
SlotAccess
คืออะไร
อ่านค่า Slot
ทำงานยังไง
เรียกต่อ: of(). คืนค่า: i == 0 ? SlotAccess.of(this::getItem, this::setItem) : super.getSlot(i).
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.ItemEntity#getSoundSource()
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:468 - Modifiers:
public - Return:
SoundSource
คืออะไร
อ่านค่า Sound Source
ทำงานยังไง
คืนค่า: SoundSource.AMBIENT.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.ItemEntity#getSpin(float,float)
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:460 - Modifiers:
public static - Return:
float
คืออะไร
อ่านค่า Spin
ทำงานยังไง
คืนค่า: f / 20.0F + g.
Parameters
float ffloat g
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.ItemEntity#getVisualRotationYInDegrees()
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:473 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Visual Rotation YIn Degrees
ทำงานยังไง
เรียกต่อ: getSpin(), getAge(). คืนค่า: 180.0F - getSpin(this.getAge() + 0.5F, this.bobOffs) / (float) (Math.PI * 2) * 360.0F.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.ItemEntity#hasPickUpDelay()
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:443 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Pick Up Delay
ทำงานยังไง
คืนค่า: this.pickupDelay > 0.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.ItemEntity#hurtClient(DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:275 - Modifiers:
public final - Return:
boolean
คืออะไร
ประมวลผลความเสียหาย Client
ทำงานยังไง
เรียกต่อ: isInvulnerableToBase(), getItem(), canBeHurtBy(). คืนค่า: this.isInvulnerableToBase(damageSource) ? false : this.getItem().canBeHurtBy(damageSource).
Parameters
DamageSource damageSource
ตัวอย่างใช้งาน
ItemEntity instance = ...;
DamageSource damageSource = ...;
boolean result = instance.hurtClient(damageSource);
net.minecraft.world.entity.item.ItemEntity#hurtServer(ServerLevel,DamageSource,float)
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:280 - Modifiers:
public final - Return:
boolean
คืออะไร
ประมวลผลความเสียหาย Server
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: health. เรียกต่อ: isInvulnerableToBase(), getGameRules(), getBoolean(), getEntity(), getItem(), canBeHurtBy(), markHurt(), gameEvent(). มีจุด return อย่างน้อย 4 จุด.
Parameters
ServerLevel serverLevelDamageSource damageSourcefloat f
ตัวอย่างใช้งาน
ItemEntity instance = ...;
ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
boolean result = instance.hurtServer(serverLevel, damageSource, 0.0F);
net.minecraft.world.entity.item.ItemEntity#ignoreExplosion(Explosion)
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:305 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ ignoreExplosion ตาม implementation ของ ItemEntity
ทำงานยังไง
เรียกต่อ: shouldAffectBlocklikeEntities(). คืนค่า: explosion.shouldAffectBlocklikeEntities() ? super.ignoreExplosion(explosion) : true.
Parameters
Explosion explosion
ตัวอย่างใช้งาน
ItemEntity instance = ...;
Explosion explosion = ...;
boolean result = instance.ignoreExplosion(explosion);
net.minecraft.world.entity.item.ItemEntity#isAttackable()
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:382 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Attackable
ทำงานยังไง
คืนค่า: false.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.ItemEntity#ItemEntity(EntityType<? extends ItemEntity>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:53 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ ItemEntity ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: bobOffs. เรียกต่อ: nextFloat(), setYRot().
Parameters
EntityType<? extends ItemEntity> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends ItemEntity> entityType = ...;
Level level = ...;
ItemEntity instance = new ItemEntity(entityType, level);
net.minecraft.world.entity.item.ItemEntity#ItemEntity(Level,double,double,double,ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:59 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ ItemEntity ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: nextDouble().
Parameters
Level leveldouble ddouble edouble fItemStack itemStack
ตัวอย่างใช้งาน
Level level = ...;
ItemStack itemStack = ...;
ItemEntity instance = new ItemEntity(level, 0.0D, 0.0D, 0.0D, itemStack);
net.minecraft.world.entity.item.ItemEntity#ItemEntity(Level,double,double,double,ItemStack,double,double,double)
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:63 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ ItemEntity ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: setPos(), setDeltaMovement(), setItem().
Parameters
Level leveldouble ddouble edouble fItemStack itemStackdouble gdouble hdouble i
ตัวอย่างใช้งาน
Level level = ...;
ItemStack itemStack = ...;
ItemEntity instance = new ItemEntity(level, 0.0D, 0.0D, 0.0D, itemStack, 0.0D, 0.0D, 0.0D);
net.minecraft.world.entity.item.ItemEntity#makeFakeItem()
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:455 - Modifiers:
public - Return:
void
คืออะไร
สร้าง Fake Item
ทำงานยังไง
แก้ state: age. เรียกต่อ: setNeverPickUp().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.ItemEntity#merge(ItemStack,ItemStack,int)
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:244 - Modifiers:
public static - Return:
ItemStack
คืออะไร
ดำเนินการ merge ตาม implementation ของ ItemEntity
ทำงานยังไง
เรียกต่อ: min(), getMaxStackSize(), getCount(), copyWithCount(), shrink(). คืนค่า: itemStack3.
Parameters
ItemStack itemStackItemStack itemStack2int i
ตัวอย่างใช้งาน
ItemStack itemStack = ...;
ItemStack itemStack2 = ...;
ItemStack result = ItemEntity.merge(itemStack, itemStack2, 0);
net.minecraft.world.entity.item.ItemEntity#onSyncedDataUpdated(EntityDataAccessor<?>)
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:406 - Modifiers:
public - Return:
void
คืออะไร
จัดการเหตุการณ์ Synced Data Updated
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: equals(), getItem(), setEntityRepresentation().
Parameters
EntityDataAccessor<?> entityDataAccessor
ตัวอย่างใช้งาน
ItemEntity instance = ...;
EntityDataAccessor<?> entityDataAccessor = ...;
instance.onSyncedDataUpdated(entityDataAccessor);
net.minecraft.world.entity.item.ItemEntity#playerTouch(Player)
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:357 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ playerTouch ตาม implementation ของ ItemEntity
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: pickupDelay, target. เรียกต่อ: level(), getItem(), getCount(), equals(), getUUID(), getInventory(), add(), take().
Parameters
Player player
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.ItemEntity#readAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:328 - Modifiers:
public - Return:
void
คืออะไร
อ่าน Additional Save Data
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: health, age, pickupDelay, target, thrower, cachedThrower. เรียกต่อ: getShort(), contains(), hasUUID(), getUUID(), getCompound(), setItem(), parse(), registryAccess().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
ItemEntity instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);
net.minecraft.world.entity.item.ItemEntity#restoreFrom(Entity)
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:96 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ restoreFrom ตาม implementation ของ ItemEntity
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: cachedThrower.
Parameters
Entity entity
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.ItemEntity#setDefaultPickUpDelay()
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:427 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Default Pick Up Delay
ทำงานยังไง
แก้ state: pickupDelay.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.ItemEntity#setExtendedLifetime()
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:451 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Extended Lifetime
ทำงานยังไง
แก้ state: age.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.ItemEntity#setItem(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:402 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Item
ทำงานยังไง
เรียกต่อ: getEntityData(), set().
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.ItemEntity#setNeverPickUp()
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:435 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Never Pick Up
ทำงานยังไง
แก้ state: pickupDelay.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.ItemEntity#setNoPickUpDelay()
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:431 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า No Pick Up Delay
ทำงานยังไง
แก้ state: pickupDelay.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.ItemEntity#setPickUpDelay(int)
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:439 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Pick Up Delay
ทำงานยังไง
แก้ state: pickupDelay.
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.ItemEntity#setTarget(UUID)
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:414 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Target
ทำงานยังไง
แก้ state: target.
Parameters
UUID uUID
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.ItemEntity#setThrower(Entity)
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:418 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Thrower
ทำงานยังไง
แก้ state: thrower, cachedThrower. เรียกต่อ: getUUID().
Parameters
Entity entity
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.ItemEntity#setUnlimitedLifetime()
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:447 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Unlimited Lifetime
ทำงานยังไง
แก้ state: age.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.ItemEntity#shouldPlayLavaHurtSound()
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:270 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าควร Play Lava Hurt Sound
ทำงานยังไง
คืนค่า: this.health <= 0 ? true : this.tickCount % 10 == 0.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.ItemEntity#teleport(TeleportTransition)
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:387 - Modifiers:
public - Return:
Entity
คืออะไร
ดำเนินการ teleport ตาม implementation ของ ItemEntity
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: level(), mergeWithNeighbours(). คืนค่า: entity.
Parameters
TeleportTransition teleportTransition
ตัวอย่างใช้งาน
ItemEntity instance = ...;
TeleportTransition teleportTransition = ...;
Entity result = instance.teleport(teleportTransition);
net.minecraft.world.entity.item.ItemEntity#tick()
- Origin:
common - Source:
net/minecraft/world/entity/item/ItemEntity.java:119 - Modifiers:
public - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: pickupDelay, xo, yo, zo, noPhysics, age. เรียกต่อ: getItem(), isEmpty(), discard(), getX(), getY(), getZ(), getDeltaMovement(), isInWater().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
PrimedTnt
- Full name:
net.minecraft.world.entity.item.PrimedTnt - Package:
net.minecraft.world.entity.item - Source:
common—net/minecraft/world/entity/item/PrimedTnt.java - Type:
class - Modifiers:
public - Extends:
Entity - Implements:
TraceableEntity
net.minecraft.world.entity.item.PrimedTnt#addAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/item/PrimedTnt.java:135 - Modifiers:
protected - Return:
void
คืออะไร
เพิ่ม Additional Save Data
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: putShort(), getFuse(), put(), writeBlockState(), getBlockState(), putFloat().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
CompoundTag compoundTag = ...;
@Override
protected void addAdditionalSaveData(CompoundTag compoundTag) {
super.addAdditionalSaveData(compoundTag);
}
net.minecraft.world.entity.item.PrimedTnt#defineSynchedData(SynchedEntityData.Builder)
- Origin:
common - Source:
net/minecraft/world/entity/item/PrimedTnt.java:73 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ defineSynchedData ตาม implementation ของ PrimedTnt
ทำงานยังไง
เรียกต่อ: define(), defaultBlockState().
Parameters
SynchedEntityData.Builder builder
ตัวอย่างใช้งาน
SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder);
}
net.minecraft.world.entity.item.PrimedTnt#getBlockState()
- Origin:
common - Source:
net/minecraft/world/entity/item/PrimedTnt.java:181 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า Block State
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: this.entityData.get(DATA_BLOCK_STATE_ID).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.PrimedTnt#getDefaultGravity()
- Origin:
common - Source:
net/minecraft/world/entity/item/PrimedTnt.java:89 - Modifiers:
protected - Return:
double
คืออะไร
อ่านค่า Default Gravity
ทำงานยังไง
คืนค่า: 0.04.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.PrimedTnt#getFuse()
- Origin:
common - Source:
net/minecraft/world/entity/item/PrimedTnt.java:173 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Fuse
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: this.entityData.get(DATA_FUSE_ID).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.PrimedTnt#getMovementEmission()
- Origin:
common - Source:
net/minecraft/world/entity/item/PrimedTnt.java:79 - Modifiers:
protected - Return:
Entity.MovementEmission
คืออะไร
อ่านค่า Movement Emission
ทำงานยังไง
คืนค่า: Entity.MovementEmission.NONE.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
@Override
protected Entity.MovementEmission getMovementEmission() {
return super.getMovementEmission();
}
net.minecraft.world.entity.item.PrimedTnt#getOwner()
- Origin:
common - Source:
net/minecraft/world/entity/item/PrimedTnt.java:156 - Modifiers:
public - Return:
LivingEntity
คืออะไร
อ่านค่า Owner
ทำงานยังไง
คืนค่า: this.owner.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.PrimedTnt#hurtServer(ServerLevel,DamageSource,float)
- Origin:
common - Source:
net/minecraft/world/entity/item/PrimedTnt.java:200 - Modifiers:
public final - Return:
boolean
คืออะไร
ประมวลผลความเสียหาย Server
ทำงานยังไง
คืนค่า: false.
Parameters
ServerLevel serverLevelDamageSource damageSourcefloat f
ตัวอย่างใช้งาน
PrimedTnt instance = ...;
ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
boolean result = instance.hurtServer(serverLevel, damageSource, 0.0F);
net.minecraft.world.entity.item.PrimedTnt#isPickable()
- Origin:
common - Source:
net/minecraft/world/entity/item/PrimedTnt.java:84 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pickable
ทำงานยังไง
เรียกต่อ: isRemoved(). คืนค่า: !this.isRemoved().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.PrimedTnt#PrimedTnt(EntityType<? extends PrimedTnt>,Level)
- Origin:
common - Source:
net/minecraft/world/entity/item/PrimedTnt.java:56 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ PrimedTnt ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: blocksBuilding.
Parameters
EntityType<? extends PrimedTnt> entityTypeLevel level
ตัวอย่างใช้งาน
EntityType<? extends PrimedTnt> entityType = ...;
Level level = ...;
PrimedTnt instance = new PrimedTnt(entityType, level);
net.minecraft.world.entity.item.PrimedTnt#PrimedTnt(Level,double,double,double,LivingEntity)
- Origin:
common - Source:
net/minecraft/world/entity/item/PrimedTnt.java:61 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ PrimedTnt ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: xo, yo, zo, owner. เรียกต่อ: setPos(), nextDouble(), setDeltaMovement(), sin(), cos(), setFuse().
Parameters
Level leveldouble ddouble edouble fLivingEntity livingEntity
ตัวอย่างใช้งาน
Level level = ...;
LivingEntity livingEntity = ...;
PrimedTnt instance = new PrimedTnt(level, 0.0D, 0.0D, 0.0D, livingEntity);
net.minecraft.world.entity.item.PrimedTnt#readAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/item/PrimedTnt.java:144 - Modifiers:
protected - Return:
void
คืออะไร
อ่าน Additional Save Data
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: explosionPower. เรียกต่อ: setFuse(), getShort(), contains(), setBlockState(), readBlockState(), level(), holderLookup(), getCompound().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
CompoundTag compoundTag = ...;
@Override
protected void readAdditionalSaveData(CompoundTag compoundTag) {
super.readAdditionalSaveData(compoundTag);
}
net.minecraft.world.entity.item.PrimedTnt#restoreFrom(Entity)
- Origin:
common - Source:
net/minecraft/world/entity/item/PrimedTnt.java:161 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ restoreFrom ตาม implementation ของ PrimedTnt
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: owner.
Parameters
Entity entity
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.PrimedTnt#setBlockState(BlockState)
- Origin:
common - Source:
net/minecraft/world/entity/item/PrimedTnt.java:177 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Block State
ทำงานยังไง
เรียกต่อ: set().
Parameters
BlockState blockState
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.PrimedTnt#setFuse(int)
- Origin:
common - Source:
net/minecraft/world/entity/item/PrimedTnt.java:169 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Fuse
ทำงานยังไง
เรียกต่อ: set().
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.item.PrimedTnt#teleport(TeleportTransition)
- Origin:
common - Source:
net/minecraft/world/entity/item/PrimedTnt.java:189 - Modifiers:
public - Return:
Entity
คืออะไร
ดำเนินการ teleport ตาม implementation ของ PrimedTnt
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: setUsedPortal(). คืนค่า: entity.
Parameters
TeleportTransition teleportTransition
ตัวอย่างใช้งาน
PrimedTnt instance = ...;
TeleportTransition teleportTransition = ...;
Entity result = instance.teleport(teleportTransition);
net.minecraft.world.entity.item.PrimedTnt#tick()
- Origin:
common - Source:
net/minecraft/world/entity/item/PrimedTnt.java:94 - Modifiers:
public - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: handlePortal(), applyGravity(), move(), getDeltaMovement(), applyEffectsFromBlocks(), setDeltaMovement(), scale(), onGround().
Parameters
- ไม่มี