Skip to content

Package net.minecraft.world.level

Part 1/1


BaseCommandBlock

  • Full name: net.minecraft.world.level.BaseCommandBlock
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/BaseCommandBlock.java
  • Type: class
  • Modifiers: public abstract
  • Implements: CommandSource

net.minecraft.world.level.BaseCommandBlock#acceptsFailure()

  • Origin: common
  • Source: net/minecraft/world/level/BaseCommandBlock.java:209
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ acceptsFailure ตาม implementation ของ BaseCommandBlock

ทำงานยังไง

คืนค่า: this.trackOutput.

Parameters

  • ไม่มี

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

BaseCommandBlock instance = ...;
boolean result = instance.acceptsFailure();

net.minecraft.world.level.BaseCommandBlock#acceptsSuccess()

  • Origin: common
  • Source: net/minecraft/world/level/BaseCommandBlock.java:204
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ acceptsSuccess ตาม implementation ของ BaseCommandBlock

ทำงานยังไง

เรียกต่อ: getLevel(), getGameRules(), getBoolean(). คืนค่า: this.getLevel().getGameRules().getBoolean(GameRules.RULE_SENDCOMMANDFEEDBACK) && this.trackOutput.

Parameters

  • ไม่มี

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

BaseCommandBlock instance = ...;
boolean result = instance.acceptsSuccess();

net.minecraft.world.level.BaseCommandBlock#createCommandSourceStack()

  • Origin: common
  • Source: net/minecraft/world/level/BaseCommandBlock.java:202
  • Modifiers: public abstract
  • Return: CommandSourceStack

คืออะไร

สร้าง Command Source Stack

ทำงานยังไง

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

Parameters

  • ไม่มี

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

BaseCommandBlock instance = ...;
CommandSourceStack result = instance.createCommandSourceStack();

net.minecraft.world.level.BaseCommandBlock#getCommand()

  • Origin: common
  • Source: net/minecraft/world/level/BaseCommandBlock.java:107
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Command

ทำงานยังไง

คืนค่า: this.command.

Parameters

  • ไม่มี

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

BaseCommandBlock instance = ...;
String result = instance.getCommand();

net.minecraft.world.level.BaseCommandBlock#getCustomName()

  • Origin: common
  • Source: net/minecraft/world/level/BaseCommandBlock.java:155
  • Modifiers: public
  • Return: Component

คืออะไร

อ่านค่า Custom Name

ทำงานยังไง

คืนค่า: this.customName.

Parameters

  • ไม่มี

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

BaseCommandBlock instance = ...;
Component result = instance.getCustomName();

net.minecraft.world.level.BaseCommandBlock#getLastOutput()

  • Origin: common
  • Source: net/minecraft/world/level/BaseCommandBlock.java:44
  • Modifiers: public
  • Return: Component

คืออะไร

อ่านค่า Last Output

ทำงานยังไง

แก้ state: lastOutput. คืนค่า: this.lastOutput == null ? CommonComponents.EMPTY : this.lastOutput.

Parameters

  • ไม่มี

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

BaseCommandBlock instance = ...;
Component result = instance.getLastOutput();

net.minecraft.world.level.BaseCommandBlock#getLevel()

  • Origin: common
  • Source: net/minecraft/world/level/BaseCommandBlock.java:172
  • Modifiers: public abstract
  • Return: ServerLevel

คืออะไร

อ่านค่า Level

ทำงานยังไง

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

Parameters

  • ไม่มี

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

BaseCommandBlock instance = ...;
ServerLevel result = instance.getLevel();

net.minecraft.world.level.BaseCommandBlock#getName()

  • Origin: common
  • Source: net/minecraft/world/level/BaseCommandBlock.java:151
  • Modifiers: public
  • Return: Component

คืออะไร

อ่านค่า Name

ทำงานยังไง

คืนค่า: this.customName != null ? this.customName : DEFAULT_NAME.

Parameters

  • ไม่มี

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

BaseCommandBlock instance = ...;
Component result = instance.getName();

net.minecraft.world.level.BaseCommandBlock#getPosition()

  • Origin: common
  • Source: net/minecraft/world/level/BaseCommandBlock.java:200
  • Modifiers: public abstract
  • Return: Vec3

คืออะไร

อ่านค่า Position

ทำงานยังไง

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

Parameters

  • ไม่มี

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

BaseCommandBlock instance = ...;
Vec3 result = instance.getPosition();

net.minecraft.world.level.BaseCommandBlock#getSuccessCount()

  • Origin: common
  • Source: net/minecraft/world/level/BaseCommandBlock.java:36
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Success Count

ทำงานยังไง

คืนค่า: this.successCount.

Parameters

  • ไม่มี

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

BaseCommandBlock instance = ...;
int result = instance.getSuccessCount();

net.minecraft.world.level.BaseCommandBlock#isTrackOutput()

  • Origin: common
  • Source: net/minecraft/world/level/BaseCommandBlock.java:184
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Track Output

ทำงานยังไง

คืนค่า: this.trackOutput.

Parameters

  • ไม่มี

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

BaseCommandBlock instance = ...;
boolean result = instance.isTrackOutput();

net.minecraft.world.level.BaseCommandBlock#isValid()

  • Origin: common
  • Source: net/minecraft/world/level/BaseCommandBlock.java:219
  • Modifiers: public abstract
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ไม่มี

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

BaseCommandBlock instance = ...;
boolean result = instance.isValid();

net.minecraft.world.level.BaseCommandBlock#load(CompoundTag,HolderLookup.Provider)

  • Origin: common
  • Source: net/minecraft/world/level/BaseCommandBlock.java:68
  • Modifiers: public
  • Return: void

คืออะไร

โหลด load

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการจัดการ exception. แก้ state: command, successCount, trackOutput, lastOutput, updateLastExecution, lastExecution. เรียกต่อ: getString(), getInt(), contains(), setCustomName(), parseCustomNameSafe(), getBoolean(), fromJson(), literal().

Parameters

  • CompoundTag compoundTag
  • HolderLookup.Provider provider

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

BaseCommandBlock instance = ...;
CompoundTag compoundTag = ...;
HolderLookup.Provider provider = ...;
instance.load(compoundTag, provider);

net.minecraft.world.level.BaseCommandBlock#onUpdated()

  • Origin: common
  • Source: net/minecraft/world/level/BaseCommandBlock.java:174
  • Modifiers: public abstract
  • Return: void

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ไม่มี

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

BaseCommandBlock instance = ...;
instance.onUpdated();

net.minecraft.world.level.BaseCommandBlock#performCommand(Level)

  • Origin: common
  • Source: net/minecraft/world/level/BaseCommandBlock.java:111
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ performCommand ตาม implementation ของ BaseCommandBlock

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการจัดการ exception. แก้ state: lastOutput, successCount, lastExecution. เรียกต่อ: getGameTime(), equalsIgnoreCase(), literal(), getLevel(), getServer(), isCommandBlockEnabled(), isNullOrEmpty(), createCommandSourceStack(). สร้างออบเจ็กต์: ReportedException. มีจุด return อย่างน้อย 3 จุด.

Parameters

  • Level level

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

BaseCommandBlock instance = ...;
Level level = ...;
boolean result = instance.performCommand(level);

net.minecraft.world.level.BaseCommandBlock#save(CompoundTag,HolderLookup.Provider)

  • Origin: common
  • Source: net/minecraft/world/level/BaseCommandBlock.java:48
  • Modifiers: public
  • Return: CompoundTag

คืออะไร

บันทึก save

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: putString(), putInt(), toJson(), putBoolean(), putLong(). คืนค่า: compoundTag.

Parameters

  • CompoundTag compoundTag
  • HolderLookup.Provider provider

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

BaseCommandBlock instance = ...;
CompoundTag compoundTag = ...;
HolderLookup.Provider provider = ...;
CompoundTag result = instance.save(compoundTag, provider);

net.minecraft.world.level.BaseCommandBlock#sendSystemMessage(Component)

  • Origin: common
  • Source: net/minecraft/world/level/BaseCommandBlock.java:164
  • Modifiers: public
  • Return: void

คืออะไร

ส่ง System Message

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: lastOutput. เรียกต่อ: literal(), format(), append(), onUpdated(). สร้างออบเจ็กต์: Date.

Parameters

  • Component component

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

BaseCommandBlock instance = ...;
Component component = ...;
instance.sendSystemMessage(component);

net.minecraft.world.level.BaseCommandBlock#setCommand(String)

  • Origin: common
  • Source: net/minecraft/world/level/BaseCommandBlock.java:102
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Command

ทำงานยังไง

แก้ state: command, successCount.

Parameters

  • String string

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

BaseCommandBlock instance = ...;
instance.setCommand("value");

net.minecraft.world.level.BaseCommandBlock#setCustomName(Component)

  • Origin: common
  • Source: net/minecraft/world/level/BaseCommandBlock.java:160
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Custom Name

ทำงานยังไง

แก้ state: customName.

Parameters

  • Component component

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

BaseCommandBlock instance = ...;
Component component = ...;
instance.setCustomName(component);

net.minecraft.world.level.BaseCommandBlock#setLastOutput(Component)

  • Origin: common
  • Source: net/minecraft/world/level/BaseCommandBlock.java:176
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Last Output

ทำงานยังไง

แก้ state: lastOutput.

Parameters

  • Component component

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

BaseCommandBlock instance = ...;
Component component = ...;
instance.setLastOutput(component);

net.minecraft.world.level.BaseCommandBlock#setSuccessCount(int)

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

คืออะไร

กำหนดค่า Success Count

ทำงานยังไง

แก้ state: successCount.

Parameters

  • int i

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

BaseCommandBlock instance = ...;
instance.setSuccessCount(0);

net.minecraft.world.level.BaseCommandBlock#setTrackOutput(boolean)

  • Origin: common
  • Source: net/minecraft/world/level/BaseCommandBlock.java:180
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Track Output

ทำงานยังไง

แก้ state: trackOutput.

Parameters

  • boolean bl

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

BaseCommandBlock instance = ...;
instance.setTrackOutput(true);

net.minecraft.world.level.BaseCommandBlock#shouldInformAdmins()

  • Origin: common
  • Source: net/minecraft/world/level/BaseCommandBlock.java:214
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Inform Admins

ทำงานยังไง

เรียกต่อ: getLevel(), getGameRules(), getBoolean(). คืนค่า: this.getLevel().getGameRules().getBoolean(GameRules.RULE_COMMANDBLOCKOUTPUT).

Parameters

  • ไม่มี

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

BaseCommandBlock instance = ...;
boolean result = instance.shouldInformAdmins();

net.minecraft.world.level.BaseCommandBlock#usedBy(Player)

  • Origin: common
  • Source: net/minecraft/world/level/BaseCommandBlock.java:188
  • Modifiers: public
  • Return: InteractionResult

คืออะไร

ดำเนินการ usedBy ตาม implementation ของ BaseCommandBlock

ทำงานยังไง

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

Parameters

  • Player player

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

BaseCommandBlock instance = ...;
Player player = ...;
InteractionResult result = instance.usedBy(player);

BaseSpawner

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

net.minecraft.world.level.BaseSpawner#broadcastEvent(Level,BlockPos,int)

  • Origin: common
  • Source: net/minecraft/world/level/BaseSpawner.java:286
  • Modifiers: public abstract
  • Return: void

คืออะไร

ดำเนินการ broadcastEvent ตาม implementation ของ BaseSpawner

ทำงานยังไง

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

Parameters

  • Level level
  • BlockPos blockPos
  • int i

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

BaseSpawner instance = ...;
Level level = ...;
BlockPos blockPos = ...;
instance.broadcastEvent(level, blockPos, 0);

net.minecraft.world.level.BaseSpawner#clientTick(Level,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/BaseSpawner.java:56
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ clientTick ตาม implementation ของ BaseSpawner

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: oSpin, spawnDelay, spin. เรียกต่อ: isNearPlayer(), getRandom(), getX(), nextDouble(), getY(), getZ(), addParticle().

Parameters

  • Level level
  • BlockPos blockPos

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

BaseSpawner instance = ...;
Level level = ...;
BlockPos blockPos = ...;
instance.clientTick(level, blockPos);

net.minecraft.world.level.BaseSpawner#getOrCreateDisplayEntity(Level,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/BaseSpawner.java:245
  • Modifiers: public
  • Return: Entity

คืออะไร

อ่านค่า Or Create Display Entity

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: displayEntity. เรียกต่อ: getOrCreateNextSpawnData(), getRandom(), getEntityToSpawn(), contains(), loadEntityRecursive(), identity(), size(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • Level level
  • BlockPos blockPos

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

BaseSpawner instance = ...;
Level level = ...;
BlockPos blockPos = ...;
Entity result = instance.getOrCreateDisplayEntity(level, blockPos);

net.minecraft.world.level.BaseSpawner#getoSpin()

  • Origin: common
  • Source: net/minecraft/world/level/BaseSpawner.java:292
  • Modifiers: public
  • Return: double

คืออะไร

ดำเนินการ getoSpin ตาม implementation ของ BaseSpawner

ทำงานยังไง

คืนค่า: this.oSpin.

Parameters

  • ไม่มี

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

BaseSpawner instance = ...;
double result = instance.getoSpin();

net.minecraft.world.level.BaseSpawner#getSpin()

  • Origin: common
  • Source: net/minecraft/world/level/BaseSpawner.java:288
  • Modifiers: public
  • Return: double

คืออะไร

อ่านค่า Spin

ทำงานยังไง

คืนค่า: this.spin.

Parameters

  • ไม่มี

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

BaseSpawner instance = ...;
double result = instance.getSpin();

net.minecraft.world.level.BaseSpawner#load(Level,BlockPos,CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/level/BaseSpawner.java:186
  • Modifiers: public
  • Return: void

คืออะไร

โหลด load

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: spawnDelay, spawnPotentials, minSpawnDelay, maxSpawnDelay, spawnCount, maxNearbyEntities. เรียกต่อ: getShort(), contains(), parse(), getCompound(), resultOrPartial(), warn(), orElseGet(), setNextSpawnData(). สร้างออบเจ็กต์: SpawnData.

Parameters

  • Level level
  • BlockPos blockPos
  • CompoundTag compoundTag

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

BaseSpawner instance = ...;
Level level = ...;
BlockPos blockPos = ...;
CompoundTag compoundTag = ...;
instance.load(level, blockPos, compoundTag);

net.minecraft.world.level.BaseSpawner#onEventTriggered(Level,int)

  • Origin: common
  • Source: net/minecraft/world/level/BaseSpawner.java:261
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • Level level
  • int i

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

BaseSpawner instance = ...;
Level level = ...;
boolean result = instance.onEventTriggered(level, 0);

net.minecraft.world.level.BaseSpawner#save(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/level/BaseSpawner.java:226
  • Modifiers: public
  • Return: CompoundTag

คืออะไร

บันทึก save

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: putShort(), put(), encodeStart(), getOrThrow(). สร้างออบเจ็กต์: IllegalStateException. คืนค่า: compoundTag.

Parameters

  • CompoundTag compoundTag

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

BaseSpawner instance = ...;
CompoundTag compoundTag = ...;
CompoundTag result = instance.save(compoundTag);

net.minecraft.world.level.BaseSpawner#serverTick(ServerLevel,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/BaseSpawner.java:75
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ serverTick ตาม implementation ของ BaseSpawner

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: spawnDelay. เรียกต่อ: isNearPlayer(), delay(), getRandom(), getOrCreateNextSpawnData(), getEntityToSpawn(), by(), isEmpty(), getList(). สร้างออบเจ็กต์: AABB. คืนค่า: entityx.

Parameters

  • ServerLevel serverLevel
  • BlockPos blockPos

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

BaseSpawner instance = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
instance.serverTick(serverLevel, blockPos);

net.minecraft.world.level.BaseSpawner#setEntityId(EntityType<?>,Level,RandomSource,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/BaseSpawner.java:48
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Entity Id

ทำงานยังไง

เรียกต่อ: getOrCreateNextSpawnData(), getEntityToSpawn(), putString(), getKey(), toString().

Parameters

  • EntityType<?> entityType
  • Level level
  • RandomSource randomSource
  • BlockPos blockPos

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

BaseSpawner instance = ...;
EntityType<?> entityType = ...;
Level level = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
instance.setEntityId(entityType, level, randomSource, blockPos);

net.minecraft.world.level.BaseSpawner#setNextSpawnData(Level,BlockPos,SpawnData)

  • Origin: common
  • Source: net/minecraft/world/level/BaseSpawner.java:273
  • Modifiers: protected
  • Return: void

คืออะไร

กำหนดค่า Next Spawn Data

ทำงานยังไง

แก้ state: nextSpawnData.

Parameters

  • Level level
  • BlockPos blockPos
  • SpawnData spawnData

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

Level level = ...;
BlockPos blockPos = ...;
SpawnData spawnData = ...;
@Override
protected void setNextSpawnData(Level level, BlockPos blockPos, SpawnData spawnData) {
    super.setNextSpawnData(level, blockPos, spawnData);
}

BlockAndTintGetter

  • Full name: net.minecraft.world.level.BlockAndTintGetter
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/BlockAndTintGetter.java
  • Type: interface
  • Modifiers: public
  • Implements: BlockGetter

net.minecraft.world.level.BlockAndTintGetter#canSeeSky(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/BlockAndTintGetter.java:22
  • Modifiers: default
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ See Sky

ทำงานยังไง

เรียกต่อ: getBrightness(). คืนค่า: this.getBrightness(LightLayer.SKY, blockPos) >= 15.

Parameters

  • BlockPos blockPos

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

BlockAndTintGetter instance = ...;
BlockPos blockPos = ...;
boolean result = instance.canSeeSky(blockPos);

net.minecraft.world.level.BlockAndTintGetter#getBlockTint(BlockPos,ColorResolver)

  • Origin: common
  • Source: net/minecraft/world/level/BlockAndTintGetter.java:12
  • Modifiers: ``
  • Return: int

คืออะไร

อ่านค่า Block Tint

ทำงานยังไง

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

Parameters

  • BlockPos blockPos
  • ColorResolver colorResolver

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

BlockAndTintGetter instance = ...;
BlockPos blockPos = ...;
ColorResolver colorResolver = ...;
int result = instance.getBlockTint(blockPos, colorResolver);

net.minecraft.world.level.BlockAndTintGetter#getBrightness(LightLayer,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/BlockAndTintGetter.java:14
  • Modifiers: default
  • Return: int

คืออะไร

อ่านค่า Brightness

ทำงานยังไง

เรียกต่อ: getLightEngine(), getLayerListener(), getLightValue(). คืนค่า: this.getLightEngine().getLayerListener(lightLayer).getLightValue(blockPos).

Parameters

  • LightLayer lightLayer
  • BlockPos blockPos

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

BlockAndTintGetter instance = ...;
LightLayer lightLayer = ...;
BlockPos blockPos = ...;
int result = instance.getBrightness(lightLayer, blockPos);

net.minecraft.world.level.BlockAndTintGetter#getLightEngine()

  • Origin: common
  • Source: net/minecraft/world/level/BlockAndTintGetter.java:10
  • Modifiers: ``
  • Return: LevelLightEngine

คืออะไร

อ่านค่า Light Engine

ทำงานยังไง

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

Parameters

  • ไม่มี

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

BlockAndTintGetter instance = ...;
LevelLightEngine result = instance.getLightEngine();

net.minecraft.world.level.BlockAndTintGetter#getRawBrightness(BlockPos,int)

  • Origin: common
  • Source: net/minecraft/world/level/BlockAndTintGetter.java:18
  • Modifiers: default
  • Return: int

คืออะไร

อ่านค่า Raw Brightness

ทำงานยังไง

เรียกต่อ: getLightEngine(). คืนค่า: this.getLightEngine().getRawBrightness(blockPos, i).

Parameters

  • BlockPos blockPos
  • int i

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

BlockAndTintGetter instance = ...;
BlockPos blockPos = ...;
int result = instance.getRawBrightness(blockPos, 0);

net.minecraft.world.level.BlockAndTintGetter#getShade(Direction,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/BlockAndTintGetter.java:8
  • Modifiers: ``
  • Return: float

คืออะไร

อ่านค่า Shade

ทำงานยังไง

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

Parameters

  • Direction direction
  • boolean bl

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

BlockAndTintGetter instance = ...;
Direction direction = ...;
float result = instance.getShade(direction, true);

BlockCollisions

  • Full name: net.minecraft.world.level.BlockCollisions
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/BlockCollisions.java
  • Type: class
  • Modifiers: public
  • Extends: AbstractIterator<T>

net.minecraft.world.level.BlockCollisions#BlockCollisions(CollisionGetter,CollisionContext,AABB,boolean,BiFunction<BlockPos.MutableBlockPos, VoxelShape, T>)

  • Origin: common
  • Source: net/minecraft/world/level/BlockCollisions.java:38
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: context, pos, entityShape, collisionGetter, box, onlySuffocatingBlocks. เรียกต่อ: MutableBlockPos(), create(), floor(). สร้างออบเจ็กต์: BlockPos.MutableBlockPos, Cursor3D.

Parameters

  • CollisionGetter collisionGetter
  • CollisionContext collisionContext
  • AABB aABB
  • boolean bl
  • BiFunction<BlockPos.MutableBlockPos, VoxelShape, T> biFunction

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

CollisionGetter collisionGetter = ...;
CollisionContext collisionContext = ...;
AABB aABB = ...;
BiFunction<BlockPos.MutableBlockPos, VoxelShape, T> biFunction = ...;
BlockCollisions instance = new BlockCollisions(collisionGetter, collisionContext, aABB, true, biFunction);

net.minecraft.world.level.BlockCollisions#BlockCollisions(CollisionGetter,Entity,AABB,boolean,BiFunction<BlockPos.MutableBlockPos, VoxelShape, T>)

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

คืออะไร

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

ทำงานยังไง

เรียกต่อ: empty(), of().

Parameters

  • CollisionGetter collisionGetter
  • Entity entity
  • AABB aABB
  • boolean bl
  • BiFunction<BlockPos.MutableBlockPos, VoxelShape, T> biFunction

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

CollisionGetter collisionGetter = ...;
Entity entity = ...;
AABB aABB = ...;
BiFunction<BlockPos.MutableBlockPos, VoxelShape, T> biFunction = ...;
BlockCollisions instance = new BlockCollisions(collisionGetter, entity, aABB, true, biFunction);

net.minecraft.world.level.BlockCollisions#computeNext()

  • Origin: common
  • Source: net/minecraft/world/level/BlockCollisions.java:72
  • Modifiers: protected
  • Return: T

คืออะไร

คำนวณ Next

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: advance(), nextX(), nextY(), nextZ(), getNextType(), getChunk(), set(), getBlockState(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • ไม่มี

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

@Override
protected T computeNext() {
    return super.computeNext();
}

BlockGetter

  • Full name: net.minecraft.world.level.BlockGetter
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/BlockGetter.java
  • Type: interface
  • Modifiers: public
  • Implements: LevelHeightAccessor,FabricBlockView

net.minecraft.world.level.BlockGetter#boxTraverseBlocks(Vec3,Vec3,AABB)

  • Origin: common
  • Source: net/minecraft/world/level/BlockGetter.java:180
  • Modifiers: static
  • Return: Iterable<BlockPos>

คืออะไร

ดำเนินการ boxTraverseBlocks ตาม implementation ของ BlockGetter

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: subtract(), betweenClosed(), lengthSqr(), square(), getMinPosition(), addCollisionsAlongTravel(), add(), immutable(). สร้างออบเจ็กต์: ObjectLinkedOpenHashSet<>. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • Vec3 vec3
  • Vec3 vec32
  • AABB aABB

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

Vec3 vec3 = ...;
Vec3 vec32 = ...;
AABB aABB = ...;
Iterable<BlockPos> result = BlockGetter.boxTraverseBlocks(vec3, vec32, aABB);

net.minecraft.world.level.BlockGetter#clip(ClipContext)

  • Origin: common
  • Source: net/minecraft/world/level/BlockGetter.java:73
  • Modifiers: default
  • Return: BlockHitResult

คืออะไร

ดำเนินการ clip ตาม implementation ของ BlockGetter

ทำงานยังไง

เรียกต่อ: traverseBlocks(), getFrom(), getTo(), getBlockState(), getFluidState(), getBlockShape(), clipWithInteractionOverride(), getFluidShape(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • ClipContext clipContext

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

BlockGetter instance = ...;
ClipContext clipContext = ...;
BlockHitResult result = instance.clip(clipContext);

net.minecraft.world.level.BlockGetter#clipWithInteractionOverride(Vec3,Vec3,BlockPos,VoxelShape,BlockState)

  • Origin: common
  • Source: net/minecraft/world/level/BlockGetter.java:92
  • Modifiers: default
  • Return: BlockHitResult

คืออะไร

ดำเนินการ clipWithInteractionOverride ตาม implementation ของ BlockGetter

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: clip(), getInteractionShape(), getLocation(), subtract(), lengthSqr(), withDirection(), getDirection(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • Vec3 vec3
  • Vec3 vec32
  • BlockPos blockPos
  • VoxelShape voxelShape
  • BlockState blockState

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

BlockGetter instance = ...;
Vec3 vec3 = ...;
Vec3 vec32 = ...;
BlockPos blockPos = ...;
VoxelShape voxelShape = ...;
BlockState blockState = ...;
BlockHitResult result = instance.clipWithInteractionOverride(vec3, vec32, blockPos, voxelShape, blockState);

net.minecraft.world.level.BlockGetter#getBlockEntity(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/BlockGetter.java:30
  • Modifiers: ``
  • Return: BlockEntity

คืออะไร

อ่านค่า Block Entity

ทำงานยังไง

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

Parameters

  • BlockPos blockPos

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

BlockGetter instance = ...;
BlockPos blockPos = ...;
BlockEntity result = instance.getBlockEntity(blockPos);

net.minecraft.world.level.BlockGetter#getBlockEntity(BlockPos,BlockEntityType<T>)

  • Origin: common
  • Source: net/minecraft/world/level/BlockGetter.java:33
  • Modifiers: default
  • Return: Optional<T>

คืออะไร

อ่านค่า Block Entity

ทำงานยังไง

เรียกต่อ: getType(), of(), empty(). คืนค่า: blockEntity != null && blockEntity.getType() == blockEntityType ? Optional.of((T)blockEntity) : Optional.empty().

Parameters

  • BlockPos blockPos
  • BlockEntityType<T> blockEntityType

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

BlockGetter instance = ...;
BlockPos blockPos = ...;
BlockEntityType<T> blockEntityType = ...;
Optional<T> result = instance.getBlockEntity(blockPos, blockEntityType);

net.minecraft.world.level.BlockGetter#getBlockFloorHeight(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/BlockGetter.java:114
  • Modifiers: default
  • Return: double

คืออะไร

อ่านค่า Block Floor Height

ทำงานยังไง

เรียกต่อ: getBlockState(), getCollisionShape(), below(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • BlockPos blockPos

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

BlockGetter instance = ...;
BlockPos blockPos = ...;
double result = instance.getBlockFloorHeight(blockPos);

net.minecraft.world.level.BlockGetter#getBlockFloorHeight(VoxelShape,Supplier<VoxelShape>)

  • Origin: common
  • Source: net/minecraft/world/level/BlockGetter.java:105
  • Modifiers: default
  • Return: double

คืออะไร

อ่านค่า Block Floor Height

ทำงานยังไง

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

Parameters

  • VoxelShape voxelShape
  • Supplier<VoxelShape> supplier

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

BlockGetter instance = ...;
VoxelShape voxelShape = ...;
Supplier<VoxelShape> supplier = ...;
double result = instance.getBlockFloorHeight(voxelShape, supplier);

net.minecraft.world.level.BlockGetter#getBlockState(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/BlockGetter.java:38
  • Modifiers: ``
  • Return: BlockState

คืออะไร

อ่านค่า Block State

ทำงานยังไง

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

Parameters

  • BlockPos blockPos

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

BlockGetter instance = ...;
BlockPos blockPos = ...;
BlockState result = instance.getBlockState(blockPos);

net.minecraft.world.level.BlockGetter#getBlockStates(AABB)

  • Origin: common
  • Source: net/minecraft/world/level/BlockGetter.java:46
  • Modifiers: default
  • Return: Stream<BlockState>

คืออะไร

อ่านค่า Block States

ทำงานยังไง

เรียกต่อ: betweenClosedStream(), map(). คืนค่า: BlockPos.betweenClosedStream(aABB).map(this::getBlockState).

Parameters

  • AABB aABB

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

BlockGetter instance = ...;
AABB aABB = ...;
Stream<BlockState> result = instance.getBlockStates(aABB);

net.minecraft.world.level.BlockGetter#getFluidState(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/BlockGetter.java:40
  • Modifiers: ``
  • Return: FluidState

คืออะไร

อ่านค่า Fluid State

ทำงานยังไง

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

Parameters

  • BlockPos blockPos

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

BlockGetter instance = ...;
BlockPos blockPos = ...;
FluidState result = instance.getFluidState(blockPos);

net.minecraft.world.level.BlockGetter#getLightEmission(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/BlockGetter.java:42
  • Modifiers: default
  • Return: int

คืออะไร

อ่านค่า Light Emission

ทำงานยังไง

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

Parameters

  • BlockPos blockPos

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

BlockGetter instance = ...;
BlockPos blockPos = ...;
int result = instance.getLightEmission(blockPos);

net.minecraft.world.level.BlockGetter#isBlockInLine(ClipBlockStateContext)

  • Origin: common
  • Source: net/minecraft/world/level/BlockGetter.java:50
  • Modifiers: default
  • Return: BlockHitResult

คืออะไร

ตรวจสอบสถานะ Block In Line

ทำงานยังไง

เรียกต่อ: traverseBlocks(), getFrom(), getTo(), getBlockState(), subtract(), isTargetBlock(), test(), getApproximateNearest(). สร้างออบเจ็กต์: BlockHitResult.

Parameters

  • ClipBlockStateContext clipBlockStateContext

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

BlockGetter instance = ...;
ClipBlockStateContext clipBlockStateContext = ...;
BlockHitResult result = instance.isBlockInLine(clipBlockStateContext);

net.minecraft.world.level.BlockGetter#traverseBlocks(Vec3,Vec3,C,BiFunction<C, BlockPos, T>,Function<C, T>)

  • Origin: common
  • Source: net/minecraft/world/level/BlockGetter.java:121
  • Modifiers: static
  • Return: T

คืออะไร

ดำเนินการ traverseBlocks ตาม implementation ของ BlockGetter

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: equals(), apply(), lerp(), floor(), MutableBlockPos(), sign(), frac(), set(). สร้างออบเจ็กต์: BlockPos.MutableBlockPos. มีจุด return อย่างน้อย 4 จุด.

Parameters

  • Vec3 vec3
  • Vec3 vec32
  • C object
  • BiFunction<C, BlockPos, T> biFunction
  • Function<C, T> function

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

Vec3 vec3 = ...;
Vec3 vec32 = ...;
C object = ...;
BiFunction<C, BlockPos, T> biFunction = ...;
Function<C, T> function = ...;
T result = BlockGetter.traverseBlocks(vec3, vec32, object, biFunction, function);

ChunkPos

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

net.minecraft.world.level.ChunkPos#asLong(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:80
  • Modifiers: public static
  • Return: long

คืออะไร

ดำเนินการ asLong ตาม implementation ของ ChunkPos

ทำงานยังไง

เรียกต่อ: blockToSectionCoord(), getX(), getZ(). คืนค่า: asLong(SectionPos.blockToSectionCoord(blockPos.getX()), SectionPos.blockToSectionCoord(blockPos.getZ())).

Parameters

  • BlockPos blockPos

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

BlockPos blockPos = ...;
long result = ChunkPos.asLong(blockPos);

net.minecraft.world.level.ChunkPos#asLong(int,int)

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:76
  • Modifiers: public static
  • Return: long

คืออะไร

ดำเนินการ asLong ตาม implementation ของ ChunkPos

ทำงานยังไง

คืนค่า: i & 4294967295L | (j & 4294967295L) << 32.

Parameters

  • int i
  • int j

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

long result = ChunkPos.asLong(0, 0);

net.minecraft.world.level.ChunkPos#ChunkPos(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:54
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: x, z. เรียกต่อ: blockToSectionCoord(), getX(), getZ().

Parameters

  • BlockPos blockPos

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

BlockPos blockPos = ...;
ChunkPos instance = new ChunkPos(blockPos);

net.minecraft.world.level.ChunkPos#ChunkPos(int,int)

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:49
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: x, z.

Parameters

  • int i
  • int j

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

ChunkPos instance = new ChunkPos(0, 0);

net.minecraft.world.level.ChunkPos#ChunkPos(long)

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:59
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: x, z.

Parameters

  • long l

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

ChunkPos instance = new ChunkPos(0L);

net.minecraft.world.level.ChunkPos#distanceSquared(ChunkPos)

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:185
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ distanceSquared ตาม implementation ของ ChunkPos

ทำงานยังไง

คืนค่า: this.distanceSquared(chunkPos.x, chunkPos.z).

Parameters

  • ChunkPos chunkPos

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

ChunkPos instance = ...;
ChunkPos chunkPos = ...;
int result = instance.distanceSquared(chunkPos);

net.minecraft.world.level.ChunkPos#distanceSquared(long)

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:189
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ distanceSquared ตาม implementation ของ ChunkPos

ทำงานยังไง

เรียกต่อ: getX(), getZ(). คืนค่า: this.distanceSquared(getX(l), getZ(l)).

Parameters

  • long l

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

ChunkPos instance = ...;
int result = instance.distanceSquared(0L);

net.minecraft.world.level.ChunkPos#equals(Object)

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:103
  • Modifiers: public
  • Return: boolean

คืออะไร

เปรียบเทียบความเท่ากัน equals

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: x, z. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • Object object

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

ChunkPos instance = ...;
Object object = ...;
boolean result = instance.equals(object);

net.minecraft.world.level.ChunkPos#getBlockAt(int,int,int)

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:152
  • Modifiers: public
  • Return: BlockPos

คืออะไร

อ่านค่า Block At

ทำงานยังไง

เรียกต่อ: getBlockX(), getBlockZ(). สร้างออบเจ็กต์: BlockPos. คืนค่า: new BlockPos(this.getBlockX(i), j, this.getBlockZ(k)).

Parameters

  • int i
  • int j
  • int k

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

ChunkPos instance = ...;
BlockPos result = instance.getBlockAt(0, 0, 0);

net.minecraft.world.level.ChunkPos#getBlockX(int)

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:156
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Block X

ทำงานยังไง

เรียกต่อ: sectionToBlockCoord(). คืนค่า: SectionPos.sectionToBlockCoord(this.x, i).

Parameters

  • int i

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

ChunkPos instance = ...;
int result = instance.getBlockX(0);

net.minecraft.world.level.ChunkPos#getBlockZ(int)

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:160
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Block Z

ทำงานยังไง

เรียกต่อ: sectionToBlockCoord(). คืนค่า: SectionPos.sectionToBlockCoord(this.z, i).

Parameters

  • int i

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

ChunkPos instance = ...;
int result = instance.getBlockZ(0);

net.minecraft.world.level.ChunkPos#getChessboardDistance(ChunkPos)

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:177
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Chessboard Distance

ทำงานยังไง

คืนค่า: this.getChessboardDistance(chunkPos.x, chunkPos.z).

Parameters

  • ChunkPos chunkPos

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

ChunkPos instance = ...;
ChunkPos chunkPos = ...;
int result = instance.getChessboardDistance(chunkPos);

net.minecraft.world.level.ChunkPos#getChessboardDistance(int,int)

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:181
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Chessboard Distance

ทำงานยังไง

เรียกต่อ: max(), abs(). คืนค่า: Math.max(Math.abs(this.x - i), Math.abs(this.z - j)).

Parameters

  • int i
  • int j

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

ChunkPos instance = ...;
int result = instance.getChessboardDistance(0, 0);

net.minecraft.world.level.ChunkPos#getMaxBlockX()

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

คืออะไร

อ่านค่า Max Block X

ทำงานยังไง

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

Parameters

  • ไม่มี

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

ChunkPos instance = ...;
int result = instance.getMaxBlockX();

net.minecraft.world.level.ChunkPos#getMaxBlockZ()

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:132
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Max Block Z

ทำงานยังไง

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

Parameters

  • ไม่มี

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

ChunkPos instance = ...;
int result = instance.getMaxBlockZ();

net.minecraft.world.level.ChunkPos#getMiddleBlockPosition(int)

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:164
  • Modifiers: public
  • Return: BlockPos

คืออะไร

อ่านค่า Middle Block Position

ทำงานยังไง

เรียกต่อ: getMiddleBlockX(), getMiddleBlockZ(). สร้างออบเจ็กต์: BlockPos. คืนค่า: new BlockPos(this.getMiddleBlockX(), i, this.getMiddleBlockZ()).

Parameters

  • int i

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

ChunkPos instance = ...;
BlockPos result = instance.getMiddleBlockPosition(0);

net.minecraft.world.level.ChunkPos#getMiddleBlockX()

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:112
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Middle Block X

ทำงานยังไง

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

Parameters

  • ไม่มี

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

ChunkPos instance = ...;
int result = instance.getMiddleBlockX();

net.minecraft.world.level.ChunkPos#getMiddleBlockZ()

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:116
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Middle Block Z

ทำงานยังไง

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

Parameters

  • ไม่มี

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

ChunkPos instance = ...;
int result = instance.getMiddleBlockZ();

net.minecraft.world.level.ChunkPos#getMinBlockX()

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:120
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Min Block X

ทำงานยังไง

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

Parameters

  • ไม่มี

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

ChunkPos instance = ...;
int result = instance.getMinBlockX();

net.minecraft.world.level.ChunkPos#getMinBlockZ()

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:124
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Min Block Z

ทำงานยังไง

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

Parameters

  • ไม่มี

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

ChunkPos instance = ...;
int result = instance.getMinBlockZ();

net.minecraft.world.level.ChunkPos#getRegionLocalX()

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:144
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Region Local X

ทำงานยังไง

คืนค่า: this.x & 31.

Parameters

  • ไม่มี

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

ChunkPos instance = ...;
int result = instance.getRegionLocalX();

net.minecraft.world.level.ChunkPos#getRegionLocalZ()

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:148
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Region Local Z

ทำงานยังไง

คืนค่า: this.z & 31.

Parameters

  • ไม่มี

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

ChunkPos instance = ...;
int result = instance.getRegionLocalZ();

net.minecraft.world.level.ChunkPos#getRegionX()

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:136
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Region X

ทำงานยังไง

คืนค่า: this.x >> 5.

Parameters

  • ไม่มี

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

ChunkPos instance = ...;
int result = instance.getRegionX();

net.minecraft.world.level.ChunkPos#getRegionZ()

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:140
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Region Z

ทำงานยังไง

คืนค่า: this.z >> 5.

Parameters

  • ไม่มี

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

ChunkPos instance = ...;
int result = instance.getRegionZ();

net.minecraft.world.level.ChunkPos#getWorldPosition()

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:173
  • Modifiers: public
  • Return: BlockPos

คืออะไร

อ่านค่า World Position

ทำงานยังไง

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

Parameters

  • ไม่มี

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

ChunkPos instance = ...;
BlockPos result = instance.getWorldPosition();

net.minecraft.world.level.ChunkPos#getX(long)

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:84
  • Modifiers: public static
  • Return: int

คืออะไร

อ่านค่า X

ทำงานยังไง

คืนค่า: (int)(l & 4294967295L).

Parameters

  • long l

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

int result = ChunkPos.getX(0L);

net.minecraft.world.level.ChunkPos#getZ(long)

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:88
  • Modifiers: public static
  • Return: int

คืออะไร

อ่านค่า Z

ทำงานยังไง

คืนค่า: (int)(l >>> 32 & 4294967295L).

Parameters

  • long l

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

int result = ChunkPos.getZ(0L);

net.minecraft.world.level.ChunkPos#hash(int,int)

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:97
  • Modifiers: public static
  • Return: int

คืออะไร

ดำเนินการ hash ตาม implementation ของ ChunkPos

ทำงานยังไง

คืนค่า: k ^ l.

Parameters

  • int i
  • int j

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

int result = ChunkPos.hash(0, 0);

net.minecraft.world.level.ChunkPos#hashCode()

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:92
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ hashCode ตาม implementation ของ ChunkPos

ทำงานยังไง

เรียกต่อ: hash(). คืนค่า: hash(this.x, this.z).

Parameters

  • ไม่มี

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

ChunkPos instance = ...;
int result = instance.hashCode();

net.minecraft.world.level.ChunkPos#maxFromRegion(int,int)

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:68
  • Modifiers: public static
  • Return: ChunkPos

คืออะไร

ดำเนินการ maxFromRegion ตาม implementation ของ ChunkPos

ทำงานยังไง

สร้างออบเจ็กต์: ChunkPos. คืนค่า: new ChunkPos((i << 5) + 31, (j << 5) + 31).

Parameters

  • int i
  • int j

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

ChunkPos result = ChunkPos.maxFromRegion(0, 0);

net.minecraft.world.level.ChunkPos#minFromRegion(int,int)

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:64
  • Modifiers: public static
  • Return: ChunkPos

คืออะไร

ดำเนินการ minFromRegion ตาม implementation ของ ChunkPos

ทำงานยังไง

สร้างออบเจ็กต์: ChunkPos. คืนค่า: new ChunkPos(i << 5, j << 5).

Parameters

  • int i
  • int j

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

ChunkPos result = ChunkPos.minFromRegion(0, 0);

net.minecraft.world.level.ChunkPos#rangeClosed(ChunkPos,ChunkPos)

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:203
  • Modifiers: public static
  • Return: Stream<ChunkPos>

คืออะไร

ดำเนินการ rangeClosed ตาม implementation ของ ChunkPos

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: pos. เรียกต่อ: abs(), stream(), tryAdvance(), accept(). สร้างออบเจ็กต์: AbstractSpliterator<ChunkPos>, ChunkPos. มีจุด return อย่างน้อย 3 จุด.

Parameters

  • ChunkPos chunkPos
  • ChunkPos chunkPos2

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

ChunkPos chunkPos = ...;
ChunkPos chunkPos2 = ...;
Stream<ChunkPos> result = ChunkPos.rangeClosed(chunkPos, chunkPos2);

net.minecraft.world.level.ChunkPos#rangeClosed(ChunkPos,int)

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:199
  • Modifiers: public static
  • Return: Stream<ChunkPos>

คืออะไร

ดำเนินการ rangeClosed ตาม implementation ของ ChunkPos

ทำงานยังไง

สร้างออบเจ็กต์: ChunkPos. คืนค่า: rangeClosed(new ChunkPos(chunkPos.x - i, chunkPos.z - i), new ChunkPos(chunkPos.x + i, chunkPos.z + i)).

Parameters

  • ChunkPos chunkPos
  • int i

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

ChunkPos chunkPos = ...;
Stream<ChunkPos> result = ChunkPos.rangeClosed(chunkPos, 0);

net.minecraft.world.level.ChunkPos#toLong()

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:72
  • Modifiers: public
  • Return: long

คืออะไร

ดำเนินการ toLong ตาม implementation ของ ChunkPos

ทำงานยังไง

เรียกต่อ: asLong(). คืนค่า: asLong(this.x, this.z).

Parameters

  • ไม่มี

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

ChunkPos instance = ...;
long result = instance.toLong();

net.minecraft.world.level.ChunkPos#toString()

  • Origin: common
  • Source: net/minecraft/world/level/ChunkPos.java:168
  • Modifiers: public
  • Return: String

คืออะไร

ดำเนินการ toString ตาม implementation ของ ChunkPos

ทำงานยังไง

คืนค่า: "[" + this.x + ", " + this.z + "]".

Parameters

  • ไม่มี

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

ChunkPos instance = ...;
String result = instance.toString();

ClipBlockStateContext

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

net.minecraft.world.level.ClipBlockStateContext#ClipBlockStateContext(Vec3,Vec3,Predicate<BlockState>)

  • Origin: common
  • Source: net/minecraft/world/level/ClipBlockStateContext.java:12
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: from, to, block.

Parameters

  • Vec3 vec3
  • Vec3 vec32
  • Predicate<BlockState> predicate

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

Vec3 vec3 = ...;
Vec3 vec32 = ...;
Predicate<BlockState> predicate = ...;
ClipBlockStateContext instance = new ClipBlockStateContext(vec3, vec32, predicate);

net.minecraft.world.level.ClipBlockStateContext#getFrom()

  • Origin: common
  • Source: net/minecraft/world/level/ClipBlockStateContext.java:22
  • Modifiers: public
  • Return: Vec3

คืออะไร

อ่านค่า From

ทำงานยังไง

คืนค่า: this.from.

Parameters

  • ไม่มี

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

ClipBlockStateContext instance = ...;
Vec3 result = instance.getFrom();

net.minecraft.world.level.ClipBlockStateContext#getTo()

  • Origin: common
  • Source: net/minecraft/world/level/ClipBlockStateContext.java:18
  • Modifiers: public
  • Return: Vec3

คืออะไร

อ่านค่า To

ทำงานยังไง

คืนค่า: this.to.

Parameters

  • ไม่มี

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

ClipBlockStateContext instance = ...;
Vec3 result = instance.getTo();

net.minecraft.world.level.ClipBlockStateContext#isTargetBlock()

  • Origin: common
  • Source: net/minecraft/world/level/ClipBlockStateContext.java:26
  • Modifiers: public
  • Return: Predicate<BlockState>

คืออะไร

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

ทำงานยังไง

คืนค่า: this.block.

Parameters

  • ไม่มี

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

ClipBlockStateContext instance = ...;
Predicate<BlockState> result = instance.isTargetBlock();

ClipContext

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

net.minecraft.world.level.ClipContext#ClipContext(Vec3,Vec3,ClipContext.Block,ClipContext.Fluid,CollisionContext)

  • Origin: common
  • Source: net/minecraft/world/level/ClipContext.java:27
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: from, to, block, fluid, collisionContext.

Parameters

  • Vec3 vec3
  • Vec3 vec32
  • ClipContext.Block block
  • ClipContext.Fluid fluid
  • CollisionContext collisionContext

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

Vec3 vec3 = ...;
Vec3 vec32 = ...;
ClipContext.Block block = ...;
ClipContext.Fluid fluid = ...;
CollisionContext collisionContext = ...;
ClipContext instance = new ClipContext(vec3, vec32, block, fluid, collisionContext);

net.minecraft.world.level.ClipContext#ClipContext(Vec3,Vec3,ClipContext.Block,ClipContext.Fluid,Entity)

  • Origin: common
  • Source: net/minecraft/world/level/ClipContext.java:23
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • Vec3 vec3
  • Vec3 vec32
  • ClipContext.Block block
  • ClipContext.Fluid fluid
  • Entity entity

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

Vec3 vec3 = ...;
Vec3 vec32 = ...;
ClipContext.Block block = ...;
ClipContext.Fluid fluid = ...;
Entity entity = ...;
ClipContext instance = new ClipContext(vec3, vec32, block, fluid, entity);

net.minecraft.world.level.ClipContext#getBlockShape(BlockState,BlockGetter,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/ClipContext.java:43
  • Modifiers: public
  • Return: VoxelShape

คืออะไร

อ่านค่า Block Shape

ทำงานยังไง

เรียกต่อ: get(). คืนค่า: this.block.get(blockState, blockGetter, blockPos, this.collisionContext).

Parameters

  • BlockState blockState
  • BlockGetter blockGetter
  • BlockPos blockPos

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

ClipContext instance = ...;
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
VoxelShape result = instance.getBlockShape(blockState, blockGetter, blockPos);

net.minecraft.world.level.ClipContext#getFluidShape(FluidState,BlockGetter,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/ClipContext.java:47
  • Modifiers: public
  • Return: VoxelShape

คืออะไร

อ่านค่า Fluid Shape

ทำงานยังไง

เรียกต่อ: canPick(), getShape(), empty(). คืนค่า: this.fluid.canPick(fluidState) ? fluidState.getShape(blockGetter, blockPos) : Shapes.empty().

Parameters

  • FluidState fluidState
  • BlockGetter blockGetter
  • BlockPos blockPos

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

ClipContext instance = ...;
FluidState fluidState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
VoxelShape result = instance.getFluidShape(fluidState, blockGetter, blockPos);

net.minecraft.world.level.ClipContext#getFrom()

  • Origin: common
  • Source: net/minecraft/world/level/ClipContext.java:39
  • Modifiers: public
  • Return: Vec3

คืออะไร

อ่านค่า From

ทำงานยังไง

คืนค่า: this.from.

Parameters

  • ไม่มี

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

ClipContext instance = ...;
Vec3 result = instance.getFrom();

net.minecraft.world.level.ClipContext#getTo()

  • Origin: common
  • Source: net/minecraft/world/level/ClipContext.java:35
  • Modifiers: public
  • Return: Vec3

คืออะไร

อ่านค่า To

ทำงานยังไง

คืนค่า: this.to.

Parameters

  • ไม่มี

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

ClipContext instance = ...;
Vec3 result = instance.getTo();

ClipContext$Block

  • Full name: net.minecraft.world.level.ClipContext$Block
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/ClipContext.java
  • Type: enum
  • Modifiers: public
  • Implements: ClipContext.ShapeGetter

net.minecraft.world.level.ClipContext$Block#get(BlockState,BlockGetter,BlockPos,CollisionContext)

  • Origin: common
  • Source: net/minecraft/world/level/ClipContext.java:65
  • Modifiers: public
  • Return: VoxelShape

คืออะไร

อ่านค่า get

ทำงานยังไง

คืนค่า: this.shapeGetter.get(blockState, blockGetter, blockPos, collisionContext).

Parameters

  • BlockState blockState
  • BlockGetter blockGetter
  • BlockPos blockPos
  • CollisionContext collisionContext

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

ClipContext.Block instance = ...;
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
VoxelShape result = instance.get(blockState, blockGetter, blockPos, collisionContext);

ClipContext$Fluid

  • Full name: net.minecraft.world.level.ClipContext$Fluid
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/ClipContext.java
  • Type: enum
  • Modifiers: public

net.minecraft.world.level.ClipContext$Fluid#canPick(FluidState)

  • Origin: common
  • Source: net/minecraft/world/level/ClipContext.java:83
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Pick

ทำงานยังไง

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

Parameters

  • FluidState fluidState

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

ClipContext.Fluid instance = ...;
FluidState fluidState = ...;
boolean result = instance.canPick(fluidState);

ClipContext$ShapeGetter

  • Full name: net.minecraft.world.level.ClipContext$ShapeGetter
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/ClipContext.java
  • Type: interface
  • Modifiers: public

net.minecraft.world.level.ClipContext$ShapeGetter#get(BlockState,BlockGetter,BlockPos,CollisionContext)

  • Origin: common
  • Source: net/minecraft/world/level/ClipContext.java:89
  • Modifiers: ``
  • Return: VoxelShape

คืออะไร

อ่านค่า get

ทำงานยังไง

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

Parameters

  • BlockState blockState
  • BlockGetter blockGetter
  • BlockPos blockPos
  • CollisionContext collisionContext

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

ClipContext.ShapeGetter instance = ...;
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
VoxelShape result = instance.get(blockState, blockGetter, blockPos, collisionContext);

CollisionGetter

  • Full name: net.minecraft.world.level.CollisionGetter
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/CollisionGetter.java
  • Type: interface
  • Modifiers: public
  • Implements: BlockGetter

net.minecraft.world.level.CollisionGetter#clipIncludingBorder(ClipContext)

  • Origin: common
  • Source: net/minecraft/world/level/CollisionGetter.java:103
  • Modifiers: default
  • Return: BlockHitResult

คืออะไร

ดำเนินการ clipIncludingBorder ตาม implementation ของ CollisionGetter

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: clip(), getWorldBorder(), isWithinBounds(), getFrom(), getLocation(), subtract(), getApproximateNearest(), clampVec3ToBound(). สร้างออบเจ็กต์: BlockHitResult. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ClipContext clipContext

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

CollisionGetter instance = ...;
ClipContext clipContext = ...;
BlockHitResult result = instance.clipIncludingBorder(clipContext);

net.minecraft.world.level.CollisionGetter#collidesWithSuffocatingBlock(Entity,AABB)

  • Origin: common
  • Source: net/minecraft/world/level/CollisionGetter.java:116
  • Modifiers: default
  • Return: boolean

คืออะไร

ดำเนินการ collidesWithSuffocatingBlock ตาม implementation ของ CollisionGetter

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: hasNext(), next(), isEmpty(). สร้างออบเจ็กต์: BlockCollisions<>. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • Entity entity
  • AABB aABB

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

CollisionGetter instance = ...;
Entity entity = ...;
AABB aABB = ...;
boolean result = instance.collidesWithSuffocatingBlock(entity, aABB);

net.minecraft.world.level.CollisionGetter#findFreePosition(Entity,VoxelShape,Vec3,double,double,double)

  • Origin: common
  • Source: net/minecraft/world/level/CollisionGetter.java:145
  • Modifiers: default
  • Return: Optional<Vec3>

คืออะไร

ค้นหา Free Position

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isEmpty(), empty(), bounds(), inflate(), stream(), getBlockCollisions(), spliterator(), filter(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • Entity entity
  • VoxelShape voxelShape
  • Vec3 vec3
  • double d
  • double e
  • double f

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

CollisionGetter instance = ...;
Entity entity = ...;
VoxelShape voxelShape = ...;
Vec3 vec3 = ...;
Optional<Vec3> result = instance.findFreePosition(entity, voxelShape, vec3, 0.0D, 0.0D, 0.0D);

net.minecraft.world.level.CollisionGetter#findSupportingBlock(Entity,AABB)

  • Origin: common
  • Source: net/minecraft/world/level/CollisionGetter.java:128
  • Modifiers: default
  • Return: Optional<BlockPos>

คืออะไร

ค้นหา Supporting Block

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: hasNext(), next(), distToCenterSqr(), position(), compareTo(), immutable(), ofNullable(). สร้างออบเจ็กต์: BlockCollisions<>. คืนค่า: Optional.ofNullable(blockPos).

Parameters

  • Entity entity
  • AABB aABB

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

CollisionGetter instance = ...;
Entity entity = ...;
AABB aABB = ...;
Optional<BlockPos> result = instance.findSupportingBlock(entity, aABB);

net.minecraft.world.level.CollisionGetter#getBlockAndLiquidCollisions(Entity,AABB)

  • Origin: common
  • Source: net/minecraft/world/level/CollisionGetter.java:93
  • Modifiers: default
  • Return: Iterable<VoxelShape>

คืออะไร

อ่านค่า Block And Liquid Collisions

ทำงานยังไง

เรียกต่อ: of(). สร้างออบเจ็กต์: BlockCollisions<>. คืนค่า: () -> new BlockCollisions<>(this, CollisionContext.of(entity, true), aABB, false, (mutableBlockPos, voxelShape) -> voxelShape).

Parameters

  • Entity entity
  • AABB aABB

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

CollisionGetter instance = ...;
Entity entity = ...;
AABB aABB = ...;
Iterable<VoxelShape> result = instance.getBlockAndLiquidCollisions(entity, aABB);

net.minecraft.world.level.CollisionGetter#getBlockCollisions(Entity,AABB)

  • Origin: common
  • Source: net/minecraft/world/level/CollisionGetter.java:89
  • Modifiers: default
  • Return: Iterable<VoxelShape>

คืออะไร

อ่านค่า Block Collisions

ทำงานยังไง

สร้างออบเจ็กต์: BlockCollisions<>. คืนค่า: () -> new BlockCollisions<>(this, entity, aABB, false, (mutableBlockPos, voxelShape) -> voxelShape).

Parameters

  • Entity entity
  • AABB aABB

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

CollisionGetter instance = ...;
Entity entity = ...;
AABB aABB = ...;
Iterable<VoxelShape> result = instance.getBlockCollisions(entity, aABB);

net.minecraft.world.level.CollisionGetter#getChunkForCollisions(int,int)

  • Origin: common
  • Source: net/minecraft/world/level/CollisionGetter.java:24
  • Modifiers: ``
  • Return: BlockGetter

คืออะไร

อ่านค่า Chunk For Collisions

ทำงานยังไง

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

Parameters

  • int i
  • int j

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

CollisionGetter instance = ...;
BlockGetter result = instance.getChunkForCollisions(0, 0);

net.minecraft.world.level.CollisionGetter#getCollisions(Entity,AABB)

  • Origin: common
  • Source: net/minecraft/world/level/CollisionGetter.java:83
  • Modifiers: default
  • Return: Iterable<VoxelShape>

คืออะไร

อ่านค่า Collisions

ทำงานยังไง

เรียกต่อ: getEntityCollisions(), getBlockCollisions(), isEmpty(), concat(). คืนค่า: list.isEmpty() ? iterable : Iterables.concat(list, iterable).

Parameters

  • Entity entity
  • AABB aABB

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

CollisionGetter instance = ...;
Entity entity = ...;
AABB aABB = ...;
Iterable<VoxelShape> result = instance.getCollisions(entity, aABB);

net.minecraft.world.level.CollisionGetter#getEntityCollisions(Entity,AABB)

  • Origin: common
  • Source: net/minecraft/world/level/CollisionGetter.java:81
  • Modifiers: ``
  • Return: List<VoxelShape>

คืออะไร

อ่านค่า Entity Collisions

ทำงานยังไง

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

Parameters

  • Entity entity
  • AABB aABB

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

CollisionGetter instance = ...;
Entity entity = ...;
AABB aABB = ...;
List<VoxelShape> result = instance.getEntityCollisions(entity, aABB);

net.minecraft.world.level.CollisionGetter#getWorldBorder()

  • Origin: common
  • Source: net/minecraft/world/level/CollisionGetter.java:22
  • Modifiers: ``
  • Return: WorldBorder

คืออะไร

อ่านค่า World Border

ทำงานยังไง

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

Parameters

  • ไม่มี

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

CollisionGetter instance = ...;
WorldBorder result = instance.getWorldBorder();

net.minecraft.world.level.CollisionGetter#isUnobstructed(BlockState,BlockPos,CollisionContext)

  • Origin: common
  • Source: net/minecraft/world/level/CollisionGetter.java:31
  • Modifiers: default
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: getCollisionShape(), isEmpty(), move(), getX(), getY(), getZ(). คืนค่า: voxelShape.isEmpty() || this.isUnobstructed(null, voxelShape.move(blockPos.getX(), blockPos.getY(), blockPos.getZ())).

Parameters

  • BlockState blockState
  • BlockPos blockPos
  • CollisionContext collisionContext

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

CollisionGetter instance = ...;
BlockState blockState = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
boolean result = instance.isUnobstructed(blockState, blockPos, collisionContext);

net.minecraft.world.level.CollisionGetter#isUnobstructed(Entity)

  • Origin: common
  • Source: net/minecraft/world/level/CollisionGetter.java:36
  • Modifiers: default
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: create(), getBoundingBox(). คืนค่า: this.isUnobstructed(entity, Shapes.create(entity.getBoundingBox())).

Parameters

  • Entity entity

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

CollisionGetter instance = ...;
Entity entity = ...;
boolean result = instance.isUnobstructed(entity);

net.minecraft.world.level.CollisionGetter#isUnobstructed(Entity,VoxelShape)

  • Origin: common
  • Source: net/minecraft/world/level/CollisionGetter.java:27
  • Modifiers: default
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: true.

Parameters

  • Entity entity
  • VoxelShape voxelShape

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

CollisionGetter instance = ...;
Entity entity = ...;
VoxelShape voxelShape = ...;
boolean result = instance.isUnobstructed(entity, voxelShape);

net.minecraft.world.level.CollisionGetter#noBlockCollision(Entity,AABB)

  • Origin: common
  • Source: net/minecraft/world/level/CollisionGetter.java:71
  • Modifiers: default
  • Return: boolean

คืออะไร

ดำเนินการ noBlockCollision ตาม implementation ของ CollisionGetter

ทำงานยังไง

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

Parameters

  • Entity entity
  • AABB aABB

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

CollisionGetter instance = ...;
Entity entity = ...;
AABB aABB = ...;
boolean result = instance.noBlockCollision(entity, aABB);

net.minecraft.world.level.CollisionGetter#noCollision(AABB)

  • Origin: common
  • Source: net/minecraft/world/level/CollisionGetter.java:40
  • Modifiers: default
  • Return: boolean

คืออะไร

ดำเนินการ noCollision ตาม implementation ของ CollisionGetter

ทำงานยังไง

คืนค่า: this.noCollision(null, aABB).

Parameters

  • AABB aABB

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

CollisionGetter instance = ...;
AABB aABB = ...;
boolean result = instance.noCollision(aABB);

net.minecraft.world.level.CollisionGetter#noCollision(Entity)

  • Origin: common
  • Source: net/minecraft/world/level/CollisionGetter.java:44
  • Modifiers: default
  • Return: boolean

คืออะไร

ดำเนินการ noCollision ตาม implementation ของ CollisionGetter

ทำงานยังไง

เรียกต่อ: getBoundingBox(). คืนค่า: this.noCollision(entity, entity.getBoundingBox()).

Parameters

  • Entity entity

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

CollisionGetter instance = ...;
Entity entity = ...;
boolean result = instance.noCollision(entity);

net.minecraft.world.level.CollisionGetter#noCollision(Entity,AABB)

  • Origin: common
  • Source: net/minecraft/world/level/CollisionGetter.java:48
  • Modifiers: default
  • Return: boolean

คืออะไร

ดำเนินการ noCollision ตาม implementation ของ CollisionGetter

ทำงานยังไง

คืนค่า: this.noCollision(entity, aABB, false).

Parameters

  • Entity entity
  • AABB aABB

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

CollisionGetter instance = ...;
Entity entity = ...;
AABB aABB = ...;
boolean result = instance.noCollision(entity, aABB);

net.minecraft.world.level.CollisionGetter#noCollision(Entity,AABB,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/CollisionGetter.java:52
  • Modifiers: default
  • Return: boolean

คืออะไร

ดำเนินการ noCollision ตาม implementation ของ CollisionGetter

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getBlockAndLiquidCollisions(), getBlockCollisions(), isEmpty(), getEntityCollisions(), borderCollision(), joinIsNotEmpty(), create(). มีจุด return อย่างน้อย 4 จุด.

Parameters

  • Entity entity
  • AABB aABB
  • boolean bl

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

CollisionGetter instance = ...;
Entity entity = ...;
AABB aABB = ...;
boolean result = instance.noCollision(entity, aABB, true);

ColorResolver

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

net.minecraft.world.level.ColorResolver#getColor(Biome,double,double)

  • Origin: common
  • Source: net/minecraft/world/level/ColorResolver.java:7
  • Modifiers: ``
  • Return: int

คืออะไร

อ่านค่า Color

ทำงานยังไง

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

Parameters

  • Biome biome
  • double d
  • double e

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

ColorResolver instance = ...;
Biome biome = ...;
int result = instance.getColor(biome, 0.0D, 0.0D);

CommonLevelAccessor

  • Full name: net.minecraft.world.level.CommonLevelAccessor
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/CommonLevelAccessor.java
  • Type: interface
  • Modifiers: public
  • Implements: EntityGetter,LevelReader,LevelSimulatedRW

net.minecraft.world.level.CommonLevelAccessor#getBlockEntity(BlockPos,BlockEntityType<T>)

  • Origin: common
  • Source: net/minecraft/world/level/CommonLevelAccessor.java:15
  • Modifiers: default
  • Return: Optional<T>

คืออะไร

อ่านค่า Block Entity

ทำงานยังไง

คืนค่า: LevelReader.super.getBlockEntity(blockPos, blockEntityType).

Parameters

  • BlockPos blockPos
  • BlockEntityType<T> blockEntityType

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

CommonLevelAccessor instance = ...;
BlockPos blockPos = ...;
BlockEntityType<T> blockEntityType = ...;
Optional<T> result = instance.getBlockEntity(blockPos, blockEntityType);

net.minecraft.world.level.CommonLevelAccessor#getEntityCollisions(Entity,AABB)

  • Origin: common
  • Source: net/minecraft/world/level/CommonLevelAccessor.java:20
  • Modifiers: default
  • Return: List<VoxelShape>

คืออะไร

อ่านค่า Entity Collisions

ทำงานยังไง

คืนค่า: EntityGetter.super.getEntityCollisions(entity, aABB).

Parameters

  • Entity entity
  • AABB aABB

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

CommonLevelAccessor instance = ...;
Entity entity = ...;
AABB aABB = ...;
List<VoxelShape> result = instance.getEntityCollisions(entity, aABB);

net.minecraft.world.level.CommonLevelAccessor#getHeightmapPos(Heightmap.Types,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/CommonLevelAccessor.java:30
  • Modifiers: default
  • Return: BlockPos

คืออะไร

อ่านค่า Heightmap Pos

ทำงานยังไง

คืนค่า: LevelReader.super.getHeightmapPos(types, blockPos).

Parameters

  • Heightmap.Types types
  • BlockPos blockPos

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

CommonLevelAccessor instance = ...;
Heightmap.Types types = ...;
BlockPos blockPos = ...;
BlockPos result = instance.getHeightmapPos(types, blockPos);

net.minecraft.world.level.CommonLevelAccessor#isUnobstructed(Entity,VoxelShape)

  • Origin: common
  • Source: net/minecraft/world/level/CommonLevelAccessor.java:25
  • Modifiers: default
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: EntityGetter.super.isUnobstructed(entity, voxelShape).

Parameters

  • Entity entity
  • VoxelShape voxelShape

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

CommonLevelAccessor instance = ...;
Entity entity = ...;
VoxelShape voxelShape = ...;
boolean result = instance.isUnobstructed(entity, voxelShape);

CustomSpawner

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

net.minecraft.world.level.CustomSpawner#tick(ServerLevel,boolean,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/CustomSpawner.java:6
  • Modifiers: ``
  • Return: int

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

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

Parameters

  • ServerLevel serverLevel
  • boolean bl
  • boolean bl2

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

CustomSpawner instance = ...;
ServerLevel serverLevel = ...;
int result = instance.tick(serverLevel, true, true);

DataPackConfig

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

net.minecraft.world.level.DataPackConfig#DataPackConfig(List<String>,List<String>)

  • Origin: common
  • Source: net/minecraft/world/level/DataPackConfig.java:20
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: enabled, disabled. เรียกต่อ: copyOf().

Parameters

  • List<String> list
  • List<String> list2

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

List<String> list = ...;
List<String> list2 = ...;
DataPackConfig instance = new DataPackConfig(list, list2);

net.minecraft.world.level.DataPackConfig#getDisabled()

  • Origin: common
  • Source: net/minecraft/world/level/DataPackConfig.java:29
  • Modifiers: public
  • Return: List<String>

คืออะไร

อ่านค่า Disabled

ทำงานยังไง

คืนค่า: this.disabled.

Parameters

  • ไม่มี

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

DataPackConfig instance = ...;
List<String> result = instance.getDisabled();

net.minecraft.world.level.DataPackConfig#getEnabled()

  • Origin: common
  • Source: net/minecraft/world/level/DataPackConfig.java:25
  • Modifiers: public
  • Return: List<String>

คืออะไร

อ่านค่า Enabled

ทำงานยังไง

คืนค่า: this.enabled.

Parameters

  • ไม่มี

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

DataPackConfig instance = ...;
List<String> result = instance.getEnabled();

EmptyBlockAndTintGetter

  • Full name: net.minecraft.world.level.EmptyBlockAndTintGetter
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/EmptyBlockAndTintGetter.java
  • Type: enum
  • Modifiers: public
  • Implements: BlockAndTintGetter

net.minecraft.world.level.EmptyBlockAndTintGetter#getBlockEntity(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/EmptyBlockAndTintGetter.java:31
  • Modifiers: public
  • Return: BlockEntity

คืออะไร

อ่านค่า Block Entity

ทำงานยังไง

คืนค่า: null.

Parameters

  • BlockPos blockPos

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

EmptyBlockAndTintGetter instance = ...;
BlockPos blockPos = ...;
BlockEntity result = instance.getBlockEntity(blockPos);

net.minecraft.world.level.EmptyBlockAndTintGetter#getBlockState(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/EmptyBlockAndTintGetter.java:37
  • Modifiers: public
  • Return: BlockState

คืออะไร

อ่านค่า Block State

ทำงานยังไง

เรียกต่อ: defaultBlockState(). คืนค่า: Blocks.AIR.defaultBlockState().

Parameters

  • BlockPos blockPos

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

EmptyBlockAndTintGetter instance = ...;
BlockPos blockPos = ...;
BlockState result = instance.getBlockState(blockPos);

net.minecraft.world.level.EmptyBlockAndTintGetter#getBlockTint(BlockPos,ColorResolver)

  • Origin: common
  • Source: net/minecraft/world/level/EmptyBlockAndTintGetter.java:26
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Block Tint

ทำงานยังไง

คืนค่า: -1.

Parameters

  • BlockPos blockPos
  • ColorResolver colorResolver

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

EmptyBlockAndTintGetter instance = ...;
BlockPos blockPos = ...;
ColorResolver colorResolver = ...;
int result = instance.getBlockTint(blockPos, colorResolver);

net.minecraft.world.level.EmptyBlockAndTintGetter#getFluidState(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/EmptyBlockAndTintGetter.java:42
  • Modifiers: public
  • Return: FluidState

คืออะไร

อ่านค่า Fluid State

ทำงานยังไง

เรียกต่อ: defaultFluidState(). คืนค่า: Fluids.EMPTY.defaultFluidState().

Parameters

  • BlockPos blockPos

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

EmptyBlockAndTintGetter instance = ...;
BlockPos blockPos = ...;
FluidState result = instance.getFluidState(blockPos);

net.minecraft.world.level.EmptyBlockAndTintGetter#getHeight()

  • Origin: common
  • Source: net/minecraft/world/level/EmptyBlockAndTintGetter.java:47
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Height

ทำงานยังไง

คืนค่า: 0.

Parameters

  • ไม่มี

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

EmptyBlockAndTintGetter instance = ...;
int result = instance.getHeight();

net.minecraft.world.level.EmptyBlockAndTintGetter#getLightEngine()

  • Origin: common
  • Source: net/minecraft/world/level/EmptyBlockAndTintGetter.java:21
  • Modifiers: public
  • Return: LevelLightEngine

คืออะไร

อ่านค่า Light Engine

ทำงานยังไง

คืนค่า: LevelLightEngine.EMPTY.

Parameters

  • ไม่มี

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

EmptyBlockAndTintGetter instance = ...;
LevelLightEngine result = instance.getLightEngine();

net.minecraft.world.level.EmptyBlockAndTintGetter#getMinY()

  • Origin: common
  • Source: net/minecraft/world/level/EmptyBlockAndTintGetter.java:52
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Min Y

ทำงานยังไง

คืนค่า: 0.

Parameters

  • ไม่มี

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

EmptyBlockAndTintGetter instance = ...;
int result = instance.getMinY();

net.minecraft.world.level.EmptyBlockAndTintGetter#getShade(Direction,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/EmptyBlockAndTintGetter.java:16
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Shade

ทำงานยังไง

คืนค่า: 1.0F.

Parameters

  • Direction direction
  • boolean bl

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

EmptyBlockAndTintGetter instance = ...;
Direction direction = ...;
float result = instance.getShade(direction, true);

EmptyBlockGetter

  • Full name: net.minecraft.world.level.EmptyBlockGetter
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/EmptyBlockGetter.java
  • Type: enum
  • Modifiers: public
  • Implements: BlockGetter

net.minecraft.world.level.EmptyBlockGetter#getBlockEntity(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/EmptyBlockGetter.java:14
  • Modifiers: public
  • Return: BlockEntity

คืออะไร

อ่านค่า Block Entity

ทำงานยังไง

คืนค่า: null.

Parameters

  • BlockPos blockPos

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

EmptyBlockGetter instance = ...;
BlockPos blockPos = ...;
BlockEntity result = instance.getBlockEntity(blockPos);

net.minecraft.world.level.EmptyBlockGetter#getBlockState(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/EmptyBlockGetter.java:20
  • Modifiers: public
  • Return: BlockState

คืออะไร

อ่านค่า Block State

ทำงานยังไง

เรียกต่อ: defaultBlockState(). คืนค่า: Blocks.AIR.defaultBlockState().

Parameters

  • BlockPos blockPos

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

EmptyBlockGetter instance = ...;
BlockPos blockPos = ...;
BlockState result = instance.getBlockState(blockPos);

net.minecraft.world.level.EmptyBlockGetter#getFluidState(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/EmptyBlockGetter.java:25
  • Modifiers: public
  • Return: FluidState

คืออะไร

อ่านค่า Fluid State

ทำงานยังไง

เรียกต่อ: defaultFluidState(). คืนค่า: Fluids.EMPTY.defaultFluidState().

Parameters

  • BlockPos blockPos

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

EmptyBlockGetter instance = ...;
BlockPos blockPos = ...;
FluidState result = instance.getFluidState(blockPos);

net.minecraft.world.level.EmptyBlockGetter#getHeight()

  • Origin: common
  • Source: net/minecraft/world/level/EmptyBlockGetter.java:35
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Height

ทำงานยังไง

คืนค่า: 0.

Parameters

  • ไม่มี

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

EmptyBlockGetter instance = ...;
int result = instance.getHeight();

net.minecraft.world.level.EmptyBlockGetter#getMinY()

  • Origin: common
  • Source: net/minecraft/world/level/EmptyBlockGetter.java:30
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Min Y

ทำงานยังไง

คืนค่า: 0.

Parameters

  • ไม่มี

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

EmptyBlockGetter instance = ...;
int result = instance.getMinY();

EntityBasedExplosionDamageCalculator

  • Full name: net.minecraft.world.level.EntityBasedExplosionDamageCalculator
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/EntityBasedExplosionDamageCalculator.java
  • Type: class
  • Modifiers: public
  • Extends: ExplosionDamageCalculator

net.minecraft.world.level.EntityBasedExplosionDamageCalculator#EntityBasedExplosionDamageCalculator(Entity)

  • Origin: common
  • Source: net/minecraft/world/level/EntityBasedExplosionDamageCalculator.java:12
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: source.

Parameters

  • Entity entity

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

Entity entity = ...;
EntityBasedExplosionDamageCalculator instance = new EntityBasedExplosionDamageCalculator(entity);

net.minecraft.world.level.EntityBasedExplosionDamageCalculator#getBlockExplosionResistance(Explosion,BlockGetter,BlockPos,BlockState,FluidState)

  • Origin: common
  • Source: net/minecraft/world/level/EntityBasedExplosionDamageCalculator.java:16
  • Modifiers: public
  • Return: Optional<Float>

คืออะไร

อ่านค่า Block Explosion Resistance

ทำงานยังไง

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

Parameters

  • Explosion explosion
  • BlockGetter blockGetter
  • BlockPos blockPos
  • BlockState blockState
  • FluidState fluidState

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

EntityBasedExplosionDamageCalculator instance = ...;
Explosion explosion = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
FluidState fluidState = ...;
Optional<Float> result = instance.getBlockExplosionResistance(explosion, blockGetter, blockPos, blockState, fluidState);

net.minecraft.world.level.EntityBasedExplosionDamageCalculator#shouldBlockExplode(Explosion,BlockGetter,BlockPos,BlockState,float)

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

คืออะไร

ตรวจสอบว่าควร Block Explode

ทำงานยังไง

คืนค่า: this.source.shouldBlockExplode(explosion, blockGetter, blockPos, blockState, f).

Parameters

  • Explosion explosion
  • BlockGetter blockGetter
  • BlockPos blockPos
  • BlockState blockState
  • float f

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

EntityBasedExplosionDamageCalculator instance = ...;
Explosion explosion = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.shouldBlockExplode(explosion, blockGetter, blockPos, blockState, 0.0F);

EntityGetter

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

net.minecraft.world.level.EntityGetter#getEntities(Entity,AABB)

  • Origin: common
  • Source: net/minecraft/world/level/EntityGetter.java:29
  • Modifiers: default
  • Return: List<Entity>

คืออะไร

อ่านค่า Entities

ทำงานยังไง

คืนค่า: this.getEntities(entity, aABB, EntitySelector.NO_SPECTATORS).

Parameters

  • Entity entity
  • AABB aABB

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

EntityGetter instance = ...;
Entity entity = ...;
AABB aABB = ...;
List<Entity> result = instance.getEntities(entity, aABB);

net.minecraft.world.level.EntityGetter#getEntities(Entity,AABB,Predicate<? super Entity>)

  • Origin: common
  • Source: net/minecraft/world/level/EntityGetter.java:19
  • Modifiers: ``
  • Return: List<Entity>

คืออะไร

อ่านค่า Entities

ทำงานยังไง

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

Parameters

  • Entity entity
  • AABB aABB
  • Predicate<? super Entity> predicate

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

EntityGetter instance = ...;
Entity entity = ...;
AABB aABB = ...;
Predicate<? super Entity> predicate = ...;
List<Entity> result = instance.getEntities(entity, aABB, predicate);

net.minecraft.world.level.EntityGetter#getEntities(EntityTypeTest<Entity, T>,AABB,Predicate<? super T>)

  • Origin: common
  • Source: net/minecraft/world/level/EntityGetter.java:21
  • Modifiers: ``
  • Return: List<T>

คืออะไร

อ่านค่า Entities

ทำงานยังไง

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

Parameters

  • EntityTypeTest<Entity, T> entityTypeTest
  • AABB aABB
  • Predicate<? super T> predicate

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

EntityGetter instance = ...;
EntityTypeTest<Entity, T> entityTypeTest = ...;
AABB aABB = ...;
Predicate<? super T> predicate = ...;
List<T> result = instance.getEntities(entityTypeTest, aABB, predicate);

net.minecraft.world.level.EntityGetter#getEntitiesOfClass(Class<T>,AABB)

  • Origin: common
  • Source: net/minecraft/world/level/EntityGetter.java:50
  • Modifiers: default
  • Return: List<T>

คืออะไร

อ่านค่า Entities Of Class

ทำงานยังไง

คืนค่า: this.getEntitiesOfClass(class_, aABB, EntitySelector.NO_SPECTATORS).

Parameters

  • Class<T> class_
  • AABB aABB

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

EntityGetter instance = ...;
Class<T> class_ = ...;
AABB aABB = ...;
List<T> result = instance.getEntitiesOfClass(class_, aABB);

net.minecraft.world.level.EntityGetter#getEntitiesOfClass(Class<T>,AABB,Predicate<? super T>)

  • Origin: common
  • Source: net/minecraft/world/level/EntityGetter.java:23
  • Modifiers: default
  • Return: List<T>

คืออะไร

อ่านค่า Entities Of Class

ทำงานยังไง

เรียกต่อ: getEntities(), forClass(). คืนค่า: this.getEntities(EntityTypeTest.forClass(class_), aABB, predicate).

Parameters

  • Class<T> class_
  • AABB aABB
  • Predicate<? super T> predicate

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

EntityGetter instance = ...;
Class<T> class_ = ...;
AABB aABB = ...;
Predicate<? super T> predicate = ...;
List<T> result = instance.getEntitiesOfClass(class_, aABB, predicate);

net.minecraft.world.level.EntityGetter#getEntityCollisions(Entity,AABB)

  • Origin: common
  • Source: net/minecraft/world/level/EntityGetter.java:54
  • Modifiers: default
  • Return: List<VoxelShape>

คืออะไร

อ่านค่า Entity Collisions

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getSize(), of(), and(), getEntities(), inflate(), isEmpty(), builderWithExpectedSize(), size(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • Entity entity
  • AABB aABB

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

EntityGetter instance = ...;
Entity entity = ...;
AABB aABB = ...;
List<VoxelShape> result = instance.getEntityCollisions(entity, aABB);

net.minecraft.world.level.EntityGetter#getNearestPlayer(double,double,double,double,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/EntityGetter.java:97
  • Modifiers: default
  • Return: Player

คืออะไร

อ่านค่า Nearest Player

ทำงานยังไง

คืนค่า: this.getNearestPlayer(d, e, f, g, predicate).

Parameters

  • double d
  • double e
  • double f
  • double g
  • boolean bl

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

EntityGetter instance = ...;
Player result = instance.getNearestPlayer(0.0D, 0.0D, 0.0D, 0.0D, true);

net.minecraft.world.level.EntityGetter#getNearestPlayer(double,double,double,double,Predicate<Entity>)

  • Origin: common
  • Source: net/minecraft/world/level/EntityGetter.java:74
  • Modifiers: default
  • Return: Player

คืออะไร

อ่านค่า Nearest Player

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: players(), test(), distanceToSqr(). คืนค่า: player.

Parameters

  • double d
  • double e
  • double f
  • double g
  • Predicate<Entity> predicate

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

EntityGetter instance = ...;
Predicate<Entity> predicate = ...;
Player result = instance.getNearestPlayer(0.0D, 0.0D, 0.0D, 0.0D, predicate);

net.minecraft.world.level.EntityGetter#getNearestPlayer(Entity,double)

  • Origin: common
  • Source: net/minecraft/world/level/EntityGetter.java:92
  • Modifiers: default
  • Return: Player

คืออะไร

อ่านค่า Nearest Player

ทำงานยังไง

เรียกต่อ: getX(), getY(), getZ(). คืนค่า: this.getNearestPlayer(entity.getX(), entity.getY(), entity.getZ(), d, false).

Parameters

  • Entity entity
  • double d

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

EntityGetter instance = ...;
Entity entity = ...;
Player result = instance.getNearestPlayer(entity, 0.0D);

net.minecraft.world.level.EntityGetter#getPlayerByUUID(UUID)

  • Origin: common
  • Source: net/minecraft/world/level/EntityGetter.java:116
  • Modifiers: default
  • Return: Player

คืออะไร

อ่านค่า Player By UUID

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: players(), size(), get(), equals(), getUUID(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • UUID uUID

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

EntityGetter instance = ...;
UUID uUID = ...;
Player result = instance.getPlayerByUUID(uUID);

net.minecraft.world.level.EntityGetter#hasNearbyAlivePlayer(double,double,double,double)

  • Origin: common
  • Source: net/minecraft/world/level/EntityGetter.java:103
  • Modifiers: default
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Nearby Alive Player

ทำงานยังไง

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

Parameters

  • double d
  • double e
  • double f
  • double g

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

EntityGetter instance = ...;
boolean result = instance.hasNearbyAlivePlayer(0.0D, 0.0D, 0.0D, 0.0D);

net.minecraft.world.level.EntityGetter#isUnobstructed(Entity,VoxelShape)

  • Origin: common
  • Source: net/minecraft/world/level/EntityGetter.java:33
  • Modifiers: default
  • Return: boolean

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: isEmpty(), getEntities(), bounds(), isRemoved(), isPassengerOfSameVehicle(), joinIsNotEmpty(), create(), getBoundingBox(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • Entity entity
  • VoxelShape voxelShape

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

EntityGetter instance = ...;
Entity entity = ...;
VoxelShape voxelShape = ...;
boolean result = instance.isUnobstructed(entity, voxelShape);

net.minecraft.world.level.EntityGetter#players()

  • Origin: common
  • Source: net/minecraft/world/level/EntityGetter.java:27
  • Modifiers: ``
  • Return: List<? extends Player>

คืออะไร

ดำเนินการ players ตาม implementation ของ EntityGetter

ทำงานยังไง

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

Parameters

  • ไม่มี

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

EntityGetter instance = ...;
List<? extends Player> result = instance.players();

Explosion

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

net.minecraft.world.level.Explosion#canTriggerBlocks()

  • Origin: common
  • Source: net/minecraft/world/level/Explosion.java:41
  • Modifiers: ``
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Trigger Blocks

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Explosion instance = ...;
boolean result = instance.canTriggerBlocks();

net.minecraft.world.level.Explosion#center()

  • Origin: common
  • Source: net/minecraft/world/level/Explosion.java:39
  • Modifiers: ``
  • Return: Vec3

คืออะไร

ดำเนินการ center ตาม implementation ของ Explosion

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Explosion instance = ...;
Vec3 result = instance.center();

net.minecraft.world.level.Explosion#getBlockInteraction()

  • Origin: common
  • Source: net/minecraft/world/level/Explosion.java:29
  • Modifiers: ``
  • Return: Explosion.BlockInteraction

คืออะไร

อ่านค่า Block Interaction

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Explosion instance = ...;
Explosion.BlockInteraction result = instance.getBlockInteraction();

net.minecraft.world.level.Explosion#getDefaultDamageSource(Level,Entity)

  • Origin: common
  • Source: net/minecraft/world/level/Explosion.java:13
  • Modifiers: static
  • Return: DamageSource

คืออะไร

อ่านค่า Default Damage Source

ทำงานยังไง

เรียกต่อ: damageSources(), explosion(), getIndirectSourceEntity(). คืนค่า: level.damageSources().explosion(entity, getIndirectSourceEntity(entity)).

Parameters

  • Level level
  • Entity entity

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

Level level = ...;
Entity entity = ...;
DamageSource result = Explosion.getDefaultDamageSource(level, entity);

net.minecraft.world.level.Explosion#getDirectSourceEntity()

  • Origin: common
  • Source: net/minecraft/world/level/Explosion.java:34
  • Modifiers: ``
  • Return: Entity

คืออะไร

อ่านค่า Direct Source Entity

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Explosion instance = ...;
Entity result = instance.getDirectSourceEntity();

net.minecraft.world.level.Explosion#getIndirectSourceEntity()

  • Origin: common
  • Source: net/minecraft/world/level/Explosion.java:31
  • Modifiers: ``
  • Return: LivingEntity

คืออะไร

อ่านค่า Indirect Source Entity

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Explosion instance = ...;
LivingEntity result = instance.getIndirectSourceEntity();

net.minecraft.world.level.Explosion#getIndirectSourceEntity(Entity)

  • Origin: common
  • Source: net/minecraft/world/level/Explosion.java:17
  • Modifiers: static
  • Return: LivingEntity

คืออะไร

อ่านค่า Indirect Source Entity

ทำงานยังไง

แยกกรณีด้วย switch. เรียกต่อ: getOwner(). คืนค่า: switch (entity) { case PrimedTnt primedTnt -> primedTnt.getOwner().

Parameters

  • Entity entity

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

Entity entity = ...;
LivingEntity result = Explosion.getIndirectSourceEntity(entity);

net.minecraft.world.level.Explosion#level()

  • Origin: common
  • Source: net/minecraft/world/level/Explosion.java:27
  • Modifiers: ``
  • Return: ServerLevel

คืออะไร

ดำเนินการ level ตาม implementation ของ Explosion

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Explosion instance = ...;
ServerLevel result = instance.level();

net.minecraft.world.level.Explosion#radius()

  • Origin: common
  • Source: net/minecraft/world/level/Explosion.java:37
  • Modifiers: ``
  • Return: float

คืออะไร

ดำเนินการ radius ตาม implementation ของ Explosion

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Explosion instance = ...;
float result = instance.radius();

net.minecraft.world.level.Explosion#shouldAffectBlocklikeEntities()

  • Origin: common
  • Source: net/minecraft/world/level/Explosion.java:43
  • Modifiers: ``
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Affect Blocklike Entities

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Explosion instance = ...;
boolean result = instance.shouldAffectBlocklikeEntities();

ExplosionDamageCalculator

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

net.minecraft.world.level.ExplosionDamageCalculator#getBlockExplosionResistance(Explosion,BlockGetter,BlockPos,BlockState,FluidState)

  • Origin: common
  • Source: net/minecraft/world/level/ExplosionDamageCalculator.java:11
  • Modifiers: public
  • Return: Optional<Float>

คืออะไร

อ่านค่า Block Explosion Resistance

ทำงานยังไง

เรียกต่อ: isAir(), isEmpty(), empty(), of(), max(), getBlock(), getExplosionResistance().

Parameters

  • Explosion explosion
  • BlockGetter blockGetter
  • BlockPos blockPos
  • BlockState blockState
  • FluidState fluidState

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

ExplosionDamageCalculator instance = ...;
Explosion explosion = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
FluidState fluidState = ...;
Optional<Float> result = instance.getBlockExplosionResistance(explosion, blockGetter, blockPos, blockState, fluidState);

net.minecraft.world.level.ExplosionDamageCalculator#getEntityDamageAmount(Explosion,Entity,float)

  • Origin: common
  • Source: net/minecraft/world/level/ExplosionDamageCalculator.java:31
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Entity Damage Amount

ทำงานยังไง

เรียกต่อ: radius(), center(), sqrt(), distanceToSqr(). คืนค่า: (float)((e * e + e) / 2.0 * 7.0 * g + 1.0).

Parameters

  • Explosion explosion
  • Entity entity
  • float f

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

ExplosionDamageCalculator instance = ...;
Explosion explosion = ...;
Entity entity = ...;
float result = instance.getEntityDamageAmount(explosion, entity, 0.0F);

net.minecraft.world.level.ExplosionDamageCalculator#getKnockbackMultiplier(Entity)

  • Origin: common
  • Source: net/minecraft/world/level/ExplosionDamageCalculator.java:27
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Knockback Multiplier

ทำงานยังไง

คืนค่า: 1.0F.

Parameters

  • Entity entity

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

ExplosionDamageCalculator instance = ...;
Entity entity = ...;
float result = instance.getKnockbackMultiplier(entity);

net.minecraft.world.level.ExplosionDamageCalculator#shouldBlockExplode(Explosion,BlockGetter,BlockPos,BlockState,float)

  • Origin: common
  • Source: net/minecraft/world/level/ExplosionDamageCalculator.java:19
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Block Explode

ทำงานยังไง

คืนค่า: true.

Parameters

  • Explosion explosion
  • BlockGetter blockGetter
  • BlockPos blockPos
  • BlockState blockState
  • float f

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

ExplosionDamageCalculator instance = ...;
Explosion explosion = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.shouldBlockExplode(explosion, blockGetter, blockPos, blockState, 0.0F);

net.minecraft.world.level.ExplosionDamageCalculator#shouldDamageEntity(Explosion,Entity)

  • Origin: common
  • Source: net/minecraft/world/level/ExplosionDamageCalculator.java:23
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Damage Entity

ทำงานยังไง

คืนค่า: true.

Parameters

  • Explosion explosion
  • Entity entity

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

ExplosionDamageCalculator instance = ...;
Explosion explosion = ...;
Entity entity = ...;
boolean result = instance.shouldDamageEntity(explosion, entity);

FoliageColor

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

net.minecraft.world.level.FoliageColor#get(double,double)

  • Origin: common
  • Source: net/minecraft/world/level/FoliageColor.java:14
  • Modifiers: public static
  • Return: int

คืออะไร

อ่านค่า get

ทำงานยังไง

คืนค่า: k >= pixels.length ? -12012264 : pixels[k].

Parameters

  • double d
  • double e

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

int result = FoliageColor.get(0.0D, 0.0D);

net.minecraft.world.level.FoliageColor#init(int[])

  • Origin: common
  • Source: net/minecraft/world/level/FoliageColor.java:10
  • Modifiers: public static
  • Return: void

คืออะไร

ดำเนินการ init ตาม implementation ของ FoliageColor

ทำงานยังไง

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

Parameters

  • int[] is

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

int[] is = ...;
FoliageColor.init(is);

ForcedChunksSavedData

  • Full name: net.minecraft.world.level.ForcedChunksSavedData
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/ForcedChunksSavedData.java
  • Type: class
  • Modifiers: public
  • Extends: SavedData

net.minecraft.world.level.ForcedChunksSavedData#factory()

  • Origin: common
  • Source: net/minecraft/world/level/ForcedChunksSavedData.java:15
  • Modifiers: public static
  • Return: SavedData.Factory<ForcedChunksSavedData>

คืออะไร

ดำเนินการ factory ตาม implementation ของ ForcedChunksSavedData

ทำงานยังไง

สร้างออบเจ็กต์: SavedData.Factory<>. คืนค่า: new SavedData.Factory<>(ForcedChunksSavedData::new, ForcedChunksSavedData::load, DataFixTypes.SAVED_DATA_FORCED_CHUNKS).

Parameters

  • ไม่มี

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

SavedData.Factory<ForcedChunksSavedData> result = ForcedChunksSavedData.factory();

net.minecraft.world.level.ForcedChunksSavedData#ForcedChunksSavedData()

  • Origin: common
  • Source: net/minecraft/world/level/ForcedChunksSavedData.java:23
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

สร้างออบเจ็กต์: LongOpenHashSet.

Parameters

  • ไม่มี

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

ForcedChunksSavedData instance = new ForcedChunksSavedData();

net.minecraft.world.level.ForcedChunksSavedData#getChunks()

  • Origin: common
  • Source: net/minecraft/world/level/ForcedChunksSavedData.java:37
  • Modifiers: public
  • Return: LongSet

คืออะไร

อ่านค่า Chunks

ทำงานยังไง

คืนค่า: this.chunks.

Parameters

  • ไม่มี

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

ForcedChunksSavedData instance = ...;
LongSet result = instance.getChunks();

net.minecraft.world.level.ForcedChunksSavedData#load(CompoundTag,HolderLookup.Provider)

  • Origin: common
  • Source: net/minecraft/world/level/ForcedChunksSavedData.java:27
  • Modifiers: public static
  • Return: ForcedChunksSavedData

คืออะไร

โหลด load

ทำงานยังไง

เรียกต่อ: getLongArray(). สร้างออบเจ็กต์: ForcedChunksSavedData, LongOpenHashSet. คืนค่า: new ForcedChunksSavedData(new LongOpenHashSet(compoundTag.getLongArray("Forced"))).

Parameters

  • CompoundTag compoundTag
  • HolderLookup.Provider provider

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

CompoundTag compoundTag = ...;
HolderLookup.Provider provider = ...;
ForcedChunksSavedData result = ForcedChunksSavedData.load(compoundTag, provider);

net.minecraft.world.level.ForcedChunksSavedData#save(CompoundTag,HolderLookup.Provider)

  • Origin: common
  • Source: net/minecraft/world/level/ForcedChunksSavedData.java:31
  • Modifiers: public
  • Return: CompoundTag

คืออะไร

บันทึก save

ทำงานยังไง

เรียกต่อ: putLongArray(), toLongArray(). คืนค่า: compoundTag.

Parameters

  • CompoundTag compoundTag
  • HolderLookup.Provider provider

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

ForcedChunksSavedData instance = ...;
CompoundTag compoundTag = ...;
HolderLookup.Provider provider = ...;
CompoundTag result = instance.save(compoundTag, provider);

GameRules

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

net.minecraft.world.level.GameRules#assignFrom(GameRules,MinecraftServer)

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:289
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ assignFrom ตาม implementation ของ GameRules

ทำงานยังไง

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

Parameters

  • GameRules gameRules
  • MinecraftServer minecraftServer

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

GameRules instance = ...;
GameRules gameRules = ...;
MinecraftServer minecraftServer = ...;
instance.assignFrom(gameRules, minecraftServer);

net.minecraft.world.level.GameRules#copy(FeatureFlagSet)

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

คืออะไร

คัดลอก copy

ทำงานยังไง

เรียกต่อ: availableRules(), collect(), toImmutableMap(), containsKey(), getKey(), get(), getValue(), createRule(). สร้างออบเจ็กต์: GameRules.

Parameters

  • FeatureFlagSet featureFlagSet

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

GameRules instance = ...;
FeatureFlagSet featureFlagSet = ...;
GameRules result = instance.copy(featureFlagSet);

net.minecraft.world.level.GameRules#createTag()

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:254
  • Modifiers: public
  • Return: CompoundTag

คืออะไร

สร้าง Tag

ทำงานยังไง

เรียกต่อ: forEach(), putString(), serialize(). สร้างออบเจ็กต์: CompoundTag. คืนค่า: compoundTag.

Parameters

  • ไม่มี

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

GameRules instance = ...;
CompoundTag result = instance.createTag();

net.minecraft.world.level.GameRules#GameRules(FeatureFlagSet)

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:232
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

เรียกต่อ: availableRules(), collect(), toImmutableMap(), getValue(), createRule().

Parameters

  • FeatureFlagSet featureFlagSet

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

FeatureFlagSet featureFlagSet = ...;
GameRules instance = new GameRules(featureFlagSet);

net.minecraft.world.level.GameRules#GameRules(FeatureFlagSet,DynamicLike<?>)

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:227
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • FeatureFlagSet featureFlagSet
  • DynamicLike<?> dynamicLike

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

FeatureFlagSet featureFlagSet = ...;
DynamicLike<?> dynamicLike = ...;
GameRules instance = new GameRules(featureFlagSet, dynamicLike);

net.minecraft.world.level.GameRules#getBoolean(GameRules.Key<GameRules.BooleanValue>)

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:298
  • Modifiers: public
  • Return: boolean

คืออะไร

อ่านค่า Boolean

ทำงานยังไง

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

Parameters

  • GameRules.Key<GameRules.BooleanValue> key

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

GameRules instance = ...;
GameRules.Key<GameRules.BooleanValue> key = ...;
boolean result = instance.getBoolean(key);

net.minecraft.world.level.GameRules#getInt(GameRules.Key<GameRules.IntegerValue>)

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:302
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Int

ทำงานยังไง

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

Parameters

  • GameRules.Key<GameRules.IntegerValue> key

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

GameRules instance = ...;
GameRules.Key<GameRules.IntegerValue> key = ...;
int result = instance.getInt(key);

net.minecraft.world.level.GameRules#getRule(GameRules.Key<T>)

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:245
  • Modifiers: public
  • Return: T

คืออะไร

อ่านค่า Rule

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: get(). สร้างออบเจ็กต์: IllegalArgumentException. คืนค่า: value.

Parameters

  • GameRules.Key<T> key

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

GameRules instance = ...;
GameRules.Key<T> key = ...;
T result = instance.getRule(key);

net.minecraft.world.level.GameRules#visitGameRuleTypes(GameRules.GameRuleTypeVisitor)

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:276
  • Modifiers: public
  • Return: void

คืออะไร

เยี่ยมชม node Game Rule Types

ทำงานยังไง

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

Parameters

  • GameRules.GameRuleTypeVisitor gameRuleTypeVisitor

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

GameRules instance = ...;
GameRules.GameRuleTypeVisitor gameRuleTypeVisitor = ...;
instance.visitGameRuleTypes(gameRuleTypeVisitor);

GameRules$BooleanValue

  • Full name: net.minecraft.world.level.GameRules$BooleanValue
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/GameRules.java
  • Type: class
  • Modifiers: public static
  • Extends: GameRules.Value<GameRules.BooleanValue>

net.minecraft.world.level.GameRules$BooleanValue#BooleanValue(GameRules.Type<GameRules.BooleanValue>,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:319
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: value.

Parameters

  • GameRules.Type<GameRules.BooleanValue> type
  • boolean bl

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

GameRules.Type<GameRules.BooleanValue> type = ...;
GameRules.BooleanValue instance = new GameRules.BooleanValue(type, true);

net.minecraft.world.level.GameRules$BooleanValue#copy()

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:357
  • Modifiers: protected
  • Return: GameRules.BooleanValue

คืออะไร

คัดลอก copy

ทำงานยังไง

เรียกต่อ: BooleanValue(). สร้างออบเจ็กต์: GameRules.BooleanValue. คืนค่า: new GameRules.BooleanValue(this.type, this.value).

Parameters

  • ไม่มี

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

@Override
protected GameRules.BooleanValue copy() {
    return super.copy();
}

net.minecraft.world.level.GameRules$BooleanValue#deserialize(String)

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:343
  • Modifiers: protected
  • Return: void

คืออะไร

สร้างออบเจ็กต์กลับจากข้อมูล deserialize

ทำงานยังไง

แก้ state: value. เรียกต่อ: parseBoolean().

Parameters

  • String string

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

@Override
protected void deserialize(String string) {
    super.deserialize(string);
}

net.minecraft.world.level.GameRules$BooleanValue#get()

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:329
  • Modifiers: public
  • Return: boolean

คืออะไร

อ่านค่า get

ทำงานยังไง

คืนค่า: this.value.

Parameters

  • ไม่มี

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

GameRules.BooleanValue instance = ...;
boolean result = instance.get();

net.minecraft.world.level.GameRules$BooleanValue#getCommandResult()

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:348
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Command Result

ทำงานยังไง

คืนค่า: this.value ? 1 : 0.

Parameters

  • ไม่มี

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

GameRules.BooleanValue instance = ...;
int result = instance.getCommandResult();

net.minecraft.world.level.GameRules$BooleanValue#getSelf()

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:353
  • Modifiers: protected
  • Return: GameRules.BooleanValue

คืออะไร

อ่านค่า Self

ทำงานยังไง

คืนค่า: this.

Parameters

  • ไม่มี

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

@Override
protected GameRules.BooleanValue getSelf() {
    return super.getSelf();
}

net.minecraft.world.level.GameRules$BooleanValue#serialize()

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:338
  • Modifiers: public
  • Return: String

คืออะไร

แปลงเป็นข้อมูลสำหรับบันทึก/ส่ง serialize

ทำงานยังไง

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

Parameters

  • ไม่มี

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

GameRules.BooleanValue instance = ...;
String result = instance.serialize();

net.minecraft.world.level.GameRules$BooleanValue#set(boolean,MinecraftServer)

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:333
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า set

ทำงานยังไง

แก้ state: value. เรียกต่อ: onChanged().

Parameters

  • boolean bl
  • MinecraftServer minecraftServer

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

GameRules.BooleanValue instance = ...;
MinecraftServer minecraftServer = ...;
instance.set(true, minecraftServer);

net.minecraft.world.level.GameRules$BooleanValue#setFrom(GameRules.BooleanValue,MinecraftServer)

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:361
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า From

ทำงานยังไง

แก้ state: value. เรียกต่อ: onChanged().

Parameters

  • GameRules.BooleanValue booleanValue
  • MinecraftServer minecraftServer

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

GameRules.BooleanValue instance = ...;
GameRules.BooleanValue booleanValue = ...;
MinecraftServer minecraftServer = ...;
instance.setFrom(booleanValue, minecraftServer);

net.minecraft.world.level.GameRules$BooleanValue#updateFromArgument(CommandContext<CommandSourceStack>,String)

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:324
  • Modifiers: protected
  • Return: void

คืออะไร

อัปเดต From Argument

ทำงานยังไง

แก้ state: value. เรียกต่อ: getBool().

Parameters

  • CommandContext<CommandSourceStack> commandContext
  • String string

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

CommandContext<CommandSourceStack> commandContext = ...;
@Override
protected void updateFromArgument(CommandContext<CommandSourceStack> commandContext, String string) {
    super.updateFromArgument(commandContext, string);
}

GameRules$Category

  • Full name: net.minecraft.world.level.GameRules$Category
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/GameRules.java
  • Type: enum
  • Modifiers: public

net.minecraft.world.level.GameRules$Category#getDescriptionId()

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:382
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Description Id

ทำงานยังไง

คืนค่า: this.descriptionId.

Parameters

  • ไม่มี

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

GameRules.Category instance = ...;
String result = instance.getDescriptionId();

GameRules$GameRuleTypeVisitor

  • Full name: net.minecraft.world.level.GameRules$GameRuleTypeVisitor
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/GameRules.java
  • Type: interface
  • Modifiers: public

net.minecraft.world.level.GameRules$GameRuleTypeVisitor#visit(GameRules.Key<T>,GameRules.Type<T>)

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:388
  • Modifiers: default
  • Return: void

คืออะไร

เยี่ยมชม node visit

ทำงานยังไง

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

Parameters

  • GameRules.Key<T> key
  • GameRules.Type<T> type

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

GameRules.GameRuleTypeVisitor instance = ...;
GameRules.Key<T> key = ...;
GameRules.Type<T> type = ...;
instance.visit(key, type);

net.minecraft.world.level.GameRules$GameRuleTypeVisitor#visitBoolean(GameRules.Key<GameRules.BooleanValue>,GameRules.Type<GameRules.BooleanValue>)

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:391
  • Modifiers: default
  • Return: void

คืออะไร

เยี่ยมชม node Boolean

ทำงานยังไง

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

Parameters

  • GameRules.Key<GameRules.BooleanValue> key
  • GameRules.Type<GameRules.BooleanValue> type

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

GameRules.GameRuleTypeVisitor instance = ...;
GameRules.Key<GameRules.BooleanValue> key = ...;
GameRules.Type<GameRules.BooleanValue> type = ...;
instance.visitBoolean(key, type);

net.minecraft.world.level.GameRules$GameRuleTypeVisitor#visitInteger(GameRules.Key<GameRules.IntegerValue>,GameRules.Type<GameRules.IntegerValue>)

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:394
  • Modifiers: default
  • Return: void

คืออะไร

เยี่ยมชม node Integer

ทำงานยังไง

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

Parameters

  • GameRules.Key<GameRules.IntegerValue> key
  • GameRules.Type<GameRules.IntegerValue> type

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

GameRules.GameRuleTypeVisitor instance = ...;
GameRules.Key<GameRules.IntegerValue> key = ...;
GameRules.Type<GameRules.IntegerValue> type = ...;
instance.visitInteger(key, type);

GameRules$IntegerValue

  • Full name: net.minecraft.world.level.GameRules$IntegerValue
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/GameRules.java
  • Type: class
  • Modifiers: public static
  • Extends: GameRules.Value<GameRules.IntegerValue>

net.minecraft.world.level.GameRules$IntegerValue#copy()

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:483
  • Modifiers: protected
  • Return: GameRules.IntegerValue

คืออะไร

คัดลอก copy

ทำงานยังไง

เรียกต่อ: IntegerValue(). สร้างออบเจ็กต์: GameRules.IntegerValue. คืนค่า: new GameRules.IntegerValue(this.type, this.value).

Parameters

  • ไม่มี

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

@Override
protected GameRules.IntegerValue copy() {
    return super.copy();
}

net.minecraft.world.level.GameRules$IntegerValue#deserialize(String)

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:447
  • Modifiers: protected
  • Return: void

คืออะไร

สร้างออบเจ็กต์กลับจากข้อมูล deserialize

ทำงานยังไง

แก้ state: value. เรียกต่อ: safeParse().

Parameters

  • String string

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

@Override
protected void deserialize(String string) {
    super.deserialize(string);
}

net.minecraft.world.level.GameRules$IntegerValue#get()

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:433
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า get

ทำงานยังไง

คืนค่า: this.value.

Parameters

  • ไม่มี

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

GameRules.IntegerValue instance = ...;
int result = instance.get();

net.minecraft.world.level.GameRules$IntegerValue#getCommandResult()

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:474
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Command Result

ทำงานยังไง

คืนค่า: this.value.

Parameters

  • ไม่มี

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

GameRules.IntegerValue instance = ...;
int result = instance.getCommandResult();

net.minecraft.world.level.GameRules$IntegerValue#getSelf()

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:479
  • Modifiers: protected
  • Return: GameRules.IntegerValue

คืออะไร

อ่านค่า Self

ทำงานยังไง

คืนค่า: this.

Parameters

  • ไม่มี

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

@Override
protected GameRules.IntegerValue getSelf() {
    return super.getSelf();
}

net.minecraft.world.level.GameRules$IntegerValue#IntegerValue(GameRules.Type<GameRules.IntegerValue>,int)

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:423
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: value.

Parameters

  • GameRules.Type<GameRules.IntegerValue> type
  • int i

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

GameRules.Type<GameRules.IntegerValue> type = ...;
GameRules.IntegerValue instance = new GameRules.IntegerValue(type, 0);

net.minecraft.world.level.GameRules$IntegerValue#serialize()

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:442
  • Modifiers: public
  • Return: String

คืออะไร

แปลงเป็นข้อมูลสำหรับบันทึก/ส่ง serialize

ทำงานยังไง

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

Parameters

  • ไม่มี

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

GameRules.IntegerValue instance = ...;
String result = instance.serialize();

net.minecraft.world.level.GameRules$IntegerValue#set(int,MinecraftServer)

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:437
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า set

ทำงานยังไง

แก้ state: value. เรียกต่อ: onChanged().

Parameters

  • int i
  • MinecraftServer minecraftServer

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

GameRules.IntegerValue instance = ...;
MinecraftServer minecraftServer = ...;
instance.set(0, minecraftServer);

net.minecraft.world.level.GameRules$IntegerValue#setFrom(GameRules.IntegerValue,MinecraftServer)

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:487
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า From

ทำงานยังไง

แก้ state: value. เรียกต่อ: onChanged().

Parameters

  • GameRules.IntegerValue integerValue
  • MinecraftServer minecraftServer

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

GameRules.IntegerValue instance = ...;
GameRules.IntegerValue integerValue = ...;
MinecraftServer minecraftServer = ...;
instance.setFrom(integerValue, minecraftServer);

net.minecraft.world.level.GameRules$IntegerValue#tryDeserialize(String)

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:452
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ tryDeserialize ตาม implementation ของ GameRules$IntegerValue

ทำงานยังไง

มีการจัดการ exception. แก้ state: value. เรียกต่อ: get(), parse(), canRead(). สร้างออบเจ็กต์: StringReader. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • String string

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

GameRules.IntegerValue instance = ...;
boolean result = instance.tryDeserialize("value");

net.minecraft.world.level.GameRules$IntegerValue#updateFromArgument(CommandContext<CommandSourceStack>,String)

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:428
  • Modifiers: protected
  • Return: void

คืออะไร

อัปเดต From Argument

ทำงานยังไง

แก้ state: value. เรียกต่อ: getInteger().

Parameters

  • CommandContext<CommandSourceStack> commandContext
  • String string

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

CommandContext<CommandSourceStack> commandContext = ...;
@Override
protected void updateFromArgument(CommandContext<CommandSourceStack> commandContext, String string) {
    super.updateFromArgument(commandContext, string);
}

GameRules$Key

  • Full name: net.minecraft.world.level.GameRules$Key
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/GameRules.java
  • Type: class
  • Modifiers: public static final

net.minecraft.world.level.GameRules$Key#equals(Object)

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:507
  • Modifiers: public
  • Return: boolean

คืออะไร

เปรียบเทียบความเท่ากัน equals

ทำงานยังไง

คืนค่า: this == object ? true : object instanceof GameRules.Key && ((GameRules.Key)object).id.equals(this.id).

Parameters

  • Object object

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

GameRules.Key instance = ...;
Object object = ...;
boolean result = instance.equals(object);

net.minecraft.world.level.GameRules$Key#getCategory()

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:525
  • Modifiers: public
  • Return: GameRules.Category

คืออะไร

อ่านค่า Category

ทำงานยังไง

คืนค่า: this.category.

Parameters

  • ไม่มี

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

GameRules.Key instance = ...;
GameRules.Category result = instance.getCategory();

net.minecraft.world.level.GameRules$Key#getDescriptionId()

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:521
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Description Id

ทำงานยังไง

คืนค่า: "gamerule." + this.id.

Parameters

  • ไม่มี

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

GameRules.Key instance = ...;
String result = instance.getDescriptionId();

net.minecraft.world.level.GameRules$Key#getId()

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:517
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Id

ทำงานยังไง

คืนค่า: this.id.

Parameters

  • ไม่มี

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

GameRules.Key instance = ...;
String result = instance.getId();

net.minecraft.world.level.GameRules$Key#hashCode()

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:512
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ hashCode ตาม implementation ของ GameRules$Key

ทำงานยังไง

คืนค่า: this.id.hashCode().

Parameters

  • ไม่มี

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

GameRules.Key instance = ...;
int result = instance.hashCode();

net.minecraft.world.level.GameRules$Key#Key(String,GameRules.Category)

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:497
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: id, category.

Parameters

  • String string
  • GameRules.Category category

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

GameRules.Category category = ...;
GameRules.Key instance = new GameRules.Key("value", category);

net.minecraft.world.level.GameRules$Key#toString()

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:502
  • Modifiers: public
  • Return: String

คืออะไร

ดำเนินการ toString ตาม implementation ของ GameRules$Key

ทำงานยังไง

คืนค่า: this.id.

Parameters

  • ไม่มี

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

GameRules.Key instance = ...;
String result = instance.toString();

GameRules$Type

  • Full name: net.minecraft.world.level.GameRules$Type
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/GameRules.java
  • Type: class
  • Modifiers: public static

net.minecraft.world.level.GameRules$Type#callVisitor(GameRules.GameRuleTypeVisitor,GameRules.Key<T>)

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:559
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ callVisitor ตาม implementation ของ GameRules$Type

ทำงานยังไง

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

Parameters

  • GameRules.GameRuleTypeVisitor gameRuleTypeVisitor
  • GameRules.Key<T> key

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

GameRules.Type instance = ...;
GameRules.GameRuleTypeVisitor gameRuleTypeVisitor = ...;
GameRules.Key<T> key = ...;
instance.callVisitor(gameRuleTypeVisitor, key);

net.minecraft.world.level.GameRules$Type#createArgument(String)

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:551
  • Modifiers: public
  • Return: RequiredArgumentBuilder<CommandSourceStack, ?>

คืออะไร

สร้าง Argument

ทำงานยังไง

เรียกต่อ: argument(), get(). คืนค่า: Commands.argument(string, this.argument.get()).

Parameters

  • String string

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

GameRules.Type instance = ...;
RequiredArgumentBuilder<CommandSourceStack, ?> result = instance.createArgument("value");

net.minecraft.world.level.GameRules$Type#createRule()

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:555
  • Modifiers: public
  • Return: T

คืออะไร

สร้าง Rule

ทำงานยังไง

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

Parameters

  • ไม่มี

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

GameRules.Type instance = ...;
T result = instance.createRule();

net.minecraft.world.level.GameRules$Type#requiredFeatures()

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:563
  • Modifiers: public
  • Return: FeatureFlagSet

คืออะไร

ดำเนินการ requiredFeatures ตาม implementation ของ GameRules$Type

ทำงานยังไง

คืนค่า: this.requiredFeatures.

Parameters

  • ไม่มี

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

GameRules.Type instance = ...;
FeatureFlagSet result = instance.requiredFeatures();

GameRules$Value

  • Full name: net.minecraft.world.level.GameRules$Value
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/GameRules.java
  • Type: class
  • Modifiers: public abstract static

net.minecraft.world.level.GameRules$Value#copy()

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:601
  • Modifiers: protected abstract
  • Return: T

คืออะไร

คัดลอก copy

ทำงานยังไง

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

Parameters

  • ไม่มี

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

@Override
protected T copy() {
    return super.copy();
}

net.minecraft.world.level.GameRules$Value#deserialize(String)

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:588
  • Modifiers: protected abstract
  • Return: void

คืออะไร

สร้างออบเจ็กต์กลับจากข้อมูล deserialize

ทำงานยังไง

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

Parameters

  • String string

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

@Override
protected void deserialize(String string) {
    super.deserialize(string);
}

net.minecraft.world.level.GameRules$Value#getCommandResult()

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:597
  • Modifiers: public abstract
  • Return: int

คืออะไร

อ่านค่า Command Result

ทำงานยังไง

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

Parameters

  • ไม่มี

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

GameRules.Value instance = ...;
int result = instance.getCommandResult();

net.minecraft.world.level.GameRules$Value#getSelf()

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:599
  • Modifiers: protected abstract
  • Return: T

คืออะไร

อ่านค่า Self

ทำงานยังไง

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

Parameters

  • ไม่มี

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

@Override
protected T getSelf() {
    return super.getSelf();
}

net.minecraft.world.level.GameRules$Value#onChanged(MinecraftServer)

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:582
  • Modifiers: protected
  • Return: void

คืออะไร

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

ทำงานยังไง

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

Parameters

  • MinecraftServer minecraftServer

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

MinecraftServer minecraftServer = ...;
@Override
protected void onChanged(MinecraftServer minecraftServer) {
    super.onChanged(minecraftServer);
}

net.minecraft.world.level.GameRules$Value#serialize()

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:590
  • Modifiers: public abstract
  • Return: String

คืออะไร

แปลงเป็นข้อมูลสำหรับบันทึก/ส่ง serialize

ทำงานยังไง

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

Parameters

  • ไม่มี

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

GameRules.Value instance = ...;
String result = instance.serialize();

net.minecraft.world.level.GameRules$Value#setFrom(T,MinecraftServer)

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:603
  • Modifiers: public abstract
  • Return: void

คืออะไร

กำหนดค่า From

ทำงานยังไง

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

Parameters

  • T value
  • MinecraftServer minecraftServer

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

GameRules.Value instance = ...;
T value = ...;
MinecraftServer minecraftServer = ...;
instance.setFrom(value, minecraftServer);

net.minecraft.world.level.GameRules$Value#setFromArgument(CommandContext<CommandSourceStack>,String)

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:577
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า From Argument

ทำงานยังไง

เรียกต่อ: updateFromArgument(), onChanged(), getSource(), getServer().

Parameters

  • CommandContext<CommandSourceStack> commandContext
  • String string

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

GameRules.Value instance = ...;
CommandContext<CommandSourceStack> commandContext = ...;
instance.setFromArgument(commandContext, "value");

net.minecraft.world.level.GameRules$Value#toString()

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:592
  • Modifiers: public
  • Return: String

คืออะไร

ดำเนินการ toString ตาม implementation ของ GameRules$Value

ทำงานยังไง

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

Parameters

  • ไม่มี

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

GameRules.Value instance = ...;
String result = instance.toString();

net.minecraft.world.level.GameRules$Value#updateFromArgument(CommandContext<CommandSourceStack>,String)

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:575
  • Modifiers: protected abstract
  • Return: void

คืออะไร

อัปเดต From Argument

ทำงานยังไง

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

Parameters

  • CommandContext<CommandSourceStack> commandContext
  • String string

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

CommandContext<CommandSourceStack> commandContext = ...;
@Override
protected void updateFromArgument(CommandContext<CommandSourceStack> commandContext, String string) {
    super.updateFromArgument(commandContext, string);
}

net.minecraft.world.level.GameRules$Value#Value(GameRules.Type<T>)

  • Origin: common
  • Source: net/minecraft/world/level/GameRules.java:571
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: type.

Parameters

  • GameRules.Type<T> type

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

GameRules.Type<T> type = ...;
GameRules.Value instance = new GameRules.Value(type);

GameType

  • Full name: net.minecraft.world.level.GameType
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/GameType.java
  • Type: enum
  • Modifiers: public
  • Implements: StringRepresentable

net.minecraft.world.level.GameType#byId(int)

  • Origin: common
  • Source: net/minecraft/world/level/GameType.java:87
  • Modifiers: public static
  • Return: GameType

คืออะไร

ดำเนินการ byId ตาม implementation ของ GameType

ทำงานยังไง

เรียกต่อ: apply(). คืนค่า: BY_ID.apply(i).

Parameters

  • int i

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

GameType result = GameType.byId(0);

net.minecraft.world.level.GameType#byName(String)

  • Origin: common
  • Source: net/minecraft/world/level/GameType.java:91
  • Modifiers: public static
  • Return: GameType

คืออะไร

ดำเนินการ byName ตาม implementation ของ GameType

ทำงานยังไง

คืนค่า: byName(string, SURVIVAL).

Parameters

  • String string

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

GameType result = GameType.byName("value");

net.minecraft.world.level.GameType#byName(String,GameType)

  • Origin: common
  • Source: net/minecraft/world/level/GameType.java:95
  • Modifiers: public static
  • Return: GameType

คืออะไร

ดำเนินการ byName ตาม implementation ของ GameType

ทำงานยังไง

คืนค่า: gameType2 != null ? gameType2 : gameType.

Parameters

  • String string
  • GameType gameType

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

GameType gameType = ...;
GameType result = GameType.byName("value", gameType);

net.minecraft.world.level.GameType#byNullableId(int)

  • Origin: common
  • Source: net/minecraft/world/level/GameType.java:106
  • Modifiers: public static
  • Return: GameType

คืออะไร

ดำเนินการ byNullableId ตาม implementation ของ GameType

ทำงานยังไง

เรียกต่อ: byId(). คืนค่า: i == -1 ? null : byId(i).

Parameters

  • int i

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

GameType result = GameType.byNullableId(0);

net.minecraft.world.level.GameType#getId()

  • Origin: common
  • Source: net/minecraft/world/level/GameType.java:34
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Id

ทำงานยังไง

คืนค่า: this.id.

Parameters

  • ไม่มี

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

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

net.minecraft.world.level.GameType#getLongDisplayName()

  • Origin: common
  • Source: net/minecraft/world/level/GameType.java:47
  • Modifiers: public
  • Return: Component

คืออะไร

อ่านค่า Long Display Name

ทำงานยังไง

คืนค่า: this.longName.

Parameters

  • ไม่มี

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

GameType instance = ...;
Component result = instance.getLongDisplayName();

net.minecraft.world.level.GameType#getName()

  • Origin: common
  • Source: net/minecraft/world/level/GameType.java:38
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Name

ทำงานยังไง

คืนค่า: this.name.

Parameters

  • ไม่มี

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

GameType instance = ...;
String result = instance.getName();

net.minecraft.world.level.GameType#getNullableId(GameType)

  • Origin: common
  • Source: net/minecraft/world/level/GameType.java:102
  • Modifiers: public static
  • Return: int

คืออะไร

อ่านค่า Nullable Id

ทำงานยังไง

คืนค่า: gameType != null ? gameType.id : -1.

Parameters

  • GameType gameType

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

GameType gameType = ...;
int result = GameType.getNullableId(gameType);

net.minecraft.world.level.GameType#getSerializedName()

  • Origin: common
  • Source: net/minecraft/world/level/GameType.java:42
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Serialized Name

ทำงานยังไง

คืนค่า: this.name.

Parameters

  • ไม่มี

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

GameType instance = ...;
String result = instance.getSerializedName();

net.minecraft.world.level.GameType#getShortDisplayName()

  • Origin: common
  • Source: net/minecraft/world/level/GameType.java:51
  • Modifiers: public
  • Return: Component

คืออะไร

อ่านค่า Short Display Name

ทำงานยังไง

คืนค่า: this.shortName.

Parameters

  • ไม่มี

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

GameType instance = ...;
Component result = instance.getShortDisplayName();

net.minecraft.world.level.GameType#isBlockPlacingRestricted()

  • Origin: common
  • Source: net/minecraft/world/level/GameType.java:75
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Block Placing Restricted

ทำงานยังไง

คืนค่า: this == ADVENTURE || this == SPECTATOR.

Parameters

  • ไม่มี

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

GameType instance = ...;
boolean result = instance.isBlockPlacingRestricted();

net.minecraft.world.level.GameType#isCreative()

  • Origin: common
  • Source: net/minecraft/world/level/GameType.java:79
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: this == CREATIVE.

Parameters

  • ไม่มี

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

GameType instance = ...;
boolean result = instance.isCreative();

net.minecraft.world.level.GameType#isSurvival()

  • Origin: common
  • Source: net/minecraft/world/level/GameType.java:83
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: this == SURVIVAL || this == ADVENTURE.

Parameters

  • ไม่มี

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

GameType instance = ...;
boolean result = instance.isSurvival();

net.minecraft.world.level.GameType#isValidId(int)

  • Origin: common
  • Source: net/minecraft/world/level/GameType.java:111
  • Modifiers: public static
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Valid Id

ทำงานยังไง

เรียกต่อ: stream(), values(), anyMatch(). คืนค่า: Arrays.stream(values()).anyMatch(gameType -> gameType.id == i).

Parameters

  • int i

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

boolean result = GameType.isValidId(0);

net.minecraft.world.level.GameType#updatePlayerAbilities(Abilities)

  • Origin: common
  • Source: net/minecraft/world/level/GameType.java:55
  • Modifiers: public
  • Return: void

คืออะไร

อัปเดต Player Abilities

ทำงานยังไง

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

Parameters

  • Abilities abilities

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

GameType instance = ...;
Abilities abilities = ...;
instance.updatePlayerAbilities(abilities);

GrassColor

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

net.minecraft.world.level.GrassColor#get(double,double)

  • Origin: common
  • Source: net/minecraft/world/level/GrassColor.java:10
  • Modifiers: public static
  • Return: int

คืออะไร

อ่านค่า get

ทำงานยังไง

คืนค่า: k >= pixels.length ? -65281 : pixels[k].

Parameters

  • double d
  • double e

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

int result = GrassColor.get(0.0D, 0.0D);

net.minecraft.world.level.GrassColor#getDefaultColor()

  • Origin: common
  • Source: net/minecraft/world/level/GrassColor.java:18
  • Modifiers: public static
  • Return: int

คืออะไร

อ่านค่า Default Color

ทำงานยังไง

เรียกต่อ: get(). คืนค่า: get(0.5, 1.0).

Parameters

  • ไม่มี

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

int result = GrassColor.getDefaultColor();

net.minecraft.world.level.GrassColor#init(int[])

  • Origin: common
  • Source: net/minecraft/world/level/GrassColor.java:6
  • Modifiers: public static
  • Return: void

คืออะไร

ดำเนินการ init ตาม implementation ของ GrassColor

ทำงานยังไง

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

Parameters

  • int[] is

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

int[] is = ...;
GrassColor.init(is);

ItemLike

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

net.minecraft.world.level.ItemLike#asItem()

  • Origin: common
  • Source: net/minecraft/world/level/ItemLike.java:6
  • Modifiers: ``
  • Return: Item

คืออะไร

ดำเนินการ asItem ตาม implementation ของ ItemLike

ทำงานยังไง

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

Parameters

  • ไม่มี

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

ItemLike instance = ...;
Item result = instance.asItem();

Level

  • Full name: net.minecraft.world.level.Level
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/Level.java
  • Type: class
  • Modifiers: public abstract
  • Implements: LevelAccessor,AutoCloseable,AttachmentTarget

net.minecraft.world.level.Level#addAlwaysVisibleParticle(ParticleOptions,boolean,double,double,double,double,double,double)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:433
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Always Visible Particle

ทำงานยังไง

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

Parameters

  • ParticleOptions particleOptions
  • boolean bl
  • double d
  • double e
  • double f
  • double g
  • double h
  • double i

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

Level instance = ...;
ParticleOptions particleOptions = ...;
instance.addAlwaysVisibleParticle(particleOptions, true, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);

net.minecraft.world.level.Level#addAlwaysVisibleParticle(ParticleOptions,double,double,double,double,double,double)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:430
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Always Visible Particle

ทำงานยังไง

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

Parameters

  • ParticleOptions particleOptions
  • double d
  • double e
  • double f
  • double g
  • double h
  • double i

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

Level instance = ...;
ParticleOptions particleOptions = ...;
instance.addAlwaysVisibleParticle(particleOptions, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);

net.minecraft.world.level.Level#addBlockEntityTicker(TickingBlockEntity)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:441
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Block Entity Ticker

ทำงานยังไง

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

Parameters

  • TickingBlockEntity tickingBlockEntity

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

Level instance = ...;
TickingBlockEntity tickingBlockEntity = ...;
instance.addBlockEntityTicker(tickingBlockEntity);

net.minecraft.world.level.Level#addDestroyBlockEffect(BlockPos,BlockState)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:297
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Destroy Block Effect

ทำงานยังไง

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

Parameters

  • BlockPos blockPos
  • BlockState blockState

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

Level instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
instance.addDestroyBlockEffect(blockPos, blockState);

net.minecraft.world.level.Level#addParticle(ParticleOptions,boolean,boolean,double,double,double,double,double,double)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:427
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Particle

ทำงานยังไง

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

Parameters

  • ParticleOptions particleOptions
  • boolean bl
  • boolean bl2
  • double d
  • double e
  • double f
  • double g
  • double h
  • double i

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

Level instance = ...;
ParticleOptions particleOptions = ...;
instance.addParticle(particleOptions, true, true, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);

net.minecraft.world.level.Level#addParticle(ParticleOptions,double,double,double,double,double,double)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:423
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Particle

ทำงานยังไง

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

Parameters

  • ParticleOptions particleOptions
  • double d
  • double e
  • double f
  • double g
  • double h
  • double i

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

Level instance = ...;
ParticleOptions particleOptions = ...;
instance.addParticle(particleOptions, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);

net.minecraft.world.level.Level#blockEntityChanged(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:751
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ blockEntityChanged ตาม implementation ของ Level

ทำงานยังไง

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

Parameters

  • BlockPos blockPos

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

Level instance = ...;
BlockPos blockPos = ...;
instance.blockEntityChanged(blockPos);

net.minecraft.world.level.Level#blockEvent(BlockPos,Block,int,int)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:778
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ blockEvent ตาม implementation ของ Level

ทำงานยังไง

เรียกต่อ: getBlockState(), triggerEvent().

Parameters

  • BlockPos blockPos
  • Block block
  • int i
  • int j

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

Level instance = ...;
BlockPos blockPos = ...;
Block block = ...;
instance.blockEvent(blockPos, block, 0, 0);

net.minecraft.world.level.Level#broadcastDamageEvent(Entity,DamageSource)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:775
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ broadcastDamageEvent ตาม implementation ของ Level

ทำงานยังไง

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

Parameters

  • Entity entity
  • DamageSource damageSource

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

Level instance = ...;
Entity entity = ...;
DamageSource damageSource = ...;
instance.broadcastDamageEvent(entity, damageSource);

net.minecraft.world.level.Level#broadcastEntityEvent(Entity,byte)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:772
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ broadcastEntityEvent ตาม implementation ของ Level

ทำงานยังไง

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

Parameters

  • Entity entity
  • byte b

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

Level instance = ...;
Entity entity = ...;
instance.broadcastEntityEvent(entity, 0);

net.minecraft.world.level.Level#close()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:677
  • Modifiers: public
  • Return: void

คืออะไร

ปิด close

ทำงานยังไง

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

Parameters

  • ไม่มี

Throws

  • IOException

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

Level instance = ...;
instance.close();

net.minecraft.world.level.Level#createFireworks(double,double,double,double,double,double,List<FireworkExplosion>)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:865
  • Modifiers: public
  • Return: void

คืออะไร

สร้าง Fireworks

ทำงานยังไง

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

Parameters

  • double d
  • double e
  • double f
  • double g
  • double h
  • double i
  • List<FireworkExplosion> list

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

Level instance = ...;
List<FireworkExplosion> list = ...;
instance.createFireworks(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, list);

net.minecraft.world.level.Level#damageSources()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:978
  • Modifiers: public
  • Return: DamageSources

คืออะไร

สร้าง/คำนวณความเสียหาย Sources

ทำงานยังไง

คืนค่า: this.damageSources.

Parameters

  • ไม่มี

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

Level instance = ...;
DamageSources result = instance.damageSources();

net.minecraft.world.level.Level#destroyBlock(BlockPos,boolean,Entity,int)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:272
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ destroyBlock ตาม implementation ของ Level

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockState(), isAir(), getFluidState(), getBlock(), levelEvent(), getId(), hasBlockEntity(), getBlockEntity(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • BlockPos blockPos
  • boolean bl
  • Entity entity
  • int i

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

Level instance = ...;
BlockPos blockPos = ...;
Entity entity = ...;
boolean result = instance.destroyBlock(blockPos, true, entity, 0);

net.minecraft.world.level.Level#destroyBlockProgress(int,BlockPos,int)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:863
  • Modifiers: public abstract
  • Return: void

คืออะไร

ดำเนินการ destroyBlockProgress ตาม implementation ของ Level

ทำงานยังไง

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

Parameters

  • int i
  • BlockPos blockPos
  • int j

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

Level instance = ...;
BlockPos blockPos = ...;
instance.destroyBlockProgress(0, blockPos, 0);

net.minecraft.world.level.Level#dimension()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:926
  • Modifiers: public
  • Return: ResourceKey<Level>

คืออะไร

ดำเนินการ dimension ตาม implementation ของ Level

ทำงานยังไง

คืนค่า: this.dimension.

Parameters

  • ไม่มี

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

Level instance = ...;
ResourceKey<Level> result = instance.dimension();

net.minecraft.world.level.Level#dimensionType()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:917
  • Modifiers: public
  • Return: DimensionType

คืออะไร

ดำเนินการ dimensionType ตาม implementation ของ Level

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Level instance = ...;
DimensionType result = instance.dimensionType();

net.minecraft.world.level.Level#dimensionTypeRegistration()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:922
  • Modifiers: public
  • Return: Holder<DimensionType>

คืออะไร

ดำเนินการ dimensionTypeRegistration ตาม implementation ของ Level

ทำงานยังไง

คืนค่า: this.dimensionTypeRegistration.

Parameters

  • ไม่มี

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

Level instance = ...;
Holder<DimensionType> result = instance.dimensionTypeRegistration();

net.minecraft.world.level.Level#disconnect()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:757
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ disconnect ตาม implementation ของ Level

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Level instance = ...;
instance.disconnect();

net.minecraft.world.level.Level#dragonParts()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:749
  • Modifiers: public abstract
  • Return: Collection<EnderDragonPart>

คืออะไร

ดำเนินการ dragonParts ตาม implementation ของ Level

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Level instance = ...;
Collection<EnderDragonPart> result = instance.dragonParts();

net.minecraft.world.level.Level#explode(Entity,DamageSource,ExplosionDamageCalculator,double,double,double,float,boolean,Level.ExplosionInteraction)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:552
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ explode ตาม implementation ของ Level

ทำงานยังไง

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

Parameters

  • Entity entity
  • DamageSource damageSource
  • ExplosionDamageCalculator explosionDamageCalculator
  • double d
  • double e
  • double f
  • float g
  • boolean bl
  • Level.ExplosionInteraction explosionInteraction

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

Level instance = ...;
Entity entity = ...;
DamageSource damageSource = ...;
ExplosionDamageCalculator explosionDamageCalculator = ...;
Level.ExplosionInteraction explosionInteraction = ...;
instance.explode(entity, damageSource, explosionDamageCalculator, 0.0D, 0.0D, 0.0D, 0.0F, true, explosionInteraction);

net.minecraft.world.level.Level#explode(Entity,DamageSource,ExplosionDamageCalculator,double,double,double,float,boolean,Level.ExplosionInteraction,ParticleOptions,ParticleOptions,Holder<SoundEvent>)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:579
  • Modifiers: public abstract
  • Return: void

คืออะไร

ดำเนินการ explode ตาม implementation ของ Level

ทำงานยังไง

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

Parameters

  • Entity entity
  • DamageSource damageSource
  • ExplosionDamageCalculator explosionDamageCalculator
  • double d
  • double e
  • double f
  • float g
  • boolean bl
  • Level.ExplosionInteraction explosionInteraction
  • ParticleOptions particleOptions
  • ParticleOptions particleOptions2
  • Holder<SoundEvent> holder

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

Level instance = ...;
Entity entity = ...;
DamageSource damageSource = ...;
ExplosionDamageCalculator explosionDamageCalculator = ...;
Level.ExplosionInteraction explosionInteraction = ...;
ParticleOptions particleOptions = ...;
ParticleOptions particleOptions2 = ...;
Holder<SoundEvent> holder = ...;
instance.explode(entity, damageSource, explosionDamageCalculator, 0.0D, 0.0D, 0.0D, 0.0F, true, explosionInteraction, particleOptions, particleOptions2, holder);

net.minecraft.world.level.Level#explode(Entity,DamageSource,ExplosionDamageCalculator,Vec3,float,boolean,Level.ExplosionInteraction)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:527
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ explode ตาม implementation ของ Level

ทำงานยังไง

เรียกต่อ: x(), y(), z().

Parameters

  • Entity entity
  • DamageSource damageSource
  • ExplosionDamageCalculator explosionDamageCalculator
  • Vec3 vec3
  • float f
  • boolean bl
  • Level.ExplosionInteraction explosionInteraction

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

Level instance = ...;
Entity entity = ...;
DamageSource damageSource = ...;
ExplosionDamageCalculator explosionDamageCalculator = ...;
Vec3 vec3 = ...;
Level.ExplosionInteraction explosionInteraction = ...;
instance.explode(entity, damageSource, explosionDamageCalculator, vec3, 0.0F, true, explosionInteraction);

net.minecraft.world.level.Level#explode(Entity,double,double,double,float,boolean,Level.ExplosionInteraction)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:510
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ explode ตาม implementation ของ Level

ทำงานยังไง

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

Parameters

  • Entity entity
  • double d
  • double e
  • double f
  • float g
  • boolean bl
  • Level.ExplosionInteraction explosionInteraction

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

Level instance = ...;
Entity entity = ...;
Level.ExplosionInteraction explosionInteraction = ...;
instance.explode(entity, 0.0D, 0.0D, 0.0D, 0.0F, true, explosionInteraction);

net.minecraft.world.level.Level#explode(Entity,double,double,double,float,Level.ExplosionInteraction)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:493
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ explode ตาม implementation ของ Level

ทำงานยังไง

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

Parameters

  • Entity entity
  • double d
  • double e
  • double f
  • float g
  • Level.ExplosionInteraction explosionInteraction

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

Level instance = ...;
Entity entity = ...;
Level.ExplosionInteraction explosionInteraction = ...;
instance.explode(entity, 0.0D, 0.0D, 0.0D, 0.0F, explosionInteraction);

net.minecraft.world.level.Level#fillReportDetails(CrashReport)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:848
  • Modifiers: public
  • Return: CrashReportCategory

คืออะไร

ดำเนินการ fillReportDetails ตาม implementation ของ Level

ทำงานยังไง

มีการจัดการ exception. เรียกต่อ: addCategory(), setDetail(), players(), size(), getChunkSource(), dimension(), location(), toString(). คืนค่า: crashReportCategory.

Parameters

  • CrashReport crashReport

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

Level instance = ...;
CrashReport crashReport = ...;
CrashReportCategory result = instance.fillReportDetails(crashReport);

net.minecraft.world.level.Level#fuelValues()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:984
  • Modifiers: public abstract
  • Return: FuelValues

คืออะไร

ดำเนินการ fuelValues ตาม implementation ของ Level

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Level instance = ...;
FuelValues result = instance.fuelValues();

net.minecraft.world.level.Level#gatherChunkSourceStats()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:594
  • Modifiers: public abstract
  • Return: String

คืออะไร

ดำเนินการ gatherChunkSourceStats ตาม implementation ของ Level

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Level instance = ...;
String result = instance.gatherChunkSourceStats();

net.minecraft.world.level.Level#getBiomeManager()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:957
  • Modifiers: public
  • Return: BiomeManager

คืออะไร

อ่านค่า Biome Manager

ทำงานยังไง

คืนค่า: this.biomeManager.

Parameters

  • ไม่มี

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

Level instance = ...;
BiomeManager result = instance.getBiomeManager();

net.minecraft.world.level.Level#getBlockEntity(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:596
  • Modifiers: public
  • Return: BlockEntity

คืออะไร

อ่านค่า Block Entity

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isOutsideBuildHeight(), currentThread(), getChunkAt(). คืนค่า: null.

Parameters

  • BlockPos blockPos

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

Level instance = ...;
BlockPos blockPos = ...;
BlockEntity result = instance.getBlockEntity(blockPos);

net.minecraft.world.level.Level#getBlockRandomPos(int,int,int,int)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:947
  • Modifiers: public
  • Return: BlockPos

คืออะไร

อ่านค่า Block Random Pos

ทำงานยังไง

แก้ state: randValue. สร้างออบเจ็กต์: BlockPos. คืนค่า: new BlockPos(i + (m & 15), j + (m >> 16 & l), k + (m >> 8 & 15)).

Parameters

  • int i
  • int j
  • int k
  • int l

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

Level instance = ...;
BlockPos result = instance.getBlockRandomPos(0, 0, 0, 0);

net.minecraft.world.level.Level#getBlockState(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:350
  • Modifiers: public
  • Return: BlockState

คืออะไร

อ่านค่า Block State

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isOutsideBuildHeight(), defaultBlockState(), getChunk(), blockToSectionCoord(), getX(), getZ(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • BlockPos blockPos

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

Level instance = ...;
BlockPos blockPos = ...;
BlockState result = instance.getBlockState(blockPos);

net.minecraft.world.level.Level#getChunk(int,int)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:194
  • Modifiers: public
  • Return: LevelChunk

คืออะไร

อ่านค่า Chunk

ทำงานยังไง

คืนค่า: (LevelChunk)this.getChunk(i, j, ChunkStatus.FULL).

Parameters

  • int i
  • int j

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

Level instance = ...;
LevelChunk result = instance.getChunk(0, 0);

net.minecraft.world.level.Level#getChunk(int,int,ChunkStatus,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:198
  • Modifiers: public
  • Return: ChunkAccess

คืออะไร

อ่านค่า Chunk

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getChunkSource(). สร้างออบเจ็กต์: IllegalStateException. คืนค่า: chunkAccess.

Parameters

  • int i
  • int j
  • ChunkStatus chunkStatus
  • boolean bl

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

Level instance = ...;
ChunkStatus chunkStatus = ...;
ChunkAccess result = instance.getChunk(0, 0, chunkStatus, true);

net.minecraft.world.level.Level#getChunkAt(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:190
  • Modifiers: public
  • Return: LevelChunk

คืออะไร

อ่านค่า Chunk At

ทำงานยังไง

เรียกต่อ: getChunk(), blockToSectionCoord(), getX(), getZ(). คืนค่า: this.getChunk(SectionPos.blockToSectionCoord(blockPos.getX()), SectionPos.blockToSectionCoord(blockPos.getZ())).

Parameters

  • BlockPos blockPos

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

Level instance = ...;
BlockPos blockPos = ...;
LevelChunk result = instance.getChunkAt(blockPos);

net.minecraft.world.level.Level#getChunkForCollisions(int,int)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:682
  • Modifiers: public
  • Return: BlockGetter

คืออะไร

อ่านค่า Chunk For Collisions

ทำงานยังไง

เรียกต่อ: getChunk(). คืนค่า: this.getChunk(i, j, ChunkStatus.FULL, false).

Parameters

  • int i
  • int j

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

Level instance = ...;
BlockGetter result = instance.getChunkForCollisions(0, 0);

net.minecraft.world.level.Level#getCurrentDifficultyAt(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:888
  • Modifiers: public
  • Return: DifficultyInstance

คืออะไร

อ่านค่า Current Difficulty At

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: hasChunkAt(), getMoonBrightness(), getChunkAt(), getInhabitedTime(), getDifficulty(), getDayTime(). สร้างออบเจ็กต์: DifficultyInstance. คืนค่า: new DifficultyInstance(this.getDifficulty(), this.getDayTime(), l, f).

Parameters

  • BlockPos blockPos

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

Level instance = ...;
BlockPos blockPos = ...;
DifficultyInstance result = instance.getCurrentDifficultyAt(blockPos);

net.minecraft.world.level.Level#getDayTime()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:764
  • Modifiers: public
  • Return: long

คืออะไร

อ่านค่า Day Time

ทำงานยังไง

คืนค่า: this.levelData.getDayTime().

Parameters

  • ไม่มี

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

Level instance = ...;
long result = instance.getDayTime();

net.minecraft.world.level.Level#getEntities()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:966
  • Modifiers: protected abstract
  • Return: LevelEntityGetter<Entity>

คืออะไร

อ่านค่า Entities

ทำงานยังไง

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

Parameters

  • ไม่มี

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

@Override
protected LevelEntityGetter<Entity> getEntities() {
    return super.getEntities();
}

net.minecraft.world.level.Level#getEntities(Entity,AABB,Predicate<? super Entity>)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:688
  • Modifiers: public
  • Return: List<Entity>

คืออะไร

อ่านค่า Entities

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: get(), incrementCounter(), newArrayList(), test(), add(), dragonParts(), intersects(), getBoundingBox(). คืนค่า: list.

Parameters

  • Entity entity
  • AABB aABB
  • Predicate<? super Entity> predicate

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

Level instance = ...;
Entity entity = ...;
AABB aABB = ...;
Predicate<? super Entity> predicate = ...;
List<Entity> result = instance.getEntities(entity, aABB, predicate);

net.minecraft.world.level.Level#getEntities(EntityTypeTest<Entity, T>,AABB,Predicate<? super T>)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:709
  • Modifiers: public
  • Return: List<T>

คืออะไร

อ่านค่า Entities

ทำงานยังไง

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

Parameters

  • EntityTypeTest<Entity, T> entityTypeTest
  • AABB aABB
  • Predicate<? super T> predicate

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

Level instance = ...;
EntityTypeTest<Entity, T> entityTypeTest = ...;
AABB aABB = ...;
Predicate<? super T> predicate = ...;
List<T> result = instance.getEntities(entityTypeTest, aABB, predicate);

net.minecraft.world.level.Level#getEntities(EntityTypeTest<Entity, T>,AABB,Predicate<? super T>,List<? super T>)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:716
  • Modifiers: public
  • Return: void

คืออะไร

อ่านค่า Entities

ทำงานยังไง

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

Parameters

  • EntityTypeTest<Entity, T> entityTypeTest
  • AABB aABB
  • Predicate<? super T> predicate
  • List<? super T> list

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

Level instance = ...;
EntityTypeTest<Entity, T> entityTypeTest = ...;
AABB aABB = ...;
Predicate<? super T> predicate = ...;
List<? super T> list = ...;
instance.getEntities(entityTypeTest, aABB, predicate, list);

net.minecraft.world.level.Level#getEntities(EntityTypeTest<Entity, T>,AABB,Predicate<? super T>,List<? super T>,int)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:720
  • Modifiers: public
  • Return: void

คืออะไร

อ่านค่า Entities

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: get(), incrementCounter(), test(), add(), size(), getSubEntities(), tryCast(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • EntityTypeTest<Entity, T> entityTypeTest
  • AABB aABB
  • Predicate<? super T> predicate
  • List<? super T> list
  • int i

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

Level instance = ...;
EntityTypeTest<Entity, T> entityTypeTest = ...;
AABB aABB = ...;
Predicate<? super T> predicate = ...;
List<? super T> list = ...;
instance.getEntities(entityTypeTest, aABB, predicate, list, 0);

net.minecraft.world.level.Level#getEntity(int)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:746
  • Modifiers: public abstract
  • Return: Entity

คืออะไร

อ่านค่า Entity

ทำงานยังไง

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

Parameters

  • int i

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

Level instance = ...;
Entity result = instance.getEntity(0);

net.minecraft.world.level.Level#getFluidState(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:360
  • Modifiers: public
  • Return: FluidState

คืออะไร

อ่านค่า Fluid State

ทำงานยังไง

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

Parameters

  • BlockPos blockPos

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

Level instance = ...;
BlockPos blockPos = ...;
FluidState result = instance.getFluidState(blockPos);

net.minecraft.world.level.Level#getFreeMapId()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:843
  • Modifiers: public abstract
  • Return: MapId

คืออะไร

อ่านค่า Free Map Id

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Level instance = ...;
MapId result = instance.getFreeMapId();

net.minecraft.world.level.Level#getGameTime()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:760
  • Modifiers: public
  • Return: long

คืออะไร

อ่านค่า Game Time

ทำงานยังไง

คืนค่า: this.levelData.getGameTime().

Parameters

  • ไม่มี

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

Level instance = ...;
long result = instance.getGameTime();

net.minecraft.world.level.Level#getHeight(Heightmap.Types,int,int)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:329
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Height

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: hasChunk(), blockToSectionCoord(), getChunk(), getMinY(), getSeaLevel(). คืนค่า: k.

Parameters

  • Heightmap.Types types
  • int i
  • int j

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

Level instance = ...;
Heightmap.Types types = ...;
int result = instance.getHeight(types, 0, 0);

net.minecraft.world.level.Level#getLevelData()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:782
  • Modifiers: public
  • Return: LevelData

คืออะไร

อ่านค่า Level Data

ทำงานยังไง

คืนค่า: this.levelData.

Parameters

  • ไม่มี

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

Level instance = ...;
LevelData result = instance.getLevelData();

net.minecraft.world.level.Level#getLightEngine()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:345
  • Modifiers: public
  • Return: LevelLightEngine

คืออะไร

อ่านค่า Light Engine

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Level instance = ...;
LevelLightEngine result = instance.getLightEngine();

net.minecraft.world.level.Level#getMapData(MapId)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:838
  • Modifiers: public abstract
  • Return: MapItemSavedData

คืออะไร

อ่านค่า Map Data

ทำงานยังไง

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

Parameters

  • MapId mapId

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

Level instance = ...;
MapId mapId = ...;
MapItemSavedData result = instance.getMapData(mapId);

net.minecraft.world.level.Level#getRainLevel(float)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:799
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Rain Level

ทำงานยังไง

เรียกต่อ: lerp(). คืนค่า: Mth.lerp(f, this.oRainLevel, this.rainLevel).

Parameters

  • float f

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

Level instance = ...;
float result = instance.getRainLevel(0.0F);

net.minecraft.world.level.Level#getRandom()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:930
  • Modifiers: public
  • Return: RandomSource

คืออะไร

อ่านค่า Random

ทำงานยังไง

คืนค่า: this.random.

Parameters

  • ไม่มี

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

Level instance = ...;
RandomSource result = instance.getRandom();

net.minecraft.world.level.Level#getScoreboard()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:868
  • Modifiers: public abstract
  • Return: Scoreboard

คืออะไร

อ่านค่า Scoreboard

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Level instance = ...;
Scoreboard result = instance.getScoreboard();

net.minecraft.world.level.Level#getServer()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:168
  • Modifiers: public
  • Return: MinecraftServer

คืออะไร

อ่านค่า Server

ทำงานยังไง

คืนค่า: null.

Parameters

  • ไม่มี

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

Level instance = ...;
MinecraftServer result = instance.getServer();

net.minecraft.world.level.Level#getSharedSpawnAngle()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:664
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Shared Spawn Angle

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Level instance = ...;
float result = instance.getSharedSpawnAngle();

net.minecraft.world.level.Level#getSharedSpawnPos()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:653
  • Modifiers: public
  • Return: BlockPos

คืออะไร

อ่านค่า Shared Spawn Pos

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getSpawnPos(), getWorldBorder(), isWithinBounds(), getHeightmapPos(), containing(), getCenterX(), getCenterZ(). คืนค่า: blockPos.

Parameters

  • ไม่มี

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

Level instance = ...;
BlockPos result = instance.getSharedSpawnPos();

net.minecraft.world.level.Level#getSkyDarken()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:900
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Sky Darken

ทำงานยังไง

คืนค่า: this.skyDarken.

Parameters

  • ไม่มี

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

Level instance = ...;
int result = instance.getSkyDarken();

net.minecraft.world.level.Level#getSunAngle(float)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:436
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Sun Angle

ทำงานยังไง

เรียกต่อ: getTimeOfDay(). คืนค่า: g * (float) (Math.PI * 2).

Parameters

  • float f

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

Level instance = ...;
float result = instance.getSunAngle(0.0F);

net.minecraft.world.level.Level#getThunderLevel(float)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:789
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Thunder Level

ทำงานยังไง

เรียกต่อ: lerp(), getRainLevel(). คืนค่า: Mth.lerp(f, this.oThunderLevel, this.thunderLevel) * this.getRainLevel(f).

Parameters

  • float f

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

Level instance = ...;
float result = instance.getThunderLevel(0.0F);

net.minecraft.world.level.Level#getWorldBorder()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:908
  • Modifiers: public
  • Return: WorldBorder

คืออะไร

อ่านค่า World Border

ทำงานยังไง

คืนค่า: this.worldBorder.

Parameters

  • ไม่มี

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

Level instance = ...;
WorldBorder result = instance.getWorldBorder();

net.minecraft.world.level.Level#globalLevelEvent(int,BlockPos,int)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:845
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ globalLevelEvent ตาม implementation ของ Level

ทำงานยังไง

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

Parameters

  • int i
  • BlockPos blockPos
  • int j

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

Level instance = ...;
BlockPos blockPos = ...;
instance.globalLevelEvent(0, blockPos, 0);

net.minecraft.world.level.Level#guardEntityTick(Consumer<T>,T)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:470
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ guardEntityTick ตาม implementation ของ Level

ทำงานยังไง

มีการจัดการ exception. เรียกต่อ: accept(), forThrowable(), addCategory(), fillCrashReportCategory(). สร้างออบเจ็กต์: ReportedException.

Parameters

  • Consumer<T> consumer
  • T entity

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

Level instance = ...;
Consumer<T> consumer = ...;
T entity = ...;
instance.guardEntityTick(consumer, entity);

net.minecraft.world.level.Level#isClientSide()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:163
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Client Side

ทำงานยังไง

คืนค่า: this.isClientSide.

Parameters

  • ไม่มี

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

Level instance = ...;
boolean result = instance.isClientSide();

net.minecraft.world.level.Level#isDay()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:370
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: dimensionType(), hasFixedTime(). คืนค่า: !this.dimensionType().hasFixedTime() && this.skyDarken < 4.

Parameters

  • ไม่มี

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

Level instance = ...;
boolean result = instance.isDay();

net.minecraft.world.level.Level#isDebug()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:962
  • Modifiers: public final
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: this.isDebug.

Parameters

  • ไม่มี

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

Level instance = ...;
boolean result = instance.isDebug();

net.minecraft.world.level.Level#isFluidAtPosition(BlockPos,Predicate<FluidState>)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:940
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Fluid At Position

ทำงานยังไง

เรียกต่อ: test(), getFluidState(). คืนค่า: predicate.test(this.getFluidState(blockPos)).

Parameters

  • BlockPos blockPos
  • Predicate<FluidState> predicate

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

Level instance = ...;
BlockPos blockPos = ...;
Predicate<FluidState> predicate = ...;
boolean result = instance.isFluidAtPosition(blockPos, predicate);

net.minecraft.world.level.Level#isInSpawnableBounds(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:178
  • Modifiers: public static
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ In Spawnable Bounds

ทำงานยังไง

เรียกต่อ: isOutsideSpawnableHeight(), getY(), isInWorldBoundsHorizontal(). คืนค่า: !isOutsideSpawnableHeight(blockPos.getY()) && isInWorldBoundsHorizontal(blockPos).

Parameters

  • BlockPos blockPos

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

BlockPos blockPos = ...;
boolean result = Level.isInSpawnableBounds(blockPos);

net.minecraft.world.level.Level#isInWorldBounds(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:174
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ In World Bounds

ทำงานยังไง

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

Parameters

  • BlockPos blockPos

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

Level instance = ...;
BlockPos blockPos = ...;
boolean result = instance.isInWorldBounds(blockPos);

net.minecraft.world.level.Level#isLoaded(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:621
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: isOutsideBuildHeight(), getChunkSource(), hasChunk(), blockToSectionCoord(), getX(), getZ().

Parameters

  • BlockPos blockPos

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

Level instance = ...;
BlockPos blockPos = ...;
boolean result = instance.isLoaded(blockPos);

net.minecraft.world.level.Level#isNight()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:374
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Level instance = ...;
boolean result = instance.isNight();

net.minecraft.world.level.Level#isRaining()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:817
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: canHaveWeather(), getRainLevel(). คืนค่า: this.canHaveWeather() && this.getRainLevel(1.0F) > 0.2.

Parameters

  • ไม่มี

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

Level instance = ...;
boolean result = instance.isRaining();

net.minecraft.world.level.Level#isRainingAt(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:821
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Raining At

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isRaining(), canSeeSky(), getHeightmapPos(), getY(), getBiome(), value(), getPrecipitationAt(), getSeaLevel(). มีจุด return อย่างน้อย 4 จุด.

Parameters

  • BlockPos blockPos

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

Level instance = ...;
BlockPos blockPos = ...;
boolean result = instance.isRainingAt(blockPos);

net.minecraft.world.level.Level#isStateAtPosition(BlockPos,Predicate<BlockState>)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:935
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ State At Position

ทำงานยังไง

เรียกต่อ: test(), getBlockState(). คืนค่า: predicate.test(this.getBlockState(blockPos)).

Parameters

  • BlockPos blockPos
  • Predicate<BlockState> predicate

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

Level instance = ...;
BlockPos blockPos = ...;
Predicate<BlockState> predicate = ...;
boolean result = instance.isStateAtPosition(blockPos, predicate);

net.minecraft.world.level.Level#isThundering()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:813
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: canHaveWeather(), getThunderLevel(). คืนค่า: this.canHaveWeather() && this.getThunderLevel(1.0F) > 0.9.

Parameters

  • ไม่มี

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

Level instance = ...;
boolean result = instance.isThundering();

net.minecraft.world.level.Level#Level(WritableLevelData,ResourceKey<Level>,RegistryAccess,Holder<DimensionType>,boolean,boolean,long,int)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:124
  • Modifiers: protected
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: levelData, dimensionTypeRegistration, dimension, isClientSide, worldBorder, thread. เรียกต่อ: value(), coordinateScale(), getCenterX(), getCenterZ(), currentThread(). สร้างออบเจ็กต์: WorldBorder, BiomeManager, CollectingNeighborUpdater, DamageSources. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • WritableLevelData writableLevelData
  • ResourceKey<Level> resourceKey
  • RegistryAccess registryAccess
  • Holder<DimensionType> holder
  • boolean bl
  • boolean bl2
  • long l
  • int i

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

WritableLevelData writableLevelData = ...;
ResourceKey<Level> resourceKey = ...;
RegistryAccess registryAccess = ...;
Holder<DimensionType> holder = ...;
Level instance = new Level(writableLevelData, resourceKey, registryAccess, holder, true, true, 0L, 0);

net.minecraft.world.level.Level#loadedAndEntityCanStandOn(BlockPos,Entity)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:638
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ loadedAndEntityCanStandOn ตาม implementation ของ Level

ทำงานยังไง

เรียกต่อ: loadedAndEntityCanStandOnFace(). คืนค่า: this.loadedAndEntityCanStandOnFace(blockPos, entity, Direction.UP).

Parameters

  • BlockPos blockPos
  • Entity entity

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

Level instance = ...;
BlockPos blockPos = ...;
Entity entity = ...;
boolean result = instance.loadedAndEntityCanStandOn(blockPos, entity);

net.minecraft.world.level.Level#loadedAndEntityCanStandOnFace(BlockPos,Entity,Direction)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:627
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ loadedAndEntityCanStandOnFace ตาม implementation ของ Level

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isOutsideBuildHeight(), getChunk(), blockToSectionCoord(), getX(), getZ(), getBlockState(), entityCanStandOnFace(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • BlockPos blockPos
  • Entity entity
  • Direction direction

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

Level instance = ...;
BlockPos blockPos = ...;
Entity entity = ...;
Direction direction = ...;
boolean result = instance.loadedAndEntityCanStandOnFace(blockPos, entity, direction);

net.minecraft.world.level.Level#mayInteract(Player,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:768
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ mayInteract ตาม implementation ของ Level

ทำงานยังไง

คืนค่า: true.

Parameters

  • Player player
  • BlockPos blockPos

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

Level instance = ...;
Player player = ...;
BlockPos blockPos = ...;
boolean result = instance.mayInteract(player, blockPos);

net.minecraft.world.level.Level#neighborChanged(BlockPos,Block,Orientation)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:318
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ neighborChanged ตาม implementation ของ Level

ทำงานยังไง

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

Parameters

  • BlockPos blockPos
  • Block block
  • Orientation orientation

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

Level instance = ...;
BlockPos blockPos = ...;
Block block = ...;
Orientation orientation = ...;
instance.neighborChanged(blockPos, block, orientation);

net.minecraft.world.level.Level#neighborChanged(BlockState,BlockPos,Block,Orientation,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:321
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ neighborChanged ตาม implementation ของ Level

ทำงานยังไง

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

Parameters

  • BlockState blockState
  • BlockPos blockPos
  • Block block
  • Orientation orientation
  • boolean bl

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

Level instance = ...;
BlockState blockState = ...;
BlockPos blockPos = ...;
Block block = ...;
Orientation orientation = ...;
instance.neighborChanged(blockState, blockPos, block, orientation, true);

net.minecraft.world.level.Level#neighborShapeChanged(Direction,BlockPos,BlockPos,BlockState,int,int)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:324
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ neighborShapeChanged ตาม implementation ของ Level

ทำงานยังไง

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

Parameters

  • Direction direction
  • BlockPos blockPos
  • BlockPos blockPos2
  • BlockState blockState
  • int i
  • int j

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

Level instance = ...;
Direction direction = ...;
BlockPos blockPos = ...;
BlockPos blockPos2 = ...;
BlockState blockState = ...;
instance.neighborShapeChanged(direction, blockPos, blockPos2, blockState, 0, 0);

net.minecraft.world.level.Level#nextSubTickCount()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:968
  • Modifiers: public
  • Return: long

คืออะไร

ดำเนินการ nextSubTickCount ตาม implementation ของ Level

ทำงานยังไง

แก้ state: subTickCount. คืนค่า: this.subTickCount++.

Parameters

  • ไม่มี

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

Level instance = ...;
long result = instance.nextSubTickCount();

net.minecraft.world.level.Level#noSave()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:953
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ noSave ตาม implementation ของ Level

ทำงานยังไง

คืนค่า: false.

Parameters

  • ไม่มี

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

Level instance = ...;
boolean result = instance.noSave();

net.minecraft.world.level.Level#onBlockStateChange(BlockPos,BlockState,BlockState)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:263
  • Modifiers: public
  • Return: void

คืออะไร

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

ทำงานยังไง

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

Parameters

  • BlockPos blockPos
  • BlockState blockState
  • BlockState blockState2

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

Level instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockState blockState2 = ...;
instance.onBlockStateChange(blockPos, blockState, blockState2);

net.minecraft.world.level.Level#playLocalSound(BlockPos,SoundEvent,SoundSource,float,float,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:413
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ playLocalSound ตาม implementation ของ Level

ทำงานยังไง

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

Parameters

  • BlockPos blockPos
  • SoundEvent soundEvent
  • SoundSource soundSource
  • float f
  • float g
  • boolean bl

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

Level instance = ...;
BlockPos blockPos = ...;
SoundEvent soundEvent = ...;
SoundSource soundSource = ...;
instance.playLocalSound(blockPos, soundEvent, soundSource, 0.0F, 0.0F, true);

net.minecraft.world.level.Level#playLocalSound(double,double,double,SoundEvent,SoundSource,float,float,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:420
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ playLocalSound ตาม implementation ของ Level

ทำงานยังไง

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

Parameters

  • double d
  • double e
  • double f
  • SoundEvent soundEvent
  • SoundSource soundSource
  • float g
  • float h
  • boolean bl

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

Level instance = ...;
SoundEvent soundEvent = ...;
SoundSource soundSource = ...;
instance.playLocalSound(0.0D, 0.0D, 0.0D, soundEvent, soundSource, 0.0F, 0.0F, true);

net.minecraft.world.level.Level#playLocalSound(Entity,SoundEvent,SoundSource,float,float)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:417
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ playLocalSound ตาม implementation ของ Level

ทำงานยังไง

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

Parameters

  • Entity entity
  • SoundEvent soundEvent
  • SoundSource soundSource
  • float f
  • float g

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

Level instance = ...;
Entity entity = ...;
SoundEvent soundEvent = ...;
SoundSource soundSource = ...;
instance.playLocalSound(entity, soundEvent, soundSource, 0.0F, 0.0F);

net.minecraft.world.level.Level#playSeededSound(Player,double,double,double,Holder<SoundEvent>,SoundSource,float,float,long)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:387
  • Modifiers: public abstract
  • Return: void

คืออะไร

ดำเนินการ playSeededSound ตาม implementation ของ Level

ทำงานยังไง

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

Parameters

  • Player player
  • double d
  • double e
  • double f
  • Holder<SoundEvent> holder
  • SoundSource soundSource
  • float g
  • float h
  • long l

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

Level instance = ...;
Player player = ...;
Holder<SoundEvent> holder = ...;
SoundSource soundSource = ...;
instance.playSeededSound(player, 0.0D, 0.0D, 0.0D, holder, soundSource, 0.0F, 0.0F, 0L);

net.minecraft.world.level.Level#playSeededSound(Player,double,double,double,SoundEvent,SoundSource,float,float,long)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:391
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ playSeededSound ตาม implementation ของ Level

ทำงานยังไง

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

Parameters

  • Player player
  • double d
  • double e
  • double f
  • SoundEvent soundEvent
  • SoundSource soundSource
  • float g
  • float h
  • long l

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

Level instance = ...;
Player player = ...;
SoundEvent soundEvent = ...;
SoundSource soundSource = ...;
instance.playSeededSound(player, 0.0D, 0.0D, 0.0D, soundEvent, soundSource, 0.0F, 0.0F, 0L);

net.minecraft.world.level.Level#playSeededSound(Player,Entity,Holder<SoundEvent>,SoundSource,float,float,long)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:395
  • Modifiers: public abstract
  • Return: void

คืออะไร

ดำเนินการ playSeededSound ตาม implementation ของ Level

ทำงานยังไง

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

Parameters

  • Player player
  • Entity entity
  • Holder<SoundEvent> holder
  • SoundSource soundSource
  • float f
  • float g
  • long l

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

Level instance = ...;
Player player = ...;
Entity entity = ...;
Holder<SoundEvent> holder = ...;
SoundSource soundSource = ...;
instance.playSeededSound(player, entity, holder, soundSource, 0.0F, 0.0F, 0L);

net.minecraft.world.level.Level#playSound(Entity,BlockPos,SoundEvent,SoundSource,float,float)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:378
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ playSound ตาม implementation ของ Level

ทำงานยังไง

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

Parameters

  • Entity entity
  • BlockPos blockPos
  • SoundEvent soundEvent
  • SoundSource soundSource
  • float f
  • float g

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

Level instance = ...;
Entity entity = ...;
BlockPos blockPos = ...;
SoundEvent soundEvent = ...;
SoundSource soundSource = ...;
instance.playSound(entity, blockPos, soundEvent, soundSource, 0.0F, 0.0F);

net.minecraft.world.level.Level#playSound(Player,BlockPos,SoundEvent,SoundSource,float,float)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:382
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ playSound ตาม implementation ของ Level

ทำงานยังไง

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

Parameters

  • Player player
  • BlockPos blockPos
  • SoundEvent soundEvent
  • SoundSource soundSource
  • float f
  • float g

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

Level instance = ...;
Player player = ...;
BlockPos blockPos = ...;
SoundEvent soundEvent = ...;
SoundSource soundSource = ...;
instance.playSound(player, blockPos, soundEvent, soundSource, 0.0F, 0.0F);

net.minecraft.world.level.Level#playSound(Player,double,double,double,Holder<SoundEvent>,SoundSource,float,float)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:405
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ playSound ตาม implementation ของ Level

ทำงานยังไง

เรียกต่อ: playSeededSound(), nextLong().

Parameters

  • Player player
  • double d
  • double e
  • double f
  • Holder<SoundEvent> holder
  • SoundSource soundSource
  • float g
  • float h

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

Level instance = ...;
Player player = ...;
Holder<SoundEvent> holder = ...;
SoundSource soundSource = ...;
instance.playSound(player, 0.0D, 0.0D, 0.0D, holder, soundSource, 0.0F, 0.0F);

net.minecraft.world.level.Level#playSound(Player,double,double,double,SoundEvent,SoundSource)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:397
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ playSound ตาม implementation ของ Level

ทำงานยังไง

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

Parameters

  • Player player
  • double d
  • double e
  • double f
  • SoundEvent soundEvent
  • SoundSource soundSource

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

Level instance = ...;
Player player = ...;
SoundEvent soundEvent = ...;
SoundSource soundSource = ...;
instance.playSound(player, 0.0D, 0.0D, 0.0D, soundEvent, soundSource);

net.minecraft.world.level.Level#playSound(Player,double,double,double,SoundEvent,SoundSource,float,float)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:401
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ playSound ตาม implementation ของ Level

ทำงานยังไง

เรียกต่อ: playSeededSound(), nextLong().

Parameters

  • Player player
  • double d
  • double e
  • double f
  • SoundEvent soundEvent
  • SoundSource soundSource
  • float g
  • float h

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

Level instance = ...;
Player player = ...;
SoundEvent soundEvent = ...;
SoundSource soundSource = ...;
instance.playSound(player, 0.0D, 0.0D, 0.0D, soundEvent, soundSource, 0.0F, 0.0F);

net.minecraft.world.level.Level#playSound(Player,Entity,SoundEvent,SoundSource,float,float)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:409
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ playSound ตาม implementation ของ Level

ทำงานยังไง

เรียกต่อ: playSeededSound(), wrapAsHolder(), nextLong().

Parameters

  • Player player
  • Entity entity
  • SoundEvent soundEvent
  • SoundSource soundSource
  • float f
  • float g

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

Level instance = ...;
Player player = ...;
Entity entity = ...;
SoundEvent soundEvent = ...;
SoundSource soundSource = ...;
instance.playSound(player, entity, soundEvent, soundSource, 0.0F, 0.0F);

net.minecraft.world.level.Level#potionBrewing()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:982
  • Modifiers: public abstract
  • Return: PotionBrewing

คืออะไร

ดำเนินการ potionBrewing ตาม implementation ของ Level

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Level instance = ...;
PotionBrewing result = instance.potionBrewing();

net.minecraft.world.level.Level#prepareWeather()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:668
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ prepareWeather ตาม implementation ของ Level

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: rainLevel, thunderLevel. เรียกต่อ: isRaining(), isThundering().

Parameters

  • ไม่มี

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

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

net.minecraft.world.level.Level#recipeAccess()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:945
  • Modifiers: public abstract
  • Return: RecipeAccess

คืออะไร

ดำเนินการ recipeAccess ตาม implementation ของ Level

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Level instance = ...;
RecipeAccess result = instance.recipeAccess();

net.minecraft.world.level.Level#registryAccess()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:973
  • Modifiers: public
  • Return: RegistryAccess

คืออะไร

ดำเนินการ registryAccess ตาม implementation ของ Level

ทำงานยังไง

คืนค่า: this.registryAccess.

Parameters

  • ไม่มี

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

Level instance = ...;
RegistryAccess result = instance.registryAccess();

net.minecraft.world.level.Level#removeBlock(BlockPos,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:266
  • Modifiers: public
  • Return: boolean

คืออะไร

ลบ Block

ทำงานยังไง

เรียกต่อ: getFluidState(), setBlock(), createLegacyBlock(). คืนค่า: this.setBlock(blockPos, fluidState.createLegacyBlock(), 3 | (bl ? 64 : 0)).

Parameters

  • BlockPos blockPos
  • boolean bl

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

Level instance = ...;
BlockPos blockPos = ...;
boolean result = instance.removeBlock(blockPos, true);

net.minecraft.world.level.Level#removeBlockEntity(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:615
  • Modifiers: public
  • Return: void

คืออะไร

ลบ Block Entity

ทำงานยังไง

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

Parameters

  • BlockPos blockPos

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

Level instance = ...;
BlockPos blockPos = ...;
instance.removeBlockEntity(blockPos);

net.minecraft.world.level.Level#sendBlockUpdated(BlockPos,BlockState,BlockState,int)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:304
  • Modifiers: public abstract
  • Return: void

คืออะไร

ส่ง Block Updated

ทำงานยังไง

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

Parameters

  • BlockPos blockPos
  • BlockState blockState
  • BlockState blockState2
  • int i

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

Level instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockState blockState2 = ...;
instance.sendBlockUpdated(blockPos, blockState, blockState2, 0);

net.minecraft.world.level.Level#sendPacketToServer(Packet<?>)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:913
  • Modifiers: public
  • Return: void

คืออะไร

ส่ง Packet To Server

ทำงานยังไง

สร้างออบเจ็กต์: UnsupportedOperationException.

Parameters

  • Packet<?> packet

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

Level instance = ...;
Packet<?> packet = ...;
instance.sendPacketToServer(packet);

net.minecraft.world.level.Level#setBlock(BlockPos,BlockState,int)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:209
  • Modifiers: public
  • Return: boolean

คืออะไร

กำหนดค่า Block

ทำงานยังไง

คืนค่า: this.setBlock(blockPos, blockState, i, 512).

Parameters

  • BlockPos blockPos
  • BlockState blockState
  • int i

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

Level instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.setBlock(blockPos, blockState, 0);

net.minecraft.world.level.Level#setBlock(BlockPos,BlockState,int,int)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:214
  • Modifiers: public
  • Return: boolean

คืออะไร

กำหนดค่า Block

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isOutsideBuildHeight(), isDebug(), getChunkAt(), getBlock(), setBlockState(), getBlockState(), setBlocksDirty(), getFullStatus(). มีจุด return อย่างน้อย 4 จุด.

Parameters

  • BlockPos blockPos
  • BlockState blockState
  • int i
  • int j

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

Level instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.setBlock(blockPos, blockState, 0, 0);

net.minecraft.world.level.Level#setBlockAndUpdate(BlockPos,BlockState)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:300
  • Modifiers: public
  • Return: boolean

คืออะไร

กำหนดค่า Block And Update

ทำงานยังไง

เรียกต่อ: setBlock(). คืนค่า: this.setBlock(blockPos, blockState, 3).

Parameters

  • BlockPos blockPos
  • BlockState blockState

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

Level instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.setBlockAndUpdate(blockPos, blockState);

net.minecraft.world.level.Level#setBlockEntity(BlockEntity)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:608
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Block Entity

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockPos(), isOutsideBuildHeight(), getChunkAt(), addAndRegisterBlockEntity().

Parameters

  • BlockEntity blockEntity

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

Level instance = ...;
BlockEntity blockEntity = ...;
instance.setBlockEntity(blockEntity);

net.minecraft.world.level.Level#setBlocksDirty(BlockPos,BlockState,BlockState)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:306
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Blocks Dirty

ทำงานยังไง

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

Parameters

  • BlockPos blockPos
  • BlockState blockState
  • BlockState blockState2

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

Level instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockState blockState2 = ...;
instance.setBlocksDirty(blockPos, blockState, blockState2);

net.minecraft.world.level.Level#setMapData(MapId,MapItemSavedData)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:841
  • Modifiers: public abstract
  • Return: void

คืออะไร

กำหนดค่า Map Data

ทำงานยังไง

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

Parameters

  • MapId mapId
  • MapItemSavedData mapItemSavedData

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

Level instance = ...;
MapId mapId = ...;
MapItemSavedData mapItemSavedData = ...;
instance.setMapData(mapId, mapItemSavedData);

net.minecraft.world.level.Level#setRainLevel(float)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:803
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Rain Level

ทำงานยังไง

แก้ state: oRainLevel, rainLevel. เรียกต่อ: clamp().

Parameters

  • float f

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

Level instance = ...;
instance.setRainLevel(0.0F);

net.minecraft.world.level.Level#setSkyFlashTime(int)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:905
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Sky Flash Time

ทำงานยังไง

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

Parameters

  • int i

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

Level instance = ...;
instance.setSkyFlashTime(0);

net.minecraft.world.level.Level#setSpawnSettings(boolean)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:649
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Spawn Settings

ทำงานยังไง

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

Parameters

  • boolean bl

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

Level instance = ...;
instance.setSpawnSettings(true);

net.minecraft.world.level.Level#setThunderLevel(float)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:793
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Thunder Level

ทำงานยังไง

แก้ state: oThunderLevel, thunderLevel. เรียกต่อ: clamp().

Parameters

  • float f

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

Level instance = ...;
instance.setThunderLevel(0.0F);

net.minecraft.world.level.Level#shouldTickBlocksAt(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:489
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Tick Blocks At

ทำงานยังไง

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

Parameters

  • BlockPos blockPos

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

Level instance = ...;
BlockPos blockPos = ...;
boolean result = instance.shouldTickBlocksAt(blockPos);

net.minecraft.world.level.Level#shouldTickBlocksAt(long)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:485
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Tick Blocks At

ทำงานยังไง

คืนค่า: true.

Parameters

  • long l

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

Level instance = ...;
boolean result = instance.shouldTickBlocksAt(0L);

net.minecraft.world.level.Level#shouldTickDeath(Entity)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:481
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Tick Death

ทำงานยังไง

คืนค่า: true.

Parameters

  • Entity entity

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

Level instance = ...;
Entity entity = ...;
boolean result = instance.shouldTickDeath(entity);

net.minecraft.world.level.Level#tickBlockEntities()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:445
  • Modifiers: protected
  • Return: void

คืออะไร

ประมวลผล tick Block Entities

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: tickingBlockEntities. เรียกต่อ: get(), push(), isEmpty(), addAll(), clear(), iterator(), tickRateManager(), runsNormally().

Parameters

  • ไม่มี

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

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

net.minecraft.world.level.Level#tickRateManager()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:787
  • Modifiers: public abstract
  • Return: TickRateManager

คืออะไร

ประมวลผล tick Rate Manager

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Level instance = ...;
TickRateManager result = instance.tickRateManager();

net.minecraft.world.level.Level#updateNeighborsAt(BlockPos,Block)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:309
  • Modifiers: public
  • Return: void

คืออะไร

อัปเดต Neighbors At

ทำงานยังไง

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

Parameters

  • BlockPos blockPos
  • Block block

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

Level instance = ...;
BlockPos blockPos = ...;
Block block = ...;
instance.updateNeighborsAt(blockPos, block);

net.minecraft.world.level.Level#updateNeighborsAt(BlockPos,Block,Orientation)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:312
  • Modifiers: public
  • Return: void

คืออะไร

อัปเดต Neighbors At

ทำงานยังไง

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

Parameters

  • BlockPos blockPos
  • Block block
  • Orientation orientation

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

Level instance = ...;
BlockPos blockPos = ...;
Block block = ...;
Orientation orientation = ...;
instance.updateNeighborsAt(blockPos, block, orientation);

net.minecraft.world.level.Level#updateNeighborsAtExceptFromFacing(BlockPos,Block,Direction,Orientation)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:315
  • Modifiers: public
  • Return: void

คืออะไร

อัปเดต Neighbors At Except From Facing

ทำงานยังไง

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

Parameters

  • BlockPos blockPos
  • Block block
  • Direction direction
  • Orientation orientation

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

Level instance = ...;
BlockPos blockPos = ...;
Block block = ...;
Direction direction = ...;
Orientation orientation = ...;
instance.updateNeighborsAtExceptFromFacing(blockPos, block, direction, orientation);

net.minecraft.world.level.Level#updateNeighbourForOutputSignal(BlockPos,Block)

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:870
  • Modifiers: public
  • Return: void

คืออะไร

อัปเดต Neighbour For Output Signal

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: relative(), hasChunkAt(), getBlockState(), is(), neighborChanged(), isRedstoneConductor().

Parameters

  • BlockPos blockPos
  • Block block

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

Level instance = ...;
BlockPos blockPos = ...;
Block block = ...;
instance.updateNeighbourForOutputSignal(blockPos, block);

net.minecraft.world.level.Level#updateSkyBrightness()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:642
  • Modifiers: public
  • Return: void

คืออะไร

อัปเดต Sky Brightness

ทำงานยังไง

แก้ state: skyDarken. เรียกต่อ: getRainLevel(), getThunderLevel(), clamp(), cos(), getTimeOfDay().

Parameters

  • ไม่มี

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

Level instance = ...;
instance.updateSkyBrightness();

Level$ExplosionInteraction

  • Full name: net.minecraft.world.level.Level$ExplosionInteraction
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/Level.java
  • Type: enum
  • Modifiers: public
  • Implements: StringRepresentable

net.minecraft.world.level.Level$ExplosionInteraction#getSerializedName()

  • Origin: common
  • Source: net/minecraft/world/level/Level.java:1000
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Serialized Name

ทำงานยังไง

คืนค่า: this.id.

Parameters

  • ไม่มี

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

Level.ExplosionInteraction instance = ...;
String result = instance.getSerializedName();

LevelAccessor

  • Full name: net.minecraft.world.level.LevelAccessor
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/LevelAccessor.java
  • Type: interface
  • Modifiers: public
  • Implements: CommonLevelAccessor,LevelTimeAccess,ScheduledTickAccess

net.minecraft.world.level.LevelAccessor#addParticle(ParticleOptions,double,double,double,double,double,double)

  • Origin: common
  • Source: net/minecraft/world/level/LevelAccessor.java:79
  • Modifiers: ``
  • Return: void

คืออะไร

เพิ่ม Particle

ทำงานยังไง

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

Parameters

  • ParticleOptions particleOptions
  • double d
  • double e
  • double f
  • double g
  • double h
  • double i

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

LevelAccessor instance = ...;
ParticleOptions particleOptions = ...;
instance.addParticle(particleOptions, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);

net.minecraft.world.level.LevelAccessor#blockUpdated(BlockPos,Block)

  • Origin: common
  • Source: net/minecraft/world/level/LevelAccessor.java:66
  • Modifiers: default
  • Return: void

คืออะไร

ดำเนินการ blockUpdated ตาม implementation ของ LevelAccessor

ทำงานยังไง

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

Parameters

  • BlockPos blockPos
  • Block block

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

LevelAccessor instance = ...;
BlockPos blockPos = ...;
Block block = ...;
instance.blockUpdated(blockPos, block);

net.minecraft.world.level.LevelAccessor#createTick(BlockPos,T,int)

  • Origin: common
  • Source: net/minecraft/world/level/LevelAccessor.java:41
  • Modifiers: default
  • Return: ScheduledTick<T>

คืออะไร

สร้าง Tick

ทำงานยังไง

เรียกต่อ: getLevelData(), getGameTime(), nextSubTickCount(). สร้างออบเจ็กต์: ScheduledTick<>. คืนค่า: new ScheduledTick<>(object, blockPos, this.getLevelData().getGameTime() + i, this.nextSubTickCount()).

Parameters

  • BlockPos blockPos
  • T object
  • int i

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

LevelAccessor instance = ...;
BlockPos blockPos = ...;
T object = ...;
ScheduledTick<T> result = instance.createTick(blockPos, object, 0);

net.minecraft.world.level.LevelAccessor#createTick(BlockPos,T,int,TickPriority)

  • Origin: common
  • Source: net/minecraft/world/level/LevelAccessor.java:36
  • Modifiers: default
  • Return: ScheduledTick<T>

คืออะไร

สร้าง Tick

ทำงานยังไง

เรียกต่อ: getLevelData(), getGameTime(), nextSubTickCount(). สร้างออบเจ็กต์: ScheduledTick<>. คืนค่า: new ScheduledTick<>(object, blockPos, this.getLevelData().getGameTime() + i, tickPriority, this.nextSubTickCount()).

Parameters

  • BlockPos blockPos
  • T object
  • int i
  • TickPriority tickPriority

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

LevelAccessor instance = ...;
BlockPos blockPos = ...;
T object = ...;
TickPriority tickPriority = ...;
ScheduledTick<T> result = instance.createTick(blockPos, object, 0, tickPriority);

net.minecraft.world.level.LevelAccessor#dayTime()

  • Origin: common
  • Source: net/minecraft/world/level/LevelAccessor.java:29
  • Modifiers: default
  • Return: long

คืออะไร

ดำเนินการ dayTime ตาม implementation ของ LevelAccessor

ทำงานยังไง

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

Parameters

  • ไม่มี

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

LevelAccessor instance = ...;
long result = instance.dayTime();

net.minecraft.world.level.LevelAccessor#gameEvent(Entity,Holder<GameEvent>,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/LevelAccessor.java:93
  • Modifiers: default
  • Return: void

คืออะไร

ดำเนินการ gameEvent ตาม implementation ของ LevelAccessor

ทำงานยังไง

เรียกต่อ: Context(). สร้างออบเจ็กต์: GameEvent.Context.

Parameters

  • Entity entity
  • Holder<GameEvent> holder
  • BlockPos blockPos

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

LevelAccessor instance = ...;
Entity entity = ...;
Holder<GameEvent> holder = ...;
BlockPos blockPos = ...;
instance.gameEvent(entity, holder, blockPos);

net.minecraft.world.level.LevelAccessor#gameEvent(Entity,Holder<GameEvent>,Vec3)

  • Origin: common
  • Source: net/minecraft/world/level/LevelAccessor.java:89
  • Modifiers: default
  • Return: void

คืออะไร

ดำเนินการ gameEvent ตาม implementation ของ LevelAccessor

ทำงานยังไง

เรียกต่อ: Context(). สร้างออบเจ็กต์: GameEvent.Context.

Parameters

  • Entity entity
  • Holder<GameEvent> holder
  • Vec3 vec3

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

LevelAccessor instance = ...;
Entity entity = ...;
Holder<GameEvent> holder = ...;
Vec3 vec3 = ...;
instance.gameEvent(entity, holder, vec3);

net.minecraft.world.level.LevelAccessor#gameEvent(Holder<GameEvent>,BlockPos,GameEvent.Context)

  • Origin: common
  • Source: net/minecraft/world/level/LevelAccessor.java:97
  • Modifiers: default
  • Return: void

คืออะไร

ดำเนินการ gameEvent ตาม implementation ของ LevelAccessor

ทำงานยังไง

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

Parameters

  • Holder<GameEvent> holder
  • BlockPos blockPos
  • GameEvent.Context context

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

LevelAccessor instance = ...;
Holder<GameEvent> holder = ...;
BlockPos blockPos = ...;
GameEvent.Context context = ...;
instance.gameEvent(holder, blockPos, context);

net.minecraft.world.level.LevelAccessor#gameEvent(Holder<GameEvent>,Vec3,GameEvent.Context)

  • Origin: common
  • Source: net/minecraft/world/level/LevelAccessor.java:87
  • Modifiers: ``
  • Return: void

คืออะไร

ดำเนินการ gameEvent ตาม implementation ของ LevelAccessor

ทำงานยังไง

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

Parameters

  • Holder<GameEvent> holder
  • Vec3 vec3
  • GameEvent.Context context

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

LevelAccessor instance = ...;
Holder<GameEvent> holder = ...;
Vec3 vec3 = ...;
GameEvent.Context context = ...;
instance.gameEvent(holder, vec3, context);

net.minecraft.world.level.LevelAccessor#gameEvent(ResourceKey<GameEvent>,BlockPos,GameEvent.Context)

  • Origin: common
  • Source: net/minecraft/world/level/LevelAccessor.java:101
  • Modifiers: default
  • Return: void

คืออะไร

ดำเนินการ gameEvent ตาม implementation ของ LevelAccessor

ทำงานยังไง

เรียกต่อ: registryAccess(), lookupOrThrow(), getOrThrow().

Parameters

  • ResourceKey<GameEvent> resourceKey
  • BlockPos blockPos
  • GameEvent.Context context

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

LevelAccessor instance = ...;
ResourceKey<GameEvent> resourceKey = ...;
BlockPos blockPos = ...;
GameEvent.Context context = ...;
instance.gameEvent(resourceKey, blockPos, context);

net.minecraft.world.level.LevelAccessor#getChunkSource()

  • Origin: common
  • Source: net/minecraft/world/level/LevelAccessor.java:57
  • Modifiers: ``
  • Return: ChunkSource

คืออะไร

อ่านค่า Chunk Source

ทำงานยังไง

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

Parameters

  • ไม่มี

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

LevelAccessor instance = ...;
ChunkSource result = instance.getChunkSource();

net.minecraft.world.level.LevelAccessor#getCurrentDifficultyAt(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/LevelAccessor.java:48
  • Modifiers: ``
  • Return: DifficultyInstance

คืออะไร

อ่านค่า Current Difficulty At

ทำงานยังไง

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

Parameters

  • BlockPos blockPos

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

LevelAccessor instance = ...;
BlockPos blockPos = ...;
DifficultyInstance result = instance.getCurrentDifficultyAt(blockPos);

net.minecraft.world.level.LevelAccessor#getDifficulty()

  • Origin: common
  • Source: net/minecraft/world/level/LevelAccessor.java:53
  • Modifiers: default
  • Return: Difficulty

คืออะไร

อ่านค่า Difficulty

ทำงานยังไง

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

Parameters

  • ไม่มี

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

LevelAccessor instance = ...;
Difficulty result = instance.getDifficulty();

net.minecraft.world.level.LevelAccessor#getLevelData()

  • Origin: common
  • Source: net/minecraft/world/level/LevelAccessor.java:46
  • Modifiers: ``
  • Return: LevelData

คืออะไร

อ่านค่า Level Data

ทำงานยังไง

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

Parameters

  • ไม่มี

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

LevelAccessor instance = ...;
LevelData result = instance.getLevelData();

net.minecraft.world.level.LevelAccessor#getRandom()

  • Origin: common
  • Source: net/minecraft/world/level/LevelAccessor.java:64
  • Modifiers: ``
  • Return: RandomSource

คืออะไร

อ่านค่า Random

ทำงานยังไง

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

Parameters

  • ไม่มี

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

LevelAccessor instance = ...;
RandomSource result = instance.getRandom();

net.minecraft.world.level.LevelAccessor#getServer()

  • Origin: common
  • Source: net/minecraft/world/level/LevelAccessor.java:50
  • Modifiers: ``
  • Return: MinecraftServer

คืออะไร

อ่านค่า Server

ทำงานยังไง

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

Parameters

  • ไม่มี

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

LevelAccessor instance = ...;
MinecraftServer result = instance.getServer();

net.minecraft.world.level.LevelAccessor#hasChunk(int,int)

  • Origin: common
  • Source: net/minecraft/world/level/LevelAccessor.java:59
  • Modifiers: default
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: getChunkSource(). คืนค่า: this.getChunkSource().hasChunk(i, j).

Parameters

  • int i
  • int j

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

LevelAccessor instance = ...;
boolean result = instance.hasChunk(0, 0);

net.minecraft.world.level.LevelAccessor#levelEvent(int,BlockPos,int)

  • Origin: common
  • Source: net/minecraft/world/level/LevelAccessor.java:83
  • Modifiers: default
  • Return: void

คืออะไร

ดำเนินการ levelEvent ตาม implementation ของ LevelAccessor

ทำงานยังไง

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

Parameters

  • int i
  • BlockPos blockPos
  • int j

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

LevelAccessor instance = ...;
BlockPos blockPos = ...;
instance.levelEvent(0, blockPos, 0);

net.minecraft.world.level.LevelAccessor#levelEvent(Player,int,BlockPos,int)

  • Origin: common
  • Source: net/minecraft/world/level/LevelAccessor.java:81
  • Modifiers: ``
  • Return: void

คืออะไร

ดำเนินการ levelEvent ตาม implementation ของ LevelAccessor

ทำงานยังไง

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

Parameters

  • Player player
  • int i
  • BlockPos blockPos
  • int j

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

LevelAccessor instance = ...;
Player player = ...;
BlockPos blockPos = ...;
instance.levelEvent(player, 0, blockPos, 0);

net.minecraft.world.level.LevelAccessor#neighborShapeChanged(Direction,BlockPos,BlockPos,BlockState,int,int)

  • Origin: common
  • Source: net/minecraft/world/level/LevelAccessor.java:69
  • Modifiers: default
  • Return: void

คืออะไร

ดำเนินการ neighborShapeChanged ตาม implementation ของ LevelAccessor

ทำงานยังไง

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

Parameters

  • Direction direction
  • BlockPos blockPos
  • BlockPos blockPos2
  • BlockState blockState
  • int i
  • int j

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

LevelAccessor instance = ...;
Direction direction = ...;
BlockPos blockPos = ...;
BlockPos blockPos2 = ...;
BlockState blockState = ...;
instance.neighborShapeChanged(direction, blockPos, blockPos2, blockState, 0, 0);

net.minecraft.world.level.LevelAccessor#nextSubTickCount()

  • Origin: common
  • Source: net/minecraft/world/level/LevelAccessor.java:34
  • Modifiers: ``
  • Return: long

คืออะไร

ดำเนินการ nextSubTickCount ตาม implementation ของ LevelAccessor

ทำงานยังไง

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

Parameters

  • ไม่มี

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

LevelAccessor instance = ...;
long result = instance.nextSubTickCount();

net.minecraft.world.level.LevelAccessor#playSound(Player,BlockPos,SoundEvent,SoundSource)

  • Origin: common
  • Source: net/minecraft/world/level/LevelAccessor.java:73
  • Modifiers: default
  • Return: void

คืออะไร

ดำเนินการ playSound ตาม implementation ของ LevelAccessor

ทำงานยังไง

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

Parameters

  • Player player
  • BlockPos blockPos
  • SoundEvent soundEvent
  • SoundSource soundSource

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

LevelAccessor instance = ...;
Player player = ...;
BlockPos blockPos = ...;
SoundEvent soundEvent = ...;
SoundSource soundSource = ...;
instance.playSound(player, blockPos, soundEvent, soundSource);

net.minecraft.world.level.LevelAccessor#playSound(Player,BlockPos,SoundEvent,SoundSource,float,float)

  • Origin: common
  • Source: net/minecraft/world/level/LevelAccessor.java:77
  • Modifiers: ``
  • Return: void

คืออะไร

ดำเนินการ playSound ตาม implementation ของ LevelAccessor

ทำงานยังไง

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

Parameters

  • Player player
  • BlockPos blockPos
  • SoundEvent soundEvent
  • SoundSource soundSource
  • float f
  • float g

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

LevelAccessor instance = ...;
Player player = ...;
BlockPos blockPos = ...;
SoundEvent soundEvent = ...;
SoundSource soundSource = ...;
instance.playSound(player, blockPos, soundEvent, soundSource, 0.0F, 0.0F);

LevelHeightAccessor

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

net.minecraft.world.level.LevelHeightAccessor#create(int,int)

  • Origin: common
  • Source: net/minecraft/world/level/LevelHeightAccessor.java:51
  • Modifiers: static
  • Return: LevelHeightAccessor

คืออะไร

สร้าง create

ทำงานยังไง

เรียกต่อ: getHeight(), getMinY(). สร้างออบเจ็กต์: LevelHeightAccessor. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • int i
  • int j

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

LevelHeightAccessor result = LevelHeightAccessor.create(0, 0);

net.minecraft.world.level.LevelHeightAccessor#getHeight()

  • Origin: common
  • Source: net/minecraft/world/level/LevelHeightAccessor.java:7
  • Modifiers: ``
  • Return: int

คืออะไร

อ่านค่า Height

ทำงานยังไง

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

Parameters

  • ไม่มี

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

LevelHeightAccessor instance = ...;
int result = instance.getHeight();

net.minecraft.world.level.LevelHeightAccessor#getMaxSectionY()

  • Origin: common
  • Source: net/minecraft/world/level/LevelHeightAccessor.java:23
  • Modifiers: default
  • Return: int

คืออะไร

อ่านค่า Max Section Y

ทำงานยังไง

เรียกต่อ: blockToSectionCoord(), getMaxY(). คืนค่า: SectionPos.blockToSectionCoord(this.getMaxY()).

Parameters

  • ไม่มี

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

LevelHeightAccessor instance = ...;
int result = instance.getMaxSectionY();

net.minecraft.world.level.LevelHeightAccessor#getMaxY()

  • Origin: common
  • Source: net/minecraft/world/level/LevelHeightAccessor.java:11
  • Modifiers: default
  • Return: int

คืออะไร

อ่านค่า Max Y

ทำงานยังไง

เรียกต่อ: getMinY(), getHeight(). คืนค่า: this.getMinY() + this.getHeight() - 1.

Parameters

  • ไม่มี

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

LevelHeightAccessor instance = ...;
int result = instance.getMaxY();

net.minecraft.world.level.LevelHeightAccessor#getMinSectionY()

  • Origin: common
  • Source: net/minecraft/world/level/LevelHeightAccessor.java:19
  • Modifiers: default
  • Return: int

คืออะไร

อ่านค่า Min Section Y

ทำงานยังไง

เรียกต่อ: blockToSectionCoord(), getMinY(). คืนค่า: SectionPos.blockToSectionCoord(this.getMinY()).

Parameters

  • ไม่มี

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

LevelHeightAccessor instance = ...;
int result = instance.getMinSectionY();

net.minecraft.world.level.LevelHeightAccessor#getMinY()

  • Origin: common
  • Source: net/minecraft/world/level/LevelHeightAccessor.java:9
  • Modifiers: ``
  • Return: int

คืออะไร

อ่านค่า Min Y

ทำงานยังไง

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

Parameters

  • ไม่มี

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

LevelHeightAccessor instance = ...;
int result = instance.getMinY();

net.minecraft.world.level.LevelHeightAccessor#getSectionIndex(int)

  • Origin: common
  • Source: net/minecraft/world/level/LevelHeightAccessor.java:39
  • Modifiers: default
  • Return: int

คืออะไร

อ่านค่า Section Index

ทำงานยังไง

เรียกต่อ: getSectionIndexFromSectionY(), blockToSectionCoord(). คืนค่า: this.getSectionIndexFromSectionY(SectionPos.blockToSectionCoord(i)).

Parameters

  • int i

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

LevelHeightAccessor instance = ...;
int result = instance.getSectionIndex(0);

net.minecraft.world.level.LevelHeightAccessor#getSectionIndexFromSectionY(int)

  • Origin: common
  • Source: net/minecraft/world/level/LevelHeightAccessor.java:43
  • Modifiers: default
  • Return: int

คืออะไร

อ่านค่า Section Index From Section Y

ทำงานยังไง

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

Parameters

  • int i

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

LevelHeightAccessor instance = ...;
int result = instance.getSectionIndexFromSectionY(0);

net.minecraft.world.level.LevelHeightAccessor#getSectionsCount()

  • Origin: common
  • Source: net/minecraft/world/level/LevelHeightAccessor.java:15
  • Modifiers: default
  • Return: int

คืออะไร

อ่านค่า Sections Count

ทำงานยังไง

เรียกต่อ: getMaxSectionY(), getMinSectionY(). คืนค่า: this.getMaxSectionY() - this.getMinSectionY() + 1.

Parameters

  • ไม่มี

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

LevelHeightAccessor instance = ...;
int result = instance.getSectionsCount();

net.minecraft.world.level.LevelHeightAccessor#getSectionYFromSectionIndex(int)

  • Origin: common
  • Source: net/minecraft/world/level/LevelHeightAccessor.java:47
  • Modifiers: default
  • Return: int

คืออะไร

อ่านค่า Section YFrom Section Index

ทำงานยังไง

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

Parameters

  • int i

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

LevelHeightAccessor instance = ...;
int result = instance.getSectionYFromSectionIndex(0);

net.minecraft.world.level.LevelHeightAccessor#isInsideBuildHeight(int)

  • Origin: common
  • Source: net/minecraft/world/level/LevelHeightAccessor.java:27
  • Modifiers: default
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Inside Build Height

ทำงานยังไง

เรียกต่อ: getMinY(), getMaxY(). คืนค่า: i >= this.getMinY() && i <= this.getMaxY().

Parameters

  • int i

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

LevelHeightAccessor instance = ...;
boolean result = instance.isInsideBuildHeight(0);

net.minecraft.world.level.LevelHeightAccessor#isOutsideBuildHeight(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/LevelHeightAccessor.java:31
  • Modifiers: default
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Outside Build Height

ทำงานยังไง

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

Parameters

  • BlockPos blockPos

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

LevelHeightAccessor instance = ...;
BlockPos blockPos = ...;
boolean result = instance.isOutsideBuildHeight(blockPos);

net.minecraft.world.level.LevelHeightAccessor#isOutsideBuildHeight(int)

  • Origin: common
  • Source: net/minecraft/world/level/LevelHeightAccessor.java:35
  • Modifiers: default
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Outside Build Height

ทำงานยังไง

เรียกต่อ: getMinY(), getMaxY(). คืนค่า: i < this.getMinY() || i > this.getMaxY().

Parameters

  • int i

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

LevelHeightAccessor instance = ...;
boolean result = instance.isOutsideBuildHeight(0);

LevelReader

  • Full name: net.minecraft.world.level.LevelReader
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/LevelReader.java
  • Type: interface
  • Modifiers: public
  • Implements: BlockAndTintGetter,CollisionGetter,SignalGetter,BiomeManager.NoiseBiomeSource

net.minecraft.world.level.LevelReader#canSeeSkyFromBelowWater(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:89
  • Modifiers: default
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ See Sky From Below Water

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getY(), getSeaLevel(), canSeeSky(), getX(), getZ(), below(), getBlockState(), getLightBlock(). สร้างออบเจ็กต์: BlockPos. มีจุด return อย่างน้อย 4 จุด.

Parameters

  • BlockPos blockPos

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

LevelReader instance = ...;
BlockPos blockPos = ...;
boolean result = instance.canSeeSkyFromBelowWater(blockPos);

net.minecraft.world.level.LevelReader#containsAnyLiquid(AABB)

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:142
  • Modifiers: default
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Any Liquid

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: floor(), ceil(), MutableBlockPos(), getBlockState(), set(), getFluidState(), isEmpty(). สร้างออบเจ็กต์: BlockPos.MutableBlockPos. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • AABB aABB

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

LevelReader instance = ...;
AABB aABB = ...;
boolean result = instance.containsAnyLiquid(aABB);

net.minecraft.world.level.LevelReader#dimensionType()

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:69
  • Modifiers: ``
  • Return: DimensionType

คืออะไร

ดำเนินการ dimensionType ตาม implementation ของ LevelReader

ทำงานยังไง

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

Parameters

  • ไม่มี

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

LevelReader instance = ...;
DimensionType result = instance.dimensionType();

net.minecraft.world.level.LevelReader#enabledFeatures()

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:215
  • Modifiers: ``
  • Return: FeatureFlagSet

คืออะไร

ดำเนินการ enabledFeatures ตาม implementation ของ LevelReader

ทำงานยังไง

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

Parameters

  • ไม่มี

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

LevelReader instance = ...;
FeatureFlagSet result = instance.enabledFeatures();

net.minecraft.world.level.LevelReader#getBiome(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:38
  • Modifiers: default
  • Return: Holder<Biome>

คืออะไร

อ่านค่า Biome

ทำงานยังไง

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

Parameters

  • BlockPos blockPos

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

LevelReader instance = ...;
BlockPos blockPos = ...;
Holder<Biome> result = instance.getBiome(blockPos);

net.minecraft.world.level.LevelReader#getBiomeManager()

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:36
  • Modifiers: ``
  • Return: BiomeManager

คืออะไร

อ่านค่า Biome Manager

ทำงานยังไง

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

Parameters

  • ไม่มี

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

LevelReader instance = ...;
BiomeManager result = instance.getBiomeManager();

net.minecraft.world.level.LevelReader#getBlockStatesIfLoaded(AABB)

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:42
  • Modifiers: default
  • Return: Stream<BlockState>

คืออะไร

อ่านค่า Block States If Loaded

ทำงานยังไง

เรียกต่อ: floor(), hasChunksAt(), getBlockStates(), empty(). คืนค่า: this.hasChunksAt(i, k, m, j, l, n) ? this.getBlockStates(aABB) : Stream.empty().

Parameters

  • AABB aABB

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

LevelReader instance = ...;
AABB aABB = ...;
Stream<BlockState> result = instance.getBlockStatesIfLoaded(aABB);

net.minecraft.world.level.LevelReader#getBlockTint(BlockPos,ColorResolver)

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:52
  • Modifiers: default
  • Return: int

คืออะไร

อ่านค่า Block Tint

ทำงานยังไง

เรียกต่อ: getColor(), getBiome(), value(), getX(), getZ(). คืนค่า: colorResolver.getColor(this.getBiome(blockPos).value(), blockPos.getX(), blockPos.getZ()).

Parameters

  • BlockPos blockPos
  • ColorResolver colorResolver

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

LevelReader instance = ...;
BlockPos blockPos = ...;
ColorResolver colorResolver = ...;
int result = instance.getBlockTint(blockPos, colorResolver);

net.minecraft.world.level.LevelReader#getChunk(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:120
  • Modifiers: default
  • Return: ChunkAccess

คืออะไร

อ่านค่า Chunk

ทำงานยังไง

เรียกต่อ: blockToSectionCoord(), getX(), getZ(). คืนค่า: this.getChunk(SectionPos.blockToSectionCoord(blockPos.getX()), SectionPos.blockToSectionCoord(blockPos.getZ())).

Parameters

  • BlockPos blockPos

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

LevelReader instance = ...;
BlockPos blockPos = ...;
ChunkAccess result = instance.getChunk(blockPos);

net.minecraft.world.level.LevelReader#getChunk(int,int)

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:124
  • Modifiers: default
  • Return: ChunkAccess

คืออะไร

อ่านค่า Chunk

ทำงานยังไง

คืนค่า: this.getChunk(i, j, ChunkStatus.FULL, true).

Parameters

  • int i
  • int j

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

LevelReader instance = ...;
ChunkAccess result = instance.getChunk(0, 0);

net.minecraft.world.level.LevelReader#getChunk(int,int,ChunkStatus)

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:128
  • Modifiers: default
  • Return: ChunkAccess

คืออะไร

อ่านค่า Chunk

ทำงานยังไง

คืนค่า: this.getChunk(i, j, chunkStatus, true).

Parameters

  • int i
  • int j
  • ChunkStatus chunkStatus

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

LevelReader instance = ...;
ChunkStatus chunkStatus = ...;
ChunkAccess result = instance.getChunk(0, 0, chunkStatus);

net.minecraft.world.level.LevelReader#getChunk(int,int,ChunkStatus,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:26
  • Modifiers: ``
  • Return: ChunkAccess

คืออะไร

อ่านค่า Chunk

ทำงานยังไง

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

Parameters

  • int i
  • int j
  • ChunkStatus chunkStatus
  • boolean bl

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

LevelReader instance = ...;
ChunkStatus chunkStatus = ...;
ChunkAccess result = instance.getChunk(0, 0, chunkStatus, true);

net.minecraft.world.level.LevelReader#getChunkForCollisions(int,int)

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:132
  • Modifiers: default
  • Return: BlockGetter

คืออะไร

อ่านค่า Chunk For Collisions

ทำงานยังไง

เรียกต่อ: getChunk(). คืนค่า: this.getChunk(i, j, ChunkStatus.EMPTY, false).

Parameters

  • int i
  • int j

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

LevelReader instance = ...;
BlockGetter result = instance.getChunkForCollisions(0, 0);

net.minecraft.world.level.LevelReader#getHeight()

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:76
  • Modifiers: default
  • Return: int

คืออะไร

อ่านค่า Height

ทำงานยังไง

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

Parameters

  • ไม่มี

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

LevelReader instance = ...;
int result = instance.getHeight();

net.minecraft.world.level.LevelReader#getHeight(Heightmap.Types,int,int)

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:32
  • Modifiers: ``
  • Return: int

คืออะไร

อ่านค่า Height

ทำงานยังไง

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

Parameters

  • Heightmap.Types types
  • int i
  • int j

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

LevelReader instance = ...;
Heightmap.Types types = ...;
int result = instance.getHeight(types, 0, 0);

net.minecraft.world.level.LevelReader#getHeightmapPos(Heightmap.Types,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:81
  • Modifiers: default
  • Return: BlockPos

คืออะไร

อ่านค่า Heightmap Pos

ทำงานยังไง

เรียกต่อ: getX(), getHeight(), getZ(). สร้างออบเจ็กต์: BlockPos. คืนค่า: new BlockPos(blockPos.getX(), this.getHeight(types, blockPos.getX(), blockPos.getZ()), blockPos.getZ()).

Parameters

  • Heightmap.Types types
  • BlockPos blockPos

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

LevelReader instance = ...;
Heightmap.Types types = ...;
BlockPos blockPos = ...;
BlockPos result = instance.getHeightmapPos(types, blockPos);

net.minecraft.world.level.LevelReader#getLightLevelDependentMagicValue(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:113
  • Modifiers: default
  • Return: float

คืออะไร

อ่านค่า Light Level Dependent Magic Value

ทำงานยังไง

เรียกต่อ: getMaxLocalRawBrightness(), lerp(), dimensionType(), ambientLight(). คืนค่า: Mth.lerp(this.dimensionType().ambientLight(), g, 1.0F).

Parameters

  • BlockPos blockPos

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

LevelReader instance = ...;
BlockPos blockPos = ...;
float result = instance.getLightLevelDependentMagicValue(blockPos);

net.minecraft.world.level.LevelReader#getMaxLocalRawBrightness(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:165
  • Modifiers: default
  • Return: int

คืออะไร

อ่านค่า Max Local Raw Brightness

ทำงานยังไง

เรียกต่อ: getSkyDarken(). คืนค่า: this.getMaxLocalRawBrightness(blockPos, this.getSkyDarken()).

Parameters

  • BlockPos blockPos

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

LevelReader instance = ...;
BlockPos blockPos = ...;
int result = instance.getMaxLocalRawBrightness(blockPos);

net.minecraft.world.level.LevelReader#getMaxLocalRawBrightness(BlockPos,int)

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:169
  • Modifiers: default
  • Return: int

คืออะไร

อ่านค่า Max Local Raw Brightness

ทำงานยังไง

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

Parameters

  • BlockPos blockPos
  • int i

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

LevelReader instance = ...;
BlockPos blockPos = ...;
int result = instance.getMaxLocalRawBrightness(blockPos, 0);

net.minecraft.world.level.LevelReader#getMinY()

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:71
  • Modifiers: default
  • Return: int

คืออะไร

อ่านค่า Min Y

ทำงานยังไง

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

Parameters

  • ไม่มี

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

LevelReader instance = ...;
int result = instance.getMinY();

net.minecraft.world.level.LevelReader#getNoiseBiome(int,int,int)

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:57
  • Modifiers: default
  • Return: Holder<Biome>

คืออะไร

อ่านค่า Noise Biome

ทำงานยังไง

เรียกต่อ: getChunk(), toSection(), getUncachedNoiseBiome(). คืนค่า: chunkAccess != null ? chunkAccess.getNoiseBiome(i, j, k) : this.getUncachedNoiseBiome(i, j, k).

Parameters

  • int i
  • int j
  • int k

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

LevelReader instance = ...;
Holder<Biome> result = instance.getNoiseBiome(0, 0, 0);

net.minecraft.world.level.LevelReader#getPathfindingCostFromLightLevels(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:109
  • Modifiers: default
  • Return: float

คืออะไร

อ่านค่า Pathfinding Cost From Light Levels

ทำงานยังไง

เรียกต่อ: getLightLevelDependentMagicValue(). คืนค่า: this.getLightLevelDependentMagicValue(blockPos) - 0.5F.

Parameters

  • BlockPos blockPos

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

LevelReader instance = ...;
BlockPos blockPos = ...;
float result = instance.getPathfindingCostFromLightLevels(blockPos);

net.minecraft.world.level.LevelReader#getSeaLevel()

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:67
  • Modifiers: ``
  • Return: int

คืออะไร

อ่านค่า Sea Level

ทำงานยังไง

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

Parameters

  • ไม่มี

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

LevelReader instance = ...;
int result = instance.getSeaLevel();

net.minecraft.world.level.LevelReader#getSkyDarken()

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:34
  • Modifiers: ``
  • Return: int

คืออะไร

อ่านค่า Sky Darken

ทำงานยังไง

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

Parameters

  • ไม่มี

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

LevelReader instance = ...;
int result = instance.getSkyDarken();

net.minecraft.world.level.LevelReader#getUncachedNoiseBiome(int,int,int)

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:63
  • Modifiers: ``
  • Return: Holder<Biome>

คืออะไร

อ่านค่า Uncached Noise Biome

ทำงานยังไง

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

Parameters

  • int i
  • int j
  • int k

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

LevelReader instance = ...;
Holder<Biome> result = instance.getUncachedNoiseBiome(0, 0, 0);

net.minecraft.world.level.LevelReader#hasChunk(int,int)

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:29
  • Modifiers: ``
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • int i
  • int j

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

LevelReader instance = ...;
boolean result = instance.hasChunk(0, 0);

net.minecraft.world.level.LevelReader#hasChunkAt(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:180
  • Modifiers: default
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Chunk At

ทำงานยังไง

เรียกต่อ: getX(), getZ(). คืนค่า: this.hasChunkAt(blockPos.getX(), blockPos.getZ()).

Parameters

  • BlockPos blockPos

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

LevelReader instance = ...;
BlockPos blockPos = ...;
boolean result = instance.hasChunkAt(blockPos);

net.minecraft.world.level.LevelReader#hasChunkAt(int,int)

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:175
  • Modifiers: default
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Chunk At

ทำงานยังไง

เรียกต่อ: hasChunk(), blockToSectionCoord(). คืนค่า: this.hasChunk(SectionPos.blockToSectionCoord(i), SectionPos.blockToSectionCoord(j)).

Parameters

  • int i
  • int j

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

LevelReader instance = ...;
boolean result = instance.hasChunkAt(0, 0);

net.minecraft.world.level.LevelReader#hasChunksAt(BlockPos,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:185
  • Modifiers: default
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Chunks At

ทำงานยังไง

เรียกต่อ: getX(), getY(), getZ(). คืนค่า: this.hasChunksAt(blockPos.getX(), blockPos.getY(), blockPos.getZ(), blockPos2.getX(), blockPos2.getY(), blockPos2.getZ()).

Parameters

  • BlockPos blockPos
  • BlockPos blockPos2

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

LevelReader instance = ...;
BlockPos blockPos = ...;
BlockPos blockPos2 = ...;
boolean result = instance.hasChunksAt(blockPos, blockPos2);

net.minecraft.world.level.LevelReader#hasChunksAt(int,int,int,int)

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:195
  • Modifiers: default
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Chunks At

ทำงานยังไง

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

Parameters

  • int i
  • int j
  • int k
  • int l

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

LevelReader instance = ...;
boolean result = instance.hasChunksAt(0, 0, 0, 0);

net.minecraft.world.level.LevelReader#hasChunksAt(int,int,int,int,int,int)

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:190
  • Modifiers: default
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Chunks At

ทำงานยังไง

เรียกต่อ: getMinY(), getMaxY(). คืนค่า: m >= this.getMinY() && j <= this.getMaxY() ? this.hasChunksAt(i, k, l, n) : false.

Parameters

  • int i
  • int j
  • int k
  • int l
  • int m
  • int n

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

LevelReader instance = ...;
boolean result = instance.hasChunksAt(0, 0, 0, 0, 0, 0);

net.minecraft.world.level.LevelReader#holderLookup(ResourceKey<? extends Registry<? extends T>>)

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:217
  • Modifiers: default
  • Return: HolderLookup<T>

คืออะไร

ดำเนินการ holderLookup ตาม implementation ของ LevelReader

ทำงานยังไง

เรียกต่อ: registryAccess(), lookupOrThrow(), filterFeatures(), enabledFeatures(). คืนค่า: registry.filterFeatures(this.enabledFeatures()).

Parameters

  • ResourceKey<? extends Registry<? extends T>> resourceKey

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

LevelReader instance = ...;
ResourceKey<? extends Registry<? extends T>> resourceKey = ...;
HolderLookup<T> result = instance.holderLookup(resourceKey);

net.minecraft.world.level.LevelReader#isClientSide()

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:65
  • Modifiers: ``
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Client Side

ทำงานยังไง

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

Parameters

  • ไม่มี

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

LevelReader instance = ...;
boolean result = instance.isClientSide();

net.minecraft.world.level.LevelReader#isEmptyBlock(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:85
  • Modifiers: default
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: getBlockState(), isAir(). คืนค่า: this.getBlockState(blockPos).isAir().

Parameters

  • BlockPos blockPos

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

LevelReader instance = ...;
BlockPos blockPos = ...;
boolean result = instance.isEmptyBlock(blockPos);

net.minecraft.world.level.LevelReader#isWaterAt(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:138
  • Modifiers: default
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Water At

ทำงานยังไง

เรียกต่อ: getFluidState(), is(). คืนค่า: this.getFluidState(blockPos).is(FluidTags.WATER).

Parameters

  • BlockPos blockPos

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

LevelReader instance = ...;
BlockPos blockPos = ...;
boolean result = instance.isWaterAt(blockPos);

net.minecraft.world.level.LevelReader#registryAccess()

  • Origin: common
  • Source: net/minecraft/world/level/LevelReader.java:213
  • Modifiers: ``
  • Return: RegistryAccess

คืออะไร

ดำเนินการ registryAccess ตาม implementation ของ LevelReader

ทำงานยังไง

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

Parameters

  • ไม่มี

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

LevelReader instance = ...;
RegistryAccess result = instance.registryAccess();

LevelSettings

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

net.minecraft.world.level.LevelSettings#allowCommands()

  • Origin: common
  • Source: net/minecraft/world/level/LevelSettings.java:56
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ allowCommands ตาม implementation ของ LevelSettings

ทำงานยังไง

คืนค่า: this.allowCommands.

Parameters

  • ไม่มี

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

LevelSettings instance = ...;
boolean result = instance.allowCommands();

net.minecraft.world.level.LevelSettings#copy()

  • Origin: common
  • Source: net/minecraft/world/level/LevelSettings.java:80
  • Modifiers: public
  • Return: LevelSettings

คืออะไร

คัดลอก copy

ทำงานยังไง

เรียกต่อ: enabledFeatures(). สร้างออบเจ็กต์: LevelSettings.

Parameters

  • ไม่มี

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

LevelSettings instance = ...;
LevelSettings result = instance.copy();

net.minecraft.world.level.LevelSettings#difficulty()

  • Origin: common
  • Source: net/minecraft/world/level/LevelSettings.java:52
  • Modifiers: public
  • Return: Difficulty

คืออะไร

ดำเนินการ difficulty ตาม implementation ของ LevelSettings

ทำงานยังไง

คืนค่า: this.difficulty.

Parameters

  • ไม่มี

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

LevelSettings instance = ...;
Difficulty result = instance.difficulty();

net.minecraft.world.level.LevelSettings#gameRules()

  • Origin: common
  • Source: net/minecraft/world/level/LevelSettings.java:60
  • Modifiers: public
  • Return: GameRules

คืออะไร

ดำเนินการ gameRules ตาม implementation ของ LevelSettings

ทำงานยังไง

คืนค่า: this.gameRules.

Parameters

  • ไม่มี

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

LevelSettings instance = ...;
GameRules result = instance.gameRules();

net.minecraft.world.level.LevelSettings#gameType()

  • Origin: common
  • Source: net/minecraft/world/level/LevelSettings.java:44
  • Modifiers: public
  • Return: GameType

คืออะไร

ดำเนินการ gameType ตาม implementation ของ LevelSettings

ทำงานยังไง

คืนค่า: this.gameType.

Parameters

  • ไม่มี

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

LevelSettings instance = ...;
GameType result = instance.gameType();

net.minecraft.world.level.LevelSettings#getDataConfiguration()

  • Origin: common
  • Source: net/minecraft/world/level/LevelSettings.java:64
  • Modifiers: public
  • Return: WorldDataConfiguration

คืออะไร

อ่านค่า Data Configuration

ทำงานยังไง

คืนค่า: this.dataConfiguration.

Parameters

  • ไม่มี

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

LevelSettings instance = ...;
WorldDataConfiguration result = instance.getDataConfiguration();

net.minecraft.world.level.LevelSettings#hardcore()

  • Origin: common
  • Source: net/minecraft/world/level/LevelSettings.java:48
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ hardcore ตาม implementation ของ LevelSettings

ทำงานยังไง

คืนค่า: this.hardcore.

Parameters

  • ไม่มี

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

LevelSettings instance = ...;
boolean result = instance.hardcore();

net.minecraft.world.level.LevelSettings#levelName()

  • Origin: common
  • Source: net/minecraft/world/level/LevelSettings.java:40
  • Modifiers: public
  • Return: String

คืออะไร

ดำเนินการ levelName ตาม implementation ของ LevelSettings

ทำงานยังไง

คืนค่า: this.levelName.

Parameters

  • ไม่มี

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

LevelSettings instance = ...;
String result = instance.levelName();

net.minecraft.world.level.LevelSettings#LevelSettings(String,GameType,boolean,Difficulty,boolean,GameRules,WorldDataConfiguration)

  • Origin: common
  • Source: net/minecraft/world/level/LevelSettings.java:15
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: levelName, gameType, hardcore, difficulty, allowCommands, gameRules.

Parameters

  • String string
  • GameType gameType
  • boolean bl
  • Difficulty difficulty
  • boolean bl2
  • GameRules gameRules
  • WorldDataConfiguration worldDataConfiguration

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

GameType gameType = ...;
Difficulty difficulty = ...;
GameRules gameRules = ...;
WorldDataConfiguration worldDataConfiguration = ...;
LevelSettings instance = new LevelSettings("value", gameType, true, difficulty, true, gameRules, worldDataConfiguration);

net.minecraft.world.level.LevelSettings#parse(Dynamic<?>,WorldDataConfiguration)

  • Origin: common
  • Source: net/minecraft/world/level/LevelSettings.java:27
  • Modifiers: public static
  • Return: LevelSettings

คืออะไร

แปลง/วิเคราะห์ข้อมูล parse

ทำงานยังไง

เรียกต่อ: byId(), get(), asInt(), asString(), asBoolean(), asNumber(), map(), byteValue(). สร้างออบเจ็กต์: LevelSettings, GameRules.

Parameters

  • Dynamic<?> dynamic
  • WorldDataConfiguration worldDataConfiguration

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

Dynamic<?> dynamic = ...;
WorldDataConfiguration worldDataConfiguration = ...;
LevelSettings result = LevelSettings.parse(dynamic, worldDataConfiguration);

net.minecraft.world.level.LevelSettings#withDataConfiguration(WorldDataConfiguration)

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

คืออะไร

ดำเนินการ withDataConfiguration ตาม implementation ของ LevelSettings

ทำงานยังไง

สร้างออบเจ็กต์: LevelSettings. คืนค่า: new LevelSettings(this.levelName, this.gameType, this.hardcore, this.difficulty, this.allowCommands, this.gameRules, worldDataConfiguration).

Parameters

  • WorldDataConfiguration worldDataConfiguration

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

LevelSettings instance = ...;
WorldDataConfiguration worldDataConfiguration = ...;
LevelSettings result = instance.withDataConfiguration(worldDataConfiguration);

net.minecraft.world.level.LevelSettings#withDifficulty(Difficulty)

  • Origin: common
  • Source: net/minecraft/world/level/LevelSettings.java:72
  • Modifiers: public
  • Return: LevelSettings

คืออะไร

ดำเนินการ withDifficulty ตาม implementation ของ LevelSettings

ทำงานยังไง

สร้างออบเจ็กต์: LevelSettings. คืนค่า: new LevelSettings(this.levelName, this.gameType, this.hardcore, difficulty, this.allowCommands, this.gameRules, this.dataConfiguration).

Parameters

  • Difficulty difficulty

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

LevelSettings instance = ...;
Difficulty difficulty = ...;
LevelSettings result = instance.withDifficulty(difficulty);

net.minecraft.world.level.LevelSettings#withGameType(GameType)

  • Origin: common
  • Source: net/minecraft/world/level/LevelSettings.java:68
  • Modifiers: public
  • Return: LevelSettings

คืออะไร

ดำเนินการ withGameType ตาม implementation ของ LevelSettings

ทำงานยังไง

สร้างออบเจ็กต์: LevelSettings. คืนค่า: new LevelSettings(this.levelName, gameType, this.hardcore, this.difficulty, this.allowCommands, this.gameRules, this.dataConfiguration).

Parameters

  • GameType gameType

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

LevelSettings instance = ...;
GameType gameType = ...;
LevelSettings result = instance.withGameType(gameType);

LevelSimulatedReader

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

net.minecraft.world.level.LevelSimulatedReader#getBlockEntity(BlockPos,BlockEntityType<T>)

  • Origin: common
  • Source: net/minecraft/world/level/LevelSimulatedReader.java:17
  • Modifiers: ``
  • Return: Optional<T>

คืออะไร

อ่านค่า Block Entity

ทำงานยังไง

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

Parameters

  • BlockPos blockPos
  • BlockEntityType<T> blockEntityType

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

LevelSimulatedReader instance = ...;
BlockPos blockPos = ...;
BlockEntityType<T> blockEntityType = ...;
Optional<T> result = instance.getBlockEntity(blockPos, blockEntityType);

net.minecraft.world.level.LevelSimulatedReader#getHeightmapPos(Heightmap.Types,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/LevelSimulatedReader.java:19
  • Modifiers: ``
  • Return: BlockPos

คืออะไร

อ่านค่า Heightmap Pos

ทำงานยังไง

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

Parameters

  • Heightmap.Types types
  • BlockPos blockPos

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

LevelSimulatedReader instance = ...;
Heightmap.Types types = ...;
BlockPos blockPos = ...;
BlockPos result = instance.getHeightmapPos(types, blockPos);

net.minecraft.world.level.LevelSimulatedReader#isFluidAtPosition(BlockPos,Predicate<FluidState>)

  • Origin: common
  • Source: net/minecraft/world/level/LevelSimulatedReader.java:15
  • Modifiers: ``
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Fluid At Position

ทำงานยังไง

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

Parameters

  • BlockPos blockPos
  • Predicate<FluidState> predicate

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

LevelSimulatedReader instance = ...;
BlockPos blockPos = ...;
Predicate<FluidState> predicate = ...;
boolean result = instance.isFluidAtPosition(blockPos, predicate);

net.minecraft.world.level.LevelSimulatedReader#isStateAtPosition(BlockPos,Predicate<BlockState>)

  • Origin: common
  • Source: net/minecraft/world/level/LevelSimulatedReader.java:13
  • Modifiers: ``
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ State At Position

ทำงานยังไง

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

Parameters

  • BlockPos blockPos
  • Predicate<BlockState> predicate

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

LevelSimulatedReader instance = ...;
BlockPos blockPos = ...;
Predicate<BlockState> predicate = ...;
boolean result = instance.isStateAtPosition(blockPos, predicate);

LevelTimeAccess

  • Full name: net.minecraft.world.level.LevelTimeAccess
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/LevelTimeAccess.java
  • Type: interface
  • Modifiers: public
  • Implements: LevelReader

net.minecraft.world.level.LevelTimeAccess#dayTime()

  • Origin: common
  • Source: net/minecraft/world/level/LevelTimeAccess.java:6
  • Modifiers: ``
  • Return: long

คืออะไร

ดำเนินการ dayTime ตาม implementation ของ LevelTimeAccess

ทำงานยังไง

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

Parameters

  • ไม่มี

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

LevelTimeAccess instance = ...;
long result = instance.dayTime();

net.minecraft.world.level.LevelTimeAccess#getMoonBrightness()

  • Origin: common
  • Source: net/minecraft/world/level/LevelTimeAccess.java:8
  • Modifiers: default
  • Return: float

คืออะไร

อ่านค่า Moon Brightness

ทำงานยังไง

เรียกต่อ: dimensionType(), moonPhase(), dayTime(). คืนค่า: DimensionType.MOON_BRIGHTNESS_PER_PHASE[this.dimensionType().moonPhase(this.dayTime())].

Parameters

  • ไม่มี

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

LevelTimeAccess instance = ...;
float result = instance.getMoonBrightness();

net.minecraft.world.level.LevelTimeAccess#getMoonPhase()

  • Origin: common
  • Source: net/minecraft/world/level/LevelTimeAccess.java:16
  • Modifiers: default
  • Return: int

คืออะไร

อ่านค่า Moon Phase

ทำงานยังไง

เรียกต่อ: dimensionType(), moonPhase(), dayTime(). คืนค่า: this.dimensionType().moonPhase(this.dayTime()).

Parameters

  • ไม่มี

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

LevelTimeAccess instance = ...;
int result = instance.getMoonPhase();

net.minecraft.world.level.LevelTimeAccess#getTimeOfDay(float)

  • Origin: common
  • Source: net/minecraft/world/level/LevelTimeAccess.java:12
  • Modifiers: default
  • Return: float

คืออะไร

อ่านค่า Time Of Day

ทำงานยังไง

เรียกต่อ: dimensionType(), timeOfDay(), dayTime(). คืนค่า: this.dimensionType().timeOfDay(this.dayTime()).

Parameters

  • float f

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

LevelTimeAccess instance = ...;
float result = instance.getTimeOfDay(0.0F);

LevelWriter

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

net.minecraft.world.level.LevelWriter#addFreshEntity(Entity)

  • Origin: common
  • Source: net/minecraft/world/level/LevelWriter.java:27
  • Modifiers: default
  • Return: boolean

คืออะไร

เพิ่ม Fresh Entity

ทำงานยังไง

คืนค่า: false.

Parameters

  • Entity entity

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

LevelWriter instance = ...;
Entity entity = ...;
boolean result = instance.addFreshEntity(entity);

net.minecraft.world.level.LevelWriter#destroyBlock(BlockPos,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/LevelWriter.java:17
  • Modifiers: default
  • Return: boolean

คืออะไร

ดำเนินการ destroyBlock ตาม implementation ของ LevelWriter

ทำงานยังไง

คืนค่า: this.destroyBlock(blockPos, bl, null).

Parameters

  • BlockPos blockPos
  • boolean bl

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

LevelWriter instance = ...;
BlockPos blockPos = ...;
boolean result = instance.destroyBlock(blockPos, true);

net.minecraft.world.level.LevelWriter#destroyBlock(BlockPos,boolean,Entity)

  • Origin: common
  • Source: net/minecraft/world/level/LevelWriter.java:21
  • Modifiers: default
  • Return: boolean

คืออะไร

ดำเนินการ destroyBlock ตาม implementation ของ LevelWriter

ทำงานยังไง

คืนค่า: this.destroyBlock(blockPos, bl, entity, 512).

Parameters

  • BlockPos blockPos
  • boolean bl
  • Entity entity

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

LevelWriter instance = ...;
BlockPos blockPos = ...;
Entity entity = ...;
boolean result = instance.destroyBlock(blockPos, true, entity);

net.minecraft.world.level.LevelWriter#destroyBlock(BlockPos,boolean,Entity,int)

  • Origin: common
  • Source: net/minecraft/world/level/LevelWriter.java:25
  • Modifiers: ``
  • Return: boolean

คืออะไร

ดำเนินการ destroyBlock ตาม implementation ของ LevelWriter

ทำงานยังไง

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

Parameters

  • BlockPos blockPos
  • boolean bl
  • Entity entity
  • int i

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

LevelWriter instance = ...;
BlockPos blockPos = ...;
Entity entity = ...;
boolean result = instance.destroyBlock(blockPos, true, entity, 0);

net.minecraft.world.level.LevelWriter#removeBlock(BlockPos,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/LevelWriter.java:15
  • Modifiers: ``
  • Return: boolean

คืออะไร

ลบ Block

ทำงานยังไง

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

Parameters

  • BlockPos blockPos
  • boolean bl

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

LevelWriter instance = ...;
BlockPos blockPos = ...;
boolean result = instance.removeBlock(blockPos, true);

net.minecraft.world.level.LevelWriter#setBlock(BlockPos,BlockState,int)

  • Origin: common
  • Source: net/minecraft/world/level/LevelWriter.java:11
  • Modifiers: default
  • Return: boolean

คืออะไร

กำหนดค่า Block

ทำงานยังไง

คืนค่า: this.setBlock(blockPos, blockState, i, 512).

Parameters

  • BlockPos blockPos
  • BlockState blockState
  • int i

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

LevelWriter instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.setBlock(blockPos, blockState, 0);

net.minecraft.world.level.LevelWriter#setBlock(BlockPos,BlockState,int,int)

  • Origin: common
  • Source: net/minecraft/world/level/LevelWriter.java:9
  • Modifiers: ``
  • Return: boolean

คืออะไร

กำหนดค่า Block

ทำงานยังไง

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

Parameters

  • BlockPos blockPos
  • BlockState blockState
  • int i
  • int j

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

LevelWriter instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.setBlock(blockPos, blockState, 0, 0);

LocalMobCapCalculator

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

net.minecraft.world.level.LocalMobCapCalculator#addMob(ChunkPos,MobCategory)

  • Origin: common
  • Source: net/minecraft/world/level/LocalMobCapCalculator.java:27
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Mob

ทำงานยังไง

มีการวนลูป. เรียกต่อ: getPlayersNear(), computeIfAbsent(), MobCounts(), add(). สร้างออบเจ็กต์: LocalMobCapCalculator.MobCounts.

Parameters

  • ChunkPos chunkPos
  • MobCategory mobCategory

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

LocalMobCapCalculator instance = ...;
ChunkPos chunkPos = ...;
MobCategory mobCategory = ...;
instance.addMob(chunkPos, mobCategory);

net.minecraft.world.level.LocalMobCapCalculator#canSpawn(MobCategory,ChunkPos)

  • Origin: common
  • Source: net/minecraft/world/level/LocalMobCapCalculator.java:33
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Spawn

ทำงานยังไง

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

Parameters

  • MobCategory mobCategory
  • ChunkPos chunkPos

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

LocalMobCapCalculator instance = ...;
MobCategory mobCategory = ...;
ChunkPos chunkPos = ...;
boolean result = instance.canSpawn(mobCategory, chunkPos);

net.minecraft.world.level.LocalMobCapCalculator#LocalMobCapCalculator(ChunkMap)

  • Origin: common
  • Source: net/minecraft/world/level/LocalMobCapCalculator.java:19
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: chunkMap.

Parameters

  • ChunkMap chunkMap

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

ChunkMap chunkMap = ...;
LocalMobCapCalculator instance = new LocalMobCapCalculator(chunkMap);

NaturalSpawner

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

net.minecraft.world.level.NaturalSpawner#createState(int,Iterable<Entity>,NaturalSpawner.ChunkGetter,LocalMobCapCalculator)

  • Origin: common
  • Source: net/minecraft/world/level/NaturalSpawner.java:65
  • Modifiers: public static
  • Return: NaturalSpawner.SpawnState

คืออะไร

สร้าง State

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: isPersistenceRequired(), requiresCustomPersistence(), getType(), getCategory(), blockPosition(), query(), asLong(), getRoughBiome(). สร้างออบเจ็กต์: PotentialCalculator, Object2IntOpenHashMap<>, NaturalSpawner.SpawnState. คืนค่า: new NaturalSpawner.SpawnState(i, object2IntOpenHashMap, potentialCalculator, localMobCapCalculator).

Parameters

  • int i
  • Iterable<Entity> iterable
  • NaturalSpawner.ChunkGetter chunkGetter
  • LocalMobCapCalculator localMobCapCalculator

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

Iterable<Entity> iterable = ...;
NaturalSpawner.ChunkGetter chunkGetter = ...;
LocalMobCapCalculator localMobCapCalculator = ...;
NaturalSpawner.SpawnState result = NaturalSpawner.createState(0, iterable, chunkGetter, localMobCapCalculator);

net.minecraft.world.level.NaturalSpawner#getFilteredSpawningCategories(NaturalSpawner.SpawnState,boolean,boolean,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/NaturalSpawner.java:99
  • Modifiers: public static
  • Return: List<MobCategory>

คืออะไร

อ่านค่า Filtered Spawning Categories

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: isFriendly(), isPersistent(), canSpawnForCategoryGlobal(), add(). สร้างออบเจ็กต์: ArrayList<>. คืนค่า: list.

Parameters

  • NaturalSpawner.SpawnState spawnState
  • boolean bl
  • boolean bl2
  • boolean bl3

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

NaturalSpawner.SpawnState spawnState = ...;
List<MobCategory> result = NaturalSpawner.getFilteredSpawningCategories(spawnState, true, true, true);

net.minecraft.world.level.NaturalSpawner#isInNetherFortressBounds(BlockPos,ServerLevel,MobCategory,StructureManager)

  • Origin: common
  • Source: net/minecraft/world/level/NaturalSpawner.java:321
  • Modifiers: public static
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ In Nether Fortress Bounds

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockState(), below(), is(), registryAccess(), lookupOrThrow(), getValue(), getStructureAt(), isValid(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • BlockPos blockPos
  • ServerLevel serverLevel
  • MobCategory mobCategory
  • StructureManager structureManager

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

BlockPos blockPos = ...;
ServerLevel serverLevel = ...;
MobCategory mobCategory = ...;
StructureManager structureManager = ...;
boolean result = NaturalSpawner.isInNetherFortressBounds(blockPos, serverLevel, mobCategory, structureManager);

net.minecraft.world.level.NaturalSpawner#isValidEmptySpawnBlock(BlockGetter,BlockPos,BlockState,FluidState,EntityType<?>)

  • Origin: common
  • Source: net/minecraft/world/level/NaturalSpawner.java:339
  • Modifiers: public static
  • Return: boolean

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isCollisionShapeFullBlock(), isSignalSource(), isEmpty(), is(), isBlockDangerous(). มีจุด return อย่างน้อย 4 จุด.

Parameters

  • BlockGetter blockGetter
  • BlockPos blockPos
  • BlockState blockState
  • FluidState fluidState
  • EntityType<?> entityType

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

BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
FluidState fluidState = ...;
EntityType<?> entityType = ...;
boolean result = NaturalSpawner.isValidEmptySpawnBlock(blockGetter, blockPos, blockState, fluidState, entityType);

net.minecraft.world.level.NaturalSpawner#spawnCategoryForChunk(MobCategory,ServerLevel,LevelChunk,NaturalSpawner.SpawnPredicate,NaturalSpawner.AfterSpawnCallback)

  • Origin: common
  • Source: net/minecraft/world/level/NaturalSpawner.java:127
  • Modifiers: public static
  • Return: void

คืออะไร

สร้าง entity ในโลก Category For Chunk

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getRandomPosWithin(), getY(), getMinY(), spawnCategoryForPosition().

Parameters

  • MobCategory mobCategory
  • ServerLevel serverLevel
  • LevelChunk levelChunk
  • NaturalSpawner.SpawnPredicate spawnPredicate
  • NaturalSpawner.AfterSpawnCallback afterSpawnCallback

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

MobCategory mobCategory = ...;
ServerLevel serverLevel = ...;
LevelChunk levelChunk = ...;
NaturalSpawner.SpawnPredicate spawnPredicate = ...;
NaturalSpawner.AfterSpawnCallback afterSpawnCallback = ...;
NaturalSpawner.spawnCategoryForChunk(mobCategory, serverLevel, levelChunk, spawnPredicate, afterSpawnCallback);

net.minecraft.world.level.NaturalSpawner#spawnCategoryForPosition(MobCategory,ServerLevel,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/NaturalSpawner.java:140
  • Modifiers: public static
  • Return: void

คืออะไร

สร้าง entity ในโลก Category For Position

ทำงานยังไง

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

Parameters

  • MobCategory mobCategory
  • ServerLevel serverLevel
  • BlockPos blockPos

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

MobCategory mobCategory = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
NaturalSpawner.spawnCategoryForPosition(mobCategory, serverLevel, blockPos);

net.minecraft.world.level.NaturalSpawner#spawnCategoryForPosition(MobCategory,ServerLevel,ChunkAccess,BlockPos,NaturalSpawner.SpawnPredicate,NaturalSpawner.AfterSpawnCallback)

  • Origin: common
  • Source: net/minecraft/world/level/NaturalSpawner.java:147
  • Modifiers: public static
  • Return: void

คืออะไร

สร้าง entity ในโลก Category For Position

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: structureManager(), getChunkSource(), getGenerator(), getY(), getBlockState(), isRedstoneConductor(), MutableBlockPos(), getX(). สร้างออบเจ็กต์: BlockPos.MutableBlockPos.

Parameters

  • MobCategory mobCategory
  • ServerLevel serverLevel
  • ChunkAccess chunkAccess
  • BlockPos blockPos
  • NaturalSpawner.SpawnPredicate spawnPredicate
  • NaturalSpawner.AfterSpawnCallback afterSpawnCallback

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

MobCategory mobCategory = ...;
ServerLevel serverLevel = ...;
ChunkAccess chunkAccess = ...;
BlockPos blockPos = ...;
NaturalSpawner.SpawnPredicate spawnPredicate = ...;
NaturalSpawner.AfterSpawnCallback afterSpawnCallback = ...;
NaturalSpawner.spawnCategoryForPosition(mobCategory, serverLevel, chunkAccess, blockPos, spawnPredicate, afterSpawnCallback);

net.minecraft.world.level.NaturalSpawner#spawnForChunk(ServerLevel,LevelChunk,NaturalSpawner.SpawnState,List<MobCategory>)

  • Origin: common
  • Source: net/minecraft/world/level/NaturalSpawner.java:114
  • Modifiers: public static
  • Return: void

คืออะไร

สร้าง entity ในโลก For Chunk

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: get(), push(), canSpawnForCategoryLocal(), getPos(), spawnCategoryForChunk(), pop().

Parameters

  • ServerLevel serverLevel
  • LevelChunk levelChunk
  • NaturalSpawner.SpawnState spawnState
  • List<MobCategory> list

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

ServerLevel serverLevel = ...;
LevelChunk levelChunk = ...;
NaturalSpawner.SpawnState spawnState = ...;
List<MobCategory> list = ...;
NaturalSpawner.spawnForChunk(serverLevel, levelChunk, spawnState, list);

net.minecraft.world.level.NaturalSpawner#spawnMobsForChunkGeneration(ServerLevelAccessor,Holder<Biome>,ChunkPos,RandomSource)

  • Origin: common
  • Source: net/minecraft/world/level/NaturalSpawner.java:353
  • Modifiers: public static
  • Return: void

คืออะไร

สร้าง entity ในโลก Mobs For Chunk Generation

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป ; มีการจัดการ exception. เรียกต่อ: value(), getMobSettings(), getMobs(), isEmpty(), getMinBlockX(), getMinBlockZ(), nextFloat(), getCreatureProbability().

Parameters

  • ServerLevelAccessor serverLevelAccessor
  • Holder<Biome> holder
  • ChunkPos chunkPos
  • RandomSource randomSource

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

ServerLevelAccessor serverLevelAccessor = ...;
Holder<Biome> holder = ...;
ChunkPos chunkPos = ...;
RandomSource randomSource = ...;
NaturalSpawner.spawnMobsForChunkGeneration(serverLevelAccessor, holder, chunkPos, randomSource);

NaturalSpawner$AfterSpawnCallback

  • Full name: net.minecraft.world.level.NaturalSpawner$AfterSpawnCallback
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/NaturalSpawner.java
  • Type: interface
  • Modifiers: public

net.minecraft.world.level.NaturalSpawner$AfterSpawnCallback#run(Mob,ChunkAccess)

  • Origin: common
  • Source: net/minecraft/world/level/NaturalSpawner.java:448
  • Modifiers: ``
  • Return: void

คืออะไร

สั่งทำงาน run

ทำงานยังไง

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

Parameters

  • Mob mob
  • ChunkAccess chunkAccess

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

NaturalSpawner.AfterSpawnCallback instance = ...;
Mob mob = ...;
ChunkAccess chunkAccess = ...;
instance.run(mob, chunkAccess);

NaturalSpawner$ChunkGetter

  • Full name: net.minecraft.world.level.NaturalSpawner$ChunkGetter
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/NaturalSpawner.java
  • Type: interface
  • Modifiers: public

net.minecraft.world.level.NaturalSpawner$ChunkGetter#query(long,Consumer<LevelChunk>)

  • Origin: common
  • Source: net/minecraft/world/level/NaturalSpawner.java:453
  • Modifiers: ``
  • Return: void

คืออะไร

ดำเนินการ query ตาม implementation ของ NaturalSpawner$ChunkGetter

ทำงานยังไง

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

Parameters

  • long l
  • Consumer<LevelChunk> consumer

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

NaturalSpawner.ChunkGetter instance = ...;
Consumer<LevelChunk> consumer = ...;
instance.query(0L, consumer);

NaturalSpawner$SpawnPredicate

  • Full name: net.minecraft.world.level.NaturalSpawner$SpawnPredicate
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/NaturalSpawner.java
  • Type: interface
  • Modifiers: public

net.minecraft.world.level.NaturalSpawner$SpawnPredicate#test(EntityType<?>,BlockPos,ChunkAccess)

  • Origin: common
  • Source: net/minecraft/world/level/NaturalSpawner.java:458
  • Modifiers: ``
  • Return: boolean

คืออะไร

ทดสอบเงื่อนไข test

ทำงานยังไง

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

Parameters

  • EntityType<?> entityType
  • BlockPos blockPos
  • ChunkAccess chunkAccess

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

NaturalSpawner.SpawnPredicate instance = ...;
EntityType<?> entityType = ...;
BlockPos blockPos = ...;
ChunkAccess chunkAccess = ...;
boolean result = instance.test(entityType, blockPos, chunkAccess);

NaturalSpawner$SpawnState

  • Full name: net.minecraft.world.level.NaturalSpawner$SpawnState
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/NaturalSpawner.java
  • Type: class
  • Modifiers: public static

net.minecraft.world.level.NaturalSpawner$SpawnState#getMobCategoryCounts()

  • Origin: common
  • Source: net/minecraft/world/level/NaturalSpawner.java:523
  • Modifiers: public
  • Return: Object2IntMap<MobCategory>

คืออะไร

อ่านค่า Mob Category Counts

ทำงานยังไง

คืนค่า: this.unmodifiableMobCategoryCounts.

Parameters

  • ไม่มี

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

NaturalSpawner.SpawnState instance = ...;
Object2IntMap<MobCategory> result = instance.getMobCategoryCounts();

net.minecraft.world.level.NaturalSpawner$SpawnState#getSpawnableChunkCount()

  • Origin: common
  • Source: net/minecraft/world/level/NaturalSpawner.java:519
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Spawnable Chunk Count

ทำงานยังไง

คืนค่า: this.spawnableChunkCount.

Parameters

  • ไม่มี

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

NaturalSpawner.SpawnState instance = ...;
int result = instance.getSpawnableChunkCount();

NoiseColumn

  • Full name: net.minecraft.world.level.NoiseColumn
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/NoiseColumn.java
  • Type: class
  • Modifiers: public final
  • Implements: BlockColumn

net.minecraft.world.level.NoiseColumn#getBlock(int)

  • Origin: common
  • Source: net/minecraft/world/level/NoiseColumn.java:16
  • Modifiers: public
  • Return: BlockState

คืออะไร

อ่านค่า Block

ทำงานยังไง

เรียกต่อ: defaultBlockState(). คืนค่า: j >= 0 && j < this.column.length ? this.column[j] : Blocks.AIR.defaultBlockState().

Parameters

  • int i

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

NoiseColumn instance = ...;
BlockState result = instance.getBlock(0);

net.minecraft.world.level.NoiseColumn#NoiseColumn(int,BlockState[])

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

คืออะไร

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

ทำงานยังไง

แก้ state: minY, column.

Parameters

  • int i
  • BlockState[] blockStates

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

BlockState[] blockStates = ...;
NoiseColumn instance = new NoiseColumn(0, blockStates);

net.minecraft.world.level.NoiseColumn#setBlock(int,BlockState)

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

คืออะไร

กำหนดค่า Block

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. สร้างออบเจ็กต์: IllegalArgumentException.

Parameters

  • int i
  • BlockState blockState

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

NoiseColumn instance = ...;
BlockState blockState = ...;
instance.setBlock(0, blockState);

PathNavigationRegion

  • Full name: net.minecraft.world.level.PathNavigationRegion
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/PathNavigationRegion.java
  • Type: class
  • Modifiers: public
  • Implements: CollisionGetter

net.minecraft.world.level.PathNavigationRegion#getBlockEntity(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/PathNavigationRegion.java:92
  • Modifiers: public
  • Return: BlockEntity

คืออะไร

อ่านค่า Block Entity

ทำงานยังไง

เรียกต่อ: getChunk(). คืนค่า: chunkAccess.getBlockEntity(blockPos).

Parameters

  • BlockPos blockPos

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

PathNavigationRegion instance = ...;
BlockPos blockPos = ...;
BlockEntity result = instance.getBlockEntity(blockPos);

net.minecraft.world.level.PathNavigationRegion#getBlockState(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/PathNavigationRegion.java:99
  • Modifiers: public
  • Return: BlockState

คืออะไร

อ่านค่า Block State

ทำงานยังไง

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

Parameters

  • BlockPos blockPos

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

PathNavigationRegion instance = ...;
BlockPos blockPos = ...;
BlockState result = instance.getBlockState(blockPos);

net.minecraft.world.level.PathNavigationRegion#getChunkForCollisions(int,int)

  • Origin: common
  • Source: net/minecraft/world/level/PathNavigationRegion.java:82
  • Modifiers: public
  • Return: BlockGetter

คืออะไร

อ่านค่า Chunk For Collisions

ทำงานยังไง

เรียกต่อ: getChunk(). คืนค่า: this.getChunk(i, j).

Parameters

  • int i
  • int j

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

PathNavigationRegion instance = ...;
BlockGetter result = instance.getChunkForCollisions(0, 0);

net.minecraft.world.level.PathNavigationRegion#getEntityCollisions(Entity,AABB)

  • Origin: common
  • Source: net/minecraft/world/level/PathNavigationRegion.java:87
  • Modifiers: public
  • Return: List<VoxelShape>

คืออะไร

อ่านค่า Entity Collisions

ทำงานยังไง

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

Parameters

  • Entity entity
  • AABB aABB

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

PathNavigationRegion instance = ...;
Entity entity = ...;
AABB aABB = ...;
List<VoxelShape> result = instance.getEntityCollisions(entity, aABB);

net.minecraft.world.level.PathNavigationRegion#getFluidState(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/PathNavigationRegion.java:109
  • Modifiers: public
  • Return: FluidState

คืออะไร

อ่านค่า Fluid State

ทำงานยังไง

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

Parameters

  • BlockPos blockPos

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

PathNavigationRegion instance = ...;
BlockPos blockPos = ...;
FluidState result = instance.getFluidState(blockPos);

net.minecraft.world.level.PathNavigationRegion#getHeight()

  • Origin: common
  • Source: net/minecraft/world/level/PathNavigationRegion.java:124
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Height

ทำงานยังไง

คืนค่า: this.level.getHeight().

Parameters

  • ไม่มี

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

PathNavigationRegion instance = ...;
int result = instance.getHeight();

net.minecraft.world.level.PathNavigationRegion#getMinY()

  • Origin: common
  • Source: net/minecraft/world/level/PathNavigationRegion.java:119
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Min Y

ทำงานยังไง

คืนค่า: this.level.getMinY().

Parameters

  • ไม่มี

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

PathNavigationRegion instance = ...;
int result = instance.getMinY();

net.minecraft.world.level.PathNavigationRegion#getWorldBorder()

  • Origin: common
  • Source: net/minecraft/world/level/PathNavigationRegion.java:77
  • Modifiers: public
  • Return: WorldBorder

คืออะไร

อ่านค่า World Border

ทำงานยังไง

คืนค่า: this.level.getWorldBorder().

Parameters

  • ไม่มี

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

PathNavigationRegion instance = ...;
WorldBorder result = instance.getWorldBorder();

net.minecraft.world.level.PathNavigationRegion#PathNavigationRegion(Level,BlockPos,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/PathNavigationRegion.java:34
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: level, plains, centerX, centerZ, chunks, allEmpty. เรียกต่อ: memoize(), registryAccess(), lookupOrThrow(), getOrThrow(), blockToSectionCoord(), getX(), getZ(), getChunkSource().

Parameters

  • Level level
  • BlockPos blockPos
  • BlockPos blockPos2

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

Level level = ...;
BlockPos blockPos = ...;
BlockPos blockPos2 = ...;
PathNavigationRegion instance = new PathNavigationRegion(level, blockPos, blockPos2);

PotentialCalculator

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

net.minecraft.world.level.PotentialCalculator#addCharge(BlockPos,double)

  • Origin: common
  • Source: net/minecraft/world/level/PotentialCalculator.java:10
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Charge

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: add(), PointCharge(). สร้างออบเจ็กต์: PotentialCalculator.PointCharge.

Parameters

  • BlockPos blockPos
  • double d

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

PotentialCalculator instance = ...;
BlockPos blockPos = ...;
instance.addCharge(blockPos, 0.0D);

net.minecraft.world.level.PotentialCalculator#getPotentialEnergyChange(BlockPos,double)

  • Origin: common
  • Source: net/minecraft/world/level/PotentialCalculator.java:16
  • Modifiers: public
  • Return: double

คืออะไร

อ่านค่า Potential Energy Change

ทำงานยังไง

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

Parameters

  • BlockPos blockPos
  • double d

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

PotentialCalculator instance = ...;
BlockPos blockPos = ...;
double result = instance.getPotentialEnergyChange(blockPos, 0.0D);

ScheduledTickAccess

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

net.minecraft.world.level.ScheduledTickAccess#createTick(BlockPos,T,int)

  • Origin: common
  • Source: net/minecraft/world/level/ScheduledTickAccess.java:13
  • Modifiers: ``
  • Return: ScheduledTick<T>

คืออะไร

สร้าง Tick

ทำงานยังไง

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

Parameters

  • BlockPos blockPos
  • T object
  • int i

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

ScheduledTickAccess instance = ...;
BlockPos blockPos = ...;
T object = ...;
ScheduledTick<T> result = instance.createTick(blockPos, object, 0);

net.minecraft.world.level.ScheduledTickAccess#createTick(BlockPos,T,int,TickPriority)

  • Origin: common
  • Source: net/minecraft/world/level/ScheduledTickAccess.java:11
  • Modifiers: ``
  • Return: ScheduledTick<T>

คืออะไร

สร้าง Tick

ทำงานยังไง

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

Parameters

  • BlockPos blockPos
  • T object
  • int i
  • TickPriority tickPriority

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

ScheduledTickAccess instance = ...;
BlockPos blockPos = ...;
T object = ...;
TickPriority tickPriority = ...;
ScheduledTick<T> result = instance.createTick(blockPos, object, 0, tickPriority);

net.minecraft.world.level.ScheduledTickAccess#getBlockTicks()

  • Origin: common
  • Source: net/minecraft/world/level/ScheduledTickAccess.java:15
  • Modifiers: ``
  • Return: LevelTickAccess<Block>

คืออะไร

อ่านค่า Block Ticks

ทำงานยังไง

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

Parameters

  • ไม่มี

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

ScheduledTickAccess instance = ...;
LevelTickAccess<Block> result = instance.getBlockTicks();

net.minecraft.world.level.ScheduledTickAccess#getFluidTicks()

  • Origin: common
  • Source: net/minecraft/world/level/ScheduledTickAccess.java:25
  • Modifiers: ``
  • Return: LevelTickAccess<Fluid>

คืออะไร

อ่านค่า Fluid Ticks

ทำงานยังไง

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

Parameters

  • ไม่มี

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

ScheduledTickAccess instance = ...;
LevelTickAccess<Fluid> result = instance.getFluidTicks();

net.minecraft.world.level.ScheduledTickAccess#scheduleTick(BlockPos,Block,int)

  • Origin: common
  • Source: net/minecraft/world/level/ScheduledTickAccess.java:21
  • Modifiers: default
  • Return: void

คืออะไร

ดำเนินการ scheduleTick ตาม implementation ของ ScheduledTickAccess

ทำงานยังไง

เรียกต่อ: getBlockTicks(), schedule(), createTick().

Parameters

  • BlockPos blockPos
  • Block block
  • int i

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

ScheduledTickAccess instance = ...;
BlockPos blockPos = ...;
Block block = ...;
instance.scheduleTick(blockPos, block, 0);

net.minecraft.world.level.ScheduledTickAccess#scheduleTick(BlockPos,Block,int,TickPriority)

  • Origin: common
  • Source: net/minecraft/world/level/ScheduledTickAccess.java:17
  • Modifiers: default
  • Return: void

คืออะไร

ดำเนินการ scheduleTick ตาม implementation ของ ScheduledTickAccess

ทำงานยังไง

เรียกต่อ: getBlockTicks(), schedule(), createTick().

Parameters

  • BlockPos blockPos
  • Block block
  • int i
  • TickPriority tickPriority

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

ScheduledTickAccess instance = ...;
BlockPos blockPos = ...;
Block block = ...;
TickPriority tickPriority = ...;
instance.scheduleTick(blockPos, block, 0, tickPriority);

net.minecraft.world.level.ScheduledTickAccess#scheduleTick(BlockPos,Fluid,int)

  • Origin: common
  • Source: net/minecraft/world/level/ScheduledTickAccess.java:31
  • Modifiers: default
  • Return: void

คืออะไร

ดำเนินการ scheduleTick ตาม implementation ของ ScheduledTickAccess

ทำงานยังไง

เรียกต่อ: getFluidTicks(), schedule(), createTick().

Parameters

  • BlockPos blockPos
  • Fluid fluid
  • int i

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

ScheduledTickAccess instance = ...;
BlockPos blockPos = ...;
Fluid fluid = ...;
instance.scheduleTick(blockPos, fluid, 0);

net.minecraft.world.level.ScheduledTickAccess#scheduleTick(BlockPos,Fluid,int,TickPriority)

  • Origin: common
  • Source: net/minecraft/world/level/ScheduledTickAccess.java:27
  • Modifiers: default
  • Return: void

คืออะไร

ดำเนินการ scheduleTick ตาม implementation ของ ScheduledTickAccess

ทำงานยังไง

เรียกต่อ: getFluidTicks(), schedule(), createTick().

Parameters

  • BlockPos blockPos
  • Fluid fluid
  • int i
  • TickPriority tickPriority

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

ScheduledTickAccess instance = ...;
BlockPos blockPos = ...;
Fluid fluid = ...;
TickPriority tickPriority = ...;
instance.scheduleTick(blockPos, fluid, 0, tickPriority);

ServerExplosion

  • Full name: net.minecraft.world.level.ServerExplosion
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/ServerExplosion.java
  • Type: class
  • Modifiers: public
  • Implements: Explosion

net.minecraft.world.level.ServerExplosion#canTriggerBlocks()

  • Origin: common
  • Source: net/minecraft/world/level/ServerExplosion.java:303
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Trigger Blocks

ทำงานยังไง

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

Parameters

  • ไม่มี

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

ServerExplosion instance = ...;
boolean result = instance.canTriggerBlocks();

net.minecraft.world.level.ServerExplosion#center()

  • Origin: common
  • Source: net/minecraft/world/level/ServerExplosion.java:113
  • Modifiers: public
  • Return: Vec3

คืออะไร

ดำเนินการ center ตาม implementation ของ ServerExplosion

ทำงานยังไง

คืนค่า: this.center.

Parameters

  • ไม่มี

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

ServerExplosion instance = ...;
Vec3 result = instance.center();

net.minecraft.world.level.ServerExplosion#explode()

  • Origin: common
  • Source: net/minecraft/world/level/ServerExplosion.java:242
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ explode ตาม implementation ของ ServerExplosion

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: gameEvent(), calculateExplodedPositions(), hurtEntities(), interactsWithBlocks(), get(), push(), interactWithBlocks(), pop().

Parameters

  • ไม่มี

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

ServerExplosion instance = ...;
instance.explode();

net.minecraft.world.level.ServerExplosion#getBlockInteraction()

  • Origin: common
  • Source: net/minecraft/world/level/ServerExplosion.java:298
  • Modifiers: public
  • Return: Explosion.BlockInteraction

คืออะไร

อ่านค่า Block Interaction

ทำงานยังไง

คืนค่า: this.blockInteraction.

Parameters

  • ไม่มี

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

ServerExplosion instance = ...;
Explosion.BlockInteraction result = instance.getBlockInteraction();

net.minecraft.world.level.ServerExplosion#getDamageSource()

  • Origin: common
  • Source: net/minecraft/world/level/ServerExplosion.java:294
  • Modifiers: public
  • Return: DamageSource

คืออะไร

อ่านค่า Damage Source

ทำงานยังไง

คืนค่า: this.damageSource.

Parameters

  • ไม่มี

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

ServerExplosion instance = ...;
DamageSource result = instance.getDamageSource();

net.minecraft.world.level.ServerExplosion#getDirectSourceEntity()

  • Origin: common
  • Source: net/minecraft/world/level/ServerExplosion.java:288
  • Modifiers: public
  • Return: Entity

คืออะไร

อ่านค่า Direct Source Entity

ทำงานยังไง

คืนค่า: this.source.

Parameters

  • ไม่มี

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

ServerExplosion instance = ...;
Entity result = instance.getDirectSourceEntity();

net.minecraft.world.level.ServerExplosion#getHitPlayers()

  • Origin: common
  • Source: net/minecraft/world/level/ServerExplosion.java:273
  • Modifiers: public
  • Return: Map<Player, Vec3>

คืออะไร

อ่านค่า Hit Players

ทำงานยังไง

คืนค่า: this.hitPlayers.

Parameters

  • ไม่มี

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

ServerExplosion instance = ...;
Map<Player, Vec3> result = instance.getHitPlayers();

net.minecraft.world.level.ServerExplosion#getIndirectSourceEntity()

  • Origin: common
  • Source: net/minecraft/world/level/ServerExplosion.java:282
  • Modifiers: public
  • Return: LivingEntity

คืออะไร

อ่านค่า Indirect Source Entity

ทำงานยังไง

คืนค่า: Explosion.getIndirectSourceEntity(this.source).

Parameters

  • ไม่มี

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

ServerExplosion instance = ...;
LivingEntity result = instance.getIndirectSourceEntity();

net.minecraft.world.level.ServerExplosion#getSeenPercent(Vec3,Entity)

  • Origin: common
  • Source: net/minecraft/world/level/ServerExplosion.java:75
  • Modifiers: public static
  • Return: float

คืออะไร

อ่านค่า Seen Percent

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getBoundingBox(), floor(), lerp(), level(), clip(), getType(). สร้างออบเจ็กต์: Vec3, ClipContext. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • Vec3 vec3
  • Entity entity

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

Vec3 vec3 = ...;
Entity entity = ...;
float result = ServerExplosion.getSeenPercent(vec3, entity);

net.minecraft.world.level.ServerExplosion#isSmall()

  • Origin: common
  • Source: net/minecraft/world/level/ServerExplosion.java:322
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Small

ทำงานยังไง

เรียกต่อ: interactsWithBlocks(). คืนค่า: this.radius < 2.0F || !this.interactsWithBlocks().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ServerExplosion instance = ...;
boolean result = instance.isSmall();

net.minecraft.world.level.ServerExplosion#level()

  • Origin: common
  • Source: net/minecraft/world/level/ServerExplosion.java:277
  • Modifiers: public
  • Return: ServerLevel

คืออะไร

ดำเนินการ level ตาม implementation ของ ServerExplosion

ทำงานยังไง

คืนค่า: this.level.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ServerExplosion instance = ...;
ServerLevel result = instance.level();

net.minecraft.world.level.ServerExplosion#radius()

  • Origin: common
  • Source: net/minecraft/world/level/ServerExplosion.java:108
  • Modifiers: public
  • Return: float

คืออะไร

ดำเนินการ radius ตาม implementation ของ ServerExplosion

ทำงานยังไง

คืนค่า: this.radius.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ServerExplosion instance = ...;
float result = instance.radius();

net.minecraft.world.level.ServerExplosion#ServerExplosion(ServerLevel,Entity,DamageSource,ExplosionDamageCalculator,Vec3,float,boolean,Explosion.BlockInteraction)

  • Origin: common
  • Source: net/minecraft/world/level/ServerExplosion.java:51
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ ServerExplosion ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: level, source, radius, center, fire, blockInteraction. เรียกต่อ: damageSources(), explosion(), makeDamageCalculator().

Parameters

  • ServerLevel serverLevel
  • Entity entity
  • DamageSource damageSource
  • ExplosionDamageCalculator explosionDamageCalculator
  • Vec3 vec3
  • float f
  • boolean bl
  • Explosion.BlockInteraction blockInteraction

ตัวอย่างใช้งาน

ServerLevel serverLevel = ...;
Entity entity = ...;
DamageSource damageSource = ...;
ExplosionDamageCalculator explosionDamageCalculator = ...;
Vec3 vec3 = ...;
Explosion.BlockInteraction blockInteraction = ...;
ServerExplosion instance = new ServerExplosion(serverLevel, entity, damageSource, explosionDamageCalculator, vec3, 0.0F, true, blockInteraction);

net.minecraft.world.level.ServerExplosion#shouldAffectBlocklikeEntities()

  • Origin: common
  • Source: net/minecraft/world/level/ServerExplosion.java:314
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Affect Blocklike Entities

ทำงานยังไง

แก้ state: source. เรียกต่อ: getGameRules(), getBoolean(), isInWater(), getType(). คืนค่า: bl ? bl2 && bl3 : this.blockInteraction.shouldAffectBlocklikeEntities() && bl2 && bl3.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ServerExplosion instance = ...;
boolean result = instance.shouldAffectBlocklikeEntities();

ServerLevelAccessor

  • Full name: net.minecraft.world.level.ServerLevelAccessor
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/ServerLevelAccessor.java
  • Type: interface
  • Modifiers: public
  • Implements: LevelAccessor

net.minecraft.world.level.ServerLevelAccessor#addFreshEntityWithPassengers(Entity)

  • Origin: common
  • Source: net/minecraft/world/level/ServerLevelAccessor.java:9
  • Modifiers: default
  • Return: void

คืออะไร

เพิ่ม Fresh Entity With Passengers

ทำงานยังไง

เรียกต่อ: getSelfAndPassengers(), forEach().

Parameters

  • Entity entity

ตัวอย่างใช้งาน

ServerLevelAccessor instance = ...;
Entity entity = ...;
instance.addFreshEntityWithPassengers(entity);

net.minecraft.world.level.ServerLevelAccessor#getLevel()

  • Origin: common
  • Source: net/minecraft/world/level/ServerLevelAccessor.java:7
  • Modifiers: ``
  • Return: ServerLevel

คืออะไร

อ่านค่า Level

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ServerLevelAccessor instance = ...;
ServerLevel result = instance.getLevel();

SignalGetter

  • Full name: net.minecraft.world.level.SignalGetter
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/SignalGetter.java
  • Type: interface
  • Modifiers: public
  • Implements: BlockGetter

net.minecraft.world.level.SignalGetter#getBestNeighborSignal(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/SignalGetter.java:85
  • Modifiers: default
  • Return: int

คืออะไร

อ่านค่า Best Neighbor Signal

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getSignal(), relative(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • BlockPos blockPos

ตัวอย่างใช้งาน

SignalGetter instance = ...;
BlockPos blockPos = ...;
int result = instance.getBestNeighborSignal(blockPos);

net.minecraft.world.level.SignalGetter#getControlInputSignal(BlockPos,Direction,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/SignalGetter.java:48
  • Modifiers: default
  • Return: int

คืออะไร

อ่านค่า Control Input Signal

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockState(), isDiode(), getDirectSignal(), is(), getValue(), isSignalSource(). มีจุด return อย่างน้อย 4 จุด.

Parameters

  • BlockPos blockPos
  • Direction direction
  • boolean bl

ตัวอย่างใช้งาน

SignalGetter instance = ...;
BlockPos blockPos = ...;
Direction direction = ...;
int result = instance.getControlInputSignal(blockPos, direction, true);

net.minecraft.world.level.SignalGetter#getDirectSignal(BlockPos,Direction)

  • Origin: common
  • Source: net/minecraft/world/level/SignalGetter.java:13
  • Modifiers: default
  • Return: int

คืออะไร

อ่านค่า Direct Signal

ทำงานยังไง

เรียกต่อ: getBlockState(). คืนค่า: this.getBlockState(blockPos).getDirectSignal(this, blockPos, direction).

Parameters

  • BlockPos blockPos
  • Direction direction

ตัวอย่างใช้งาน

SignalGetter instance = ...;
BlockPos blockPos = ...;
Direction direction = ...;
int result = instance.getDirectSignal(blockPos, direction);

net.minecraft.world.level.SignalGetter#getDirectSignalTo(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/SignalGetter.java:17
  • Modifiers: default
  • Return: int

คืออะไร

อ่านค่า Direct Signal To

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: max(), getDirectSignal(), below(), above(), north(), south(), west(), east(). มีจุด return อย่างน้อย 6 จุด.

Parameters

  • BlockPos blockPos

ตัวอย่างใช้งาน

SignalGetter instance = ...;
BlockPos blockPos = ...;
int result = instance.getDirectSignalTo(blockPos);

net.minecraft.world.level.SignalGetter#getSignal(BlockPos,Direction)

  • Origin: common
  • Source: net/minecraft/world/level/SignalGetter.java:65
  • Modifiers: default
  • Return: int

คืออะไร

อ่านค่า Signal

ทำงานยังไง

เรียกต่อ: getBlockState(), isRedstoneConductor(), max(), getDirectSignalTo(). คืนค่า: blockState.isRedstoneConductor(this, blockPos) ? Math.max(i, this.getDirectSignalTo(blockPos)) : i.

Parameters

  • BlockPos blockPos
  • Direction direction

ตัวอย่างใช้งาน

SignalGetter instance = ...;
BlockPos blockPos = ...;
Direction direction = ...;
int result = instance.getSignal(blockPos, direction);

net.minecraft.world.level.SignalGetter#hasNeighborSignal(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/SignalGetter.java:71
  • Modifiers: default
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Neighbor Signal

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getSignal(), below(), above(), north(), south(), west(), east(). มีจุด return อย่างน้อย 5 จุด.

Parameters

  • BlockPos blockPos

ตัวอย่างใช้งาน

SignalGetter instance = ...;
BlockPos blockPos = ...;
boolean result = instance.hasNeighborSignal(blockPos);

net.minecraft.world.level.SignalGetter#hasSignal(BlockPos,Direction)

  • Origin: common
  • Source: net/minecraft/world/level/SignalGetter.java:61
  • Modifiers: default
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Signal

ทำงานยังไง

เรียกต่อ: getSignal(). คืนค่า: this.getSignal(blockPos, direction) > 0.

Parameters

  • BlockPos blockPos
  • Direction direction

ตัวอย่างใช้งาน

SignalGetter instance = ...;
BlockPos blockPos = ...;
Direction direction = ...;
boolean result = instance.hasSignal(blockPos, direction);

SimpleExplosionDamageCalculator

  • Full name: net.minecraft.world.level.SimpleExplosionDamageCalculator
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/SimpleExplosionDamageCalculator.java
  • Type: class
  • Modifiers: public
  • Extends: ExplosionDamageCalculator

net.minecraft.world.level.SimpleExplosionDamageCalculator#getBlockExplosionResistance(Explosion,BlockGetter,BlockPos,BlockState,FluidState)

  • Origin: common
  • Source: net/minecraft/world/level/SimpleExplosionDamageCalculator.java:25
  • Modifiers: public
  • Return: Optional<Float>

คืออะไร

อ่านค่า Block Explosion Resistance

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isPresent(), is(), get(), of(), empty(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • Explosion explosion
  • BlockGetter blockGetter
  • BlockPos blockPos
  • BlockState blockState
  • FluidState fluidState

ตัวอย่างใช้งาน

SimpleExplosionDamageCalculator instance = ...;
Explosion explosion = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
FluidState fluidState = ...;
Optional<Float> result = instance.getBlockExplosionResistance(explosion, blockGetter, blockPos, blockState, fluidState);

net.minecraft.world.level.SimpleExplosionDamageCalculator#getKnockbackMultiplier(Entity)

  • Origin: common
  • Source: net/minecraft/world/level/SimpleExplosionDamageCalculator.java:46
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Knockback Multiplier

ทำงานยังไง

เรียกต่อ: getAbilities(), orElseGet(). คืนค่า: bl ? 0.0F : this.knockbackMultiplier.orElseGet(() -> super.getKnockbackMultiplier(entity)).

Parameters

  • Entity entity

ตัวอย่างใช้งาน

SimpleExplosionDamageCalculator instance = ...;
Entity entity = ...;
float result = instance.getKnockbackMultiplier(entity);

net.minecraft.world.level.SimpleExplosionDamageCalculator#shouldBlockExplode(Explosion,BlockGetter,BlockPos,BlockState,float)

  • Origin: common
  • Source: net/minecraft/world/level/SimpleExplosionDamageCalculator.java:36
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Block Explode

ทำงานยังไง

คืนค่า: this.explodesBlocks.

Parameters

  • Explosion explosion
  • BlockGetter blockGetter
  • BlockPos blockPos
  • BlockState blockState
  • float f

ตัวอย่างใช้งาน

SimpleExplosionDamageCalculator instance = ...;
Explosion explosion = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.shouldBlockExplode(explosion, blockGetter, blockPos, blockState, 0.0F);

net.minecraft.world.level.SimpleExplosionDamageCalculator#shouldDamageEntity(Explosion,Entity)

  • Origin: common
  • Source: net/minecraft/world/level/SimpleExplosionDamageCalculator.java:41
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Damage Entity

ทำงานยังไง

คืนค่า: this.damagesEntities.

Parameters

  • Explosion explosion
  • Entity entity

ตัวอย่างใช้งาน

SimpleExplosionDamageCalculator instance = ...;
Explosion explosion = ...;
Entity entity = ...;
boolean result = instance.shouldDamageEntity(explosion, entity);

net.minecraft.world.level.SimpleExplosionDamageCalculator#SimpleExplosionDamageCalculator(boolean,boolean,Optional<Float>,Optional<HolderSet<Block>>)

  • Origin: common
  • Source: net/minecraft/world/level/SimpleExplosionDamageCalculator.java:18
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ SimpleExplosionDamageCalculator ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: explodesBlocks, damagesEntities, knockbackMultiplier, immuneBlocks.

Parameters

  • boolean bl
  • boolean bl2
  • Optional<Float> optional
  • Optional<HolderSet<Block>> optional2

ตัวอย่างใช้งาน

Optional<Float> optional = ...;
Optional<HolderSet<Block>> optional2 = ...;
SimpleExplosionDamageCalculator instance = new SimpleExplosionDamageCalculator(true, true, optional, optional2);

SpawnData

  • Full name: net.minecraft.world.level.SpawnData
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/SpawnData.java
  • Type: record
  • Modifiers: public

net.minecraft.world.level.SpawnData#getCustomSpawnRules()

  • Origin: common
  • Source: net/minecraft/world/level/SpawnData.java:51
  • Modifiers: public
  • Return: Optional<SpawnData.CustomSpawnRules>

คืออะไร

อ่านค่า Custom Spawn Rules

ทำงานยังไง

คืนค่า: this.customSpawnRules.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SpawnData instance = ...;
Optional<SpawnData.CustomSpawnRules> result = instance.getCustomSpawnRules();

net.minecraft.world.level.SpawnData#getEntityToSpawn()

  • Origin: common
  • Source: net/minecraft/world/level/SpawnData.java:47
  • Modifiers: public
  • Return: CompoundTag

คืออะไร

อ่านค่า Entity To Spawn

ทำงานยังไง

คืนค่า: this.entityToSpawn.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SpawnData instance = ...;
CompoundTag result = instance.getEntityToSpawn();

net.minecraft.world.level.SpawnData#getEquipment()

  • Origin: common
  • Source: net/minecraft/world/level/SpawnData.java:55
  • Modifiers: public
  • Return: Optional<EquipmentTable>

คืออะไร

อ่านค่า Equipment

ทำงานยังไง

คืนค่า: this.equipment.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SpawnData instance = ...;
Optional<EquipmentTable> result = instance.getEquipment();

net.minecraft.world.level.SpawnData#SpawnData()

  • Origin: common
  • Source: net/minecraft/world/level/SpawnData.java:28
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ SpawnData ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

เรียกต่อ: empty(). สร้างออบเจ็กต์: CompoundTag.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SpawnData instance = new SpawnData();

net.minecraft.world.level.SpawnData#SpawnData(CompoundTag,Optional<SpawnData.CustomSpawnRules>,Optional<EquipmentTable>)

  • Origin: common
  • Source: net/minecraft/world/level/SpawnData.java:32
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ SpawnData ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: entityToSpawn, customSpawnRules, equipment. เรียกต่อ: contains(), tryParse(), getString(), putString(), toString(), remove().

Parameters

  • CompoundTag entityToSpawn
  • Optional<SpawnData.CustomSpawnRules> customSpawnRules
  • Optional<EquipmentTable> equipment

ตัวอย่างใช้งาน

CompoundTag entityToSpawn = ...;
Optional<SpawnData.CustomSpawnRules> customSpawnRules = ...;
Optional<EquipmentTable> equipment = ...;
SpawnData instance = new SpawnData(entityToSpawn, customSpawnRules, equipment);

SpawnData$CustomSpawnRules

  • Full name: net.minecraft.world.level.SpawnData$CustomSpawnRules
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/SpawnData.java
  • Type: record
  • Modifiers: public

net.minecraft.world.level.SpawnData$CustomSpawnRules#isValidPosition(BlockPos,ServerLevel)

  • Origin: common
  • Source: net/minecraft/world/level/SpawnData.java:79
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Valid Position

ทำงานยังไง

เรียกต่อ: isValueInRange(), getBrightness().

Parameters

  • BlockPos blockPos
  • ServerLevel serverLevel

ตัวอย่างใช้งาน

SpawnData.CustomSpawnRules instance = ...;
BlockPos blockPos = ...;
ServerLevel serverLevel = ...;
boolean result = instance.isValidPosition(blockPos, serverLevel);

Spawner

  • Full name: net.minecraft.world.level.Spawner
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/Spawner.java
  • Type: interface
  • Modifiers: public

net.minecraft.world.level.Spawner#appendHoverText(ItemStack,List<Component>,String)

  • Origin: common
  • Source: net/minecraft/world/level/Spawner.java:20
  • Modifiers: static
  • Return: void

คืออะไร

ดำเนินการ appendHoverText ตาม implementation ของ Spawner

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getSpawnEntityDisplayName(), add(), translatable(), withStyle(), space(), append().

Parameters

  • ItemStack itemStack
  • List<Component> list
  • String string

ตัวอย่างใช้งาน

ItemStack itemStack = ...;
List<Component> list = ...;
Spawner.appendHoverText(itemStack, list, "value");

net.minecraft.world.level.Spawner#getSpawnEntityDisplayName(ItemStack,String)

  • Origin: common
  • Source: net/minecraft/world/level/Spawner.java:31
  • Modifiers: static
  • Return: Component

คืออะไร

อ่านค่า Spawn Entity Display Name

ทำงานยังไง

เรียกต่อ: getOrDefault(), getUnsafe(), getEntityKey(), getOptional(), map(), translatable(), getDescriptionId(), withStyle().

Parameters

  • ItemStack itemStack
  • String string

ตัวอย่างใช้งาน

ItemStack itemStack = ...;
Component result = Spawner.getSpawnEntityDisplayName(itemStack, "value");

net.minecraft.world.level.Spawner#setEntityId(EntityType<?>,RandomSource)

  • Origin: common
  • Source: net/minecraft/world/level/Spawner.java:18
  • Modifiers: ``
  • Return: void

คืออะไร

กำหนดค่า Entity Id

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • EntityType<?> entityType
  • RandomSource randomSource

ตัวอย่างใช้งาน

Spawner instance = ...;
EntityType<?> entityType = ...;
RandomSource randomSource = ...;
instance.setEntityId(entityType, randomSource);

StructureManager

  • Full name: net.minecraft.world.level.StructureManager
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/StructureManager.java
  • Type: class
  • Modifiers: public

net.minecraft.world.level.StructureManager#addReference(StructureStart)

  • Origin: common
  • Source: net/minecraft/world/level/StructureManager.java:166
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Reference

ทำงานยังไง

เรียกต่อ: incrementReference(), getChunkPos(), getStructure().

Parameters

  • StructureStart structureStart

ตัวอย่างใช้งาน

StructureManager instance = ...;
StructureStart structureStart = ...;
instance.addReference(structureStart);

net.minecraft.world.level.StructureManager#addReferenceForStructure(SectionPos,Structure,long,StructureAccess)

  • Origin: common
  • Source: net/minecraft/world/level/StructureManager.java:92
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Reference For Structure

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • SectionPos sectionPos
  • Structure structure
  • long l
  • StructureAccess structureAccess

ตัวอย่างใช้งาน

StructureManager instance = ...;
SectionPos sectionPos = ...;
Structure structure = ...;
StructureAccess structureAccess = ...;
instance.addReferenceForStructure(sectionPos, structure, 0L, structureAccess);

net.minecraft.world.level.StructureManager#checkStructurePresence(ChunkPos,Structure,StructurePlacement,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/StructureManager.java:162
  • Modifiers: public
  • Return: StructureCheckResult

คืออะไร

ตรวจสอบ Structure Presence

ทำงานยังไง

เรียกต่อ: checkStart(). คืนค่า: this.structureCheck.checkStart(chunkPos, structure, structurePlacement, bl).

Parameters

  • ChunkPos chunkPos
  • Structure structure
  • StructurePlacement structurePlacement
  • boolean bl

ตัวอย่างใช้งาน

StructureManager instance = ...;
ChunkPos chunkPos = ...;
Structure structure = ...;
StructurePlacement structurePlacement = ...;
StructureCheckResult result = instance.checkStructurePresence(chunkPos, structure, structurePlacement, true);

net.minecraft.world.level.StructureManager#fillStartsForStructure(Structure,LongSet,Consumer<StructureStart>)

  • Origin: common
  • Source: net/minecraft/world/level/StructureManager.java:71
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ fillStartsForStructure ตาม implementation ของ StructureManager

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: of(), getMinSectionY(), getStartForStructure(), getChunk(), x(), z(), isValid(), accept(). สร้างออบเจ็กต์: ChunkPos.

Parameters

  • Structure structure
  • LongSet longSet
  • Consumer<StructureStart> consumer

ตัวอย่างใช้งาน

StructureManager instance = ...;
Structure structure = ...;
LongSet longSet = ...;
Consumer<StructureStart> consumer = ...;
instance.fillStartsForStructure(structure, longSet, consumer);

net.minecraft.world.level.StructureManager#forWorldGenRegion(WorldGenRegion)

  • Origin: common
  • Source: net/minecraft/world/level/StructureManager.java:42
  • Modifiers: public
  • Return: StructureManager

คืออะไร

ดำเนินการ forWorldGenRegion ตาม implementation ของ StructureManager

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getLevel(), manager(). สร้างออบเจ็กต์: IllegalStateException, StructureManager. คืนค่า: new StructureManager(worldGenRegion, this.worldOptions, this.structureCheck).

Parameters

  • WorldGenRegion worldGenRegion

ตัวอย่างใช้งาน

StructureManager instance = ...;
WorldGenRegion worldGenRegion = ...;
StructureManager result = instance.forWorldGenRegion(worldGenRegion);

net.minecraft.world.level.StructureManager#getAllStructuresAt(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/StructureManager.java:157
  • Modifiers: public
  • Return: Map<Structure, LongSet>

คืออะไร

อ่านค่า All Structures At

ทำงานยังไง

เรียกต่อ: of(), getChunk(), x(), z(), getAllReferences(). คืนค่า: this.level.getChunk(sectionPos.x(), sectionPos.z(), ChunkStatus.STRUCTURE_REFERENCES).getAllReferences().

Parameters

  • BlockPos blockPos

ตัวอย่างใช้งาน

StructureManager instance = ...;
BlockPos blockPos = ...;
Map<Structure, LongSet> result = instance.getAllStructuresAt(blockPos);

net.minecraft.world.level.StructureManager#getStartForStructure(SectionPos,Structure,StructureAccess)

  • Origin: common
  • Source: net/minecraft/world/level/StructureManager.java:83
  • Modifiers: public
  • Return: StructureStart

คืออะไร

อ่านค่า Start For Structure

ทำงานยังไง

คืนค่า: structureAccess.getStartForStructure(structure).

Parameters

  • SectionPos sectionPos
  • Structure structure
  • StructureAccess structureAccess

ตัวอย่างใช้งาน

StructureManager instance = ...;
SectionPos sectionPos = ...;
Structure structure = ...;
StructureAccess structureAccess = ...;
StructureStart result = instance.getStartForStructure(sectionPos, structure, structureAccess);

net.minecraft.world.level.StructureManager#getStructureAt(BlockPos,Structure)

  • Origin: common
  • Source: net/minecraft/world/level/StructureManager.java:100
  • Modifiers: public
  • Return: StructureStart

คืออะไร

อ่านค่า Structure At

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: startsForStructure(), of(), getBoundingBox(), isInside(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • BlockPos blockPos
  • Structure structure

ตัวอย่างใช้งาน

StructureManager instance = ...;
BlockPos blockPos = ...;
Structure structure = ...;
StructureStart result = instance.getStructureAt(blockPos, structure);

net.minecraft.world.level.StructureManager#getStructureWithPieceAt(BlockPos,HolderSet<Structure>)

  • Origin: common
  • Source: net/minecraft/world/level/StructureManager.java:114
  • Modifiers: public
  • Return: StructureStart

คืออะไร

อ่านค่า Structure With Piece At

ทำงานยังไง

คืนค่า: this.getStructureWithPieceAt(blockPos, holderSet::contains).

Parameters

  • BlockPos blockPos
  • HolderSet<Structure> holderSet

ตัวอย่างใช้งาน

StructureManager instance = ...;
BlockPos blockPos = ...;
HolderSet<Structure> holderSet = ...;
StructureStart result = instance.getStructureWithPieceAt(blockPos, holderSet);

net.minecraft.world.level.StructureManager#getStructureWithPieceAt(BlockPos,Predicate<Holder<Structure>>)

  • Origin: common
  • Source: net/minecraft/world/level/StructureManager.java:118
  • Modifiers: public
  • Return: StructureStart

คืออะไร

อ่านค่า Structure With Piece At

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: registryAccess(), lookupOrThrow(), startsForStructure(), get(), getId(), map(), orElse(), structureHasPieceAt(). สร้างออบเจ็กต์: ChunkPos. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • BlockPos blockPos
  • Predicate<Holder<Structure>> predicate

ตัวอย่างใช้งาน

StructureManager instance = ...;
BlockPos blockPos = ...;
Predicate<Holder<Structure>> predicate = ...;
StructureStart result = instance.getStructureWithPieceAt(blockPos, predicate);

net.minecraft.world.level.StructureManager#getStructureWithPieceAt(BlockPos,Structure)

  • Origin: common
  • Source: net/minecraft/world/level/StructureManager.java:132
  • Modifiers: public
  • Return: StructureStart

คืออะไร

อ่านค่า Structure With Piece At

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: startsForStructure(), of(), structureHasPieceAt(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • BlockPos blockPos
  • Structure structure

ตัวอย่างใช้งาน

StructureManager instance = ...;
BlockPos blockPos = ...;
Structure structure = ...;
StructureStart result = instance.getStructureWithPieceAt(blockPos, structure);

net.minecraft.world.level.StructureManager#getStructureWithPieceAt(BlockPos,TagKey<Structure>)

  • Origin: common
  • Source: net/minecraft/world/level/StructureManager.java:110
  • Modifiers: public
  • Return: StructureStart

คืออะไร

อ่านค่า Structure With Piece At

ทำงานยังไง

เรียกต่อ: is(). คืนค่า: this.getStructureWithPieceAt(blockPos, holder -> holder.is(tagKey)).

Parameters

  • BlockPos blockPos
  • TagKey<Structure> tagKey

ตัวอย่างใช้งาน

StructureManager instance = ...;
BlockPos blockPos = ...;
TagKey<Structure> tagKey = ...;
StructureStart result = instance.getStructureWithPieceAt(blockPos, tagKey);

net.minecraft.world.level.StructureManager#hasAnyStructureAt(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/StructureManager.java:152
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Any Structure At

ทำงานยังไง

เรียกต่อ: of(), getChunk(), x(), z(), hasAnyStructureReferences(). คืนค่า: this.level.getChunk(sectionPos.x(), sectionPos.z(), ChunkStatus.STRUCTURE_REFERENCES).hasAnyStructureReferences().

Parameters

  • BlockPos blockPos

ตัวอย่างใช้งาน

StructureManager instance = ...;
BlockPos blockPos = ...;
boolean result = instance.hasAnyStructureAt(blockPos);

net.minecraft.world.level.StructureManager#registryAccess()

  • Origin: common
  • Source: net/minecraft/world/level/StructureManager.java:171
  • Modifiers: public
  • Return: RegistryAccess

คืออะไร

ดำเนินการ registryAccess ตาม implementation ของ StructureManager

ทำงานยังไง

คืนค่า: this.level.registryAccess().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

StructureManager instance = ...;
RegistryAccess result = instance.registryAccess();

net.minecraft.world.level.StructureManager#setStartForStructure(SectionPos,Structure,StructureStart,StructureAccess)

  • Origin: common
  • Source: net/minecraft/world/level/StructureManager.java:88
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Start For Structure

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • SectionPos sectionPos
  • Structure structure
  • StructureStart structureStart
  • StructureAccess structureAccess

ตัวอย่างใช้งาน

StructureManager instance = ...;
SectionPos sectionPos = ...;
Structure structure = ...;
StructureStart structureStart = ...;
StructureAccess structureAccess = ...;
instance.setStartForStructure(sectionPos, structure, structureStart, structureAccess);

net.minecraft.world.level.StructureManager#shouldGenerateStructures()

  • Origin: common
  • Source: net/minecraft/world/level/StructureManager.java:96
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Generate Structures

ทำงานยังไง

เรียกต่อ: generateStructures(). คืนค่า: this.worldOptions.generateStructures().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

StructureManager instance = ...;
boolean result = instance.shouldGenerateStructures();

net.minecraft.world.level.StructureManager#startsForStructure(ChunkPos,Predicate<Structure>)

  • Origin: common
  • Source: net/minecraft/world/level/StructureManager.java:50
  • Modifiers: public
  • Return: List<StructureStart>

คืออะไร

ดำเนินการ startsForStructure ตาม implementation ของ StructureManager

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getChunk(), getAllReferences(), builder(), entrySet(), getKey(), test(), fillStartsForStructure(), getValue(). คืนค่า: builder.build().

Parameters

  • ChunkPos chunkPos
  • Predicate<Structure> predicate

ตัวอย่างใช้งาน

StructureManager instance = ...;
ChunkPos chunkPos = ...;
Predicate<Structure> predicate = ...;
List<StructureStart> result = instance.startsForStructure(chunkPos, predicate);

net.minecraft.world.level.StructureManager#startsForStructure(SectionPos,Structure)

  • Origin: common
  • Source: net/minecraft/world/level/StructureManager.java:64
  • Modifiers: public
  • Return: List<StructureStart>

คืออะไร

ดำเนินการ startsForStructure ตาม implementation ของ StructureManager

ทำงานยังไง

เรียกต่อ: getChunk(), x(), z(), getReferencesForStructure(), builder(), fillStartsForStructure(), build(). คืนค่า: builder.build().

Parameters

  • SectionPos sectionPos
  • Structure structure

ตัวอย่างใช้งาน

StructureManager instance = ...;
SectionPos sectionPos = ...;
Structure structure = ...;
List<StructureStart> result = instance.startsForStructure(sectionPos, structure);

net.minecraft.world.level.StructureManager#structureHasPieceAt(BlockPos,StructureStart)

  • Origin: common
  • Source: net/minecraft/world/level/StructureManager.java:142
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ structureHasPieceAt ตาม implementation ของ StructureManager

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getPieces(), getBoundingBox(), isInside(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • BlockPos blockPos
  • StructureStart structureStart

ตัวอย่างใช้งาน

StructureManager instance = ...;
BlockPos blockPos = ...;
StructureStart structureStart = ...;
boolean result = instance.structureHasPieceAt(blockPos, structureStart);

net.minecraft.world.level.StructureManager#StructureManager(LevelAccessor,WorldOptions,StructureCheck)

  • Origin: common
  • Source: net/minecraft/world/level/StructureManager.java:36
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ StructureManager ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: level, worldOptions, structureCheck.

Parameters

  • LevelAccessor levelAccessor
  • WorldOptions worldOptions
  • StructureCheck structureCheck

ตัวอย่างใช้งาน

LevelAccessor levelAccessor = ...;
WorldOptions worldOptions = ...;
StructureCheck structureCheck = ...;
StructureManager instance = new StructureManager(levelAccessor, worldOptions, structureCheck);

WorldDataConfiguration

  • Full name: net.minecraft.world.level.WorldDataConfiguration
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/WorldDataConfiguration.java
  • Type: record
  • Modifiers: public

net.minecraft.world.level.WorldDataConfiguration#expandFeatures(FeatureFlagSet)

  • Origin: common
  • Source: net/minecraft/world/level/WorldDataConfiguration.java:19
  • Modifiers: public
  • Return: WorldDataConfiguration

คืออะไร

ดำเนินการ expandFeatures ตาม implementation ของ WorldDataConfiguration

ทำงานยังไง

เรียกต่อ: join(). สร้างออบเจ็กต์: WorldDataConfiguration. คืนค่า: new WorldDataConfiguration(this.dataPacks, this.enabledFeatures.join(featureFlagSet)).

Parameters

  • FeatureFlagSet featureFlagSet

ตัวอย่างใช้งาน

WorldDataConfiguration instance = ...;
FeatureFlagSet featureFlagSet = ...;
WorldDataConfiguration result = instance.expandFeatures(featureFlagSet);

WorldGenLevel

  • Full name: net.minecraft.world.level.WorldGenLevel
  • Package: net.minecraft.world.level
  • Source: commonnet/minecraft/world/level/WorldGenLevel.java
  • Type: interface
  • Modifiers: public
  • Implements: ServerLevelAccessor

net.minecraft.world.level.WorldGenLevel#ensureCanWrite(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/WorldGenLevel.java:10
  • Modifiers: default
  • Return: boolean

คืออะไร

ดำเนินการ ensureCanWrite ตาม implementation ของ WorldGenLevel

ทำงานยังไง

คืนค่า: true.

Parameters

  • BlockPos blockPos

ตัวอย่างใช้งาน

WorldGenLevel instance = ...;
BlockPos blockPos = ...;
boolean result = instance.ensureCanWrite(blockPos);

net.minecraft.world.level.WorldGenLevel#getSeed()

  • Origin: common
  • Source: net/minecraft/world/level/WorldGenLevel.java:8
  • Modifiers: ``
  • Return: long

คืออะไร

อ่านค่า Seed

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

WorldGenLevel instance = ...;
long result = instance.getSeed();

net.minecraft.world.level.WorldGenLevel#setCurrentlyGenerating(Supplier<String>)

  • Origin: common
  • Source: net/minecraft/world/level/WorldGenLevel.java:14
  • Modifiers: default
  • Return: void

คืออะไร

กำหนดค่า Currently Generating

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • Supplier<String> supplier

ตัวอย่างใช้งาน

WorldGenLevel instance = ...;
Supplier<String> supplier = ...;
instance.setCurrentlyGenerating(supplier);