Skip to content

Package net.minecraft.world.level.entity

Part 1/1


ChunkEntities

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

net.minecraft.world.level.entity.ChunkEntities#ChunkEntities(ChunkPos,List<T>)

  • Origin: common
  • Source: net/minecraft/world/level/entity/ChunkEntities.java:11
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: pos, entities.

Parameters

  • ChunkPos chunkPos
  • List<T> list

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

ChunkPos chunkPos = ...;
List<T> list = ...;
ChunkEntities instance = new ChunkEntities(chunkPos, list);

net.minecraft.world.level.entity.ChunkEntities#getEntities()

  • Origin: common
  • Source: net/minecraft/world/level/entity/ChunkEntities.java:20
  • Modifiers: public
  • Return: Stream<T>

คืออะไร

อ่านค่า Entities

ทำงานยังไง

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

Parameters

  • ไม่มี

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

ChunkEntities instance = ...;
Stream<T> result = instance.getEntities();

net.minecraft.world.level.entity.ChunkEntities#getPos()

  • Origin: common
  • Source: net/minecraft/world/level/entity/ChunkEntities.java:16
  • Modifiers: public
  • Return: ChunkPos

คืออะไร

อ่านค่า Pos

ทำงานยังไง

คืนค่า: this.pos.

Parameters

  • ไม่มี

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

ChunkEntities instance = ...;
ChunkPos result = instance.getPos();

net.minecraft.world.level.entity.ChunkEntities#isEmpty()

  • Origin: common
  • Source: net/minecraft/world/level/entity/ChunkEntities.java:24
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: this.entities.isEmpty().

Parameters

  • ไม่มี

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

ChunkEntities instance = ...;
boolean result = instance.isEmpty();

ChunkStatusUpdateListener

  • Full name: net.minecraft.world.level.entity.ChunkStatusUpdateListener
  • Package: net.minecraft.world.level.entity
  • Source: commonnet/minecraft/world/level/entity/ChunkStatusUpdateListener.java
  • Type: interface
  • Modifiers: public

net.minecraft.world.level.entity.ChunkStatusUpdateListener#onChunkStatusChange(ChunkPos,FullChunkStatus)

  • Origin: common
  • Source: net/minecraft/world/level/entity/ChunkStatusUpdateListener.java:8
  • Modifiers: ``
  • Return: void

คืออะไร

จัดการเหตุการณ์ Chunk Status Change

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ChunkPos chunkPos
  • FullChunkStatus fullChunkStatus

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

ChunkStatusUpdateListener instance = ...;
ChunkPos chunkPos = ...;
FullChunkStatus fullChunkStatus = ...;
instance.onChunkStatusChange(chunkPos, fullChunkStatus);

EntityAccess

  • Full name: net.minecraft.world.level.entity.EntityAccess
  • Package: net.minecraft.world.level.entity
  • Source: commonnet/minecraft/world/level/entity/EntityAccess.java
  • Type: interface
  • Modifiers: public

net.minecraft.world.level.entity.EntityAccess#blockPosition()

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntityAccess.java:14
  • Modifiers: ``
  • Return: BlockPos

คืออะไร

ดำเนินการ blockPosition ตาม implementation ของ EntityAccess

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

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

EntityAccess instance = ...;
BlockPos result = instance.blockPosition();

net.minecraft.world.level.entity.EntityAccess#getBoundingBox()

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntityAccess.java:16
  • Modifiers: ``
  • Return: AABB

คืออะไร

อ่านค่า Bounding Box

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

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

EntityAccess instance = ...;
AABB result = instance.getBoundingBox();

net.minecraft.world.level.entity.EntityAccess#getId()

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntityAccess.java:10
  • Modifiers: ``
  • Return: int

คืออะไร

อ่านค่า Id

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

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

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

net.minecraft.world.level.entity.EntityAccess#getPassengersAndSelf()

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntityAccess.java:22
  • Modifiers: ``
  • Return: Stream<? extends EntityAccess>

คืออะไร

อ่านค่า Passengers And Self

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

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

EntityAccess instance = ...;
Stream<? extends EntityAccess> result = instance.getPassengersAndSelf();

net.minecraft.world.level.entity.EntityAccess#getSelfAndPassengers()

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntityAccess.java:20
  • Modifiers: ``
  • Return: Stream<? extends EntityAccess>

คืออะไร

อ่านค่า Self And Passengers

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

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

EntityAccess instance = ...;
Stream<? extends EntityAccess> result = instance.getSelfAndPassengers();

net.minecraft.world.level.entity.EntityAccess#getUUID()

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntityAccess.java:12
  • Modifiers: ``
  • Return: UUID

คืออะไร

อ่านค่า UUID

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

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

EntityAccess instance = ...;
UUID result = instance.getUUID();

net.minecraft.world.level.entity.EntityAccess#isAlwaysTicking()

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntityAccess.java:28
  • Modifiers: ``
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Always Ticking

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

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

EntityAccess instance = ...;
boolean result = instance.isAlwaysTicking();

net.minecraft.world.level.entity.EntityAccess#setLevelCallback(EntityInLevelCallback)

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntityAccess.java:18
  • Modifiers: ``
  • Return: void

คืออะไร

กำหนดค่า Level Callback

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • EntityInLevelCallback entityInLevelCallback

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

EntityAccess instance = ...;
EntityInLevelCallback entityInLevelCallback = ...;
instance.setLevelCallback(entityInLevelCallback);

net.minecraft.world.level.entity.EntityAccess#setRemoved(Entity.RemovalReason)

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntityAccess.java:24
  • Modifiers: ``
  • Return: void

คืออะไร

กำหนดค่า Removed

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • Entity.RemovalReason removalReason

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

EntityAccess instance = ...;
Entity.RemovalReason removalReason = ...;
instance.setRemoved(removalReason);

net.minecraft.world.level.entity.EntityAccess#shouldBeSaved()

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntityAccess.java:26
  • Modifiers: ``
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Be Saved

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

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

EntityAccess instance = ...;
boolean result = instance.shouldBeSaved();

EntityInLevelCallback

  • Full name: net.minecraft.world.level.entity.EntityInLevelCallback
  • Package: net.minecraft.world.level.entity
  • Source: commonnet/minecraft/world/level/entity/EntityInLevelCallback.java
  • Type: interface
  • Modifiers: public

net.minecraft.world.level.entity.EntityInLevelCallback#onMove()

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntityInLevelCallback.java:16
  • Modifiers: ``
  • Return: void

คืออะไร

จัดการเหตุการณ์ Move

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

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

EntityInLevelCallback instance = ...;
instance.onMove();

net.minecraft.world.level.entity.EntityInLevelCallback#onRemove(Entity.RemovalReason)

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntityInLevelCallback.java:18
  • Modifiers: ``
  • Return: void

คืออะไร

จัดการเหตุการณ์ Remove

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • Entity.RemovalReason removalReason

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

EntityInLevelCallback instance = ...;
Entity.RemovalReason removalReason = ...;
instance.onRemove(removalReason);

EntityLookup

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

net.minecraft.world.level.entity.EntityLookup#add(T)

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntityLookup.java:32
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม add

ทำงานยังไง

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

Parameters

  • T entityAccess

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

EntityLookup instance = ...;
T entityAccess = ...;
instance.add(entityAccess);

net.minecraft.world.level.entity.EntityLookup#count()

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntityLookup.java:57
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ count ตาม implementation ของ EntityLookup

ทำงานยังไง

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

Parameters

  • ไม่มี

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

EntityLookup instance = ...;
int result = instance.count();

net.minecraft.world.level.entity.EntityLookup#getAllEntities()

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntityLookup.java:28
  • Modifiers: public
  • Return: Iterable<T>

คืออะไร

อ่านค่า All Entities

ทำงานยังไง

เรียกต่อ: unmodifiableIterable(), values(). คืนค่า: Iterables.unmodifiableIterable(this.byId.values()).

Parameters

  • ไม่มี

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

EntityLookup instance = ...;
Iterable<T> result = instance.getAllEntities();

net.minecraft.world.level.entity.EntityLookup#getEntities(EntityTypeTest<T, U>,AbortableIterationConsumer<U>)

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntityLookup.java:19
  • Modifiers: public
  • Return: void

คืออะไร

อ่านค่า Entities

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: values(), tryCast(), accept(), shouldAbort().

Parameters

  • EntityTypeTest<T, U> entityTypeTest
  • AbortableIterationConsumer<U> abortableIterationConsumer

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

EntityLookup instance = ...;
EntityTypeTest<T, U> entityTypeTest = ...;
AbortableIterationConsumer<U> abortableIterationConsumer = ...;
instance.getEntities(entityTypeTest, abortableIterationConsumer);

net.minecraft.world.level.entity.EntityLookup#getEntity(int)

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntityLookup.java:47
  • Modifiers: public
  • Return: T

คืออะไร

อ่านค่า Entity

ทำงานยังไง

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

Parameters

  • int i

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

EntityLookup instance = ...;
T result = instance.getEntity(0);

net.minecraft.world.level.entity.EntityLookup#getEntity(UUID)

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntityLookup.java:52
  • Modifiers: public
  • Return: T

คืออะไร

อ่านค่า Entity

ทำงานยังไง

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

Parameters

  • UUID uUID

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

EntityLookup instance = ...;
UUID uUID = ...;
T result = instance.getEntity(uUID);

net.minecraft.world.level.entity.EntityLookup#remove(T)

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntityLookup.java:42
  • Modifiers: public
  • Return: void

คืออะไร

ลบ remove

ทำงานยังไง

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

Parameters

  • T entityAccess

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

EntityLookup instance = ...;
T entityAccess = ...;
instance.remove(entityAccess);

EntityPersistentStorage

  • Full name: net.minecraft.world.level.entity.EntityPersistentStorage
  • Package: net.minecraft.world.level.entity
  • Source: commonnet/minecraft/world/level/entity/EntityPersistentStorage.java
  • Type: interface
  • Modifiers: public
  • Implements: AutoCloseable

net.minecraft.world.level.entity.EntityPersistentStorage#close()

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntityPersistentStorage.java:14
  • Modifiers: default
  • Return: void

คืออะไร

ปิด close

ทำงานยังไง

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

Parameters

  • ไม่มี

Throws

  • IOException

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

EntityPersistentStorage instance = ...;
instance.close();

net.minecraft.world.level.entity.EntityPersistentStorage#flush(boolean)

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntityPersistentStorage.java:12
  • Modifiers: ``
  • Return: void

คืออะไร

ดำเนินการ flush ตาม implementation ของ EntityPersistentStorage

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • boolean bl

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

EntityPersistentStorage instance = ...;
instance.flush(true);

net.minecraft.world.level.entity.EntityPersistentStorage#loadEntities(ChunkPos)

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntityPersistentStorage.java:8
  • Modifiers: ``
  • Return: CompletableFuture<ChunkEntities<T>>

คืออะไร

โหลด Entities

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ChunkPos chunkPos

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

EntityPersistentStorage instance = ...;
ChunkPos chunkPos = ...;
CompletableFuture<ChunkEntities<T>> result = instance.loadEntities(chunkPos);

net.minecraft.world.level.entity.EntityPersistentStorage#storeEntities(ChunkEntities<T>)

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntityPersistentStorage.java:10
  • Modifiers: ``
  • Return: void

คืออะไร

ดำเนินการ storeEntities ตาม implementation ของ EntityPersistentStorage

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ChunkEntities<T> chunkEntities

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

EntityPersistentStorage instance = ...;
ChunkEntities<T> chunkEntities = ...;
instance.storeEntities(chunkEntities);

EntitySection

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

net.minecraft.world.level.entity.EntitySection#add(T)

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntitySection.java:22
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม add

ทำงานยังไง

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

Parameters

  • T entityAccess

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

EntitySection instance = ...;
T entityAccess = ...;
instance.add(entityAccess);

net.minecraft.world.level.entity.EntitySection#EntitySection(Class<T>,Visibility)

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

คืออะไร

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

ทำงานยังไง

แก้ state: chunkStatus, storage. สร้างออบเจ็กต์: ClassInstanceMultiMap<>.

Parameters

  • Class<T> class_
  • Visibility visibility

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

Class<T> class_ = ...;
Visibility visibility = ...;
EntitySection instance = new EntitySection(class_, visibility);

net.minecraft.world.level.entity.EntitySection#getEntities()

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntitySection.java:62
  • Modifiers: public
  • Return: Stream<T>

คืออะไร

อ่านค่า Entities

ทำงานยังไง

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

Parameters

  • ไม่มี

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

EntitySection instance = ...;
Stream<T> result = instance.getEntities();

net.minecraft.world.level.entity.EntitySection#getEntities(AABB,AbortableIterationConsumer<T>)

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntitySection.java:30
  • Modifiers: public
  • Return: AbortableIterationConsumer.Continuation

คืออะไร

อ่านค่า Entities

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getBoundingBox(), intersects(), accept(), shouldAbort(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • AABB aABB
  • AbortableIterationConsumer<T> abortableIterationConsumer

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

EntitySection instance = ...;
AABB aABB = ...;
AbortableIterationConsumer<T> abortableIterationConsumer = ...;
AbortableIterationConsumer.Continuation result = instance.getEntities(aABB, abortableIterationConsumer);

net.minecraft.world.level.entity.EntitySection#getEntities(EntityTypeTest<T, U>,AABB,AbortableIterationConsumer<? super U>)

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntitySection.java:40
  • Modifiers: public
  • Return: AbortableIterationConsumer.Continuation

คืออะไร

อ่านค่า Entities

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: find(), getBaseClass(), isEmpty(), tryCast(), getBoundingBox(), intersects(), accept(), shouldAbort(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • EntityTypeTest<T, U> entityTypeTest
  • AABB aABB
  • AbortableIterationConsumer<? super U> abortableIterationConsumer

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

EntitySection instance = ...;
EntityTypeTest<T, U> entityTypeTest = ...;
AABB aABB = ...;
AbortableIterationConsumer<? super U> abortableIterationConsumer = ...;
AbortableIterationConsumer.Continuation result = instance.getEntities(entityTypeTest, aABB, abortableIterationConsumer);

net.minecraft.world.level.entity.EntitySection#getStatus()

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntitySection.java:66
  • Modifiers: public
  • Return: Visibility

คืออะไร

อ่านค่า Status

ทำงานยังไง

คืนค่า: this.chunkStatus.

Parameters

  • ไม่มี

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

EntitySection instance = ...;
Visibility result = instance.getStatus();

net.minecraft.world.level.entity.EntitySection#isEmpty()

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

คืออะไร

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

ทำงานยังไง

คืนค่า: this.storage.isEmpty().

Parameters

  • ไม่มี

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

EntitySection instance = ...;
boolean result = instance.isEmpty();

net.minecraft.world.level.entity.EntitySection#remove(T)

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntitySection.java:26
  • Modifiers: public
  • Return: boolean

คืออะไร

ลบ remove

ทำงานยังไง

คืนค่า: this.storage.remove(entityAccess).

Parameters

  • T entityAccess

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

EntitySection instance = ...;
T entityAccess = ...;
boolean result = instance.remove(entityAccess);

net.minecraft.world.level.entity.EntitySection#size()

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntitySection.java:76
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ size ตาม implementation ของ EntitySection

ทำงานยังไง

คืนค่า: this.storage.size().

Parameters

  • ไม่มี

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

EntitySection instance = ...;
int result = instance.size();

net.minecraft.world.level.entity.EntitySection#updateChunkStatus(Visibility)

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntitySection.java:70
  • Modifiers: public
  • Return: Visibility

คืออะไร

อัปเดต Chunk Status

ทำงานยังไง

แก้ state: chunkStatus. คืนค่า: visibility2.

Parameters

  • Visibility visibility

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

EntitySection instance = ...;
Visibility visibility = ...;
Visibility result = instance.updateChunkStatus(visibility);

EntitySectionStorage

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

net.minecraft.world.level.entity.EntitySectionStorage#count()

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntitySectionStorage.java:128
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ count ตาม implementation ของ EntitySectionStorage

ทำงานยังไง

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

Parameters

  • ไม่มี

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

EntitySectionStorage instance = ...;
int result = instance.count();

net.minecraft.world.level.entity.EntitySectionStorage#EntitySectionStorage(Class<T>,Long2ObjectFunction<Visibility>)

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

คืออะไร

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

ทำงานยังไง

แก้ state: entityClass, intialSectionVisibility.

Parameters

  • Class<T> class_
  • Long2ObjectFunction<Visibility> long2ObjectFunction

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

Class<T> class_ = ...;
Long2ObjectFunction<Visibility> long2ObjectFunction = ...;
EntitySectionStorage instance = new EntitySectionStorage(class_, long2ObjectFunction);

net.minecraft.world.level.entity.EntitySectionStorage#forEachAccessibleNonEmptySection(AABB,AbortableIterationConsumer<EntitySection<T>>)

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

คืออะไร

ดำเนินการ forEachAccessibleNonEmptySection ตาม implementation ของ EntitySectionStorage

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: posToSectionCoord(), asLong(), subSet(), iterator(), hasNext(), nextLong(), y(), z().

Parameters

  • AABB aABB
  • AbortableIterationConsumer<EntitySection<T>> abortableIterationConsumer

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

EntitySectionStorage instance = ...;
AABB aABB = ...;
AbortableIterationConsumer<EntitySection<T>> abortableIterationConsumer = ...;
instance.forEachAccessibleNonEmptySection(aABB, abortableIterationConsumer);

net.minecraft.world.level.entity.EntitySectionStorage#getAllChunksWithExistingSections()

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntitySectionStorage.java:109
  • Modifiers: public
  • Return: LongSet

คืออะไร

อ่านค่า All Chunks With Existing Sections

ทำงานยังไง

เรียกต่อ: keySet(), forEach(), add(), getChunkKeyFromSectionKey(). สร้างออบเจ็กต์: LongOpenHashSet. คืนค่า: longSet.

Parameters

  • ไม่มี

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

EntitySectionStorage instance = ...;
LongSet result = instance.getAllChunksWithExistingSections();

net.minecraft.world.level.entity.EntitySectionStorage#getEntities(AABB,AbortableIterationConsumer<T>)

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntitySectionStorage.java:115
  • Modifiers: public
  • Return: void

คืออะไร

อ่านค่า Entities

ทำงานยังไง

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

Parameters

  • AABB aABB
  • AbortableIterationConsumer<T> abortableIterationConsumer

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

EntitySectionStorage instance = ...;
AABB aABB = ...;
AbortableIterationConsumer<T> abortableIterationConsumer = ...;
instance.getEntities(aABB, abortableIterationConsumer);

net.minecraft.world.level.entity.EntitySectionStorage#getEntities(EntityTypeTest<T, U>,AABB,AbortableIterationConsumer<U>)

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntitySectionStorage.java:119
  • Modifiers: public
  • Return: void

คืออะไร

อ่านค่า Entities

ทำงานยังไง

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

Parameters

  • EntityTypeTest<T, U> entityTypeTest
  • AABB aABB
  • AbortableIterationConsumer<U> abortableIterationConsumer

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

EntitySectionStorage instance = ...;
EntityTypeTest<T, U> entityTypeTest = ...;
AABB aABB = ...;
AbortableIterationConsumer<U> abortableIterationConsumer = ...;
instance.getEntities(entityTypeTest, aABB, abortableIterationConsumer);

net.minecraft.world.level.entity.EntitySectionStorage#getExistingSectionPositionsInChunk(long)

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntitySectionStorage.java:67
  • Modifiers: public
  • Return: LongStream

คืออะไร

อ่านค่า Existing Section Positions In Chunk

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getX(), getZ(), getChunkSections(), isEmpty(), empty(), iterator(), longStream(), spliteratorUnknownSize(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • long l

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

EntitySectionStorage instance = ...;
LongStream result = instance.getExistingSectionPositionsInChunk(0L);

net.minecraft.world.level.entity.EntitySectionStorage#getExistingSectionsInChunk(long)

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntitySectionStorage.java:85
  • Modifiers: public
  • Return: Stream<EntitySection<T>>

คืออะไร

อ่านค่า Existing Sections In Chunk

ทำงานยังไง

เรียกต่อ: getExistingSectionPositionsInChunk(), mapToObj(), filter(). คืนค่า: this.getExistingSectionPositionsInChunk(l).mapToObj(this.sections::get).filter(Objects::nonNull).

Parameters

  • long l

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

EntitySectionStorage instance = ...;
Stream<EntitySection<T>> result = instance.getExistingSectionsInChunk(0L);

net.minecraft.world.level.entity.EntitySectionStorage#getOrCreateSection(long)

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntitySectionStorage.java:93
  • Modifiers: public
  • Return: EntitySection<T>

คืออะไร

อ่านค่า Or Create Section

ทำงานยังไง

เรียกต่อ: computeIfAbsent(). คืนค่า: this.sections.computeIfAbsent(l, this::createSection).

Parameters

  • long l

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

EntitySectionStorage instance = ...;
EntitySection<T> result = instance.getOrCreateSection(0L);

net.minecraft.world.level.entity.EntitySectionStorage#getSection(long)

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntitySectionStorage.java:97
  • Modifiers: public
  • Return: EntitySection<T>

คืออะไร

อ่านค่า Section

ทำงานยังไง

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

Parameters

  • long l

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

EntitySectionStorage instance = ...;
EntitySection<T> result = instance.getSection(0L);

net.minecraft.world.level.entity.EntitySectionStorage#remove(long)

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

คืออะไร

ลบ remove

ทำงานยังไง

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

Parameters

  • long l

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

EntitySectionStorage instance = ...;
instance.remove(0L);

EntityTickList

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

net.minecraft.world.level.entity.EntityTickList#add(Entity)

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntityTickList.java:31
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม add

ทำงานยังไง

เรียกต่อ: ensureActiveIsNotIterated(), put(), getId().

Parameters

  • Entity entity

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

EntityTickList instance = ...;
Entity entity = ...;
instance.add(entity);

net.minecraft.world.level.entity.EntityTickList#contains(Entity)

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntityTickList.java:41
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: containsKey(), getId(). คืนค่า: this.active.containsKey(entity.getId()).

Parameters

  • Entity entity

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

EntityTickList instance = ...;
Entity entity = ...;
boolean result = instance.contains(entity);

net.minecraft.world.level.entity.EntityTickList#forEach(Consumer<Entity>)

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntityTickList.java:45
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ forEach ตาม implementation ของ EntityTickList

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป ; มีการจัดการ exception. แก้ state: iterated. เรียกต่อ: values(), accept(). สร้างออบเจ็กต์: UnsupportedOperationException.

Parameters

  • Consumer<Entity> consumer

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

EntityTickList instance = ...;
Consumer<Entity> consumer = ...;
instance.forEach(consumer);

net.minecraft.world.level.entity.EntityTickList#remove(Entity)

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntityTickList.java:36
  • Modifiers: public
  • Return: void

คืออะไร

ลบ remove

ทำงานยังไง

เรียกต่อ: ensureActiveIsNotIterated(), getId().

Parameters

  • Entity entity

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

EntityTickList instance = ...;
Entity entity = ...;
instance.remove(entity);

EntityTypeTest

  • Full name: net.minecraft.world.level.entity.EntityTypeTest
  • Package: net.minecraft.world.level.entity
  • Source: commonnet/minecraft/world/level/entity/EntityTypeTest.java
  • Type: interface
  • Modifiers: public

net.minecraft.world.level.entity.EntityTypeTest#forClass(Class<T>)

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntityTypeTest.java:6
  • Modifiers: static
  • Return: EntityTypeTest<B, T>

คืออะไร

ดำเนินการ forClass ตาม implementation ของ EntityTypeTest

ทำงานยังไง

เรียกต่อ: tryCast(), isInstance(), getBaseClass(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • Class<T> class_

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

Class<T> class_ = ...;
EntityTypeTest<B, T> result = EntityTypeTest.forClass(class_);

net.minecraft.world.level.entity.EntityTypeTest#forExactClass(Class<T>)

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntityTypeTest.java:21
  • Modifiers: static
  • Return: EntityTypeTest<B, T>

คืออะไร

ดำเนินการ forExactClass ตาม implementation ของ EntityTypeTest

ทำงานยังไง

เรียกต่อ: tryCast(), equals(), getClass(), getBaseClass(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • Class<T> class_

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

Class<T> class_ = ...;
EntityTypeTest<B, T> result = EntityTypeTest.forExactClass(class_);

net.minecraft.world.level.entity.EntityTypeTest#getBaseClass()

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntityTypeTest.java:39
  • Modifiers: ``
  • Return: Class<? extends B>

คืออะไร

อ่านค่า Base Class

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

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

EntityTypeTest instance = ...;
Class<? extends B> result = instance.getBaseClass();

net.minecraft.world.level.entity.EntityTypeTest#tryCast(B)

  • Origin: common
  • Source: net/minecraft/world/level/entity/EntityTypeTest.java:36
  • Modifiers: ``
  • Return: T

คืออะไร

ดำเนินการ tryCast ตาม implementation ของ EntityTypeTest

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • B object

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

EntityTypeTest instance = ...;
B object = ...;
T result = instance.tryCast(object);

LevelCallback

  • Full name: net.minecraft.world.level.entity.LevelCallback
  • Package: net.minecraft.world.level.entity
  • Source: commonnet/minecraft/world/level/entity/LevelCallback.java
  • Type: interface
  • Modifiers: public

net.minecraft.world.level.entity.LevelCallback#onCreated(T)

  • Origin: common
  • Source: net/minecraft/world/level/entity/LevelCallback.java:4
  • Modifiers: ``
  • Return: void

คืออะไร

จัดการเหตุการณ์ Created

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • T object

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

LevelCallback instance = ...;
T object = ...;
instance.onCreated(object);

net.minecraft.world.level.entity.LevelCallback#onDestroyed(T)

  • Origin: common
  • Source: net/minecraft/world/level/entity/LevelCallback.java:6
  • Modifiers: ``
  • Return: void

คืออะไร

จัดการเหตุการณ์ Destroyed

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • T object

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

LevelCallback instance = ...;
T object = ...;
instance.onDestroyed(object);

net.minecraft.world.level.entity.LevelCallback#onSectionChange(T)

  • Origin: common
  • Source: net/minecraft/world/level/entity/LevelCallback.java:16
  • Modifiers: ``
  • Return: void

คืออะไร

จัดการเหตุการณ์ Section Change

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • T object

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

LevelCallback instance = ...;
T object = ...;
instance.onSectionChange(object);

net.minecraft.world.level.entity.LevelCallback#onTickingEnd(T)

  • Origin: common
  • Source: net/minecraft/world/level/entity/LevelCallback.java:10
  • Modifiers: ``
  • Return: void

คืออะไร

จัดการเหตุการณ์ Ticking End

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • T object

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

LevelCallback instance = ...;
T object = ...;
instance.onTickingEnd(object);

net.minecraft.world.level.entity.LevelCallback#onTickingStart(T)

  • Origin: common
  • Source: net/minecraft/world/level/entity/LevelCallback.java:8
  • Modifiers: ``
  • Return: void

คืออะไร

จัดการเหตุการณ์ Ticking Start

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • T object

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

LevelCallback instance = ...;
T object = ...;
instance.onTickingStart(object);

net.minecraft.world.level.entity.LevelCallback#onTrackingEnd(T)

  • Origin: common
  • Source: net/minecraft/world/level/entity/LevelCallback.java:14
  • Modifiers: ``
  • Return: void

คืออะไร

จัดการเหตุการณ์ Tracking End

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • T object

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

LevelCallback instance = ...;
T object = ...;
instance.onTrackingEnd(object);

net.minecraft.world.level.entity.LevelCallback#onTrackingStart(T)

  • Origin: common
  • Source: net/minecraft/world/level/entity/LevelCallback.java:12
  • Modifiers: ``
  • Return: void

คืออะไร

จัดการเหตุการณ์ Tracking Start

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • T object

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

LevelCallback instance = ...;
T object = ...;
instance.onTrackingStart(object);

LevelEntityGetter

  • Full name: net.minecraft.world.level.entity.LevelEntityGetter
  • Package: net.minecraft.world.level.entity
  • Source: commonnet/minecraft/world/level/entity/LevelEntityGetter.java
  • Type: interface
  • Modifiers: public

net.minecraft.world.level.entity.LevelEntityGetter#get(AABB,Consumer<T>)

  • Origin: common
  • Source: net/minecraft/world/level/entity/LevelEntityGetter.java:20
  • Modifiers: ``
  • Return: void

คืออะไร

อ่านค่า get

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • AABB aABB
  • Consumer<T> consumer

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

LevelEntityGetter instance = ...;
AABB aABB = ...;
Consumer<T> consumer = ...;
instance.get(aABB, consumer);

net.minecraft.world.level.entity.LevelEntityGetter#get(EntityTypeTest<T, U>,AABB,AbortableIterationConsumer<U>)

  • Origin: common
  • Source: net/minecraft/world/level/entity/LevelEntityGetter.java:22
  • Modifiers: ``
  • Return: void

คืออะไร

อ่านค่า get

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • EntityTypeTest<T, U> entityTypeTest
  • AABB aABB
  • AbortableIterationConsumer<U> abortableIterationConsumer

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

LevelEntityGetter instance = ...;
EntityTypeTest<T, U> entityTypeTest = ...;
AABB aABB = ...;
AbortableIterationConsumer<U> abortableIterationConsumer = ...;
instance.get(entityTypeTest, aABB, abortableIterationConsumer);

net.minecraft.world.level.entity.LevelEntityGetter#get(EntityTypeTest<T, U>,AbortableIterationConsumer<U>)

  • Origin: common
  • Source: net/minecraft/world/level/entity/LevelEntityGetter.java:18
  • Modifiers: ``
  • Return: void

คืออะไร

อ่านค่า get

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • EntityTypeTest<T, U> entityTypeTest
  • AbortableIterationConsumer<U> abortableIterationConsumer

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

LevelEntityGetter instance = ...;
EntityTypeTest<T, U> entityTypeTest = ...;
AbortableIterationConsumer<U> abortableIterationConsumer = ...;
instance.get(entityTypeTest, abortableIterationConsumer);

net.minecraft.world.level.entity.LevelEntityGetter#get(int)

  • Origin: common
  • Source: net/minecraft/world/level/entity/LevelEntityGetter.java:10
  • Modifiers: ``
  • Return: T

คืออะไร

อ่านค่า get

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • int i

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

LevelEntityGetter instance = ...;
T result = instance.get(0);

net.minecraft.world.level.entity.LevelEntityGetter#get(UUID)

  • Origin: common
  • Source: net/minecraft/world/level/entity/LevelEntityGetter.java:13
  • Modifiers: ``
  • Return: T

คืออะไร

อ่านค่า get

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • UUID uUID

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

LevelEntityGetter instance = ...;
UUID uUID = ...;
T result = instance.get(uUID);

net.minecraft.world.level.entity.LevelEntityGetter#getAll()

  • Origin: common
  • Source: net/minecraft/world/level/entity/LevelEntityGetter.java:16
  • Modifiers: ``
  • Return: Iterable<T>

คืออะไร

อ่านค่า All

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

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

LevelEntityGetter instance = ...;
Iterable<T> result = instance.getAll();

LevelEntityGetterAdapter

  • Full name: net.minecraft.world.level.entity.LevelEntityGetterAdapter
  • Package: net.minecraft.world.level.entity
  • Source: commonnet/minecraft/world/level/entity/LevelEntityGetterAdapter.java
  • Type: class
  • Modifiers: public
  • Implements: LevelEntityGetter<T>

net.minecraft.world.level.entity.LevelEntityGetterAdapter#get(AABB,Consumer<T>)

  • Origin: common
  • Source: net/minecraft/world/level/entity/LevelEntityGetterAdapter.java:40
  • Modifiers: public
  • Return: void

คืออะไร

อ่านค่า get

ทำงานยังไง

เรียกต่อ: getEntities(), forConsumer().

Parameters

  • AABB aABB
  • Consumer<T> consumer

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

LevelEntityGetterAdapter instance = ...;
AABB aABB = ...;
Consumer<T> consumer = ...;
instance.get(aABB, consumer);

net.minecraft.world.level.entity.LevelEntityGetterAdapter#get(EntityTypeTest<T, U>,AABB,AbortableIterationConsumer<U>)

  • Origin: common
  • Source: net/minecraft/world/level/entity/LevelEntityGetterAdapter.java:45
  • Modifiers: public
  • Return: void

คืออะไร

อ่านค่า get

ทำงานยังไง

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

Parameters

  • EntityTypeTest<T, U> entityTypeTest
  • AABB aABB
  • AbortableIterationConsumer<U> abortableIterationConsumer

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

LevelEntityGetterAdapter instance = ...;
EntityTypeTest<T, U> entityTypeTest = ...;
AABB aABB = ...;
AbortableIterationConsumer<U> abortableIterationConsumer = ...;
instance.get(entityTypeTest, aABB, abortableIterationConsumer);

net.minecraft.world.level.entity.LevelEntityGetterAdapter#get(EntityTypeTest<T, U>,AbortableIterationConsumer<U>)

  • Origin: common
  • Source: net/minecraft/world/level/entity/LevelEntityGetterAdapter.java:35
  • Modifiers: public
  • Return: void

คืออะไร

อ่านค่า get

ทำงานยังไง

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

Parameters

  • EntityTypeTest<T, U> entityTypeTest
  • AbortableIterationConsumer<U> abortableIterationConsumer

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

LevelEntityGetterAdapter instance = ...;
EntityTypeTest<T, U> entityTypeTest = ...;
AbortableIterationConsumer<U> abortableIterationConsumer = ...;
instance.get(entityTypeTest, abortableIterationConsumer);

net.minecraft.world.level.entity.LevelEntityGetterAdapter#get(int)

  • Origin: common
  • Source: net/minecraft/world/level/entity/LevelEntityGetterAdapter.java:18
  • Modifiers: public
  • Return: T

คืออะไร

อ่านค่า get

ทำงานยังไง

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

Parameters

  • int i

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

LevelEntityGetterAdapter instance = ...;
T result = instance.get(0);

net.minecraft.world.level.entity.LevelEntityGetterAdapter#get(UUID)

  • Origin: common
  • Source: net/minecraft/world/level/entity/LevelEntityGetterAdapter.java:24
  • Modifiers: public
  • Return: T

คืออะไร

อ่านค่า get

ทำงานยังไง

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

Parameters

  • UUID uUID

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

LevelEntityGetterAdapter instance = ...;
UUID uUID = ...;
T result = instance.get(uUID);

net.minecraft.world.level.entity.LevelEntityGetterAdapter#getAll()

  • Origin: common
  • Source: net/minecraft/world/level/entity/LevelEntityGetterAdapter.java:30
  • Modifiers: public
  • Return: Iterable<T>

คืออะไร

อ่านค่า All

ทำงานยังไง

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

Parameters

  • ไม่มี

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

LevelEntityGetterAdapter instance = ...;
Iterable<T> result = instance.getAll();

net.minecraft.world.level.entity.LevelEntityGetterAdapter#LevelEntityGetterAdapter(EntityLookup<T>,EntitySectionStorage<T>)

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

คืออะไร

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

ทำงานยังไง

แก้ state: visibleEntities, sectionStorage.

Parameters

  • EntityLookup<T> entityLookup
  • EntitySectionStorage<T> entitySectionStorage

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

EntityLookup<T> entityLookup = ...;
EntitySectionStorage<T> entitySectionStorage = ...;
LevelEntityGetterAdapter instance = new LevelEntityGetterAdapter(entityLookup, entitySectionStorage);

PersistentEntitySectionManager

  • Full name: net.minecraft.world.level.entity.PersistentEntitySectionManager
  • Package: net.minecraft.world.level.entity
  • Source: commonnet/minecraft/world/level/entity/PersistentEntitySectionManager.java
  • Type: class
  • Modifiers: public
  • Implements: AutoCloseable

net.minecraft.world.level.entity.PersistentEntitySectionManager#addLegacyChunkEntities(Stream<T>)

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

คืออะไร

เพิ่ม Legacy Chunk Entities

ทำงานยังไง

เรียกต่อ: forEach(), addEntity().

Parameters

  • Stream<T> stream

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

PersistentEntitySectionManager instance = ...;
Stream<T> stream = ...;
instance.addLegacyChunkEntities(stream);

net.minecraft.world.level.entity.PersistentEntitySectionManager#addNewEntity(T)

  • Origin: common
  • Source: net/minecraft/world/level/entity/PersistentEntitySectionManager.java:70
  • Modifiers: public
  • Return: boolean

คืออะไร

เพิ่ม New Entity

ทำงานยังไง

เรียกต่อ: addEntity(). คืนค่า: this.addEntity(entityAccess, false).

Parameters

  • T entityAccess

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

PersistentEntitySectionManager instance = ...;
T entityAccess = ...;
boolean result = instance.addNewEntity(entityAccess);

net.minecraft.world.level.entity.PersistentEntitySectionManager#addWorldGenChunkEntities(Stream<T>)

  • Origin: common
  • Source: net/minecraft/world/level/entity/PersistentEntitySectionManager.java:107
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม World Gen Chunk Entities

ทำงานยังไง

เรียกต่อ: forEach(), addEntity().

Parameters

  • Stream<T> stream

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

PersistentEntitySectionManager instance = ...;
Stream<T> stream = ...;
instance.addWorldGenChunkEntities(stream);

net.minecraft.world.level.entity.PersistentEntitySectionManager#areEntitiesLoaded(long)

  • Origin: common
  • Source: net/minecraft/world/level/entity/PersistentEntitySectionManager.java:301
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ areEntitiesLoaded ตาม implementation ของ PersistentEntitySectionManager

ทำงานยังไง

เรียกต่อ: get(). คืนค่า: this.chunkLoadStatuses.get(l) == PersistentEntitySectionManager.ChunkLoadStatus.LOADED.

Parameters

  • long l

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

PersistentEntitySectionManager instance = ...;
boolean result = instance.areEntitiesLoaded(0L);

net.minecraft.world.level.entity.PersistentEntitySectionManager#autoSave()

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

คืออะไร

ดำเนินการ autoSave ตาม implementation ของ PersistentEntitySectionManager

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getAllChunksToSave(), forEach(), get(), processChunkUnload(), storeChunkSections().

Parameters

  • ไม่มี

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

PersistentEntitySectionManager instance = ...;
instance.autoSave();

net.minecraft.world.level.entity.PersistentEntitySectionManager#canPositionTick(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/entity/PersistentEntitySectionManager.java:293
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Position Tick

ทำงานยังไง

เรียกต่อ: get(), asLong(), isTicking(). คืนค่า: this.chunkVisibility.get(ChunkPos.asLong(blockPos)).isTicking().

Parameters

  • BlockPos blockPos

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

PersistentEntitySectionManager instance = ...;
BlockPos blockPos = ...;
boolean result = instance.canPositionTick(blockPos);

net.minecraft.world.level.entity.PersistentEntitySectionManager#canPositionTick(ChunkPos)

  • Origin: common
  • Source: net/minecraft/world/level/entity/PersistentEntitySectionManager.java:297
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Position Tick

ทำงานยังไง

เรียกต่อ: get(), toLong(), isTicking(). คืนค่า: this.chunkVisibility.get(chunkPos.toLong()).isTicking().

Parameters

  • ChunkPos chunkPos

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

PersistentEntitySectionManager instance = ...;
ChunkPos chunkPos = ...;
boolean result = instance.canPositionTick(chunkPos);

net.minecraft.world.level.entity.PersistentEntitySectionManager#close()

  • Origin: common
  • Source: net/minecraft/world/level/entity/PersistentEntitySectionManager.java:279
  • Modifiers: public
  • Return: void

คืออะไร

ปิด close

ทำงานยังไง

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

Parameters

  • ไม่มี

Throws

  • IOException

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

PersistentEntitySectionManager instance = ...;
instance.close();

net.minecraft.world.level.entity.PersistentEntitySectionManager#count()

  • Origin: common
  • Source: net/minecraft/world/level/entity/PersistentEntitySectionManager.java:346
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ count ตาม implementation ของ PersistentEntitySectionManager

ทำงานยังไง

คืนค่า: this.visibleEntityStorage.count().

Parameters

  • ไม่มี

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

PersistentEntitySectionManager instance = ...;
int result = instance.count();

net.minecraft.world.level.entity.PersistentEntitySectionManager#dumpSections(Writer)

  • Origin: common
  • Source: net/minecraft/world/level/entity/PersistentEntitySectionManager.java:305
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ dumpSections ตาม implementation ของ PersistentEntitySectionManager

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการจัดการ exception. เรียกต่อ: builder(), addColumn(), build(), getAllChunksWithExistingSections(), forEach(), get(), getExistingSectionPositionsInChunk(), getSection(). สร้างออบเจ็กต์: UncheckedIOException.

Parameters

  • Writer writer

Throws

  • IOException

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

PersistentEntitySectionManager instance = ...;
Writer writer = ...;
instance.dumpSections(writer);

net.minecraft.world.level.entity.PersistentEntitySectionManager#gatherStats()

  • Origin: common
  • Source: net/minecraft/world/level/entity/PersistentEntitySectionManager.java:329
  • Modifiers: public
  • Return: String

คืออะไร

ดำเนินการ gatherStats ตาม implementation ของ PersistentEntitySectionManager

ทำงานยังไง

เรียกต่อ: size(), count().

Parameters

  • ไม่มี

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

PersistentEntitySectionManager instance = ...;
String result = instance.gatherStats();

net.minecraft.world.level.entity.PersistentEntitySectionManager#getEntityGetter()

  • Origin: common
  • Source: net/minecraft/world/level/entity/PersistentEntitySectionManager.java:289
  • Modifiers: public
  • Return: LevelEntityGetter<T>

คืออะไร

อ่านค่า Entity Getter

ทำงานยังไง

คืนค่า: this.entityGetter.

Parameters

  • ไม่มี

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

PersistentEntitySectionManager instance = ...;
LevelEntityGetter<T> result = instance.getEntityGetter();

net.minecraft.world.level.entity.PersistentEntitySectionManager#isLoaded(UUID)

  • Origin: common
  • Source: net/minecraft/world/level/entity/PersistentEntitySectionManager.java:285
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • UUID uUID

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

PersistentEntitySectionManager instance = ...;
UUID uUID = ...;
boolean result = instance.isLoaded(uUID);

net.minecraft.world.level.entity.PersistentEntitySectionManager#PersistentEntitySectionManager(Class<T>,LevelCallback<T>,EntityPersistentStorage<T>)

  • Origin: common
  • Source: net/minecraft/world/level/entity/PersistentEntitySectionManager.java:45
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: visibleEntityStorage, sectionStorage, callbacks, permanentStorage, entityGetter. เรียกต่อ: defaultReturnValue(). สร้างออบเจ็กต์: EntityLookup<>, EntitySectionStorage<>, LevelEntityGetterAdapter<>.

Parameters

  • Class<T> class_
  • LevelCallback<T> levelCallback
  • EntityPersistentStorage<T> entityPersistentStorage

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

Class<T> class_ = ...;
LevelCallback<T> levelCallback = ...;
EntityPersistentStorage<T> entityPersistentStorage = ...;
PersistentEntitySectionManager instance = new PersistentEntitySectionManager(class_, levelCallback, entityPersistentStorage);

net.minecraft.world.level.entity.PersistentEntitySectionManager#saveAll()

  • Origin: common
  • Source: net/minecraft/world/level/entity/PersistentEntitySectionManager.java:264
  • Modifiers: public
  • Return: void

คืออะไร

บันทึก All

ทำงานยังไง

มีการวนลูป. เรียกต่อ: getAllChunksToSave(), isEmpty(), flush(), processPendingLoads(), removeIf(), get(), processChunkUnload(), storeChunkSections(). คืนค่า: bl ? this.processChunkUnload(l) : this.storeChunkSections(l, entityAccess -> {}).

Parameters

  • ไม่มี

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

PersistentEntitySectionManager instance = ...;
instance.saveAll();

net.minecraft.world.level.entity.PersistentEntitySectionManager#tick()

  • Origin: common
  • Source: net/minecraft/world/level/entity/PersistentEntitySectionManager.java:236
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

เรียกต่อ: processPendingLoads(), processUnloads().

Parameters

  • ไม่มี

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

PersistentEntitySectionManager instance = ...;
instance.tick();

net.minecraft.world.level.entity.PersistentEntitySectionManager#updateChunkStatus(ChunkPos,FullChunkStatus)

  • Origin: common
  • Source: net/minecraft/world/level/entity/PersistentEntitySectionManager.java:129
  • Modifiers: public
  • Return: void

คืออะไร

อัปเดต Chunk Status

ทำงานยังไง

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

Parameters

  • ChunkPos chunkPos
  • FullChunkStatus fullChunkStatus

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

PersistentEntitySectionManager instance = ...;
ChunkPos chunkPos = ...;
FullChunkStatus fullChunkStatus = ...;
instance.updateChunkStatus(chunkPos, fullChunkStatus);

net.minecraft.world.level.entity.PersistentEntitySectionManager#updateChunkStatus(ChunkPos,Visibility)

  • Origin: common
  • Source: net/minecraft/world/level/entity/PersistentEntitySectionManager.java:134
  • Modifiers: public
  • Return: void

คืออะไร

อัปเดต Chunk Status

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: toLong(), remove(), add(), put(), ensureChunkQueuedForLoad(), getExistingSectionsInChunk(), forEach(), isAccessible().

Parameters

  • ChunkPos chunkPos
  • Visibility visibility

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

PersistentEntitySectionManager instance = ...;
ChunkPos chunkPos = ...;
Visibility visibility = ...;
instance.updateChunkStatus(chunkPos, visibility);

TransientEntitySectionManager

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

net.minecraft.world.level.entity.TransientEntitySectionManager#addEntity(T)

  • Origin: common
  • Source: net/minecraft/world/level/entity/TransientEntitySectionManager.java:54
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Entity

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: add(), asLong(), blockPosition(), getOrCreateSection(), setLevelCallback(), Callback(), onCreated(), onTrackingStart(). สร้างออบเจ็กต์: TransientEntitySectionManager.Callback.

Parameters

  • T entityAccess

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

TransientEntitySectionManager instance = ...;
T entityAccess = ...;
instance.addEntity(entityAccess);

net.minecraft.world.level.entity.TransientEntitySectionManager#count()

  • Origin: common
  • Source: net/minecraft/world/level/entity/TransientEntitySectionManager.java:67
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ count ตาม implementation ของ TransientEntitySectionManager

ทำงานยังไง

คืนค่า: this.entityStorage.count().

Parameters

  • ไม่มี

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

TransientEntitySectionManager instance = ...;
int result = instance.count();

net.minecraft.world.level.entity.TransientEntitySectionManager#gatherStats()

  • Origin: common
  • Source: net/minecraft/world/level/entity/TransientEntitySectionManager.java:78
  • Modifiers: public
  • Return: String

คืออะไร

ดำเนินการ gatherStats ตาม implementation ของ TransientEntitySectionManager

ทำงานยังไง

เรียกต่อ: count(), size(). คืนค่า: this.entityStorage.count() + "," + this.sectionStorage.count() + "," + this.tickingChunks.size().

Parameters

  • ไม่มี

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

TransientEntitySectionManager instance = ...;
String result = instance.gatherStats();

net.minecraft.world.level.entity.TransientEntitySectionManager#getEntityGetter()

  • Origin: common
  • Source: net/minecraft/world/level/entity/TransientEntitySectionManager.java:50
  • Modifiers: public
  • Return: LevelEntityGetter<T>

คืออะไร

อ่านค่า Entity Getter

ทำงานยังไง

คืนค่า: this.entityGetter.

Parameters

  • ไม่มี

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

TransientEntitySectionManager instance = ...;
LevelEntityGetter<T> result = instance.getEntityGetter();

net.minecraft.world.level.entity.TransientEntitySectionManager#startTicking(ChunkPos)

  • Origin: common
  • Source: net/minecraft/world/level/entity/TransientEntitySectionManager.java:28
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม Ticking

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: toLong(), add(), getExistingSectionsInChunk(), forEach(), updateChunkStatus(), isTicking(), getEntities(), filter().

Parameters

  • ChunkPos chunkPos

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

TransientEntitySectionManager instance = ...;
ChunkPos chunkPos = ...;
instance.startTicking(chunkPos);

net.minecraft.world.level.entity.TransientEntitySectionManager#stopTicking(ChunkPos)

  • Origin: common
  • Source: net/minecraft/world/level/entity/TransientEntitySectionManager.java:39
  • Modifiers: public
  • Return: void

คืออะไร

หยุด Ticking

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: toLong(), remove(), getExistingSectionsInChunk(), forEach(), updateChunkStatus(), isTicking(), getEntities(), filter().

Parameters

  • ChunkPos chunkPos

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

TransientEntitySectionManager instance = ...;
ChunkPos chunkPos = ...;
instance.stopTicking(chunkPos);

net.minecraft.world.level.entity.TransientEntitySectionManager#TransientEntitySectionManager(Class<T>,LevelCallback<T>)

  • Origin: common
  • Source: net/minecraft/world/level/entity/TransientEntitySectionManager.java:21
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: entityStorage, sectionStorage, callbacks, entityGetter. เรียกต่อ: contains(). สร้างออบเจ็กต์: EntityLookup<>, EntitySectionStorage<>, LevelEntityGetterAdapter<>.

Parameters

  • Class<T> class_
  • LevelCallback<T> levelCallback

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

Class<T> class_ = ...;
LevelCallback<T> levelCallback = ...;
TransientEntitySectionManager instance = new TransientEntitySectionManager(class_, levelCallback);

Visibility

  • Full name: net.minecraft.world.level.entity.Visibility
  • Package: net.minecraft.world.level.entity
  • Source: commonnet/minecraft/world/level/entity/Visibility.java
  • Type: enum
  • Modifiers: public

net.minecraft.world.level.entity.Visibility#fromFullChunkStatus(FullChunkStatus)

  • Origin: common
  • Source: net/minecraft/world/level/entity/Visibility.java:26
  • Modifiers: public static
  • Return: Visibility

คืออะไร

ดำเนินการ fromFullChunkStatus ตาม implementation ของ Visibility

ทำงานยังไง

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

Parameters

  • FullChunkStatus fullChunkStatus

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

FullChunkStatus fullChunkStatus = ...;
Visibility result = Visibility.fromFullChunkStatus(fullChunkStatus);

net.minecraft.world.level.entity.Visibility#isAccessible()

  • Origin: common
  • Source: net/minecraft/world/level/entity/Visibility.java:22
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: this.accessible.

Parameters

  • ไม่มี

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

Visibility instance = ...;
boolean result = instance.isAccessible();

net.minecraft.world.level.entity.Visibility#isTicking()

  • Origin: common
  • Source: net/minecraft/world/level/entity/Visibility.java:18
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: this.ticking.

Parameters

  • ไม่มี

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

Visibility instance = ...;
boolean result = instance.isTicking();