Package net.minecraft.world
Part 1/1
BossEvent
- Full name:
net.minecraft.world.BossEvent - Package:
net.minecraft.world - Source:
common—net/minecraft/world/BossEvent.java - Type:
class - Modifiers:
public abstract
net.minecraft.world.BossEvent#BossEvent(UUID,Component,BossEvent.BossBarColor,BossEvent.BossBarOverlay)
- Origin:
common - Source:
net/minecraft/world/BossEvent.java:17 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ BossEvent ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: id, name, color, overlay, progress.
Parameters
UUID uUIDComponent componentBossEvent.BossBarColor bossBarColorBossEvent.BossBarOverlay bossBarOverlay
ตัวอย่างใช้งาน
UUID uUID = ...;
Component component = ...;
BossEvent.BossBarColor bossBarColor = ...;
BossEvent.BossBarOverlay bossBarOverlay = ...;
BossEvent instance = new BossEvent(uUID, component, bossBarColor, bossBarOverlay);
net.minecraft.world.BossEvent#getColor()
- Origin:
common - Source:
net/minecraft/world/BossEvent.java:45 - Modifiers:
public - Return:
BossEvent.BossBarColor
คืออะไร
อ่านค่า Color
ทำงานยังไง
คืนค่า: this.color.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.BossEvent#getId()
- Origin:
common - Source:
net/minecraft/world/BossEvent.java:25 - Modifiers:
public - Return:
UUID
คืออะไร
อ่านค่า Id
ทำงานยังไง
คืนค่า: this.id.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.BossEvent#getName()
- Origin:
common - Source:
net/minecraft/world/BossEvent.java:29 - Modifiers:
public - Return:
Component
คืออะไร
อ่านค่า Name
ทำงานยังไง
คืนค่า: this.name.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.BossEvent#getOverlay()
- Origin:
common - Source:
net/minecraft/world/BossEvent.java:53 - Modifiers:
public - Return:
BossEvent.BossBarOverlay
คืออะไร
อ่านค่า Overlay
ทำงานยังไง
คืนค่า: this.overlay.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.BossEvent#getProgress()
- Origin:
common - Source:
net/minecraft/world/BossEvent.java:37 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Progress
ทำงานยังไง
คืนค่า: this.progress.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.BossEvent#setColor(BossEvent.BossBarColor)
- Origin:
common - Source:
net/minecraft/world/BossEvent.java:49 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Color
ทำงานยังไง
แก้ state: color.
Parameters
BossEvent.BossBarColor bossBarColor
ตัวอย่างใช้งาน
BossEvent instance = ...;
BossEvent.BossBarColor bossBarColor = ...;
instance.setColor(bossBarColor);
net.minecraft.world.BossEvent#setCreateWorldFog(boolean)
- Origin:
common - Source:
net/minecraft/world/BossEvent.java:79 - Modifiers:
public - Return:
BossEvent
คืออะไร
กำหนดค่า Create World Fog
ทำงานยังไง
แก้ state: createWorldFog. คืนค่า: this.
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.BossEvent#setDarkenScreen(boolean)
- Origin:
common - Source:
net/minecraft/world/BossEvent.java:65 - Modifiers:
public - Return:
BossEvent
คืออะไร
กำหนดค่า Darken Screen
ทำงานยังไง
แก้ state: darkenScreen. คืนค่า: this.
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.BossEvent#setName(Component)
- Origin:
common - Source:
net/minecraft/world/BossEvent.java:33 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Name
ทำงานยังไง
แก้ state: name.
Parameters
Component component
ตัวอย่างใช้งาน
net.minecraft.world.BossEvent#setOverlay(BossEvent.BossBarOverlay)
- Origin:
common - Source:
net/minecraft/world/BossEvent.java:57 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Overlay
ทำงานยังไง
แก้ state: overlay.
Parameters
BossEvent.BossBarOverlay bossBarOverlay
ตัวอย่างใช้งาน
BossEvent instance = ...;
BossEvent.BossBarOverlay bossBarOverlay = ...;
instance.setOverlay(bossBarOverlay);
net.minecraft.world.BossEvent#setPlayBossMusic(boolean)
- Origin:
common - Source:
net/minecraft/world/BossEvent.java:74 - Modifiers:
public - Return:
BossEvent
คืออะไร
กำหนดค่า Play Boss Music
ทำงานยังไง
แก้ state: playBossMusic. คืนค่า: this.
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.BossEvent#setProgress(float)
- Origin:
common - Source:
net/minecraft/world/BossEvent.java:41 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Progress
ทำงานยังไง
แก้ state: progress.
Parameters
float f
ตัวอย่างใช้งาน
net.minecraft.world.BossEvent#shouldCreateWorldFog()
- Origin:
common - Source:
net/minecraft/world/BossEvent.java:84 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าควร Create World Fog
ทำงานยังไง
คืนค่า: this.createWorldFog.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.BossEvent#shouldDarkenScreen()
- Origin:
common - Source:
net/minecraft/world/BossEvent.java:61 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าควร Darken Screen
ทำงานยังไง
คืนค่า: this.darkenScreen.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.BossEvent#shouldPlayBossMusic()
- Origin:
common - Source:
net/minecraft/world/BossEvent.java:70 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าควร Play Boss Music
ทำงานยังไง
คืนค่า: this.playBossMusic.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
BossEvent$BossBarColor
- Full name:
net.minecraft.world.BossEvent$BossBarColor - Package:
net.minecraft.world - Source:
common—net/minecraft/world/BossEvent.java - Type:
enum - Modifiers:
public
net.minecraft.world.BossEvent$BossBarColor#byName(String)
- Origin:
common - Source:
net/minecraft/world/BossEvent.java:113 - Modifiers:
public static - Return:
BossEvent.BossBarColor
คืออะไร
ดำเนินการ byName ตาม implementation ของ BossEvent$BossBarColor
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: values(), equals(). มีจุด return อย่างน้อย 2 จุด.
Parameters
String string
ตัวอย่างใช้งาน
net.minecraft.world.BossEvent$BossBarColor#getFormatting()
- Origin:
common - Source:
net/minecraft/world/BossEvent.java:105 - Modifiers:
public - Return:
ChatFormatting
คืออะไร
อ่านค่า Formatting
ทำงานยังไง
คืนค่า: this.formatting.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.BossEvent$BossBarColor#getName()
- Origin:
common - Source:
net/minecraft/world/BossEvent.java:109 - Modifiers:
public - Return:
String
คืออะไร
อ่านค่า Name
ทำงานยังไง
คืนค่า: this.name.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
BossEvent$BossBarOverlay
- Full name:
net.minecraft.world.BossEvent$BossBarOverlay - Package:
net.minecraft.world - Source:
common—net/minecraft/world/BossEvent.java - Type:
enum - Modifiers:
public
net.minecraft.world.BossEvent$BossBarOverlay#byName(String)
- Origin:
common - Source:
net/minecraft/world/BossEvent.java:141 - Modifiers:
public static - Return:
BossEvent.BossBarOverlay
คืออะไร
ดำเนินการ byName ตาม implementation ของ BossEvent$BossBarOverlay
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: values(), equals(). มีจุด return อย่างน้อย 2 จุด.
Parameters
String string
ตัวอย่างใช้งาน
net.minecraft.world.BossEvent$BossBarOverlay#getName()
- Origin:
common - Source:
net/minecraft/world/BossEvent.java:137 - Modifiers:
public - Return:
String
คืออะไร
อ่านค่า Name
ทำงานยังไง
คืนค่า: this.name.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
Clearable
- Full name:
net.minecraft.world.Clearable - Package:
net.minecraft.world - Source:
common—net/minecraft/world/Clearable.java - Type:
interface - Modifiers:
public
net.minecraft.world.Clearable#clearContent()
- Origin:
common - Source:
net/minecraft/world/Clearable.java:6 - Modifiers: ``
- Return:
void
คืออะไร
ล้าง Content
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.Clearable#tryClear(Object)
- Origin:
common - Source:
net/minecraft/world/Clearable.java:8 - Modifiers:
static - Return:
void
คืออะไร
ดำเนินการ tryClear ตาม implementation ของ Clearable
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: clearContent().
Parameters
Object object
ตัวอย่างใช้งาน
CompoundContainer
- Full name:
net.minecraft.world.CompoundContainer - Package:
net.minecraft.world - Source:
common—net/minecraft/world/CompoundContainer.java - Type:
class - Modifiers:
public - Implements:
Container
net.minecraft.world.CompoundContainer#canPlaceItem(int,ItemStack)
- Origin:
common - Source:
net/minecraft/world/CompoundContainer.java:83 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Place Item
ทำงานยังไง
เรียกต่อ: getContainerSize().
Parameters
int iItemStack itemStack
ตัวอย่างใช้งาน
CompoundContainer instance = ...;
ItemStack itemStack = ...;
boolean result = instance.canPlaceItem(0, itemStack);
net.minecraft.world.CompoundContainer#clearContent()
- Origin:
common - Source:
net/minecraft/world/CompoundContainer.java:90 - Modifiers:
public - Return:
void
คืออะไร
ล้าง Content
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 2 statement).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.CompoundContainer#CompoundContainer(Container,Container)
- Origin:
common - Source:
net/minecraft/world/CompoundContainer.java:10 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ CompoundContainer ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: container1, container2.
Parameters
Container containerContainer container2
ตัวอย่างใช้งาน
Container container = ...;
Container container2 = ...;
CompoundContainer instance = new CompoundContainer(container, container2);
net.minecraft.world.CompoundContainer#contains(Container)
- Origin:
common - Source:
net/minecraft/world/CompoundContainer.java:25 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่ามี contains
ทำงานยังไง
แก้ state: container1, container2. คืนค่า: this.container1 == container || this.container2 == container.
Parameters
Container container
ตัวอย่างใช้งาน
CompoundContainer instance = ...;
Container container = ...;
boolean result = instance.contains(container);
net.minecraft.world.CompoundContainer#getContainerSize()
- Origin:
common - Source:
net/minecraft/world/CompoundContainer.java:15 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Container Size
ทำงานยังไง
คืนค่า: this.container1.getContainerSize() + this.container2.getContainerSize().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.CompoundContainer#getItem(int)
- Origin:
common - Source:
net/minecraft/world/CompoundContainer.java:29 - Modifiers:
public - Return:
ItemStack
คืออะไร
อ่านค่า Item
ทำงานยังไง
เรียกต่อ: getContainerSize(). คืนค่า: i >= this.container1.getContainerSize() ? this.container2.getItem(i - this.container1.getContainerSize()) : this.container1.getItem(i).
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.CompoundContainer#getMaxStackSize()
- Origin:
common - Source:
net/minecraft/world/CompoundContainer.java:55 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Max Stack Size
ทำงานยังไง
คืนค่า: this.container1.getMaxStackSize().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.CompoundContainer#isEmpty()
- Origin:
common - Source:
net/minecraft/world/CompoundContainer.java:20 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Empty
ทำงานยังไง
คืนค่า: this.container1.isEmpty() && this.container2.isEmpty().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.CompoundContainer#removeItem(int,int)
- Origin:
common - Source:
net/minecraft/world/CompoundContainer.java:34 - Modifiers:
public - Return:
ItemStack
คืออะไร
ลบ Item
ทำงานยังไง
เรียกต่อ: getContainerSize(). คืนค่า: i >= this.container1.getContainerSize() ? this.container2.removeItem(i - this.container1.getContainerSize(), j) : this.container1.removeItem(i, j).
Parameters
int iint j
ตัวอย่างใช้งาน
net.minecraft.world.CompoundContainer#removeItemNoUpdate(int)
- Origin:
common - Source:
net/minecraft/world/CompoundContainer.java:39 - Modifiers:
public - Return:
ItemStack
คืออะไร
ลบ Item No Update
ทำงานยังไง
เรียกต่อ: getContainerSize().
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.CompoundContainer#setChanged()
- Origin:
common - Source:
net/minecraft/world/CompoundContainer.java:60 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Changed
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 2 statement).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.CompoundContainer#setItem(int,ItemStack)
- Origin:
common - Source:
net/minecraft/world/CompoundContainer.java:46 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getContainerSize().
Parameters
int iItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.CompoundContainer#startOpen(Player)
- Origin:
common - Source:
net/minecraft/world/CompoundContainer.java:71 - Modifiers:
public - Return:
void
คืออะไร
เริ่ม Open
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 2 statement).
Parameters
Player player
ตัวอย่างใช้งาน
net.minecraft.world.CompoundContainer#stillValid(Player)
- Origin:
common - Source:
net/minecraft/world/CompoundContainer.java:66 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ stillValid ตาม implementation ของ CompoundContainer
ทำงานยังไง
คืนค่า: this.container1.stillValid(player) && this.container2.stillValid(player).
Parameters
Player player
ตัวอย่างใช้งาน
CompoundContainer instance = ...;
Player player = ...;
boolean result = instance.stillValid(player);
net.minecraft.world.CompoundContainer#stopOpen(Player)
- Origin:
common - Source:
net/minecraft/world/CompoundContainer.java:77 - Modifiers:
public - Return:
void
คืออะไร
หยุด Open
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 2 statement).
Parameters
Player player
ตัวอย่างใช้งาน
Container
- Full name:
net.minecraft.world.Container - Package:
net.minecraft.world - Source:
common—net/minecraft/world/Container.java - Type:
interface - Modifiers:
public - Implements:
Clearable
net.minecraft.world.Container#canPlaceItem(int,ItemStack)
- Origin:
common - Source:
net/minecraft/world/Container.java:45 - Modifiers:
default - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Place Item
ทำงานยังไง
คืนค่า: true.
Parameters
int iItemStack itemStack
ตัวอย่างใช้งาน
Container instance = ...;
ItemStack itemStack = ...;
boolean result = instance.canPlaceItem(0, itemStack);
net.minecraft.world.Container#canTakeItem(Container,int,ItemStack)
- Origin:
common - Source:
net/minecraft/world/Container.java:49 - Modifiers:
default - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Take Item
ทำงานยังไง
คืนค่า: true.
Parameters
Container containerint iItemStack itemStack
ตัวอย่างใช้งาน
Container instance = ...;
Container container = ...;
ItemStack itemStack = ...;
boolean result = instance.canTakeItem(container, 0, itemStack);
net.minecraft.world.Container#countItem(Item)
- Origin:
common - Source:
net/minecraft/world/Container.java:53 - Modifiers:
default - Return:
int
คืออะไร
ดำเนินการ countItem ตาม implementation ของ Container
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getContainerSize(), getItem(), equals(), getCount(). คืนค่า: i.
Parameters
Item item
ตัวอย่างใช้งาน
net.minecraft.world.Container#getContainerSize()
- Origin:
common - Source:
net/minecraft/world/Container.java:15 - Modifiers: ``
- Return:
int
คืออะไร
อ่านค่า Container Size
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.Container#getItem(int)
- Origin:
common - Source:
net/minecraft/world/Container.java:19 - Modifiers: ``
- Return:
ItemStack
คืออะไร
อ่านค่า Item
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.Container#getMaxStackSize()
- Origin:
common - Source:
net/minecraft/world/Container.java:27 - Modifiers:
default - Return:
int
คืออะไร
อ่านค่า Max Stack Size
ทำงานยังไง
คืนค่า: 99.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.Container#getMaxStackSize(ItemStack)
- Origin:
common - Source:
net/minecraft/world/Container.java:31 - Modifiers:
default - Return:
int
คืออะไร
อ่านค่า Max Stack Size
ทำงานยังไง
เรียกต่อ: min(). คืนค่า: Math.min(this.getMaxStackSize(), itemStack.getMaxStackSize()).
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
Container instance = ...;
ItemStack itemStack = ...;
int result = instance.getMaxStackSize(itemStack);
net.minecraft.world.Container#hasAnyMatching(Predicate<ItemStack>)
- Origin:
common - Source:
net/minecraft/world/Container.java:70 - Modifiers:
default - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Any Matching
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getContainerSize(), getItem(), test(). มีจุด return อย่างน้อย 2 จุด.
Parameters
Predicate<ItemStack> predicate
ตัวอย่างใช้งาน
Container instance = ...;
Predicate<ItemStack> predicate = ...;
boolean result = instance.hasAnyMatching(predicate);
net.minecraft.world.Container#hasAnyOf(Set<Item>)
- Origin:
common - Source:
net/minecraft/world/Container.java:66 - Modifiers:
default - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Any Of
ทำงานยังไง
เรียกต่อ: hasAnyMatching(), isEmpty(), contains(), getItem(). คืนค่า: this.hasAnyMatching(itemStack -> !itemStack.isEmpty() && set.contains(itemStack.getItem())).
Parameters
Set<Item> set
ตัวอย่างใช้งาน
net.minecraft.world.Container#isEmpty()
- Origin:
common - Source:
net/minecraft/world/Container.java:17 - Modifiers: ``
- Return:
boolean
คืออะไร
ตรวจสอบสถานะ Empty
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.Container#removeItem(int,int)
- Origin:
common - Source:
net/minecraft/world/Container.java:21 - Modifiers: ``
- Return:
ItemStack
คืออะไร
ลบ Item
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
int iint j
ตัวอย่างใช้งาน
net.minecraft.world.Container#removeItemNoUpdate(int)
- Origin:
common - Source:
net/minecraft/world/Container.java:23 - Modifiers: ``
- Return:
ItemStack
คืออะไร
ลบ Item No Update
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.Container#setChanged()
- Origin:
common - Source:
net/minecraft/world/Container.java:35 - Modifiers: ``
- Return:
void
คืออะไร
กำหนดค่า Changed
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.Container#setItem(int,ItemStack)
- Origin:
common - Source:
net/minecraft/world/Container.java:25 - Modifiers: ``
- Return:
void
คืออะไร
กำหนดค่า Item
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
int iItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.Container#startOpen(Player)
- Origin:
common - Source:
net/minecraft/world/Container.java:39 - Modifiers:
default - Return:
void
คืออะไร
เริ่ม Open
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
Player player
ตัวอย่างใช้งาน
net.minecraft.world.Container#stillValid(Player)
- Origin:
common - Source:
net/minecraft/world/Container.java:37 - Modifiers: ``
- Return:
boolean
คืออะไร
ดำเนินการ stillValid ตาม implementation ของ Container
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
Player player
ตัวอย่างใช้งาน
net.minecraft.world.Container#stillValidBlockEntity(BlockEntity,Player)
- Origin:
common - Source:
net/minecraft/world/Container.java:81 - Modifiers:
static - Return:
boolean
คืออะไร
ดำเนินการ stillValidBlockEntity ตาม implementation ของ Container
ทำงานยังไง
คืนค่า: stillValidBlockEntity(blockEntity, player, 4.0F).
Parameters
BlockEntity blockEntityPlayer player
ตัวอย่างใช้งาน
BlockEntity blockEntity = ...;
Player player = ...;
boolean result = Container.stillValidBlockEntity(blockEntity, player);
net.minecraft.world.Container#stillValidBlockEntity(BlockEntity,Player,float)
- Origin:
common - Source:
net/minecraft/world/Container.java:85 - Modifiers:
static - Return:
boolean
คืออะไร
ดำเนินการ stillValidBlockEntity ตาม implementation ของ Container
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getLevel(), getBlockPos(), getBlockEntity(), canInteractWithBlock(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockEntity blockEntityPlayer playerfloat f
ตัวอย่างใช้งาน
BlockEntity blockEntity = ...;
Player player = ...;
boolean result = Container.stillValidBlockEntity(blockEntity, player, 0.0F);
net.minecraft.world.Container#stopOpen(Player)
- Origin:
common - Source:
net/minecraft/world/Container.java:42 - Modifiers:
default - Return:
void
คืออะไร
หยุด Open
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
Player player
ตัวอย่างใช้งาน
ContainerHelper
- Full name:
net.minecraft.world.ContainerHelper - Package:
net.minecraft.world - Source:
common—net/minecraft/world/ContainerHelper.java - Type:
class - Modifiers:
public
net.minecraft.world.ContainerHelper#clearOrCountMatchingItems(Container,Predicate<ItemStack>,int,boolean)
- Origin:
common - Source:
net/minecraft/world/ContainerHelper.java:57 - Modifiers:
public static - Return:
int
คืออะไร
ล้าง Or Count Matching Items
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getContainerSize(), getItem(), isEmpty(), setItem(). คืนค่า: j.
Parameters
Container containerPredicate<ItemStack> predicateint iboolean bl
ตัวอย่างใช้งาน
Container container = ...;
Predicate<ItemStack> predicate = ...;
int result = ContainerHelper.clearOrCountMatchingItems(container, predicate, 0, true);
net.minecraft.world.ContainerHelper#clearOrCountMatchingItems(ItemStack,Predicate<ItemStack>,int,boolean)
- Origin:
common - Source:
net/minecraft/world/ContainerHelper.java:73 - Modifiers:
public static - Return:
int
คืออะไร
ล้าง Or Count Matching Items
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isEmpty(), test(), getCount(), min(), shrink(). มีจุด return อย่างน้อย 3 จุด.
Parameters
ItemStack itemStackPredicate<ItemStack> predicateint iboolean bl
ตัวอย่างใช้งาน
ItemStack itemStack = ...;
Predicate<ItemStack> predicate = ...;
int result = ContainerHelper.clearOrCountMatchingItems(itemStack, predicate, 0, true);
net.minecraft.world.ContainerHelper#loadAllItems(CompoundTag,NonNullList<ItemStack>,HolderLookup.Provider)
- Origin:
common - Source:
net/minecraft/world/ContainerHelper.java:45 - Modifiers:
public static - Return:
void
คืออะไร
โหลด All Items
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getList(), size(), getCompound(), getByte(), set(), parse(), orElse().
Parameters
CompoundTag compoundTagNonNullList<ItemStack> nonNullListHolderLookup.Provider provider
ตัวอย่างใช้งาน
CompoundTag compoundTag = ...;
NonNullList<ItemStack> nonNullList = ...;
HolderLookup.Provider provider = ...;
ContainerHelper.loadAllItems(compoundTag, nonNullList, provider);
net.minecraft.world.ContainerHelper#removeItem(List<ItemStack>,int,int)
- Origin:
common - Source:
net/minecraft/world/ContainerHelper.java:14 - Modifiers:
public static - Return:
ItemStack
คืออะไร
ลบ Item
ทำงานยังไง
เรียกต่อ: size(), get(), isEmpty(), split(). คืนค่า: i >= 0 && i < list.size() && !list.get(i).isEmpty() && j > 0 ? list.get(i).split(j) : ItemStack.EMPTY.
Parameters
List<ItemStack> listint iint j
ตัวอย่างใช้งาน
net.minecraft.world.ContainerHelper#saveAllItems(CompoundTag,NonNullList<ItemStack>,boolean,HolderLookup.Provider)
- Origin:
common - Source:
net/minecraft/world/ContainerHelper.java:26 - Modifiers:
public static - Return:
CompoundTag
คืออะไร
บันทึก All Items
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: size(), get(), isEmpty(), putByte(), add(), save(), put(). สร้างออบเจ็กต์: ListTag, CompoundTag. คืนค่า: compoundTag.
Parameters
CompoundTag compoundTagNonNullList<ItemStack> nonNullListboolean blHolderLookup.Provider provider
ตัวอย่างใช้งาน
CompoundTag compoundTag = ...;
NonNullList<ItemStack> nonNullList = ...;
HolderLookup.Provider provider = ...;
CompoundTag result = ContainerHelper.saveAllItems(compoundTag, nonNullList, true, provider);
net.minecraft.world.ContainerHelper#saveAllItems(CompoundTag,NonNullList<ItemStack>,HolderLookup.Provider)
- Origin:
common - Source:
net/minecraft/world/ContainerHelper.java:22 - Modifiers:
public static - Return:
CompoundTag
คืออะไร
บันทึก All Items
ทำงานยังไง
คืนค่า: saveAllItems(compoundTag, nonNullList, true, provider).
Parameters
CompoundTag compoundTagNonNullList<ItemStack> nonNullListHolderLookup.Provider provider
ตัวอย่างใช้งาน
CompoundTag compoundTag = ...;
NonNullList<ItemStack> nonNullList = ...;
HolderLookup.Provider provider = ...;
CompoundTag result = ContainerHelper.saveAllItems(compoundTag, nonNullList, provider);
net.minecraft.world.ContainerHelper#takeItem(List<ItemStack>,int)
- Origin:
common - Source:
net/minecraft/world/ContainerHelper.java:18 - Modifiers:
public static - Return:
ItemStack
คืออะไร
ดำเนินการ takeItem ตาม implementation ของ ContainerHelper
ทำงานยังไง
เรียกต่อ: size(), set(). คืนค่า: i >= 0 && i < list.size() ? list.set(i, ItemStack.EMPTY) : ItemStack.EMPTY.
Parameters
List<ItemStack> listint i
ตัวอย่างใช้งาน
ContainerListener
- Full name:
net.minecraft.world.ContainerListener - Package:
net.minecraft.world - Source:
common—net/minecraft/world/ContainerListener.java - Type:
interface - Modifiers:
public
net.minecraft.world.ContainerListener#containerChanged(Container)
- Origin:
common - Source:
net/minecraft/world/ContainerListener.java:4 - Modifiers: ``
- Return:
void
คืออะไร
ดำเนินการ containerChanged ตาม implementation ของ ContainerListener
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
Container container
ตัวอย่างใช้งาน
Containers
- Full name:
net.minecraft.world.Containers - Package:
net.minecraft.world - Source:
common—net/minecraft/world/Containers.java - Type:
class - Modifiers:
public
net.minecraft.world.Containers#dropContents(Level,BlockPos,Container)
- Origin:
common - Source:
net/minecraft/world/Containers.java:13 - Modifiers:
public static - Return:
void
คืออะไร
ดำเนินการ dropContents ตาม implementation ของ Containers
ทำงานยังไง
เรียกต่อ: getX(), getY(), getZ().
Parameters
Level levelBlockPos blockPosContainer container
ตัวอย่างใช้งาน
Level level = ...;
BlockPos blockPos = ...;
Container container = ...;
Containers.dropContents(level, blockPos, container);
net.minecraft.world.Containers#dropContents(Level,BlockPos,NonNullList<ItemStack>)
- Origin:
common - Source:
net/minecraft/world/Containers.java:27 - Modifiers:
public static - Return:
void
คืออะไร
ดำเนินการ dropContents ตาม implementation ของ Containers
ทำงานยังไง
เรียกต่อ: forEach(), dropItemStack(), getX(), getY(), getZ().
Parameters
Level levelBlockPos blockPosNonNullList<ItemStack> nonNullList
ตัวอย่างใช้งาน
Level level = ...;
BlockPos blockPos = ...;
NonNullList<ItemStack> nonNullList = ...;
Containers.dropContents(level, blockPos, nonNullList);
net.minecraft.world.Containers#dropContents(Level,Entity,Container)
- Origin:
common - Source:
net/minecraft/world/Containers.java:17 - Modifiers:
public static - Return:
void
คืออะไร
ดำเนินการ dropContents ตาม implementation ของ Containers
ทำงานยังไง
เรียกต่อ: getX(), getY(), getZ().
Parameters
Level levelEntity entityContainer container
ตัวอย่างใช้งาน
Level level = ...;
Entity entity = ...;
Container container = ...;
Containers.dropContents(level, entity, container);
net.minecraft.world.Containers#dropContentsOnDestroy(BlockState,BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/Containers.java:49 - Modifiers:
public static - Return:
void
คืออะไร
ดำเนินการ dropContentsOnDestroy ตาม implementation ของ Containers
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), getBlock(), getBlockEntity(), dropContents(), updateNeighbourForOutputSignal().
Parameters
BlockState blockStateBlockState blockState2Level levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockState blockState2 = ...;
Level level = ...;
BlockPos blockPos = ...;
Containers.dropContentsOnDestroy(blockState, blockState2, level, blockPos);
net.minecraft.world.Containers#dropItemStack(Level,double,double,double,ItemStack)
- Origin:
common - Source:
net/minecraft/world/Containers.java:31 - Modifiers:
public static - Return:
void
คืออะไร
ดำเนินการ dropItemStack ตาม implementation ของ Containers
ทำงานยังไง
มีการวนลูป. เรียกต่อ: getWidth(), floor(), nextDouble(), isEmpty(), split(), nextInt(), setDeltaMovement(), triangle(). สร้างออบเจ็กต์: ItemEntity.
Parameters
Level leveldouble ddouble edouble fItemStack itemStack
ตัวอย่างใช้งาน
Level level = ...;
ItemStack itemStack = ...;
Containers.dropItemStack(level, 0.0D, 0.0D, 0.0D, itemStack);
Difficulty
- Full name:
net.minecraft.world.Difficulty - Package:
net.minecraft.world - Source:
common—net/minecraft/world/Difficulty.java - Type:
enum - Modifiers:
public - Implements:
StringRepresentable
net.minecraft.world.Difficulty#byId(int)
- Origin:
common - Source:
net/minecraft/world/Difficulty.java:37 - Modifiers:
public static - Return:
Difficulty
คืออะไร
ดำเนินการ byId ตาม implementation ของ Difficulty
ทำงานยังไง
เรียกต่อ: apply(). คืนค่า: BY_ID.apply(i).
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.Difficulty#byName(String)
- Origin:
common - Source:
net/minecraft/world/Difficulty.java:41 - Modifiers:
public static - Return:
Difficulty
คืออะไร
ดำเนินการ byName ตาม implementation ของ Difficulty
ทำงานยังไง
คืนค่า: CODEC.byName(string).
Parameters
String string
ตัวอย่างใช้งาน
net.minecraft.world.Difficulty#getDisplayName()
- Origin:
common - Source:
net/minecraft/world/Difficulty.java:29 - Modifiers:
public - Return:
Component
คืออะไร
อ่านค่า Display Name
ทำงานยังไง
เรียกต่อ: translatable(). คืนค่า: Component.translatable("options.difficulty." + this.key).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.Difficulty#getId()
- Origin:
common - Source:
net/minecraft/world/Difficulty.java:25 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Id
ทำงานยังไง
คืนค่า: this.id.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.Difficulty#getInfo()
- Origin:
common - Source:
net/minecraft/world/Difficulty.java:33 - Modifiers:
public - Return:
Component
คืออะไร
อ่านค่า Info
ทำงานยังไง
เรียกต่อ: translatable(). คืนค่า: Component.translatable("options.difficulty." + this.key + ".info").
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.Difficulty#getKey()
- Origin:
common - Source:
net/minecraft/world/Difficulty.java:46 - Modifiers:
public - Return:
String
คืออะไร
อ่านค่า Key
ทำงานยังไง
คืนค่า: this.key.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.Difficulty#getSerializedName()
- Origin:
common - Source:
net/minecraft/world/Difficulty.java:50 - Modifiers:
public - Return:
String
คืออะไร
อ่านค่า Serialized Name
ทำงานยังไง
คืนค่า: this.key.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
DifficultyInstance
- Full name:
net.minecraft.world.DifficultyInstance - Package:
net.minecraft.world - Source:
common—net/minecraft/world/DifficultyInstance.java - Type:
class - Modifiers:
public
net.minecraft.world.DifficultyInstance#DifficultyInstance(Difficulty,long,long,float)
- Origin:
common - Source:
net/minecraft/world/DifficultyInstance.java:14 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ DifficultyInstance ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: base, effectiveDifficulty. เรียกต่อ: calculateDifficulty().
Parameters
Difficulty difficultylong llong mfloat f
ตัวอย่างใช้งาน
Difficulty difficulty = ...;
DifficultyInstance instance = new DifficultyInstance(difficulty, 0L, 0L, 0.0F);
net.minecraft.world.DifficultyInstance#getDifficulty()
- Origin:
common - Source:
net/minecraft/world/DifficultyInstance.java:19 - Modifiers:
public - Return:
Difficulty
คืออะไร
อ่านค่า Difficulty
ทำงานยังไง
คืนค่า: this.base.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.DifficultyInstance#getEffectiveDifficulty()
- Origin:
common - Source:
net/minecraft/world/DifficultyInstance.java:23 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Effective Difficulty
ทำงานยังไง
คืนค่า: this.effectiveDifficulty.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.DifficultyInstance#getSpecialMultiplier()
- Origin:
common - Source:
net/minecraft/world/DifficultyInstance.java:35 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Special Multiplier
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. มีจุด return อย่างน้อย 2 จุด.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.DifficultyInstance#isHard()
- Origin:
common - Source:
net/minecraft/world/DifficultyInstance.java:27 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Hard
ทำงานยังไง
เรียกต่อ: ordinal(). คืนค่า: this.effectiveDifficulty >= Difficulty.HARD.ordinal().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.DifficultyInstance#isHarderThan(float)
- Origin:
common - Source:
net/minecraft/world/DifficultyInstance.java:31 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Harder Than
ทำงานยังไง
คืนค่า: this.effectiveDifficulty > f.
Parameters
float f
ตัวอย่างใช้งาน
InteractionResult
- Full name:
net.minecraft.world.InteractionResult - Package:
net.minecraft.world - Source:
common—net/minecraft/world/InteractionResult.java - Type:
interface - Modifiers:
public sealed
net.minecraft.world.InteractionResult#consumesAction()
- Origin:
common - Source:
net/minecraft/world/InteractionResult.java:18 - Modifiers:
default - Return:
boolean
คืออะไร
ดำเนินการ consumesAction ตาม implementation ของ InteractionResult
ทำงานยังไง
คืนค่า: false.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
LockCode
- Full name:
net.minecraft.world.LockCode - Package:
net.minecraft.world - Source:
common—net/minecraft/world/LockCode.java - Type:
record - Modifiers:
public
net.minecraft.world.LockCode#addToTag(CompoundTag,HolderLookup.Provider)
- Origin:
common - Source:
net/minecraft/world/LockCode.java:22 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม To Tag
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: encode(), createSerializationContext(), result(), ifPresent(), put(). สร้างออบเจ็กต์: CompoundTag.
Parameters
CompoundTag compoundTagHolderLookup.Provider provider
ตัวอย่างใช้งาน
LockCode instance = ...;
CompoundTag compoundTag = ...;
HolderLookup.Provider provider = ...;
instance.addToTag(compoundTag, provider);
net.minecraft.world.LockCode#fromTag(CompoundTag,HolderLookup.Provider)
- Origin:
common - Source:
net/minecraft/world/LockCode.java:29 - Modifiers:
public static - Return:
LockCode
คืออะไร
ดำเนินการ fromTag ตาม implementation ของ LockCode
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: contains(), decode(), createSerializationContext(), get(), isSuccess(), getOrThrow(), getFirst(). มีจุด return อย่างน้อย 2 จุด.
Parameters
CompoundTag compoundTagHolderLookup.Provider provider
ตัวอย่างใช้งาน
CompoundTag compoundTag = ...;
HolderLookup.Provider provider = ...;
LockCode result = LockCode.fromTag(compoundTag, provider);
net.minecraft.world.LockCode#unlocksWith(ItemStack)
- Origin:
common - Source:
net/minecraft/world/LockCode.java:18 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ unlocksWith ตาม implementation ของ LockCode
ทำงานยังไง
เรียกต่อ: test(). คืนค่า: this.predicate.test(itemStack).
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
LockCode instance = ...;
ItemStack itemStack = ...;
boolean result = instance.unlocksWith(itemStack);
MenuProvider
- Full name:
net.minecraft.world.MenuProvider - Package:
net.minecraft.world - Source:
common—net/minecraft/world/MenuProvider.java - Type:
interface - Modifiers:
public - Implements:
MenuConstructor,FabricScreenHandlerFactory
net.minecraft.world.MenuProvider#getDisplayName()
- Origin:
common - Source:
net/minecraft/world/MenuProvider.java:11 - Modifiers: ``
- Return:
Component
คืออะไร
อ่านค่า Display Name
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
Nameable
- Full name:
net.minecraft.world.Nameable - Package:
net.minecraft.world - Source:
common—net/minecraft/world/Nameable.java - Type:
interface - Modifiers:
public
net.minecraft.world.Nameable#getCustomName()
- Origin:
common - Source:
net/minecraft/world/Nameable.java:17 - Modifiers:
default - Return:
Component
คืออะไร
อ่านค่า Custom Name
ทำงานยังไง
คืนค่า: null.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.Nameable#getDisplayName()
- Origin:
common - Source:
net/minecraft/world/Nameable.java:13 - Modifiers:
default - Return:
Component
คืออะไร
อ่านค่า Display Name
ทำงานยังไง
เรียกต่อ: getName(). คืนค่า: this.getName().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.Nameable#getName()
- Origin:
common - Source:
net/minecraft/world/Nameable.java:7 - Modifiers: ``
- Return:
Component
คืออะไร
อ่านค่า Name
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.Nameable#hasCustomName()
- Origin:
common - Source:
net/minecraft/world/Nameable.java:9 - Modifiers:
default - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Custom Name
ทำงานยังไง
เรียกต่อ: getCustomName(). คืนค่า: this.getCustomName() != null.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
RandomizableContainer
- Full name:
net.minecraft.world.RandomizableContainer - Package:
net.minecraft.world - Source:
common—net/minecraft/world/RandomizableContainer.java - Type:
interface - Modifiers:
public - Implements:
Container
net.minecraft.world.RandomizableContainer#getBlockPos()
- Origin:
common - Source:
net/minecraft/world/RandomizableContainer.java:40 - Modifiers: ``
- Return:
BlockPos
คืออะไร
อ่านค่า Block Pos
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.RandomizableContainer#getLevel()
- Origin:
common - Source:
net/minecraft/world/RandomizableContainer.java:42 - Modifiers: ``
- Return:
Level
คืออะไร
อ่านค่า Level
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.RandomizableContainer#getLootTable()
- Origin:
common - Source:
net/minecraft/world/RandomizableContainer.java:26 - Modifiers: ``
- Return:
ResourceKey<LootTable>
คืออะไร
อ่านค่า Loot Table
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.RandomizableContainer#getLootTableSeed()
- Origin:
common - Source:
net/minecraft/world/RandomizableContainer.java:36 - Modifiers: ``
- Return:
long
คืออะไร
อ่านค่า Loot Table Seed
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.RandomizableContainer#setBlockEntityLootTable(BlockGetter,RandomSource,BlockPos,ResourceKey<LootTable>)
- Origin:
common - Source:
net/minecraft/world/RandomizableContainer.java:45 - Modifiers:
static - Return:
void
คืออะไร
กำหนดค่า Block Entity Loot Table
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity(), setLootTable(), nextLong().
Parameters
BlockGetter blockGetterRandomSource randomSourceBlockPos blockPosResourceKey<LootTable> resourceKey
ตัวอย่างใช้งาน
BlockGetter blockGetter = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
ResourceKey<LootTable> resourceKey = ...;
RandomizableContainer.setBlockEntityLootTable(blockGetter, randomSource, blockPos, resourceKey);
net.minecraft.world.RandomizableContainer#setLootTable(ResourceKey<LootTable>)
- Origin:
common - Source:
net/minecraft/world/RandomizableContainer.java:29 - Modifiers: ``
- Return:
void
คืออะไร
กำหนดค่า Loot Table
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
ResourceKey<LootTable> resourceKey
ตัวอย่างใช้งาน
RandomizableContainer instance = ...;
ResourceKey<LootTable> resourceKey = ...;
instance.setLootTable(resourceKey);
net.minecraft.world.RandomizableContainer#setLootTable(ResourceKey<LootTable>,long)
- Origin:
common - Source:
net/minecraft/world/RandomizableContainer.java:31 - Modifiers:
default - Return:
void
คืออะไร
กำหนดค่า Loot Table
ทำงานยังไง
เรียกต่อ: setLootTableSeed().
Parameters
ResourceKey<LootTable> resourceKeylong l
ตัวอย่างใช้งาน
RandomizableContainer instance = ...;
ResourceKey<LootTable> resourceKey = ...;
instance.setLootTable(resourceKey, 0L);
net.minecraft.world.RandomizableContainer#setLootTableSeed(long)
- Origin:
common - Source:
net/minecraft/world/RandomizableContainer.java:38 - Modifiers: ``
- Return:
void
คืออะไร
กำหนดค่า Loot Table Seed
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
long l
ตัวอย่างใช้งาน
net.minecraft.world.RandomizableContainer#tryLoadLootTable(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/RandomizableContainer.java:51 - Modifiers:
default - Return:
boolean
คืออะไร
ดำเนินการ tryLoadLootTable ตาม implementation ของ RandomizableContainer
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: contains(), setLootTable(), create(), parse(), getString(), setLootTableSeed(), getLong(). มีจุด return อย่างน้อย 2 จุด.
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
RandomizableContainer instance = ...;
CompoundTag compoundTag = ...;
boolean result = instance.tryLoadLootTable(compoundTag);
net.minecraft.world.RandomizableContainer#trySaveLootTable(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/RandomizableContainer.java:66 - Modifiers:
default - Return:
boolean
คืออะไร
ดำเนินการ trySaveLootTable ตาม implementation ของ RandomizableContainer
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getLootTable(), putString(), location(), toString(), getLootTableSeed(), putLong(). มีจุด return อย่างน้อย 2 จุด.
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
RandomizableContainer instance = ...;
CompoundTag compoundTag = ...;
boolean result = instance.trySaveLootTable(compoundTag);
net.minecraft.world.RandomizableContainer#unpackLootTable(Player)
- Origin:
common - Source:
net/minecraft/world/RandomizableContainer.java:81 - Modifiers:
default - Return:
void
คืออะไร
ดำเนินการ unpackLootTable ตาม implementation ของ RandomizableContainer
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getLevel(), getBlockPos(), getLootTable(), getServer(), reloadableRegistries(), trigger(), setLootTable(), Builder(). สร้างออบเจ็กต์: LootParams.Builder.
Parameters
Player player
ตัวอย่างใช้งาน
RandomSequence
- Full name:
net.minecraft.world.RandomSequence - Package:
net.minecraft.world - Source:
common—net/minecraft/world/RandomSequence.java - Type:
class - Modifiers:
public
net.minecraft.world.RandomSequence#random()
- Origin:
common - Source:
net/minecraft/world/RandomSequence.java:43 - Modifiers:
public - Return:
RandomSource
คืออะไร
ดำเนินการ random ตาม implementation ของ RandomSequence
ทำงานยังไง
คืนค่า: this.source.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.RandomSequence#RandomSequence(long,Optional<ResourceLocation>)
- Origin:
common - Source:
net/minecraft/world/RandomSequence.java:26 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ RandomSequence ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: createSequence().
Parameters
long lOptional<ResourceLocation> optional
ตัวอย่างใช้งาน
Optional<ResourceLocation> optional = ...;
RandomSequence instance = new RandomSequence(0L, optional);
net.minecraft.world.RandomSequence#RandomSequence(long,ResourceLocation)
- Origin:
common - Source:
net/minecraft/world/RandomSequence.java:22 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ RandomSequence ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: createSequence(), of().
Parameters
long lResourceLocation resourceLocation
ตัวอย่างใช้งาน
ResourceLocation resourceLocation = ...;
RandomSequence instance = new RandomSequence(0L, resourceLocation);
net.minecraft.world.RandomSequence#RandomSequence(XoroshiroRandomSource)
- Origin:
common - Source:
net/minecraft/world/RandomSequence.java:18 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ RandomSequence ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: source.
Parameters
XoroshiroRandomSource xoroshiroRandomSource
ตัวอย่างใช้งาน
XoroshiroRandomSource xoroshiroRandomSource = ...;
RandomSequence instance = new RandomSequence(xoroshiroRandomSource);
net.minecraft.world.RandomSequence#seedForKey(ResourceLocation)
- Origin:
common - Source:
net/minecraft/world/RandomSequence.java:39 - Modifiers:
public static - Return:
RandomSupport.Seed128bit
คืออะไร
ดำเนินการ seedForKey ตาม implementation ของ RandomSequence
ทำงานยังไง
เรียกต่อ: seedFromHashOf(), toString(). คืนค่า: RandomSupport.seedFromHashOf(resourceLocation.toString()).
Parameters
ResourceLocation resourceLocation
ตัวอย่างใช้งาน
ResourceLocation resourceLocation = ...;
RandomSupport.Seed128bit result = RandomSequence.seedForKey(resourceLocation);
RandomSequences
- Full name:
net.minecraft.world.RandomSequences - Package:
net.minecraft.world - Source:
common—net/minecraft/world/RandomSequences.java - Type:
class - Modifiers:
public - Extends:
SavedData
net.minecraft.world.RandomSequences#clear()
- Origin:
common - Source:
net/minecraft/world/RandomSequences.java:97 - Modifiers:
public - Return:
int
คืออะไร
ล้าง clear
ทำงานยังไง
เรียกต่อ: size(). คืนค่า: i.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.RandomSequences#factory(long)
- Origin:
common - Source:
net/minecraft/world/RandomSequences.java:26 - Modifiers:
public static - Return:
SavedData.Factory<RandomSequences>
คืออะไร
ดำเนินการ factory ตาม implementation ของ RandomSequences
ทำงานยังไง
เรียกต่อ: load(). สร้างออบเจ็กต์: SavedData.Factory<>, RandomSequences. คืนค่า: new SavedData.Factory<>(() -> new RandomSequences(l), (compoundTag, provider) -> load(l, compoundTag), DataFixTypes.SAVED_DATA_RANDOM_SEQUENCES).
Parameters
long l
ตัวอย่างใช้งาน
net.minecraft.world.RandomSequences#forAllSequences(BiConsumer<ResourceLocation, RandomSequence>)
- Origin:
common - Source:
net/minecraft/world/RandomSequences.java:48 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ forAllSequences ตาม implementation ของ RandomSequences
ทำงานยังไง
เรียกต่อ: forEach().
Parameters
BiConsumer<ResourceLocation, RandomSequence> biConsumer
ตัวอย่างใช้งาน
RandomSequences instance = ...;
BiConsumer<ResourceLocation, RandomSequence> biConsumer = ...;
instance.forAllSequences(biConsumer);
net.minecraft.world.RandomSequences#get(ResourceLocation)
- Origin:
common - Source:
net/minecraft/world/RandomSequences.java:34 - Modifiers:
public - Return:
RandomSource
คืออะไร
อ่านค่า get
ทำงานยังไง
เรียกต่อ: computeIfAbsent(), random(), DirtyMarkingRandomSource(). สร้างออบเจ็กต์: RandomSequences.DirtyMarkingRandomSource. คืนค่า: new RandomSequences.DirtyMarkingRandomSource(randomSource).
Parameters
ResourceLocation resourceLocation
ตัวอย่างใช้งาน
RandomSequences instance = ...;
ResourceLocation resourceLocation = ...;
RandomSource result = instance.get(resourceLocation);
net.minecraft.world.RandomSequences#load(long,CompoundTag)
- Origin:
common - Source:
net/minecraft/world/RandomSequences.java:78 - Modifiers:
public static - Return:
RandomSequences
คืออะไร
โหลด load
ทำงานยังไง
มีการวนลูป ; มีการจัดการ exception. เรียกต่อ: setSeedDefaults(), getInt(), getBooleanWithDefault(), getCompound(), getAllKeys(), decode(), get(), result(). สร้างออบเจ็กต์: RandomSequences. คืนค่า: randomSequences.
Parameters
long lCompoundTag compoundTag
ตัวอย่างใช้งาน
net.minecraft.world.RandomSequences#RandomSequences(long)
- Origin:
common - Source:
net/minecraft/world/RandomSequences.java:30 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ RandomSequences ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: worldSeed.
Parameters
long l
ตัวอย่างใช้งาน
net.minecraft.world.RandomSequences#reset(ResourceLocation)
- Origin:
common - Source:
net/minecraft/world/RandomSequences.java:103 - Modifiers:
public - Return:
void
คืออะไร
รีเซ็ต reset
ทำงานยังไง
เรียกต่อ: put(), createSequence().
Parameters
ResourceLocation resourceLocation
ตัวอย่างใช้งาน
RandomSequences instance = ...;
ResourceLocation resourceLocation = ...;
instance.reset(resourceLocation);
net.minecraft.world.RandomSequences#reset(ResourceLocation,int,boolean,boolean)
- Origin:
common - Source:
net/minecraft/world/RandomSequences.java:107 - Modifiers:
public - Return:
void
คืออะไร
รีเซ็ต reset
ทำงานยังไง
เรียกต่อ: put(), createSequence().
Parameters
ResourceLocation resourceLocationint iboolean blboolean bl2
ตัวอย่างใช้งาน
RandomSequences instance = ...;
ResourceLocation resourceLocation = ...;
instance.reset(resourceLocation, 0, true, true);
net.minecraft.world.RandomSequences#save(CompoundTag,HolderLookup.Provider)
- Origin:
common - Source:
net/minecraft/world/RandomSequences.java:58 - Modifiers:
public - Return:
CompoundTag
คืออะไร
บันทึก save
ทำงานยังไง
เรียกต่อ: putInt(), putBoolean(), forEach(), put(), toString(), encodeStart(), result(), orElseThrow(). สร้างออบเจ็กต์: CompoundTag. คืนค่า: compoundTag.
Parameters
CompoundTag compoundTagHolderLookup.Provider provider
ตัวอย่างใช้งาน
RandomSequences instance = ...;
CompoundTag compoundTag = ...;
HolderLookup.Provider provider = ...;
CompoundTag result = instance.save(compoundTag, provider);
net.minecraft.world.RandomSequences#setSeedDefaults(int,boolean,boolean)
- Origin:
common - Source:
net/minecraft/world/RandomSequences.java:52 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Seed Defaults
ทำงานยังไง
แก้ state: salt, includeWorldSeed, includeSequenceId.
Parameters
int iboolean blboolean bl2
ตัวอย่างใช้งาน
SimpleContainer
- Full name:
net.minecraft.world.SimpleContainer - Package:
net.minecraft.world - Source:
common—net/minecraft/world/SimpleContainer.java - Type:
class - Modifiers:
public - Implements:
Container,StackedContentsCompatible
net.minecraft.world.SimpleContainer#addItem(ItemStack)
- Origin:
common - Source:
net/minecraft/world/SimpleContainer.java:89 - Modifiers:
public - Return:
ItemStack
คืออะไร
เพิ่ม Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isEmpty(), copy(), moveItemToOccupiedSlotsWithSameType(), moveItemToEmptySlots(). มีจุด return อย่างน้อย 3 จุด.
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
SimpleContainer instance = ...;
ItemStack itemStack = ...;
ItemStack result = instance.addItem(itemStack);
net.minecraft.world.SimpleContainer#addListener(ContainerListener)
- Origin:
common - Source:
net/minecraft/world/SimpleContainer.java:32 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Listener
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: listeners. เรียกต่อ: newArrayList(), add().
Parameters
ContainerListener containerListener
ตัวอย่างใช้งาน
SimpleContainer instance = ...;
ContainerListener containerListener = ...;
instance.addListener(containerListener);
net.minecraft.world.SimpleContainer#canAddItem(ItemStack)
- Origin:
common - Source:
net/minecraft/world/SimpleContainer.java:104 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Add Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: isEmpty(), isSameItemSameComponents(), getCount(), getMaxStackSize(). คืนค่า: bl.
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
SimpleContainer instance = ...;
ItemStack itemStack = ...;
boolean result = instance.canAddItem(itemStack);
net.minecraft.world.SimpleContainer#clearContent()
- Origin:
common - Source:
net/minecraft/world/SimpleContainer.java:165 - Modifiers:
public - Return:
void
คืออะไร
ล้าง Content
ทำงานยังไง
เรียกต่อ: clear(), setChanged().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.SimpleContainer#createTag(HolderLookup.Provider)
- Origin:
common - Source:
net/minecraft/world/SimpleContainer.java:223 - Modifiers:
public - Return:
ListTag
คืออะไร
สร้าง Tag
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getContainerSize(), getItem(), isEmpty(), add(), save(). สร้างออบเจ็กต์: ListTag. คืนค่า: listTag.
Parameters
HolderLookup.Provider provider
ตัวอย่างใช้งาน
SimpleContainer instance = ...;
HolderLookup.Provider provider = ...;
ListTag result = instance.createTag(provider);
net.minecraft.world.SimpleContainer#fillStackedContents(StackedItemContents)
- Origin:
common - Source:
net/minecraft/world/SimpleContainer.java:171 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ fillStackedContents ตาม implementation ของ SimpleContainer
ทำงานยังไง
มีการวนลูป. เรียกต่อ: accountStack().
Parameters
StackedItemContents stackedItemContents
ตัวอย่างใช้งาน
SimpleContainer instance = ...;
StackedItemContents stackedItemContents = ...;
instance.fillStackedContents(stackedItemContents);
net.minecraft.world.SimpleContainer#fromTag(ListTag,HolderLookup.Provider)
- Origin:
common - Source:
net/minecraft/world/SimpleContainer.java:215 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ fromTag ตาม implementation ของ SimpleContainer
ทำงานยังไง
มีการวนลูป. เรียกต่อ: clearContent(), size(), parse(), getCompound(), ifPresent().
Parameters
ListTag listTagHolderLookup.Provider provider
ตัวอย่างใช้งาน
SimpleContainer instance = ...;
ListTag listTag = ...;
HolderLookup.Provider provider = ...;
instance.fromTag(listTag, provider);
net.minecraft.world.SimpleContainer#getContainerSize()
- Origin:
common - Source:
net/minecraft/world/SimpleContainer.java:135 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Container Size
ทำงานยังไง
คืนค่า: this.size.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.SimpleContainer#getItem(int)
- Origin:
common - Source:
net/minecraft/world/SimpleContainer.java:46 - Modifiers:
public - Return:
ItemStack
คืออะไร
อ่านค่า Item
ทำงานยังไง
เรียกต่อ: size(), get(). คืนค่า: i >= 0 && i < this.items.size() ? this.items.get(i) : ItemStack.EMPTY.
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.SimpleContainer#getItems()
- Origin:
common - Source:
net/minecraft/world/SimpleContainer.java:236 - Modifiers:
public - Return:
NonNullList<ItemStack>
คืออะไร
อ่านค่า Items
ทำงานยังไง
คืนค่า: this.items.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.SimpleContainer#isEmpty()
- Origin:
common - Source:
net/minecraft/world/SimpleContainer.java:140 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Empty
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. มีจุด return อย่างน้อย 2 จุด.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.SimpleContainer#removeAllItems()
- Origin:
common - Source:
net/minecraft/world/SimpleContainer.java:51 - Modifiers:
public - Return:
List<ItemStack>
คืออะไร
ลบ All Items
ทำงานยังไง
เรียกต่อ: stream(), filter(), isEmpty(), collect(), toList(), clearContent(). คืนค่า: list.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.SimpleContainer#removeItem(int,int)
- Origin:
common - Source:
net/minecraft/world/SimpleContainer.java:57 - Modifiers:
public - Return:
ItemStack
คืออะไร
ลบ Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isEmpty(), setChanged(). คืนค่า: itemStack.
Parameters
int iint j
ตัวอย่างใช้งาน
net.minecraft.world.SimpleContainer#removeItemNoUpdate(int)
- Origin:
common - Source:
net/minecraft/world/SimpleContainer.java:117 - Modifiers:
public - Return:
ItemStack
คืออะไร
ลบ Item No Update
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: get(), isEmpty(), set(). มีจุด return อย่างน้อย 2 จุด.
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.SimpleContainer#removeItemType(Item,int)
- Origin:
common - Source:
net/minecraft/world/SimpleContainer.java:67 - Modifiers:
public - Return:
ItemStack
คืออะไร
ลบ Item Type
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getItem(), equals(), getCount(), split(), grow(), isEmpty(), setChanged(). สร้างออบเจ็กต์: ItemStack. คืนค่า: itemStack.
Parameters
Item itemint i
ตัวอย่างใช้งาน
SimpleContainer instance = ...;
Item item = ...;
ItemStack result = instance.removeItemType(item, 0);
net.minecraft.world.SimpleContainer#removeListener(ContainerListener)
- Origin:
common - Source:
net/minecraft/world/SimpleContainer.java:40 - Modifiers:
public - Return:
void
คืออะไร
ลบ Listener
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: remove().
Parameters
ContainerListener containerListener
ตัวอย่างใช้งาน
SimpleContainer instance = ...;
ContainerListener containerListener = ...;
instance.removeListener(containerListener);
net.minecraft.world.SimpleContainer#setChanged()
- Origin:
common - Source:
net/minecraft/world/SimpleContainer.java:151 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Changed
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: containerChanged().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.SimpleContainer#setItem(int,ItemStack)
- Origin:
common - Source:
net/minecraft/world/SimpleContainer.java:128 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Item
ทำงานยังไง
เรียกต่อ: set(), limitSize(), getMaxStackSize(), setChanged().
Parameters
int iItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.SimpleContainer#SimpleContainer(int)
- Origin:
common - Source:
net/minecraft/world/SimpleContainer.java:22 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ SimpleContainer ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: size, items. เรียกต่อ: withSize().
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.SimpleContainer#SimpleContainer(ItemStack[])
- Origin:
common - Source:
net/minecraft/world/SimpleContainer.java:27 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ SimpleContainer ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: size, items. เรียกต่อ: of().
Parameters
ItemStack[] itemStacks
ตัวอย่างใช้งาน
net.minecraft.world.SimpleContainer#stillValid(Player)
- Origin:
common - Source:
net/minecraft/world/SimpleContainer.java:160 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ stillValid ตาม implementation ของ SimpleContainer
ทำงานยังไง
คืนค่า: true.
Parameters
Player player
ตัวอย่างใช้งาน
net.minecraft.world.SimpleContainer#toString()
- Origin:
common - Source:
net/minecraft/world/SimpleContainer.java:178 - Modifiers:
public - Return:
String
คืออะไร
ดำเนินการ toString ตาม implementation ของ SimpleContainer
ทำงานยังไง
เรียกต่อ: stream(), filter(), isEmpty(), collect(), toList(). คืนค่า: this.items.stream().filter(itemStack -> !itemStack.isEmpty()).collect(Collectors.toList()).toString().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SimpleMenuProvider
- Full name:
net.minecraft.world.SimpleMenuProvider - Package:
net.minecraft.world - Source:
common—net/minecraft/world/SimpleMenuProvider.java - Type:
class - Modifiers:
public final - Implements:
MenuProvider
net.minecraft.world.SimpleMenuProvider#createMenu(int,Inventory,Player)
- Origin:
common - Source:
net/minecraft/world/SimpleMenuProvider.java:23 - Modifiers:
public - Return:
AbstractContainerMenu
คืออะไร
สร้าง Menu
ทำงานยังไง
คืนค่า: this.menuConstructor.createMenu(i, inventory, player).
Parameters
int iInventory inventoryPlayer player
ตัวอย่างใช้งาน
SimpleMenuProvider instance = ...;
Inventory inventory = ...;
Player player = ...;
AbstractContainerMenu result = instance.createMenu(0, inventory, player);
net.minecraft.world.SimpleMenuProvider#getDisplayName()
- Origin:
common - Source:
net/minecraft/world/SimpleMenuProvider.java:18 - Modifiers:
public - Return:
Component
คืออะไร
อ่านค่า Display Name
ทำงานยังไง
คืนค่า: this.title.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.SimpleMenuProvider#SimpleMenuProvider(MenuConstructor,Component)
- Origin:
common - Source:
net/minecraft/world/SimpleMenuProvider.java:13 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ SimpleMenuProvider ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: menuConstructor, title.
Parameters
MenuConstructor menuConstructorComponent component
ตัวอย่างใช้งาน
MenuConstructor menuConstructor = ...;
Component component = ...;
SimpleMenuProvider instance = new SimpleMenuProvider(menuConstructor, component);
TickRateManager
- Full name:
net.minecraft.world.TickRateManager - Package:
net.minecraft.world - Source:
common—net/minecraft/world/TickRateManager.java - Type:
class - Modifiers:
public
net.minecraft.world.TickRateManager#frozenTicksToRun()
- Origin:
common - Source:
net/minecraft/world/TickRateManager.java:44 - Modifiers:
public - Return:
int
คืออะไร
ดำเนินการ frozenTicksToRun ตาม implementation ของ TickRateManager
ทำงานยังไง
คืนค่า: this.frozenTicksToRun.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.TickRateManager#isEntityFrozen(Entity)
- Origin:
common - Source:
net/minecraft/world/TickRateManager.java:63 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Entity Frozen
ทำงานยังไง
เรียกต่อ: runsNormally(), countPlayerPassengers(). คืนค่า: !this.runsNormally() && !(entity instanceof Player) && entity.countPlayerPassengers() <= 0.
Parameters
Entity entity
ตัวอย่างใช้งาน
TickRateManager instance = ...;
Entity entity = ...;
boolean result = instance.isEntityFrozen(entity);
net.minecraft.world.TickRateManager#isFrozen()
- Origin:
common - Source:
net/minecraft/world/TickRateManager.java:52 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Frozen
ทำงานยังไง
คืนค่า: this.isFrozen.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.TickRateManager#isSteppingForward()
- Origin:
common - Source:
net/minecraft/world/TickRateManager.java:36 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Stepping Forward
ทำงานยังไง
คืนค่า: this.frozenTicksToRun > 0.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.TickRateManager#millisecondsPerTick()
- Origin:
common - Source:
net/minecraft/world/TickRateManager.java:24 - Modifiers:
public - Return:
float
คืออะไร
ดำเนินการ millisecondsPerTick ตาม implementation ของ TickRateManager
ทำงานยังไง
คืนค่า: (float)this.nanosecondsPerTick / (float)TimeUtil.NANOSECONDS_PER_MILLISECOND.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.TickRateManager#nanosecondsPerTick()
- Origin:
common - Source:
net/minecraft/world/TickRateManager.java:28 - Modifiers:
public - Return:
long
คืออะไร
ดำเนินการ nanosecondsPerTick ตาม implementation ของ TickRateManager
ทำงานยังไง
คืนค่า: this.nanosecondsPerTick.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.TickRateManager#runsNormally()
- Origin:
common - Source:
net/minecraft/world/TickRateManager.java:32 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ runsNormally ตาม implementation ของ TickRateManager
ทำงานยังไง
คืนค่า: this.runGameElements.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.TickRateManager#setFrozen(boolean)
- Origin:
common - Source:
net/minecraft/world/TickRateManager.java:48 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Frozen
ทำงานยังไง
แก้ state: isFrozen.
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.TickRateManager#setFrozenTicksToRun(int)
- Origin:
common - Source:
net/minecraft/world/TickRateManager.java:40 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Frozen Ticks To Run
ทำงานยังไง
แก้ state: frozenTicksToRun.
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.TickRateManager#setTickRate(float)
- Origin:
common - Source:
net/minecraft/world/TickRateManager.java:15 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Tick Rate
ทำงานยังไง
แก้ state: tickrate, nanosecondsPerTick. เรียกต่อ: max().
Parameters
float f
ตัวอย่างใช้งาน
net.minecraft.world.TickRateManager#tick()
- Origin:
common - Source:
net/minecraft/world/TickRateManager.java:56 - Modifiers:
public - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: runGameElements, frozenTicksToRun.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.TickRateManager#tickrate()
- Origin:
common - Source:
net/minecraft/world/TickRateManager.java:20 - Modifiers:
public - Return:
float
คืออะไร
ดำเนินการ tickrate ตาม implementation ของ TickRateManager
ทำงานยังไง
คืนค่า: this.tickrate.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
WorldlyContainer
- Full name:
net.minecraft.world.WorldlyContainer - Package:
net.minecraft.world - Source:
common—net/minecraft/world/WorldlyContainer.java - Type:
interface - Modifiers:
public - Implements:
Container
net.minecraft.world.WorldlyContainer#canPlaceItemThroughFace(int,ItemStack,Direction)
- Origin:
common - Source:
net/minecraft/world/WorldlyContainer.java:10 - Modifiers: ``
- Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Place Item Through Face
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
int iItemStack itemStackDirection direction
ตัวอย่างใช้งาน
WorldlyContainer instance = ...;
ItemStack itemStack = ...;
Direction direction = ...;
boolean result = instance.canPlaceItemThroughFace(0, itemStack, direction);
net.minecraft.world.WorldlyContainer#canTakeItemThroughFace(int,ItemStack,Direction)
- Origin:
common - Source:
net/minecraft/world/WorldlyContainer.java:12 - Modifiers: ``
- Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Take Item Through Face
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
int iItemStack itemStackDirection direction
ตัวอย่างใช้งาน
WorldlyContainer instance = ...;
ItemStack itemStack = ...;
Direction direction = ...;
boolean result = instance.canTakeItemThroughFace(0, itemStack, direction);
net.minecraft.world.WorldlyContainer#getSlotsForFace(Direction)
- Origin:
common - Source:
net/minecraft/world/WorldlyContainer.java:8 - Modifiers: ``
- Return:
int[]
คืออะไร
อ่านค่า Slots For Face
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
Direction direction
ตัวอย่างใช้งาน
WorldlyContainer instance = ...;
Direction direction = ...;
int[] result = instance.getSlotsForFace(direction);
WorldlyContainerHolder
- Full name:
net.minecraft.world.WorldlyContainerHolder - Package:
net.minecraft.world - Source:
common—net/minecraft/world/WorldlyContainerHolder.java - Type:
interface - Modifiers:
public
net.minecraft.world.WorldlyContainerHolder#getContainer(BlockState,LevelAccessor,BlockPos)
- Origin:
common - Source:
net/minecraft/world/WorldlyContainerHolder.java:8 - Modifiers: ``
- Return:
WorldlyContainer
คืออะไร
อ่านค่า Container
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
BlockState blockStateLevelAccessor levelAccessorBlockPos blockPos
ตัวอย่างใช้งาน
WorldlyContainerHolder instance = ...;
BlockState blockState = ...;
LevelAccessor levelAccessor = ...;
BlockPos blockPos = ...;
WorldlyContainer result = instance.getContainer(blockState, levelAccessor, blockPos);