Package net.minecraft.world.entity.player
Part 1/1
Abilities
- Full name:
net.minecraft.world.entity.player.Abilities - Package:
net.minecraft.world.entity.player - Source:
common—net/minecraft/world/entity/player/Abilities.java - Type:
class - Modifiers:
public
net.minecraft.world.entity.player.Abilities#addSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/player/Abilities.java:14 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Save Data
ทำงานยังไง
เรียกต่อ: putBoolean(), putFloat(), put(). สร้างออบเจ็กต์: CompoundTag.
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Abilities#getFlyingSpeed()
- Origin:
common - Source:
net/minecraft/world/entity/player/Abilities.java:44 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Flying Speed
ทำงานยังไง
คืนค่า: this.flyingSpeed.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Abilities#getWalkingSpeed()
- Origin:
common - Source:
net/minecraft/world/entity/player/Abilities.java:52 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Walking Speed
ทำงานยังไง
คืนค่า: this.walkingSpeed.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Abilities#loadSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/player/Abilities.java:26 - Modifiers:
public - Return:
void
คืออะไร
โหลด Save Data
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: invulnerable, flying, mayfly, instabuild, flyingSpeed, walkingSpeed. เรียกต่อ: contains(), getCompound(), getBoolean(), getFloat().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Abilities#setFlyingSpeed(float)
- Origin:
common - Source:
net/minecraft/world/entity/player/Abilities.java:48 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Flying Speed
ทำงานยังไง
แก้ state: flyingSpeed.
Parameters
float f
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Abilities#setWalkingSpeed(float)
- Origin:
common - Source:
net/minecraft/world/entity/player/Abilities.java:56 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Walking Speed
ทำงานยังไง
แก้ state: walkingSpeed.
Parameters
float f
ตัวอย่างใช้งาน
ChatVisiblity
- Full name:
net.minecraft.world.entity.player.ChatVisiblity - Package:
net.minecraft.world.entity.player - Source:
common—net/minecraft/world/entity/player/ChatVisiblity.java - Type:
enum - Modifiers:
public - Implements:
OptionEnum
net.minecraft.world.entity.player.ChatVisiblity#byId(int)
- Origin:
common - Source:
net/minecraft/world/entity/player/ChatVisiblity.java:31 - Modifiers:
public static - Return:
ChatVisiblity
คืออะไร
ดำเนินการ byId ตาม implementation ของ ChatVisiblity
ทำงานยังไง
เรียกต่อ: apply(). คืนค่า: BY_ID.apply(i).
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.ChatVisiblity#getId()
- Origin:
common - Source:
net/minecraft/world/entity/player/ChatVisiblity.java:21 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Id
ทำงานยังไง
คืนค่า: this.id.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.ChatVisiblity#getKey()
- Origin:
common - Source:
net/minecraft/world/entity/player/ChatVisiblity.java:26 - Modifiers:
public - Return:
String
คืออะไร
อ่านค่า Key
ทำงานยังไง
คืนค่า: this.key.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
Inventory
- Full name:
net.minecraft.world.entity.player.Inventory - Package:
net.minecraft.world.entity.player - Source:
common—net/minecraft/world/entity/player/Inventory.java - Type:
class - Modifiers:
public - Implements:
Container,Nameable
net.minecraft.world.entity.player.Inventory#add(int,ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:216 - Modifiers:
public - Return:
boolean
คืออะไร
เพิ่ม add
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป ; มีการจัดการ exception. เรียกต่อ: isEmpty(), isDamaged(), getFreeSlot(), set(), copyAndClear(), get(), setPopTime(), hasInfiniteMaterials(). สร้างออบเจ็กต์: ReportedException. มีจุด return อย่างน้อย 6 จุด.
Parameters
int iItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#add(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:212 - Modifiers:
public - Return:
boolean
คืออะไร
เพิ่ม add
ทำงานยังไง
คืนค่า: this.add(-1, itemStack).
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#addAndPickItem(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:68 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม And Pick Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: selected. เรียกต่อ: getSuitableHotbarSlot(), get(), isEmpty(), getFreeSlot(), set().
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#clearContent()
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:533 - Modifiers:
public - Return:
void
คืออะไร
ล้าง Content
ทำงานยังไง
มีการวนลูป. เรียกต่อ: clear().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#clearOrCountMatchingItems(Predicate<ItemStack>,int,Container)
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:141 - Modifiers:
public - Return:
int
คืออะไร
ล้าง Or Count Matching Items
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getCarried(), isEmpty(), setCarried(). คืนค่า: j.
Parameters
Predicate<ItemStack> predicateint iContainer container
ตัวอย่างใช้งาน
Inventory instance = ...;
Predicate<ItemStack> predicate = ...;
Container container = ...;
int result = instance.clearOrCountMatchingItems(predicate, 0, container);
net.minecraft.world.entity.player.Inventory#contains(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:489 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่ามี contains
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: isEmpty(), isSameItemSameComponents(). มีจุด return อย่างน้อย 2 จุด.
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#contains(Predicate<ItemStack>)
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:513 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่ามี contains
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: test(). มีจุด return อย่างน้อย 2 จุด.
Parameters
Predicate<ItemStack> predicate
ตัวอย่างใช้งาน
Inventory instance = ...;
Predicate<ItemStack> predicate = ...;
boolean result = instance.contains(predicate);
net.minecraft.world.entity.player.Inventory#contains(TagKey<Item>)
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:501 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่ามี contains
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: isEmpty(), is(). มีจุด return อย่างน้อย 2 จุด.
Parameters
TagKey<Item> tagKey
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#createInventoryUpdatePacket(int)
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:288 - Modifiers:
public - Return:
ClientboundSetPlayerInventoryPacket
คืออะไร
สร้าง Inventory Update Packet
ทำงานยังไง
เรียกต่อ: getItem(), copy(). สร้างออบเจ็กต์: ClientboundSetPlayerInventoryPacket. คืนค่า: new ClientboundSetPlayerInventoryPacket(i, this.getItem(i).copy()).
Parameters
int i
ตัวอย่างใช้งาน
Inventory instance = ...;
ClientboundSetPlayerInventoryPacket result = instance.createInventoryUpdatePacket(0);
net.minecraft.world.entity.player.Inventory#dropAll()
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:463 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ dropAll ตาม implementation ของ Inventory
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: size(), get(), isEmpty(), drop(), set().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#fillStackedContents(StackedItemContents)
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:540 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ fillStackedContents ตาม implementation ของ Inventory
ทำงานยังไง
มีการวนลูป. เรียกต่อ: accountSimpleStack().
Parameters
StackedItemContents stackedItemContents
ตัวอย่างใช้งาน
Inventory instance = ...;
StackedItemContents stackedItemContents = ...;
instance.fillStackedContents(stackedItemContents);
net.minecraft.world.entity.player.Inventory#findSlotMatchingCraftingIngredient(Holder<Item>,ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:105 - Modifiers:
public - Return:
int
คืออะไร
ค้นหา Slot Matching Crafting Ingredient
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: size(), get(), isEmpty(), is(), isUsableForCrafting(), isSameItemSameComponents(). มีจุด return อย่างน้อย 2 จุด.
Parameters
Holder<Item> holderItemStack itemStack
ตัวอย่างใช้งาน
Inventory instance = ...;
Holder<Item> holder = ...;
ItemStack itemStack = ...;
int result = instance.findSlotMatchingCraftingIngredient(holder, itemStack);
net.minecraft.world.entity.player.Inventory#findSlotMatchingItem(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:91 - Modifiers:
public - Return:
int
คืออะไร
ค้นหา Slot Matching Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: size(), get(), isEmpty(), isSameItemSameComponents(). มีจุด return อย่างน้อย 2 จุด.
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
Inventory instance = ...;
ItemStack itemStack = ...;
int result = instance.findSlotMatchingItem(itemStack);
net.minecraft.world.entity.player.Inventory#getArmor(int)
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:459 - Modifiers:
public - Return:
ItemStack
คืออะไร
อ่านค่า Armor
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: this.armor.get(i).
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#getContainerSize()
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:410 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Container Size
ทำงานยังไง
เรียกต่อ: size(). คืนค่า: this.items.size() + this.armor.size() + this.offhand.size().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#getDestroySpeed(BlockState)
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:359 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Destroy Speed
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: this.items.get(this.selected).getDestroySpeed(blockState).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
Inventory instance = ...;
BlockState blockState = ...;
float result = instance.getDestroySpeed(blockState);
net.minecraft.world.entity.player.Inventory#getFreeSlot()
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:58 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Free Slot
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: size(), get(), isEmpty(). มีจุด return อย่างน้อย 2 จุด.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#getItem(int)
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:438 - Modifiers:
public - Return:
ItemStack
คืออะไร
อ่านค่า Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: size(), get(). คืนค่า: list == null ? ItemStack.EMPTY : list.get(i).
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#getName()
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:454 - Modifiers:
public - Return:
Component
คืออะไร
อ่านค่า Name
ทำงานยังไง
เรียกต่อ: translatable(). คืนค่า: Component.translatable("container.inventory").
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#getSelected()
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:43 - Modifiers:
public - Return:
ItemStack
คืออะไร
อ่านค่า Selected
ทำงานยังไง
เรียกต่อ: isHotbarSlot(), get(). คืนค่า: isHotbarSlot(this.selected) ? this.items.get(this.selected) : ItemStack.EMPTY.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#getSelectionSize()
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:47 - Modifiers:
public static - Return:
int
คืออะไร
อ่านค่า Selection Size
ทำงานยังไง
คืนค่า: 9.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#getSlotWithRemainingSpace(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:184 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Slot With Remaining Space
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: hasRemainingSpaceForItem(), getItem(), size(), get(). มีจุด return อย่างน้อย 4 จุด.
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
Inventory instance = ...;
ItemStack itemStack = ...;
int result = instance.getSlotWithRemainingSpace(itemStack);
net.minecraft.world.entity.player.Inventory#getSuitableHotbarSlot()
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:119 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Suitable Hotbar Slot
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: get(), isEmpty(), isEnchanted(). มีจุด return อย่างน้อย 3 จุด.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#getTimesChanged()
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:480 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Times Changed
ทำงานยังไง
คืนค่า: this.timesChanged.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#Inventory(Player)
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:39 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ Inventory ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: player.
Parameters
Player player
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#isEmpty()
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:415 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Empty
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. มีจุด return อย่างน้อย 4 จุด.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#isHotbarSlot(int)
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:87 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Hotbar Slot
ทำงานยังไง
คืนค่า: i >= 0 && i < 9.
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#isUsableForCrafting(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:101 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Usable For Crafting
ทำงานยังไง
เรียกต่อ: isDamaged(), isEnchanted(), has(). คืนค่า: !itemStack.isDamaged() && !itemStack.isEnchanted() && !itemStack.has(DataComponents.CUSTOM_NAME).
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#load(ListTag)
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:391 - Modifiers:
public - Return:
void
คืออะไร
โหลด load
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: clear(), size(), getCompound(), getByte(), parse(), registryAccess(), orElse(), set().
Parameters
ListTag listTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#pickSlot(int)
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:80 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ pickSlot ตาม implementation ของ Inventory
ทำงานยังไง
แก้ state: selected. เรียกต่อ: getSuitableHotbarSlot(), get(), set().
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#placeItemBackInInventory(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:265 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ placeItemBackInInventory ตาม implementation ของ Inventory
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#placeItemBackInInventory(ItemStack,boolean)
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:269 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ placeItemBackInInventory ตาม implementation ของ Inventory
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: isEmpty(), getSlotWithRemainingSpace(), getFreeSlot(), drop(), getMaxStackSize(), getItem(), getCount(), add().
Parameters
ItemStack itemStackboolean bl
ตัวอย่างใช้งาน
Inventory instance = ...;
ItemStack itemStack = ...;
instance.placeItemBackInInventory(itemStack, true);
net.minecraft.world.entity.player.Inventory#removeFromSelected(boolean)
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:546 - Modifiers:
public - Return:
ItemStack
คืออะไร
ลบ From Selected
ทำงานยังไง
เรียกต่อ: getSelected(), isEmpty(), removeItem(), getCount(). คืนค่า: itemStack.isEmpty() ? ItemStack.EMPTY : this.removeItem(this.selected, bl ? itemStack.getCount() : 1).
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#removeItem(int,int)
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:292 - Modifiers:
public - Return:
ItemStack
คืออะไร
ลบ Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: size(), get(), isEmpty(). คืนค่า: list != null && !list.get(i).isEmpty() ? ContainerHelper.removeItem(list, i, j) : ItemStack.EMPTY.
Parameters
int iint j
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#removeItem(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:308 - Modifiers:
public - Return:
void
คืออะไร
ลบ Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: size(), get(), set().
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#removeItemNoUpdate(int)
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:319 - Modifiers:
public - Return:
ItemStack
คืออะไร
ลบ Item No Update
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: size(), get(), isEmpty(), set(). มีจุด return อย่างน้อย 2 จุด.
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#replaceWith(Inventory)
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:525 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ replaceWith ตาม implementation ของ Inventory
ทำงานยังไง
มีการวนลูป. แก้ state: selected. เรียกต่อ: getContainerSize(), setItem(), getItem().
Parameters
Inventory inventory
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#save(ListTag)
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:363 - Modifiers:
public - Return:
ListTag
คืออะไร
บันทึก save
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: size(), get(), isEmpty(), putByte(), add(), registryAccess(). สร้างออบเจ็กต์: CompoundTag. คืนค่า: listTag.
Parameters
ListTag listTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#setChanged()
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:475 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Changed
ทำงานยังไง
แก้ state: timesChanged.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#setItem(int,ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:341 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: size(), set().
Parameters
int iItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#setSelectedHotbarSlot(int)
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:137 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Selected Hotbar Slot
ทำงานยังไง
แก้ state: selected.
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#stillValid(Player)
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:484 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ stillValid ตาม implementation ของ Inventory
ทำงานยังไง
เรียกต่อ: canInteractWithEntity(). คืนค่า: player.canInteractWithEntity(this.player, 4.0).
Parameters
Player player
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Inventory#tick()
- Origin:
common - Source:
net/minecraft/world/entity/player/Inventory.java:202 - Modifiers:
public - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: selected. เรียกต่อ: size(), get(), isEmpty(), inventoryTick(), level().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
Player
- Full name:
net.minecraft.world.entity.player.Player - Package:
net.minecraft.world.entity.player - Source:
common—net/minecraft/world/entity/player/Player.java - Type:
class - Modifiers:
public abstract - Extends:
LivingEntity
net.minecraft.world.entity.player.Player#actuallyHurt(ServerLevel,DamageSource,float)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:955 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ actuallyHurt ตาม implementation ของ Player
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isInvulnerableTo(), getDamageAfterArmorAbsorb(), getDamageAfterMagicAbsorb(), max(), getAbsorptionAmount(), setAbsorptionAmount(), awardStat(), round().
Parameters
ServerLevel serverLevelDamageSource damageSourcefloat f
ตัวอย่างใช้งาน
ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
@Override
protected void actuallyHurt(ServerLevel serverLevel, DamageSource damageSource, float f) {
super.actuallyHurt(serverLevel, damageSource, f);
}
net.minecraft.world.entity.player.Player#addAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:814 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Additional Save Data
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: addCurrentDataVersion(), put(), save(), putInt(), putShort(), putFloat(), getScore(), addSaveData(). สร้างออบเจ็กต์: ListTag.
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#addItem(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1731 - Modifiers:
public - Return:
boolean
คืออะไร
เพิ่ม Item
ทำงานยังไง
เรียกต่อ: add(). คืนค่า: this.inventory.add(itemStack).
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#aiStep()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:545 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ aiStep ตาม implementation ของ Player
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: jumpTriggerTime, oBob, bob. เรียกต่อ: tickRegeneration(), tick(), isPassenger(), resetFallDistance(), setSpeed(), getAttributeValue(), onGround(), isDeadOrDying().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#animateHurt(float)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:2055 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ animateHurt ตาม implementation ของ Player
ทำงานยังไง
แก้ state: hurtDir.
Parameters
float f
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#attack(Entity)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1129 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ attack ตาม implementation ของ Player
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: isAttackable(), skipAttackInteraction(), isAutoSpinAttack(), getAttributeValue(), getWeaponItem(), ofNullable(), getItem(), getDamageSource(). สร้างออบเจ็กต์: ClientboundSetEntityMotionPacket.
Parameters
Entity entity
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#awardRecipes(Collection<RecipeHolder<?>>)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1414 - Modifiers:
public - Return:
int
คืออะไร
ดำเนินการ awardRecipes ตาม implementation ของ Player
ทำงานยังไง
คืนค่า: 0.
Parameters
Collection<RecipeHolder<?>> collection
ตัวอย่างใช้งาน
Player instance = ...;
Collection<RecipeHolder<?>> collection = ...;
int result = instance.awardRecipes(collection);
net.minecraft.world.entity.player.Player#awardRecipesByKey(List<ResourceKey<Recipe<?>>>)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1421 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ awardRecipesByKey ตาม implementation ของ Player
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
List<ResourceKey<Recipe<?>>> list
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#awardStat(ResourceLocation)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1396 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ awardStat ตาม implementation ของ Player
ทำงานยังไง
เรียกต่อ: get().
Parameters
ResourceLocation resourceLocation
ตัวอย่างใช้งาน
Player instance = ...;
ResourceLocation resourceLocation = ...;
instance.awardStat(resourceLocation);
net.minecraft.world.entity.player.Player#awardStat(ResourceLocation,int)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1400 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ awardStat ตาม implementation ของ Player
ทำงานยังไง
เรียกต่อ: get().
Parameters
ResourceLocation resourceLocationint i
ตัวอย่างใช้งาน
Player instance = ...;
ResourceLocation resourceLocation = ...;
instance.awardStat(resourceLocation, 0);
net.minecraft.world.entity.player.Player#awardStat(Stat<?>)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1404 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ awardStat ตาม implementation ของ Player
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
Stat<?> stat
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#awardStat(Stat<?>,int)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1408 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ awardStat ตาม implementation ของ Player
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
Stat<?> statint i
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#blockActionRestricted(Level,BlockPos,GameType)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:212 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ blockActionRestricted ตาม implementation ของ Player
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isBlockPlacingRestricted(), mayBuild(), getMainHandItem(), isEmpty(), canBreakBlockInAdventureMode(). สร้างออบเจ็กต์: BlockInWorld. มีจุด return อย่างน้อย 4 จุด.
Parameters
Level levelBlockPos blockPosGameType gameType
ตัวอย่างใช้งาน
Player instance = ...;
Level level = ...;
BlockPos blockPos = ...;
GameType gameType = ...;
boolean result = instance.blockActionRestricted(level, blockPos, gameType);
net.minecraft.world.entity.player.Player#blockInteractionRange()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:2092 - Modifiers:
public - Return:
double
คืออะไร
ดำเนินการ blockInteractionRange ตาม implementation ของ Player
ทำงานยังไง
เรียกต่อ: getAttributeValue(). คืนค่า: this.getAttributeValue(Attributes.BLOCK_INTERACTION_RANGE).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#blockUsingShield(LivingEntity)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:896 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ blockUsingShield ตาม implementation ของ Player
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getItemBlockingWith(), canDisableShield(), disableShield().
Parameters
LivingEntity livingEntity
ตัวอย่างใช้งาน
LivingEntity livingEntity = ...;
@Override
protected void blockUsingShield(LivingEntity livingEntity) {
super.blockUsingShield(livingEntity);
}
net.minecraft.world.entity.player.Player#canBeHitByProjectile()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1791 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Be Hit By Projectile
ทำงานยังไง
เรียกต่อ: isSpectator(). คืนค่า: !this.isSpectator() && super.canBeHitByProjectile().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#canBeSeenAsEnemy()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:905 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Be Seen As Enemy
ทำงานยังไง
เรียกต่อ: getAbilities(). คืนค่า: !this.getAbilities().invulnerable && super.canBeSeenAsEnemy().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#canDropItems()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1361 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Drop Items
ทำงานยังไง
คืนค่า: true.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#canEat(boolean)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1649 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Eat
ทำงานยังไง
เรียกต่อ: needsFood(). คืนค่า: this.abilities.invulnerable || bl || this.foodData.needsFood().
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#canGlide()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1452 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Glide
ทำงานยังไง
คืนค่า: !this.abilities.flying && super.canGlide().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#canHarmPlayer(Player)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:910 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Harm Player
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getTeam(), isAlliedTo(), isAllowFriendlyFire(). มีจุด return อย่างน้อย 2 จุด.
Parameters
Player player
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#canInteractWithBlock(BlockPos,double)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:2109 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Interact With Block
ทำงานยังไง
เรียกต่อ: blockInteractionRange(), distanceToSqr(), getEyePosition(). สร้างออบเจ็กต์: AABB. คืนค่า: new AABB(blockPos).distanceToSqr(this.getEyePosition()) < e * e.
Parameters
BlockPos blockPosdouble d
ตัวอย่างใช้งาน
Player instance = ...;
BlockPos blockPos = ...;
boolean result = instance.canInteractWithBlock(blockPos, 0.0D);
net.minecraft.world.entity.player.Player#canInteractWithEntity(AABB,double)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:2104 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Interact With Entity
ทำงานยังไง
เรียกต่อ: entityInteractionRange(), distanceToSqr(), getEyePosition(). คืนค่า: aABB.distanceToSqr(this.getEyePosition()) < e * e.
Parameters
AABB aABBdouble d
ตัวอย่างใช้งาน
Player instance = ...;
AABB aABB = ...;
boolean result = instance.canInteractWithEntity(aABB, 0.0D);
net.minecraft.world.entity.player.Player#canInteractWithEntity(Entity,double)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:2100 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Interact With Entity
ทำงานยังไง
เรียกต่อ: isRemoved(), getBoundingBox(). คืนค่า: entity.isRemoved() ? false : this.canInteractWithEntity(entity.getBoundingBox(), d).
Parameters
Entity entitydouble d
ตัวอย่างใช้งาน
Player instance = ...;
Entity entity = ...;
boolean result = instance.canInteractWithEntity(entity, 0.0D);
net.minecraft.world.entity.player.Player#canPlayerFitWithinBlocksAndEntitiesWhen(Pose)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:464 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Player Fit Within Blocks And Entities When
ทำงานยังไง
เรียกต่อ: level(), noCollision(), getDimensions(), makeBoundingBox(), position(), deflate(). คืนค่า: this.level().noCollision(this, this.getDimensions(pose).makeBoundingBox(this.position()).deflate(1.0E-7)).
Parameters
Pose pose
ตัวอย่างใช้งาน
Pose pose = ...;
@Override
protected boolean canPlayerFitWithinBlocksAndEntitiesWhen(Pose pose) {
return super.canPlayerFitWithinBlocksAndEntitiesWhen(pose);
}
net.minecraft.world.entity.player.Player#canSprint()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:2061 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Sprint
ทำงานยังไง
คืนค่า: true.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#canUseGameMasterBlocks()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1951 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Use Game Master Blocks
ทำงานยังไง
เรียกต่อ: getPermissionLevel(). คืนค่า: this.abilities.instabuild && this.getPermissionLevel() >= 2.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#canUseSlot(EquipmentSlot)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1745 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Use Slot
ทำงานยังไง
คืนค่า: equipmentSlot != EquipmentSlot.BODY.
Parameters
EquipmentSlot equipmentSlot
ตัวอย่างใช้งาน
Player instance = ...;
EquipmentSlot equipmentSlot = ...;
boolean result = instance.canUseSlot(equipmentSlot);
net.minecraft.world.entity.player.Player#causeFallDamage(float,float,DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1475 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ causeFallDamage ตาม implementation ของ Player
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: awardStat(), round(), min(), getY(), resetCurrentImpulseContext(), tryResetCurrentImpulseContext(). มีจุด return อย่างน้อย 3 จุด.
Parameters
float ffloat gDamageSource damageSource
ตัวอย่างใช้งาน
Player instance = ...;
DamageSource damageSource = ...;
boolean result = instance.causeFallDamage(0.0F, 0.0F, damageSource);
net.minecraft.world.entity.player.Player#causeFoodExhaustion(float)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1633 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ causeFoodExhaustion ตาม implementation ของ Player
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: level(), addExhaustion().
Parameters
float f
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#closeContainer()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:519 - Modifiers:
protected - Return:
void
คืออะไร
ปิด Container
ทำงานยังไง
แก้ state: containerMenu.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#createAttributes()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:229 - Modifiers:
public static - Return:
AttributeSupplier.Builder
คืออะไร
สร้าง Attributes
ทำงานยังไง
เรียกต่อ: createLivingAttributes(), add().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#createItemCooldowns()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:387 - Modifiers:
protected - Return:
ItemCooldowns
คืออะไร
สร้าง Item Cooldowns
ทำงานยังไง
สร้างออบเจ็กต์: ItemCooldowns. คืนค่า: new ItemCooldowns().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#crit(Entity)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1307 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ crit ตาม implementation ของ Player
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
Entity entity
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#defineSynchedData(SynchedEntityData.Builder)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:244 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ defineSynchedData ตาม implementation ของ Player
ทำงานยังไง
เรียกต่อ: define(), getId(). สร้างออบเจ็กต์: CompoundTag.
Parameters
SynchedEntityData.Builder builder
ตัวอย่างใช้งาน
SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder);
}
net.minecraft.world.entity.player.Player#destroyVanishingCursedItems()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:695 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ destroyVanishingCursedItems ตาม implementation ของ Player
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getContainerSize(), getItem(), isEmpty(), has(), removeItemNoUpdate().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#die(DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:660 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ die ตาม implementation ของ Player
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: reapplyPosition(), isSpectator(), level(), dropAllDeathLoot(), setDeltaMovement(), cos(), getHurtDir(), getYRot().
Parameters
DamageSource damageSource
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#disableShield(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1301 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ disableShield ตาม implementation ของ Player
ทำงานยังไง
เรียกต่อ: getCooldowns(), addCooldown(), stopUsingItem(), level(), broadcastEntityEvent().
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#displayClientMessage(Component,boolean)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1393 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ displayClientMessage ตาม implementation ของ Player
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
Component componentboolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#doAutoAttackOnTouch(LivingEntity)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1296 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ doAutoAttackOnTouch ตาม implementation ของ Player
ทำงานยังไง
เรียกต่อ: attack().
Parameters
LivingEntity livingEntity
ตัวอย่างใช้งาน
LivingEntity livingEntity = ...;
@Override
protected void doAutoAttackOnTouch(LivingEntity livingEntity) {
super.doAutoAttackOnTouch(livingEntity);
}
net.minecraft.world.entity.player.Player#doCloseContainer()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:523 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ doCloseContainer ตาม implementation ของ Player
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#doesEmitEquipEvent(EquipmentSlot)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1714 - Modifiers:
protected - Return:
boolean
คืออะไร
ดำเนินการ doesEmitEquipEvent ตาม implementation ของ Player
ทำงานยังไง
เรียกต่อ: getType(). คืนค่า: equipmentSlot.getType() == EquipmentSlot.Type.HUMANOID_ARMOR.
Parameters
EquipmentSlot equipmentSlot
ตัวอย่างใช้งาน
EquipmentSlot equipmentSlot = ...;
@Override
protected boolean doesEmitEquipEvent(EquipmentSlot equipmentSlot) {
return super.doesEmitEquipEvent(equipmentSlot);
}
net.minecraft.world.entity.player.Player#doWaterSplashEffect()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1525 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ doWaterSplashEffect ตาม implementation ของ Player
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isSpectator().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#drop(ItemStack,boolean)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:717 - Modifiers:
public - Return:
ItemEntity
คืออะไร
ดำเนินการ drop ตาม implementation ของ Player
ทำงานยังไง
คืนค่า: this.drop(itemStack, false, bl).
Parameters
ItemStack itemStackboolean bl
ตัวอย่างใช้งาน
Player instance = ...;
ItemStack itemStack = ...;
ItemEntity result = instance.drop(itemStack, true);
net.minecraft.world.entity.player.Player#drop(ItemStack,boolean,boolean)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:722 - Modifiers:
public - Return:
ItemEntity
คืออะไร
ดำเนินการ drop ตาม implementation ของ Player
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isEmpty(), level(), swing(). คืนค่า: null.
Parameters
ItemStack itemStackboolean blboolean bl2
ตัวอย่างใช้งาน
Player instance = ...;
ItemStack itemStack = ...;
ItemEntity result = instance.drop(itemStack, true, true);
net.minecraft.world.entity.player.Player#dropEquipment(ServerLevel)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:686 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ dropEquipment ตาม implementation ของ Player
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getGameRules(), getBoolean(), destroyVanishingCursedItems(), dropAll().
Parameters
ServerLevel serverLevel
ตัวอย่างใช้งาน
ServerLevel serverLevel = ...;
@Override
protected void dropEquipment(ServerLevel serverLevel) {
super.dropEquipment(serverLevel);
}
net.minecraft.world.entity.player.Player#entityInteractionRange()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:2096 - Modifiers:
public - Return:
double
คืออะไร
ดำเนินการ entityInteractionRange ตาม implementation ของ Player
ทำงานยังไง
เรียกต่อ: getAttributeValue(). คืนค่า: this.getAttributeValue(Attributes.ENTITY_INTERACTION_RANGE).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#freeAt(BlockPos)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1466 - Modifiers:
protected - Return:
boolean
คืออะไร
ดำเนินการ freeAt ตาม implementation ของ Player
ทำงานยังไง
เรียกต่อ: level(), getBlockState(), isSuffocating(). คืนค่า: !this.level().getBlockState(blockPos).isSuffocating(this.level(), blockPos).
Parameters
BlockPos blockPos
ตัวอย่างใช้งาน
BlockPos blockPos = ...;
@Override
protected boolean freeAt(BlockPos blockPos) {
return super.freeAt(blockPos);
}
net.minecraft.world.entity.player.Player#getAbilities()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1345 - Modifiers:
public - Return:
Abilities
คืออะไร
อ่านค่า Abilities
ทำงานยังไง
คืนค่า: this.abilities.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getAbsorptionAmount()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1837 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Absorption Amount
ทำงานยังไง
เรียกต่อ: getEntityData(), get(). คืนค่า: this.getEntityData().get(DATA_PLAYER_ABSORPTION_ID).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getArmorSlots()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1740 - Modifiers:
public - Return:
Iterable<ItemStack>
คืออะไร
อ่านค่า Armor Slots
ทำงานยังไง
คืนค่า: this.inventory.armor.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getAttackStrengthScale(float)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1930 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Attack Strength Scale
ทำงานยังไง
เรียกต่อ: clamp(), getCurrentItemAttackStrengthDelay(). คืนค่า: Mth.clamp((this.attackStrengthTicker + f) / this.getCurrentItemAttackStrengthDelay(), 0.0F, 1.0F).
Parameters
float f
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getBaseExperienceReward(ServerLevel)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1671 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Base Experience Reward
ทำงานยังไง
เรียกต่อ: getGameRules(), getBoolean(), isSpectator(), min(). คืนค่า: !serverLevel.getGameRules().getBoolean(GameRules.RULE_KEEPINVENTORY) && !this.isSpectator() ? Math.min(this.experienceLevel * 7, 100) : 0.
Parameters
ServerLevel serverLevel
ตัวอย่างใช้งาน
ServerLevel serverLevel = ...;
@Override
protected int getBaseExperienceReward(ServerLevel serverLevel) {
return super.getBaseExperienceReward(serverLevel);
}
net.minecraft.world.entity.player.Player#getBlockSpeedFactor()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1942 - Modifiers:
protected - Return:
float
คืออะไร
อ่านค่า Block Speed Factor
ทำงานยังไง
เรียกต่อ: isFallFlying(). คืนค่า: !this.abilities.flying && !this.isFallFlying() ? super.getBlockSpeedFactor() : 1.0F.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getCooldowns()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1938 - Modifiers:
public - Return:
ItemCooldowns
คืออะไร
อ่านค่า Cooldowns
ทำงานยังไง
คืนค่า: this.cooldowns.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getCurrentItemAttackStrengthDelay()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1926 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Current Item Attack Strength Delay
ทำงานยังไง
เรียกต่อ: getAttributeValue(). คืนค่า: (float)(1.0 / this.getAttributeValue(Attributes.ATTACK_SPEED) * 20.0).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getDeathSound()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:709 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Death Sound
ทำงานยังไง
คืนค่า: SoundEvents.PLAYER_DEATH.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getDefaultDimensions(Pose)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1963 - Modifiers:
public - Return:
EntityDimensions
คืออะไร
อ่านค่า Default Dimensions
ทำงานยังไง
เรียกต่อ: getOrDefault(). คืนค่า: POSES.getOrDefault(pose, STANDING_DIMENSIONS).
Parameters
Pose pose
ตัวอย่างใช้งาน
Player instance = ...;
Pose pose = ...;
EntityDimensions result = instance.getDefaultDimensions(pose);
net.minecraft.world.entity.player.Player#getDestroySpeed(BlockState)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:731 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Destroy Speed
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; แยกกรณีด้วย switch. เรียกต่อ: getAttributeValue(), hasDigSpeed(), getDigSpeedAmplification(), hasEffect(), getEffect(), getAmplifier(), isEyeInFluid(), getAttribute(). คืนค่า: f.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
Player instance = ...;
BlockState blockState = ...;
float result = instance.getDestroySpeed(blockState);
net.minecraft.world.entity.player.Player#getDimensionChangingDelay()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:483 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Dimension Changing Delay
ทำงานยังไง
คืนค่า: 10.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getDismountPoses()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1968 - Modifiers:
public - Return:
ImmutableList<Pose>
คืออะไร
อ่านค่า Dismount Poses
ทำงานยังไง
เรียกต่อ: of(). คืนค่า: ImmutableList.of(Pose.STANDING, Pose.CROUCHING, Pose.SWIMMING).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getDisplayName()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1812 - Modifiers:
public - Return:
Component
คืออะไร
อ่านค่า Display Name
ทำงานยังไง
เรียกต่อ: formatNameForTeam(), getTeam(), getName(), decorateDisplayNameComponent(). คืนค่า: this.decorateDisplayNameComponent(mutableComponent).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getEnchantedDamage(Entity,float,DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1292 - Modifiers:
protected - Return:
float
คืออะไร
อ่านค่า Enchanted Damage
ทำงานยังไง
คืนค่า: f.
Parameters
Entity entityfloat fDamageSource damageSource
ตัวอย่างใช้งาน
Entity entity = ...;
DamageSource damageSource = ...;
@Override
protected float getEnchantedDamage(Entity entity, float f, DamageSource damageSource) {
return super.getEnchantedDamage(entity, f, damageSource);
}
net.minecraft.world.entity.player.Player#getEnchantmentSeed()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1595 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Enchantment Seed
ทำงานยังไง
คืนค่า: this.enchantmentSeed.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getEnderChestInventory()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1699 - Modifiers:
public - Return:
PlayerEnderChestContainer
คืออะไร
อ่านค่า Ender Chest Inventory
ทำงานยังไง
คืนค่า: this.enderChestInventory.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getFallSounds()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1552 - Modifiers:
public - Return:
LivingEntity.Fallsounds
คืออะไร
อ่านค่า Fall Sounds
ทำงานยังไง
เรียกต่อ: Fallsounds(). สร้างออบเจ็กต์: LivingEntity.Fallsounds. คืนค่า: new LivingEntity.Fallsounds(SoundEvents.PLAYER_SMALL_FALL, SoundEvents.PLAYER_BIG_FALL).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getFireImmuneTicks()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:501 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Fire Immune Ticks
ทำงานยังไง
คืนค่า: 20.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getFlyingSpeed()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:2066 - Modifiers:
protected - Return:
float
คืออะไร
อ่านค่า Flying Speed
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isPassenger(), isSprinting(). มีจุด return อย่างน้อย 2 จุด.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getFoodData()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1645 - Modifiers:
public - Return:
FoodData
คืออะไร
อ่านค่า Food Data
ทำงานยังไง
คืนค่า: this.foodData.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getGameProfile()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1337 - Modifiers:
public - Return:
GameProfile
คืออะไร
อ่านค่า Game Profile
ทำงานยังไง
คืนค่า: this.gameProfile.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getHandSlots()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1735 - Modifiers:
public - Return:
Iterable<ItemStack>
คืออะไร
อ่านค่า Hand Slots
ทำงานยังไง
เรียกต่อ: newArrayList(), getMainHandItem(), getOffhandItem(). คืนค่า: Lists.newArrayList(this.getMainHandItem(), this.getOffhandItem()).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getHurtDir()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:2050 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Hurt Dir
ทำงานยังไง
คืนค่า: this.hurtDir.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getHurtSound(DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:704 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Hurt Sound
ทำงานยังไง
เรียกต่อ: type(), effects(), sound(). คืนค่า: damageSource.type().effects().sound().
Parameters
DamageSource damageSource
ตัวอย่างใช้งาน
DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
return super.getHurtSound(damageSource);
}
net.minecraft.world.entity.player.Player#getInventory()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1341 - Modifiers:
public - Return:
Inventory
คืออะไร
อ่านค่า Inventory
ทำงานยังไง
คืนค่า: this.inventory.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getItemBySlot(EquipmentSlot)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1703 - Modifiers:
public - Return:
ItemStack
คืออะไร
อ่านค่า Item By Slot
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getSelected(), getFirst(), getType(), get(), getIndex(). มีจุด return อย่างน้อย 3 จุด.
Parameters
EquipmentSlot equipmentSlot
ตัวอย่างใช้งาน
Player instance = ...;
EquipmentSlot equipmentSlot = ...;
ItemStack result = instance.getItemBySlot(equipmentSlot);
net.minecraft.world.entity.player.Player#getLastDeathLocation()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:2042 - Modifiers:
public - Return:
Optional<GlobalPos>
คืออะไร
อ่านค่า Last Death Location
ทำงานยังไง
คืนค่า: this.lastDeathLocation.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getLuck()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1947 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Luck
ทำงานยังไง
เรียกต่อ: getAttributeValue(). คืนค่า: (float)this.getAttributeValue(Attributes.LUCK).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getMainArm()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1901 - Modifiers:
public - Return:
HumanoidArm
คืออะไร
อ่านค่า Main Arm
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: this.entityData.get(DATA_PLAYER_MAIN_HAND) == 0 ? HumanoidArm.LEFT : HumanoidArm.RIGHT.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getMaxHeadRotationRelativeToBody()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:335 - Modifiers:
protected - Return:
float
คืออะไร
อ่านค่า Max Head Rotation Relative To Body
ทำงานยังไง
เรียกต่อ: isBlocking(). คืนค่า: this.isBlocking() ? 15.0F : super.getMaxHeadRotationRelativeToBody().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
@Override
protected float getMaxHeadRotationRelativeToBody() {
return super.getMaxHeadRotationRelativeToBody();
}
net.minecraft.world.entity.player.Player#getMovementEmission()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1686 - Modifiers:
protected - Return:
Entity.MovementEmission
คืออะไร
อ่านค่า Movement Emission
ทำงานยังไง
เรียกต่อ: onGround(), isDiscrete(). คืนค่า: this.abilities.flying || this.onGround() && this.isDiscrete() ? Entity.MovementEmission.NONE : Entity.MovementEmission.ALL.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
@Override
protected Entity.MovementEmission getMovementEmission() {
return super.getMovementEmission();
}
net.minecraft.world.entity.player.Player#getName()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1694 - Modifiers:
public - Return:
Component
คืออะไร
อ่านค่า Name
ทำงานยังไง
เรียกต่อ: literal(). คืนค่า: Component.literal(this.gameProfile.getName()).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getPermissionLevel()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1955 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Permission Level
ทำงานยังไง
คืนค่า: 0.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getProjectile(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1973 - Modifiers:
public - Return:
ItemStack
คืออะไร
อ่านค่า Projectile
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getItem(), getSupportedHeldProjectiles(), getHeldProjectile(), isEmpty(), getAllSupportedProjectiles(), getContainerSize(), test(). สร้างออบเจ็กต์: ItemStack. มีจุด return อย่างน้อย 4 จุด.
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
Player instance = ...;
ItemStack itemStack = ...;
ItemStack result = instance.getProjectile(itemStack);
net.minecraft.world.entity.player.Player#getRopeHoldPosition(float)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1997 - Modifiers:
public - Return:
Vec3
คืออะไร
อ่านค่า Rope Hold Position
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getMainArm(), lerp(), getXRot(), isFallFlying(), isAutoSpinAttack(), getViewVector(), getDeltaMovement(), horizontalDistanceSqr(). สร้างออบเจ็กต์: Vec3. มีจุด return อย่างน้อย 3 จุด.
Parameters
float f
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getScore()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:631 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Score
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: this.entityData.get(DATA_SCORE_ID).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getScoreboard()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1808 - Modifiers:
public - Return:
Scoreboard
คืออะไร
อ่านค่า Scoreboard
ทำงานยังไง
เรียกต่อ: level(). คืนค่า: this.level().getScoreboard().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getScoreboardName()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1827 - Modifiers:
public - Return:
String
คืออะไร
อ่านค่า Scoreboard Name
ทำงานยังไง
เรียกต่อ: getGameProfile(), getName(). คืนค่า: this.getGameProfile().getName().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getShoulderEntityLeft()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1910 - Modifiers:
public - Return:
CompoundTag
คืออะไร
อ่านค่า Shoulder Entity Left
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: this.entityData.get(DATA_SHOULDER_LEFT).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getShoulderEntityRight()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1918 - Modifiers:
public - Return:
CompoundTag
คืออะไร
อ่านค่า Shoulder Entity Right
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: this.entityData.get(DATA_SHOULDER_RIGHT).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getSleepTimer()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1389 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Sleep Timer
ทำงานยังไง
คืนค่า: this.sleepCounter.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getSlot(int)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1846 - Modifiers:
public - Return:
SlotAccess
คืออะไร
อ่านค่า Slot
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: get(), getCarried(), set(), setCarried(), getCraftSlots(), getItem(), setItem(), slotsChanged(). สร้างออบเจ็กต์: SlotAccess. มีจุด return อย่างน้อย 6 จุด.
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getSoundSource()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:496 - Modifiers:
public - Return:
SoundSource
คืออะไร
อ่านค่า Sound Source
ทำงานยังไง
คืนค่า: SoundSource.PLAYERS.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getSpeed()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1470 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Speed
ทำงานยังไง
เรียกต่อ: getAttributeValue(). คืนค่า: (float)this.getAttributeValue(Attributes.MOVEMENT_SPEED).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getSwimHighSpeedSplashSound()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:478 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Swim High Speed Splash Sound
ทำงานยังไง
คืนค่า: SoundEvents.PLAYER_SPLASH_HIGH_SPEED.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
@Override
protected SoundEvent getSwimHighSpeedSplashSound() {
return super.getSwimHighSpeedSplashSound();
}
net.minecraft.world.entity.player.Player#getSwimSound()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:468 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Swim Sound
ทำงานยังไง
คืนค่า: SoundEvents.PLAYER_SWIM.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getSwimSplashSound()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:473 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Swim Splash Sound
ทำงานยังไง
คืนค่า: SoundEvents.PLAYER_SPLASH.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getWardenSpawnTracker()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1641 - Modifiers:
public - Return:
Optional<WardenSpawnTracker>
คืออะไร
อ่านค่า Warden Spawn Tracker
ทำงานยังไง
เรียกต่อ: empty(). คืนค่า: Optional.empty().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getWeaponItem()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:654 - Modifiers:
public - Return:
ItemStack
คืออะไร
อ่านค่า Weapon Item
ทำงานยังไง
เรียกต่อ: isAutoSpinAttack(). คืนค่า: this.isAutoSpinAttack() && this.autoSpinAttackItemStack != null ? this.autoSpinAttackItemStack : super.getWeaponItem().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#getXpNeededForNextLevel()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1625 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Xp Needed For Next Level
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. มีจุด return อย่างน้อย 2 จุด.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#giveExperienceLevels(int)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1610 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ giveExperienceLevels ตาม implementation ของ Player
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: experienceLevel, experienceProgress, totalExperience, lastLevelUpTime. เรียกต่อ: saturatedAdd(), level(), playSound(), getX(), getY(), getZ(), getSoundSource().
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#giveExperiencePoints(int)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1572 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ giveExperiencePoints ตาม implementation ของ Player
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: experienceProgress, totalExperience. เรียกต่อ: increaseScore(), getXpNeededForNextLevel(), clamp(), giveExperienceLevels().
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#handleCreativeModeItemDrop(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:714 - Modifiers:
public - Return:
void
คืออะไร
จัดการ Creative Mode Item Drop
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#handleEntityEvent(byte)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:506 - Modifiers:
public - Return:
void
คืออะไร
จัดการ Entity Event
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: reducedDebugInfo. เรียกต่อ: completeUsingItem().
Parameters
byte b
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#hasClientLoaded()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:2075 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Client Loaded
ทำงานยังไง
คืนค่า: this.clientLoaded || this.clientLoadedTimeoutTimer <= 0.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#hasContainerOpen()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1357 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Container Open
ทำงานยังไง
คืนค่า: this.containerMenu != this.inventoryMenu.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#hasCorrectToolForDrops(BlockState)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:763 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Correct Tool For Drops
ทำงานยังไง
เรียกต่อ: requiresCorrectToolForDrops(), getSelected(), isCorrectToolForDrops(). คืนค่า: !blockState.requiresCorrectToolForDrops() || this.inventory.getSelected().isCorrectToolForDrops(blockState).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
Player instance = ...;
BlockState blockState = ...;
boolean result = instance.hasCorrectToolForDrops(blockState);
net.minecraft.world.entity.player.Player#hasInfiniteMaterials()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1349 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Infinite Materials
ทำงานยังไง
คืนค่า: this.abilities.instabuild.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#hasPermissions(int)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1959 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Permissions
ทำงานยังไง
เรียกต่อ: getPermissionLevel(). คืนค่า: this.getPermissionLevel() >= i.
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#hurtArmor(DamageSource,float)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:920 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผลความเสียหาย Armor
ทำงานยังไง
เรียกต่อ: doHurtEquipment().
Parameters
DamageSource damageSourcefloat f
ตัวอย่างใช้งาน
DamageSource damageSource = ...;
@Override
protected void hurtArmor(DamageSource damageSource, float f) {
super.hurtArmor(damageSource, f);
}
net.minecraft.world.entity.player.Player#hurtCurrentlyUsedShield(float)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:930 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผลความเสียหาย Currently Used Shield
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: useItem. เรียกต่อ: is(), level(), awardStat(), get(), getItem(), floor(), getUsedItemHand(), hurtAndBreak().
Parameters
float f
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#hurtHelmet(DamageSource,float)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:925 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผลความเสียหาย Helmet
ทำงานยังไง
เรียกต่อ: doHurtEquipment().
Parameters
DamageSource damageSourcefloat f
ตัวอย่างใช้งาน
DamageSource damageSource = ...;
@Override
protected void hurtHelmet(DamageSource damageSource, float f) {
super.hurtHelmet(damageSource, f);
}
net.minecraft.world.entity.player.Player#hurtServer(ServerLevel,DamageSource,float)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:863 - Modifiers:
public - Return:
boolean
คืออะไร
ประมวลผลความเสียหาย Server
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: noActionTime. เรียกต่อ: isInvulnerableTo(), is(), isDeadOrDying(), removeEntitiesOnShoulder(), scalesWithDifficulty(), getDifficulty(), min(). มีจุด return อย่างน้อย 4 จุด.
Parameters
ServerLevel serverLevelDamageSource damageSourcefloat f
ตัวอย่างใช้งาน
Player instance = ...;
ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
boolean result = instance.hurtServer(serverLevel, damageSource, 0.0F);
net.minecraft.world.entity.player.Player#increaseScore(int)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:639 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ increaseScore ตาม implementation ของ Player
ทำงานยังไง
เรียกต่อ: getScore(), set().
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#interactOn(Entity,InteractionHand)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1013 - Modifiers:
public - Return:
InteractionResult
คืออะไร
จัดการ interaction On
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isSpectator(), openMenu(), getItemInHand(), copy(), interact(), consumesAction(), getCount(), setCount(). มีจุด return อย่างน้อย 4 จุด.
Parameters
Entity entityInteractionHand interactionHand
ตัวอย่างใช้งาน
Player instance = ...;
Entity entity = ...;
InteractionHand interactionHand = ...;
InteractionResult result = instance.interactOn(entity, interactionHand);
net.minecraft.world.entity.player.Player#internalSetAbsorptionAmount(float)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1832 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ internalSetAbsorptionAmount ตาม implementation ของ Player
ทำงานยังไง
เรียกต่อ: getEntityData(), set().
Parameters
float f
ตัวอย่างใช้งาน
@Override
protected void internalSetAbsorptionAmount(float f) {
super.internalSetAbsorptionAmount(f);
}
net.minecraft.world.entity.player.Player#isAffectedByFluids()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1063 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Affected By Fluids
ทำงานยังไง
คืนค่า: !this.abilities.flying.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#isAlwaysExperienceDropper()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1676 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Always Experience Dropper
ทำงานยังไง
คืนค่า: true.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
@Override
protected boolean isAlwaysExperienceDropper() {
return super.isAlwaysExperienceDropper();
}
net.minecraft.world.entity.player.Player#isAlwaysTicking()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:2028 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Always Ticking
ทำงานยังไง
คืนค่า: true.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#isControlledByClient()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:2144 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Controlled By Client
ทำงานยังไง
คืนค่า: true.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#isCreative()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1801 - Modifiers:
public abstract - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Creative
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#isHurt()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1653 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Hurt
ทำงานยังไง
เรียกต่อ: getHealth(), getMaxHealth(). คืนค่า: this.getHealth() > 0.0F && this.getHealth() < this.getMaxHealth().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#isIgnoringFallDamageFromCurrentImpulse()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:2123 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Ignoring Fall Damage From Current Impulse
ทำงานยังไง
คืนค่า: this.ignoreFallDamageFromCurrentImpulse.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#isImmobile()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1058 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Immobile
ทำงานยังไง
เรียกต่อ: isSleeping(). คืนค่า: super.isImmobile() || this.isSleeping().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#isInvulnerableTo(ServerLevel,DamageSource)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:848 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Invulnerable To
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), getGameRules(), getBoolean(). มีจุด return อย่างน้อย 5 จุด.
Parameters
ServerLevel serverLevelDamageSource damageSource
ตัวอย่างใช้งาน
Player instance = ...;
ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
boolean result = instance.isInvulnerableTo(serverLevel, damageSource);
net.minecraft.world.entity.player.Player#isLocalPlayer()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1333 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Local Player
ทำงานยังไง
คืนค่า: false.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#isModelPartShown(PlayerModelPart)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1842 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Model Part Shown
ทำงานยังไง
เรียกต่อ: getEntityData(), get(), getMask(). คืนค่า: (this.getEntityData().get(DATA_PLAYER_MODE_CUSTOMISATION) & playerModelPart.getMask()) == playerModelPart.getMask().
Parameters
PlayerModelPart playerModelPart
ตัวอย่างใช้งาน
Player instance = ...;
PlayerModelPart playerModelPart = ...;
boolean result = instance.isModelPartShown(playerModelPart);
net.minecraft.world.entity.player.Player#isPushedByFluid()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1803 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pushed By Fluid
ทำงานยังไง
คืนค่า: !this.abilities.flying.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#isReducedDebugInfo()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1888 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Reduced Debug Info
ทำงานยังไง
คืนค่า: this.reducedDebugInfo.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#isScoping()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:2033 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Scoping
ทำงานยังไง
เรียกต่อ: isUsingItem(), getUseItem(), is(). คืนค่า: this.isUsingItem() && this.getUseItem().is(Items.SPYGLASS).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#isSecondaryUseActive()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:340 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Secondary Use Active
ทำงานยังไง
เรียกต่อ: isShiftKeyDown(). คืนค่า: this.isShiftKeyDown().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#isSleepingLongEnough()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1385 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Sleeping Long Enough
ทำงานยังไง
เรียกต่อ: isSleeping(). คืนค่า: this.isSleeping() && this.sleepCounter >= 100.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#isSpectator()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1788 - Modifiers:
public abstract - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Spectator
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#isStayingOnGroundSurface()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:348 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Staying On Ground Surface
ทำงานยังไง
เรียกต่อ: isShiftKeyDown(). คืนค่า: this.isShiftKeyDown().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#isSwimming()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1796 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Swimming
ทำงานยังไง
เรียกต่อ: isSpectator(). คืนค่า: !this.abilities.flying && !this.isSpectator() && super.isSwimming().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#isTextFilteringEnabled()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:981 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Text Filtering Enabled
ทำงานยังไง
คืนค่า: false.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#killedEntity(ServerLevel,LivingEntity)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1557 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ killedEntity ตาม implementation ของ Player
ทำงานยังไง
เรียกต่อ: awardStat(), get(), getType(). คืนค่า: true.
Parameters
ServerLevel serverLevelLivingEntity livingEntity
ตัวอย่างใช้งาน
Player instance = ...;
ServerLevel serverLevel = ...;
LivingEntity livingEntity = ...;
boolean result = instance.killedEntity(serverLevel, livingEntity);
net.minecraft.world.entity.player.Player#magicCrit(Entity)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1310 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ magicCrit ตาม implementation ของ Player
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
Entity entity
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#makeStuckInBlock(BlockState,Vec3)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1563 - Modifiers:
public - Return:
void
คืออะไร
สร้าง Stuck In Block
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: tryResetCurrentImpulseContext().
Parameters
BlockState blockStateVec3 vec3
ตัวอย่างใช้งาน
Player instance = ...;
BlockState blockState = ...;
Vec3 vec3 = ...;
instance.makeStuckInBlock(blockState, vec3);
net.minecraft.world.entity.player.Player#maybeBackOffFromEdge(Vec3,MoverType)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1068 - Modifiers:
protected - Return:
Vec3
คืออะไร
ดำเนินการ maybeBackOffFromEdge ตาม implementation ของ Player
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: maxUpStep(), isStayingOnGroundSurface(), isAboveGround(), signum(), canFallAtLeast(), abs(). สร้างออบเจ็กต์: Vec3. มีจุด return อย่างน้อย 2 จุด.
Parameters
Vec3 vec3MoverType moverType
ตัวอย่างใช้งาน
Vec3 vec3 = ...;
MoverType moverType = ...;
@Override
protected Vec3 maybeBackOffFromEdge(Vec3 vec3, MoverType moverType) {
return super.maybeBackOffFromEdge(vec3, moverType);
}
net.minecraft.world.entity.player.Player#mayBuild()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1657 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ mayBuild ตาม implementation ของ Player
ทำงานยังไง
คืนค่า: this.abilities.mayBuild.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#mayUseItemAt(BlockPos,Direction,ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1661 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ mayUseItemAt ตาม implementation ของ Player
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: relative(), getOpposite(), level(), canPlaceOnBlockInAdventureMode(). สร้างออบเจ็กต์: BlockInWorld. มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockPos blockPosDirection directionItemStack itemStack
ตัวอย่างใช้งาน
Player instance = ...;
BlockPos blockPos = ...;
Direction direction = ...;
ItemStack itemStack = ...;
boolean result = instance.mayUseItemAt(blockPos, direction, itemStack);
net.minecraft.world.entity.player.Player#onAboveBubbleCol(boolean)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:357 - Modifiers:
public - Return:
void
คืออะไร
จัดการเหตุการณ์ Above Bubble Col
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getAbilities().
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#onClimbable()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:2149 - Modifiers:
public - Return:
boolean
คืออะไร
จัดการเหตุการณ์ Climbable
ทำงานยังไง
คืนค่า: this.abilities.flying ? false : super.onClimbable().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#onEnchantmentPerformed(ItemStack,int)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1599 - Modifiers:
public - Return:
void
คืออะไร
จัดการเหตุการณ์ Enchantment Performed
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: experienceLevel, experienceProgress, totalExperience, enchantmentSeed. เรียกต่อ: nextInt().
Parameters
ItemStack itemStackint i
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#onInsideBubbleColumn(boolean)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:364 - Modifiers:
public - Return:
void
คืออะไร
จัดการเหตุการณ์ Inside Bubble Column
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getAbilities().
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#onUpdateAbilities()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1691 - Modifiers:
public - Return:
void
คืออะไร
จัดการเหตุการณ์ Update Abilities
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#openCommandBlock(CommandBlockEntity)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:991 - Modifiers:
public - Return:
void
คืออะไร
เปิด Command Block
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
CommandBlockEntity commandBlockEntity
ตัวอย่างใช้งาน
Player instance = ...;
CommandBlockEntity commandBlockEntity = ...;
instance.openCommandBlock(commandBlockEntity);
net.minecraft.world.entity.player.Player#openHorseInventory(AbstractHorse,Container)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1000 - Modifiers:
public - Return:
void
คืออะไร
เปิด Horse Inventory
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
AbstractHorse abstractHorseContainer container
ตัวอย่างใช้งาน
Player instance = ...;
AbstractHorse abstractHorse = ...;
Container container = ...;
instance.openHorseInventory(abstractHorse, container);
net.minecraft.world.entity.player.Player#openItemGui(ItemStack,InteractionHand)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1010 - Modifiers:
public - Return:
void
คืออะไร
เปิด Item Gui
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
ItemStack itemStackInteractionHand interactionHand
ตัวอย่างใช้งาน
Player instance = ...;
ItemStack itemStack = ...;
InteractionHand interactionHand = ...;
instance.openItemGui(itemStack, interactionHand);
net.minecraft.world.entity.player.Player#openJigsawBlock(JigsawBlockEntity)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:997 - Modifiers:
public - Return:
void
คืออะไร
เปิด Jigsaw Block
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
JigsawBlockEntity jigsawBlockEntity
ตัวอย่างใช้งาน
Player instance = ...;
JigsawBlockEntity jigsawBlockEntity = ...;
instance.openJigsawBlock(jigsawBlockEntity);
net.minecraft.world.entity.player.Player#openMenu(MenuProvider)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1003 - Modifiers:
public - Return:
OptionalInt
คืออะไร
เปิด Menu
ทำงานยังไง
เรียกต่อ: empty(). คืนค่า: OptionalInt.empty().
Parameters
MenuProvider menuProvider
ตัวอย่างใช้งาน
Player instance = ...;
MenuProvider menuProvider = ...;
OptionalInt result = instance.openMenu(menuProvider);
net.minecraft.world.entity.player.Player#openMinecartCommandBlock(BaseCommandBlock)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:988 - Modifiers:
public - Return:
void
คืออะไร
เปิด Minecart Command Block
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BaseCommandBlock baseCommandBlock
ตัวอย่างใช้งาน
Player instance = ...;
BaseCommandBlock baseCommandBlock = ...;
instance.openMinecartCommandBlock(baseCommandBlock);
net.minecraft.world.entity.player.Player#openStructureBlock(StructureBlockEntity)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:994 - Modifiers:
public - Return:
void
คืออะไร
เปิด Structure Block
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
StructureBlockEntity structureBlockEntity
ตัวอย่างใช้งาน
Player instance = ...;
StructureBlockEntity structureBlockEntity = ...;
instance.openStructureBlock(structureBlockEntity);
net.minecraft.world.entity.player.Player#openTextEdit(SignBlockEntity,boolean)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:985 - Modifiers:
public - Return:
void
คืออะไร
เปิด Text Edit
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
SignBlockEntity signBlockEntityboolean bl
ตัวอย่างใช้งาน
Player instance = ...;
SignBlockEntity signBlockEntity = ...;
instance.openTextEdit(signBlockEntity, true);
net.minecraft.world.entity.player.Player#Player(Level,BlockPos,float,GameProfile)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:202 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ Player ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: gameProfile, inventoryMenu, containerMenu, rotOffs. เรียกต่อ: setUUID(), getId(), moveTo(), getX(), getY(), getZ(). สร้างออบเจ็กต์: InventoryMenu.
Parameters
Level levelBlockPos blockPosfloat fGameProfile gameProfile
ตัวอย่างใช้งาน
Level level = ...;
BlockPos blockPos = ...;
GameProfile gameProfile = ...;
Player instance = new Player(level, blockPos, 0.0F, gameProfile);
net.minecraft.world.entity.player.Player#playNotifySound(SoundEvent,SoundSource,float,float)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:493 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ playNotifySound ตาม implementation ของ Player
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
SoundEvent soundEventSoundSource soundSourcefloat ffloat g
ตัวอย่างใช้งาน
Player instance = ...;
SoundEvent soundEvent = ...;
SoundSource soundSource = ...;
instance.playNotifySound(soundEvent, soundSource, 0.0F, 0.0F);
net.minecraft.world.entity.player.Player#playSound(SoundEvent,float,float)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:488 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ playSound ตาม implementation ของ Player
ทำงานยังไง
เรียกต่อ: level(), getX(), getY(), getZ(), getSoundSource().
Parameters
SoundEvent soundEventfloat ffloat g
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#playStepSound(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1532 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ playStepSound ตาม implementation ของ Player
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isInWater(), waterSwimSound(), playMuffledStepSound(), getPrimaryStepSoundBlockPos(), equals(), level(), getBlockState(), is().
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected void playStepSound(BlockPos blockPos, BlockState blockState) {
super.playStepSound(blockPos, blockState);
}
net.minecraft.world.entity.player.Player#readAdditionalSaveData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:767 - Modifiers:
public - Return:
void
คืออะไร
อ่าน Additional Save Data
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: sleepCounter, experienceProgress, experienceLevel, totalExperience, enchantmentSeed, currentImpulseImpactPos. เรียกต่อ: setUUID(), getId(), getList(), load(), getInt(), getShort(), getFloat(), nextInt().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#remove(Entity.RemovalReason)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1324 - Modifiers:
public - Return:
void
คืออะไร
ลบ remove
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: removed(), hasContainerOpen(), doCloseContainer().
Parameters
Entity.RemovalReason removalReason
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#removeEntitiesOnShoulder()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1766 - Modifiers:
protected - Return:
void
คืออะไร
ลบ Entities On Shoulder
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: level(), getGameTime(), respawnEntityOnShoulder(), getShoulderEntityLeft(), setShoulderEntityLeft(), getShoulderEntityRight(), setShoulderEntityRight(). สร้างออบเจ็กต์: CompoundTag.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#removeVehicle()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1052 - Modifiers:
public - Return:
void
คืออะไร
ลบ Vehicle
ทำงานยังไง
แก้ state: boardingCooldown.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#resetAttackStrengthTicker()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1934 - Modifiers:
public - Return:
void
คืออะไร
รีเซ็ต Attack Strength Ticker
ทำงานยังไง
แก้ state: attackStrengthTicker.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#resetCurrentImpulseContext()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:2133 - Modifiers:
public - Return:
void
คืออะไร
รีเซ็ต Current Impulse Context
ทำงานยังไง
แก้ state: currentImpulseContextResetGraceTime, currentExplosionCause, currentImpulseImpactPos, ignoreFallDamageFromCurrentImpulse.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#resetRecipes(Collection<RecipeHolder<?>>)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1424 - Modifiers:
public - Return:
int
คืออะไร
รีเซ็ต Recipes
ทำงานยังไง
คืนค่า: 0.
Parameters
Collection<RecipeHolder<?>> collection
ตัวอย่างใช้งาน
Player instance = ...;
Collection<RecipeHolder<?>> collection = ...;
int result = instance.resetRecipes(collection);
net.minecraft.world.entity.player.Player#resetStat(Stat<?>)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1411 - Modifiers:
public - Return:
void
คืออะไร
รีเซ็ต Stat
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
Stat<?> stat
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#respawn()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1321 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ respawn ตาม implementation ของ Player
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#rideTick()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:526 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ rideTick ตาม implementation ของ Player
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: oBob, bob. เรียกต่อ: level(), wantsToStopRiding(), isPassenger(), stopRiding(), setShiftKeyDown().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#sendMerchantOffers(int,MerchantOffers,int,int,boolean,boolean)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1007 - Modifiers:
public - Return:
void
คืออะไร
ส่ง Merchant Offers
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
int iMerchantOffers merchantOffersint jint kboolean blboolean bl2
ตัวอย่างใช้งาน
Player instance = ...;
MerchantOffers merchantOffers = ...;
instance.sendMerchantOffers(0, merchantOffers, 0, 0, true, true);
net.minecraft.world.entity.player.Player#serverAiStep()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:538 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ serverAiStep ตาม implementation ของ Player
ทำงานยังไง
แก้ state: yHeadRot. เรียกต่อ: updateSwingTime(), getYRot().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#setClientLoaded(boolean)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:2085 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Client Loaded
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: clientLoaded, clientLoadedTimeoutTimer.
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#setEntityOnShoulder(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1750 - Modifiers:
public - Return:
boolean
คืออะไร
กำหนดค่า Entity On Shoulder
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: timeEntitySatOnShoulder. เรียกต่อ: isPassenger(), onGround(), isInWater(), getShoulderEntityLeft(), isEmpty(), setShoulderEntityLeft(), level(), getGameTime(). มีจุด return อย่างน้อย 4 จุด.
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
Player instance = ...;
CompoundTag compoundTag = ...;
boolean result = instance.setEntityOnShoulder(compoundTag);
net.minecraft.world.entity.player.Player#setIgnoreFallDamageFromCurrentImpulse(boolean)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:2114 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Ignore Fall Damage From Current Impulse
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: ignoreFallDamageFromCurrentImpulse, currentImpulseContextResetGraceTime.
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#setItemSlot(EquipmentSlot,ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1719 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Item Slot
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: verifyEquippedItem(), onEquipItem(), set(), getType(), getIndex().
Parameters
EquipmentSlot equipmentSlotItemStack itemStack
ตัวอย่างใช้งาน
Player instance = ...;
EquipmentSlot equipmentSlot = ...;
ItemStack itemStack = ...;
instance.setItemSlot(equipmentSlot, itemStack);
net.minecraft.world.entity.player.Player#setLastDeathLocation(Optional<GlobalPos>)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:2046 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Last Death Location
ทำงานยังไง
แก้ state: lastDeathLocation.
Parameters
Optional<GlobalPos> optional
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#setMainArm(HumanoidArm)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1906 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Main Arm
ทำงานยังไง
เรียกต่อ: set().
Parameters
HumanoidArm humanoidArm
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#setReducedDebugInfo(boolean)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1892 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Reduced Debug Info
ทำงานยังไง
แก้ state: reducedDebugInfo.
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#setRemainingFireTicks(int)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1896 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Remaining Fire Ticks
ทำงานยังไง
เรียกต่อ: min().
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#setScore(int)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:635 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Score
ทำงานยังไง
เรียกต่อ: set().
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#setShoulderEntityLeft(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1914 - Modifiers:
protected - Return:
void
คืออะไร
กำหนดค่า Shoulder Entity Left
ทำงานยังไง
เรียกต่อ: set().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
CompoundTag compoundTag = ...;
@Override
protected void setShoulderEntityLeft(CompoundTag compoundTag) {
super.setShoulderEntityLeft(compoundTag);
}
net.minecraft.world.entity.player.Player#setShoulderEntityRight(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1922 - Modifiers:
protected - Return:
void
คืออะไร
กำหนดค่า Shoulder Entity Right
ทำงานยังไง
เรียกต่อ: set().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
CompoundTag compoundTag = ...;
@Override
protected void setShoulderEntityRight(CompoundTag compoundTag) {
super.setShoulderEntityRight(compoundTag);
}
net.minecraft.world.entity.player.Player#shouldBeSaved()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:2037 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าควร Be Saved
ทำงานยังไง
คืนค่า: false.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#shouldRotateWithMinecart()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:2140 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าควร Rotate With Minecart
ทำงานยังไง
คืนค่า: false.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#shouldShowName()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1681 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าควร Show Name
ทำงานยังไง
คืนค่า: true.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#startAutoSpinAttack(int,float,ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:644 - Modifiers:
public - Return:
void
คืออะไร
เริ่ม Auto Spin Attack
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: autoSpinAttackTicks, autoSpinAttackDmg, autoSpinAttackItemStack. เรียกต่อ: level(), removeEntitiesOnShoulder(), setLivingEntityFlag().
Parameters
int ifloat fItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#startFallFlying()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1516 - Modifiers:
public - Return:
void
คืออะไร
เริ่ม Fall Flying
ทำงานยังไง
เรียกต่อ: setSharedFlag().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#startSleepInBed(BlockPos)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1365 - Modifiers:
public - Return:
Either<Player.BedSleepingProblem, Unit>
คืออะไร
เริ่ม Sleep In Bed
ทำงานยังไง
แก้ state: sleepCounter. เรียกต่อ: startSleeping(), right(). คืนค่า: Either.right(Unit.INSTANCE).
Parameters
BlockPos blockPos
ตัวอย่างใช้งาน
Player instance = ...;
BlockPos blockPos = ...;
Either<Player.BedSleepingProblem, Unit> result = instance.startSleepInBed(blockPos);
net.minecraft.world.entity.player.Player#stopFallFlying()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1520 - Modifiers:
public - Return:
void
คืออะไร
หยุด Fall Flying
ทำงานยังไง
เรียกต่อ: setSharedFlag().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#stopSleepInBed(boolean,boolean)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1371 - Modifiers:
public - Return:
void
คืออะไร
หยุด Sleep In Bed
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: sleepCounter. เรียกต่อ: stopSleeping(), level(), updateSleepingPlayerList().
Parameters
boolean blboolean bl2
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#stopSleeping()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1380 - Modifiers:
public - Return:
void
คืออะไร
หยุด Sleeping
ทำงานยังไง
เรียกต่อ: stopSleepInBed().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#sweepAttack()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1313 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ sweepAttack ตาม implementation ของ Player
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: sin(), getYRot(), cos(), level(), sendParticles(), getX(), getY(), getZ().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#tick()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:255 - Modifiers:
public - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: noPhysics, takeXpDelay, sleepCounter, containerMenu, attackStrengthTicker, lastItemInMainHand. เรียกต่อ: isSpectator(), isPassenger(), setOnGround(), isSleeping(), level(), isDay(), stopSleepInBed(), updateIsUnderwater().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#tickClientLoadTimeout()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:2079 - Modifiers:
public - Return:
void
คืออะไร
ประมวลผล tick Client Load Timeout
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: clientLoadedTimeoutTimer.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#tickRegeneration()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:599 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick Regeneration
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#travel(Vec3)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1428 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ travel ตาม implementation ของ Player
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isPassenger(), isSwimming(), getLookAngle(), level(), getFluidState(), containing(), getX(), getY().
Parameters
Vec3 vec3
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#triggerRecipeCrafted(RecipeHolder<?>,List<ItemStack>)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1418 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ triggerRecipeCrafted ตาม implementation ของ Player
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
RecipeHolder<?> recipeHolderList<ItemStack> list
ตัวอย่างใช้งาน
Player instance = ...;
RecipeHolder<?> recipeHolder = ...;
List<ItemStack> list = ...;
instance.triggerRecipeCrafted(recipeHolder, list);
net.minecraft.world.entity.player.Player#tryResetCurrentImpulseContext()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:2127 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ tryResetCurrentImpulseContext ตาม implementation ของ Player
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: currentImpulseContextResetGraceTime. เรียกต่อ: resetCurrentImpulseContext().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#tryToStartFallFlying()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1507 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ tryToStartFallFlying ตาม implementation ของ Player
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isFallFlying(), canGlide(), isInWater(), startFallFlying(). มีจุด return อย่างน้อย 2 จุด.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#updateIsUnderwater()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:352 - Modifiers:
protected - Return:
boolean
คืออะไร
อัปเดต Is Underwater
ทำงานยังไง
แก้ state: wasUnderwater. เรียกต่อ: isEyeInFluid(). คืนค่า: this.wasUnderwater.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#updatePlayerPose()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:434 - Modifiers:
protected - Return:
void
คืออะไร
อัปเดต Player Pose
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canPlayerFitWithinBlocksAndEntitiesWhen(), isFallFlying(), isSleeping(), isSwimming(), isAutoSpinAttack(), isShiftKeyDown(), isSpectator(), isPassenger().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#updateSwimming()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1457 - Modifiers:
public - Return:
void
คืออะไร
อัปเดต Swimming
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: setSwimming().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.Player#updateTutorialInventoryAction(ItemStack,ItemStack,ClickAction)
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:1354 - Modifiers:
public - Return:
void
คืออะไร
อัปเดต Tutorial Inventory Action
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
ItemStack itemStackItemStack itemStack2ClickAction clickAction
ตัวอย่างใช้งาน
Player instance = ...;
ItemStack itemStack = ...;
ItemStack itemStack2 = ...;
ClickAction clickAction = ...;
instance.updateTutorialInventoryAction(itemStack, itemStack2, clickAction);
net.minecraft.world.entity.player.Player#wantsToStopRiding()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:344 - Modifiers:
protected - Return:
boolean
คืออะไร
ดำเนินการ wantsToStopRiding ตาม implementation ของ Player
ทำงานยังไง
เรียกต่อ: isShiftKeyDown(). คืนค่า: this.isShiftKeyDown().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
Player$BedSleepingProblem
- Full name:
net.minecraft.world.entity.player.Player$BedSleepingProblem - Package:
net.minecraft.world.entity.player - Source:
common—net/minecraft/world/entity/player/Player.java - Type:
enum - Modifiers:
public
net.minecraft.world.entity.player.Player$BedSleepingProblem#getMessage()
- Origin:
common - Source:
net/minecraft/world/entity/player/Player.java:2173 - Modifiers:
public - Return:
Component
คืออะไร
อ่านค่า Message
ทำงานยังไง
คืนค่า: this.message.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
PlayerModelPart
- Full name:
net.minecraft.world.entity.player.PlayerModelPart - Package:
net.minecraft.world.entity.player - Source:
common—net/minecraft/world/entity/player/PlayerModelPart.java - Type:
enum - Modifiers:
public
net.minecraft.world.entity.player.PlayerModelPart#getBit()
- Origin:
common - Source:
net/minecraft/world/entity/player/PlayerModelPart.java:30 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Bit
ทำงานยังไง
คืนค่า: this.bit.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.PlayerModelPart#getId()
- Origin:
common - Source:
net/minecraft/world/entity/player/PlayerModelPart.java:34 - Modifiers:
public - Return:
String
คืออะไร
อ่านค่า Id
ทำงานยังไง
คืนค่า: this.id.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.PlayerModelPart#getMask()
- Origin:
common - Source:
net/minecraft/world/entity/player/PlayerModelPart.java:26 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Mask
ทำงานยังไง
คืนค่า: this.mask.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.PlayerModelPart#getName()
- Origin:
common - Source:
net/minecraft/world/entity/player/PlayerModelPart.java:38 - Modifiers:
public - Return:
Component
คืออะไร
อ่านค่า Name
ทำงานยังไง
คืนค่า: this.name.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
ProfileKeyPair
- Full name:
net.minecraft.world.entity.player.ProfileKeyPair - Package:
net.minecraft.world.entity.player - Source:
common—net/minecraft/world/entity/player/ProfileKeyPair.java - Type:
record - Modifiers:
public
net.minecraft.world.entity.player.ProfileKeyPair#dueRefresh()
- Origin:
common - Source:
net/minecraft/world/entity/player/ProfileKeyPair.java:20 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ dueRefresh ตาม implementation ของ ProfileKeyPair
ทำงานยังไง
เรียกต่อ: isBefore(), now(). คืนค่า: this.refreshedAfter.isBefore(Instant.now()).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
ProfilePublicKey
- Full name:
net.minecraft.world.entity.player.ProfilePublicKey - Package:
net.minecraft.world.entity.player - Source:
common—net/minecraft/world/entity/player/ProfilePublicKey.java - Type:
record - Modifiers:
public
net.minecraft.world.entity.player.ProfilePublicKey#createSignatureValidator()
- Origin:
common - Source:
net/minecraft/world/entity/player/ProfilePublicKey.java:33 - Modifiers:
public - Return:
SignatureValidator
คืออะไร
สร้าง Signature Validator
ทำงานยังไง
เรียกต่อ: from(). คืนค่า: SignatureValidator.from(this.data.key, "SHA256withRSA").
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.ProfilePublicKey#createValidated(SignatureValidator,UUID,ProfilePublicKey.Data)
- Origin:
common - Source:
net/minecraft/world/entity/player/ProfilePublicKey.java:25 - Modifiers:
public static - Return:
ProfilePublicKey
คืออะไร
สร้าง Validated
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: validateSignature(), ValidationException(). สร้างออบเจ็กต์: ProfilePublicKey.ValidationException, ProfilePublicKey. คืนค่า: new ProfilePublicKey(data).
Parameters
SignatureValidator signatureValidatorUUID uUIDProfilePublicKey.Data data
Throws
ProfilePublicKey.ValidationException
ตัวอย่างใช้งาน
SignatureValidator signatureValidator = ...;
UUID uUID = ...;
ProfilePublicKey.Data data = ...;
ProfilePublicKey result = ProfilePublicKey.createValidated(signatureValidator, uUID, data);
ProfilePublicKey$Data
- Full name:
net.minecraft.world.entity.player.ProfilePublicKey$Data - Package:
net.minecraft.world.entity.player - Source:
common—net/minecraft/world/entity/player/ProfilePublicKey.java - Type:
record - Modifiers:
public
net.minecraft.world.entity.player.ProfilePublicKey$Data#Data(FriendlyByteBuf)
- Origin:
common - Source:
net/minecraft/world/entity/player/ProfilePublicKey.java:48 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ ProfilePublicKey.Data ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: readInstant(), readPublicKey(), readByteArray().
Parameters
FriendlyByteBuf friendlyByteBuf
ตัวอย่างใช้งาน
FriendlyByteBuf friendlyByteBuf = ...;
ProfilePublicKey.Data instance = new ProfilePublicKey.Data(friendlyByteBuf);
net.minecraft.world.entity.player.ProfilePublicKey$Data#equals(Object)
- Origin:
common - Source:
net/minecraft/world/entity/player/ProfilePublicKey.java:78 - Modifiers:
public - Return:
boolean
คืออะไร
เปรียบเทียบความเท่ากัน equals
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
Object object
ตัวอย่างใช้งาน
ProfilePublicKey.Data instance = ...;
Object object = ...;
boolean result = instance.equals(object);
net.minecraft.world.entity.player.ProfilePublicKey$Data#hasExpired()
- Origin:
common - Source:
net/minecraft/world/entity/player/ProfilePublicKey.java:70 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Expired
ทำงานยังไง
เรียกต่อ: isBefore(), now(). คืนค่า: this.expiresAt.isBefore(Instant.now()).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.ProfilePublicKey$Data#hasExpired(Duration)
- Origin:
common - Source:
net/minecraft/world/entity/player/ProfilePublicKey.java:74 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Expired
ทำงานยังไง
เรียกต่อ: plus(), isBefore(), now(). คืนค่า: this.expiresAt.plus(duration).isBefore(Instant.now()).
Parameters
Duration duration
ตัวอย่างใช้งาน
ProfilePublicKey.Data instance = ...;
Duration duration = ...;
boolean result = instance.hasExpired(duration);
net.minecraft.world.entity.player.ProfilePublicKey$Data#write(FriendlyByteBuf)
- Origin:
common - Source:
net/minecraft/world/entity/player/ProfilePublicKey.java:52 - Modifiers:
public - Return:
void
คืออะไร
เขียน write
ทำงานยังไง
เรียกต่อ: writeInstant(), writePublicKey(), writeByteArray().
Parameters
FriendlyByteBuf friendlyByteBuf
ตัวอย่างใช้งาน
ProfilePublicKey.Data instance = ...;
FriendlyByteBuf friendlyByteBuf = ...;
instance.write(friendlyByteBuf);
ProfilePublicKey$ValidationException
- Full name:
net.minecraft.world.entity.player.ProfilePublicKey$ValidationException - Package:
net.minecraft.world.entity.player - Source:
common—net/minecraft/world/entity/player/ProfilePublicKey.java - Type:
class - Modifiers:
public static - Extends:
ThrowingComponent
net.minecraft.world.entity.player.ProfilePublicKey$ValidationException#ValidationException(Component)
- Origin:
common - Source:
net/minecraft/world/entity/player/ProfilePublicKey.java:87 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ ProfilePublicKey.ValidationException ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
Component component
ตัวอย่างใช้งาน
Component component = ...;
ProfilePublicKey.ValidationException instance = new ProfilePublicKey.ValidationException(component);
StackedContents
- Full name:
net.minecraft.world.entity.player.StackedContents - Package:
net.minecraft.world.entity.player - Source:
common—net/minecraft/world/entity/player/StackedContents.java - Type:
class - Modifiers:
public
net.minecraft.world.entity.player.StackedContents#account(T,int)
- Origin:
common - Source:
net/minecraft/world/entity/player/StackedContents.java:45 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ account ตาม implementation ของ StackedContents
ทำงานยังไง
เรียกต่อ: put().
Parameters
T objectint i
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.StackedContents#clear()
- Origin:
common - Source:
net/minecraft/world/entity/player/StackedContents.java:41 - Modifiers:
public - Return:
void
คืออะไร
ล้าง clear
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.StackedContents#getResultUpperBound(List<? extends StackedContents.IngredientInfo<T>>)
- Origin:
common - Source:
net/minecraft/world/entity/player/StackedContents.java:71 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Result Upper Bound
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: fastIterable(), getIntValue(), acceptsItem(), getKey(). คืนค่า: i.
Parameters
List<? extends StackedContents.IngredientInfo<T>> list
ตัวอย่างใช้งาน
StackedContents instance = ...;
List<? extends StackedContents.IngredientInfo<T>> list = ...;
int result = instance.getResultUpperBound(list);
net.minecraft.world.entity.player.StackedContents#tryPick(List<? extends StackedContents.IngredientInfo<T>>,int,StackedContents.Output<T>)
- Origin:
common - Source:
net/minecraft/world/entity/player/StackedContents.java:33 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ tryPick ตาม implementation ของ StackedContents
ทำงานยังไง
เรียกต่อ: RecipePicker(). สร้างออบเจ็กต์: StackedContents.RecipePicker. คืนค่า: new StackedContents.RecipePicker(list).tryPick(i, output).
Parameters
List<? extends StackedContents.IngredientInfo<T>> listint iStackedContents.Output<T> output
ตัวอย่างใช้งาน
StackedContents instance = ...;
List<? extends StackedContents.IngredientInfo<T>> list = ...;
StackedContents.Output<T> output = ...;
boolean result = instance.tryPick(list, 0, output);
net.minecraft.world.entity.player.StackedContents#tryPickAll(List<? extends StackedContents.IngredientInfo<T>>,int,StackedContents.Output<T>)
- Origin:
common - Source:
net/minecraft/world/entity/player/StackedContents.java:37 - Modifiers:
public - Return:
int
คืออะไร
ดำเนินการ tryPickAll ตาม implementation ของ StackedContents
ทำงานยังไง
เรียกต่อ: RecipePicker(). สร้างออบเจ็กต์: StackedContents.RecipePicker. คืนค่า: new StackedContents.RecipePicker(list).tryPickAll(i, output).
Parameters
List<? extends StackedContents.IngredientInfo<T>> listint iStackedContents.Output<T> output
ตัวอย่างใช้งาน
StackedContents instance = ...;
List<? extends StackedContents.IngredientInfo<T>> list = ...;
StackedContents.Output<T> output = ...;
int result = instance.tryPickAll(list, 0, output);
StackedContents$IngredientInfo
- Full name:
net.minecraft.world.entity.player.StackedContents$IngredientInfo - Package:
net.minecraft.world.entity.player - Source:
common—net/minecraft/world/entity/player/StackedContents.java - Type:
interface - Modifiers:
public
net.minecraft.world.entity.player.StackedContents$IngredientInfo#acceptsItem(T)
- Origin:
common - Source:
net/minecraft/world/entity/player/StackedContents.java:104 - Modifiers: ``
- Return:
boolean
คืออะไร
ดำเนินการ acceptsItem ตาม implementation ของ StackedContents$IngredientInfo
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
T object
ตัวอย่างใช้งาน
StackedContents.IngredientInfo instance = ...;
T object = ...;
boolean result = instance.acceptsItem(object);
StackedContents$Output
- Full name:
net.minecraft.world.entity.player.StackedContents$Output - Package:
net.minecraft.world.entity.player - Source:
common—net/minecraft/world/entity/player/StackedContents.java - Type:
interface - Modifiers:
public
net.minecraft.world.entity.player.StackedContents$Output#accept(T)
- Origin:
common - Source:
net/minecraft/world/entity/player/StackedContents.java:109 - Modifiers: ``
- Return:
void
คืออะไร
รับค่า accept
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
T object
ตัวอย่างใช้งาน
StackedItemContents
- Full name:
net.minecraft.world.entity.player.StackedItemContents - Package:
net.minecraft.world.entity.player - Source:
common—net/minecraft/world/entity/player/StackedItemContents.java - Type:
class - Modifiers:
public
net.minecraft.world.entity.player.StackedItemContents#accountSimpleStack(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/player/StackedItemContents.java:14 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ accountSimpleStack ตาม implementation ของ StackedItemContents
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isUsableForCrafting(), accountStack().
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
StackedItemContents instance = ...;
ItemStack itemStack = ...;
instance.accountSimpleStack(itemStack);
net.minecraft.world.entity.player.StackedItemContents#accountStack(ItemStack)
- Origin:
common - Source:
net/minecraft/world/entity/player/StackedItemContents.java:20 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ accountStack ตาม implementation ของ StackedItemContents
ทำงานยังไง
เรียกต่อ: getMaxStackSize().
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.StackedItemContents#accountStack(ItemStack,int)
- Origin:
common - Source:
net/minecraft/world/entity/player/StackedItemContents.java:24 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ accountStack ตาม implementation ของ StackedItemContents
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isEmpty(), min(), getCount(), account(), getItemHolder().
Parameters
ItemStack itemStackint i
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.StackedItemContents#canCraft(List<? extends StackedContents.IngredientInfo<Holder<Item>>>,StackedContents.Output<Holder<Item>>)
- Origin:
common - Source:
net/minecraft/world/entity/player/StackedItemContents.java:40 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Craft
ทำงานยังไง
คืนค่า: this.canCraft(list, 1, output).
Parameters
List<? extends StackedContents.IngredientInfo<Holder<Item>>> listStackedContents.Output<Holder<Item>> output
ตัวอย่างใช้งาน
StackedItemContents instance = ...;
List<? extends StackedContents.IngredientInfo<Holder<Item>>> list = ...;
StackedContents.Output<Holder<Item>> output = ...;
boolean result = instance.canCraft(list, output);
net.minecraft.world.entity.player.StackedItemContents#canCraft(Recipe<?>,int,StackedContents.Output<Holder<Item>>)
- Origin:
common - Source:
net/minecraft/world/entity/player/StackedItemContents.java:35 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Craft
ทำงานยังไง
เรียกต่อ: placementInfo(), isImpossibleToPlace(), ingredients(). คืนค่า: placementInfo.isImpossibleToPlace() ? false : this.canCraft(placementInfo.ingredients(), i, output).
Parameters
Recipe<?> recipeint iStackedContents.Output<Holder<Item>> output
ตัวอย่างใช้งาน
StackedItemContents instance = ...;
Recipe<?> recipe = ...;
StackedContents.Output<Holder<Item>> output = ...;
boolean result = instance.canCraft(recipe, 0, output);
net.minecraft.world.entity.player.StackedItemContents#canCraft(Recipe<?>,StackedContents.Output<Holder<Item>>)
- Origin:
common - Source:
net/minecraft/world/entity/player/StackedItemContents.java:31 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Craft
ทำงานยังไง
คืนค่า: this.canCraft(recipe, 1, output).
Parameters
Recipe<?> recipeStackedContents.Output<Holder<Item>> output
ตัวอย่างใช้งาน
StackedItemContents instance = ...;
Recipe<?> recipe = ...;
StackedContents.Output<Holder<Item>> output = ...;
boolean result = instance.canCraft(recipe, output);
net.minecraft.world.entity.player.StackedItemContents#clear()
- Origin:
common - Source:
net/minecraft/world/entity/player/StackedItemContents.java:56 - Modifiers:
public - Return:
void
คืออะไร
ล้าง clear
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.entity.player.StackedItemContents#getBiggestCraftableStack(Recipe<?>,int,StackedContents.Output<Holder<Item>>)
- Origin:
common - Source:
net/minecraft/world/entity/player/StackedItemContents.java:52 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Biggest Craftable Stack
ทำงานยังไง
เรียกต่อ: tryPickAll(), placementInfo(), ingredients(). คืนค่า: this.raw.tryPickAll(recipe.placementInfo().ingredients(), i, output).
Parameters
Recipe<?> recipeint iStackedContents.Output<Holder<Item>> output
ตัวอย่างใช้งาน
StackedItemContents instance = ...;
Recipe<?> recipe = ...;
StackedContents.Output<Holder<Item>> output = ...;
int result = instance.getBiggestCraftableStack(recipe, 0, output);
net.minecraft.world.entity.player.StackedItemContents#getBiggestCraftableStack(Recipe<?>,StackedContents.Output<Holder<Item>>)
- Origin:
common - Source:
net/minecraft/world/entity/player/StackedItemContents.java:48 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Biggest Craftable Stack
ทำงานยังไง
คืนค่า: this.getBiggestCraftableStack(recipe, Integer.MAX_VALUE, output).
Parameters
Recipe<?> recipeStackedContents.Output<Holder<Item>> output
ตัวอย่างใช้งาน
StackedItemContents instance = ...;
Recipe<?> recipe = ...;
StackedContents.Output<Holder<Item>> output = ...;
int result = instance.getBiggestCraftableStack(recipe, output);