Package net.minecraft.world.level.block
Part 1/2
AbstractBannerBlock
- Full name:
net.minecraft.world.level.block.AbstractBannerBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/AbstractBannerBlock.java - Type:
class - Modifiers:
public abstract - Extends:
BaseEntityBlock
net.minecraft.world.level.block.AbstractBannerBlock#AbstractBannerBlock(DyeColor,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractBannerBlock.java:16 - Modifiers:
protected - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ AbstractBannerBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: color.
Parameters
DyeColor dyeColorBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
DyeColor dyeColor = ...;
BlockBehaviour.Properties properties = ...;
AbstractBannerBlock instance = new AbstractBannerBlock(dyeColor, properties);
net.minecraft.world.level.block.AbstractBannerBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractBannerBlock.java:21 - Modifiers:
protected abstract - Return:
MapCodec<? extends AbstractBannerBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ AbstractBannerBlock
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.AbstractBannerBlock#getCloneItemStack(LevelReader,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractBannerBlock.java:34 - Modifiers:
protected - Return:
ItemStack
คืออะไร
อ่านค่า Clone Item Stack
ทำงานยังไง
เรียกต่อ: getBlockEntity(), getItem().
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockStateboolean bl
ตัวอย่างใช้งาน
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected ItemStack getCloneItemStack(LevelReader levelReader, BlockPos blockPos, BlockState blockState, boolean bl) {
return super.getCloneItemStack(levelReader, blockPos, blockState, bl);
}
net.minecraft.world.level.block.AbstractBannerBlock#getColor()
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractBannerBlock.java:41 - Modifiers:
public - Return:
DyeColor
คืออะไร
อ่านค่า Color
ทำงานยังไง
คืนค่า: this.color.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.AbstractBannerBlock#isPossibleToRespawnInThis(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractBannerBlock.java:24 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Possible To Respawn In This
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
AbstractBannerBlock instance = ...;
BlockState blockState = ...;
boolean result = instance.isPossibleToRespawnInThis(blockState);
net.minecraft.world.level.block.AbstractBannerBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractBannerBlock.java:29 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ AbstractBannerBlock
ทำงานยังไง
สร้างออบเจ็กต์: BannerBlockEntity. คืนค่า: new BannerBlockEntity(blockPos, blockState, this.color).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
AbstractBannerBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
AbstractCandleBlock
- Full name:
net.minecraft.world.level.block.AbstractCandleBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/AbstractCandleBlock.java - Type:
class - Modifiers:
public abstract - Extends:
Block
net.minecraft.world.level.block.AbstractCandleBlock#AbstractCandleBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractCandleBlock.java:34 - Modifiers:
protected - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ AbstractCandleBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
AbstractCandleBlock instance = new AbstractCandleBlock(properties);
net.minecraft.world.level.block.AbstractCandleBlock#animateTick(BlockState,Level,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractCandleBlock.java:55 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ animateTick ตาม implementation ของ AbstractCandleBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), getParticleOffsets(), forEach(), addParticlesAndSound(), add(), getX(), getY(), getZ().
Parameters
BlockState blockStateLevel levelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
AbstractCandleBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
instance.animateTick(blockState, level, blockPos, randomSource);
net.minecraft.world.level.block.AbstractCandleBlock#canBeLit(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractCandleBlock.java:51 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Be Lit
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: !blockState.getValue(LIT).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean canBeLit(BlockState blockState) {
return super.canBeLit(blockState);
}
net.minecraft.world.level.block.AbstractCandleBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractCandleBlock.java:31 - Modifiers:
protected abstract - Return:
MapCodec<? extends AbstractCandleBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ AbstractCandleBlock
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.AbstractCandleBlock#extinguish(Player,BlockState,LevelAccessor,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractCandleBlock.java:83 - Modifiers:
public static - Return:
void
คืออะไร
ดำเนินการ extinguish ตาม implementation ของ AbstractCandleBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: setLit(), getBlock(), getParticleOffsets(), forEach(), addParticle(), getX(), x(), getY().
Parameters
Player playerBlockState blockStateLevelAccessor levelAccessorBlockPos blockPos
ตัวอย่างใช้งาน
Player player = ...;
BlockState blockState = ...;
LevelAccessor levelAccessor = ...;
BlockPos blockPos = ...;
AbstractCandleBlock.extinguish(player, blockState, levelAccessor, blockPos);
net.minecraft.world.level.block.AbstractCandleBlock#getParticleOffsets(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractCandleBlock.java:38 - Modifiers:
protected abstract - Return:
Iterable<Vec3>
คืออะไร
อ่านค่า Particle Offsets
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected Iterable<Vec3> getParticleOffsets(BlockState blockState) {
return super.getParticleOffsets(blockState);
}
net.minecraft.world.level.block.AbstractCandleBlock#isLit(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractCandleBlock.java:40 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Lit
ทำงานยังไง
เรียกต่อ: hasProperty(), is(), getValue(). คืนค่า: blockState.hasProperty(LIT) && (blockState.is(BlockTags.CANDLES) || blockState.is(BlockTags.CANDLE_CAKES)) && blockState.getValue(LIT).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
net.minecraft.world.level.block.AbstractCandleBlock#onExplosionHit(BlockState,ServerLevel,BlockPos,Explosion,BiConsumer<ItemStack, BlockPos>)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractCandleBlock.java:101 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Explosion Hit
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canTriggerBlocks(), getValue(), extinguish().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosExplosion explosionBiConsumer<ItemStack, BlockPos> biConsumer
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
Explosion explosion = ...;
BiConsumer<ItemStack, BlockPos> biConsumer = ...;
@Override
protected void onExplosionHit(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, Explosion explosion, BiConsumer<ItemStack, BlockPos> biConsumer) {
super.onExplosionHit(blockState, serverLevel, blockPos, explosion, biConsumer);
}
net.minecraft.world.level.block.AbstractCandleBlock#onProjectileHit(Level,BlockState,BlockHitResult,Projectile)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractCandleBlock.java:44 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Projectile Hit
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isOnFire(), canBeLit(), setLit(), getBlockPos().
Parameters
Level levelBlockState blockStateBlockHitResult blockHitResultProjectile projectile
ตัวอย่างใช้งาน
Level level = ...;
BlockState blockState = ...;
BlockHitResult blockHitResult = ...;
Projectile projectile = ...;
@Override
protected void onProjectileHit(Level level, BlockState blockState, BlockHitResult blockHitResult, Projectile projectile) {
super.onProjectileHit(level, blockState, blockHitResult, projectile);
}
AbstractCauldronBlock
- Full name:
net.minecraft.world.level.block.AbstractCauldronBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/AbstractCauldronBlock.java - Type:
class - Modifiers:
public abstract - Extends:
Block
net.minecraft.world.level.block.AbstractCauldronBlock#AbstractCauldronBlock(BlockBehaviour.Properties,CauldronInteraction.InteractionMap)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractCauldronBlock.java:43 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ AbstractCauldronBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: interactions.
Parameters
BlockBehaviour.Properties propertiesCauldronInteraction.InteractionMap interactionMap
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
CauldronInteraction.InteractionMap interactionMap = ...;
AbstractCauldronBlock instance = new AbstractCauldronBlock(properties, interactionMap);
net.minecraft.world.level.block.AbstractCauldronBlock#canReceiveStalactiteDrip(Fluid)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractCauldronBlock.java:97 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Receive Stalactite Drip
ทำงานยังไง
คืนค่า: false.
Parameters
Fluid fluid
ตัวอย่างใช้งาน
Fluid fluid = ...;
@Override
protected boolean canReceiveStalactiteDrip(Fluid fluid) {
return super.canReceiveStalactiteDrip(fluid);
}
net.minecraft.world.level.block.AbstractCauldronBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractCauldronBlock.java:40 - Modifiers:
protected abstract - Return:
MapCodec<? extends AbstractCauldronBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ AbstractCauldronBlock
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.AbstractCauldronBlock#getContentHeight(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractCauldronBlock.java:48 - Modifiers:
protected - Return:
double
คืออะไร
อ่านค่า Content Height
ทำงานยังไง
คืนค่า: 0.0.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected double getContentHeight(BlockState blockState) {
return super.getContentHeight(blockState);
}
net.minecraft.world.level.block.AbstractCauldronBlock#getInteractionShape(BlockState,BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractCauldronBlock.java:69 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Interaction Shape
ทำงานยังไง
คืนค่า: INSIDE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
@Override
protected VoxelShape getInteractionShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos) {
return super.getInteractionShape(blockState, blockGetter, blockPos);
}
net.minecraft.world.level.block.AbstractCauldronBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractCauldronBlock.java:64 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
คืนค่า: SHAPE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.AbstractCauldronBlock#hasAnalogOutputSignal(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractCauldronBlock.java:74 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Analog Output Signal
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean hasAnalogOutputSignal(BlockState blockState) {
return super.hasAnalogOutputSignal(blockState);
}
net.minecraft.world.level.block.AbstractCauldronBlock#isEntityInsideContent(BlockState,BlockPos,Entity)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractCauldronBlock.java:52 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Entity Inside Content
ทำงานยังไง
เรียกต่อ: getY(), getContentHeight(), getBoundingBox(). คืนค่า: entity.getY() < blockPos.getY() + this.getContentHeight(blockState) && entity.getBoundingBox().maxY > blockPos.getY() + 0.25.
Parameters
BlockState blockStateBlockPos blockPosEntity entity
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockPos blockPos = ...;
Entity entity = ...;
@Override
protected boolean isEntityInsideContent(BlockState blockState, BlockPos blockPos, Entity entity) {
return super.isEntityInsideContent(blockState, blockPos, entity);
}
net.minecraft.world.level.block.AbstractCauldronBlock#isFull(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractCauldronBlock.java:84 - Modifiers:
public abstract - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Full
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
BlockState blockState
ตัวอย่างใช้งาน
AbstractCauldronBlock instance = ...;
BlockState blockState = ...;
boolean result = instance.isFull(blockState);
net.minecraft.world.level.block.AbstractCauldronBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractCauldronBlock.java:79 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.AbstractCauldronBlock#receiveStalactiteDrip(BlockState,Level,BlockPos,Fluid)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractCauldronBlock.java:101 - Modifiers:
protected - Return:
void
คืออะไร
รับ Stalactite Drip
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockState blockStateLevel levelBlockPos blockPosFluid fluid
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Fluid fluid = ...;
@Override
protected void receiveStalactiteDrip(BlockState blockState, Level level, BlockPos blockPos, Fluid fluid) {
super.receiveStalactiteDrip(blockState, level, blockPos, fluid);
}
net.minecraft.world.level.block.AbstractCauldronBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractCauldronBlock.java:86 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: findStalactiteTipAboveCauldron(), getCauldronFillFluidType(), canReceiveStalactiteDrip(), receiveStalactiteDrip().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.AbstractCauldronBlock#useItemOn(ItemStack,BlockState,Level,BlockPos,Player,InteractionHand,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractCauldronBlock.java:56 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Item On
ทำงานยังไง
เรียกต่อ: map(), get(), getItem(), interact(). คืนค่า: cauldronInteraction.interact(blockState, level, blockPos, player, interactionHand, itemStack).
Parameters
ItemStack itemStackBlockState blockStateLevel levelBlockPos blockPosPlayer playerInteractionHand interactionHandBlockHitResult blockHitResult
ตัวอย่างใช้งาน
ItemStack itemStack = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
InteractionHand interactionHand = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useItemOn(ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult) {
return super.useItemOn(itemStack, blockState, level, blockPos, player, interactionHand, blockHitResult);
}
AbstractChestBlock
- Full name:
net.minecraft.world.level.block.AbstractChestBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/AbstractChestBlock.java - Type:
class - Modifiers:
public abstract - Extends:
BaseEntityBlock
net.minecraft.world.level.block.AbstractChestBlock#AbstractChestBlock(BlockBehaviour.Properties,Supplier<BlockEntityType<? extends E>>)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractChestBlock.java:16 - Modifiers:
protected - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ AbstractChestBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: blockEntityType.
Parameters
BlockBehaviour.Properties propertiesSupplier<BlockEntityType<? extends E>> supplier
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
Supplier<BlockEntityType<? extends E>> supplier = ...;
AbstractChestBlock instance = new AbstractChestBlock(properties, supplier);
net.minecraft.world.level.block.AbstractChestBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractChestBlock.java:21 - Modifiers:
protected abstract - Return:
MapCodec<? extends AbstractChestBlock<E>>
คืออะไร
ดำเนินการ codec ตาม implementation ของ AbstractChestBlock
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.AbstractChestBlock#combine(BlockState,Level,BlockPos,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractChestBlock.java:24 - Modifiers:
public abstract - Return:
DoubleBlockCombiner.NeighborCombineResult<? extends ChestBlockEntity>
คืออะไร
ดำเนินการ combine ตาม implementation ของ AbstractChestBlock
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
BlockState blockStateLevel levelBlockPos blockPosboolean bl
ตัวอย่างใช้งาน
AbstractChestBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
DoubleBlockCombiner.NeighborCombineResult<? extends ChestBlockEntity> result = instance.combine(blockState, level, blockPos, true);
AbstractFurnaceBlock
- Full name:
net.minecraft.world.level.block.AbstractFurnaceBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/AbstractFurnaceBlock.java - Type:
class - Modifiers:
public abstract - Extends:
BaseEntityBlock
net.minecraft.world.level.block.AbstractFurnaceBlock#AbstractFurnaceBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractFurnaceBlock.java:31 - Modifiers:
protected - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ AbstractFurnaceBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
AbstractFurnaceBlock instance = new AbstractFurnaceBlock(properties);
net.minecraft.world.level.block.AbstractFurnaceBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractFurnaceBlock.java:36 - Modifiers:
protected abstract - Return:
MapCodec<? extends AbstractFurnaceBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ AbstractFurnaceBlock
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.AbstractFurnaceBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractFurnaceBlock.java:93 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.AbstractFurnaceBlock#createFurnaceTicker(Level,BlockEntityType<T>,BlockEntityType<? extends AbstractFurnaceBlockEntity>)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractFurnaceBlock.java:98 - Modifiers:
protected static - Return:
BlockEntityTicker<T>
คืออะไร
สร้าง Furnace Ticker
ทำงานยังไง
เรียกต่อ: createTickerHelper(), serverTick().
Parameters
Level levelBlockEntityType<T> blockEntityTypeBlockEntityType<? extends AbstractFurnaceBlockEntity> blockEntityType2
ตัวอย่างใช้งาน
Level level = ...;
BlockEntityType<T> blockEntityType = ...;
BlockEntityType<? extends AbstractFurnaceBlockEntity> blockEntityType2 = ...;
@Override
protected BlockEntityTicker<T> createFurnaceTicker(Level level, BlockEntityType<T> blockEntityType, BlockEntityType<? extends AbstractFurnaceBlockEntity> blockEntityType2) {
return super.createFurnaceTicker(level, blockEntityType, blockEntityType2);
}
net.minecraft.world.level.block.AbstractFurnaceBlock#getAnalogOutputSignal(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractFurnaceBlock.java:78 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Analog Output Signal
ทำงานยังไง
เรียกต่อ: getRedstoneSignalFromBlockEntity(), getBlockEntity(). คืนค่า: AbstractContainerMenu.getRedstoneSignalFromBlockEntity(level.getBlockEntity(blockPos)).
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected int getAnalogOutputSignal(BlockState blockState, Level level, BlockPos blockPos) {
return super.getAnalogOutputSignal(blockState, level, blockPos);
}
net.minecraft.world.level.block.AbstractFurnaceBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractFurnaceBlock.java:50 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: defaultBlockState(), setValue(), getHorizontalDirection(), getOpposite(). คืนค่า: this.defaultBlockState().setValue(FACING, blockPlaceContext.getHorizontalDirection().getOpposite()).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
AbstractFurnaceBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.AbstractFurnaceBlock#hasAnalogOutputSignal(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractFurnaceBlock.java:73 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Analog Output Signal
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean hasAnalogOutputSignal(BlockState blockState) {
return super.hasAnalogOutputSignal(blockState);
}
net.minecraft.world.level.block.AbstractFurnaceBlock#mirror(BlockState,Mirror)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractFurnaceBlock.java:88 - Modifiers:
protected - Return:
BlockState
คืออะไร
ดำเนินการ mirror ตาม implementation ของ AbstractFurnaceBlock
ทำงานยังไง
เรียกต่อ: rotate(), getRotation(), getValue(). คืนค่า: blockState.rotate(mirror.getRotation(blockState.getValue(FACING))).
Parameters
BlockState blockStateMirror mirror
ตัวอย่างใช้งาน
BlockState blockState = ...;
Mirror mirror = ...;
@Override
protected BlockState mirror(BlockState blockState, Mirror mirror) {
return super.mirror(blockState, mirror);
}
net.minecraft.world.level.block.AbstractFurnaceBlock#onRemove(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractFurnaceBlock.java:55 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Remove
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), getBlock(), getBlockEntity(), dropContents(), getRecipesToAwardAndPopExperience(), atCenterOf(), updateNeighbourForOutputSignal().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onRemove(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onRemove(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.AbstractFurnaceBlock#openContainer(Level,BlockPos,Player)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractFurnaceBlock.java:48 - Modifiers:
protected abstract - Return:
void
คืออะไร
เปิด Container
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
Level levelBlockPos blockPosPlayer player
ตัวอย่างใช้งาน
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
@Override
protected void openContainer(Level level, BlockPos blockPos, Player player) {
super.openContainer(level, blockPos, player);
}
net.minecraft.world.level.block.AbstractFurnaceBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractFurnaceBlock.java:83 - Modifiers:
protected - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
เรียกต่อ: setValue(), getValue(). คืนค่า: blockState.setValue(FACING, rotation.rotate(blockState.getValue(FACING))).
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
BlockState blockState = ...;
Rotation rotation = ...;
@Override
protected BlockState rotate(BlockState blockState, Rotation rotation) {
return super.rotate(blockState, rotation);
}
net.minecraft.world.level.block.AbstractFurnaceBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractFurnaceBlock.java:39 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: openContainer(). คืนค่า: InteractionResult.SUCCESS.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
AbstractSkullBlock
- Full name:
net.minecraft.world.level.block.AbstractSkullBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/AbstractSkullBlock.java - Type:
class - Modifiers:
public abstract - Extends:
BaseEntityBlock
net.minecraft.world.level.block.AbstractSkullBlock#AbstractSkullBlock(SkullBlock.Type,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractSkullBlock.java:24 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ AbstractSkullBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: type. เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
SkullBlock.Type typeBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
SkullBlock.Type type = ...;
BlockBehaviour.Properties properties = ...;
AbstractSkullBlock instance = new AbstractSkullBlock(type, properties);
net.minecraft.world.level.block.AbstractSkullBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractSkullBlock.java:30 - Modifiers:
protected abstract - Return:
MapCodec<? extends AbstractSkullBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ AbstractSkullBlock
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.AbstractSkullBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractSkullBlock.java:63 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.AbstractSkullBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractSkullBlock.java:68 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: defaultBlockState(), setValue(), getLevel(), hasNeighborSignal(), getClickedPos(). คืนค่า: this.defaultBlockState().setValue(POWERED, blockPlaceContext.getLevel().hasNeighborSignal(blockPlaceContext.getClickedPos())).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
AbstractSkullBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.AbstractSkullBlock#getTicker(Level,BlockState,BlockEntityType<T>)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractSkullBlock.java:38 - Modifiers:
public - Return:
BlockEntityTicker<T>
คืออะไร
อ่านค่า Ticker
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), createTickerHelper(). มีจุด return อย่างน้อย 2 จุด.
Parameters
Level levelBlockState blockStateBlockEntityType<T> blockEntityType
ตัวอย่างใช้งาน
AbstractSkullBlock instance = ...;
Level level = ...;
BlockState blockState = ...;
BlockEntityType<T> blockEntityType = ...;
BlockEntityTicker<T> result = instance.getTicker(level, blockState, blockEntityType);
net.minecraft.world.level.block.AbstractSkullBlock#getType()
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractSkullBlock.java:54 - Modifiers:
public - Return:
SkullBlock.Type
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: this.type.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.AbstractSkullBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractSkullBlock.java:58 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.AbstractSkullBlock#neighborChanged(BlockState,Level,BlockPos,Block,Orientation,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractSkullBlock.java:73 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ neighborChanged ตาม implementation ของ AbstractSkullBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: hasNeighborSignal(), getValue(), setBlock(), setValue().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlock blockOrientation orientationboolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Block block = ...;
Orientation orientation = ...;
@Override
protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, Orientation orientation, boolean bl) {
super.neighborChanged(blockState, level, blockPos, block, orientation, bl);
}
net.minecraft.world.level.block.AbstractSkullBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/AbstractSkullBlock.java:33 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ AbstractSkullBlock
ทำงานยังไง
สร้างออบเจ็กต์: SkullBlockEntity. คืนค่า: new SkullBlockEntity(blockPos, blockState).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
AbstractSkullBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
AirBlock
- Full name:
net.minecraft.world.level.block.AirBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/AirBlock.java - Type:
class - Modifiers:
public - Extends:
Block
net.minecraft.world.level.block.AirBlock#AirBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/AirBlock.java:20 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ AirBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.AirBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/AirBlock.java:15 - Modifiers:
public - Return:
MapCodec<AirBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ AirBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.AirBlock#getRenderShape(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/AirBlock.java:24 - Modifiers:
protected - Return:
RenderShape
คืออะไร
อ่านค่า Render Shape
ทำงานยังไง
คืนค่า: RenderShape.INVISIBLE.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected RenderShape getRenderShape(BlockState blockState) {
return super.getRenderShape(blockState);
}
net.minecraft.world.level.block.AirBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/AirBlock.java:29 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
เรียกต่อ: empty(). คืนค่า: Shapes.empty().
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
AmethystBlock
- Full name:
net.minecraft.world.level.block.AmethystBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/AmethystBlock.java - Type:
class - Modifiers:
public - Extends:
Block
net.minecraft.world.level.block.AmethystBlock#AmethystBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/AmethystBlock.java:22 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ AmethystBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.AmethystBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/AmethystBlock.java:17 - Modifiers:
public - Return:
MapCodec<? extends AmethystBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ AmethystBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.AmethystBlock#onProjectileHit(Level,BlockState,BlockHitResult,Projectile)
- Origin:
common - Source:
net/minecraft/world/level/block/AmethystBlock.java:26 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Projectile Hit
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockPos(), playSound(), nextFloat().
Parameters
Level levelBlockState blockStateBlockHitResult blockHitResultProjectile projectile
ตัวอย่างใช้งาน
Level level = ...;
BlockState blockState = ...;
BlockHitResult blockHitResult = ...;
Projectile projectile = ...;
@Override
protected void onProjectileHit(Level level, BlockState blockState, BlockHitResult blockHitResult, Projectile projectile) {
super.onProjectileHit(level, blockState, blockHitResult, projectile);
}
AmethystClusterBlock
- Full name:
net.minecraft.world.level.block.AmethystClusterBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/AmethystClusterBlock.java - Type:
class - Modifiers:
public - Extends:
AmethystBlock - Implements:
SimpleWaterloggedBlock
net.minecraft.world.level.block.AmethystClusterBlock#AmethystClusterBlock(float,float,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/AmethystClusterBlock.java:51 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ AmethystClusterBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: upAabb, downAabb, northAabb, southAabb, eastAabb, westAabb. เรียกต่อ: registerDefaultState(), defaultBlockState(), setValue(), box().
Parameters
float ffloat gBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
AmethystClusterBlock instance = new AmethystClusterBlock(0.0F, 0.0F, properties);
net.minecraft.world.level.block.AmethystClusterBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/AmethystClusterBlock.java:84 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: getValue(), relative(), getOpposite(), getBlockState(), isFaceSturdy(). คืนค่า: levelReader.getBlockState(blockPos2).isFaceSturdy(levelReader, blockPos2, direction).
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.AmethystClusterBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/AmethystClusterBlock.java:46 - Modifiers:
public - Return:
MapCodec<AmethystClusterBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ AmethystClusterBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.AmethystClusterBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/AmethystClusterBlock.java:136 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.AmethystClusterBlock#getFluidState(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/AmethystClusterBlock.java:131 - Modifiers:
protected - Return:
FluidState
คืออะไร
อ่านค่า Fluid State
ทำงานยังไง
เรียกต่อ: getValue(), getSource(). คืนค่า: blockState.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(blockState).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected FluidState getFluidState(BlockState blockState) {
return super.getFluidState(blockState);
}
net.minecraft.world.level.block.AmethystClusterBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/AmethystClusterBlock.java:64 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
แยกกรณีด้วย switch. เรียกต่อ: getValue(). มีจุด return อย่างน้อย 6 จุด.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.AmethystClusterBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/AmethystClusterBlock.java:111 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: getLevel(), getClickedPos(), defaultBlockState(), setValue(), getFluidState(), getType(), getClickedFace().
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
AmethystClusterBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.AmethystClusterBlock#mirror(BlockState,Mirror)
- Origin:
common - Source:
net/minecraft/world/level/block/AmethystClusterBlock.java:126 - Modifiers:
protected - Return:
BlockState
คืออะไร
ดำเนินการ mirror ตาม implementation ของ AmethystClusterBlock
ทำงานยังไง
เรียกต่อ: rotate(), getRotation(), getValue(). คืนค่า: blockState.rotate(mirror.getRotation(blockState.getValue(FACING))).
Parameters
BlockState blockStateMirror mirror
ตัวอย่างใช้งาน
BlockState blockState = ...;
Mirror mirror = ...;
@Override
protected BlockState mirror(BlockState blockState, Mirror mirror) {
return super.mirror(blockState, mirror);
}
net.minecraft.world.level.block.AmethystClusterBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/AmethystClusterBlock.java:121 - Modifiers:
protected - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
เรียกต่อ: setValue(), getValue(). คืนค่า: blockState.setValue(FACING, rotation.rotate(blockState.getValue(FACING))).
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
BlockState blockState = ...;
Rotation rotation = ...;
@Override
protected BlockState rotate(BlockState blockState, Rotation rotation) {
return super.rotate(blockState, rotation);
}
net.minecraft.world.level.block.AmethystClusterBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/AmethystClusterBlock.java:91 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), scheduleTick(), getTickDelay(), getOpposite(), canSurvive(), defaultBlockState().
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
AnvilBlock
- Full name:
net.minecraft.world.level.block.AnvilBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/AnvilBlock.java - Type:
class - Modifiers:
public - Extends:
FallingBlock
net.minecraft.world.level.block.AnvilBlock#AnvilBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/AnvilBlock.java:52 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ AnvilBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.AnvilBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/AnvilBlock.java:47 - Modifiers:
public - Return:
MapCodec<AnvilBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ AnvilBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.AnvilBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/AnvilBlock.java:122 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.AnvilBlock#damage(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/AnvilBlock.java:108 - Modifiers:
public static - Return:
BlockState
คืออะไร
สร้าง/คำนวณความเสียหาย damage
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), defaultBlockState(), setValue(), getValue(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
net.minecraft.world.level.block.AnvilBlock#falling(FallingBlockEntity)
- Origin:
common - Source:
net/minecraft/world/level/block/AnvilBlock.java:84 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ falling ตาม implementation ของ AnvilBlock
ทำงานยังไง
เรียกต่อ: setHurtsEntities().
Parameters
FallingBlockEntity fallingBlockEntity
ตัวอย่างใช้งาน
FallingBlockEntity fallingBlockEntity = ...;
@Override
protected void falling(FallingBlockEntity fallingBlockEntity) {
super.falling(fallingBlockEntity);
}
net.minecraft.world.level.block.AnvilBlock#getDustColor(BlockState,BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/AnvilBlock.java:132 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Dust Color
ทำงานยังไง
เรียกต่อ: getMapColor(). คืนค่า: blockState.getMapColor(blockGetter, blockPos).col.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
AnvilBlock instance = ...;
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
int result = instance.getDustColor(blockState, blockGetter, blockPos);
net.minecraft.world.level.block.AnvilBlock#getFallDamageSource(Entity)
- Origin:
common - Source:
net/minecraft/world/level/block/AnvilBlock.java:103 - Modifiers:
public - Return:
DamageSource
คืออะไร
อ่านค่า Fall Damage Source
ทำงานยังไง
เรียกต่อ: damageSources(), anvil(). คืนค่า: entity.damageSources().anvil(entity).
Parameters
Entity entity
ตัวอย่างใช้งาน
AnvilBlock instance = ...;
Entity entity = ...;
DamageSource result = instance.getFallDamageSource(entity);
net.minecraft.world.level.block.AnvilBlock#getMenuProvider(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/AnvilBlock.java:72 - Modifiers:
protected - Return:
MenuProvider
คืออะไร
อ่านค่า Menu Provider
ทำงานยังไง
เรียกต่อ: create(). สร้างออบเจ็กต์: SimpleMenuProvider, AnvilMenu. คืนค่า: new SimpleMenuProvider((i, inventory, player) -> new AnvilMenu(i, inventory, ContainerLevelAccess.create(level, blockPos)), CONTAINER_TITLE).
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected MenuProvider getMenuProvider(BlockState blockState, Level level, BlockPos blockPos) {
return super.getMenuProvider(blockState, level, blockPos);
}
net.minecraft.world.level.block.AnvilBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/AnvilBlock.java:78 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
เรียกต่อ: getValue(), getAxis(). คืนค่า: direction.getAxis() == Direction.Axis.X ? X_AXIS_AABB : Z_AXIS_AABB.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.AnvilBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/AnvilBlock.java:57 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: defaultBlockState(), setValue(), getHorizontalDirection(), getClockWise(). คืนค่า: this.defaultBlockState().setValue(FACING, blockPlaceContext.getHorizontalDirection().getClockWise()).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
AnvilBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.AnvilBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/AnvilBlock.java:127 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.AnvilBlock#onBrokenAfterFall(Level,BlockPos,FallingBlockEntity)
- Origin:
common - Source:
net/minecraft/world/level/block/AnvilBlock.java:96 - Modifiers:
public - Return:
void
คืออะไร
จัดการเหตุการณ์ Broken After Fall
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isSilent(), levelEvent().
Parameters
Level levelBlockPos blockPosFallingBlockEntity fallingBlockEntity
ตัวอย่างใช้งาน
AnvilBlock instance = ...;
Level level = ...;
BlockPos blockPos = ...;
FallingBlockEntity fallingBlockEntity = ...;
instance.onBrokenAfterFall(level, blockPos, fallingBlockEntity);
net.minecraft.world.level.block.AnvilBlock#onLand(Level,BlockPos,BlockState,BlockState,FallingBlockEntity)
- Origin:
common - Source:
net/minecraft/world/level/block/AnvilBlock.java:89 - Modifiers:
public - Return:
void
คืออะไร
จัดการเหตุการณ์ Land
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isSilent(), levelEvent().
Parameters
Level levelBlockPos blockPosBlockState blockStateBlockState blockState2FallingBlockEntity fallingBlockEntity
ตัวอย่างใช้งาน
AnvilBlock instance = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockState blockState2 = ...;
FallingBlockEntity fallingBlockEntity = ...;
instance.onLand(level, blockPos, blockState, blockState2, fallingBlockEntity);
net.minecraft.world.level.block.AnvilBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/AnvilBlock.java:117 - Modifiers:
protected - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
เรียกต่อ: setValue(), getValue(). คืนค่า: blockState.setValue(FACING, rotation.rotate(blockState.getValue(FACING))).
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
BlockState blockState = ...;
Rotation rotation = ...;
@Override
protected BlockState rotate(BlockState blockState, Rotation rotation) {
return super.rotate(blockState, rotation);
}
net.minecraft.world.level.block.AnvilBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/AnvilBlock.java:62 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: openMenu(), getMenuProvider(), awardStat(). คืนค่า: InteractionResult.SUCCESS.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
AttachedStemBlock
- Full name:
net.minecraft.world.level.block.AttachedStemBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/AttachedStemBlock.java - Type:
class - Modifiers:
public - Extends:
BushBlock
net.minecraft.world.level.block.AttachedStemBlock#AttachedStemBlock(ResourceKey<Block>,ResourceKey<Block>,ResourceKey<Item>,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/AttachedStemBlock.java:60 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ AttachedStemBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: stem, fruit, seed. เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
ResourceKey<Block> resourceKeyResourceKey<Block> resourceKey2ResourceKey<Item> resourceKey3BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
ResourceKey<Block> resourceKey = ...;
ResourceKey<Block> resourceKey2 = ...;
ResourceKey<Item> resourceKey3 = ...;
BlockBehaviour.Properties properties = ...;
AttachedStemBlock instance = new AttachedStemBlock(resourceKey, resourceKey2, resourceKey3, properties);
net.minecraft.world.level.block.AttachedStemBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/AttachedStemBlock.java:55 - Modifiers:
public - Return:
MapCodec<AttachedStemBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ AttachedStemBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.AttachedStemBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/AttachedStemBlock.java:114 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.AttachedStemBlock#getCloneItemStack(LevelReader,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/AttachedStemBlock.java:99 - Modifiers:
protected - Return:
ItemStack
คืออะไร
อ่านค่า Clone Item Stack
ทำงานยังไง
เรียกต่อ: orElse(), registryAccess(), lookupOrThrow(), getOptional(). สร้างออบเจ็กต์: ItemStack. คืนค่า: new ItemStack(DataFixUtils.orElse(levelReader.registryAccess().lookupOrThrow(Registries.ITEM).getOptional(this.seed), this)).
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockStateboolean bl
ตัวอย่างใช้งาน
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected ItemStack getCloneItemStack(LevelReader levelReader, BlockPos blockPos, BlockState blockState, boolean bl) {
return super.getCloneItemStack(levelReader, blockPos, blockState, bl);
}
net.minecraft.world.level.block.AttachedStemBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/AttachedStemBlock.java:68 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
เรียกต่อ: get(), getValue(). คืนค่า: AABBS.get(blockState.getValue(FACING)).
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.AttachedStemBlock#mayPlaceOn(BlockState,BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/AttachedStemBlock.java:94 - Modifiers:
protected - Return:
boolean
คืออะไร
ดำเนินการ mayPlaceOn ตาม implementation ของ AttachedStemBlock
ทำงานยังไง
เรียกต่อ: is(). คืนค่า: blockState.is(Blocks.FARMLAND).
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
@Override
protected boolean mayPlaceOn(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos) {
return super.mayPlaceOn(blockState, blockGetter, blockPos);
}
net.minecraft.world.level.block.AttachedStemBlock#mirror(BlockState,Mirror)
- Origin:
common - Source:
net/minecraft/world/level/block/AttachedStemBlock.java:109 - Modifiers:
protected - Return:
BlockState
คืออะไร
ดำเนินการ mirror ตาม implementation ของ AttachedStemBlock
ทำงานยังไง
เรียกต่อ: rotate(), getRotation(), getValue(). คืนค่า: blockState.rotate(mirror.getRotation(blockState.getValue(FACING))).
Parameters
BlockState blockStateMirror mirror
ตัวอย่างใช้งาน
BlockState blockState = ...;
Mirror mirror = ...;
@Override
protected BlockState mirror(BlockState blockState, Mirror mirror) {
return super.mirror(blockState, mirror);
}
net.minecraft.world.level.block.AttachedStemBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/AttachedStemBlock.java:104 - Modifiers:
protected - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
เรียกต่อ: setValue(), getValue(). คืนค่า: blockState.setValue(FACING, rotation.rotate(blockState.getValue(FACING))).
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
BlockState blockState = ...;
Rotation rotation = ...;
@Override
protected BlockState rotate(BlockState blockState, Rotation rotation) {
return super.rotate(blockState, rotation);
}
net.minecraft.world.level.block.AttachedStemBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/AttachedStemBlock.java:73 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), getValue(), registryAccess(), lookupOrThrow(), getOptional(), isPresent(), get(), defaultBlockState(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
AzaleaBlock
- Full name:
net.minecraft.world.level.block.AzaleaBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/AzaleaBlock.java - Type:
class - Modifiers:
public - Extends:
BushBlock - Implements:
BonemealableBlock
net.minecraft.world.level.block.AzaleaBlock#AzaleaBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/AzaleaBlock.java:27 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ AzaleaBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.AzaleaBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/AzaleaBlock.java:22 - Modifiers:
public - Return:
MapCodec<AzaleaBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ AzaleaBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.AzaleaBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/AzaleaBlock.java:31 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
คืนค่า: SHAPE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.AzaleaBlock#isBonemealSuccess(Level,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/AzaleaBlock.java:46 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Bonemeal Success
ทำงานยังไง
เรียกต่อ: nextFloat(). คืนค่า: level.random.nextFloat() < 0.45.
Parameters
Level levelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
AzaleaBlock instance = ...;
Level level = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isBonemealSuccess(level, randomSource, blockPos, blockState);
net.minecraft.world.level.block.AzaleaBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/AzaleaBlock.java:56 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.AzaleaBlock#isValidBonemealTarget(LevelReader,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/AzaleaBlock.java:41 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Valid Bonemeal Target
ทำงานยังไง
เรียกต่อ: getFluidState(), above(), isEmpty(). คืนค่า: levelReader.getFluidState(blockPos.above()).isEmpty().
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
AzaleaBlock instance = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isValidBonemealTarget(levelReader, blockPos, blockState);
net.minecraft.world.level.block.AzaleaBlock#mayPlaceOn(BlockState,BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/AzaleaBlock.java:36 - Modifiers:
protected - Return:
boolean
คืออะไร
ดำเนินการ mayPlaceOn ตาม implementation ของ AzaleaBlock
ทำงานยังไง
เรียกต่อ: is(). คืนค่า: blockState.is(Blocks.CLAY) || super.mayPlaceOn(blockState, blockGetter, blockPos).
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
@Override
protected boolean mayPlaceOn(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos) {
return super.mayPlaceOn(blockState, blockGetter, blockPos);
}
net.minecraft.world.level.block.AzaleaBlock#performBonemeal(ServerLevel,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/AzaleaBlock.java:51 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ performBonemeal ตาม implementation ของ AzaleaBlock
ทำงานยังไง
เรียกต่อ: growTree(), getChunkSource(), getGenerator().
Parameters
ServerLevel serverLevelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
AzaleaBlock instance = ...;
ServerLevel serverLevel = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
instance.performBonemeal(serverLevel, randomSource, blockPos, blockState);
BambooSaplingBlock
- Full name:
net.minecraft.world.level.block.BambooSaplingBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BambooSaplingBlock.java - Type:
class - Modifiers:
public - Extends:
Block - Implements:
BonemealableBlock
net.minecraft.world.level.block.BambooSaplingBlock#BambooSaplingBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/BambooSaplingBlock.java:34 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ BambooSaplingBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
BambooSaplingBlock instance = new BambooSaplingBlock(properties);
net.minecraft.world.level.block.BambooSaplingBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BambooSaplingBlock.java:51 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: getBlockState(), below(), is(). คืนค่า: levelReader.getBlockState(blockPos.below()).is(BlockTags.BAMBOO_PLANTABLE_ON).
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.BambooSaplingBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/BambooSaplingBlock.java:29 - Modifiers:
public - Return:
MapCodec<BambooSaplingBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ BambooSaplingBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BambooSaplingBlock#getCloneItemStack(LevelReader,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/BambooSaplingBlock.java:76 - Modifiers:
protected - Return:
ItemStack
คืออะไร
อ่านค่า Clone Item Stack
ทำงานยังไง
สร้างออบเจ็กต์: ItemStack. คืนค่า: new ItemStack(Items.BAMBOO).
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockStateboolean bl
ตัวอย่างใช้งาน
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected ItemStack getCloneItemStack(LevelReader levelReader, BlockPos blockPos, BlockState blockState, boolean bl) {
return super.getCloneItemStack(levelReader, blockPos, blockState, bl);
}
net.minecraft.world.level.block.BambooSaplingBlock#getDestroyProgress(BlockState,Player,BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BambooSaplingBlock.java:96 - Modifiers:
protected - Return:
float
คืออะไร
อ่านค่า Destroy Progress
ทำงานยังไง
เรียกต่อ: getMainHandItem(), getItem(). คืนค่า: player.getMainHandItem().getItem() instanceof SwordItem ? 1.0F : super.getDestroyProgress(blockState, player, blockGetter, blockPos).
Parameters
BlockState blockStatePlayer playerBlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Player player = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
@Override
protected float getDestroyProgress(BlockState blockState, Player player, BlockGetter blockGetter, BlockPos blockPos) {
return super.getDestroyProgress(blockState, player, blockGetter, blockPos);
}
net.minecraft.world.level.block.BambooSaplingBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BambooSaplingBlock.java:38 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
เรียกต่อ: getOffset(), move(). คืนค่า: SAPLING_SHAPE.move(vec3.x, vec3.y, vec3.z).
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.BambooSaplingBlock#growBamboo(Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BambooSaplingBlock.java:101 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ growBamboo ตาม implementation ของ BambooSaplingBlock
ทำงานยังไง
เรียกต่อ: setBlock(), above(), defaultBlockState(), setValue().
Parameters
Level levelBlockPos blockPos
ตัวอย่างใช้งาน
Level level = ...;
BlockPos blockPos = ...;
@Override
protected void growBamboo(Level level, BlockPos blockPos) {
super.growBamboo(level, blockPos);
}
net.minecraft.world.level.block.BambooSaplingBlock#isBonemealSuccess(Level,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BambooSaplingBlock.java:86 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Bonemeal Success
ทำงานยังไง
คืนค่า: true.
Parameters
Level levelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BambooSaplingBlock instance = ...;
Level level = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isBonemealSuccess(level, randomSource, blockPos, blockState);
net.minecraft.world.level.block.BambooSaplingBlock#isValidBonemealTarget(LevelReader,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BambooSaplingBlock.java:81 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Valid Bonemeal Target
ทำงานยังไง
เรียกต่อ: getBlockState(), above(), isAir(). คืนค่า: levelReader.getBlockState(blockPos.above()).isAir().
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BambooSaplingBlock instance = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isValidBonemealTarget(levelReader, blockPos, blockState);
net.minecraft.world.level.block.BambooSaplingBlock#performBonemeal(ServerLevel,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BambooSaplingBlock.java:91 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ performBonemeal ตาม implementation ของ BambooSaplingBlock
ทำงานยังไง
เรียกต่อ: growBamboo().
Parameters
ServerLevel serverLevelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BambooSaplingBlock instance = ...;
ServerLevel serverLevel = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
instance.performBonemeal(serverLevel, randomSource, blockPos, blockState);
net.minecraft.world.level.block.BambooSaplingBlock#randomTick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BambooSaplingBlock.java:44 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ randomTick ตาม implementation ของ BambooSaplingBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: nextInt(), isEmptyBlock(), above(), getRawBrightness(), growBamboo().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void randomTick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.randomTick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.BambooSaplingBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BambooSaplingBlock.java:56 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canSurvive(), defaultBlockState(), is(). คืนค่า: Blocks.AIR.defaultBlockState().
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
BambooStalkBlock
- Full name:
net.minecraft.world.level.block.BambooStalkBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BambooStalkBlock.java - Type:
class - Modifiers:
public - Extends:
Block - Implements:
BonemealableBlock
net.minecraft.world.level.block.BambooStalkBlock#BambooStalkBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/BambooStalkBlock.java:52 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ BambooStalkBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
BambooStalkBlock instance = new BambooStalkBlock(properties);
net.minecraft.world.level.block.BambooStalkBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BambooStalkBlock.java:138 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: getBlockState(), below(), is(). คืนค่า: levelReader.getBlockState(blockPos.below()).is(BlockTags.BAMBOO_PLANTABLE_ON).
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.BambooStalkBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/BambooStalkBlock.java:47 - Modifiers:
public - Return:
MapCodec<BambooStalkBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ BambooStalkBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BambooStalkBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/BambooStalkBlock.java:57 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.BambooStalkBlock#getCollisionShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BambooStalkBlock.java:79 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Collision Shape
ทำงานยังไง
เรียกต่อ: getOffset(), move(). คืนค่า: COLLISION_SHAPE.move(vec3.x, vec3.y, vec3.z).
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getCollisionShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getCollisionShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.BambooStalkBlock#getDestroyProgress(BlockState,Player,BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BambooStalkBlock.java:195 - Modifiers:
protected - Return:
float
คืออะไร
อ่านค่า Destroy Progress
ทำงานยังไง
เรียกต่อ: getMainHandItem(), getItem(). คืนค่า: player.getMainHandItem().getItem() instanceof SwordItem ? 1.0F : super.getDestroyProgress(blockState, player, blockGetter, blockPos).
Parameters
BlockState blockStatePlayer playerBlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Player player = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
@Override
protected float getDestroyProgress(BlockState blockState, Player player, BlockGetter blockGetter, BlockPos blockPos) {
return super.getDestroyProgress(blockState, player, blockGetter, blockPos);
}
net.minecraft.world.level.block.BambooStalkBlock#getHeightAboveUpToMax(BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BambooStalkBlock.java:222 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Height Above Up To Max
ทำงานยังไง
มีการวนลูป. เรียกต่อ: getBlockState(), above(), is(). คืนค่า: i.
Parameters
BlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
@Override
protected int getHeightAboveUpToMax(BlockGetter blockGetter, BlockPos blockPos) {
return super.getHeightAboveUpToMax(blockGetter, blockPos);
}
net.minecraft.world.level.block.BambooStalkBlock#getHeightBelowUpToMax(BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BambooStalkBlock.java:232 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Height Below Up To Max
ทำงานยังไง
มีการวนลูป. เรียกต่อ: getBlockState(), below(), is(). คืนค่า: i.
Parameters
BlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
@Override
protected int getHeightBelowUpToMax(BlockGetter blockGetter, BlockPos blockPos) {
return super.getHeightBelowUpToMax(blockGetter, blockPos);
}
net.minecraft.world.level.block.BambooStalkBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BambooStalkBlock.java:67 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
เรียกต่อ: getValue(), getOffset(), move(). คืนค่า: voxelShape.move(vec3.x, vec3.y, vec3.z).
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.BambooStalkBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BambooStalkBlock.java:90 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getLevel(), getFluidState(), getClickedPos(), isEmpty(), getBlockState(), below(), is(), defaultBlockState(). มีจุด return อย่างน้อย 5 จุด.
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
BambooStalkBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.BambooStalkBlock#growBamboo(BlockState,Level,BlockPos,RandomSource,int)
- Origin:
common - Source:
net/minecraft/world/level/block/BambooStalkBlock.java:200 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ growBamboo ตาม implementation ของ BambooStalkBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockState(), below(), is(), getValue(), setBlock(), setValue(), nextFloat(), above().
Parameters
BlockState blockStateLevel levelBlockPos blockPosRandomSource randomSourceint i
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void growBamboo(BlockState blockState, Level level, BlockPos blockPos, RandomSource randomSource, int i) {
super.growBamboo(blockState, level, blockPos, randomSource, i);
}
net.minecraft.world.level.block.BambooStalkBlock#isBonemealSuccess(Level,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BambooStalkBlock.java:170 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Bonemeal Success
ทำงานยังไง
คืนค่า: true.
Parameters
Level levelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BambooStalkBlock instance = ...;
Level level = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isBonemealSuccess(level, randomSource, blockPos, blockState);
net.minecraft.world.level.block.BambooStalkBlock#isCollisionShapeFullBlock(BlockState,BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BambooStalkBlock.java:85 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Collision Shape Full Block
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
@Override
protected boolean isCollisionShapeFullBlock(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos) {
return super.isCollisionShapeFullBlock(blockState, blockGetter, blockPos);
}
net.minecraft.world.level.block.BambooStalkBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/BambooStalkBlock.java:74 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.BambooStalkBlock#isRandomlyTicking(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BambooStalkBlock.java:121 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Randomly Ticking
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: blockState.getValue(STAGE) == 0.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean isRandomlyTicking(BlockState blockState) {
return super.isRandomlyTicking(blockState);
}
net.minecraft.world.level.block.BambooStalkBlock#isValidBonemealTarget(LevelReader,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BambooStalkBlock.java:163 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Valid Bonemeal Target
ทำงานยังไง
เรียกต่อ: getHeightAboveUpToMax(), getHeightBelowUpToMax(), getBlockState(), above(), getValue(). คืนค่า: i + j + 1 < 16 && levelReader.getBlockState(blockPos.above(i)).getValue(STAGE) != 1.
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BambooStalkBlock instance = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isValidBonemealTarget(levelReader, blockPos, blockState);
net.minecraft.world.level.block.BambooStalkBlock#performBonemeal(ServerLevel,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BambooStalkBlock.java:175 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ performBonemeal ตาม implementation ของ BambooStalkBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getHeightAboveUpToMax(), getHeightBelowUpToMax(), nextInt(), above(), getBlockState(), getValue(), isEmptyBlock(), growBamboo().
Parameters
ServerLevel serverLevelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BambooStalkBlock instance = ...;
ServerLevel serverLevel = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
instance.performBonemeal(serverLevel, randomSource, blockPos, blockState);
net.minecraft.world.level.block.BambooStalkBlock#propagatesSkylightDown(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BambooStalkBlock.java:62 - Modifiers:
protected - Return:
boolean
คืออะไร
ดำเนินการ propagatesSkylightDown ตาม implementation ของ BambooStalkBlock
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean propagatesSkylightDown(BlockState blockState) {
return super.propagatesSkylightDown(blockState);
}
net.minecraft.world.level.block.BambooStalkBlock#randomTick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BambooStalkBlock.java:126 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ randomTick ตาม implementation ของ BambooStalkBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), nextInt(), isEmptyBlock(), above(), getRawBrightness(), getHeightBelowUpToMax(), growBamboo().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void randomTick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.randomTick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.BambooStalkBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BambooStalkBlock.java:114 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canSurvive(), destroyBlock().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.BambooStalkBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BambooStalkBlock.java:143 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canSurvive(), scheduleTick(), is(), getValue(), cycle().
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
BannerBlock
- Full name:
net.minecraft.world.level.block.BannerBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BannerBlock.java - Type:
class - Modifiers:
public - Extends:
AbstractBannerBlock
net.minecraft.world.level.block.BannerBlock#BannerBlock(DyeColor,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/BannerBlock.java:37 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ BannerBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue(), put().
Parameters
DyeColor dyeColorBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
DyeColor dyeColor = ...;
BlockBehaviour.Properties properties = ...;
BannerBlock instance = new BannerBlock(dyeColor, properties);
net.minecraft.world.level.block.BannerBlock#byColor(DyeColor)
- Origin:
common - Source:
net/minecraft/world/level/block/BannerBlock.java:89 - Modifiers:
public static - Return:
Block
คืออะไร
ดำเนินการ byColor ตาม implementation ของ BannerBlock
ทำงานยังไง
เรียกต่อ: getOrDefault(). คืนค่า: BY_COLOR.getOrDefault(dyeColor, Blocks.WHITE_BANNER).
Parameters
DyeColor dyeColor
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BannerBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BannerBlock.java:43 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: getBlockState(), below(), isSolid(). คืนค่า: levelReader.getBlockState(blockPos.below()).isSolid().
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.BannerBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/BannerBlock.java:32 - Modifiers:
public - Return:
MapCodec<BannerBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ BannerBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BannerBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/BannerBlock.java:84 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.BannerBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BannerBlock.java:48 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
คืนค่า: SHAPE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.BannerBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BannerBlock.java:53 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: defaultBlockState(), setValue(), convertToSegment(), getRotation(). คืนค่า: this.defaultBlockState().setValue(ROTATION, RotationSegment.convertToSegment(blockPlaceContext.getRotation() + 180.0F)).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
BannerBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.BannerBlock#mirror(BlockState,Mirror)
- Origin:
common - Source:
net/minecraft/world/level/block/BannerBlock.java:79 - Modifiers:
protected - Return:
BlockState
คืออะไร
ดำเนินการ mirror ตาม implementation ของ BannerBlock
ทำงานยังไง
เรียกต่อ: setValue(), getValue(). คืนค่า: blockState.setValue(ROTATION, mirror.mirror(blockState.getValue(ROTATION), 16)).
Parameters
BlockState blockStateMirror mirror
ตัวอย่างใช้งาน
BlockState blockState = ...;
Mirror mirror = ...;
@Override
protected BlockState mirror(BlockState blockState, Mirror mirror) {
return super.mirror(blockState, mirror);
}
net.minecraft.world.level.block.BannerBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/BannerBlock.java:74 - Modifiers:
protected - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
เรียกต่อ: setValue(), getValue(). คืนค่า: blockState.setValue(ROTATION, rotation.rotate(blockState.getValue(ROTATION), 16)).
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
BlockState blockState = ...;
Rotation rotation = ...;
@Override
protected BlockState rotate(BlockState blockState, Rotation rotation) {
return super.rotate(blockState, rotation);
}
net.minecraft.world.level.block.BannerBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BannerBlock.java:58 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
เรียกต่อ: canSurvive(), defaultBlockState().
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
BarrelBlock
- Full name:
net.minecraft.world.level.block.BarrelBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BarrelBlock.java - Type:
class - Modifiers:
public - Extends:
BaseEntityBlock
net.minecraft.world.level.block.BarrelBlock#BarrelBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/BarrelBlock.java:37 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ BarrelBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BarrelBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/BarrelBlock.java:32 - Modifiers:
public - Return:
MapCodec<BarrelBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ BarrelBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BarrelBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/BarrelBlock.java:93 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.BarrelBlock#getAnalogOutputSignal(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BarrelBlock.java:78 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Analog Output Signal
ทำงานยังไง
เรียกต่อ: getRedstoneSignalFromBlockEntity(), getBlockEntity(). คืนค่า: AbstractContainerMenu.getRedstoneSignalFromBlockEntity(level.getBlockEntity(blockPos)).
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected int getAnalogOutputSignal(BlockState blockState, Level level, BlockPos blockPos) {
return super.getAnalogOutputSignal(blockState, level, blockPos);
}
net.minecraft.world.level.block.BarrelBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BarrelBlock.java:98 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: defaultBlockState(), setValue(), getNearestLookingDirection(), getOpposite(). คืนค่า: this.defaultBlockState().setValue(FACING, blockPlaceContext.getNearestLookingDirection().getOpposite()).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
BarrelBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.BarrelBlock#hasAnalogOutputSignal(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BarrelBlock.java:73 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Analog Output Signal
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean hasAnalogOutputSignal(BlockState blockState) {
return super.hasAnalogOutputSignal(blockState);
}
net.minecraft.world.level.block.BarrelBlock#mirror(BlockState,Mirror)
- Origin:
common - Source:
net/minecraft/world/level/block/BarrelBlock.java:88 - Modifiers:
protected - Return:
BlockState
คืออะไร
ดำเนินการ mirror ตาม implementation ของ BarrelBlock
ทำงานยังไง
เรียกต่อ: rotate(), getRotation(), getValue(). คืนค่า: blockState.rotate(mirror.getRotation(blockState.getValue(FACING))).
Parameters
BlockState blockStateMirror mirror
ตัวอย่างใช้งาน
BlockState blockState = ...;
Mirror mirror = ...;
@Override
protected BlockState mirror(BlockState blockState, Mirror mirror) {
return super.mirror(blockState, mirror);
}
net.minecraft.world.level.block.BarrelBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BarrelBlock.java:67 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ BarrelBlock
ทำงานยังไง
สร้างออบเจ็กต์: BarrelBlockEntity. คืนค่า: new BarrelBlockEntity(blockPos, blockState).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BarrelBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
net.minecraft.world.level.block.BarrelBlock#onRemove(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/BarrelBlock.java:53 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Remove
ทำงานยังไง
เรียกต่อ: dropContentsOnDestroy().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onRemove(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onRemove(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.BarrelBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/BarrelBlock.java:83 - Modifiers:
protected - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
เรียกต่อ: setValue(), getValue(). คืนค่า: blockState.setValue(FACING, rotation.rotate(blockState.getValue(FACING))).
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
BlockState blockState = ...;
Rotation rotation = ...;
@Override
protected BlockState rotate(BlockState blockState, Rotation rotation) {
return super.rotate(blockState, rotation);
}
net.minecraft.world.level.block.BarrelBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BarrelBlock.java:59 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity(), recheckOpen().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.BarrelBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/BarrelBlock.java:42 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity(), openMenu(), awardStat(), angerNearbyPiglins(). คืนค่า: InteractionResult.SUCCESS.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
BarrierBlock
- Full name:
net.minecraft.world.level.block.BarrierBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BarrierBlock.java - Type:
class - Modifiers:
public - Extends:
Block - Implements:
SimpleWaterloggedBlock
net.minecraft.world.level.block.BarrierBlock#BarrierBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/BarrierBlock.java:33 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ BarrierBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), defaultBlockState(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BarrierBlock#canPlaceLiquid(Player,BlockGetter,BlockPos,BlockState,Fluid)
- Origin:
common - Source:
net/minecraft/world/level/block/BarrierBlock.java:93 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Place Liquid
ทำงานยังไง
เรียกต่อ: isCreative(). คืนค่า: player != null && player.isCreative() ? SimpleWaterloggedBlock.super.canPlaceLiquid(player, blockGetter, blockPos, blockState, fluid) : false.
Parameters
Player playerBlockGetter blockGetterBlockPos blockPosBlockState blockStateFluid fluid
ตัวอย่างใช้งาน
BarrierBlock instance = ...;
Player player = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
Fluid fluid = ...;
boolean result = instance.canPlaceLiquid(player, blockGetter, blockPos, blockState, fluid);
net.minecraft.world.level.block.BarrierBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/BarrierBlock.java:28 - Modifiers:
public - Return:
MapCodec<BarrierBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ BarrierBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BarrierBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/BarrierBlock.java:83 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.BarrierBlock#getFluidState(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BarrierBlock.java:71 - Modifiers:
protected - Return:
FluidState
คืออะไร
อ่านค่า Fluid State
ทำงานยังไง
เรียกต่อ: getValue(), getSource(). คืนค่า: blockState.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(blockState).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected FluidState getFluidState(BlockState blockState) {
return super.getFluidState(blockState);
}
net.minecraft.world.level.block.BarrierBlock#getRenderShape(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BarrierBlock.java:43 - Modifiers:
protected - Return:
RenderShape
คืออะไร
อ่านค่า Render Shape
ทำงานยังไง
คืนค่า: RenderShape.INVISIBLE.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected RenderShape getRenderShape(BlockState blockState) {
return super.getRenderShape(blockState);
}
net.minecraft.world.level.block.BarrierBlock#getShadeBrightness(BlockState,BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BarrierBlock.java:48 - Modifiers:
protected - Return:
float
คืออะไร
อ่านค่า Shade Brightness
ทำงานยังไง
คืนค่า: 1.0F.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
@Override
protected float getShadeBrightness(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos) {
return super.getShadeBrightness(blockState, blockGetter, blockPos);
}
net.minecraft.world.level.block.BarrierBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BarrierBlock.java:76 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: defaultBlockState(), setValue(), getLevel(), getFluidState(), getClickedPos(), getType(). คืนค่า: this.defaultBlockState() .setValue(WATERLOGGED, blockPlaceContext.getLevel().getFluidState(blockPlaceContext.getClickedPos()).getType() == Fluids.WATER).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
BarrierBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.BarrierBlock#pickupBlock(Player,LevelAccessor,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BarrierBlock.java:88 - Modifiers:
public - Return:
ItemStack
คืออะไร
ดำเนินการ pickupBlock ตาม implementation ของ BarrierBlock
ทำงานยังไง
เรียกต่อ: isCreative(). คืนค่า: player != null && player.isCreative() ? SimpleWaterloggedBlock.super.pickupBlock(player, levelAccessor, blockPos, blockState) : ItemStack.EMPTY.
Parameters
Player playerLevelAccessor levelAccessorBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BarrierBlock instance = ...;
Player player = ...;
LevelAccessor levelAccessor = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
ItemStack result = instance.pickupBlock(player, levelAccessor, blockPos, blockState);
net.minecraft.world.level.block.BarrierBlock#propagatesSkylightDown(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BarrierBlock.java:38 - Modifiers:
protected - Return:
boolean
คืออะไร
ดำเนินการ propagatesSkylightDown ตาม implementation ของ BarrierBlock
ทำงานยังไง
เรียกต่อ: getFluidState(), isEmpty(). คืนค่า: blockState.getFluidState().isEmpty().
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean propagatesSkylightDown(BlockState blockState) {
return super.propagatesSkylightDown(blockState);
}
net.minecraft.world.level.block.BarrierBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BarrierBlock.java:53 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), scheduleTick(), getTickDelay(). คืนค่า: super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource).
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
BaseCoralFanBlock
- Full name:
net.minecraft.world.level.block.BaseCoralFanBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BaseCoralFanBlock.java - Type:
class - Modifiers:
public - Extends:
BaseCoralPlantTypeBlock
net.minecraft.world.level.block.BaseCoralFanBlock#BaseCoralFanBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseCoralFanBlock.java:20 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ BaseCoralFanBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
BaseCoralFanBlock instance = new BaseCoralFanBlock(properties);
net.minecraft.world.level.block.BaseCoralFanBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/BaseCoralFanBlock.java:15 - Modifiers:
public - Return:
MapCodec<? extends BaseCoralFanBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ BaseCoralFanBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BaseCoralFanBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseCoralFanBlock.java:24 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
คืนค่า: AABB.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
BaseCoralPlantBlock
- Full name:
net.minecraft.world.level.block.BaseCoralPlantBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BaseCoralPlantBlock.java - Type:
class - Modifiers:
public - Extends:
BaseCoralPlantTypeBlock
net.minecraft.world.level.block.BaseCoralPlantBlock#BaseCoralPlantBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseCoralPlantBlock.java:21 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ BaseCoralPlantBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
BaseCoralPlantBlock instance = new BaseCoralPlantBlock(properties);
net.minecraft.world.level.block.BaseCoralPlantBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/BaseCoralPlantBlock.java:16 - Modifiers:
public - Return:
MapCodec<BaseCoralPlantBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ BaseCoralPlantBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BaseCoralPlantBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseCoralPlantBlock.java:25 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
คืนค่า: SHAPE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
BaseCoralPlantTypeBlock
- Full name:
net.minecraft.world.level.block.BaseCoralPlantTypeBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java - Type:
class - Modifiers:
public abstract - Extends:
Block - Implements:
SimpleWaterloggedBlock
net.minecraft.world.level.block.BaseCoralPlantTypeBlock#BaseCoralPlantTypeBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java:27 - Modifiers:
protected - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ BaseCoralPlantTypeBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
BaseCoralPlantTypeBlock instance = new BaseCoralPlantTypeBlock(properties);
net.minecraft.world.level.block.BaseCoralPlantTypeBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java:89 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: below(), getBlockState(), isFaceSturdy(). คืนค่า: levelReader.getBlockState(blockPos2).isFaceSturdy(levelReader, blockPos2, Direction.UP).
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.BaseCoralPlantTypeBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java:32 - Modifiers:
protected abstract - Return:
MapCodec<? extends BaseCoralPlantTypeBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ BaseCoralPlantTypeBlock
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BaseCoralPlantTypeBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java:95 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.BaseCoralPlantTypeBlock#getFluidState(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java:100 - Modifiers:
protected - Return:
FluidState
คืออะไร
อ่านค่า Fluid State
ทำงานยังไง
เรียกต่อ: getValue(), getSource(). คืนค่า: blockState.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(blockState).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected FluidState getFluidState(BlockState blockState) {
return super.getFluidState(blockState);
}
net.minecraft.world.level.block.BaseCoralPlantTypeBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java:64 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
คืนค่า: AABB.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.BaseCoralPlantTypeBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java:57 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: getLevel(), getFluidState(), getClickedPos(), defaultBlockState(), setValue(), is(), getAmount(). คืนค่า: this.defaultBlockState().setValue(WATERLOGGED, fluidState.is(FluidTags.WATER) && fluidState.getAmount() == 8).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
BaseCoralPlantTypeBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.BaseCoralPlantTypeBlock#scanForWater(BlockState,BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java:43 - Modifiers:
protected static - Return:
boolean
คืออะไร
ดำเนินการ scanForWater ตาม implementation ของ BaseCoralPlantTypeBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getValue(), values(), getFluidState(), relative(), is(). มีจุด return อย่างน้อย 3 จุด.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
@Override
protected boolean scanForWater(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos) {
return super.scanForWater(blockState, blockGetter, blockPos);
}
net.minecraft.world.level.block.BaseCoralPlantTypeBlock#tryScheduleDieTick(BlockState,BlockGetter,ScheduledTickAccess,RandomSource,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java:35 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ tryScheduleDieTick ตาม implementation ของ BaseCoralPlantTypeBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: scanForWater(), scheduleTick(), nextInt().
Parameters
BlockState blockStateBlockGetter blockGetterScheduledTickAccess scheduledTickAccessRandomSource randomSourceBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
ScheduledTickAccess scheduledTickAccess = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
@Override
protected void tryScheduleDieTick(BlockState blockState, BlockGetter blockGetter, ScheduledTickAccess scheduledTickAccess, RandomSource randomSource, BlockPos blockPos) {
super.tryScheduleDieTick(blockState, blockGetter, scheduledTickAccess, randomSource, blockPos);
}
net.minecraft.world.level.block.BaseCoralPlantTypeBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java:69 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), scheduleTick(), getTickDelay(), canSurvive(), defaultBlockState().
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
BaseCoralWallFanBlock
- Full name:
net.minecraft.world.level.block.BaseCoralWallFanBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BaseCoralWallFanBlock.java - Type:
class - Modifiers:
public - Extends:
BaseCoralFanBlock
net.minecraft.world.level.block.BaseCoralWallFanBlock#BaseCoralWallFanBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseCoralWallFanBlock.java:44 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ BaseCoralWallFanBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
BaseCoralWallFanBlock instance = new BaseCoralWallFanBlock(properties);
net.minecraft.world.level.block.BaseCoralWallFanBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseCoralWallFanBlock.java:87 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: getValue(), relative(), getOpposite(), getBlockState(), isFaceSturdy(). คืนค่า: blockState2.isFaceSturdy(levelReader, blockPos2, direction).
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.BaseCoralWallFanBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/BaseCoralWallFanBlock.java:39 - Modifiers:
public - Return:
MapCodec<? extends BaseCoralWallFanBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ BaseCoralWallFanBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
BaseCoralWallFanBlock instance = ...;
MapCodec<? extends BaseCoralWallFanBlock> result = instance.codec();
net.minecraft.world.level.block.BaseCoralWallFanBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseCoralWallFanBlock.java:64 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.BaseCoralWallFanBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseCoralWallFanBlock.java:49 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
เรียกต่อ: get(), getValue(). คืนค่า: SHAPES.get(blockState.getValue(FACING)).
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.BaseCoralWallFanBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseCoralWallFanBlock.java:95 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getLevel(), getClickedPos(), getNearestLookingDirections(), getAxis(), isHorizontal(), setValue(), getOpposite(), canSurvive(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
BaseCoralWallFanBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.BaseCoralWallFanBlock#mirror(BlockState,Mirror)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseCoralWallFanBlock.java:59 - Modifiers:
protected - Return:
BlockState
คืออะไร
ดำเนินการ mirror ตาม implementation ของ BaseCoralWallFanBlock
ทำงานยังไง
เรียกต่อ: rotate(), getRotation(), getValue(). คืนค่า: blockState.rotate(mirror.getRotation(blockState.getValue(FACING))).
Parameters
BlockState blockStateMirror mirror
ตัวอย่างใช้งาน
BlockState blockState = ...;
Mirror mirror = ...;
@Override
protected BlockState mirror(BlockState blockState, Mirror mirror) {
return super.mirror(blockState, mirror);
}
net.minecraft.world.level.block.BaseCoralWallFanBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseCoralWallFanBlock.java:54 - Modifiers:
protected - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
เรียกต่อ: setValue(), getValue(). คืนค่า: blockState.setValue(FACING, rotation.rotate(blockState.getValue(FACING))).
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
BlockState blockState = ...;
Rotation rotation = ...;
@Override
protected BlockState rotate(BlockState blockState, Rotation rotation) {
return super.rotate(blockState, rotation);
}
net.minecraft.world.level.block.BaseCoralWallFanBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseCoralWallFanBlock.java:69 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), scheduleTick(), getTickDelay(), getOpposite(), canSurvive(), defaultBlockState(). คืนค่า: direction.getOpposite() == blockState.getValue(FACING) && !blockState.canSurvive(levelReader, blockPos) ? Blocks.AIR.defaultBlockState() : blockState.
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
BaseEntityBlock
- Full name:
net.minecraft.world.level.block.BaseEntityBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BaseEntityBlock.java - Type:
class - Modifiers:
public abstract - Extends:
Block - Implements:
EntityBlock
net.minecraft.world.level.block.BaseEntityBlock#BaseEntityBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseEntityBlock.java:15 - Modifiers:
protected - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ BaseEntityBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
BaseEntityBlock instance = new BaseEntityBlock(properties);
net.minecraft.world.level.block.BaseEntityBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/BaseEntityBlock.java:19 - Modifiers:
protected abstract - Return:
MapCodec<? extends BaseEntityBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ BaseEntityBlock
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BaseEntityBlock#createTickerHelper(BlockEntityType<A>,BlockEntityType<E>,BlockEntityTicker<? super E>)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseEntityBlock.java:36 - Modifiers:
protected static - Return:
BlockEntityTicker<A>
คืออะไร
สร้าง Ticker Helper
ทำงานยังไง
คืนค่า: blockEntityType2 == blockEntityType ? blockEntityTicker : null.
Parameters
BlockEntityType<A> blockEntityTypeBlockEntityType<E> blockEntityType2BlockEntityTicker<? super E> blockEntityTicker
ตัวอย่างใช้งาน
BlockEntityType<A> blockEntityType = ...;
BlockEntityType<E> blockEntityType2 = ...;
BlockEntityTicker<? super E> blockEntityTicker = ...;
@Override
protected BlockEntityTicker<A> createTickerHelper(BlockEntityType<A> blockEntityType, BlockEntityType<E> blockEntityType2, BlockEntityTicker<? super E> blockEntityTicker) {
return super.createTickerHelper(blockEntityType, blockEntityType2, blockEntityTicker);
}
net.minecraft.world.level.block.BaseEntityBlock#getMenuProvider(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseEntityBlock.java:29 - Modifiers:
protected - Return:
MenuProvider
คืออะไร
อ่านค่า Menu Provider
ทำงานยังไง
เรียกต่อ: getBlockEntity(). คืนค่า: blockEntity instanceof MenuProvider ? (MenuProvider)blockEntity : null.
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected MenuProvider getMenuProvider(BlockState blockState, Level level, BlockPos blockPos) {
return super.getMenuProvider(blockState, level, blockPos);
}
net.minecraft.world.level.block.BaseEntityBlock#triggerEvent(BlockState,Level,BlockPos,int,int)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseEntityBlock.java:22 - Modifiers:
protected - Return:
boolean
คืออะไร
ดำเนินการ triggerEvent ตาม implementation ของ BaseEntityBlock
ทำงานยังไง
เรียกต่อ: getBlockEntity(). คืนค่า: blockEntity == null ? false : blockEntity.triggerEvent(i, j).
Parameters
BlockState blockStateLevel levelBlockPos blockPosint iint j
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected boolean triggerEvent(BlockState blockState, Level level, BlockPos blockPos, int i, int j) {
return super.triggerEvent(blockState, level, blockPos, i, j);
}
BaseFireBlock
- Full name:
net.minecraft.world.level.block.BaseFireBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BaseFireBlock.java - Type:
class - Modifiers:
public abstract - Extends:
Block
net.minecraft.world.level.block.BaseFireBlock#animateTick(BlockState,Level,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseFireBlock.java:57 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ animateTick ตาม implementation ของ BaseFireBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: nextInt(), playLocalSound(), getX(), getY(), getZ(), nextFloat(), below(), getBlockState().
Parameters
BlockState blockStateLevel levelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BaseFireBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
instance.animateTick(blockState, level, blockPos, randomSource);
net.minecraft.world.level.block.BaseFireBlock#BaseFireBlock(BlockBehaviour.Properties,float)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseFireBlock.java:31 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ BaseFireBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: fireDamage.
Parameters
BlockBehaviour.Properties propertiesfloat f
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
BaseFireBlock instance = new BaseFireBlock(properties, 0.0F);
net.minecraft.world.level.block.BaseFireBlock#canBePlacedAt(Level,BlockPos,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseFireBlock.java:184 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Be Placed At
ทำงานยังไง
เรียกต่อ: getBlockState(), isAir(), getState(), canSurvive(), isPortal(). คืนค่า: !blockState.isAir() ? false : getState(level, blockPos).canSurvive(level, blockPos) || isPortal(level, blockPos, direction).
Parameters
Level levelBlockPos blockPosDirection direction
ตัวอย่างใช้งาน
Level level = ...;
BlockPos blockPos = ...;
Direction direction = ...;
boolean result = BaseFireBlock.canBePlacedAt(level, blockPos, direction);
net.minecraft.world.level.block.BaseFireBlock#canBurn(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseFireBlock.java:129 - Modifiers:
protected abstract - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Burn
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean canBurn(BlockState blockState) {
return super.canBurn(blockState);
}
net.minecraft.world.level.block.BaseFireBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/BaseFireBlock.java:36 - Modifiers:
protected abstract - Return:
MapCodec<? extends BaseFireBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ BaseFireBlock
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BaseFireBlock#entityInside(BlockState,Level,BlockPos,Entity)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseFireBlock.java:131 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ entityInside ตาม implementation ของ BaseFireBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: fireImmune(), getRemainingFireTicks(), setRemainingFireTicks(), getRandom(), nextInt(), igniteForSeconds(), hurt(), damageSources().
Parameters
BlockState blockStateLevel levelBlockPos blockPosEntity entity
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Entity entity = ...;
@Override
protected void entityInside(BlockState blockState, Level level, BlockPos blockPos, Entity entity) {
super.entityInside(blockState, level, blockPos, entity);
}
net.minecraft.world.level.block.BaseFireBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseFireBlock.java:52 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
คืนค่า: DOWN_AABB.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.BaseFireBlock#getState(BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseFireBlock.java:44 - Modifiers:
public static - Return:
BlockState
คืออะไร
อ่านค่า State
ทำงานยังไง
เรียกต่อ: below(), getBlockState(), canSurviveOnBlock(), defaultBlockState(), getStateForPlacement(). คืนค่า: SoulFireBlock.canSurviveOnBlock(blockState) ? Blocks.SOUL_FIRE.defaultBlockState() : ((FireBlock)Blocks.FIRE).getStateForPlacement(blockGetter, blockPos).
Parameters
BlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
BlockState result = BaseFireBlock.getState(blockGetter, blockPos);
net.minecraft.world.level.block.BaseFireBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseFireBlock.java:39 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: getState(), getLevel(), getClickedPos(). คืนค่า: getState(blockPlaceContext.getLevel(), blockPlaceContext.getClickedPos()).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
BaseFireBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.BaseFireBlock#onPlace(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseFireBlock.java:150 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Place
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), getBlock(), inPortalDimension(), findEmptyPortalShape(), isPresent(), get(), createPortalBlocks(), canSurvive().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onPlace(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onPlace(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.BaseFireBlock#playerWillDestroy(Level,BlockPos,BlockState,Player)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseFireBlock.java:175 - Modifiers:
public - Return:
BlockState
คืออะไร
ดำเนินการ playerWillDestroy ตาม implementation ของ BaseFireBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isClientSide(), levelEvent(). คืนค่า: super.playerWillDestroy(level, blockPos, blockState, player).
Parameters
Level levelBlockPos blockPosBlockState blockStatePlayer player
ตัวอย่างใช้งาน
BaseFireBlock instance = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
Player player = ...;
BlockState result = instance.playerWillDestroy(level, blockPos, blockState, player);
net.minecraft.world.level.block.BaseFireBlock#spawnDestroyParticles(Level,Player,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseFireBlock.java:171 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง entity ในโลก Destroy Particles
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
Level levelPlayer playerBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
Level level = ...;
Player player = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected void spawnDestroyParticles(Level level, Player player, BlockPos blockPos, BlockState blockState) {
super.spawnDestroyParticles(level, player, blockPos, blockState);
}
BasePressurePlateBlock
- Full name:
net.minecraft.world.level.block.BasePressurePlateBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BasePressurePlateBlock.java - Type:
class - Modifiers:
public abstract - Extends:
Block
net.minecraft.world.level.block.BasePressurePlateBlock#BasePressurePlateBlock(BlockBehaviour.Properties,BlockSetType)
- Origin:
common - Source:
net/minecraft/world/level/block/BasePressurePlateBlock.java:30 - Modifiers:
protected - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ BasePressurePlateBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: type. เรียกต่อ: sound(), soundType().
Parameters
BlockBehaviour.Properties propertiesBlockSetType blockSetType
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
BlockSetType blockSetType = ...;
BasePressurePlateBlock instance = new BasePressurePlateBlock(properties, blockSetType);
net.minecraft.world.level.block.BasePressurePlateBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BasePressurePlateBlock.java:68 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: below(), canSupportRigidBlock(), canSupportCenter(). คืนค่า: canSupportRigidBlock(levelReader, blockPos2) || canSupportCenter(levelReader, blockPos2, Direction.UP).
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.BasePressurePlateBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/BasePressurePlateBlock.java:35 - Modifiers:
protected abstract - Return:
MapCodec<? extends BasePressurePlateBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ BasePressurePlateBlock
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BasePressurePlateBlock#entityInside(BlockState,Level,BlockPos,Entity)
- Origin:
common - Source:
net/minecraft/world/level/block/BasePressurePlateBlock.java:82 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ entityInside ตาม implementation ของ BasePressurePlateBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getSignalForState(), checkPressed().
Parameters
BlockState blockStateLevel levelBlockPos blockPosEntity entity
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Entity entity = ...;
@Override
protected void entityInside(BlockState blockState, Level level, BlockPos blockPos, Entity entity) {
super.entityInside(blockState, level, blockPos, entity);
}
net.minecraft.world.level.block.BasePressurePlateBlock#getDirectSignal(BlockState,BlockGetter,BlockPos,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/BasePressurePlateBlock.java:137 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Direct Signal
ทำงานยังไง
เรียกต่อ: getSignalForState(). คืนค่า: direction == Direction.UP ? this.getSignalForState(blockState) : 0.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosDirection direction
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
Direction direction = ...;
@Override
protected int getDirectSignal(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, Direction direction) {
return super.getDirectSignal(blockState, blockGetter, blockPos, direction);
}
net.minecraft.world.level.block.BasePressurePlateBlock#getEntityCount(Level,AABB,Class<? extends Entity>)
- Origin:
common - Source:
net/minecraft/world/level/block/BasePressurePlateBlock.java:147 - Modifiers:
protected static - Return:
int
คืออะไร
อ่านค่า Entity Count
ทำงานยังไง
เรียกต่อ: getEntitiesOfClass(), and(), isIgnoringBlockTriggers(), size(). คืนค่า: level.getEntitiesOfClass(class_, aABB, EntitySelector.NO_SPECTATORS.and(entity -> !entity.isIgnoringBlockTriggers())).size().
Parameters
Level levelAABB aABBClass<? extends Entity> class_
ตัวอย่างใช้งาน
Level level = ...;
AABB aABB = ...;
Class<? extends Entity> class_ = ...;
@Override
protected int getEntityCount(Level level, AABB aABB, Class<? extends Entity> class_) {
return super.getEntityCount(level, aABB, class_);
}
net.minecraft.world.level.block.BasePressurePlateBlock#getPressedTime()
- Origin:
common - Source:
net/minecraft/world/level/block/BasePressurePlateBlock.java:43 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Pressed Time
ทำงานยังไง
คืนค่า: 20.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BasePressurePlateBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BasePressurePlateBlock.java:38 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
เรียกต่อ: getSignalForState(). คืนค่า: this.getSignalForState(blockState) > 0 ? PRESSED_AABB : AABB.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.BasePressurePlateBlock#getSignal(BlockState,BlockGetter,BlockPos,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/BasePressurePlateBlock.java:132 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Signal
ทำงานยังไง
เรียกต่อ: getSignalForState(). คืนค่า: this.getSignalForState(blockState).
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosDirection direction
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
Direction direction = ...;
@Override
protected int getSignal(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, Direction direction) {
return super.getSignal(blockState, blockGetter, blockPos, direction);
}
net.minecraft.world.level.block.BasePressurePlateBlock#getSignalForState(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BasePressurePlateBlock.java:153 - Modifiers:
protected abstract - Return:
int
คืออะไร
อ่านค่า Signal For State
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected int getSignalForState(BlockState blockState) {
return super.getSignalForState(blockState);
}
net.minecraft.world.level.block.BasePressurePlateBlock#getSignalStrength(Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BasePressurePlateBlock.java:151 - Modifiers:
protected abstract - Return:
int
คืออะไร
อ่านค่า Signal Strength
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
Level levelBlockPos blockPos
ตัวอย่างใช้งาน
Level level = ...;
BlockPos blockPos = ...;
@Override
protected int getSignalStrength(Level level, BlockPos blockPos) {
return super.getSignalStrength(level, blockPos);
}
net.minecraft.world.level.block.BasePressurePlateBlock#isPossibleToRespawnInThis(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BasePressurePlateBlock.java:47 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Possible To Respawn In This
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BasePressurePlateBlock instance = ...;
BlockState blockState = ...;
boolean result = instance.isPossibleToRespawnInThis(blockState);
net.minecraft.world.level.block.BasePressurePlateBlock#isSignalSource(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BasePressurePlateBlock.java:142 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Signal Source
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean isSignalSource(BlockState blockState) {
return super.isSignalSource(blockState);
}
net.minecraft.world.level.block.BasePressurePlateBlock#onRemove(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/BasePressurePlateBlock.java:116 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Remove
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), getBlock(), getSignalForState(), updateNeighbours().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onRemove(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onRemove(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.BasePressurePlateBlock#setSignalForState(BlockState,int)
- Origin:
common - Source:
net/minecraft/world/level/block/BasePressurePlateBlock.java:155 - Modifiers:
protected abstract - Return:
BlockState
คืออะไร
กำหนดค่า Signal For State
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
BlockState blockStateint i
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected BlockState setSignalForState(BlockState blockState, int i) {
return super.setSignalForState(blockState, i);
}
net.minecraft.world.level.block.BasePressurePlateBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BasePressurePlateBlock.java:74 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getSignalForState(), checkPressed().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.BasePressurePlateBlock#updateNeighbours(Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BasePressurePlateBlock.java:127 - Modifiers:
protected - Return:
void
คืออะไร
อัปเดต Neighbours
ทำงานยังไง
เรียกต่อ: updateNeighborsAt(), below().
Parameters
Level levelBlockPos blockPos
ตัวอย่างใช้งาน
Level level = ...;
BlockPos blockPos = ...;
@Override
protected void updateNeighbours(Level level, BlockPos blockPos) {
super.updateNeighbours(level, blockPos);
}
net.minecraft.world.level.block.BasePressurePlateBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BasePressurePlateBlock.java:52 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
เรียกต่อ: canSurvive(), defaultBlockState().
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
BaseRailBlock
- Full name:
net.minecraft.world.level.block.BaseRailBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BaseRailBlock.java - Type:
class - Modifiers:
public abstract - Extends:
Block - Implements:
SimpleWaterloggedBlock
net.minecraft.world.level.block.BaseRailBlock#BaseRailBlock(boolean,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseRailBlock.java:40 - Modifiers:
protected - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ BaseRailBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: isStraight.
Parameters
boolean blBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
BaseRailBlock instance = new BaseRailBlock(true, properties);
net.minecraft.world.level.block.BaseRailBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseRailBlock.java:58 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: canSupportRigidBlock(), below(). คืนค่า: canSupportRigidBlock(levelReader, blockPos.below()).
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.BaseRailBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/BaseRailBlock.java:45 - Modifiers:
protected abstract - Return:
MapCodec<? extends BaseRailBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ BaseRailBlock
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BaseRailBlock#getFluidState(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseRailBlock.java:168 - Modifiers:
protected - Return:
FluidState
คืออะไร
อ่านค่า Fluid State
ทำงานยังไง
เรียกต่อ: getValue(), getSource(). คืนค่า: blockState.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(blockState).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected FluidState getFluidState(BlockState blockState) {
return super.getFluidState(blockState);
}
net.minecraft.world.level.block.BaseRailBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseRailBlock.java:52 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
เรียกต่อ: is(), getValue(), getShapeProperty(), isSlope(). คืนค่า: railShape != null && railShape.isSlope() ? HALF_BLOCK_AABB : FLAT_AABB.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.BaseRailBlock#getShapeProperty()
- Origin:
common - Source:
net/minecraft/world/level/block/BaseRailBlock.java:148 - Modifiers:
public abstract - Return:
Property<RailShape>
คืออะไร
อ่านค่า Shape Property
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BaseRailBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseRailBlock.java:138 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: getLevel(), getFluidState(), getClickedPos(), getType(), defaultBlockState(), getHorizontalDirection(), setValue(), getShapeProperty(). คืนค่า: blockState.setValue(this.getShapeProperty(), bl2 ? RailShape.EAST_WEST : RailShape.NORTH_SOUTH).setValue(WATERLOGGED, bl).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
BaseRailBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.BaseRailBlock#isRail(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseRailBlock.java:36 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Rail
ทำงานยังไง
เรียกต่อ: is(), getBlock(). คืนค่า: blockState.is(BlockTags.RAILS) && blockState.getBlock() instanceof BaseRailBlock.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BaseRailBlock#isRail(Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseRailBlock.java:32 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Rail
ทำงานยังไง
เรียกต่อ: getBlockState(). คืนค่า: isRail(level.getBlockState(blockPos)).
Parameters
Level levelBlockPos blockPos
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BaseRailBlock#isStraight()
- Origin:
common - Source:
net/minecraft/world/level/block/BaseRailBlock.java:48 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Straight
ทำงานยังไง
คืนค่า: this.isStraight.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BaseRailBlock#neighborChanged(BlockState,Level,BlockPos,Block,Orientation,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseRailBlock.java:79 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ neighborChanged ตาม implementation ของ BaseRailBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockState(), is(), getValue(), getShapeProperty(), shouldBeRemoved(), dropResources(), removeBlock(), updateState().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlock blockOrientation orientationboolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Block block = ...;
Orientation orientation = ...;
@Override
protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, Orientation orientation, boolean bl) {
super.neighborChanged(blockState, level, blockPos, block, orientation, bl);
}
net.minecraft.world.level.block.BaseRailBlock#onPlace(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseRailBlock.java:63 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Place
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), getBlock(), updateState().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onPlace(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onPlace(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.BaseRailBlock#onRemove(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseRailBlock.java:123 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Remove
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), getShapeProperty(), isSlope(), updateNeighborsAt(), above(), below().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onRemove(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onRemove(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.BaseRailBlock#updateDir(Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseRailBlock.java:114 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Dir
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), getShapeProperty(), place(), hasNeighborSignal(), getState(). สร้างออบเจ็กต์: RailState. มีจุด return อย่างน้อย 2 จุด.
Parameters
Level levelBlockPos blockPosBlockState blockStateboolean bl
ตัวอย่างใช้งาน
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected BlockState updateDir(Level level, BlockPos blockPos, BlockState blockState, boolean bl) {
return super.updateDir(level, blockPos, blockState, bl);
}
net.minecraft.world.level.block.BaseRailBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseRailBlock.java:150 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), scheduleTick(), getTickDelay(). คืนค่า: super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource).
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
net.minecraft.world.level.block.BaseRailBlock#updateState(BlockState,Level,BlockPos,Block)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseRailBlock.java:111 - Modifiers:
protected - Return:
void
คืออะไร
อัปเดต State
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlock block
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Block block = ...;
@Override
protected void updateState(BlockState blockState, Level level, BlockPos blockPos, Block block) {
super.updateState(blockState, level, blockPos, block);
}
net.minecraft.world.level.block.BaseRailBlock#updateState(BlockState,Level,BlockPos,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseRailBlock.java:70 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต State
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: updateDir(), neighborChanged(). คืนค่า: blockState.
Parameters
BlockState blockStateLevel levelBlockPos blockPosboolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected BlockState updateState(BlockState blockState, Level level, BlockPos blockPos, boolean bl) {
return super.updateState(blockState, level, blockPos, bl);
}
BaseTorchBlock
- Full name:
net.minecraft.world.level.block.BaseTorchBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BaseTorchBlock.java - Type:
class - Modifiers:
public abstract - Extends:
Block
net.minecraft.world.level.block.BaseTorchBlock#BaseTorchBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseTorchBlock.java:19 - Modifiers:
protected - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ BaseTorchBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
BaseTorchBlock instance = new BaseTorchBlock(properties);
net.minecraft.world.level.block.BaseTorchBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseTorchBlock.java:47 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: canSupportCenter(), below(). คืนค่า: canSupportCenter(levelReader, blockPos.below(), Direction.UP).
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.BaseTorchBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/BaseTorchBlock.java:23 - Modifiers:
protected abstract - Return:
MapCodec<? extends BaseTorchBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ BaseTorchBlock
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BaseTorchBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseTorchBlock.java:26 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
คืนค่า: AABB.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.BaseTorchBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BaseTorchBlock.java:31 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
เรียกต่อ: canSurvive(), defaultBlockState().
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
BeaconBeamBlock
- Full name:
net.minecraft.world.level.block.BeaconBeamBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BeaconBeamBlock.java - Type:
interface - Modifiers:
public
net.minecraft.world.level.block.BeaconBeamBlock#getColor()
- Origin:
common - Source:
net/minecraft/world/level/block/BeaconBeamBlock.java:6 - Modifiers: ``
- Return:
DyeColor
คืออะไร
อ่านค่า Color
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
BeaconBlock
- Full name:
net.minecraft.world.level.block.BeaconBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BeaconBlock.java - Type:
class - Modifiers:
public - Extends:
BaseEntityBlock - Implements:
BeaconBeamBlock
net.minecraft.world.level.block.BeaconBlock#BeaconBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/BeaconBlock.java:27 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ BeaconBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BeaconBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/BeaconBlock.java:22 - Modifiers:
public - Return:
MapCodec<BeaconBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ BeaconBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BeaconBlock#getColor()
- Origin:
common - Source:
net/minecraft/world/level/block/BeaconBlock.java:31 - Modifiers:
public - Return:
DyeColor
คืออะไร
อ่านค่า Color
ทำงานยังไง
คืนค่า: DyeColor.WHITE.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BeaconBlock#getTicker(Level,BlockState,BlockEntityType<T>)
- Origin:
common - Source:
net/minecraft/world/level/block/BeaconBlock.java:41 - Modifiers:
public - Return:
BlockEntityTicker<T>
คืออะไร
อ่านค่า Ticker
ทำงานยังไง
เรียกต่อ: createTickerHelper(). คืนค่า: createTickerHelper(blockEntityType, BlockEntityType.BEACON, BeaconBlockEntity::tick).
Parameters
Level levelBlockState blockStateBlockEntityType<T> blockEntityType
ตัวอย่างใช้งาน
BeaconBlock instance = ...;
Level level = ...;
BlockState blockState = ...;
BlockEntityType<T> blockEntityType = ...;
BlockEntityTicker<T> result = instance.getTicker(level, blockState, blockEntityType);
net.minecraft.world.level.block.BeaconBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BeaconBlock.java:36 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ BeaconBlock
ทำงานยังไง
สร้างออบเจ็กต์: BeaconBlockEntity. คืนค่า: new BeaconBlockEntity(blockPos, blockState).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BeaconBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
net.minecraft.world.level.block.BeaconBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/BeaconBlock.java:47 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity(), openMenu(), awardStat(). คืนค่า: InteractionResult.SUCCESS.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
BedBlock
- Full name:
net.minecraft.world.level.block.BedBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BedBlock.java - Type:
class - Modifiers:
public - Extends:
HorizontalDirectionalBlock - Implements:
EntityBlock
net.minecraft.world.level.block.BedBlock#BedBlock(DyeColor,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/BedBlock.java:70 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ BedBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: color. เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
DyeColor dyeColorBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
DyeColor dyeColor = ...;
BlockBehaviour.Properties properties = ...;
BedBlock instance = new BedBlock(dyeColor, properties);
net.minecraft.world.level.block.BedBlock#canSetSpawn(Level)
- Origin:
common - Source:
net/minecraft/world/level/block/BedBlock.java:122 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Set Spawn
ทำงานยังไง
เรียกต่อ: dimensionType(), bedWorks(). คืนค่า: level.dimensionType().bedWorks().
Parameters
Level level
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BedBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/BedBlock.java:65 - Modifiers:
public - Return:
MapCodec<BedBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ BedBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BedBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/BedBlock.java:296 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.BedBlock#fallOn(Level,BlockState,BlockPos,Entity,float)
- Origin:
common - Source:
net/minecraft/world/level/block/BedBlock.java:136 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ fallOn ตาม implementation ของ BedBlock
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
Level levelBlockState blockStateBlockPos blockPosEntity entityfloat f
ตัวอย่างใช้งาน
BedBlock instance = ...;
Level level = ...;
BlockState blockState = ...;
BlockPos blockPos = ...;
Entity entity = ...;
instance.fallOn(level, blockState, blockPos, entity, 0.0F);
net.minecraft.world.level.block.BedBlock#findStandUpPosition(EntityType<?>,CollisionGetter,BlockPos,Direction,float)
- Origin:
common - Source:
net/minecraft/world/level/block/BedBlock.java:240 - Modifiers:
public static - Return:
Optional<Vec3>
คืออะไร
ค้นหา Stand Up Position
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getClockWise(), isFacingAngle(), getOpposite(), isBunkBed(), findBunkBedStandUpPosition(), bedStandUpOffsets(), findStandUpPositionAtOffset(), isPresent(). มีจุด return อย่างน้อย 2 จุด.
Parameters
EntityType<?> entityTypeCollisionGetter collisionGetterBlockPos blockPosDirection directionfloat f
ตัวอย่างใช้งาน
EntityType<?> entityType = ...;
CollisionGetter collisionGetter = ...;
BlockPos blockPos = ...;
Direction direction = ...;
Optional<Vec3> result = BedBlock.findStandUpPosition(entityType, collisionGetter, blockPos, direction, 0.0F);
net.minecraft.world.level.block.BedBlock#getBedOrientation(BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BedBlock.java:76 - Modifiers:
public static - Return:
Direction
คืออะไร
อ่านค่า Bed Orientation
ทำงานยังไง
เรียกต่อ: getBlockState(), getBlock(), getValue(). คืนค่า: blockState.getBlock() instanceof BedBlock ? blockState.getValue(FACING) : null.
Parameters
BlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
Direction result = BedBlock.getBedOrientation(blockGetter, blockPos);
net.minecraft.world.level.block.BedBlock#getBlockType(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BedBlock.java:231 - Modifiers:
public static - Return:
DoubleBlockCombiner.BlockType
คืออะไร
อ่านค่า Block Type
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: bedPart == BedPart.HEAD ? DoubleBlockCombiner.BlockType.FIRST : DoubleBlockCombiner.BlockType.SECOND.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
DoubleBlockCombiner.BlockType result = BedBlock.getBlockType(blockState);
net.minecraft.world.level.block.BedBlock#getColor()
- Origin:
common - Source:
net/minecraft/world/level/block/BedBlock.java:317 - Modifiers:
public - Return:
DyeColor
คืออะไร
อ่านค่า Color
ทำงานยังไง
คืนค่า: this.color.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BedBlock#getConnectedDirection(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BedBlock.java:226 - Modifiers:
public static - Return:
Direction
คืออะไร
อ่านค่า Connected Direction
ทำงานยังไง
เรียกต่อ: getValue(), getOpposite(). คืนค่า: blockState.getValue(PART) == BedPart.HEAD ? direction.getOpposite() : direction.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BedBlock#getSeed(BlockState,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BedBlock.java:321 - Modifiers:
protected - Return:
long
คืออะไร
อ่านค่า Seed
ทำงานยังไง
เรียกต่อ: relative(), getValue(), getX(), getY(), getZ(). คืนค่า: Mth.getSeed(blockPos2.getX(), blockPos.getY(), blockPos2.getZ()).
Parameters
BlockState blockStateBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockPos blockPos = ...;
@Override
protected long getSeed(BlockState blockState, BlockPos blockPos) {
return super.getSeed(blockState, blockPos);
}
net.minecraft.world.level.block.BedBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BedBlock.java:211 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
แยกกรณีด้วย switch. เรียกต่อ: getConnectedDirection(), getOpposite(). มีจุด return อย่างน้อย 4 จุด.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.BedBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BedBlock.java:199 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: getHorizontalDirection(), getClickedPos(), relative(), getLevel(), getBlockState(), canBeReplaced(), getWorldBorder(), isWithinBounds().
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
BedBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.BedBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/BedBlock.java:327 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.BedBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BedBlock.java:301 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ BedBlock
ทำงานยังไง
สร้างออบเจ็กต์: BedBlockEntity. คืนค่า: new BedBlockEntity(blockPos, blockState, this.color).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BedBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
net.minecraft.world.level.block.BedBlock#playerWillDestroy(Level,BlockPos,BlockState,Player)
- Origin:
common - Source:
net/minecraft/world/level/block/BedBlock.java:182 - Modifiers:
public - Return:
BlockState
คืออะไร
ดำเนินการ playerWillDestroy ตาม implementation ของ BedBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isCreative(), getValue(), relative(), getNeighbourDirection(), getBlockState(), is(), setBlock(), defaultBlockState(). คืนค่า: super.playerWillDestroy(level, blockPos, blockState, player).
Parameters
Level levelBlockPos blockPosBlockState blockStatePlayer player
ตัวอย่างใช้งาน
BedBlock instance = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
Player player = ...;
BlockState result = instance.playerWillDestroy(level, blockPos, blockState, player);
net.minecraft.world.level.block.BedBlock#setPlacedBy(Level,BlockPos,BlockState,LivingEntity,ItemStack)
- Origin:
common - Source:
net/minecraft/world/level/block/BedBlock.java:306 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Placed By
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: relative(), getValue(), setBlock(), setValue(), blockUpdated(), updateNeighbourShapes().
Parameters
Level levelBlockPos blockPosBlockState blockStateLivingEntity livingEntityItemStack itemStack
ตัวอย่างใช้งาน
BedBlock instance = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
LivingEntity livingEntity = ...;
ItemStack itemStack = ...;
instance.setPlacedBy(level, blockPos, blockState, livingEntity, itemStack);
net.minecraft.world.level.block.BedBlock#updateEntityMovementAfterFallOn(BlockGetter,Entity)
- Origin:
common - Source:
net/minecraft/world/level/block/BedBlock.java:141 - Modifiers:
public - Return:
void
คืออะไร
อัปเดต Entity Movement After Fall On
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isSuppressingBounce(), bounceUp().
Parameters
BlockGetter blockGetterEntity entity
ตัวอย่างใช้งาน
BedBlock instance = ...;
BlockGetter blockGetter = ...;
Entity entity = ...;
instance.updateEntityMovementAfterFallOn(blockGetter, entity);
net.minecraft.world.level.block.BedBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BedBlock.java:158 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getNeighbourDirection(), getValue(), is(), setValue(), defaultBlockState(). คืนค่า: super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource).
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
net.minecraft.world.level.block.BedBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/BedBlock.java:82 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), relative(), getBlockState(), is(), canSetSpawn(), removeBlock(), getOpposite(), getCenter(). มีจุด return อย่างน้อย 5 จุด.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
BeehiveBlock
- Full name:
net.minecraft.world.level.block.BeehiveBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BeehiveBlock.java - Type:
class - Modifiers:
public - Extends:
BaseEntityBlock
net.minecraft.world.level.block.BeehiveBlock#animateTick(BlockState,Level,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BeehiveBlock.java:203 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ animateTick ตาม implementation ของ BeehiveBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getValue(), nextInt(), trySpawnDripParticles().
Parameters
BlockState blockStateLevel levelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BeehiveBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
instance.animateTick(blockState, level, blockPos, randomSource);
net.minecraft.world.level.block.BeehiveBlock#appendHoverText(ItemStack,Item.TooltipContext,List<Component>,TooltipFlag)
- Origin:
common - Source:
net/minecraft/world/level/block/BeehiveBlock.java:347 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ appendHoverText ตาม implementation ของ BeehiveBlock
ทำงานยังไง
เรียกต่อ: getOrDefault(), requireNonNullElse(), get(), of(), size(), add(), translatable(), withStyle().
Parameters
ItemStack itemStackItem.TooltipContext tooltipContextList<Component> listTooltipFlag tooltipFlag
ตัวอย่างใช้งาน
BeehiveBlock instance = ...;
ItemStack itemStack = ...;
Item.TooltipContext tooltipContext = ...;
List<Component> list = ...;
TooltipFlag tooltipFlag = ...;
instance.appendHoverText(itemStack, tooltipContext, list, tooltipFlag);
net.minecraft.world.level.block.BeehiveBlock#BeehiveBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/BeehiveBlock.java:78 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ BeehiveBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BeehiveBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/BeehiveBlock.java:73 - Modifiers:
public - Return:
MapCodec<BeehiveBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ BeehiveBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BeehiveBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/BeehiveBlock.java:253 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.BeehiveBlock#dropHoneycomb(Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BeehiveBlock.java:133 - Modifiers:
public static - Return:
void
คืออะไร
ดำเนินการ dropHoneycomb ตาม implementation ของ BeehiveBlock
ทำงานยังไง
เรียกต่อ: popResource(). สร้างออบเจ็กต์: ItemStack.
Parameters
Level levelBlockPos blockPos
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BeehiveBlock#getAnalogOutputSignal(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BeehiveBlock.java:88 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Analog Output Signal
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: blockState.getValue(HONEY_LEVEL).
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected int getAnalogOutputSignal(BlockState blockState, Level level, BlockPos blockPos) {
return super.getAnalogOutputSignal(blockState, level, blockPos);
}
net.minecraft.world.level.block.BeehiveBlock#getCloneItemStack(LevelReader,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/BeehiveBlock.java:308 - Modifiers:
protected - Return:
ItemStack
คืออะไร
อ่านค่า Clone Item Stack
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: set(), with(), getValue(). คืนค่า: itemStack.
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockStateboolean bl
ตัวอย่างใช้งาน
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected ItemStack getCloneItemStack(LevelReader levelReader, BlockPos blockPos, BlockState blockState, boolean bl) {
return super.getCloneItemStack(levelReader, blockPos, blockState, bl);
}
net.minecraft.world.level.block.BeehiveBlock#getDrops(BlockState,LootParams.Builder)
- Origin:
common - Source:
net/minecraft/world/level/block/BeehiveBlock.java:291 - Modifiers:
protected - Return:
List<ItemStack>
คืออะไร
อ่านค่า Drops
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getOptionalParameter(), emptyAllLivingFromHive(). คืนค่า: super.getDrops(blockState, builder).
Parameters
BlockState blockStateLootParams.Builder builder
ตัวอย่างใช้งาน
BlockState blockState = ...;
LootParams.Builder builder = ...;
@Override
protected List<ItemStack> getDrops(BlockState blockState, LootParams.Builder builder) {
return super.getDrops(blockState, builder);
}
net.minecraft.world.level.block.BeehiveBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BeehiveBlock.java:248 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: defaultBlockState(), setValue(), getHorizontalDirection(), getOpposite(). คืนค่า: this.defaultBlockState().setValue(FACING, blockPlaceContext.getHorizontalDirection().getOpposite()).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
BeehiveBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.BeehiveBlock#getTicker(Level,BlockState,BlockEntityType<T>)
- Origin:
common - Source:
net/minecraft/world/level/block/BeehiveBlock.java:264 - Modifiers:
public - Return:
BlockEntityTicker<T>
คืออะไร
อ่านค่า Ticker
ทำงานยังไง
เรียกต่อ: createTickerHelper(). คืนค่า: level.isClientSide ? null : createTickerHelper(blockEntityType, BlockEntityType.BEEHIVE, BeehiveBlockEntity::serverTick).
Parameters
Level levelBlockState blockStateBlockEntityType<T> blockEntityType
ตัวอย่างใช้งาน
BeehiveBlock instance = ...;
Level level = ...;
BlockState blockState = ...;
BlockEntityType<T> blockEntityType = ...;
BlockEntityTicker<T> result = instance.getTicker(level, blockState, blockEntityType);
net.minecraft.world.level.block.BeehiveBlock#hasAnalogOutputSignal(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BeehiveBlock.java:83 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Analog Output Signal
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean hasAnalogOutputSignal(BlockState blockState) {
return super.hasAnalogOutputSignal(blockState);
}
net.minecraft.world.level.block.BeehiveBlock#mirror(BlockState,Mirror)
- Origin:
common - Source:
net/minecraft/world/level/block/BeehiveBlock.java:342 - Modifiers:
public - Return:
BlockState
คืออะไร
ดำเนินการ mirror ตาม implementation ของ BeehiveBlock
ทำงานยังไง
เรียกต่อ: rotate(), getRotation(), getValue(). คืนค่า: blockState.rotate(mirror.getRotation(blockState.getValue(FACING))).
Parameters
BlockState blockStateMirror mirror
ตัวอย่างใช้งาน
BeehiveBlock instance = ...;
BlockState blockState = ...;
Mirror mirror = ...;
BlockState result = instance.mirror(blockState, mirror);
net.minecraft.world.level.block.BeehiveBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BeehiveBlock.java:258 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ BeehiveBlock
ทำงานยังไง
สร้างออบเจ็กต์: BeehiveBlockEntity. คืนค่า: new BeehiveBlockEntity(blockPos, blockState).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BeehiveBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
net.minecraft.world.level.block.BeehiveBlock#onExplosionHit(BlockState,ServerLevel,BlockPos,Explosion,BiConsumer<ItemStack, BlockPos>)
- Origin:
common - Source:
net/minecraft/world/level/block/BeehiveBlock.java:107 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Explosion Hit
ทำงานยังไง
เรียกต่อ: angerNearbyBees().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosExplosion explosionBiConsumer<ItemStack, BlockPos> biConsumer
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
Explosion explosion = ...;
BiConsumer<ItemStack, BlockPos> biConsumer = ...;
@Override
protected void onExplosionHit(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, Explosion explosion, BiConsumer<ItemStack, BlockPos> biConsumer) {
super.onExplosionHit(blockState, serverLevel, blockPos, explosion, biConsumer);
}
net.minecraft.world.level.block.BeehiveBlock#playerDestroy(Level,Player,BlockPos,BlockState,BlockEntity,ItemStack)
- Origin:
common - Source:
net/minecraft/world/level/block/BeehiveBlock.java:93 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ playerDestroy ตาม implementation ของ BeehiveBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: hasTag(), emptyAllLivingFromHive(), updateNeighbourForOutputSignal(), angerNearbyBees(), trigger(), getOccupantCount().
Parameters
Level levelPlayer playerBlockPos blockPosBlockState blockStateBlockEntity blockEntityItemStack itemStack
ตัวอย่างใช้งาน
BeehiveBlock instance = ...;
Level level = ...;
Player player = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity blockEntity = ...;
ItemStack itemStack = ...;
instance.playerDestroy(level, player, blockPos, blockState, blockEntity, itemStack);
net.minecraft.world.level.block.BeehiveBlock#playerWillDestroy(Level,BlockPos,BlockState,Player)
- Origin:
common - Source:
net/minecraft/world/level/block/BeehiveBlock.java:270 - Modifiers:
public - Return:
BlockState
คืออะไร
ดำเนินการ playerWillDestroy ตาม implementation ของ BeehiveBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isCreative(), getGameRules(), getBoolean(), getBlockEntity(), getValue(), isEmpty(), applyComponents(), collectComponents(). สร้างออบเจ็กต์: ItemStack, ItemEntity. คืนค่า: super.playerWillDestroy(level, blockPos, blockState, player).
Parameters
Level levelBlockPos blockPosBlockState blockStatePlayer player
ตัวอย่างใช้งาน
BeehiveBlock instance = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
Player player = ...;
BlockState result = instance.playerWillDestroy(level, blockPos, blockState, player);
net.minecraft.world.level.block.BeehiveBlock#releaseBeesAndResetHoneyLevel(Level,BlockState,BlockPos,Player,BeehiveBlockEntity.BeeReleaseStatus)
- Origin:
common - Source:
net/minecraft/world/level/block/BeehiveBlock.java:190 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ releaseBeesAndResetHoneyLevel ตาม implementation ของ BeehiveBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: resetHoneyLevel(), getBlockEntity(), emptyAllLivingFromHive().
Parameters
Level levelBlockState blockStateBlockPos blockPosPlayer playerBeehiveBlockEntity.BeeReleaseStatus beeReleaseStatus
ตัวอย่างใช้งาน
BeehiveBlock instance = ...;
Level level = ...;
BlockState blockState = ...;
BlockPos blockPos = ...;
Player player = ...;
BeehiveBlockEntity.BeeReleaseStatus beeReleaseStatus = ...;
instance.releaseBeesAndResetHoneyLevel(level, blockState, blockPos, player, beeReleaseStatus);
net.minecraft.world.level.block.BeehiveBlock#resetHoneyLevel(Level,BlockState,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BeehiveBlock.java:199 - Modifiers:
public - Return:
void
คืออะไร
รีเซ็ต Honey Level
ทำงานยังไง
เรียกต่อ: setBlock(), setValue().
Parameters
Level levelBlockState blockStateBlockPos blockPos
ตัวอย่างใช้งาน
BeehiveBlock instance = ...;
Level level = ...;
BlockState blockState = ...;
BlockPos blockPos = ...;
instance.resetHoneyLevel(level, blockState, blockPos);
net.minecraft.world.level.block.BeehiveBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/BeehiveBlock.java:337 - Modifiers:
public - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
เรียกต่อ: setValue(), getValue(). คืนค่า: blockState.setValue(FACING, rotation.rotate(blockState.getValue(FACING))).
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
BeehiveBlock instance = ...;
BlockState blockState = ...;
Rotation rotation = ...;
BlockState result = instance.rotate(blockState, rotation);
net.minecraft.world.level.block.BeehiveBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BeehiveBlock.java:318 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockState(), getBlock(), getBlockEntity(), emptyAllLivingFromHive(). คืนค่า: super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource).
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
net.minecraft.world.level.block.BeehiveBlock#useItemOn(ItemStack,BlockState,Level,BlockPos,Player,InteractionHand,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/BeehiveBlock.java:137 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Item On
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), getItem(), is(), playSound(), getX(), getY(), getZ(), dropHoneycomb(). สร้างออบเจ็กต์: ItemStack. มีจุด return อย่างน้อย 2 จุด.
Parameters
ItemStack itemStackBlockState blockStateLevel levelBlockPos blockPosPlayer playerInteractionHand interactionHandBlockHitResult blockHitResult
ตัวอย่างใช้งาน
ItemStack itemStack = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
InteractionHand interactionHand = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useItemOn(ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult) {
return super.useItemOn(itemStack, blockState, level, blockPos, player, interactionHand, blockHitResult);
}
BeetrootBlock
- Full name:
net.minecraft.world.level.block.BeetrootBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BeetrootBlock.java - Type:
class - Modifiers:
public - Extends:
CropBlock
net.minecraft.world.level.block.BeetrootBlock#BeetrootBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/BeetrootBlock.java:35 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ BeetrootBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BeetrootBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/BeetrootBlock.java:30 - Modifiers:
public - Return:
MapCodec<BeetrootBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ BeetrootBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BeetrootBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/BeetrootBlock.java:66 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.BeetrootBlock#getAgeProperty()
- Origin:
common - Source:
net/minecraft/world/level/block/BeetrootBlock.java:39 - Modifiers:
protected - Return:
IntegerProperty
คืออะไร
อ่านค่า Age Property
ทำงานยังไง
คืนค่า: AGE.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BeetrootBlock#getBaseSeedId()
- Origin:
common - Source:
net/minecraft/world/level/block/BeetrootBlock.java:49 - Modifiers:
protected - Return:
ItemLike
คืออะไร
อ่านค่า Base Seed Id
ทำงานยังไง
คืนค่า: Items.BEETROOT_SEEDS.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BeetrootBlock#getBonemealAgeIncrease(Level)
- Origin:
common - Source:
net/minecraft/world/level/block/BeetrootBlock.java:61 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Bonemeal Age Increase
ทำงานยังไง
คืนค่า: super.getBonemealAgeIncrease(level) / 3.
Parameters
Level level
ตัวอย่างใช้งาน
Level level = ...;
@Override
protected int getBonemealAgeIncrease(Level level) {
return super.getBonemealAgeIncrease(level);
}
net.minecraft.world.level.block.BeetrootBlock#getMaxAge()
- Origin:
common - Source:
net/minecraft/world/level/block/BeetrootBlock.java:44 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Max Age
ทำงานยังไง
คืนค่า: 3.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BeetrootBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BeetrootBlock.java:71 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
เรียกต่อ: getAge(). คืนค่า: SHAPE_BY_AGE[this.getAge(blockState)].
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.BeetrootBlock#randomTick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BeetrootBlock.java:54 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ randomTick ตาม implementation ของ BeetrootBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: nextInt().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void randomTick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.randomTick(blockState, serverLevel, blockPos, randomSource);
}
BellBlock
- Full name:
net.minecraft.world.level.block.BellBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BellBlock.java - Type:
class - Modifiers:
public - Extends:
BaseEntityBlock
net.minecraft.world.level.block.BellBlock#attemptToRing(Entity,Level,BlockPos,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/BellBlock.java:136 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ attemptToRing ตาม implementation ของ BellBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity(), getBlockState(), getValue(), onHit(), playSound(), gameEvent(). มีจุด return อย่างน้อย 2 จุด.
Parameters
Entity entityLevel levelBlockPos blockPosDirection direction
ตัวอย่างใช้งาน
BellBlock instance = ...;
Entity entity = ...;
Level level = ...;
BlockPos blockPos = ...;
Direction direction = ...;
boolean result = instance.attemptToRing(entity, level, blockPos, direction);
net.minecraft.world.level.block.BellBlock#attemptToRing(Level,BlockPos,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/BellBlock.java:132 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ attemptToRing ตาม implementation ของ BellBlock
ทำงานยังไง
คืนค่า: this.attemptToRing(null, level, blockPos, direction).
Parameters
Level levelBlockPos blockPosDirection direction
ตัวอย่างใช้งาน
BellBlock instance = ...;
Level level = ...;
BlockPos blockPos = ...;
Direction direction = ...;
boolean result = instance.attemptToRing(level, blockPos, direction);
net.minecraft.world.level.block.BellBlock#BellBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/BellBlock.java:67 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ BellBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BellBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BellBlock.java:261 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: getConnectedDirection(), getOpposite(), canSupportCenter(), above(), canAttach().
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.BellBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/BellBlock.java:62 - Modifiers:
public - Return:
MapCodec<BellBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ BellBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BellBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/BellBlock.java:280 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.BellBlock#getCollisionShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BellBlock.java:170 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Collision Shape
ทำงานยังไง
เรียกต่อ: getVoxelShape(). คืนค่า: this.getVoxelShape(blockState).
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getCollisionShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getCollisionShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.BellBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BellBlock.java:175 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
เรียกต่อ: getVoxelShape(). คืนค่า: this.getVoxelShape(blockState).
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.BellBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BellBlock.java:180 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getClickedFace(), getClickedPos(), getLevel(), getAxis(), defaultBlockState(), setValue(), getHorizontalDirection(), canSurvive(). มีจุด return อย่างน้อย 4 จุด.
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
BellBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.BellBlock#getTicker(Level,BlockState,BlockEntityType<T>)
- Origin:
common - Source:
net/minecraft/world/level/block/BellBlock.java:291 - Modifiers:
public - Return:
BlockEntityTicker<T>
คืออะไร
อ่านค่า Ticker
ทำงานยังไง
เรียกต่อ: createTickerHelper(). คืนค่า: createTickerHelper(blockEntityType, BlockEntityType.BELL, level.isClientSide ? BellBlockEntity::clientTick : BellBlockEntity::serverTick).
Parameters
Level levelBlockState blockStateBlockEntityType<T> blockEntityType
ตัวอย่างใช้งาน
BellBlock instance = ...;
Level level = ...;
BlockState blockState = ...;
BlockEntityType<T> blockEntityType = ...;
BlockEntityTicker<T> result = instance.getTicker(level, blockState, blockEntityType);
net.minecraft.world.level.block.BellBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/BellBlock.java:297 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.BellBlock#mirror(BlockState,Mirror)
- Origin:
common - Source:
net/minecraft/world/level/block/BellBlock.java:307 - Modifiers:
public - Return:
BlockState
คืออะไร
ดำเนินการ mirror ตาม implementation ของ BellBlock
ทำงานยังไง
เรียกต่อ: rotate(), getRotation(), getValue(). คืนค่า: blockState.rotate(mirror.getRotation(blockState.getValue(FACING))).
Parameters
BlockState blockStateMirror mirror
ตัวอย่างใช้งาน
BellBlock instance = ...;
BlockState blockState = ...;
Mirror mirror = ...;
BlockState result = instance.mirror(blockState, mirror);
net.minecraft.world.level.block.BellBlock#neighborChanged(BlockState,Level,BlockPos,Block,Orientation,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/BellBlock.java:72 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ neighborChanged ตาม implementation ของ BellBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: hasNeighborSignal(), getValue(), attemptToRing(), setBlock(), setValue().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlock blockOrientation orientationboolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Block block = ...;
Orientation orientation = ...;
@Override
protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, Orientation orientation, boolean bl) {
super.neighborChanged(blockState, level, blockPos, block, orientation, bl);
}
net.minecraft.world.level.block.BellBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BellBlock.java:285 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ BellBlock
ทำงานยังไง
สร้างออบเจ็กต์: BellBlockEntity. คืนค่า: new BellBlockEntity(blockPos, blockState).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BellBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
net.minecraft.world.level.block.BellBlock#onExplosionHit(BlockState,ServerLevel,BlockPos,Explosion,BiConsumer<ItemStack, BlockPos>)
- Origin:
common - Source:
net/minecraft/world/level/block/BellBlock.java:218 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Explosion Hit
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canTriggerBlocks(), attemptToRing().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosExplosion explosionBiConsumer<ItemStack, BlockPos> biConsumer
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
Explosion explosion = ...;
BiConsumer<ItemStack, BlockPos> biConsumer = ...;
@Override
protected void onExplosionHit(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, Explosion explosion, BiConsumer<ItemStack, BlockPos> biConsumer) {
super.onExplosionHit(blockState, serverLevel, blockPos, explosion, biConsumer);
}
net.minecraft.world.level.block.BellBlock#onHit(Level,BlockState,BlockHitResult,Player,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/BellBlock.java:96 - Modifiers:
public - Return:
boolean
คืออะไร
จัดการเหตุการณ์ Hit
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getDirection(), getBlockPos(), isProperHit(), getLocation(), getY(), attemptToRing(), awardStat(). มีจุด return อย่างน้อย 2 จุด.
Parameters
Level levelBlockState blockStateBlockHitResult blockHitResultPlayer playerboolean bl
ตัวอย่างใช้งาน
BellBlock instance = ...;
Level level = ...;
BlockState blockState = ...;
BlockHitResult blockHitResult = ...;
Player player = ...;
boolean result = instance.onHit(level, blockState, blockHitResult, player, true);
net.minecraft.world.level.block.BellBlock#onProjectileHit(Level,BlockState,BlockHitResult,Projectile)
- Origin:
common - Source:
net/minecraft/world/level/block/BellBlock.java:84 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Projectile Hit
ทำงานยังไง
เรียกต่อ: getOwner(), onHit().
Parameters
Level levelBlockState blockStateBlockHitResult blockHitResultProjectile projectile
ตัวอย่างใช้งาน
Level level = ...;
BlockState blockState = ...;
BlockHitResult blockHitResult = ...;
Projectile projectile = ...;
@Override
protected void onProjectileHit(Level level, BlockState blockState, BlockHitResult blockHitResult, Projectile projectile) {
super.onProjectileHit(level, blockState, blockHitResult, projectile);
}
net.minecraft.world.level.block.BellBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/BellBlock.java:302 - Modifiers:
public - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
เรียกต่อ: setValue(), getValue(). คืนค่า: blockState.setValue(FACING, rotation.rotate(blockState.getValue(FACING))).
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
BellBlock instance = ...;
BlockState blockState = ...;
Rotation rotation = ...;
BlockState result = instance.rotate(blockState, rotation);
net.minecraft.world.level.block.BellBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BellBlock.java:229 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), getConnectedDirection(), getOpposite(), canSurvive(), defaultBlockState(), getAxis(), isFaceSturdy(), setValue(). มีจุด return อย่างน้อย 4 จุด.
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
net.minecraft.world.level.block.BellBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/BellBlock.java:91 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
เรียกต่อ: onHit(). คืนค่า: this.onHit(level, blockState, blockHitResult, player, true) ? InteractionResult.SUCCESS : InteractionResult.PASS.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
BigDripleafBlock
- Full name:
net.minecraft.world.level.block.BigDripleafBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BigDripleafBlock.java - Type:
class - Modifiers:
public - Extends:
HorizontalDirectionalBlock - Implements:
BonemealableBlock,SimpleWaterloggedBlock
net.minecraft.world.level.block.BigDripleafBlock#BigDripleafBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafBlock.java:89 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ BigDripleafBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: shapesCache. เรียกต่อ: registerDefaultState(), any(), setValue(), getShapeForEachState().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
BigDripleafBlock instance = new BigDripleafBlock(properties);
net.minecraft.world.level.block.BigDripleafBlock#canPlaceAt(LevelHeightAccessor,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafBlock.java:124 - Modifiers:
protected static - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Place At
ทำงานยังไง
เรียกต่อ: isOutsideBuildHeight(), canReplace(). คืนค่า: !levelHeightAccessor.isOutsideBuildHeight(blockPos) && canReplace(blockState).
Parameters
LevelHeightAccessor levelHeightAccessorBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
LevelHeightAccessor levelHeightAccessor = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected boolean canPlaceAt(LevelHeightAccessor levelHeightAccessor, BlockPos blockPos, BlockState blockState) {
return super.canPlaceAt(levelHeightAccessor, blockPos, blockState);
}
net.minecraft.world.level.block.BigDripleafBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafBlock.java:143 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: below(), getBlockState(), is(). คืนค่า: blockState2.is(this) || blockState2.is(Blocks.BIG_DRIPLEAF_STEM) || blockState2.is(BlockTags.BIG_DRIPLEAF_PLACEABLE).
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.BigDripleafBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafBlock.java:84 - Modifiers:
public - Return:
MapCodec<BigDripleafBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ BigDripleafBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BigDripleafBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafBlock.java:284 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.BigDripleafBlock#entityInside(BlockState,Level,BlockPos,Entity)
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafBlock.java:196 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ entityInside ตาม implementation ของ BigDripleafBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), canEntityTilt(), hasNeighborSignal(), setTiltAndScheduleTick().
Parameters
BlockState blockStateLevel levelBlockPos blockPosEntity entity
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Entity entity = ...;
@Override
protected void entityInside(BlockState blockState, Level level, BlockPos blockPos, Entity entity) {
super.entityInside(blockState, level, blockPos, entity);
}
net.minecraft.world.level.block.BigDripleafBlock#getCollisionShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafBlock.java:264 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Collision Shape
ทำงานยังไง
เรียกต่อ: get(), getValue(). คืนค่า: LEAF_SHAPES.get(blockState.getValue(TILT)).
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getCollisionShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getCollisionShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.BigDripleafBlock#getFluidState(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafBlock.java:138 - Modifiers:
protected - Return:
FluidState
คืออะไร
อ่านค่า Fluid State
ทำงานยังไง
เรียกต่อ: getValue(), getSource(). คืนค่า: blockState.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(blockState).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected FluidState getFluidState(BlockState blockState) {
return super.getFluidState(blockState);
}
net.minecraft.world.level.block.BigDripleafBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafBlock.java:269 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: this.shapesCache.get(blockState).
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.BigDripleafBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafBlock.java:274 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: getLevel(), getBlockState(), getClickedPos(), below(), getFluidState(), is(), defaultBlockState(), setValue().
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
BigDripleafBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.BigDripleafBlock#isBonemealSuccess(Level,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafBlock.java:180 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Bonemeal Success
ทำงานยังไง
คืนค่า: true.
Parameters
Level levelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BigDripleafBlock instance = ...;
Level level = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isBonemealSuccess(level, randomSource, blockPos, blockState);
net.minecraft.world.level.block.BigDripleafBlock#isValidBonemealTarget(LevelReader,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafBlock.java:174 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Valid Bonemeal Target
ทำงานยังไง
เรียกต่อ: getBlockState(), above(), canReplace(). คืนค่า: canReplace(blockState2).
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BigDripleafBlock instance = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isValidBonemealTarget(levelReader, blockPos, blockState);
net.minecraft.world.level.block.BigDripleafBlock#neighborChanged(BlockState,Level,BlockPos,Block,Orientation,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafBlock.java:221 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ neighborChanged ตาม implementation ของ BigDripleafBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: hasNeighborSignal(), resetTilt().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlock blockOrientation orientationboolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Block block = ...;
Orientation orientation = ...;
@Override
protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, Orientation orientation, boolean bl) {
super.neighborChanged(blockState, level, blockPos, block, orientation, bl);
}
net.minecraft.world.level.block.BigDripleafBlock#onProjectileHit(Level,BlockState,BlockHitResult,Projectile)
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafBlock.java:133 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Projectile Hit
ทำงานยังไง
เรียกต่อ: setTiltAndScheduleTick(), getBlockPos().
Parameters
Level levelBlockState blockStateBlockHitResult blockHitResultProjectile projectile
ตัวอย่างใช้งาน
Level level = ...;
BlockState blockState = ...;
BlockHitResult blockHitResult = ...;
Projectile projectile = ...;
@Override
protected void onProjectileHit(Level level, BlockState blockState, BlockHitResult blockHitResult, Projectile projectile) {
super.onProjectileHit(level, blockState, blockHitResult, projectile);
}
net.minecraft.world.level.block.BigDripleafBlock#performBonemeal(ServerLevel,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafBlock.java:185 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ performBonemeal ตาม implementation ของ BigDripleafBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: above(), getBlockState(), canPlaceAt(), getValue(), place(), getFluidState().
Parameters
ServerLevel serverLevelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BigDripleafBlock instance = ...;
ServerLevel serverLevel = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
instance.performBonemeal(serverLevel, randomSource, blockPos, blockState);
net.minecraft.world.level.block.BigDripleafBlock#place(LevelAccessor,BlockPos,FluidState,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafBlock.java:128 - Modifiers:
protected static - Return:
boolean
คืออะไร
ดำเนินการ place ตาม implementation ของ BigDripleafBlock
ทำงานยังไง
เรียกต่อ: defaultBlockState(), setValue(), isSourceOfType(), setBlock(). คืนค่า: levelAccessor.setBlock(blockPos, blockState, 3).
Parameters
LevelAccessor levelAccessorBlockPos blockPosFluidState fluidStateDirection direction
ตัวอย่างใช้งาน
LevelAccessor levelAccessor = ...;
BlockPos blockPos = ...;
FluidState fluidState = ...;
Direction direction = ...;
@Override
protected boolean place(LevelAccessor levelAccessor, BlockPos blockPos, FluidState fluidState, Direction direction) {
return super.place(levelAccessor, blockPos, fluidState, direction);
}
net.minecraft.world.level.block.BigDripleafBlock#placeWithRandomHeight(LevelAccessor,RandomSource,BlockPos,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafBlock.java:99 - Modifiers:
public static - Return:
void
คืออะไร
ดำเนินการ placeWithRandomHeight ตาม implementation ของ BigDripleafBlock
ทำงานยังไง
มีการวนลูป. เรียกต่อ: nextInt(), mutable(), canPlaceAt(), getBlockState(), move(), getY(), setY(), place().
Parameters
LevelAccessor levelAccessorRandomSource randomSourceBlockPos blockPosDirection direction
ตัวอย่างใช้งาน
LevelAccessor levelAccessor = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BigDripleafBlock.placeWithRandomHeight(levelAccessor, randomSource, blockPos, direction);
net.minecraft.world.level.block.BigDripleafBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafBlock.java:205 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: hasNeighborSignal(), resetTilt(), getValue(), setTiltAndScheduleTick().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.BigDripleafBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafBlock.java:150 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canSurvive(), defaultBlockState(), getValue(), scheduleTick(), getTickDelay(), is(), withPropertiesOf(). คืนค่า: Blocks.AIR.defaultBlockState().
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
BigDripleafStemBlock
- Full name:
net.minecraft.world.level.block.BigDripleafStemBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BigDripleafStemBlock.java - Type:
class - Modifiers:
public - Extends:
HorizontalDirectionalBlock - Implements:
BonemealableBlock,SimpleWaterloggedBlock
net.minecraft.world.level.block.BigDripleafStemBlock#BigDripleafStemBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafStemBlock.java:41 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ BigDripleafStemBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
BigDripleafStemBlock instance = new BigDripleafStemBlock(properties);
net.minecraft.world.level.block.BigDripleafStemBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafStemBlock.java:71 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: below(), getBlockState(), above(), is(). คืนค่า: (blockState2.is(this) || blockState2.is(BlockTags.BIG_DRIPLEAF_PLACEABLE)) && (blockState3.is(this) || blockState3.is(Blocks.BIG_DRIPLEAF)).
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.BigDripleafStemBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafStemBlock.java:36 - Modifiers:
public - Return:
MapCodec<BigDripleafStemBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ BigDripleafStemBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BigDripleafStemBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafStemBlock.java:61 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.BigDripleafStemBlock#getCloneItemStack(LevelReader,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafStemBlock.java:145 - Modifiers:
protected - Return:
ItemStack
คืออะไร
อ่านค่า Clone Item Stack
ทำงานยังไง
สร้างออบเจ็กต์: ItemStack. คืนค่า: new ItemStack(Blocks.BIG_DRIPLEAF).
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockStateboolean bl
ตัวอย่างใช้งาน
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected ItemStack getCloneItemStack(LevelReader levelReader, BlockPos blockPos, BlockState blockState, boolean bl) {
return super.getCloneItemStack(levelReader, blockPos, blockState, bl);
}
net.minecraft.world.level.block.BigDripleafStemBlock#getFluidState(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafStemBlock.java:66 - Modifiers:
protected - Return:
FluidState
คืออะไร
อ่านค่า Fluid State
ทำงานยังไง
เรียกต่อ: getValue(), getSource(). คืนค่า: blockState.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(blockState).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected FluidState getFluidState(BlockState blockState) {
return super.getFluidState(blockState);
}
net.minecraft.world.level.block.BigDripleafStemBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafStemBlock.java:46 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
แยกกรณีด้วย switch. เรียกต่อ: getValue(). มีจุด return อย่างน้อย 4 จุด.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.BigDripleafStemBlock#isBonemealSuccess(Level,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafStemBlock.java:128 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Bonemeal Success
ทำงานยังไง
คืนค่า: true.
Parameters
Level levelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BigDripleafStemBlock instance = ...;
Level level = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isBonemealSuccess(level, randomSource, blockPos, blockState);
net.minecraft.world.level.block.BigDripleafStemBlock#isValidBonemealTarget(LevelReader,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafStemBlock.java:116 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Valid Bonemeal Target
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getTopConnectedBlock(), getBlock(), isEmpty(), get(), above(), getBlockState(), canPlaceAt(). มีจุด return อย่างน้อย 2 จุด.
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BigDripleafStemBlock instance = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isValidBonemealTarget(levelReader, blockPos, blockState);
net.minecraft.world.level.block.BigDripleafStemBlock#performBonemeal(ServerLevel,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafStemBlock.java:133 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ performBonemeal ตาม implementation ของ BigDripleafStemBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getTopConnectedBlock(), getBlock(), isEmpty(), get(), above(), getValue(), place(), getFluidState().
Parameters
ServerLevel serverLevelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BigDripleafStemBlock instance = ...;
ServerLevel serverLevel = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
instance.performBonemeal(serverLevel, randomSource, blockPos, blockState);
net.minecraft.world.level.block.BigDripleafStemBlock#place(LevelAccessor,BlockPos,FluidState,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafStemBlock.java:79 - Modifiers:
protected static - Return:
boolean
คืออะไร
ดำเนินการ place ตาม implementation ของ BigDripleafStemBlock
ทำงานยังไง
เรียกต่อ: defaultBlockState(), setValue(), isSourceOfType(), setBlock(). คืนค่า: levelAccessor.setBlock(blockPos, blockState, 3).
Parameters
LevelAccessor levelAccessorBlockPos blockPosFluidState fluidStateDirection direction
ตัวอย่างใช้งาน
LevelAccessor levelAccessor = ...;
BlockPos blockPos = ...;
FluidState fluidState = ...;
Direction direction = ...;
@Override
protected boolean place(LevelAccessor levelAccessor, BlockPos blockPos, FluidState fluidState, Direction direction) {
return super.place(levelAccessor, blockPos, fluidState, direction);
}
net.minecraft.world.level.block.BigDripleafStemBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafStemBlock.java:109 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canSurvive(), destroyBlock().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.BigDripleafStemBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BigDripleafStemBlock.java:87 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canSurvive(), scheduleTick(), getValue(), getTickDelay(). คืนค่า: super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource).
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
BlastFurnaceBlock
- Full name:
net.minecraft.world.level.block.BlastFurnaceBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BlastFurnaceBlock.java - Type:
class - Modifiers:
public - Extends:
AbstractFurnaceBlock
net.minecraft.world.level.block.BlastFurnaceBlock#animateTick(BlockState,Level,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BlastFurnaceBlock.java:54 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ animateTick ตาม implementation ของ BlastFurnaceBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), getX(), getY(), getZ(), nextDouble(), playLocalSound(), getAxis(), getStepX().
Parameters
BlockState blockStateLevel levelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlastFurnaceBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
instance.animateTick(blockState, level, blockPos, randomSource);
net.minecraft.world.level.block.BlastFurnaceBlock#BlastFurnaceBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/BlastFurnaceBlock.java:30 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ BlastFurnaceBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
BlastFurnaceBlock instance = new BlastFurnaceBlock(properties);
net.minecraft.world.level.block.BlastFurnaceBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/BlastFurnaceBlock.java:25 - Modifiers:
public - Return:
MapCodec<BlastFurnaceBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ BlastFurnaceBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BlastFurnaceBlock#getTicker(Level,BlockState,BlockEntityType<T>)
- Origin:
common - Source:
net/minecraft/world/level/block/BlastFurnaceBlock.java:39 - Modifiers:
public - Return:
BlockEntityTicker<T>
คืออะไร
อ่านค่า Ticker
ทำงานยังไง
เรียกต่อ: createFurnaceTicker(). คืนค่า: createFurnaceTicker(level, blockEntityType, BlockEntityType.BLAST_FURNACE).
Parameters
Level levelBlockState blockStateBlockEntityType<T> blockEntityType
ตัวอย่างใช้งาน
BlastFurnaceBlock instance = ...;
Level level = ...;
BlockState blockState = ...;
BlockEntityType<T> blockEntityType = ...;
BlockEntityTicker<T> result = instance.getTicker(level, blockState, blockEntityType);
net.minecraft.world.level.block.BlastFurnaceBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BlastFurnaceBlock.java:34 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ BlastFurnaceBlock
ทำงานยังไง
สร้างออบเจ็กต์: BlastFurnaceBlockEntity. คืนค่า: new BlastFurnaceBlockEntity(blockPos, blockState).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BlastFurnaceBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
net.minecraft.world.level.block.BlastFurnaceBlock#openContainer(Level,BlockPos,Player)
- Origin:
common - Source:
net/minecraft/world/level/block/BlastFurnaceBlock.java:45 - Modifiers:
protected - Return:
void
คืออะไร
เปิด Container
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity(), openMenu(), awardStat().
Parameters
Level levelBlockPos blockPosPlayer player
ตัวอย่างใช้งาน
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
@Override
protected void openContainer(Level level, BlockPos blockPos, Player player) {
super.openContainer(level, blockPos, player);
}
Block
- Full name:
net.minecraft.world.level.block.Block - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/Block.java - Type:
class - Modifiers:
public - Extends:
BlockBehaviour - Implements:
ItemLike,FabricBlock
net.minecraft.world.level.block.Block#animateTick(BlockState,Level,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:262 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ animateTick ตาม implementation ของ Block
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockState blockStateLevel levelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
Block instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
instance.animateTick(blockState, level, blockPos, randomSource);
net.minecraft.world.level.block.Block#appendHoverText(ItemStack,Item.TooltipContext,List<Component>,TooltipFlag)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:469 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ appendHoverText ตาม implementation ของ Block
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
ItemStack itemStackItem.TooltipContext tooltipContextList<Component> listTooltipFlag tooltipFlag
ตัวอย่างใช้งาน
Block instance = ...;
ItemStack itemStack = ...;
Item.TooltipContext tooltipContext = ...;
List<Component> list = ...;
TooltipFlag tooltipFlag = ...;
instance.appendHoverText(itemStack, tooltipContext, list, tooltipFlag);
net.minecraft.world.level.block.Block#asBlock()
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:472 - Modifiers:
protected - Return:
Block
คืออะไร
ดำเนินการ asBlock ตาม implementation ของ Block
ทำงานยังไง
คืนค่า: this.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.Block#asItem()
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:451 - Modifiers:
public - Return:
Item
คืออะไร
ดำเนินการ asItem ตาม implementation ของ Block
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: item. เรียกต่อ: byBlock(). คืนค่า: this.item.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.Block#Block(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:183 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ Block ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: stateDefinition. เรียกต่อ: createBlockStateDefinition(), create(), registerDefaultState(), any(), getClass(), getSimpleName(), endsWith(), error(). สร้างออบเจ็กต์: StateDefinition.Builder<>.
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.Block#box(double,double,double,double,double,double)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:149 - Modifiers:
public static - Return:
VoxelShape
คืออะไร
ดำเนินการ box ตาม implementation ของ Block
ทำงานยังไง
คืนค่า: Shapes.box(d / 16.0, e / 16.0, f / 16.0, g / 16.0, h / 16.0, i / 16.0).
Parameters
double ddouble edouble fdouble gdouble hdouble i
ตัวอย่างใช้งาน
net.minecraft.world.level.block.Block#builtInRegistryHolder()
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:481 - Modifiers:
public - Return:
Holder.Reference<Block>
คืออะไร
ดำเนินการ builtInRegistryHolder ตาม implementation ของ Block
ทำงานยังไง
คืนค่า: this.builtInRegistryHolder.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.Block#byItem(Item)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:128 - Modifiers:
public static - Return:
Block
คืออะไร
ดำเนินการ byItem ตาม implementation ของ Block
ทำงานยังไง
เรียกต่อ: getBlock(). คืนค่า: item instanceof BlockItem ? ((BlockItem)item).getBlock() : Blocks.AIR.
Parameters
Item item
ตัวอย่างใช้งาน
net.minecraft.world.level.block.Block#canSupportCenter(LevelReader,BlockPos,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:246 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Support Center
ทำงานยังไง
เรียกต่อ: getBlockState(), is(), isFaceSturdy().
Parameters
LevelReader levelReaderBlockPos blockPosDirection direction
ตัวอย่างใช้งาน
LevelReader levelReader = ...;
BlockPos blockPos = ...;
Direction direction = ...;
boolean result = Block.canSupportCenter(levelReader, blockPos, direction);
net.minecraft.world.level.block.Block#canSupportRigidBlock(BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:242 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Support Rigid Block
ทำงานยังไง
เรียกต่อ: getBlockState(), isFaceSturdy(). คืนค่า: blockGetter.getBlockState(blockPos).isFaceSturdy(blockGetter, blockPos, Direction.UP, SupportType.RIGID).
Parameters
BlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
boolean result = Block.canSupportRigidBlock(blockGetter, blockPos);
net.minecraft.world.level.block.Block#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:109 - Modifiers:
protected - Return:
MapCodec<? extends Block>
คืออะไร
ดำเนินการ codec ตาม implementation ของ Block
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.Block#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:420 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.Block#defaultBlockState()
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:431 - Modifiers:
public final - Return:
BlockState
คืออะไร
ดำเนินการ defaultBlockState ตาม implementation ของ Block
ทำงานยังไง
คืนค่า: this.defaultBlockState.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.Block#destroy(LevelAccessor,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:265 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ destroy ตาม implementation ของ Block
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
LevelAccessor levelAccessorBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
Block instance = ...;
LevelAccessor levelAccessor = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
instance.destroy(levelAccessor, blockPos, blockState);
net.minecraft.world.level.block.Block#dropFromExplosion(Explosion)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:416 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ dropFromExplosion ตาม implementation ของ Block
ทำงานยังไง
คืนค่า: true.
Parameters
Explosion explosion
ตัวอย่างใช้งาน
Block instance = ...;
Explosion explosion = ...;
boolean result = instance.dropFromExplosion(explosion);
net.minecraft.world.level.block.Block#dropResources(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:287 - Modifiers:
public static - Return:
void
คืออะไร
ดำเนินการ dropResources ตาม implementation ของ Block
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getDrops(), forEach(), popResource(), spawnAfterBreak().
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Block.dropResources(blockState, level, blockPos);
net.minecraft.world.level.block.Block#dropResources(BlockState,Level,BlockPos,BlockEntity,Entity,ItemStack)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:301 - Modifiers:
public static - Return:
void
คืออะไร
ดำเนินการ dropResources ตาม implementation ของ Block
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getDrops(), forEach(), popResource(), spawnAfterBreak().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockEntity blockEntityEntity entityItemStack itemStack
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockEntity blockEntity = ...;
Entity entity = ...;
ItemStack itemStack = ...;
Block.dropResources(blockState, level, blockPos, blockEntity, entity, itemStack);
net.minecraft.world.level.block.Block#dropResources(BlockState,LevelAccessor,BlockPos,BlockEntity)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:294 - Modifiers:
public static - Return:
void
คืออะไร
ดำเนินการ dropResources ตาม implementation ของ Block
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getDrops(), forEach(), popResource(), spawnAfterBreak().
Parameters
BlockState blockStateLevelAccessor levelAccessorBlockPos blockPosBlockEntity blockEntity
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelAccessor levelAccessor = ...;
BlockPos blockPos = ...;
BlockEntity blockEntity = ...;
Block.dropResources(blockState, levelAccessor, blockPos, blockEntity);
net.minecraft.world.level.block.Block#fallOn(Level,BlockState,BlockPos,Entity,float)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:379 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ fallOn ตาม implementation ของ Block
ทำงานยังไง
เรียกต่อ: causeFallDamage(), damageSources(), fall().
Parameters
Level levelBlockState blockStateBlockPos blockPosEntity entityfloat f
ตัวอย่างใช้งาน
Block instance = ...;
Level level = ...;
BlockState blockState = ...;
BlockPos blockPos = ...;
Entity entity = ...;
instance.fallOn(level, blockState, blockPos, entity, 0.0F);
net.minecraft.world.level.block.Block#getDrops(BlockState,ServerLevel,BlockPos,BlockEntity)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:268 - Modifiers:
public static - Return:
List<ItemStack>
คืออะไร
อ่านค่า Drops
ทำงานยังไง
เรียกต่อ: Builder(), withParameter(), atCenterOf(), withOptionalParameter(). สร้างออบเจ็กต์: LootParams.Builder. คืนค่า: blockState.getDrops(builder).
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosBlockEntity blockEntity
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
BlockEntity blockEntity = ...;
List<ItemStack> result = Block.getDrops(blockState, serverLevel, blockPos, blockEntity);
net.minecraft.world.level.block.Block#getDrops(BlockState,ServerLevel,BlockPos,BlockEntity,Entity,ItemStack)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:276 - Modifiers:
public static - Return:
List<ItemStack>
คืออะไร
อ่านค่า Drops
ทำงานยังไง
เรียกต่อ: Builder(), withParameter(), atCenterOf(), withOptionalParameter(). สร้างออบเจ็กต์: LootParams.Builder. คืนค่า: blockState.getDrops(builder).
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosBlockEntity blockEntityEntity entityItemStack itemStack
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
BlockEntity blockEntity = ...;
Entity entity = ...;
ItemStack itemStack = ...;
List<ItemStack> result = Block.getDrops(blockState, serverLevel, blockPos, blockEntity, entity, itemStack);
net.minecraft.world.level.block.Block#getExplosionResistance()
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:347 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Explosion Resistance
ทำงานยังไง
คืนค่า: this.explosionResistance.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.Block#getFriction()
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:387 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Friction
ทำงานยังไง
คืนค่า: this.friction.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.Block#getId(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:114 - Modifiers:
public static - Return:
int
คืออะไร
อ่านค่า Id
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
net.minecraft.world.level.block.Block#getJumpFactor()
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:395 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Jump Factor
ทำงานยังไง
คืนค่า: this.jumpFactor.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.Block#getName()
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:375 - Modifiers:
public - Return:
MutableComponent
คืออะไร
อ่านค่า Name
ทำงานยังไง
เรียกต่อ: translatable(), getDescriptionId(). คืนค่า: Component.translatable(this.getDescriptionId()).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.Block#getShapeForEachState(Function<BlockState, VoxelShape>)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:477 - Modifiers:
protected - Return:
ImmutableMap<BlockState, VoxelShape>
คืออะไร
อ่านค่า Shape For Each State
ทำงานยังไง
เรียกต่อ: getPossibleStates(), stream(), collect(), toImmutableMap(), identity(). คืนค่า: this.stateDefinition.getPossibleStates().stream().collect(ImmutableMap.toImmutableMap(Function.identity(), function)).
Parameters
Function<BlockState, VoxelShape> function
ตัวอย่างใช้งาน
Function<BlockState, VoxelShape> function = ...;
@Override
protected ImmutableMap<BlockState, VoxelShape> getShapeForEachState(Function<BlockState, VoxelShape> function) {
return super.getShapeForEachState(function);
}
net.minecraft.world.level.block.Block#getSpeedFactor()
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:391 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Speed Factor
ทำงานยังไง
คืนค่า: this.speedFactor.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.Block#getStateDefinition()
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:423 - Modifiers:
public - Return:
StateDefinition<Block, BlockState>
คืออะไร
อ่านค่า State Definition
ทำงานยังไง
คืนค่า: this.stateDefinition.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.Block#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:357 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: defaultBlockState(). คืนค่า: this.defaultBlockState().
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
Block instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.Block#handlePrecipitation(BlockState,Level,BlockPos,Biome.Precipitation)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:413 - Modifiers:
public - Return:
void
คืออะไร
จัดการ Precipitation
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockState blockStateLevel levelBlockPos blockPosBiome.Precipitation precipitation
ตัวอย่างใช้งาน
Block instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Biome.Precipitation precipitation = ...;
instance.handlePrecipitation(blockState, level, blockPos, precipitation);
net.minecraft.world.level.block.Block#hasDynamicShape()
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:460 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Dynamic Shape
ทำงานยังไง
คืนค่า: this.dynamicShape.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.Block#isExceptionForConnection(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:197 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Exception For Connection
ทำงานยังไง
เรียกต่อ: getBlock(), is().
Parameters
BlockState blockState
ตัวอย่างใช้งาน
net.minecraft.world.level.block.Block#isFaceFull(VoxelShape,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:253 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Face Full
ทำงานยังไง
เรียกต่อ: getFaceShape(), isShapeFullBlock(). คืนค่า: isShapeFullBlock(voxelShape2).
Parameters
VoxelShape voxelShapeDirection direction
ตัวอย่างใช้งาน
VoxelShape voxelShape = ...;
Direction direction = ...;
boolean result = Block.isFaceFull(voxelShape, direction);
net.minecraft.world.level.block.Block#isPossibleToRespawnInThis(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:371 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Possible To Respawn In This
ทำงานยังไง
เรียกต่อ: isSolid(), liquid(). คืนค่า: !blockState.isSolid() && !blockState.liquid().
Parameters
BlockState blockState
ตัวอย่างใช้งาน
Block instance = ...;
BlockState blockState = ...;
boolean result = instance.isPossibleToRespawnInThis(blockState);
net.minecraft.world.level.block.Block#isShapeFullBlock(VoxelShape)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:258 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Shape Full Block
ทำงานยังไง
เรียกต่อ: getUnchecked(). คืนค่า: SHAPE_FULL_BLOCK_CACHE.getUnchecked(voxelShape).
Parameters
VoxelShape voxelShape
ตัวอย่างใช้งาน
net.minecraft.world.level.block.Block#playerDestroy(Level,Player,BlockPos,BlockState,BlockEntity,ItemStack)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:362 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ playerDestroy ตาม implementation ของ Block
ทำงานยังไง
เรียกต่อ: awardStat(), get(), causeFoodExhaustion(), dropResources().
Parameters
Level levelPlayer playerBlockPos blockPosBlockState blockStateBlockEntity blockEntityItemStack itemStack
ตัวอย่างใช้งาน
Block instance = ...;
Level level = ...;
Player player = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity blockEntity = ...;
ItemStack itemStack = ...;
instance.playerDestroy(level, player, blockPos, blockState, blockEntity, itemStack);
net.minecraft.world.level.block.Block#playerWillDestroy(Level,BlockPos,BlockState,Player)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:403 - Modifiers:
public - Return:
BlockState
คืออะไร
ดำเนินการ playerWillDestroy ตาม implementation ของ Block
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: spawnDestroyParticles(), is(), angerNearbyPiglins(), gameEvent(), of(). คืนค่า: blockState.
Parameters
Level levelBlockPos blockPosBlockState blockStatePlayer player
ตัวอย่างใช้งาน
Block instance = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
Player player = ...;
BlockState result = instance.playerWillDestroy(level, blockPos, blockState, player);
net.minecraft.world.level.block.Block#popExperience(ServerLevel,BlockPos,int)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:341 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ popExperience ตาม implementation ของ Block
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getGameRules(), getBoolean(), award(), atCenterOf().
Parameters
ServerLevel serverLevelBlockPos blockPosint i
ตัวอย่างใช้งาน
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
@Override
protected void popExperience(ServerLevel serverLevel, BlockPos blockPos, int i) {
super.popExperience(serverLevel, blockPos, i);
}
net.minecraft.world.level.block.Block#popResource(Level,BlockPos,ItemStack)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:310 - Modifiers:
public static - Return:
void
คืออะไร
ดำเนินการ popResource ตาม implementation ของ Block
ทำงานยังไง
เรียกต่อ: getHeight(), getX(), nextDouble(), getY(), getZ(). สร้างออบเจ็กต์: ItemEntity.
Parameters
Level levelBlockPos blockPosItemStack itemStack
ตัวอย่างใช้งาน
Level level = ...;
BlockPos blockPos = ...;
ItemStack itemStack = ...;
Block.popResource(level, blockPos, itemStack);
net.minecraft.world.level.block.Block#popResourceFromFace(Level,BlockPos,Direction,ItemStack)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:318 - Modifiers:
public static - Return:
void
คืออะไร
ดำเนินการ popResourceFromFace ตาม implementation ของ Block
ทำงานยังไง
เรียกต่อ: getStepX(), getStepY(), getStepZ(), getWidth(), getHeight(), getX(), nextDouble(), getY(). สร้างออบเจ็กต์: ItemEntity.
Parameters
Level levelBlockPos blockPosDirection directionItemStack itemStack
ตัวอย่างใช้งาน
Level level = ...;
BlockPos blockPos = ...;
Direction direction = ...;
ItemStack itemStack = ...;
Block.popResourceFromFace(level, blockPos, direction, itemStack);
net.minecraft.world.level.block.Block#pushEntitiesUp(BlockState,BlockState,LevelAccessor,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:132 - Modifiers:
public static - Return:
BlockState
คืออะไร
ดำเนินการ pushEntitiesUp ตาม implementation ของ Block
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: joinUnoptimized(), getCollisionShape(), move(), getX(), getY(), getZ(), isEmpty(), getEntities(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateBlockState blockState2LevelAccessor levelAccessorBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockState blockState2 = ...;
LevelAccessor levelAccessor = ...;
BlockPos blockPos = ...;
BlockState result = Block.pushEntitiesUp(blockState, blockState2, levelAccessor, blockPos);
net.minecraft.world.level.block.Block#registerDefaultState(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:427 - Modifiers:
protected final - Return:
void
คืออะไร
ลงทะเบียน Default State
ทำงานยังไง
แก้ state: defaultBlockState.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected void registerDefaultState(BlockState blockState) {
super.registerDefaultState(blockState);
}
net.minecraft.world.level.block.Block#setPlacedBy(Level,BlockPos,BlockState,LivingEntity,ItemStack)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:368 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Placed By
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
Level levelBlockPos blockPosBlockState blockStateLivingEntity livingEntityItemStack itemStack
ตัวอย่างใช้งาน
Block instance = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
LivingEntity livingEntity = ...;
ItemStack itemStack = ...;
instance.setPlacedBy(level, blockPos, blockState, livingEntity, itemStack);
net.minecraft.world.level.block.Block#shouldRenderFace(BlockState,BlockState,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:207 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบว่าควร Render Face
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getFaceOcclusionShape(), getOpposite(), block(), skipRendering(), empty(), ShapePairKey(), get(), getAndMoveToFirst(). สร้างออบเจ็กต์: Block.ShapePairKey. มีจุด return อย่างน้อย 6 จุด.
Parameters
BlockState blockStateBlockState blockState2Direction direction
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockState blockState2 = ...;
Direction direction = ...;
boolean result = Block.shouldRenderFace(blockState, blockState2, direction);
net.minecraft.world.level.block.Block#spawnDestroyParticles(Level,Player,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:399 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง entity ในโลก Destroy Particles
ทำงานยังไง
เรียกต่อ: levelEvent(), getId().
Parameters
Level levelPlayer playerBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
Level level = ...;
Player player = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected void spawnDestroyParticles(Level level, Player player, BlockPos blockPos, BlockState blockState) {
super.spawnDestroyParticles(level, player, blockPos, blockState);
}
net.minecraft.world.level.block.Block#stateById(int)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:123 - Modifiers:
public static - Return:
BlockState
คืออะไร
ดำเนินการ stateById ตาม implementation ของ Block
ทำงานยังไง
เรียกต่อ: byId(), defaultBlockState(). คืนค่า: blockState == null ? Blocks.AIR.defaultBlockState() : blockState.
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.level.block.Block#stepOn(Level,BlockPos,BlockState,Entity)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:354 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ stepOn ตาม implementation ของ Block
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
Level levelBlockPos blockPosBlockState blockStateEntity entity
ตัวอย่างใช้งาน
Block instance = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
Entity entity = ...;
instance.stepOn(level, blockPos, blockState, entity);
net.minecraft.world.level.block.Block#toString()
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:464 - Modifiers:
public - Return:
String
คืออะไร
ดำเนินการ toString ตาม implementation ของ Block
ทำงานยังไง
เรียกต่อ: wrapAsHolder(), getRegisteredName(). คืนค่า: "Block{" + BuiltInRegistries.BLOCK.wrapAsHolder(this).getRegisteredName() + "}".
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.Block#tryDropExperience(ServerLevel,BlockPos,ItemStack,IntProvider)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:486 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ tryDropExperience ตาม implementation ของ Block
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: processBlockExperience(), sample(), getRandom(), popExperience().
Parameters
ServerLevel serverLevelBlockPos blockPosItemStack itemStackIntProvider intProvider
ตัวอย่างใช้งาน
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
ItemStack itemStack = ...;
IntProvider intProvider = ...;
@Override
protected void tryDropExperience(ServerLevel serverLevel, BlockPos blockPos, ItemStack itemStack, IntProvider intProvider) {
super.tryDropExperience(serverLevel, blockPos, itemStack, intProvider);
}
net.minecraft.world.level.block.Block#updateEntityMovementAfterFallOn(BlockGetter,Entity)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:383 - Modifiers:
public - Return:
void
คืออะไร
อัปเดต Entity Movement After Fall On
ทำงานยังไง
เรียกต่อ: setDeltaMovement(), getDeltaMovement(), multiply().
Parameters
BlockGetter blockGetterEntity entity
ตัวอย่างใช้งาน
Block instance = ...;
BlockGetter blockGetter = ...;
Entity entity = ...;
instance.updateEntityMovementAfterFallOn(blockGetter, entity);
net.minecraft.world.level.block.Block#updateFromNeighbourShapes(BlockState,LevelAccessor,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:153 - Modifiers:
public static - Return:
BlockState
คืออะไร
อัปเดต From Neighbour Shapes
ทำงานยังไง
มีการวนลูป. เรียกต่อ: MutableBlockPos(), setWithOffset(), updateShape(), getBlockState(), getRandom(). สร้างออบเจ็กต์: BlockPos.MutableBlockPos. คืนค่า: blockState2.
Parameters
BlockState blockStateLevelAccessor levelAccessorBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelAccessor levelAccessor = ...;
BlockPos blockPos = ...;
BlockState result = Block.updateFromNeighbourShapes(blockState, levelAccessor, blockPos);
net.minecraft.world.level.block.Block#updateOrDestroy(BlockState,BlockState,LevelAccessor,BlockPos,int)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:167 - Modifiers:
public static - Return:
void
คืออะไร
อัปเดต Or Destroy
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockState blockStateBlockState blockState2LevelAccessor levelAccessorBlockPos blockPosint i
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockState blockState2 = ...;
LevelAccessor levelAccessor = ...;
BlockPos blockPos = ...;
Block.updateOrDestroy(blockState, blockState2, levelAccessor, blockPos, 0);
net.minecraft.world.level.block.Block#updateOrDestroy(BlockState,BlockState,LevelAccessor,BlockPos,int,int)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:171 - Modifiers:
public static - Return:
void
คืออะไร
อัปเดต Or Destroy
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isAir(), isClientSide(), destroyBlock(), setBlock().
Parameters
BlockState blockStateBlockState blockState2LevelAccessor levelAccessorBlockPos blockPosint iint j
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockState blockState2 = ...;
LevelAccessor levelAccessor = ...;
BlockPos blockPos = ...;
Block.updateOrDestroy(blockState, blockState2, levelAccessor, blockPos, 0, 0);
net.minecraft.world.level.block.Block#wasExploded(ServerLevel,BlockPos,Explosion)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:351 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ wasExploded ตาม implementation ของ Block
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
ServerLevel serverLevelBlockPos blockPosExplosion explosion
ตัวอย่างใช้งาน
Block instance = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
Explosion explosion = ...;
instance.wasExploded(serverLevel, blockPos, explosion);
net.minecraft.world.level.block.Block#withPropertiesOf(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/Block.java:435 - Modifiers:
public final - Return:
BlockState
คืออะไร
ดำเนินการ withPropertiesOf ตาม implementation ของ Block
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: defaultBlockState(), getBlock(), getStateDefinition(), getProperties(), hasProperty(), copyProperty(). คืนค่า: blockState2.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
Block instance = ...;
BlockState blockState = ...;
BlockState result = instance.withPropertiesOf(blockState);
Blocks
- Full name:
net.minecraft.world.level.block.Blocks - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/Blocks.java - Type:
class - Modifiers:
public
net.minecraft.world.level.block.Blocks#always(BlockState,BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/Blocks.java:6406 - Modifiers:
public static - Return:
boolean
คืออะไร
ดำเนินการ always ตาม implementation ของ Blocks
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
boolean result = Blocks.always(blockState, blockGetter, blockPos);
net.minecraft.world.level.block.Blocks#always(BlockState,BlockGetter,BlockPos,EntityType<?>)
- Origin:
common - Source:
net/minecraft/world/level/block/Blocks.java:6371 - Modifiers:
public static - Return:
Boolean
คืออะไร
ดำเนินการ always ตาม implementation ของ Blocks
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosEntityType<?> entityType
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
EntityType<?> entityType = ...;
Boolean result = Blocks.always(blockState, blockGetter, blockPos, entityType);
net.minecraft.world.level.block.Blocks#buttonProperties()
- Origin:
common - Source:
net/minecraft/world/level/block/Blocks.java:6468 - Modifiers:
public static - Return:
BlockBehaviour.Properties
คืออะไร
ดำเนินการ buttonProperties ตาม implementation ของ Blocks
ทำงานยังไง
เรียกต่อ: of(), noCollission(), strength(), pushReaction(). คืนค่า: BlockBehaviour.Properties.of().noCollission().strength(0.5F).pushReaction(PushReaction.DESTROY).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.Blocks#flowerPotProperties()
- Origin:
common - Source:
net/minecraft/world/level/block/Blocks.java:6472 - Modifiers:
public static - Return:
BlockBehaviour.Properties
คืออะไร
ดำเนินการ flowerPotProperties ตาม implementation ของ Blocks
ทำงานยังไง
เรียกต่อ: of(), instabreak(), noOcclusion(), pushReaction(). คืนค่า: BlockBehaviour.Properties.of().instabreak().noOcclusion().pushReaction(PushReaction.DESTROY).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.Blocks#leavesProperties(SoundType)
- Origin:
common - Source:
net/minecraft/world/level/block/Blocks.java:6431 - Modifiers:
public static - Return:
BlockBehaviour.Properties
คืออะไร
ดำเนินการ leavesProperties ตาม implementation ของ Blocks
ทำงานยังไง
เรียกต่อ: of(), mapColor(), strength(), randomTicks(), sound(), noOcclusion(), isValidSpawn(), isSuffocating().
Parameters
SoundType soundType
ตัวอย่างใช้งาน
net.minecraft.world.level.block.Blocks#litBlockEmission(int)
- Origin:
common - Source:
net/minecraft/world/level/block/Blocks.java:6359 - Modifiers:
public static - Return:
ToIntFunction<BlockState>
คืออะไร
ดำเนินการ litBlockEmission ตาม implementation ของ Blocks
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: blockState -> blockState.getValue(BlockStateProperties.LIT) ? i : 0.
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.level.block.Blocks#logProperties(MapColor,MapColor,SoundType)
- Origin:
common - Source:
net/minecraft/world/level/block/Blocks.java:6393 - Modifiers:
public static - Return:
BlockBehaviour.Properties
คืออะไร
ดำเนินการ logProperties ตาม implementation ของ Blocks
ทำงานยังไง
เรียกต่อ: of(), mapColor(), getValue(), instrument(), strength(), sound(), ignitedByLava().
Parameters
MapColor mapColorMapColor mapColor2SoundType soundType
ตัวอย่างใช้งาน
MapColor mapColor = ...;
MapColor mapColor2 = ...;
SoundType soundType = ...;
BlockBehaviour.Properties result = Blocks.logProperties(mapColor, mapColor2, soundType);
net.minecraft.world.level.block.Blocks#netherStemProperties(MapColor)
- Origin:
common - Source:
net/minecraft/world/level/block/Blocks.java:6402 - Modifiers:
public static - Return:
BlockBehaviour.Properties
คืออะไร
ดำเนินการ netherStemProperties ตาม implementation ของ Blocks
ทำงานยังไง
เรียกต่อ: of(), mapColor(), instrument(), strength(), sound(). คืนค่า: BlockBehaviour.Properties.of().mapColor(blockState -> mapColor).instrument(NoteBlockInstrument.BASS).strength(2.0F).sound(SoundType.STEM).
Parameters
MapColor mapColor
ตัวอย่างใช้งาน
net.minecraft.world.level.block.Blocks#never(BlockState,BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/Blocks.java:6410 - Modifiers:
public static - Return:
boolean
คืออะไร
ดำเนินการ never ตาม implementation ของ Blocks
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
boolean result = Blocks.never(blockState, blockGetter, blockPos);
net.minecraft.world.level.block.Blocks#never(BlockState,BlockGetter,BlockPos,EntityType<?>)
- Origin:
common - Source:
net/minecraft/world/level/block/Blocks.java:6367 - Modifiers:
public static - Return:
Boolean
คืออะไร
ดำเนินการ never ตาม implementation ของ Blocks
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosEntityType<?> entityType
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
EntityType<?> entityType = ...;
Boolean result = Blocks.never(blockState, blockGetter, blockPos, entityType);
net.minecraft.world.level.block.Blocks#ocelotOrParrot(BlockState,BlockGetter,BlockPos,EntityType<?>)
- Origin:
common - Source:
net/minecraft/world/level/block/Blocks.java:6375 - Modifiers:
public static - Return:
Boolean
คืออะไร
ดำเนินการ ocelotOrParrot ตาม implementation ของ Blocks
ทำงานยังไง
คืนค่า: entityType == EntityType.OCELOT || entityType == EntityType.PARROT.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosEntityType<?> entityType
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
EntityType<?> entityType = ...;
Boolean result = Blocks.ocelotOrParrot(blockState, blockGetter, blockPos, entityType);
net.minecraft.world.level.block.Blocks#register(ResourceKey<Block>,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/Blocks.java:6510 - Modifiers:
public static - Return:
Block
คืออะไร
ลงทะเบียน register
ทำงานยังไง
คืนค่า: register(resourceKey, Block::new, properties).
Parameters
ResourceKey<Block> resourceKeyBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
ResourceKey<Block> resourceKey = ...;
BlockBehaviour.Properties properties = ...;
Block result = Blocks.register(resourceKey, properties);
net.minecraft.world.level.block.Blocks#register(ResourceKey<Block>,Function<BlockBehaviour.Properties, Block>,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/Blocks.java:6505 - Modifiers:
public static - Return:
Block
คืออะไร
ลงทะเบียน register
ทำงานยังไง
เรียกต่อ: apply(), setId(). คืนค่า: Registry.register(BuiltInRegistries.BLOCK, resourceKey, block).
Parameters
ResourceKey<Block> resourceKeyFunction<BlockBehaviour.Properties, Block> functionBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
ResourceKey<Block> resourceKey = ...;
Function<BlockBehaviour.Properties, Block> function = ...;
BlockBehaviour.Properties properties = ...;
Block result = Blocks.register(resourceKey, function, properties);
BlockTypes
- Full name:
net.minecraft.world.level.block.BlockTypes - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BlockTypes.java - Type:
class - Modifiers:
public
net.minecraft.world.level.block.BlockTypes#bootstrap(Registry<MapCodec<? extends Block>>)
- Origin:
common - Source:
net/minecraft/world/level/block/BlockTypes.java:14 - Modifiers:
public static - Return:
MapCodec<? extends Block>
คืออะไร
ดำเนินการ bootstrap ตาม implementation ของ BlockTypes
ทำงานยังไง
เรียกต่อ: register(). คืนค่า: Registry.register(registry, "wool_carpet", WoolCarpetBlock.CODEC).
Parameters
Registry<MapCodec<? extends Block>> registry
ตัวอย่างใช้งาน
Registry<MapCodec<? extends Block>> registry = ...;
MapCodec<? extends Block> result = BlockTypes.bootstrap(registry);
BonemealableBlock
- Full name:
net.minecraft.world.level.block.BonemealableBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BonemealableBlock.java - Type:
interface - Modifiers:
public
net.minecraft.world.level.block.BonemealableBlock#getParticlePos(BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BonemealableBlock.java:17 - Modifiers:
default - Return:
BlockPos
คืออะไร
อ่านค่า Particle Pos
ทำงานยังไง
แยกกรณีด้วย switch. เรียกต่อ: getType(), above(). คืนค่า: switch (this.getType()) { case NEIGHBOR_SPREADER -> blockPos.above().
Parameters
BlockPos blockPos
ตัวอย่างใช้งาน
BonemealableBlock instance = ...;
BlockPos blockPos = ...;
BlockPos result = instance.getParticlePos(blockPos);
net.minecraft.world.level.block.BonemealableBlock#getType()
- Origin:
common - Source:
net/minecraft/world/level/block/BonemealableBlock.java:24 - Modifiers:
default - Return:
BonemealableBlock.Type
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: BonemealableBlock.Type.GROWER.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BonemealableBlock#isBonemealSuccess(Level,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BonemealableBlock.java:13 - Modifiers: ``
- Return:
boolean
คืออะไร
ตรวจสอบสถานะ Bonemeal Success
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
Level levelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BonemealableBlock instance = ...;
Level level = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isBonemealSuccess(level, randomSource, blockPos, blockState);
net.minecraft.world.level.block.BonemealableBlock#isValidBonemealTarget(LevelReader,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BonemealableBlock.java:11 - Modifiers: ``
- Return:
boolean
คืออะไร
ตรวจสอบสถานะ Valid Bonemeal Target
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BonemealableBlock instance = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isValidBonemealTarget(levelReader, blockPos, blockState);
net.minecraft.world.level.block.BonemealableBlock#performBonemeal(ServerLevel,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BonemealableBlock.java:15 - Modifiers: ``
- Return:
void
คืออะไร
ดำเนินการ performBonemeal ตาม implementation ของ BonemealableBlock
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
ServerLevel serverLevelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BonemealableBlock instance = ...;
ServerLevel serverLevel = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
instance.performBonemeal(serverLevel, randomSource, blockPos, blockState);
BonemealableFeaturePlacerBlock
- Full name:
net.minecraft.world.level.block.BonemealableFeaturePlacerBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BonemealableFeaturePlacerBlock.java - Type:
class - Modifiers:
public - Extends:
Block - Implements:
BonemealableBlock
net.minecraft.world.level.block.BonemealableFeaturePlacerBlock#BonemealableFeaturePlacerBlock(ResourceKey<ConfiguredFeature<?, ?>>,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/BonemealableFeaturePlacerBlock.java:31 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ BonemealableFeaturePlacerBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: feature.
Parameters
ResourceKey<ConfiguredFeature<?, ?>> resourceKeyBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
ResourceKey<ConfiguredFeature<?, ?>> resourceKey = ...;
BlockBehaviour.Properties properties = ...;
BonemealableFeaturePlacerBlock instance = new BonemealableFeaturePlacerBlock(resourceKey, properties);
net.minecraft.world.level.block.BonemealableFeaturePlacerBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/BonemealableFeaturePlacerBlock.java:26 - Modifiers:
public - Return:
MapCodec<BonemealableFeaturePlacerBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ BonemealableFeaturePlacerBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
BonemealableFeaturePlacerBlock instance = ...;
MapCodec<BonemealableFeaturePlacerBlock> result = instance.codec();
net.minecraft.world.level.block.BonemealableFeaturePlacerBlock#getType()
- Origin:
common - Source:
net/minecraft/world/level/block/BonemealableFeaturePlacerBlock.java:54 - Modifiers:
public - Return:
BonemealableBlock.Type
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: BonemealableBlock.Type.NEIGHBOR_SPREADER.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BonemealableFeaturePlacerBlock#isBonemealSuccess(Level,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BonemealableFeaturePlacerBlock.java:41 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Bonemeal Success
ทำงานยังไง
คืนค่า: true.
Parameters
Level levelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BonemealableFeaturePlacerBlock instance = ...;
Level level = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isBonemealSuccess(level, randomSource, blockPos, blockState);
net.minecraft.world.level.block.BonemealableFeaturePlacerBlock#isValidBonemealTarget(LevelReader,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BonemealableFeaturePlacerBlock.java:36 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Valid Bonemeal Target
ทำงานยังไง
เรียกต่อ: getBlockState(), above(), isAir(). คืนค่า: levelReader.getBlockState(blockPos.above()).isAir().
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BonemealableFeaturePlacerBlock instance = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isValidBonemealTarget(levelReader, blockPos, blockState);
net.minecraft.world.level.block.BonemealableFeaturePlacerBlock#performBonemeal(ServerLevel,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BonemealableFeaturePlacerBlock.java:46 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ performBonemeal ตาม implementation ของ BonemealableFeaturePlacerBlock
ทำงานยังไง
เรียกต่อ: registryAccess(), lookup(), flatMap(), get(), ifPresent(), value(), place(), getChunkSource().
Parameters
ServerLevel serverLevelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BonemealableFeaturePlacerBlock instance = ...;
ServerLevel serverLevel = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
instance.performBonemeal(serverLevel, randomSource, blockPos, blockState);
BrewingStandBlock
- Full name:
net.minecraft.world.level.block.BrewingStandBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BrewingStandBlock.java - Type:
class - Modifiers:
public - Extends:
BaseEntityBlock
net.minecraft.world.level.block.BrewingStandBlock#animateTick(BlockState,Level,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BrewingStandBlock.java:73 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ animateTick ตาม implementation ของ BrewingStandBlock
ทำงานยังไง
เรียกต่อ: getX(), nextFloat(), getY(), getZ(), addParticle().
Parameters
BlockState blockStateLevel levelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BrewingStandBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
instance.animateTick(blockState, level, blockPos, randomSource);
net.minecraft.world.level.block.BrewingStandBlock#BrewingStandBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/BrewingStandBlock.java:42 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ BrewingStandBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
BrewingStandBlock instance = new BrewingStandBlock(properties);
net.minecraft.world.level.block.BrewingStandBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/BrewingStandBlock.java:37 - Modifiers:
public - Return:
MapCodec<BrewingStandBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ BrewingStandBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BrewingStandBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/BrewingStandBlock.java:97 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.BrewingStandBlock#getAnalogOutputSignal(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BrewingStandBlock.java:92 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Analog Output Signal
ทำงานยังไง
เรียกต่อ: getRedstoneSignalFromBlockEntity(), getBlockEntity(). คืนค่า: AbstractContainerMenu.getRedstoneSignalFromBlockEntity(level.getBlockEntity(blockPos)).
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected int getAnalogOutputSignal(BlockState blockState, Level level, BlockPos blockPos) {
return super.getAnalogOutputSignal(blockState, level, blockPos);
}
net.minecraft.world.level.block.BrewingStandBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BrewingStandBlock.java:58 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
คืนค่า: SHAPE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.BrewingStandBlock#getTicker(Level,BlockState,BlockEntityType<T>)
- Origin:
common - Source:
net/minecraft/world/level/block/BrewingStandBlock.java:52 - Modifiers:
public - Return:
BlockEntityTicker<T>
คืออะไร
อ่านค่า Ticker
ทำงานยังไง
เรียกต่อ: createTickerHelper(). คืนค่า: level.isClientSide ? null : createTickerHelper(blockEntityType, BlockEntityType.BREWING_STAND, BrewingStandBlockEntity::serverTick).
Parameters
Level levelBlockState blockStateBlockEntityType<T> blockEntityType
ตัวอย่างใช้งาน
BrewingStandBlock instance = ...;
Level level = ...;
BlockState blockState = ...;
BlockEntityType<T> blockEntityType = ...;
BlockEntityTicker<T> result = instance.getTicker(level, blockState, blockEntityType);
net.minecraft.world.level.block.BrewingStandBlock#hasAnalogOutputSignal(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BrewingStandBlock.java:87 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Analog Output Signal
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean hasAnalogOutputSignal(BlockState blockState) {
return super.hasAnalogOutputSignal(blockState);
}
net.minecraft.world.level.block.BrewingStandBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/BrewingStandBlock.java:102 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.BrewingStandBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BrewingStandBlock.java:47 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ BrewingStandBlock
ทำงานยังไง
สร้างออบเจ็กต์: BrewingStandBlockEntity. คืนค่า: new BrewingStandBlockEntity(blockPos, blockState).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BrewingStandBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
net.minecraft.world.level.block.BrewingStandBlock#onRemove(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/BrewingStandBlock.java:81 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Remove
ทำงานยังไง
เรียกต่อ: dropContentsOnDestroy().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onRemove(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onRemove(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.BrewingStandBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/BrewingStandBlock.java:63 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity(), openMenu(), awardStat(). คืนค่า: InteractionResult.SUCCESS.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
BrushableBlock
- Full name:
net.minecraft.world.level.block.BrushableBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BrushableBlock.java - Type:
class - Modifiers:
public - Extends:
BaseEntityBlock - Implements:
Fallable
net.minecraft.world.level.block.BrushableBlock#animateTick(BlockState,Level,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BrushableBlock.java:101 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ animateTick ตาม implementation ของ BrushableBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: nextInt(), below(), isFree(), getBlockState(), getX(), nextDouble(), getY(), getZ(). สร้างออบเจ็กต์: BlockParticleOption.
Parameters
BlockState blockStateLevel levelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BrushableBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
instance.animateTick(blockState, level, blockPos, randomSource);
net.minecraft.world.level.block.BrushableBlock#BrushableBlock(Block,SoundEvent,SoundEvent,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/BrushableBlock.java:49 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ BrushableBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: turnsInto, brushSound, brushCompletedSound. เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
Block blockSoundEvent soundEventSoundEvent soundEvent2BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
Block block = ...;
SoundEvent soundEvent = ...;
SoundEvent soundEvent2 = ...;
BlockBehaviour.Properties properties = ...;
BrushableBlock instance = new BrushableBlock(block, soundEvent, soundEvent2, properties);
net.minecraft.world.level.block.BrushableBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/BrushableBlock.java:44 - Modifiers:
public - Return:
MapCodec<BrushableBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ BrushableBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BrushableBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/BrushableBlock.java:57 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.BrushableBlock#getBrushCompletedSound()
- Origin:
common - Source:
net/minecraft/world/level/block/BrushableBlock.java:128 - Modifiers:
public - Return:
SoundEvent
คืออะไร
อ่านค่า Brush Completed Sound
ทำงานยังไง
คืนค่า: this.brushCompletedSound.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BrushableBlock#getBrushSound()
- Origin:
common - Source:
net/minecraft/world/level/block/BrushableBlock.java:124 - Modifiers:
public - Return:
SoundEvent
คืออะไร
อ่านค่า Brush Sound
ทำงานยังไง
คืนค่า: this.brushSound.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BrushableBlock#getTurnsInto()
- Origin:
common - Source:
net/minecraft/world/level/block/BrushableBlock.java:120 - Modifiers:
public - Return:
Block
คืออะไร
อ่านค่า Turns Into
ทำงานยังไง
คืนค่า: this.turnsInto.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BrushableBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BrushableBlock.java:114 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ BrushableBlock
ทำงานยังไง
สร้างออบเจ็กต์: BrushableBlockEntity. คืนค่า: new BrushableBlockEntity(blockPos, blockState).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BrushableBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
net.minecraft.world.level.block.BrushableBlock#onBrokenAfterFall(Level,BlockPos,FallingBlockEntity)
- Origin:
common - Source:
net/minecraft/world/level/block/BrushableBlock.java:94 - Modifiers:
public - Return:
void
คืออะไร
จัดการเหตุการณ์ Broken After Fall
ทำงานยังไง
เรียกต่อ: getBoundingBox(), getCenter(), levelEvent(), containing(), getId(), getBlockState(), gameEvent().
Parameters
Level levelBlockPos blockPosFallingBlockEntity fallingBlockEntity
ตัวอย่างใช้งาน
BrushableBlock instance = ...;
Level level = ...;
BlockPos blockPos = ...;
FallingBlockEntity fallingBlockEntity = ...;
instance.onBrokenAfterFall(level, blockPos, fallingBlockEntity);
net.minecraft.world.level.block.BrushableBlock#onPlace(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/BrushableBlock.java:62 - Modifiers:
public - Return:
void
คืออะไร
จัดการเหตุการณ์ Place
ทำงานยังไง
เรียกต่อ: scheduleTick().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BrushableBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
instance.onPlace(blockState, level, blockPos, blockState2, true);
net.minecraft.world.level.block.BrushableBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BrushableBlock.java:82 - Modifiers:
public - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity(), checkReset(), isFree(), getBlockState(), below(), getY(), getMinY(), fall().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BrushableBlock instance = ...;
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
instance.tick(blockState, serverLevel, blockPos, randomSource);
net.minecraft.world.level.block.BrushableBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BrushableBlock.java:67 - Modifiers:
public - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
เรียกต่อ: scheduleTick(). คืนค่า: super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource).
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BrushableBlock instance = ...;
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
BlockState result = instance.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
BubbleColumnBlock
- Full name:
net.minecraft.world.level.block.BubbleColumnBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BubbleColumnBlock.java - Type:
class - Modifiers:
public - Extends:
Block - Implements:
BucketPickup
net.minecraft.world.level.block.BubbleColumnBlock#animateTick(BlockState,Level,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BubbleColumnBlock.java:132 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ animateTick ตาม implementation ของ BubbleColumnBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getX(), getY(), getZ(), getValue(), addAlwaysVisibleParticle(), nextInt(), playLocalSound(), nextFloat().
Parameters
BlockState blockStateLevel levelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BubbleColumnBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
instance.animateTick(blockState, level, blockPos, randomSource);
net.minecraft.world.level.block.BubbleColumnBlock#BubbleColumnBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/BubbleColumnBlock.java:44 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ BubbleColumnBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
BubbleColumnBlock instance = new BubbleColumnBlock(properties);
net.minecraft.world.level.block.BubbleColumnBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BubbleColumnBlock.java:192 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: getBlockState(), below(), is(). คืนค่า: blockState2.is(Blocks.BUBBLE_COLUMN) || blockState2.is(Blocks.MAGMA_BLOCK) || blockState2.is(Blocks.SOUL_SAND).
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.BubbleColumnBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/BubbleColumnBlock.java:39 - Modifiers:
public - Return:
MapCodec<BubbleColumnBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ BubbleColumnBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BubbleColumnBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/BubbleColumnBlock.java:208 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.BubbleColumnBlock#entityInside(BlockState,Level,BlockPos,Entity)
- Origin:
common - Source:
net/minecraft/world/level/block/BubbleColumnBlock.java:49 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ entityInside ตาม implementation ของ BubbleColumnBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getBlockState(), above(), isAir(), onAboveBubbleCol(), getValue(), sendParticles(), getX(), nextDouble().
Parameters
BlockState blockStateLevel levelBlockPos blockPosEntity entity
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Entity entity = ...;
@Override
protected void entityInside(BlockState blockState, Level level, BlockPos blockPos, Entity entity) {
super.entityInside(blockState, level, blockPos, entity);
}
net.minecraft.world.level.block.BubbleColumnBlock#getFluidState(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BubbleColumnBlock.java:92 - Modifiers:
protected - Return:
FluidState
คืออะไร
อ่านค่า Fluid State
ทำงานยังไง
เรียกต่อ: getSource(). คืนค่า: Fluids.WATER.getSource(false).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected FluidState getFluidState(BlockState blockState) {
return super.getFluidState(blockState);
}
net.minecraft.world.level.block.BubbleColumnBlock#getPickupSound()
- Origin:
common - Source:
net/minecraft/world/level/block/BubbleColumnBlock.java:219 - Modifiers:
public - Return:
Optional<SoundEvent>
คืออะไร
อ่านค่า Pickup Sound
ทำงานยังไง
คืนค่า: Fluids.WATER.getPickupSound().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BubbleColumnBlock#getRenderShape(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BubbleColumnBlock.java:203 - Modifiers:
protected - Return:
RenderShape
คืออะไร
อ่านค่า Render Shape
ทำงานยังไง
คืนค่า: RenderShape.INVISIBLE.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected RenderShape getRenderShape(BlockState blockState) {
return super.getRenderShape(blockState);
}
net.minecraft.world.level.block.BubbleColumnBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/BubbleColumnBlock.java:198 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
เรียกต่อ: empty(). คืนค่า: Shapes.empty().
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.BubbleColumnBlock#pickupBlock(Player,LevelAccessor,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BubbleColumnBlock.java:213 - Modifiers:
public - Return:
ItemStack
คืออะไร
ดำเนินการ pickupBlock ตาม implementation ของ BubbleColumnBlock
ทำงานยังไง
เรียกต่อ: setBlock(), defaultBlockState(). สร้างออบเจ็กต์: ItemStack. คืนค่า: new ItemStack(Items.WATER_BUCKET).
Parameters
Player playerLevelAccessor levelAccessorBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BubbleColumnBlock instance = ...;
Player player = ...;
LevelAccessor levelAccessor = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
ItemStack result = instance.pickupBlock(player, levelAccessor, blockPos, blockState);
net.minecraft.world.level.block.BubbleColumnBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BubbleColumnBlock.java:87 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
เรียกต่อ: updateColumn(), getBlockState(), below().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.BubbleColumnBlock#updateColumn(LevelAccessor,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BubbleColumnBlock.java:97 - Modifiers:
public static - Return:
void
คืออะไร
อัปเดต Column
ทำงานยังไง
เรียกต่อ: getBlockState().
Parameters
LevelAccessor levelAccessorBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
LevelAccessor levelAccessor = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BubbleColumnBlock.updateColumn(levelAccessor, blockPos, blockState);
net.minecraft.world.level.block.BubbleColumnBlock#updateColumn(LevelAccessor,BlockPos,BlockState,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BubbleColumnBlock.java:101 - Modifiers:
public static - Return:
void
คืออะไร
อัปเดต Column
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: canExistIn(), getColumnState(), setBlock(), mutable(), move(), getBlockState().
Parameters
LevelAccessor levelAccessorBlockPos blockPosBlockState blockStateBlockState blockState2
ตัวอย่างใช้งาน
LevelAccessor levelAccessor = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockState blockState2 = ...;
BubbleColumnBlock.updateColumn(levelAccessor, blockPos, blockState, blockState2);
net.minecraft.world.level.block.BubbleColumnBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BubbleColumnBlock.java:171 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: scheduleTick(), getTickDelay(), canSurvive(), is(), canExistIn(). คืนค่า: super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource).
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
BucketPickup
- Full name:
net.minecraft.world.level.block.BucketPickup - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BucketPickup.java - Type:
interface - Modifiers:
public
net.minecraft.world.level.block.BucketPickup#getPickupSound()
- Origin:
common - Source:
net/minecraft/world/level/block/BucketPickup.java:15 - Modifiers: ``
- Return:
Optional<SoundEvent>
คืออะไร
อ่านค่า Pickup Sound
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BucketPickup#pickupBlock(Player,LevelAccessor,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BucketPickup.java:13 - Modifiers: ``
- Return:
ItemStack
คืออะไร
ดำเนินการ pickupBlock ตาม implementation ของ BucketPickup
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
Player playerLevelAccessor levelAccessorBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BucketPickup instance = ...;
Player player = ...;
LevelAccessor levelAccessor = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
ItemStack result = instance.pickupBlock(player, levelAccessor, blockPos, blockState);
BuddingAmethystBlock
- Full name:
net.minecraft.world.level.block.BuddingAmethystBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BuddingAmethystBlock.java - Type:
class - Modifiers:
public - Extends:
AmethystBlock
net.minecraft.world.level.block.BuddingAmethystBlock#BuddingAmethystBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/BuddingAmethystBlock.java:22 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ BuddingAmethystBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
BuddingAmethystBlock instance = new BuddingAmethystBlock(properties);
net.minecraft.world.level.block.BuddingAmethystBlock#canClusterGrowAtState(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BuddingAmethystBlock.java:52 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Cluster Grow At State
ทำงานยังไง
เรียกต่อ: isAir(), is(), getFluidState(), getAmount(). คืนค่า: blockState.isAir() || blockState.is(Blocks.WATER) && blockState.getFluidState().getAmount() == 8.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
boolean result = BuddingAmethystBlock.canClusterGrowAtState(blockState);
net.minecraft.world.level.block.BuddingAmethystBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/BuddingAmethystBlock.java:17 - Modifiers:
public - Return:
MapCodec<BuddingAmethystBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ BuddingAmethystBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BuddingAmethystBlock#randomTick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BuddingAmethystBlock.java:26 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ randomTick ตาม implementation ของ BuddingAmethystBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: nextInt(), relative(), getBlockState(), canClusterGrowAtState(), is(), getValue(), defaultBlockState(), setValue().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void randomTick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.randomTick(blockState, serverLevel, blockPos, randomSource);
}
BushBlock
- Full name:
net.minecraft.world.level.block.BushBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/BushBlock.java - Type:
class - Modifiers:
public abstract - Extends:
Block
net.minecraft.world.level.block.BushBlock#BushBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/BushBlock.java:16 - Modifiers:
protected - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ BushBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BushBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BushBlock.java:43 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: below(), mayPlaceOn(), getBlockState(). คืนค่า: this.mayPlaceOn(levelReader.getBlockState(blockPos2), levelReader, blockPos2).
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.BushBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/BushBlock.java:20 - Modifiers:
protected abstract - Return:
MapCodec<? extends BushBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ BushBlock
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.BushBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/BushBlock.java:54 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: pathComputationType == PathComputationType.AIR && !this.hasCollision ? true : super.isPathfindable(blockState, pathComputationType).
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.BushBlock#mayPlaceOn(BlockState,BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/BushBlock.java:23 - Modifiers:
protected - Return:
boolean
คืออะไร
ดำเนินการ mayPlaceOn ตาม implementation ของ BushBlock
ทำงานยังไง
เรียกต่อ: is(). คืนค่า: blockState.is(BlockTags.DIRT) || blockState.is(Blocks.FARMLAND).
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
@Override
protected boolean mayPlaceOn(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos) {
return super.mayPlaceOn(blockState, blockGetter, blockPos);
}
net.minecraft.world.level.block.BushBlock#propagatesSkylightDown(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/BushBlock.java:49 - Modifiers:
protected - Return:
boolean
คืออะไร
ดำเนินการ propagatesSkylightDown ตาม implementation ของ BushBlock
ทำงานยังไง
เรียกต่อ: getFluidState(), isEmpty(). คืนค่า: blockState.getFluidState().isEmpty().
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean propagatesSkylightDown(BlockState blockState) {
return super.propagatesSkylightDown(blockState);
}
net.minecraft.world.level.block.BushBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/BushBlock.java:27 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
เรียกต่อ: canSurvive(), defaultBlockState().
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
ButtonBlock
- Full name:
net.minecraft.world.level.block.ButtonBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/ButtonBlock.java - Type:
class - Modifiers:
public - Extends:
FaceAttachedHorizontalDirectionalBlock
net.minecraft.world.level.block.ButtonBlock#ButtonBlock(BlockSetType,int,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/ButtonBlock.java:75 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ ButtonBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: type, ticksToStayPressed. เรียกต่อ: sound(), soundType(), registerDefaultState(), any(), setValue().
Parameters
BlockSetType blockSetTypeint iBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockSetType blockSetType = ...;
BlockBehaviour.Properties properties = ...;
ButtonBlock instance = new ButtonBlock(blockSetType, 0, properties);
net.minecraft.world.level.block.ButtonBlock#checkPressed(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/ButtonBlock.java:187 - Modifiers:
protected - Return:
void
คืออะไร
ตรวจสอบ Pressed
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canButtonBeActivatedByArrows(), getEntitiesOfClass(), getShape(), bounds(), move(), stream(), findFirst(), orElse(). สร้างออบเจ็กต์: BlockPos.
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected void checkPressed(BlockState blockState, Level level, BlockPos blockPos) {
super.checkPressed(blockState, level, blockPos);
}
net.minecraft.world.level.block.ButtonBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/ButtonBlock.java:70 - Modifiers:
public - Return:
MapCodec<ButtonBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ ButtonBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.ButtonBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/ButtonBlock.java:214 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.ButtonBlock#entityInside(BlockState,Level,BlockPos,Entity)
- Origin:
common - Source:
net/minecraft/world/level/block/ButtonBlock.java:180 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ entityInside ตาม implementation ของ ButtonBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canButtonBeActivatedByArrows(), getValue(), checkPressed().
Parameters
BlockState blockStateLevel levelBlockPos blockPosEntity entity
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Entity entity = ...;
@Override
protected void entityInside(BlockState blockState, Level level, BlockPos blockPos, Entity entity) {
super.entityInside(blockState, level, blockPos, entity);
}
net.minecraft.world.level.block.ButtonBlock#getDirectSignal(BlockState,BlockGetter,BlockPos,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/ButtonBlock.java:163 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Direct Signal
ทำงานยังไง
เรียกต่อ: getValue(), getConnectedDirection(). คืนค่า: blockState.getValue(POWERED) && getConnectedDirection(blockState) == direction ? 15 : 0.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosDirection direction
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
Direction direction = ...;
@Override
protected int getDirectSignal(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, Direction direction) {
return super.getDirectSignal(blockState, blockGetter, blockPos, direction);
}
net.minecraft.world.level.block.ButtonBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/ButtonBlock.java:82 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; แยกกรณีด้วย switch. เรียกต่อ: getValue(), getAxis(). มีจุด return อย่างน้อย 5 จุด.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.ButtonBlock#getSignal(BlockState,BlockGetter,BlockPos,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/ButtonBlock.java:158 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Signal
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: blockState.getValue(POWERED) ? 15 : 0.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosDirection direction
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
Direction direction = ...;
@Override
protected int getSignal(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, Direction direction) {
return super.getSignal(blockState, blockGetter, blockPos, direction);
}
net.minecraft.world.level.block.ButtonBlock#getSound(boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/ButtonBlock.java:143 - Modifiers:
protected - Return:
SoundEvent
คืออะไร
อ่านค่า Sound
ทำงานยังไง
เรียกต่อ: buttonClickOn(), buttonClickOff(). คืนค่า: bl ? this.type.buttonClickOn() : this.type.buttonClickOff().
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.level.block.ButtonBlock#isSignalSource(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/ButtonBlock.java:168 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Signal Source
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean isSignalSource(BlockState blockState) {
return super.isSignalSource(blockState);
}
net.minecraft.world.level.block.ButtonBlock#onExplosionHit(BlockState,ServerLevel,BlockPos,Explosion,BiConsumer<ItemStack, BlockPos>)
- Origin:
common - Source:
net/minecraft/world/level/block/ButtonBlock.java:120 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Explosion Hit
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canTriggerBlocks(), getValue(), press().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosExplosion explosionBiConsumer<ItemStack, BlockPos> biConsumer
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
Explosion explosion = ...;
BiConsumer<ItemStack, BlockPos> biConsumer = ...;
@Override
protected void onExplosionHit(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, Explosion explosion, BiConsumer<ItemStack, BlockPos> biConsumer) {
super.onExplosionHit(blockState, serverLevel, blockPos, explosion, biConsumer);
}
net.minecraft.world.level.block.ButtonBlock#onRemove(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/ButtonBlock.java:147 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Remove
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), getBlock(), getValue(), updateNeighbours().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onRemove(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onRemove(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.ButtonBlock#playSound(Player,LevelAccessor,BlockPos,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/ButtonBlock.java:139 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ playSound ตาม implementation ของ ButtonBlock
ทำงานยังไง
เรียกต่อ: getSound().
Parameters
Player playerLevelAccessor levelAccessorBlockPos blockPosboolean bl
ตัวอย่างใช้งาน
Player player = ...;
LevelAccessor levelAccessor = ...;
BlockPos blockPos = ...;
@Override
protected void playSound(Player player, LevelAccessor levelAccessor, BlockPos blockPos, boolean bl) {
super.playSound(player, levelAccessor, blockPos, bl);
}
net.minecraft.world.level.block.ButtonBlock#press(BlockState,Level,BlockPos,Player)
- Origin:
common - Source:
net/minecraft/world/level/block/ButtonBlock.java:131 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ press ตาม implementation ของ ButtonBlock
ทำงานยังไง
เรียกต่อ: setBlock(), setValue(), updateNeighbours(), scheduleTick(), playSound(), gameEvent().
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer player
ตัวอย่างใช้งาน
ButtonBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
instance.press(blockState, level, blockPos, player);
net.minecraft.world.level.block.ButtonBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/ButtonBlock.java:173 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), checkPressed().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.ButtonBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/ButtonBlock.java:110 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), press(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
CactusBlock
- Full name:
net.minecraft.world.level.block.CactusBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/CactusBlock.java - Type:
class - Modifiers:
public - Extends:
Block
net.minecraft.world.level.block.CactusBlock#CactusBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/CactusBlock.java:37 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ CactusBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CactusBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/CactusBlock.java:101 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getBlockState(), relative(), isSolid(), getFluidState(), is(), below(), above(), liquid(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.CactusBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/CactusBlock.java:32 - Modifiers:
public - Return:
MapCodec<CactusBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ CactusBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CactusBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/CactusBlock.java:119 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.CactusBlock#entityInside(BlockState,Level,BlockPos,Entity)
- Origin:
common - Source:
net/minecraft/world/level/block/CactusBlock.java:114 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ entityInside ตาม implementation ของ CactusBlock
ทำงานยังไง
เรียกต่อ: hurt(), damageSources(), cactus().
Parameters
BlockState blockStateLevel levelBlockPos blockPosEntity entity
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Entity entity = ...;
@Override
protected void entityInside(BlockState blockState, Level level, BlockPos blockPos, Entity entity) {
super.entityInside(blockState, level, blockPos, entity);
}
net.minecraft.world.level.block.CactusBlock#getCollisionShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/CactusBlock.java:73 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Collision Shape
ทำงานยังไง
คืนค่า: COLLISION_SHAPE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getCollisionShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getCollisionShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.CactusBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/CactusBlock.java:78 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
คืนค่า: OUTLINE_SHAPE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.CactusBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/CactusBlock.java:124 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.CactusBlock#randomTick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/CactusBlock.java:49 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ randomTick ตาม implementation ของ CactusBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: above(), isEmptyBlock(), getBlockState(), below(), is(), getValue(), setBlockAndUpdate(), defaultBlockState().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void randomTick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.randomTick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.CactusBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/CactusBlock.java:42 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canSurvive(), destroyBlock().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.CactusBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/CactusBlock.java:83 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canSurvive(), scheduleTick(). คืนค่า: super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource).
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
CakeBlock
- Full name:
net.minecraft.world.level.block.CakeBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/CakeBlock.java - Type:
class - Modifiers:
public - Extends:
Block
net.minecraft.world.level.block.CakeBlock#CakeBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/CakeBlock.java:54 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ CakeBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CakeBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/CakeBlock.java:131 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: getBlockState(), below(), isSolid(). คืนค่า: levelReader.getBlockState(blockPos.below()).isSolid().
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.CakeBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/CakeBlock.java:49 - Modifiers:
public - Return:
MapCodec<CakeBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ CakeBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CakeBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/CakeBlock.java:136 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.CakeBlock#eat(LevelAccessor,BlockPos,BlockState,Player)
- Origin:
common - Source:
net/minecraft/world/level/block/CakeBlock.java:96 - Modifiers:
protected static - Return:
InteractionResult
คืออะไร
ดำเนินการ eat ตาม implementation ของ CakeBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canEat(), awardStat(), getFoodData(), getValue(), gameEvent(), setBlock(), setValue(), removeBlock(). มีจุด return อย่างน้อย 2 จุด.
Parameters
LevelAccessor levelAccessorBlockPos blockPosBlockState blockStatePlayer player
ตัวอย่างใช้งาน
LevelAccessor levelAccessor = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
Player player = ...;
@Override
protected InteractionResult eat(LevelAccessor levelAccessor, BlockPos blockPos, BlockState blockState, Player player) {
return super.eat(levelAccessor, blockPos, blockState, player);
}
net.minecraft.world.level.block.CakeBlock#getAnalogOutputSignal(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/CakeBlock.java:141 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Analog Output Signal
ทำงานยังไง
เรียกต่อ: getOutputSignal(), getValue(). คืนค่า: getOutputSignal(blockState.getValue(BITES)).
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected int getAnalogOutputSignal(BlockState blockState, Level level, BlockPos blockPos) {
return super.getAnalogOutputSignal(blockState, level, blockPos);
}
net.minecraft.world.level.block.CakeBlock#getOutputSignal(int)
- Origin:
common - Source:
net/minecraft/world/level/block/CakeBlock.java:146 - Modifiers:
public static - Return:
int
คืออะไร
อ่านค่า Output Signal
ทำงานยังไง
คืนค่า: (7 - i) * 2.
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CakeBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/CakeBlock.java:59 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: SHAPE_BY_BITE[blockState.getValue(BITES)].
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.CakeBlock#hasAnalogOutputSignal(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CakeBlock.java:150 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Analog Output Signal
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean hasAnalogOutputSignal(BlockState blockState) {
return super.hasAnalogOutputSignal(blockState);
}
net.minecraft.world.level.block.CakeBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/CakeBlock.java:155 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.CakeBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/CakeBlock.java:115 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
เรียกต่อ: canSurvive(), defaultBlockState().
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
net.minecraft.world.level.block.CakeBlock#useItemOn(ItemStack,BlockState,Level,BlockPos,Player,InteractionHand,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/CakeBlock.java:64 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Item On
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getItem(), is(), getValue(), byItem(), consume(), playSound(), setBlockAndUpdate(), byCandle(). มีจุด return อย่างน้อย 2 จุด.
Parameters
ItemStack itemStackBlockState blockStateLevel levelBlockPos blockPosPlayer playerInteractionHand interactionHandBlockHitResult blockHitResult
ตัวอย่างใช้งาน
ItemStack itemStack = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
InteractionHand interactionHand = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useItemOn(ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult) {
return super.useItemOn(itemStack, blockState, level, blockPos, player, interactionHand, blockHitResult);
}
net.minecraft.world.level.block.CakeBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/CakeBlock.java:81 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: eat(), consumesAction(), getItemInHand(), isEmpty(). มีจุด return อย่างน้อย 3 จุด.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
CalibratedSculkSensorBlock
- Full name:
net.minecraft.world.level.block.CalibratedSculkSensorBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/CalibratedSculkSensorBlock.java - Type:
class - Modifiers:
public - Extends:
SculkSensorBlock
net.minecraft.world.level.block.CalibratedSculkSensorBlock#CalibratedSculkSensorBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/CalibratedSculkSensorBlock.java:30 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ CalibratedSculkSensorBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), defaultBlockState(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
CalibratedSculkSensorBlock instance = new CalibratedSculkSensorBlock(properties);
net.minecraft.world.level.block.CalibratedSculkSensorBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/CalibratedSculkSensorBlock.java:25 - Modifiers:
public - Return:
MapCodec<CalibratedSculkSensorBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ CalibratedSculkSensorBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
CalibratedSculkSensorBlock instance = ...;
MapCodec<CalibratedSculkSensorBlock> result = instance.codec();
net.minecraft.world.level.block.CalibratedSculkSensorBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/CalibratedSculkSensorBlock.java:66 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.CalibratedSculkSensorBlock#getActiveTicks()
- Origin:
common - Source:
net/minecraft/world/level/block/CalibratedSculkSensorBlock.java:82 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Active Ticks
ทำงานยังไง
คืนค่า: 10.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CalibratedSculkSensorBlock#getSignal(BlockState,BlockGetter,BlockPos,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/CalibratedSculkSensorBlock.java:61 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Signal
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: direction != blockState.getValue(FACING) ? super.getSignal(blockState, blockGetter, blockPos, direction) : 0.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosDirection direction
ตัวอย่างใช้งาน
CalibratedSculkSensorBlock instance = ...;
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
Direction direction = ...;
int result = instance.getSignal(blockState, blockGetter, blockPos, direction);
net.minecraft.world.level.block.CalibratedSculkSensorBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/CalibratedSculkSensorBlock.java:55 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: setValue(), getHorizontalDirection(). คืนค่า: super.getStateForPlacement(blockPlaceContext).setValue(FACING, blockPlaceContext.getHorizontalDirection()).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
CalibratedSculkSensorBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.CalibratedSculkSensorBlock#getTicker(Level,BlockState,BlockEntityType<T>)
- Origin:
common - Source:
net/minecraft/world/level/block/CalibratedSculkSensorBlock.java:41 - Modifiers:
public - Return:
BlockEntityTicker<T>
คืออะไร
อ่านค่า Ticker
ทำงานยังไง
เรียกต่อ: createTickerHelper(), tick(), getVibrationData(), getVibrationUser().
Parameters
Level levelBlockState blockStateBlockEntityType<T> blockEntityType
ตัวอย่างใช้งาน
CalibratedSculkSensorBlock instance = ...;
Level level = ...;
BlockState blockState = ...;
BlockEntityType<T> blockEntityType = ...;
BlockEntityTicker<T> result = instance.getTicker(level, blockState, blockEntityType);
net.minecraft.world.level.block.CalibratedSculkSensorBlock#mirror(BlockState,Mirror)
- Origin:
common - Source:
net/minecraft/world/level/block/CalibratedSculkSensorBlock.java:77 - Modifiers:
public - Return:
BlockState
คืออะไร
ดำเนินการ mirror ตาม implementation ของ CalibratedSculkSensorBlock
ทำงานยังไง
เรียกต่อ: rotate(), getRotation(), getValue(). คืนค่า: blockState.rotate(mirror.getRotation(blockState.getValue(FACING))).
Parameters
BlockState blockStateMirror mirror
ตัวอย่างใช้งาน
CalibratedSculkSensorBlock instance = ...;
BlockState blockState = ...;
Mirror mirror = ...;
BlockState result = instance.mirror(blockState, mirror);
net.minecraft.world.level.block.CalibratedSculkSensorBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CalibratedSculkSensorBlock.java:35 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ CalibratedSculkSensorBlock
ทำงานยังไง
สร้างออบเจ็กต์: CalibratedSculkSensorBlockEntity. คืนค่า: new CalibratedSculkSensorBlockEntity(blockPos, blockState).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
CalibratedSculkSensorBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
net.minecraft.world.level.block.CalibratedSculkSensorBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/CalibratedSculkSensorBlock.java:72 - Modifiers:
public - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
เรียกต่อ: setValue(), getValue(). คืนค่า: blockState.setValue(FACING, rotation.rotate(blockState.getValue(FACING))).
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
CalibratedSculkSensorBlock instance = ...;
BlockState blockState = ...;
Rotation rotation = ...;
BlockState result = instance.rotate(blockState, rotation);
CampfireBlock
- Full name:
net.minecraft.world.level.block.CampfireBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/CampfireBlock.java - Type:
class - Modifiers:
public - Extends:
BaseEntityBlock - Implements:
SimpleWaterloggedBlock
net.minecraft.world.level.block.CampfireBlock#animateTick(BlockState,Level,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/CampfireBlock.java:171 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ animateTick ตาม implementation ของ CampfireBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getValue(), nextInt(), playLocalSound(), getX(), getY(), getZ(), nextFloat(), addParticle().
Parameters
BlockState blockStateLevel levelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
CampfireBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
instance.animateTick(blockState, level, blockPos, randomSource);
net.minecraft.world.level.block.CampfireBlock#CampfireBlock(boolean,int,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/CampfireBlock.java:80 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ CampfireBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: spawnParticles, fireDamage. เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
boolean blint iBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
CampfireBlock instance = new CampfireBlock(true, 0, properties);
net.minecraft.world.level.block.CampfireBlock#canLight(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CampfireBlock.java:347 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Light
ทำงานยังไง
เรียกต่อ: is(), hasProperty(), getValue().
Parameters
BlockState blockState
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CampfireBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/CampfireBlock.java:75 - Modifiers:
public - Return:
MapCodec<CampfireBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ CampfireBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CampfireBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/CampfireBlock.java:313 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.CampfireBlock#dowse(Entity,LevelAccessor,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CampfireBlock.java:203 - Modifiers:
public static - Return:
void
คืออะไร
ดำเนินการ dowse ตาม implementation ของ CampfireBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: isClientSide(), makeParticles(), getValue(), getBlockEntity(), gameEvent().
Parameters
Entity entityLevelAccessor levelAccessorBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
Entity entity = ...;
LevelAccessor levelAccessor = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
CampfireBlock.dowse(entity, levelAccessor, blockPos, blockState);
net.minecraft.world.level.block.CampfireBlock#entityInside(BlockState,Level,BlockPos,Entity)
- Origin:
common - Source:
net/minecraft/world/level/block/CampfireBlock.java:108 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ entityInside ตาม implementation ของ CampfireBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), hurt(), damageSources(), campfire().
Parameters
BlockState blockStateLevel levelBlockPos blockPosEntity entity
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Entity entity = ...;
@Override
protected void entityInside(BlockState blockState, Level level, BlockPos blockPos, Entity entity) {
super.entityInside(blockState, level, blockPos, entity);
}
net.minecraft.world.level.block.CampfireBlock#getFluidState(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CampfireBlock.java:298 - Modifiers:
protected - Return:
FluidState
คืออะไร
อ่านค่า Fluid State
ทำงานยังไง
เรียกต่อ: getValue(), getSource(). คืนค่า: blockState.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(blockState).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected FluidState getFluidState(BlockState blockState) {
return super.getFluidState(blockState);
}
net.minecraft.world.level.block.CampfireBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/CampfireBlock.java:166 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
คืนค่า: SHAPE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.CampfireBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/CampfireBlock.java:129 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: getLevel(), getClickedPos(), getFluidState(), getType(), defaultBlockState(), setValue(), isSmokeSource(), getBlockState().
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
CampfireBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.CampfireBlock#getTicker(Level,BlockState,BlockEntityType<T>)
- Origin:
common - Source:
net/minecraft/world/level/block/CampfireBlock.java:323 - Modifiers:
public - Return:
BlockEntityTicker<T>
คืออะไร
อ่านค่า Ticker
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), createCheck(), createTickerHelper(), cookTick(). มีจุด return อย่างน้อย 2 จุด.
Parameters
Level levelBlockState blockStateBlockEntityType<T> blockEntityType
ตัวอย่างใช้งาน
CampfireBlock instance = ...;
Level level = ...;
BlockState blockState = ...;
BlockEntityType<T> blockEntityType = ...;
BlockEntityTicker<T> result = instance.getTicker(level, blockState, blockEntityType);
net.minecraft.world.level.block.CampfireBlock#isLitCampfire(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CampfireBlock.java:294 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Lit Campfire
ทำงานยังไง
เรียกต่อ: hasProperty(), is(), getValue(). คืนค่า: blockState.hasProperty(LIT) && blockState.is(BlockTags.CAMPFIRES) && blockState.getValue(LIT).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CampfireBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/CampfireBlock.java:342 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.CampfireBlock#isSmokeyPos(Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/CampfireBlock.java:276 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Smokey Pos
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: below(), getBlockState(), isLitCampfire(), joinIsNotEmpty(), getCollisionShape(), empty(). มีจุด return อย่างน้อย 3 จุด.
Parameters
Level levelBlockPos blockPos
ตัวอย่างใช้งาน
Level level = ...;
BlockPos blockPos = ...;
boolean result = CampfireBlock.isSmokeyPos(level, blockPos);
net.minecraft.world.level.block.CampfireBlock#makeParticles(Level,BlockPos,boolean,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/CampfireBlock.java:250 - Modifiers:
public static - Return:
void
คืออะไร
สร้าง Particles
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getRandom(), addAlwaysVisibleParticle(), getX(), nextDouble(), nextBoolean(), getY(), getZ(), addParticle().
Parameters
Level levelBlockPos blockPosboolean blboolean bl2
ตัวอย่างใช้งาน
Level level = ...;
BlockPos blockPos = ...;
CampfireBlock.makeParticles(level, blockPos, true, true);
net.minecraft.world.level.block.CampfireBlock#mirror(BlockState,Mirror)
- Origin:
common - Source:
net/minecraft/world/level/block/CampfireBlock.java:308 - Modifiers:
protected - Return:
BlockState
คืออะไร
ดำเนินการ mirror ตาม implementation ของ CampfireBlock
ทำงานยังไง
เรียกต่อ: rotate(), getRotation(), getValue(). คืนค่า: blockState.rotate(mirror.getRotation(blockState.getValue(FACING))).
Parameters
BlockState blockStateMirror mirror
ตัวอย่างใช้งาน
BlockState blockState = ...;
Mirror mirror = ...;
@Override
protected BlockState mirror(BlockState blockState, Mirror mirror) {
return super.mirror(blockState, mirror);
}
net.minecraft.world.level.block.CampfireBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CampfireBlock.java:318 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ CampfireBlock
ทำงานยังไง
สร้างออบเจ็กต์: CampfireBlockEntity. คืนค่า: new CampfireBlockEntity(blockPos, blockState).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
CampfireBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
net.minecraft.world.level.block.CampfireBlock#onProjectileHit(Level,BlockState,BlockHitResult,Projectile)
- Origin:
common - Source:
net/minecraft/world/level/block/CampfireBlock.java:238 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Projectile Hit
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockPos(), isOnFire(), mayInteract(), getValue(), setBlock(), setValue().
Parameters
Level levelBlockState blockStateBlockHitResult blockHitResultProjectile projectile
ตัวอย่างใช้งาน
Level level = ...;
BlockState blockState = ...;
BlockHitResult blockHitResult = ...;
Projectile projectile = ...;
@Override
protected void onProjectileHit(Level level, BlockState blockState, BlockHitResult blockHitResult, Projectile projectile) {
super.onProjectileHit(level, blockState, blockHitResult, projectile);
}
net.minecraft.world.level.block.CampfireBlock#onRemove(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/CampfireBlock.java:117 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Remove
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), getBlock(), getBlockEntity(), dropContents(), getItems().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onRemove(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onRemove(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.CampfireBlock#placeLiquid(LevelAccessor,BlockPos,BlockState,FluidState)
- Origin:
common - Source:
net/minecraft/world/level/block/CampfireBlock.java:218 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ placeLiquid ตาม implementation ของ CampfireBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), getType(), isClientSide(), playSound(), dowse(), setBlock(), setValue(), scheduleTick(). มีจุด return อย่างน้อย 2 จุด.
Parameters
LevelAccessor levelAccessorBlockPos blockPosBlockState blockStateFluidState fluidState
ตัวอย่างใช้งาน
CampfireBlock instance = ...;
LevelAccessor levelAccessor = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
FluidState fluidState = ...;
boolean result = instance.placeLiquid(levelAccessor, blockPos, blockState, fluidState);
net.minecraft.world.level.block.CampfireBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/CampfireBlock.java:303 - Modifiers:
protected - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
เรียกต่อ: setValue(), getValue(). คืนค่า: blockState.setValue(FACING, rotation.rotate(blockState.getValue(FACING))).
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
BlockState blockState = ...;
Rotation rotation = ...;
@Override
protected BlockState rotate(BlockState blockState, Rotation rotation) {
return super.rotate(blockState, rotation);
}
net.minecraft.world.level.block.CampfireBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/CampfireBlock.java:142 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), scheduleTick(), getTickDelay(), setValue(), isSmokeSource().
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
net.minecraft.world.level.block.CampfireBlock#useItemOn(ItemStack,BlockState,Level,BlockPos,Player,InteractionHand,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/CampfireBlock.java:89 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Item On
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity(), getItemInHand(), recipeAccess(), propertySet(), test(), placeFood(), awardStat(). มีจุด return อย่างน้อย 3 จุด.
Parameters
ItemStack itemStackBlockState blockStateLevel levelBlockPos blockPosPlayer playerInteractionHand interactionHandBlockHitResult blockHitResult
ตัวอย่างใช้งาน
ItemStack itemStack = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
InteractionHand interactionHand = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useItemOn(ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult) {
return super.useItemOn(itemStack, blockState, level, blockPos, player, interactionHand, blockHitResult);
}
CandleBlock
- Full name:
net.minecraft.world.level.block.CandleBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/CandleBlock.java - Type:
class - Modifiers:
public - Extends:
AbstractCandleBlock - Implements:
SimpleWaterloggedBlock
net.minecraft.world.level.block.CandleBlock#canBeLit(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CandleBlock.java:172 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Be Lit
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: !blockState.getValue(WATERLOGGED) && super.canBeLit(blockState).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean canBeLit(BlockState blockState) {
return super.canBeLit(blockState);
}
net.minecraft.world.level.block.CandleBlock#canBeReplaced(BlockState,BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/CandleBlock.java:82 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Be Replaced
ทำงานยังไง
เรียกต่อ: isSecondaryUseActive(), getItemInHand(), getItem(), asItem(), getValue().
Parameters
BlockState blockStateBlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockPlaceContext blockPlaceContext = ...;
@Override
protected boolean canBeReplaced(BlockState blockState, BlockPlaceContext blockPlaceContext) {
return super.canBeReplaced(blockState, blockPlaceContext);
}
net.minecraft.world.level.block.CandleBlock#CandleBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/CandleBlock.java:65 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ CandleBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CandleBlock#canLight(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CandleBlock.java:161 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Light
ทำงานยังไง
เรียกต่อ: is(), hasProperty(), getValue().
Parameters
BlockState blockState
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CandleBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/CandleBlock.java:177 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: canSupportCenter(), below(). คืนค่า: Block.canSupportCenter(levelReader, blockPos.below(), Direction.UP).
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.CandleBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/CandleBlock.java:60 - Modifiers:
public - Return:
MapCodec<CandleBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ CandleBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CandleBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/CandleBlock.java:139 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.CandleBlock#getFluidState(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CandleBlock.java:119 - Modifiers:
protected - Return:
FluidState
คืออะไร
อ่านค่า Fluid State
ทำงานยังไง
เรียกต่อ: getValue(), getSource(). คืนค่า: blockState.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(blockState).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected FluidState getFluidState(BlockState blockState) {
return super.getFluidState(blockState);
}
net.minecraft.world.level.block.CandleBlock#getParticleOffsets(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CandleBlock.java:167 - Modifiers:
protected - Return:
Iterable<Vec3>
คืออะไร
อ่านค่า Particle Offsets
ทำงานยังไง
เรียกต่อ: get(), getValue(), intValue(). คืนค่า: PARTICLE_OFFSETS.get(blockState.getValue(CANDLES).intValue()).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected Iterable<Vec3> getParticleOffsets(BlockState blockState) {
return super.getParticleOffsets(blockState);
}
net.minecraft.world.level.block.CandleBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/CandleBlock.java:124 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
แยกกรณีด้วย switch. เรียกต่อ: getValue(). มีจุด return อย่างน้อย 4 จุด.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.CandleBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/CandleBlock.java:89 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getLevel(), getBlockState(), getClickedPos(), is(), cycle(), getFluidState(), getType(), setValue(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
CandleBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.CandleBlock#placeLiquid(LevelAccessor,BlockPos,BlockState,FluidState)
- Origin:
common - Source:
net/minecraft/world/level/block/CandleBlock.java:144 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ placeLiquid ตาม implementation ของ CandleBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), getType(), setValue(), extinguish(), setBlock(), scheduleTick(), getTickDelay(). มีจุด return อย่างน้อย 2 จุด.
Parameters
LevelAccessor levelAccessorBlockPos blockPosBlockState blockStateFluidState fluidState
ตัวอย่างใช้งาน
CandleBlock instance = ...;
LevelAccessor levelAccessor = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
FluidState fluidState = ...;
boolean result = instance.placeLiquid(levelAccessor, blockPos, blockState, fluidState);
net.minecraft.world.level.block.CandleBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/CandleBlock.java:101 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), scheduleTick(), getTickDelay(). คืนค่า: super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource).
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
net.minecraft.world.level.block.CandleBlock#useItemOn(ItemStack,BlockState,Level,BlockPos,Player,InteractionHand,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/CandleBlock.java:70 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Item On
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isEmpty(), getAbilities(), getValue(), extinguish(). มีจุด return อย่างน้อย 2 จุด.
Parameters
ItemStack itemStackBlockState blockStateLevel levelBlockPos blockPosPlayer playerInteractionHand interactionHandBlockHitResult blockHitResult
ตัวอย่างใช้งาน
ItemStack itemStack = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
InteractionHand interactionHand = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useItemOn(ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult) {
return super.useItemOn(itemStack, blockState, level, blockPos, player, interactionHand, blockHitResult);
}
CandleCakeBlock
- Full name:
net.minecraft.world.level.block.CandleCakeBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/CandleCakeBlock.java - Type:
class - Modifiers:
public - Extends:
AbstractCandleBlock
net.minecraft.world.level.block.CandleCakeBlock#byCandle(CandleBlock)
- Origin:
common - Source:
net/minecraft/world/level/block/CandleCakeBlock.java:149 - Modifiers:
public static - Return:
BlockState
คืออะไร
ดำเนินการ byCandle ตาม implementation ของ CandleCakeBlock
ทำงานยังไง
เรียกต่อ: get(), defaultBlockState(). คืนค่า: BY_CANDLE.get(candleBlock).defaultBlockState().
Parameters
CandleBlock candleBlock
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CandleCakeBlock#CandleCakeBlock(Block,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/CandleCakeBlock.java:54 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ CandleCakeBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: candleBlock. เรียกต่อ: registerDefaultState(), any(), setValue(), put(), getClass(). สร้างออบเจ็กต์: IllegalArgumentException.
Parameters
Block blockBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
Block block = ...;
BlockBehaviour.Properties properties = ...;
CandleCakeBlock instance = new CandleCakeBlock(block, properties);
net.minecraft.world.level.block.CandleCakeBlock#canLight(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CandleCakeBlock.java:153 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Light
ทำงานยังไง
เรียกต่อ: is(), hasProperty(), getValue(). คืนค่า: blockState.is(BlockTags.CANDLE_CAKES, blockStateBase -> blockStateBase.hasProperty(LIT) && !blockState.getValue(LIT)).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CandleCakeBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/CandleCakeBlock.java:129 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: getBlockState(), below(), isSolid(). คืนค่า: levelReader.getBlockState(blockPos.below()).isSolid().
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.CandleCakeBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/CandleCakeBlock.java:49 - Modifiers:
public - Return:
MapCodec<CandleCakeBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ CandleCakeBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CandleCakeBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/CandleCakeBlock.java:103 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.CandleCakeBlock#getAnalogOutputSignal(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/CandleCakeBlock.java:134 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Analog Output Signal
ทำงานยังไง
คืนค่า: CakeBlock.FULL_CAKE_SIGNAL.
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected int getAnalogOutputSignal(BlockState blockState, Level level, BlockPos blockPos) {
return super.getAnalogOutputSignal(blockState, level, blockPos);
}
net.minecraft.world.level.block.CandleCakeBlock#getCloneItemStack(LevelReader,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/CandleCakeBlock.java:108 - Modifiers:
protected - Return:
ItemStack
คืออะไร
อ่านค่า Clone Item Stack
ทำงานยังไง
สร้างออบเจ็กต์: ItemStack. คืนค่า: new ItemStack(Blocks.CAKE).
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockStateboolean bl
ตัวอย่างใช้งาน
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected ItemStack getCloneItemStack(LevelReader levelReader, BlockPos blockPos, BlockState blockState, boolean bl) {
return super.getCloneItemStack(levelReader, blockPos, blockState, bl);
}
net.minecraft.world.level.block.CandleCakeBlock#getParticleOffsets(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CandleCakeBlock.java:65 - Modifiers:
protected - Return:
Iterable<Vec3>
คืออะไร
อ่านค่า Particle Offsets
ทำงานยังไง
คืนค่า: PARTICLE_OFFSETS.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected Iterable<Vec3> getParticleOffsets(BlockState blockState) {
return super.getParticleOffsets(blockState);
}
net.minecraft.world.level.block.CandleCakeBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/CandleCakeBlock.java:70 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
คืนค่า: SHAPE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.CandleCakeBlock#hasAnalogOutputSignal(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CandleCakeBlock.java:139 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Analog Output Signal
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean hasAnalogOutputSignal(BlockState blockState) {
return super.hasAnalogOutputSignal(blockState);
}
net.minecraft.world.level.block.CandleCakeBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/CandleCakeBlock.java:144 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.CandleCakeBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/CandleCakeBlock.java:113 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
เรียกต่อ: canSurvive(), defaultBlockState().
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
net.minecraft.world.level.block.CandleCakeBlock#useItemOn(ItemStack,BlockState,Level,BlockPos,Player,InteractionHand,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/CandleCakeBlock.java:75 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Item On
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), candleHit(), isEmpty(), getValue(), extinguish(). มีจุด return อย่างน้อย 3 จุด.
Parameters
ItemStack itemStackBlockState blockStateLevel levelBlockPos blockPosPlayer playerInteractionHand interactionHandBlockHitResult blockHitResult
ตัวอย่างใช้งาน
ItemStack itemStack = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
InteractionHand interactionHand = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useItemOn(ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult) {
return super.useItemOn(itemStack, blockState, level, blockPos, player, interactionHand, blockHitResult);
}
net.minecraft.world.level.block.CandleCakeBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/CandleCakeBlock.java:89 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: eat(), defaultBlockState(), consumesAction(), dropResources(). คืนค่า: interactionResult.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
CarpetBlock
- Full name:
net.minecraft.world.level.block.CarpetBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/CarpetBlock.java - Type:
class - Modifiers:
public - Extends:
Block
net.minecraft.world.level.block.CarpetBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/CarpetBlock.java:49 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: isEmptyBlock(), below(). คืนค่า: !levelReader.isEmptyBlock(blockPos.below()).
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.CarpetBlock#CarpetBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/CarpetBlock.java:24 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ CarpetBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CarpetBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/CarpetBlock.java:19 - Modifiers:
public - Return:
MapCodec<? extends CarpetBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ CarpetBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CarpetBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/CarpetBlock.java:28 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
คืนค่า: SHAPE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.CarpetBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/CarpetBlock.java:33 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
เรียกต่อ: canSurvive(), defaultBlockState().
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
CarrotBlock
- Full name:
net.minecraft.world.level.block.CarrotBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/CarrotBlock.java - Type:
class - Modifiers:
public - Extends:
CropBlock
net.minecraft.world.level.block.CarrotBlock#CarrotBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/CarrotBlock.java:31 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ CarrotBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CarrotBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/CarrotBlock.java:26 - Modifiers:
public - Return:
MapCodec<CarrotBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ CarrotBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CarrotBlock#getBaseSeedId()
- Origin:
common - Source:
net/minecraft/world/level/block/CarrotBlock.java:35 - Modifiers:
protected - Return:
ItemLike
คืออะไร
อ่านค่า Base Seed Id
ทำงานยังไง
คืนค่า: Items.CARROT.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CarrotBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/CarrotBlock.java:40 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
เรียกต่อ: getAge(). คืนค่า: SHAPE_BY_AGE[this.getAge(blockState)].
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
CartographyTableBlock
- Full name:
net.minecraft.world.level.block.CartographyTableBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/CartographyTableBlock.java - Type:
class - Modifiers:
public - Extends:
Block
net.minecraft.world.level.block.CartographyTableBlock#CartographyTableBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/CartographyTableBlock.java:28 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ CartographyTableBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
CartographyTableBlock instance = new CartographyTableBlock(properties);
net.minecraft.world.level.block.CartographyTableBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/CartographyTableBlock.java:23 - Modifiers:
public - Return:
MapCodec<CartographyTableBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ CartographyTableBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CartographyTableBlock#getMenuProvider(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/CartographyTableBlock.java:42 - Modifiers:
protected - Return:
MenuProvider
คืออะไร
อ่านค่า Menu Provider
ทำงานยังไง
เรียกต่อ: create(). สร้างออบเจ็กต์: SimpleMenuProvider, CartographyTableMenu. คืนค่า: new SimpleMenuProvider((i, inventory, player) -> new CartographyTableMenu(i, inventory, ContainerLevelAccess.create(level, blockPos)), CONTAINER_TITLE).
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected MenuProvider getMenuProvider(BlockState blockState, Level level, BlockPos blockPos) {
return super.getMenuProvider(blockState, level, blockPos);
}
net.minecraft.world.level.block.CartographyTableBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/CartographyTableBlock.java:32 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: openMenu(), getMenuProvider(), awardStat(). คืนค่า: InteractionResult.SUCCESS.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
CarvedPumpkinBlock
- Full name:
net.minecraft.world.level.block.CarvedPumpkinBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/CarvedPumpkinBlock.java - Type:
class - Modifiers:
public - Extends:
HorizontalDirectionalBlock
net.minecraft.world.level.block.CarvedPumpkinBlock#canSpawnGolem(LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/CarvedPumpkinBlock.java:58 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Spawn Golem
ทำงานยังไง
เรียกต่อ: getOrCreateSnowGolemBase(), find(), getOrCreateIronGolemBase(). คืนค่า: this.getOrCreateSnowGolemBase().find(levelReader, blockPos) != null || this.getOrCreateIronGolemBase().find(levelReader, blockPos) != null.
Parameters
LevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
CarvedPumpkinBlock instance = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
boolean result = instance.canSpawnGolem(levelReader, blockPos);
net.minecraft.world.level.block.CarvedPumpkinBlock#CarvedPumpkinBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/CarvedPumpkinBlock.java:46 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ CarvedPumpkinBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
CarvedPumpkinBlock instance = new CarvedPumpkinBlock(properties);
net.minecraft.world.level.block.CarvedPumpkinBlock#clearPatternBlocks(Level,BlockPattern.BlockPatternMatch)
- Origin:
common - Source:
net/minecraft/world/level/block/CarvedPumpkinBlock.java:93 - Modifiers:
public static - Return:
void
คืออะไร
ล้าง Pattern Blocks
ทำงานยังไง
มีการวนลูป. เรียกต่อ: getWidth(), getHeight(), getBlock(), setBlock(), getPos(), defaultBlockState(), levelEvent(), getId().
Parameters
Level levelBlockPattern.BlockPatternMatch blockPatternMatch
ตัวอย่างใช้งาน
Level level = ...;
BlockPattern.BlockPatternMatch blockPatternMatch = ...;
CarvedPumpkinBlock.clearPatternBlocks(level, blockPatternMatch);
net.minecraft.world.level.block.CarvedPumpkinBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/CarvedPumpkinBlock.java:41 - Modifiers:
public - Return:
MapCodec<? extends CarvedPumpkinBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ CarvedPumpkinBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
CarvedPumpkinBlock instance = ...;
MapCodec<? extends CarvedPumpkinBlock> result = instance.codec();
net.minecraft.world.level.block.CarvedPumpkinBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/CarvedPumpkinBlock.java:117 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.CarvedPumpkinBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/CarvedPumpkinBlock.java:112 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: defaultBlockState(), setValue(), getHorizontalDirection(), getOpposite(). คืนค่า: this.defaultBlockState().setValue(FACING, blockPlaceContext.getHorizontalDirection().getOpposite()).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
CarvedPumpkinBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.CarvedPumpkinBlock#onPlace(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/CarvedPumpkinBlock.java:51 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Place
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), getBlock(), trySpawnGolem().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onPlace(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onPlace(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.CarvedPumpkinBlock#updatePatternBlocks(Level,BlockPattern.BlockPatternMatch)
- Origin:
common - Source:
net/minecraft/world/level/block/CarvedPumpkinBlock.java:103 - Modifiers:
public static - Return:
void
คืออะไร
อัปเดต Pattern Blocks
ทำงานยังไง
มีการวนลูป. เรียกต่อ: getWidth(), getHeight(), getBlock(), blockUpdated(), getPos().
Parameters
Level levelBlockPattern.BlockPatternMatch blockPatternMatch
ตัวอย่างใช้งาน
Level level = ...;
BlockPattern.BlockPatternMatch blockPatternMatch = ...;
CarvedPumpkinBlock.updatePatternBlocks(level, blockPatternMatch);
CauldronBlock
- Full name:
net.minecraft.world.level.block.CauldronBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/CauldronBlock.java - Type:
class - Modifiers:
public - Extends:
AbstractCauldronBlock
net.minecraft.world.level.block.CauldronBlock#canReceiveStalactiteDrip(Fluid)
- Origin:
common - Source:
net/minecraft/world/level/block/CauldronBlock.java:54 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Receive Stalactite Drip
ทำงานยังไง
คืนค่า: true.
Parameters
Fluid fluid
ตัวอย่างใช้งาน
Fluid fluid = ...;
@Override
protected boolean canReceiveStalactiteDrip(Fluid fluid) {
return super.canReceiveStalactiteDrip(fluid);
}
net.minecraft.world.level.block.CauldronBlock#CauldronBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/CauldronBlock.java:24 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ CauldronBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CauldronBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/CauldronBlock.java:19 - Modifiers:
public - Return:
MapCodec<CauldronBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ CauldronBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CauldronBlock#handlePrecipitation(BlockState,Level,BlockPos,Biome.Precipitation)
- Origin:
common - Source:
net/minecraft/world/level/block/CauldronBlock.java:41 - Modifiers:
public - Return:
void
คืออะไร
จัดการ Precipitation
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: shouldHandlePrecipitation(), setBlockAndUpdate(), defaultBlockState(), gameEvent().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBiome.Precipitation precipitation
ตัวอย่างใช้งาน
CauldronBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Biome.Precipitation precipitation = ...;
instance.handlePrecipitation(blockState, level, blockPos, precipitation);
net.minecraft.world.level.block.CauldronBlock#isFull(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CauldronBlock.java:28 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Full
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
CauldronBlock instance = ...;
BlockState blockState = ...;
boolean result = instance.isFull(blockState);
net.minecraft.world.level.block.CauldronBlock#receiveStalactiteDrip(BlockState,Level,BlockPos,Fluid)
- Origin:
common - Source:
net/minecraft/world/level/block/CauldronBlock.java:59 - Modifiers:
protected - Return:
void
คืออะไร
รับ Stalactite Drip
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: defaultBlockState(), setBlockAndUpdate(), gameEvent(), of(), levelEvent().
Parameters
BlockState blockStateLevel levelBlockPos blockPosFluid fluid
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Fluid fluid = ...;
@Override
protected void receiveStalactiteDrip(BlockState blockState, Level level, BlockPos blockPos, Fluid fluid) {
super.receiveStalactiteDrip(blockState, level, blockPos, fluid);
}
net.minecraft.world.level.block.CauldronBlock#shouldHandlePrecipitation(Level,Biome.Precipitation)
- Origin:
common - Source:
net/minecraft/world/level/block/CauldronBlock.java:33 - Modifiers:
protected static - Return:
boolean
คืออะไร
ตรวจสอบว่าควร Handle Precipitation
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getRandom(), nextFloat(). มีจุด return อย่างน้อย 2 จุด.
Parameters
Level levelBiome.Precipitation precipitation
ตัวอย่างใช้งาน
Level level = ...;
Biome.Precipitation precipitation = ...;
@Override
protected boolean shouldHandlePrecipitation(Level level, Biome.Precipitation precipitation) {
return super.shouldHandlePrecipitation(level, precipitation);
}
CaveVines
- Full name:
net.minecraft.world.level.block.CaveVines - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/CaveVines.java - Type:
interface - Modifiers:
public
net.minecraft.world.level.block.CaveVines#emission(int)
- Origin:
common - Source:
net/minecraft/world/level/block/CaveVines.java:43 - Modifiers:
static - Return:
ToIntFunction<BlockState>
คืออะไร
ดำเนินการ emission ตาม implementation ของ CaveVines
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: blockState -> blockState.getValue(BlockStateProperties.BERRIES) ? i : 0.
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CaveVines#hasGlowBerries(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CaveVines.java:39 - Modifiers:
static - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Glow Berries
ทำงานยังไง
เรียกต่อ: hasProperty(), getValue(). คืนค่า: blockState.hasProperty(BERRIES) && blockState.getValue(BERRIES).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CaveVines#use(Entity,BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/CaveVines.java:25 - Modifiers:
static - Return:
InteractionResult
คืออะไร
ใช้งาน use
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), popResource(), randomBetween(), playSound(), setValue(), setBlock(), gameEvent(), of(). สร้างออบเจ็กต์: ItemStack. มีจุด return อย่างน้อย 2 จุด.
Parameters
Entity entityBlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
Entity entity = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
InteractionResult result = CaveVines.use(entity, blockState, level, blockPos);
CaveVinesBlock
- Full name:
net.minecraft.world.level.block.CaveVinesBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/CaveVinesBlock.java - Type:
class - Modifiers:
public - Extends:
GrowingPlantHeadBlock - Implements:
CaveVines
net.minecraft.world.level.block.CaveVinesBlock#canGrowInto(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CaveVinesBlock.java:38 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Grow Into
ทำงานยังไง
เรียกต่อ: isAir(). คืนค่า: blockState.isAir().
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean canGrowInto(BlockState blockState) {
return super.canGrowInto(blockState);
}
net.minecraft.world.level.block.CaveVinesBlock#CaveVinesBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/CaveVinesBlock.java:28 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ CaveVinesBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
CaveVinesBlock instance = new CaveVinesBlock(properties);
net.minecraft.world.level.block.CaveVinesBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/CaveVinesBlock.java:23 - Modifiers:
public - Return:
MapCodec<CaveVinesBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ CaveVinesBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CaveVinesBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/CaveVinesBlock.java:68 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.CaveVinesBlock#getBlocksToGrowWhenBonemealed(RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/CaveVinesBlock.java:33 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Blocks To Grow When Bonemealed
ทำงานยังไง
คืนค่า: 1.
Parameters
RandomSource randomSource
ตัวอย่างใช้งาน
RandomSource randomSource = ...;
@Override
protected int getBlocksToGrowWhenBonemealed(RandomSource randomSource) {
return super.getBlocksToGrowWhenBonemealed(randomSource);
}
net.minecraft.world.level.block.CaveVinesBlock#getBodyBlock()
- Origin:
common - Source:
net/minecraft/world/level/block/CaveVinesBlock.java:43 - Modifiers:
protected - Return:
Block
คืออะไร
อ่านค่า Body Block
ทำงานยังไง
คืนค่า: Blocks.CAVE_VINES_PLANT.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CaveVinesBlock#getCloneItemStack(LevelReader,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/CaveVinesBlock.java:58 - Modifiers:
protected - Return:
ItemStack
คืออะไร
อ่านค่า Clone Item Stack
ทำงานยังไง
สร้างออบเจ็กต์: ItemStack. คืนค่า: new ItemStack(Items.GLOW_BERRIES).
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockStateboolean bl
ตัวอย่างใช้งาน
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected ItemStack getCloneItemStack(LevelReader levelReader, BlockPos blockPos, BlockState blockState, boolean bl) {
return super.getCloneItemStack(levelReader, blockPos, blockState, bl);
}
net.minecraft.world.level.block.CaveVinesBlock#getGrowIntoState(BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/CaveVinesBlock.java:53 - Modifiers:
protected - Return:
BlockState
คืออะไร
อ่านค่า Grow Into State
ทำงานยังไง
เรียกต่อ: setValue(), nextFloat(). คืนค่า: super.getGrowIntoState(blockState, randomSource).setValue(BERRIES, randomSource.nextFloat() < 0.11F).
Parameters
BlockState blockStateRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
RandomSource randomSource = ...;
@Override
protected BlockState getGrowIntoState(BlockState blockState, RandomSource randomSource) {
return super.getGrowIntoState(blockState, randomSource);
}
net.minecraft.world.level.block.CaveVinesBlock#isBonemealSuccess(Level,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CaveVinesBlock.java:79 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Bonemeal Success
ทำงานยังไง
คืนค่า: true.
Parameters
Level levelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
CaveVinesBlock instance = ...;
Level level = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isBonemealSuccess(level, randomSource, blockPos, blockState);
net.minecraft.world.level.block.CaveVinesBlock#isValidBonemealTarget(LevelReader,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CaveVinesBlock.java:74 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Valid Bonemeal Target
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: !blockState.getValue(BERRIES).
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
CaveVinesBlock instance = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isValidBonemealTarget(levelReader, blockPos, blockState);
net.minecraft.world.level.block.CaveVinesBlock#performBonemeal(ServerLevel,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CaveVinesBlock.java:84 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ performBonemeal ตาม implementation ของ CaveVinesBlock
ทำงานยังไง
เรียกต่อ: setBlock(), setValue().
Parameters
ServerLevel serverLevelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
CaveVinesBlock instance = ...;
ServerLevel serverLevel = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
instance.performBonemeal(serverLevel, randomSource, blockPos, blockState);
net.minecraft.world.level.block.CaveVinesBlock#updateBodyAfterConvertedFromHead(BlockState,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CaveVinesBlock.java:48 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Body After Converted From Head
ทำงานยังไง
เรียกต่อ: setValue(), getValue(). คืนค่า: blockState2.setValue(BERRIES, blockState.getValue(BERRIES)).
Parameters
BlockState blockStateBlockState blockState2
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockState blockState2 = ...;
@Override
protected BlockState updateBodyAfterConvertedFromHead(BlockState blockState, BlockState blockState2) {
return super.updateBodyAfterConvertedFromHead(blockState, blockState2);
}
net.minecraft.world.level.block.CaveVinesBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/CaveVinesBlock.java:63 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
เรียกต่อ: use(). คืนค่า: CaveVines.use(player, blockState, level, blockPos).
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
CaveVinesPlantBlock
- Full name:
net.minecraft.world.level.block.CaveVinesPlantBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/CaveVinesPlantBlock.java - Type:
class - Modifiers:
public - Extends:
GrowingPlantBodyBlock - Implements:
CaveVines
net.minecraft.world.level.block.CaveVinesPlantBlock#CaveVinesPlantBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/CaveVinesPlantBlock.java:27 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ CaveVinesPlantBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
CaveVinesPlantBlock instance = new CaveVinesPlantBlock(properties);
net.minecraft.world.level.block.CaveVinesPlantBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/CaveVinesPlantBlock.java:22 - Modifiers:
public - Return:
MapCodec<CaveVinesPlantBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ CaveVinesPlantBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CaveVinesPlantBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/CaveVinesPlantBlock.java:52 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.CaveVinesPlantBlock#getCloneItemStack(LevelReader,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/CaveVinesPlantBlock.java:42 - Modifiers:
protected - Return:
ItemStack
คืออะไร
อ่านค่า Clone Item Stack
ทำงานยังไง
สร้างออบเจ็กต์: ItemStack. คืนค่า: new ItemStack(Items.GLOW_BERRIES).
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockStateboolean bl
ตัวอย่างใช้งาน
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected ItemStack getCloneItemStack(LevelReader levelReader, BlockPos blockPos, BlockState blockState, boolean bl) {
return super.getCloneItemStack(levelReader, blockPos, blockState, bl);
}
net.minecraft.world.level.block.CaveVinesPlantBlock#getHeadBlock()
- Origin:
common - Source:
net/minecraft/world/level/block/CaveVinesPlantBlock.java:32 - Modifiers:
protected - Return:
GrowingPlantHeadBlock
คืออะไร
อ่านค่า Head Block
ทำงานยังไง
คืนค่า: (GrowingPlantHeadBlock)Blocks.CAVE_VINES.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CaveVinesPlantBlock#isBonemealSuccess(Level,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CaveVinesPlantBlock.java:62 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Bonemeal Success
ทำงานยังไง
คืนค่า: true.
Parameters
Level levelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
CaveVinesPlantBlock instance = ...;
Level level = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isBonemealSuccess(level, randomSource, blockPos, blockState);
net.minecraft.world.level.block.CaveVinesPlantBlock#isValidBonemealTarget(LevelReader,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CaveVinesPlantBlock.java:57 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Valid Bonemeal Target
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: !blockState.getValue(BERRIES).
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
CaveVinesPlantBlock instance = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isValidBonemealTarget(levelReader, blockPos, blockState);
net.minecraft.world.level.block.CaveVinesPlantBlock#performBonemeal(ServerLevel,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CaveVinesPlantBlock.java:67 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ performBonemeal ตาม implementation ของ CaveVinesPlantBlock
ทำงานยังไง
เรียกต่อ: setBlock(), setValue().
Parameters
ServerLevel serverLevelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
CaveVinesPlantBlock instance = ...;
ServerLevel serverLevel = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
instance.performBonemeal(serverLevel, randomSource, blockPos, blockState);
net.minecraft.world.level.block.CaveVinesPlantBlock#updateHeadAfterConvertedFromBody(BlockState,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CaveVinesPlantBlock.java:37 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Head After Converted From Body
ทำงานยังไง
เรียกต่อ: setValue(), getValue(). คืนค่า: blockState2.setValue(BERRIES, blockState.getValue(BERRIES)).
Parameters
BlockState blockStateBlockState blockState2
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockState blockState2 = ...;
@Override
protected BlockState updateHeadAfterConvertedFromBody(BlockState blockState, BlockState blockState2) {
return super.updateHeadAfterConvertedFromBody(blockState, blockState2);
}
net.minecraft.world.level.block.CaveVinesPlantBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/CaveVinesPlantBlock.java:47 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
เรียกต่อ: use(). คืนค่า: CaveVines.use(player, blockState, level, blockPos).
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
CeilingHangingSignBlock
- Full name:
net.minecraft.world.level.block.CeilingHangingSignBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/CeilingHangingSignBlock.java - Type:
class - Modifiers:
public - Extends:
SignBlock
net.minecraft.world.level.block.CeilingHangingSignBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/CeilingHangingSignBlock.java:90 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: getBlockState(), above(), isFaceSturdy(). คืนค่า: levelReader.getBlockState(blockPos.above()).isFaceSturdy(levelReader, blockPos.above(), Direction.DOWN, SupportType.CENTER).
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.CeilingHangingSignBlock#CeilingHangingSignBlock(WoodType,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/CeilingHangingSignBlock.java:69 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ CeilingHangingSignBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: sound(), hangingSignSoundType(), registerDefaultState(), any(), setValue().
Parameters
WoodType woodTypeBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
WoodType woodType = ...;
BlockBehaviour.Properties properties = ...;
CeilingHangingSignBlock instance = new CeilingHangingSignBlock(woodType, properties);
net.minecraft.world.level.block.CeilingHangingSignBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/CeilingHangingSignBlock.java:64 - Modifiers:
public - Return:
MapCodec<CeilingHangingSignBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ CeilingHangingSignBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
CeilingHangingSignBlock instance = ...;
MapCodec<CeilingHangingSignBlock> result = instance.codec();
net.minecraft.world.level.block.CeilingHangingSignBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/CeilingHangingSignBlock.java:164 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.CeilingHangingSignBlock#getBlockSupportShape(BlockState,BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/CeilingHangingSignBlock.java:128 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Block Support Shape
ทำงานยังไง
เรียกต่อ: getShape(), empty(). คืนค่า: this.getShape(blockState, blockGetter, blockPos, CollisionContext.empty()).
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
@Override
protected VoxelShape getBlockSupportShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos) {
return super.getBlockSupportShape(blockState, blockGetter, blockPos);
}
net.minecraft.world.level.block.CeilingHangingSignBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/CeilingHangingSignBlock.java:122 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
เรียกต่อ: get(), getValue(). คืนค่า: voxelShape == null ? SHAPE : voxelShape.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.CeilingHangingSignBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/CeilingHangingSignBlock.java:95 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getLevel(), getFluidState(), getClickedPos(), above(), getBlockState(), is(), fromYRot(), getRotation(). คืนค่า: this.defaultBlockState().setValue(ATTACHED, bl2).setValue(ROTATION, i).setValue(WATERLOGGED, fluidState.getType() == Fluids.WATER).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
CeilingHangingSignBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.CeilingHangingSignBlock#getTicker(Level,BlockState,BlockEntityType<T>)
- Origin:
common - Source:
net/minecraft/world/level/block/CeilingHangingSignBlock.java:174 - Modifiers:
public - Return:
BlockEntityTicker<T>
คืออะไร
อ่านค่า Ticker
ทำงานยังไง
เรียกต่อ: createTickerHelper(). คืนค่า: createTickerHelper(blockEntityType, BlockEntityType.HANGING_SIGN, SignBlockEntity::tick).
Parameters
Level levelBlockState blockStateBlockEntityType<T> blockEntityType
ตัวอย่างใช้งาน
CeilingHangingSignBlock instance = ...;
Level level = ...;
BlockState blockState = ...;
BlockEntityType<T> blockEntityType = ...;
BlockEntityTicker<T> result = instance.getTicker(level, blockState, blockEntityType);
net.minecraft.world.level.block.CeilingHangingSignBlock#getYRotationDegrees(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CeilingHangingSignBlock.java:149 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า YRotation Degrees
ทำงานยังไง
เรียกต่อ: convertToDegrees(), getValue(). คืนค่า: RotationSegment.convertToDegrees(blockState.getValue(ROTATION)).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
CeilingHangingSignBlock instance = ...;
BlockState blockState = ...;
float result = instance.getYRotationDegrees(blockState);
net.minecraft.world.level.block.CeilingHangingSignBlock#mirror(BlockState,Mirror)
- Origin:
common - Source:
net/minecraft/world/level/block/CeilingHangingSignBlock.java:159 - Modifiers:
protected - Return:
BlockState
คืออะไร
ดำเนินการ mirror ตาม implementation ของ CeilingHangingSignBlock
ทำงานยังไง
เรียกต่อ: setValue(), getValue(). คืนค่า: blockState.setValue(ROTATION, mirror.mirror(blockState.getValue(ROTATION), 16)).
Parameters
BlockState blockStateMirror mirror
ตัวอย่างใช้งาน
BlockState blockState = ...;
Mirror mirror = ...;
@Override
protected BlockState mirror(BlockState blockState, Mirror mirror) {
return super.mirror(blockState, mirror);
}
net.minecraft.world.level.block.CeilingHangingSignBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CeilingHangingSignBlock.java:169 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ CeilingHangingSignBlock
ทำงานยังไง
สร้างออบเจ็กต์: HangingSignBlockEntity. คืนค่า: new HangingSignBlockEntity(blockPos, blockState).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
CeilingHangingSignBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
net.minecraft.world.level.block.CeilingHangingSignBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/CeilingHangingSignBlock.java:154 - Modifiers:
protected - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
เรียกต่อ: setValue(), getValue(). คืนค่า: blockState.setValue(ROTATION, rotation.rotate(blockState.getValue(ROTATION), 16)).
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
BlockState blockState = ...;
Rotation rotation = ...;
@Override
protected BlockState rotate(BlockState blockState, Rotation rotation) {
return super.rotate(blockState, rotation);
}
net.minecraft.world.level.block.CeilingHangingSignBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/CeilingHangingSignBlock.java:133 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
เรียกต่อ: canSurvive(), defaultBlockState().
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
net.minecraft.world.level.block.CeilingHangingSignBlock#useItemOn(ItemStack,BlockState,Level,BlockPos,Player,InteractionHand,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/CeilingHangingSignBlock.java:74 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Item On
ทำงานยังไง
เรียกต่อ: getBlockEntity(), shouldTryToChainAnotherHangingSign().
Parameters
ItemStack itemStackBlockState blockStateLevel levelBlockPos blockPosPlayer playerInteractionHand interactionHandBlockHitResult blockHitResult
ตัวอย่างใช้งาน
ItemStack itemStack = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
InteractionHand interactionHand = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useItemOn(ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult) {
return super.useItemOn(itemStack, blockState, level, blockPos, player, interactionHand, blockHitResult);
}
ChainBlock
- Full name:
net.minecraft.world.level.block.ChainBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/ChainBlock.java - Type:
class - Modifiers:
public - Extends:
RotatedPillarBlock - Implements:
SimpleWaterloggedBlock
net.minecraft.world.level.block.ChainBlock#ChainBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/ChainBlock.java:37 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ ChainBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.ChainBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/ChainBlock.java:32 - Modifiers:
public - Return:
MapCodec<ChainBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ ChainBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.ChainBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/ChainBlock.java:81 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.ChainBlock#getFluidState(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/ChainBlock.java:86 - Modifiers:
protected - Return:
FluidState
คืออะไร
อ่านค่า Fluid State
ทำงานยังไง
เรียกต่อ: getValue(), getSource(). คืนค่า: blockState.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(blockState).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected FluidState getFluidState(BlockState blockState) {
return super.getFluidState(blockState);
}
net.minecraft.world.level.block.ChainBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/ChainBlock.java:42 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
แยกกรณีด้วย switch. เรียกต่อ: getValue(). มีจุด return อย่างน้อย 3 จุด.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.ChainBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/ChainBlock.java:55 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: getLevel(), getFluidState(), getClickedPos(), getType(), setValue(). คืนค่า: super.getStateForPlacement(blockPlaceContext).setValue(WATERLOGGED, bl).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
ChainBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.ChainBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/ChainBlock.java:91 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.ChainBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/ChainBlock.java:63 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), scheduleTick(), getTickDelay(). คืนค่า: super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource).
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
ChangeOverTimeBlock
- Full name:
net.minecraft.world.level.block.ChangeOverTimeBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/ChangeOverTimeBlock.java - Type:
interface - Modifiers:
public
net.minecraft.world.level.block.ChangeOverTimeBlock#changeOverTime(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/ChangeOverTimeBlock.java:16 - Modifiers:
default - Return:
void
คืออะไร
ดำเนินการ changeOverTime ตาม implementation ของ ChangeOverTimeBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: nextFloat(), getNextState(), ifPresent(), setBlockAndUpdate().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
ChangeOverTimeBlock instance = ...;
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
instance.changeOverTime(blockState, serverLevel, blockPos, randomSource);
net.minecraft.world.level.block.ChangeOverTimeBlock#getAge()
- Origin:
common - Source:
net/minecraft/world/level/block/ChangeOverTimeBlock.java:23 - Modifiers: ``
- Return:
T
คืออะไร
อ่านค่า Age
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.ChangeOverTimeBlock#getChanceModifier()
- Origin:
common - Source:
net/minecraft/world/level/block/ChangeOverTimeBlock.java:14 - Modifiers: ``
- Return:
float
คืออะไร
อ่านค่า Chance Modifier
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.ChangeOverTimeBlock#getNext(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/ChangeOverTimeBlock.java:12 - Modifiers: ``
- Return:
Optional<BlockState>
คืออะไร
อ่านค่า Next
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
BlockState blockState
ตัวอย่างใช้งาน
ChangeOverTimeBlock instance = ...;
BlockState blockState = ...;
Optional<BlockState> result = instance.getNext(blockState);
net.minecraft.world.level.block.ChangeOverTimeBlock#getNextState(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/ChangeOverTimeBlock.java:25 - Modifiers:
default - Return:
Optional<BlockState>
คืออะไร
อ่านค่า Next State
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getAge(), ordinal(), withinManhattan(), distManhattan(), equals(), getBlockState(), getBlock(), getClass(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
ChangeOverTimeBlock instance = ...;
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
Optional<BlockState> result = instance.getNextState(blockState, serverLevel, blockPos, randomSource);
ChestBlock
- Full name:
net.minecraft.world.level.block.ChestBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/ChestBlock.java - Type:
class - Modifiers:
public - Extends:
AbstractChestBlock<ChestBlockEntity> - Implements:
SimpleWaterloggedBlock
net.minecraft.world.level.block.ChestBlock#blockEntityType()
- Origin:
common - Source:
net/minecraft/world/level/block/ChestBlock.java:251 - Modifiers:
public - Return:
BlockEntityType<? extends ChestBlockEntity>
คืออะไร
ดำเนินการ blockEntityType ตาม implementation ของ ChestBlock
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: this.blockEntityType.get().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
ChestBlock instance = ...;
BlockEntityType<? extends ChestBlockEntity> result = instance.blockEntityType();
net.minecraft.world.level.block.ChestBlock#ChestBlock(Supplier<BlockEntityType<? extends ChestBlockEntity>>,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/ChestBlock.java:122 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ ChestBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
Supplier<BlockEntityType<? extends ChestBlockEntity>> supplierBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
Supplier<BlockEntityType<? extends ChestBlockEntity>> supplier = ...;
BlockBehaviour.Properties properties = ...;
ChestBlock instance = new ChestBlock(supplier, properties);
net.minecraft.world.level.block.ChestBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/ChestBlock.java:117 - Modifiers:
public - Return:
MapCodec<? extends ChestBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ ChestBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.ChestBlock#combine(BlockState,Level,BlockPos,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/ChestBlock.java:260 - Modifiers:
public - Return:
DoubleBlockCombiner.NeighborCombineResult<? extends ChestBlockEntity>
คืออะไร
ดำเนินการ combine ตาม implementation ของ ChestBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: combineWithNeigbour(), get().
Parameters
BlockState blockStateLevel levelBlockPos blockPosboolean bl
ตัวอย่างใช้งาน
ChestBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
DoubleBlockCombiner.NeighborCombineResult<? extends ChestBlockEntity> result = instance.combine(blockState, level, blockPos, true);
net.minecraft.world.level.block.ChestBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/ChestBlock.java:351 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.ChestBlock#getAnalogOutputSignal(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/ChestBlock.java:336 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Analog Output Signal
ทำงานยังไง
เรียกต่อ: getRedstoneSignalFromContainer(), getContainer(). คืนค่า: AbstractContainerMenu.getRedstoneSignalFromContainer(getContainer(this, blockState, level, blockPos, false)).
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected int getAnalogOutputSignal(BlockState blockState, Level level, BlockPos blockPos) {
return super.getAnalogOutputSignal(blockState, level, blockPos);
}
net.minecraft.world.level.block.ChestBlock#getBlockType(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/ChestBlock.java:127 - Modifiers:
public static - Return:
DoubleBlockCombiner.BlockType
คืออะไร
อ่านค่า Block Type
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
DoubleBlockCombiner.BlockType result = ChestBlock.getBlockType(blockState);
net.minecraft.world.level.block.ChestBlock#getConnectedDirection(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/ChestBlock.java:185 - Modifiers:
public static - Return:
Direction
คืออะไร
อ่านค่า Connected Direction
ทำงานยังไง
เรียกต่อ: getValue(), getClockWise(), getCounterClockWise(). คืนค่า: blockState.getValue(TYPE) == ChestType.LEFT ? direction.getClockWise() : direction.getCounterClockWise().
Parameters
BlockState blockState
ตัวอย่างใช้งาน
net.minecraft.world.level.block.ChestBlock#getContainer(ChestBlock,BlockState,Level,BlockPos,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/ChestBlock.java:255 - Modifiers:
public static - Return:
Container
คืออะไร
อ่านค่า Container
ทำงานยังไง
เรียกต่อ: combine(), apply(), orElse(). คืนค่า: chestBlock.combine(blockState, level, blockPos, bl).apply(CHEST_COMBINER).orElse(null).
Parameters
ChestBlock chestBlockBlockState blockStateLevel levelBlockPos blockPosboolean bl
ตัวอย่างใช้งาน
ChestBlock chestBlock = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Container result = ChestBlock.getContainer(chestBlock, blockState, level, blockPos, true);
net.minecraft.world.level.block.ChestBlock#getFluidState(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/ChestBlock.java:216 - Modifiers:
protected - Return:
FluidState
คืออะไร
อ่านค่า Fluid State
ทำงานยังไง
เรียกต่อ: getValue(), getSource(). คืนค่า: blockState.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(blockState).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected FluidState getFluidState(BlockState blockState) {
return super.getFluidState(blockState);
}
net.minecraft.world.level.block.ChestBlock#getMenuProvider(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/ChestBlock.java:274 - Modifiers:
protected - Return:
MenuProvider
คืออะไร
อ่านค่า Menu Provider
ทำงานยังไง
เรียกต่อ: combine(), apply(), orElse(). คืนค่า: this.combine(blockState, level, blockPos, false).apply(MENU_PROVIDER_COMBINER).orElse(null).
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected MenuProvider getMenuProvider(BlockState blockState, Level level, BlockPos blockPos) {
return super.getMenuProvider(blockState, level, blockPos);
}
net.minecraft.world.level.block.ChestBlock#getOpenChestStat()
- Origin:
common - Source:
net/minecraft/world/level/block/ChestBlock.java:247 - Modifiers:
protected - Return:
Stat<ResourceLocation>
คืออะไร
อ่านค่า Open Chest Stat
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: Stats.CUSTOM.get(Stats.OPEN_CHEST).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.ChestBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/ChestBlock.java:166 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; แยกกรณีด้วย switch. เรียกต่อ: getValue(), getConnectedDirection(). มีจุด return อย่างน้อย 5 จุด.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.ChestBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/ChestBlock.java:190 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getHorizontalDirection(), getOpposite(), getLevel(), getFluidState(), getClickedPos(), isSecondaryUseActive(), getClickedFace(), getAxis(). คืนค่า: this.defaultBlockState().setValue(FACING, direction).setValue(TYPE, chestType).setValue(WATERLOGGED, fluidState.getType() == Fluids.WATER).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
ChestBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.ChestBlock#getTicker(Level,BlockState,BlockEntityType<T>)
- Origin:
common - Source:
net/minecraft/world/level/block/ChestBlock.java:301 - Modifiers:
public - Return:
BlockEntityTicker<T>
คืออะไร
อ่านค่า Ticker
ทำงานยังไง
เรียกต่อ: createTickerHelper(), blockEntityType(). คืนค่า: level.isClientSide ? createTickerHelper(blockEntityType, this.blockEntityType(), ChestBlockEntity::lidAnimateTick) : null.
Parameters
Level levelBlockState blockStateBlockEntityType<T> blockEntityType
ตัวอย่างใช้งาน
ChestBlock instance = ...;
Level level = ...;
BlockState blockState = ...;
BlockEntityType<T> blockEntityType = ...;
BlockEntityTicker<T> result = instance.getTicker(level, blockState, blockEntityType);
net.minecraft.world.level.block.ChestBlock#hasAnalogOutputSignal(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/ChestBlock.java:331 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Analog Output Signal
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean hasAnalogOutputSignal(BlockState blockState) {
return super.hasAnalogOutputSignal(blockState);
}
net.minecraft.world.level.block.ChestBlock#isChestBlockedAt(LevelAccessor,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/ChestBlock.java:307 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Chest Blocked At
ทำงานยังไง
เรียกต่อ: isBlockedChestByBlock(), isCatSittingOnChest(). คืนค่า: isBlockedChestByBlock(levelAccessor, blockPos) || isCatSittingOnChest(levelAccessor, blockPos).
Parameters
LevelAccessor levelAccessorBlockPos blockPos
ตัวอย่างใช้งาน
LevelAccessor levelAccessor = ...;
BlockPos blockPos = ...;
boolean result = ChestBlock.isChestBlockedAt(levelAccessor, blockPos);
net.minecraft.world.level.block.ChestBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/ChestBlock.java:356 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.ChestBlock#mirror(BlockState,Mirror)
- Origin:
common - Source:
net/minecraft/world/level/block/ChestBlock.java:346 - Modifiers:
protected - Return:
BlockState
คืออะไร
ดำเนินการ mirror ตาม implementation ของ ChestBlock
ทำงานยังไง
เรียกต่อ: rotate(), getRotation(), getValue(). คืนค่า: blockState.rotate(mirror.getRotation(blockState.getValue(FACING))).
Parameters
BlockState blockStateMirror mirror
ตัวอย่างใช้งาน
BlockState blockState = ...;
Mirror mirror = ...;
@Override
protected BlockState mirror(BlockState blockState, Mirror mirror) {
return super.mirror(blockState, mirror);
}
net.minecraft.world.level.block.ChestBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/ChestBlock.java:296 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ ChestBlock
ทำงานยังไง
สร้างออบเจ็กต์: ChestBlockEntity. คืนค่า: new ChestBlockEntity(blockPos, blockState).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
ChestBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
net.minecraft.world.level.block.ChestBlock#onRemove(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/ChestBlock.java:227 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Remove
ทำงานยังไง
เรียกต่อ: dropContentsOnDestroy().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onRemove(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onRemove(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.ChestBlock#opennessCombiner(LidBlockEntity)
- Origin:
common - Source:
net/minecraft/world/level/block/ChestBlock.java:280 - Modifiers:
public static - Return:
DoubleBlockCombiner.Combiner<ChestBlockEntity, Float2FloatFunction>
คืออะไร
ดำเนินการ opennessCombiner ตาม implementation ของ ChestBlock
ทำงานยังไง
เรียกต่อ: acceptDouble(), max(), getOpenNess(), acceptSingle(), acceptNone(). มีจุด return อย่างน้อย 3 จุด.
Parameters
LidBlockEntity lidBlockEntity
ตัวอย่างใช้งาน
LidBlockEntity lidBlockEntity = ...;
DoubleBlockCombiner.Combiner<ChestBlockEntity, Float2FloatFunction> result = ChestBlock.opennessCombiner(lidBlockEntity);
net.minecraft.world.level.block.ChestBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/ChestBlock.java:341 - Modifiers:
protected - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
เรียกต่อ: setValue(), getValue(). คืนค่า: blockState.setValue(FACING, rotation.rotate(blockState.getValue(FACING))).
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
BlockState blockState = ...;
Rotation rotation = ...;
@Override
protected BlockState rotate(BlockState blockState, Rotation rotation) {
return super.rotate(blockState, rotation);
}
net.minecraft.world.level.block.ChestBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/ChestBlock.java:361 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity(), recheckOpen().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.ChestBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/ChestBlock.java:136 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), scheduleTick(), getTickDelay(), is(), getAxis(), isHorizontal(), getConnectedDirection(), getOpposite(). มีจุด return อย่างน้อย 3 จุด.
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
net.minecraft.world.level.block.ChestBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/ChestBlock.java:233 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getMenuProvider(), openMenu(), awardStat(), getOpenChestStat(), angerNearbyPiglins(). คืนค่า: InteractionResult.SUCCESS.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
ChiseledBookShelfBlock
- Full name:
net.minecraft.world.level.block.ChiseledBookShelfBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/ChiseledBookShelfBlock.java - Type:
class - Modifiers:
public - Extends:
BaseEntityBlock
net.minecraft.world.level.block.ChiseledBookShelfBlock#ChiseledBookShelfBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/ChiseledBookShelfBlock.java:53 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ ChiseledBookShelfBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
มีการวนลูป. เรียกต่อ: any(), setValue(), registerDefaultState().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
ChiseledBookShelfBlock instance = new ChiseledBookShelfBlock(properties);
net.minecraft.world.level.block.ChiseledBookShelfBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/ChiseledBookShelfBlock.java:48 - Modifiers:
public - Return:
MapCodec<ChiseledBookShelfBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ ChiseledBookShelfBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.ChiseledBookShelfBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/ChiseledBookShelfBlock.java:178 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add(), forEach().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.ChiseledBookShelfBlock#getAnalogOutputSignal(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/ChiseledBookShelfBlock.java:229 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Analog Output Signal
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isClientSide(), getBlockEntity(), getLastInteractedSlot(). คืนค่า: 0.
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected int getAnalogOutputSignal(BlockState blockState, Level level, BlockPos blockPos) {
return super.getAnalogOutputSignal(blockState, level, blockPos);
}
net.minecraft.world.level.block.ChiseledBookShelfBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/ChiseledBookShelfBlock.java:209 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: defaultBlockState(), setValue(), getHorizontalDirection(), getOpposite(). คืนค่า: this.defaultBlockState().setValue(HorizontalDirectionalBlock.FACING, blockPlaceContext.getHorizontalDirection().getOpposite()).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
ChiseledBookShelfBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.ChiseledBookShelfBlock#hasAnalogOutputSignal(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/ChiseledBookShelfBlock.java:224 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Analog Output Signal
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean hasAnalogOutputSignal(BlockState blockState) {
return super.hasAnalogOutputSignal(blockState);
}
net.minecraft.world.level.block.ChiseledBookShelfBlock#mirror(BlockState,Mirror)
- Origin:
common - Source:
net/minecraft/world/level/block/ChiseledBookShelfBlock.java:219 - Modifiers:
public - Return:
BlockState
คืออะไร
ดำเนินการ mirror ตาม implementation ของ ChiseledBookShelfBlock
ทำงานยังไง
เรียกต่อ: rotate(), getRotation(), getValue(). คืนค่า: blockState.rotate(mirror.getRotation(blockState.getValue(HorizontalDirectionalBlock.FACING))).
Parameters
BlockState blockStateMirror mirror
ตัวอย่างใช้งาน
ChiseledBookShelfBlock instance = ...;
BlockState blockState = ...;
Mirror mirror = ...;
BlockState result = instance.mirror(blockState, mirror);
net.minecraft.world.level.block.ChiseledBookShelfBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/ChiseledBookShelfBlock.java:172 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ ChiseledBookShelfBlock
ทำงานยังไง
สร้างออบเจ็กต์: ChiseledBookShelfBlockEntity. คืนค่า: new ChiseledBookShelfBlockEntity(blockPos, blockState).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
ChiseledBookShelfBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
net.minecraft.world.level.block.ChiseledBookShelfBlock#onRemove(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/ChiseledBookShelfBlock.java:184 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Remove
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: is(), getBlock(), getBlockEntity(), isEmpty(), getItem(), dropItemStack(), getX(), getY().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onRemove(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onRemove(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.ChiseledBookShelfBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/ChiseledBookShelfBlock.java:214 - Modifiers:
public - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
เรียกต่อ: setValue(), getValue(). คืนค่า: blockState.setValue(HorizontalDirectionalBlock.FACING, rotation.rotate(blockState.getValue(HorizontalDirectionalBlock.FACING))).
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
ChiseledBookShelfBlock instance = ...;
BlockState blockState = ...;
Rotation rotation = ...;
BlockState result = instance.rotate(blockState, rotation);
net.minecraft.world.level.block.ChiseledBookShelfBlock#useItemOn(ItemStack,BlockState,Level,BlockPos,Player,InteractionHand,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/ChiseledBookShelfBlock.java:64 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Item On
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity(), is(), getHitSlot(), isEmpty(), getValue(), get(), getAsInt(), addBook(). มีจุด return อย่างน้อย 5 จุด.
Parameters
ItemStack itemStackBlockState blockStateLevel levelBlockPos blockPosPlayer playerInteractionHand interactionHandBlockHitResult blockHitResult
ตัวอย่างใช้งาน
ItemStack itemStack = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
InteractionHand interactionHand = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useItemOn(ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult) {
return super.useItemOn(itemStack, blockState, level, blockPos, player, interactionHand, blockHitResult);
}
net.minecraft.world.level.block.ChiseledBookShelfBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/ChiseledBookShelfBlock.java:89 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity(), getHitSlot(), isEmpty(), getValue(), get(), getAsInt(), removeBook(). มีจุด return อย่างน้อย 4 จุด.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
ChorusFlowerBlock
- Full name:
net.minecraft.world.level.block.ChorusFlowerBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/ChorusFlowerBlock.java - Type:
class - Modifiers:
public - Extends:
Block
net.minecraft.world.level.block.ChorusFlowerBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/ChorusFlowerBlock.java:168 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getBlockState(), below(), is(), isAir(), relative(). มีจุด return อย่างน้อย 5 จุด.
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.ChorusFlowerBlock#ChorusFlowerBlock(Block,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/ChorusFlowerBlock.java:40 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ ChorusFlowerBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: plant. เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
Block blockBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
Block block = ...;
BlockBehaviour.Properties properties = ...;
ChorusFlowerBlock instance = new ChorusFlowerBlock(block, properties);
net.minecraft.world.level.block.ChorusFlowerBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/ChorusFlowerBlock.java:35 - Modifiers:
public - Return:
MapCodec<ChorusFlowerBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ ChorusFlowerBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.ChorusFlowerBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/ChorusFlowerBlock.java:197 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.ChorusFlowerBlock#generatePlant(LevelAccessor,BlockPos,RandomSource,int)
- Origin:
common - Source:
net/minecraft/world/level/block/ChorusFlowerBlock.java:202 - Modifiers:
public static - Return:
void
คืออะไร
ดำเนินการ generatePlant ตาม implementation ของ ChorusFlowerBlock
ทำงานยังไง
เรียกต่อ: setBlock(), getStateWithConnections(), defaultBlockState(), growTreeRecursive().
Parameters
LevelAccessor levelAccessorBlockPos blockPosRandomSource randomSourceint i
ตัวอย่างใช้งาน
LevelAccessor levelAccessor = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
ChorusFlowerBlock.generatePlant(levelAccessor, blockPos, randomSource, 0);
net.minecraft.world.level.block.ChorusFlowerBlock#getBlockSupportShape(BlockState,BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/ChorusFlowerBlock.java:58 - Modifiers:
public - Return:
VoxelShape
คืออะไร
อ่านค่า Block Support Shape
ทำงานยังไง
คืนค่า: BLOCK_SUPPORT_SHAPE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
ChorusFlowerBlock instance = ...;
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
VoxelShape result = instance.getBlockSupportShape(blockState, blockGetter, blockPos);
net.minecraft.world.level.block.ChorusFlowerBlock#isRandomlyTicking(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/ChorusFlowerBlock.java:53 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Randomly Ticking
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: blockState.getValue(AGE) < 5.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean isRandomlyTicking(BlockState blockState) {
return super.isRandomlyTicking(blockState);
}
net.minecraft.world.level.block.ChorusFlowerBlock#onProjectileHit(Level,BlockState,BlockHitResult,Projectile)
- Origin:
common - Source:
net/minecraft/world/level/block/ChorusFlowerBlock.java:256 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Projectile Hit
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockPos(), mayInteract(), mayBreak(), destroyBlock().
Parameters
Level levelBlockState blockStateBlockHitResult blockHitResultProjectile projectile
ตัวอย่างใช้งาน
Level level = ...;
BlockState blockState = ...;
BlockHitResult blockHitResult = ...;
Projectile projectile = ...;
@Override
protected void onProjectileHit(Level level, BlockState blockState, BlockHitResult blockHitResult, Projectile projectile) {
super.onProjectileHit(level, blockState, blockHitResult, projectile);
}
net.minecraft.world.level.block.ChorusFlowerBlock#randomTick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/ChorusFlowerBlock.java:63 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ randomTick ตาม implementation ของ ChorusFlowerBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: above(), isEmptyBlock(), getY(), getMaxY(), getValue(), getBlockState(), below(), is().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void randomTick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.randomTick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.ChorusFlowerBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/ChorusFlowerBlock.java:46 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canSurvive(), destroyBlock().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.ChorusFlowerBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/ChorusFlowerBlock.java:150 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canSurvive(), scheduleTick(). คืนค่า: super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource).
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
ChorusPlantBlock
- Full name:
net.minecraft.world.level.block.ChorusPlantBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/ChorusPlantBlock.java - Type:
class - Modifiers:
public - Extends:
PipeBlock
net.minecraft.world.level.block.ChorusPlantBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/ChorusPlantBlock.java:87 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getBlockState(), below(), above(), isAir(), relative(), is(). มีจุด return อย่างน้อย 3 จุด.
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.ChorusPlantBlock#ChorusPlantBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/ChorusPlantBlock.java:25 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ ChorusPlantBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
ChorusPlantBlock instance = new ChorusPlantBlock(properties);
net.minecraft.world.level.block.ChorusPlantBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/ChorusPlantBlock.java:20 - Modifiers:
public - Return:
MapCodec<ChorusPlantBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ ChorusPlantBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.ChorusPlantBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/ChorusPlantBlock.java:110 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.ChorusPlantBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/ChorusPlantBlock.java:39 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: getStateWithConnections(), getLevel(), getClickedPos(), defaultBlockState(). คืนค่า: getStateWithConnections(blockPlaceContext.getLevel(), blockPlaceContext.getClickedPos(), this.defaultBlockState()).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
ChorusPlantBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.ChorusPlantBlock#getStateWithConnections(BlockGetter,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/ChorusPlantBlock.java:44 - Modifiers:
public static - Return:
BlockState
คืออะไร
อ่านค่า State With Connections
ทำงานยังไง
เรียกต่อ: getBlockState(), below(), above(), north(), east(), south(), west(), getBlock().
Parameters
BlockGetter blockGetterBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockState result = ChorusPlantBlock.getStateWithConnections(blockGetter, blockPos, blockState);
net.minecraft.world.level.block.ChorusPlantBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/ChorusPlantBlock.java:115 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.ChorusPlantBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/ChorusPlantBlock.java:80 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canSurvive(), destroyBlock().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.ChorusPlantBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/ChorusPlantBlock.java:60 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canSurvive(), scheduleTick(), is(), setValue(), get(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
CocoaBlock
- Full name:
net.minecraft.world.level.block.CocoaBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/CocoaBlock.java - Type:
class - Modifiers:
public - Extends:
HorizontalDirectionalBlock - Implements:
BonemealableBlock
net.minecraft.world.level.block.CocoaBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/CocoaBlock.java:75 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: getBlockState(), relative(), getValue(), is(). คืนค่า: blockState2.is(BlockTags.JUNGLE_LOGS).
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.CocoaBlock#CocoaBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/CocoaBlock.java:55 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ CocoaBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CocoaBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/CocoaBlock.java:50 - Modifiers:
public - Return:
MapCodec<CocoaBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ CocoaBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CocoaBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/CocoaBlock.java:147 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.CocoaBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/CocoaBlock.java:81 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
แยกกรณีด้วย switch. เรียกต่อ: getValue(). มีจุด return อย่างน้อย 4 จุด.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.CocoaBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/CocoaBlock.java:97 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: defaultBlockState(), getLevel(), getClickedPos(), getNearestLookingDirections(), getAxis(), isHorizontal(), setValue(), canSurvive(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
CocoaBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.CocoaBlock#isBonemealSuccess(Level,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CocoaBlock.java:137 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Bonemeal Success
ทำงานยังไง
คืนค่า: true.
Parameters
Level levelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
CocoaBlock instance = ...;
Level level = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isBonemealSuccess(level, randomSource, blockPos, blockState);
net.minecraft.world.level.block.CocoaBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/CocoaBlock.java:152 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.CocoaBlock#isRandomlyTicking(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CocoaBlock.java:60 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Randomly Ticking
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: blockState.getValue(AGE) < 2.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean isRandomlyTicking(BlockState blockState) {
return super.isRandomlyTicking(blockState);
}
net.minecraft.world.level.block.CocoaBlock#isValidBonemealTarget(LevelReader,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CocoaBlock.java:132 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Valid Bonemeal Target
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: blockState.getValue(AGE) < 2.
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
CocoaBlock instance = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isValidBonemealTarget(levelReader, blockPos, blockState);
net.minecraft.world.level.block.CocoaBlock#performBonemeal(ServerLevel,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CocoaBlock.java:142 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ performBonemeal ตาม implementation ของ CocoaBlock
ทำงานยังไง
เรียกต่อ: setBlock(), setValue(), getValue().
Parameters
ServerLevel serverLevelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
CocoaBlock instance = ...;
ServerLevel serverLevel = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
instance.performBonemeal(serverLevel, randomSource, blockPos, blockState);
net.minecraft.world.level.block.CocoaBlock#randomTick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/CocoaBlock.java:65 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ randomTick ตาม implementation ของ CocoaBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: nextInt(), getValue(), setBlock(), setValue().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void randomTick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.randomTick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.CocoaBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/CocoaBlock.java:116 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
เรียกต่อ: getValue(), canSurvive(), defaultBlockState().
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
ColoredFallingBlock
- Full name:
net.minecraft.world.level.block.ColoredFallingBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/ColoredFallingBlock.java - Type:
class - Modifiers:
public - Extends:
FallingBlock
net.minecraft.world.level.block.ColoredFallingBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/ColoredFallingBlock.java:18 - Modifiers:
public - Return:
MapCodec<ColoredFallingBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ ColoredFallingBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.ColoredFallingBlock#ColoredFallingBlock(ColorRGBA,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/ColoredFallingBlock.java:23 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ ColoredFallingBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: dustColor.
Parameters
ColorRGBA colorRGBABlockBehaviour.Properties properties
ตัวอย่างใช้งาน
ColorRGBA colorRGBA = ...;
BlockBehaviour.Properties properties = ...;
ColoredFallingBlock instance = new ColoredFallingBlock(colorRGBA, properties);
net.minecraft.world.level.block.ColoredFallingBlock#getDustColor(BlockState,BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/ColoredFallingBlock.java:28 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Dust Color
ทำงานยังไง
เรียกต่อ: rgba(). คืนค่า: this.dustColor.rgba().
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
ColoredFallingBlock instance = ...;
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
int result = instance.getDustColor(blockState, blockGetter, blockPos);
CommandBlock
- Full name:
net.minecraft.world.level.block.CommandBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/CommandBlock.java - Type:
class - Modifiers:
public - Extends:
BaseEntityBlock - Implements:
GameMasterBlock
net.minecraft.world.level.block.CommandBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/CommandBlock.java:44 - Modifiers:
public - Return:
MapCodec<CommandBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ CommandBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CommandBlock#CommandBlock(boolean,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/CommandBlock.java:49 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ CommandBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: automatic. เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
boolean blBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
CommandBlock instance = new CommandBlock(true, properties);
net.minecraft.world.level.block.CommandBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/CommandBlock.java:174 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.CommandBlock#getAnalogOutputSignal(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/CommandBlock.java:142 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Analog Output Signal
ทำงานยังไง
เรียกต่อ: getBlockEntity(), getCommandBlock(), getSuccessCount(). คืนค่า: blockEntity instanceof CommandBlockEntity ? ((CommandBlockEntity)blockEntity).getCommandBlock().getSuccessCount() : 0.
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected int getAnalogOutputSignal(BlockState blockState, Level level, BlockPos blockPos) {
return super.getAnalogOutputSignal(blockState, level, blockPos);
}
net.minecraft.world.level.block.CommandBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/CommandBlock.java:179 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: defaultBlockState(), setValue(), getNearestLookingDirection(), getOpposite(). คืนค่า: this.defaultBlockState().setValue(FACING, blockPlaceContext.getNearestLookingDirection().getOpposite()).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
CommandBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.CommandBlock#hasAnalogOutputSignal(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CommandBlock.java:137 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Analog Output Signal
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean hasAnalogOutputSignal(BlockState blockState) {
return super.hasAnalogOutputSignal(blockState);
}
net.minecraft.world.level.block.CommandBlock#mirror(BlockState,Mirror)
- Origin:
common - Source:
net/minecraft/world/level/block/CommandBlock.java:169 - Modifiers:
protected - Return:
BlockState
คืออะไร
ดำเนินการ mirror ตาม implementation ของ CommandBlock
ทำงานยังไง
เรียกต่อ: rotate(), getRotation(), getValue(). คืนค่า: blockState.rotate(mirror.getRotation(blockState.getValue(FACING))).
Parameters
BlockState blockStateMirror mirror
ตัวอย่างใช้งาน
BlockState blockState = ...;
Mirror mirror = ...;
@Override
protected BlockState mirror(BlockState blockState, Mirror mirror) {
return super.mirror(blockState, mirror);
}
net.minecraft.world.level.block.CommandBlock#neighborChanged(BlockState,Level,BlockPos,Block,Orientation,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/CommandBlock.java:62 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ neighborChanged ตาม implementation ของ CommandBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity(), setPoweredAndUpdate(), hasNeighborSignal().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlock blockOrientation orientationboolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Block block = ...;
Orientation orientation = ...;
@Override
protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, Orientation orientation, boolean bl) {
super.neighborChanged(blockState, level, blockPos, block, orientation, bl);
}
net.minecraft.world.level.block.CommandBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CommandBlock.java:55 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ CommandBlock
ทำงานยังไง
เรียกต่อ: setAutomatic(). สร้างออบเจ็กต์: CommandBlockEntity. คืนค่า: commandBlockEntity.
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
CommandBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
net.minecraft.world.level.block.CommandBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/CommandBlock.java:164 - Modifiers:
protected - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
เรียกต่อ: setValue(), getValue(). คืนค่า: blockState.setValue(FACING, rotation.rotate(blockState.getValue(FACING))).
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
BlockState blockState = ...;
Rotation rotation = ...;
@Override
protected BlockState rotate(BlockState blockState, Rotation rotation) {
return super.rotate(blockState, rotation);
}
net.minecraft.world.level.block.CommandBlock#setPlacedBy(Level,BlockPos,BlockState,LivingEntity,ItemStack)
- Origin:
common - Source:
net/minecraft/world/level/block/CommandBlock.java:148 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Placed By
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity(), getCommandBlock(), has(), setTrackOutput(), getGameRules(), getBoolean(), setAutomatic(), hasNeighborSignal().
Parameters
Level levelBlockPos blockPosBlockState blockStateLivingEntity livingEntityItemStack itemStack
ตัวอย่างใช้งาน
CommandBlock instance = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
LivingEntity livingEntity = ...;
ItemStack itemStack = ...;
instance.setPlacedBy(level, blockPos, blockState, livingEntity, itemStack);
net.minecraft.world.level.block.CommandBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/CommandBlock.java:86 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity(), getCommandBlock(), isNullOrEmpty(), getCommand(), getMode(), wasConditionMet(), markConditionMet(), execute().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.CommandBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/CommandBlock.java:126 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity(), canUseGameMasterBlocks(), openCommandBlock(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
ComparatorBlock
- Full name:
net.minecraft.world.level.block.ComparatorBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/ComparatorBlock.java - Type:
class - Modifiers:
public - Extends:
DiodeBlock - Implements:
EntityBlock
net.minecraft.world.level.block.ComparatorBlock#checkTickOnNeighbor(Level,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/ComparatorBlock.java:145 - Modifiers:
protected - Return:
void
คืออะไร
ตรวจสอบ Tick On Neighbor
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockTicks(), willTickThisTick(), calculateOutputSignal(), getBlockEntity(), getOutputSignal(), getValue(), shouldTurnOn(), shouldPrioritize().
Parameters
Level levelBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected void checkTickOnNeighbor(Level level, BlockPos blockPos, BlockState blockState) {
super.checkTickOnNeighbor(level, blockPos, blockState);
}
net.minecraft.world.level.block.ComparatorBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/ComparatorBlock.java:35 - Modifiers:
public - Return:
MapCodec<ComparatorBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ ComparatorBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.ComparatorBlock#ComparatorBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/ComparatorBlock.java:40 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ ComparatorBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
ComparatorBlock instance = new ComparatorBlock(properties);
net.minecraft.world.level.block.ComparatorBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/ComparatorBlock.java:197 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.ComparatorBlock#getDelay(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/ComparatorBlock.java:45 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Delay
ทำงานยังไง
คืนค่า: 2.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected int getDelay(BlockState blockState) {
return super.getDelay(blockState);
}
net.minecraft.world.level.block.ComparatorBlock#getInputSignal(Level,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/ComparatorBlock.java:97 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Input Signal
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), relative(), getBlockState(), hasAnalogOutputSignal(), getAnalogOutputSignal(), isRedstoneConductor(), getItemFrame(), max(). คืนค่า: i.
Parameters
Level levelBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected int getInputSignal(Level level, BlockPos blockPos, BlockState blockState) {
return super.getInputSignal(level, blockPos, blockState);
}
net.minecraft.world.level.block.ComparatorBlock#getOutputSignal(BlockGetter,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/ComparatorBlock.java:66 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Output Signal
ทำงานยังไง
เรียกต่อ: getBlockEntity(). คืนค่า: blockEntity instanceof ComparatorBlockEntity ? ((ComparatorBlockEntity)blockEntity).getOutputSignal() : 0.
Parameters
BlockGetter blockGetterBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected int getOutputSignal(BlockGetter blockGetter, BlockPos blockPos, BlockState blockState) {
return super.getOutputSignal(blockGetter, blockPos, blockState);
}
net.minecraft.world.level.block.ComparatorBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/ComparatorBlock.java:192 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ ComparatorBlock
ทำงานยังไง
สร้างออบเจ็กต์: ComparatorBlockEntity. คืนค่า: new ComparatorBlockEntity(blockPos, blockState).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
ComparatorBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
net.minecraft.world.level.block.ComparatorBlock#shouldTurnOn(Level,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/ComparatorBlock.java:86 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าควร Turn On
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getInputSignal(), getAlternateSignal(), getValue(). มีจุด return อย่างน้อย 2 จุด.
Parameters
Level levelBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected boolean shouldTurnOn(Level level, BlockPos blockPos, BlockState blockState) {
return super.shouldTurnOn(level, blockPos, blockState);
}
net.minecraft.world.level.block.ComparatorBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/ComparatorBlock.java:180 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
เรียกต่อ: refreshOutputState().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.ComparatorBlock#triggerEvent(BlockState,Level,BlockPos,int,int)
- Origin:
common - Source:
net/minecraft/world/level/block/ComparatorBlock.java:185 - Modifiers:
protected - Return:
boolean
คืออะไร
ดำเนินการ triggerEvent ตาม implementation ของ ComparatorBlock
ทำงานยังไง
เรียกต่อ: getBlockEntity(). คืนค่า: blockEntity != null && blockEntity.triggerEvent(i, j).
Parameters
BlockState blockStateLevel levelBlockPos blockPosint iint j
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected boolean triggerEvent(BlockState blockState, Level level, BlockPos blockPos, int i, int j) {
return super.triggerEvent(blockState, level, blockPos, i, j);
}
net.minecraft.world.level.block.ComparatorBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/ComparatorBlock.java:50 - Modifiers:
public - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
เรียกต่อ: canSurviveOn(), defaultBlockState().
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
ComparatorBlock instance = ...;
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
BlockState result = instance.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
net.minecraft.world.level.block.ComparatorBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/ComparatorBlock.java:131 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getAbilities(), cycle(), getValue(), playSound(), setBlock(), refreshOutputState(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
ComposterBlock
- Full name:
net.minecraft.world.level.block.ComposterBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/ComposterBlock.java - Type:
class - Modifiers:
public - Extends:
Block - Implements:
WorldlyContainerHolder
net.minecraft.world.level.block.ComposterBlock#bootStrap()
- Origin:
common - Source:
net/minecraft/world/level/block/ComposterBlock.java:66 - Modifiers:
public static - Return:
void
คืออะไร
ดำเนินการ bootStrap ตาม implementation ของ ComposterBlock
ทำงานยังไง
เรียกต่อ: defaultReturnValue(), add().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.ComposterBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/ComposterBlock.java:61 - Modifiers:
public - Return:
MapCodec<ComposterBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ ComposterBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.ComposterBlock#ComposterBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/ComposterBlock.java:187 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ ComposterBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
ComposterBlock instance = new ComposterBlock(properties);
net.minecraft.world.level.block.ComposterBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/ComposterBlock.java:335 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.ComposterBlock#extractProduce(Entity,BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/ComposterBlock.java:279 - Modifiers:
public static - Return:
BlockState
คืออะไร
ดำเนินการ extractProduce ตาม implementation ของ ComposterBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: atLowerCornerWithOffset(), offsetRandom(), x(), y(), z(), setDefaultPickUpDelay(), addFreshEntity(), empty(). สร้างออบเจ็กต์: ItemEntity, ItemStack. คืนค่า: blockState2.
Parameters
Entity entityBlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
Entity entity = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState result = ComposterBlock.extractProduce(entity, blockState, level, blockPos);
net.minecraft.world.level.block.ComposterBlock#getAnalogOutputSignal(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/ComposterBlock.java:330 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Analog Output Signal
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: blockState.getValue(LEVEL).
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected int getAnalogOutputSignal(BlockState blockState, Level level, BlockPos blockPos) {
return super.getAnalogOutputSignal(blockState, level, blockPos);
}
net.minecraft.world.level.block.ComposterBlock#getCollisionShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/ComposterBlock.java:226 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Collision Shape
ทำงานยังไง
คืนค่า: SHAPES[0].
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getCollisionShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getCollisionShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.ComposterBlock#getContainer(BlockState,LevelAccessor,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/ComposterBlock.java:345 - Modifiers:
public - Return:
WorldlyContainer
คืออะไร
อ่านค่า Container
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), OutputContainer(), InputContainer(), EmptyContainer(). สร้างออบเจ็กต์: ComposterBlock.OutputContainer, ItemStack, ComposterBlock.InputContainer, ComposterBlock.EmptyContainer. มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateLevelAccessor levelAccessorBlockPos blockPos
ตัวอย่างใช้งาน
ComposterBlock instance = ...;
BlockState blockState = ...;
LevelAccessor levelAccessor = ...;
BlockPos blockPos = ...;
WorldlyContainer result = instance.getContainer(blockState, levelAccessor, blockPos);
net.minecraft.world.level.block.ComposterBlock#getInteractionShape(BlockState,BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/ComposterBlock.java:221 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Interaction Shape
ทำงานยังไง
คืนค่า: OUTER_SHAPE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
@Override
protected VoxelShape getInteractionShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos) {
return super.getInteractionShape(blockState, blockGetter, blockPos);
}
net.minecraft.world.level.block.ComposterBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/ComposterBlock.java:216 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: SHAPES[blockState.getValue(LEVEL)].
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.ComposterBlock#handleFill(Level,BlockPos,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/ComposterBlock.java:192 - Modifiers:
public static - Return:
void
คืออะไร
จัดการ Fill
ทำงานยังไง
มีการวนลูป. เรียกต่อ: getBlockState(), playLocalSound(), getShape(), max(), getRandom(), nextGaussian(), addParticle(), getX().
Parameters
Level levelBlockPos blockPosboolean bl
ตัวอย่างใช้งาน
net.minecraft.world.level.block.ComposterBlock#hasAnalogOutputSignal(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/ComposterBlock.java:325 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Analog Output Signal
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean hasAnalogOutputSignal(BlockState blockState) {
return super.hasAnalogOutputSignal(blockState);
}
net.minecraft.world.level.block.ComposterBlock#insertItem(Entity,BlockState,ServerLevel,ItemStack,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/ComposterBlock.java:268 - Modifiers:
public static - Return:
BlockState
คืออะไร
ดำเนินการ insertItem ตาม implementation ของ ComposterBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), containsKey(), getItem(), addItem(), shrink(). มีจุด return อย่างน้อย 2 จุด.
Parameters
Entity entityBlockState blockStateServerLevel serverLevelItemStack itemStackBlockPos blockPos
ตัวอย่างใช้งาน
Entity entity = ...;
BlockState blockState = ...;
ServerLevel serverLevel = ...;
ItemStack itemStack = ...;
BlockPos blockPos = ...;
BlockState result = ComposterBlock.insertItem(entity, blockState, serverLevel, itemStack, blockPos);
net.minecraft.world.level.block.ComposterBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/ComposterBlock.java:340 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.ComposterBlock#onPlace(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/ComposterBlock.java:231 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Place
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), scheduleTick(), getBlock().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onPlace(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onPlace(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.ComposterBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/ComposterBlock.java:317 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), setBlock(), cycle(), playSound().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.ComposterBlock#useItemOn(ItemStack,BlockState,Level,BlockPos,Player,InteractionHand,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/ComposterBlock.java:238 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Item On
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), containsKey(), getItem(), addItem(), levelEvent(), awardStat(), get(), consume(). มีจุด return อย่างน้อย 2 จุด.
Parameters
ItemStack itemStackBlockState blockStateLevel levelBlockPos blockPosPlayer playerInteractionHand interactionHandBlockHitResult blockHitResult
ตัวอย่างใช้งาน
ItemStack itemStack = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
InteractionHand interactionHand = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useItemOn(ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult) {
return super.useItemOn(itemStack, blockState, level, blockPos, player, interactionHand, blockHitResult);
}
net.minecraft.world.level.block.ComposterBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/ComposterBlock.java:257 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), extractProduce(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
ConcretePowderBlock
- Full name:
net.minecraft.world.level.block.ConcretePowderBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/ConcretePowderBlock.java - Type:
class - Modifiers:
public - Extends:
FallingBlock
net.minecraft.world.level.block.ConcretePowderBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/ConcretePowderBlock.java:28 - Modifiers:
public - Return:
MapCodec<ConcretePowderBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ ConcretePowderBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.ConcretePowderBlock#ConcretePowderBlock(Block,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/ConcretePowderBlock.java:33 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ ConcretePowderBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: concrete.
Parameters
Block blockBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
Block block = ...;
BlockBehaviour.Properties properties = ...;
ConcretePowderBlock instance = new ConcretePowderBlock(block, properties);
net.minecraft.world.level.block.ConcretePowderBlock#getDustColor(BlockState,BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/ConcretePowderBlock.java:96 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Dust Color
ทำงานยังไง
เรียกต่อ: getMapColor(). คืนค่า: blockState.getMapColor(blockGetter, blockPos).col.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
ConcretePowderBlock instance = ...;
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
int result = instance.getDustColor(blockState, blockGetter, blockPos);
net.minecraft.world.level.block.ConcretePowderBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/ConcretePowderBlock.java:45 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: getLevel(), getClickedPos(), getBlockState(), shouldSolidify(), defaultBlockState(). คืนค่า: shouldSolidify(blockGetter, blockPos, blockState) ? this.concrete.defaultBlockState() : super.getStateForPlacement(blockPlaceContext).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
ConcretePowderBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.ConcretePowderBlock#onLand(Level,BlockPos,BlockState,BlockState,FallingBlockEntity)
- Origin:
common - Source:
net/minecraft/world/level/block/ConcretePowderBlock.java:38 - Modifiers:
public - Return:
void
คืออะไร
จัดการเหตุการณ์ Land
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: shouldSolidify(), setBlock(), defaultBlockState().
Parameters
Level levelBlockPos blockPosBlockState blockStateBlockState blockState2FallingBlockEntity fallingBlockEntity
ตัวอย่างใช้งาน
ConcretePowderBlock instance = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockState blockState2 = ...;
FallingBlockEntity fallingBlockEntity = ...;
instance.onLand(level, blockPos, blockState, blockState2, fallingBlockEntity);
net.minecraft.world.level.block.ConcretePowderBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/ConcretePowderBlock.java:80 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
เรียกต่อ: touchesLiquid(), defaultBlockState().
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
ConduitBlock
- Full name:
net.minecraft.world.level.block.ConduitBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/ConduitBlock.java - Type:
class - Modifiers:
public - Extends:
BaseEntityBlock - Implements:
SimpleWaterloggedBlock
net.minecraft.world.level.block.ConduitBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/ConduitBlock.java:35 - Modifiers:
public - Return:
MapCodec<ConduitBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ ConduitBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.ConduitBlock#ConduitBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/ConduitBlock.java:40 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ ConduitBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.ConduitBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/ConduitBlock.java:45 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.ConduitBlock#getFluidState(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/ConduitBlock.java:61 - Modifiers:
protected - Return:
FluidState
คืออะไร
อ่านค่า Fluid State
ทำงานยังไง
เรียกต่อ: getValue(), getSource(). คืนค่า: blockState.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(blockState).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected FluidState getFluidState(BlockState blockState) {
return super.getFluidState(blockState);
}
net.minecraft.world.level.block.ConduitBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/ConduitBlock.java:84 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
คืนค่า: SHAPE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.ConduitBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/ConduitBlock.java:89 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: getLevel(), getFluidState(), getClickedPos(), defaultBlockState(), setValue(), is(), getAmount(). คืนค่า: this.defaultBlockState().setValue(WATERLOGGED, fluidState.is(FluidTags.WATER) && fluidState.getAmount() == 8).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
ConduitBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.ConduitBlock#getTicker(Level,BlockState,BlockEntityType<T>)
- Origin:
common - Source:
net/minecraft/world/level/block/ConduitBlock.java:55 - Modifiers:
public - Return:
BlockEntityTicker<T>
คืออะไร
อ่านค่า Ticker
ทำงานยังไง
เรียกต่อ: createTickerHelper(). คืนค่า: createTickerHelper(blockEntityType, BlockEntityType.CONDUIT, level.isClientSide ? ConduitBlockEntity::clientTick : ConduitBlockEntity::serverTick).
Parameters
Level levelBlockState blockStateBlockEntityType<T> blockEntityType
ตัวอย่างใช้งาน
ConduitBlock instance = ...;
Level level = ...;
BlockState blockState = ...;
BlockEntityType<T> blockEntityType = ...;
BlockEntityTicker<T> result = instance.getTicker(level, blockState, blockEntityType);
net.minecraft.world.level.block.ConduitBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/ConduitBlock.java:96 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.ConduitBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/ConduitBlock.java:50 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ ConduitBlock
ทำงานยังไง
สร้างออบเจ็กต์: ConduitBlockEntity. คืนค่า: new ConduitBlockEntity(blockPos, blockState).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
ConduitBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
net.minecraft.world.level.block.ConduitBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/ConduitBlock.java:66 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), scheduleTick(), getTickDelay(). คืนค่า: super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource).
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
CopperBulbBlock
- Full name:
net.minecraft.world.level.block.CopperBulbBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/CopperBulbBlock.java - Type:
class - Modifiers:
public - Extends:
Block
net.minecraft.world.level.block.CopperBulbBlock#checkAndFlip(BlockState,ServerLevel,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/CopperBulbBlock.java:46 - Modifiers:
public - Return:
void
คืออะไร
ตรวจสอบ And Flip
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: hasNeighborSignal(), getValue(), cycle(), playSound(), setBlock(), setValue().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPos
ตัวอย่างใช้งาน
CopperBulbBlock instance = ...;
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
instance.checkAndFlip(blockState, serverLevel, blockPos);
net.minecraft.world.level.block.CopperBulbBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/CopperBulbBlock.java:22 - Modifiers:
protected - Return:
MapCodec<? extends CopperBulbBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ CopperBulbBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CopperBulbBlock#CopperBulbBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/CopperBulbBlock.java:27 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ CopperBulbBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), defaultBlockState(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
CopperBulbBlock instance = new CopperBulbBlock(properties);
net.minecraft.world.level.block.CopperBulbBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/CopperBulbBlock.java:59 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.CopperBulbBlock#getAnalogOutputSignal(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/CopperBulbBlock.java:69 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Analog Output Signal
ทำงานยังไง
เรียกต่อ: getBlockState(), getValue(). คืนค่า: level.getBlockState(blockPos).getValue(LIT) ? 15 : 0.
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected int getAnalogOutputSignal(BlockState blockState, Level level, BlockPos blockPos) {
return super.getAnalogOutputSignal(blockState, level, blockPos);
}
net.minecraft.world.level.block.CopperBulbBlock#hasAnalogOutputSignal(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CopperBulbBlock.java:64 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Analog Output Signal
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean hasAnalogOutputSignal(BlockState blockState) {
return super.hasAnalogOutputSignal(blockState);
}
net.minecraft.world.level.block.CopperBulbBlock#neighborChanged(BlockState,Level,BlockPos,Block,Orientation,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/CopperBulbBlock.java:39 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ neighborChanged ตาม implementation ของ CopperBulbBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: checkAndFlip().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlock blockOrientation orientationboolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Block block = ...;
Orientation orientation = ...;
@Override
protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, Orientation orientation, boolean bl) {
super.neighborChanged(blockState, level, blockPos, block, orientation, bl);
}
net.minecraft.world.level.block.CopperBulbBlock#onPlace(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/CopperBulbBlock.java:32 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Place
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlock(), checkAndFlip().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onPlace(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onPlace(blockState, level, blockPos, blockState2, bl);
}
CoralBlock
- Full name:
net.minecraft.world.level.block.CoralBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/CoralBlock.java - Type:
class - Modifiers:
public - Extends:
Block
net.minecraft.world.level.block.CoralBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/CoralBlock.java:32 - Modifiers:
public - Return:
MapCodec<CoralBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ CoralBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CoralBlock#CoralBlock(Block,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/CoralBlock.java:27 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ CoralBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: deadBlock.
Parameters
Block blockBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
Block block = ...;
BlockBehaviour.Properties properties = ...;
CoralBlock instance = new CoralBlock(block, properties);
net.minecraft.world.level.block.CoralBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/CoralBlock.java:73 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: scanForWater(), getLevel(), getClickedPos(), scheduleTick(), getRandom(), nextInt(), defaultBlockState(). คืนค่า: this.defaultBlockState().
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
CoralBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.CoralBlock#scanForWater(BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/CoralBlock.java:62 - Modifiers:
protected - Return:
boolean
คืออะไร
ดำเนินการ scanForWater ตาม implementation ของ CoralBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: values(), getFluidState(), relative(), is(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
@Override
protected boolean scanForWater(BlockGetter blockGetter, BlockPos blockPos) {
return super.scanForWater(blockGetter, blockPos);
}
net.minecraft.world.level.block.CoralBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/CoralBlock.java:37 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: scanForWater(), setBlock(), defaultBlockState().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.CoralBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/CoralBlock.java:44 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: scanForWater(), scheduleTick(), nextInt(). คืนค่า: super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource).
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
CoralFanBlock
- Full name:
net.minecraft.world.level.block.CoralFanBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/CoralFanBlock.java - Type:
class - Modifiers:
public - Extends:
BaseCoralFanBlock
net.minecraft.world.level.block.CoralFanBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/CoralFanBlock.java:23 - Modifiers:
public - Return:
MapCodec<CoralFanBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ CoralFanBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CoralFanBlock#CoralFanBlock(Block,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/CoralFanBlock.java:28 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ CoralFanBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: deadBlock.
Parameters
Block blockBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
Block block = ...;
BlockBehaviour.Properties properties = ...;
CoralFanBlock instance = new CoralFanBlock(block, properties);
net.minecraft.world.level.block.CoralFanBlock#onPlace(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/CoralFanBlock.java:33 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Place
ทำงานยังไง
เรียกต่อ: tryScheduleDieTick().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onPlace(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onPlace(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.CoralFanBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/CoralFanBlock.java:38 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: scanForWater(), setBlock(), defaultBlockState(), setValue().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.CoralFanBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/CoralFanBlock.java:45 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canSurvive(), defaultBlockState(), tryScheduleDieTick(), getValue(), scheduleTick(), getTickDelay(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
CoralPlantBlock
- Full name:
net.minecraft.world.level.block.CoralPlantBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/CoralPlantBlock.java - Type:
class - Modifiers:
public - Extends:
BaseCoralPlantTypeBlock
net.minecraft.world.level.block.CoralPlantBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/CoralPlantBlock.java:28 - Modifiers:
public - Return:
MapCodec<CoralPlantBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ CoralPlantBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CoralPlantBlock#CoralPlantBlock(Block,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/CoralPlantBlock.java:33 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ CoralPlantBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: deadBlock.
Parameters
Block blockBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
Block block = ...;
BlockBehaviour.Properties properties = ...;
CoralPlantBlock instance = new CoralPlantBlock(block, properties);
net.minecraft.world.level.block.CoralPlantBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/CoralPlantBlock.java:73 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
คืนค่า: SHAPE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.CoralPlantBlock#onPlace(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/CoralPlantBlock.java:38 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Place
ทำงานยังไง
เรียกต่อ: tryScheduleDieTick().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onPlace(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onPlace(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.CoralPlantBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/CoralPlantBlock.java:43 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: scanForWater(), setBlock(), defaultBlockState(), setValue().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.CoralPlantBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/CoralPlantBlock.java:50 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canSurvive(), defaultBlockState(), tryScheduleDieTick(), getValue(), scheduleTick(), getTickDelay(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
CoralWallFanBlock
- Full name:
net.minecraft.world.level.block.CoralWallFanBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/CoralWallFanBlock.java - Type:
class - Modifiers:
public - Extends:
BaseCoralWallFanBlock
net.minecraft.world.level.block.CoralWallFanBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/CoralWallFanBlock.java:23 - Modifiers:
public - Return:
MapCodec<CoralWallFanBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ CoralWallFanBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CoralWallFanBlock#CoralWallFanBlock(Block,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/CoralWallFanBlock.java:28 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ CoralWallFanBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: deadBlock.
Parameters
Block blockBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
Block block = ...;
BlockBehaviour.Properties properties = ...;
CoralWallFanBlock instance = new CoralWallFanBlock(block, properties);
net.minecraft.world.level.block.CoralWallFanBlock#onPlace(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/CoralWallFanBlock.java:33 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Place
ทำงานยังไง
เรียกต่อ: tryScheduleDieTick().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onPlace(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onPlace(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.CoralWallFanBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/CoralWallFanBlock.java:38 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: scanForWater(), setBlock(), defaultBlockState(), setValue(), getValue().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.CoralWallFanBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/CoralWallFanBlock.java:45 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getOpposite(), getValue(), canSurvive(), defaultBlockState(), scheduleTick(), getTickDelay(), tryScheduleDieTick(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
CrafterBlock
- Full name:
net.minecraft.world.level.block.CrafterBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/CrafterBlock.java - Type:
class - Modifiers:
public - Extends:
BaseEntityBlock
net.minecraft.world.level.block.CrafterBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/CrafterBlock.java:57 - Modifiers:
protected - Return:
MapCodec<CrafterBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ CrafterBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CrafterBlock#CrafterBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/CrafterBlock.java:52 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ CrafterBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CrafterBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/CrafterBlock.java:235 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.CrafterBlock#dispenseFrom(BlockState,ServerLevel,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/CrafterBlock.java:147 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ dispenseFrom ตาม implementation ของ CrafterBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getBlockEntity(), asCraftInput(), getPotentialResults(), isEmpty(), levelEvent(), get(), value(), assemble().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
@Override
protected void dispenseFrom(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos) {
super.dispenseFrom(blockState, serverLevel, blockPos);
}
net.minecraft.world.level.block.CrafterBlock#getAnalogOutputSignal(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/CrafterBlock.java:67 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Analog Output Signal
ทำงานยังไง
เรียกต่อ: getBlockEntity(), getRedstoneSignal(). คืนค่า: level.getBlockEntity(blockPos) instanceof CrafterBlockEntity crafterBlockEntity ? crafterBlockEntity.getRedstoneSignal() : 0.
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected int getAnalogOutputSignal(BlockState blockState, Level level, BlockPos blockPos) {
return super.getAnalogOutputSignal(blockState, level, blockPos);
}
net.minecraft.world.level.block.CrafterBlock#getPotentialResults(ServerLevel,CraftingInput)
- Origin:
common - Source:
net/minecraft/world/level/block/CrafterBlock.java:181 - Modifiers:
public static - Return:
Optional<RecipeHolder<CraftingRecipe>>
คืออะไร
อ่านค่า Potential Results
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: RECIPE_CACHE.get(serverLevel, craftingInput).
Parameters
ServerLevel serverLevelCraftingInput craftingInput
ตัวอย่างใช้งาน
ServerLevel serverLevel = ...;
CraftingInput craftingInput = ...;
Optional<RecipeHolder<CraftingRecipe>> result = CrafterBlock.getPotentialResults(serverLevel, craftingInput);
net.minecraft.world.level.block.CrafterBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/CrafterBlock.java:111 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
แยกกรณีด้วย switch. เรียกต่อ: getNearestLookingDirection(), getOpposite(), getHorizontalDirection(), defaultBlockState(), setValue(), fromFrontAndTop(), getLevel(), hasNeighborSignal().
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
CrafterBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.CrafterBlock#getTicker(Level,BlockState,BlockEntityType<T>)
- Origin:
common - Source:
net/minecraft/world/level/block/CrafterBlock.java:92 - Modifiers:
public - Return:
BlockEntityTicker<T>
คืออะไร
อ่านค่า Ticker
ทำงานยังไง
เรียกต่อ: createTickerHelper(). คืนค่า: level.isClientSide ? null : createTickerHelper(blockEntityType, BlockEntityType.CRAFTER, CrafterBlockEntity::serverTick).
Parameters
Level levelBlockState blockStateBlockEntityType<T> blockEntityType
ตัวอย่างใช้งาน
CrafterBlock instance = ...;
Level level = ...;
BlockState blockState = ...;
BlockEntityType<T> blockEntityType = ...;
BlockEntityTicker<T> result = instance.getTicker(level, blockState, blockEntityType);
net.minecraft.world.level.block.CrafterBlock#hasAnalogOutputSignal(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CrafterBlock.java:62 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Analog Output Signal
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean hasAnalogOutputSignal(BlockState blockState) {
return super.hasAnalogOutputSignal(blockState);
}
net.minecraft.world.level.block.CrafterBlock#mirror(BlockState,Mirror)
- Origin:
common - Source:
net/minecraft/world/level/block/CrafterBlock.java:230 - Modifiers:
protected - Return:
BlockState
คืออะไร
ดำเนินการ mirror ตาม implementation ของ CrafterBlock
ทำงานยังไง
เรียกต่อ: setValue(), rotation(), rotate(), getValue(). คืนค่า: blockState.setValue(ORIENTATION, mirror.rotation().rotate(blockState.getValue(ORIENTATION))).
Parameters
BlockState blockStateMirror mirror
ตัวอย่างใช้งาน
BlockState blockState = ...;
Mirror mirror = ...;
@Override
protected BlockState mirror(BlockState blockState, Mirror mirror) {
return super.mirror(blockState, mirror);
}
net.minecraft.world.level.block.CrafterBlock#neighborChanged(BlockState,Level,BlockPos,Block,Orientation,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/CrafterBlock.java:72 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ neighborChanged ตาม implementation ของ CrafterBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: hasNeighborSignal(), getValue(), getBlockEntity(), scheduleTick(), setBlock(), setValue(), setBlockEntityTriggered().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlock blockOrientation orientationboolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Block block = ...;
Orientation orientation = ...;
@Override
protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, Orientation orientation, boolean bl) {
super.neighborChanged(blockState, level, blockPos, block, orientation, bl);
}
net.minecraft.world.level.block.CrafterBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CrafterBlock.java:104 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ CrafterBlock
ทำงานยังไง
เรียกต่อ: setTriggered(), hasProperty(), getValue(). สร้างออบเจ็กต์: CrafterBlockEntity. คืนค่า: crafterBlockEntity.
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
CrafterBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
net.minecraft.world.level.block.CrafterBlock#onRemove(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/CrafterBlock.java:132 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Remove
ทำงานยังไง
เรียกต่อ: dropContentsOnDestroy().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onRemove(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onRemove(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.CrafterBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/CrafterBlock.java:225 - Modifiers:
protected - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
เรียกต่อ: setValue(), rotation(), getValue(). คืนค่า: blockState.setValue(ORIENTATION, rotation.rotation().rotate(blockState.getValue(ORIENTATION))).
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
BlockState blockState = ...;
Rotation rotation = ...;
@Override
protected BlockState rotate(BlockState blockState, Rotation rotation) {
return super.rotate(blockState, rotation);
}
net.minecraft.world.level.block.CrafterBlock#setPlacedBy(Level,BlockPos,BlockState,LivingEntity,ItemStack)
- Origin:
common - Source:
net/minecraft/world/level/block/CrafterBlock.java:125 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Placed By
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), scheduleTick().
Parameters
Level levelBlockPos blockPosBlockState blockStateLivingEntity livingEntityItemStack itemStack
ตัวอย่างใช้งาน
CrafterBlock instance = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
LivingEntity livingEntity = ...;
ItemStack itemStack = ...;
instance.setPlacedBy(level, blockPos, blockState, livingEntity, itemStack);
net.minecraft.world.level.block.CrafterBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/CrafterBlock.java:87 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
เรียกต่อ: dispenseFrom().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.CrafterBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/CrafterBlock.java:138 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity(), openMenu(). คืนค่า: InteractionResult.SUCCESS.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
CraftingTableBlock
- Full name:
net.minecraft.world.level.block.CraftingTableBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/CraftingTableBlock.java - Type:
class - Modifiers:
public - Extends:
Block
net.minecraft.world.level.block.CraftingTableBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/CraftingTableBlock.java:22 - Modifiers:
public - Return:
MapCodec<? extends CraftingTableBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ CraftingTableBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
CraftingTableBlock instance = ...;
MapCodec<? extends CraftingTableBlock> result = instance.codec();
net.minecraft.world.level.block.CraftingTableBlock#CraftingTableBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/CraftingTableBlock.java:27 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ CraftingTableBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
CraftingTableBlock instance = new CraftingTableBlock(properties);
net.minecraft.world.level.block.CraftingTableBlock#getMenuProvider(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/CraftingTableBlock.java:41 - Modifiers:
protected - Return:
MenuProvider
คืออะไร
อ่านค่า Menu Provider
ทำงานยังไง
เรียกต่อ: create(). สร้างออบเจ็กต์: SimpleMenuProvider, CraftingMenu. คืนค่า: new SimpleMenuProvider((i, inventory, player) -> new CraftingMenu(i, inventory, ContainerLevelAccess.create(level, blockPos)), CONTAINER_TITLE).
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected MenuProvider getMenuProvider(BlockState blockState, Level level, BlockPos blockPos) {
return super.getMenuProvider(blockState, level, blockPos);
}
net.minecraft.world.level.block.CraftingTableBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/CraftingTableBlock.java:31 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: openMenu(), getMenuProvider(), awardStat(). คืนค่า: InteractionResult.SUCCESS.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
CreakingHeartBlock
- Full name:
net.minecraft.world.level.block.CreakingHeartBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/CreakingHeartBlock.java - Type:
class - Modifiers:
public - Extends:
BaseEntityBlock
net.minecraft.world.level.block.CreakingHeartBlock#animateTick(BlockState,Level,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/CreakingHeartBlock.java:68 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ animateTick ตาม implementation ของ CreakingHeartBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isNaturalNight(), getValue(), nextInt(), isSurroundedByLogs(), playLocalSound(), getX(), getY(), getZ().
Parameters
BlockState blockStateLevel levelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
CreakingHeartBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
instance.animateTick(blockState, level, blockPos, randomSource);
net.minecraft.world.level.block.CreakingHeartBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/CreakingHeartBlock.java:39 - Modifiers:
public - Return:
MapCodec<CreakingHeartBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ CreakingHeartBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CreakingHeartBlock#CreakingHeartBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/CreakingHeartBlock.java:44 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ CreakingHeartBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), defaultBlockState(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
CreakingHeartBlock instance = new CreakingHeartBlock(properties);
net.minecraft.world.level.block.CreakingHeartBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/CreakingHeartBlock.java:138 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.CreakingHeartBlock#getAnalogOutputSignal(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/CreakingHeartBlock.java:189 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Analog Output Signal
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), getBlockEntity(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected int getAnalogOutputSignal(BlockState blockState, Level level, BlockPos blockPos) {
return super.getAnalogOutputSignal(blockState, level, blockPos);
}
net.minecraft.world.level.block.CreakingHeartBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/CreakingHeartBlock.java:125 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: updateState(), defaultBlockState(), setValue(), getClickedFace(), getAxis(), getLevel(), getClickedPos().
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
CreakingHeartBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.CreakingHeartBlock#getTicker(Level,BlockState,BlockEntityType<T>)
- Origin:
common - Source:
net/minecraft/world/level/block/CreakingHeartBlock.java:54 - Modifiers:
public - Return:
BlockEntityTicker<T>
คืออะไร
อ่านค่า Ticker
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), createTickerHelper(). มีจุด return อย่างน้อย 2 จุด.
Parameters
Level levelBlockState blockStateBlockEntityType<T> blockEntityType
ตัวอย่างใช้งาน
CreakingHeartBlock instance = ...;
Level level = ...;
BlockState blockState = ...;
BlockEntityType<T> blockEntityType = ...;
BlockEntityTicker<T> result = instance.getTicker(level, blockState, blockEntityType);
net.minecraft.world.level.block.CreakingHeartBlock#hasAnalogOutputSignal(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CreakingHeartBlock.java:184 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Analog Output Signal
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean hasAnalogOutputSignal(BlockState blockState) {
return super.hasAnalogOutputSignal(blockState);
}
net.minecraft.world.level.block.CreakingHeartBlock#hasRequiredLogs(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/CreakingHeartBlock.java:100 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Required Logs
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getValue(), getDirections(), getBlockState(), relative(), is(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
boolean result = CreakingHeartBlock.hasRequiredLogs(blockState, levelReader, blockPos);
net.minecraft.world.level.block.CreakingHeartBlock#isNaturalNight(Level)
- Origin:
common - Source:
net/minecraft/world/level/block/CreakingHeartBlock.java:64 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Natural Night
ทำงานยังไง
เรียกต่อ: dimensionType(), natural(), isNight(). คืนค่า: level.dimensionType().natural() && level.isNight().
Parameters
Level level
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CreakingHeartBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CreakingHeartBlock.java:49 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ CreakingHeartBlock
ทำงานยังไง
สร้างออบเจ็กต์: CreakingHeartBlockEntity. คืนค่า: new CreakingHeartBlockEntity(blockPos, blockState).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
CreakingHeartBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
net.minecraft.world.level.block.CreakingHeartBlock#onExplosionHit(BlockState,ServerLevel,BlockPos,Explosion,BiConsumer<ItemStack, BlockPos>)
- Origin:
common - Source:
net/minecraft/world/level/block/CreakingHeartBlock.java:152 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Explosion Hit
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity(), getBlockInteraction(), shouldAffectBlocklikeEntities(), removeProtector(), getDamageSource(), getIndirectSourceEntity(), tryAwardExperience().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosExplosion explosionBiConsumer<ItemStack, BlockPos> biConsumer
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
Explosion explosion = ...;
BiConsumer<ItemStack, BlockPos> biConsumer = ...;
@Override
protected void onExplosionHit(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, Explosion explosion, BiConsumer<ItemStack, BlockPos> biConsumer) {
super.onExplosionHit(blockState, serverLevel, blockPos, explosion, biConsumer);
}
net.minecraft.world.level.block.CreakingHeartBlock#onRemove(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/CreakingHeartBlock.java:143 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Remove
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity(), removeProtector().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onRemove(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onRemove(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.CreakingHeartBlock#playerWillDestroy(Level,BlockPos,BlockState,Player)
- Origin:
common - Source:
net/minecraft/world/level/block/CreakingHeartBlock.java:168 - Modifiers:
public - Return:
BlockState
คืออะไร
ดำเนินการ playerWillDestroy ตาม implementation ของ CreakingHeartBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity(), removeProtector(), damageSources(), playerAttack(), tryAwardExperience(). คืนค่า: super.playerWillDestroy(level, blockPos, blockState, player).
Parameters
Level levelBlockPos blockPosBlockState blockStatePlayer player
ตัวอย่างใช้งาน
CreakingHeartBlock instance = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
Player player = ...;
BlockState result = instance.playerWillDestroy(level, blockPos, blockState, player);
net.minecraft.world.level.block.CreakingHeartBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/CreakingHeartBlock.java:133 - Modifiers:
protected - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
เรียกต่อ: rotatePillar(). คืนค่า: RotatedPillarBlock.rotatePillar(blockState, rotation).
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
BlockState blockState = ...;
Rotation rotation = ...;
@Override
protected BlockState rotate(BlockState blockState, Rotation rotation) {
return super.rotate(blockState, rotation);
}
net.minecraft.world.level.block.CreakingHeartBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/CreakingHeartBlock.java:79 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
เรียกต่อ: updateState(). คืนค่า: updateState(blockState3, levelReader, blockPos).
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
CropBlock
- Full name:
net.minecraft.world.level.block.CropBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/CropBlock.java - Type:
class - Modifiers:
public - Extends:
BushBlock - Implements:
BonemealableBlock
net.minecraft.world.level.block.CropBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/CropBlock.java:156 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: hasSufficientLight(). คืนค่า: hasSufficientLight(levelReader, blockPos) && super.canSurvive(blockState, levelReader, blockPos).
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.CropBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/CropBlock.java:40 - Modifiers:
public - Return:
MapCodec<? extends CropBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ CropBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CropBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/CropBlock.java:198 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.CropBlock#CropBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/CropBlock.java:45 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ CropBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue(), getAgeProperty().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CropBlock#entityInside(BlockState,Level,BlockPos,Entity)
- Origin:
common - Source:
net/minecraft/world/level/block/CropBlock.java:165 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ entityInside ตาม implementation ของ CropBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getGameRules(), getBoolean(), destroyBlock().
Parameters
BlockState blockStateLevel levelBlockPos blockPosEntity entity
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Entity entity = ...;
@Override
protected void entityInside(BlockState blockState, Level level, BlockPos blockPos, Entity entity) {
super.entityInside(blockState, level, blockPos, entity);
}
net.minecraft.world.level.block.CropBlock#getAge(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CropBlock.java:68 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Age
ทำงานยังไง
เรียกต่อ: getValue(), getAgeProperty(). คืนค่า: blockState.getValue(this.getAgeProperty()).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CropBlock#getAgeProperty()
- Origin:
common - Source:
net/minecraft/world/level/block/CropBlock.java:60 - Modifiers:
protected - Return:
IntegerProperty
คืออะไร
อ่านค่า Age Property
ทำงานยังไง
คืนค่า: AGE.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CropBlock#getBaseSeedId()
- Origin:
common - Source:
net/minecraft/world/level/block/CropBlock.java:174 - Modifiers:
protected - Return:
ItemLike
คืออะไร
อ่านค่า Base Seed Id
ทำงานยังไง
คืนค่า: Items.WHEAT_SEEDS.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CropBlock#getBonemealAgeIncrease(Level)
- Origin:
common - Source:
net/minecraft/world/level/block/CropBlock.java:108 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Bonemeal Age Increase
ทำงานยังไง
เรียกต่อ: nextInt(). คืนค่า: Mth.nextInt(level.random, 2, 5).
Parameters
Level level
ตัวอย่างใช้งาน
Level level = ...;
@Override
protected int getBonemealAgeIncrease(Level level) {
return super.getBonemealAgeIncrease(level);
}
net.minecraft.world.level.block.CropBlock#getCloneItemStack(LevelReader,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/CropBlock.java:178 - Modifiers:
protected - Return:
ItemStack
คืออะไร
อ่านค่า Clone Item Stack
ทำงานยังไง
เรียกต่อ: getBaseSeedId(). สร้างออบเจ็กต์: ItemStack. คืนค่า: new ItemStack(this.getBaseSeedId()).
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockStateboolean bl
ตัวอย่างใช้งาน
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected ItemStack getCloneItemStack(LevelReader levelReader, BlockPos blockPos, BlockState blockState, boolean bl) {
return super.getCloneItemStack(levelReader, blockPos, blockState, bl);
}
net.minecraft.world.level.block.CropBlock#getGrowthSpeed(Block,BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/CropBlock.java:112 - Modifiers:
protected static - Return:
float
คืออะไร
อ่านค่า Growth Speed
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: below(), getBlockState(), offset(), is(), getValue(), north(), south(), west(). คืนค่า: f.
Parameters
Block blockBlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
Block block = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
@Override
protected float getGrowthSpeed(Block block, BlockGetter blockGetter, BlockPos blockPos) {
return super.getGrowthSpeed(block, blockGetter, blockPos);
}
net.minecraft.world.level.block.CropBlock#getMaxAge()
- Origin:
common - Source:
net/minecraft/world/level/block/CropBlock.java:64 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Max Age
ทำงานยังไง
คืนค่า: 7.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CropBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/CropBlock.java:50 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
เรียกต่อ: getAge(). คืนค่า: SHAPE_BY_AGE[this.getAge(blockState)].
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.CropBlock#getStateForAge(int)
- Origin:
common - Source:
net/minecraft/world/level/block/CropBlock.java:72 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Age
ทำงานยังไง
เรียกต่อ: defaultBlockState(), setValue(), getAgeProperty(). คืนค่า: this.defaultBlockState().setValue(this.getAgeProperty(), i).
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CropBlock#growCrops(Level,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CropBlock.java:98 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ growCrops ตาม implementation ของ CropBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getAge(), getBonemealAgeIncrease(), getMaxAge(), setBlock(), getStateForAge().
Parameters
Level levelBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
CropBlock instance = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
instance.growCrops(level, blockPos, blockState);
net.minecraft.world.level.block.CropBlock#hasSufficientLight(LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/CropBlock.java:161 - Modifiers:
protected static - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Sufficient Light
ทำงานยังไง
เรียกต่อ: getRawBrightness(). คืนค่า: levelReader.getRawBrightness(blockPos, 0) >= 8.
Parameters
LevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean hasSufficientLight(LevelReader levelReader, BlockPos blockPos) {
return super.hasSufficientLight(levelReader, blockPos);
}
net.minecraft.world.level.block.CropBlock#isBonemealSuccess(Level,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CropBlock.java:188 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Bonemeal Success
ทำงานยังไง
คืนค่า: true.
Parameters
Level levelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
CropBlock instance = ...;
Level level = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isBonemealSuccess(level, randomSource, blockPos, blockState);
net.minecraft.world.level.block.CropBlock#isMaxAge(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CropBlock.java:76 - Modifiers:
public final - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Max Age
ทำงานยังไง
เรียกต่อ: getAge(), getMaxAge(). คืนค่า: this.getAge(blockState) >= this.getMaxAge().
Parameters
BlockState blockState
ตัวอย่างใช้งาน
CropBlock instance = ...;
BlockState blockState = ...;
boolean result = instance.isMaxAge(blockState);
net.minecraft.world.level.block.CropBlock#isRandomlyTicking(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CropBlock.java:80 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Randomly Ticking
ทำงานยังไง
เรียกต่อ: isMaxAge(). คืนค่า: !this.isMaxAge(blockState).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean isRandomlyTicking(BlockState blockState) {
return super.isRandomlyTicking(blockState);
}
net.minecraft.world.level.block.CropBlock#isValidBonemealTarget(LevelReader,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CropBlock.java:183 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Valid Bonemeal Target
ทำงานยังไง
เรียกต่อ: isMaxAge(). คืนค่า: !this.isMaxAge(blockState).
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
CropBlock instance = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isValidBonemealTarget(levelReader, blockPos, blockState);
net.minecraft.world.level.block.CropBlock#mayPlaceOn(BlockState,BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/CropBlock.java:55 - Modifiers:
protected - Return:
boolean
คืออะไร
ดำเนินการ mayPlaceOn ตาม implementation ของ CropBlock
ทำงานยังไง
เรียกต่อ: is(). คืนค่า: blockState.is(Blocks.FARMLAND).
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
@Override
protected boolean mayPlaceOn(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos) {
return super.mayPlaceOn(blockState, blockGetter, blockPos);
}
net.minecraft.world.level.block.CropBlock#performBonemeal(ServerLevel,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CropBlock.java:193 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ performBonemeal ตาม implementation ของ CropBlock
ทำงานยังไง
เรียกต่อ: growCrops().
Parameters
ServerLevel serverLevelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
CropBlock instance = ...;
ServerLevel serverLevel = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
instance.performBonemeal(serverLevel, randomSource, blockPos, blockState);
net.minecraft.world.level.block.CropBlock#randomTick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/CropBlock.java:85 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ randomTick ตาม implementation ของ CropBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getRawBrightness(), getAge(), getMaxAge(), getGrowthSpeed(), nextInt(), setBlock(), getStateForAge().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void randomTick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.randomTick(blockState, serverLevel, blockPos, randomSource);
}
CrossCollisionBlock
- Full name:
net.minecraft.world.level.block.CrossCollisionBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/CrossCollisionBlock.java - Type:
class - Modifiers:
public abstract - Extends:
Block - Implements:
SimpleWaterloggedBlock
net.minecraft.world.level.block.CrossCollisionBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/CrossCollisionBlock.java:47 - Modifiers:
protected abstract - Return:
MapCodec<? extends CrossCollisionBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ CrossCollisionBlock
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CrossCollisionBlock#CrossCollisionBlock(float,float,float,float,float,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/CrossCollisionBlock.java:37 - Modifiers:
protected - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ CrossCollisionBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
มีการวนลูป. แก้ state: collisionShapeByIndex, shapeByIndex. เรียกต่อ: makeShapes(), getPossibleStates(), getAABBIndex().
Parameters
float ffloat gfloat hfloat ifloat jBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
CrossCollisionBlock instance = new CrossCollisionBlock(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, properties);
net.minecraft.world.level.block.CrossCollisionBlock#getAABBIndex(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CrossCollisionBlock.java:107 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า AABBIndex
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: computeIntIfAbsent(), getValue(), indexFor(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected int getAABBIndex(BlockState blockState) {
return super.getAABBIndex(blockState);
}
net.minecraft.world.level.block.CrossCollisionBlock#getCollisionShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/CrossCollisionBlock.java:98 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Collision Shape
ทำงานยังไง
เรียกต่อ: getAABBIndex(). คืนค่า: this.collisionShapeByIndex[this.getAABBIndex(blockState)].
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getCollisionShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getCollisionShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.CrossCollisionBlock#getFluidState(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CrossCollisionBlock.java:130 - Modifiers:
protected - Return:
FluidState
คืออะไร
อ่านค่า Fluid State
ทำงานยังไง
เรียกต่อ: getValue(), getSource(). คืนค่า: blockState.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(blockState).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected FluidState getFluidState(BlockState blockState) {
return super.getFluidState(blockState);
}
net.minecraft.world.level.block.CrossCollisionBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/CrossCollisionBlock.java:93 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
เรียกต่อ: getAABBIndex(). คืนค่า: this.shapeByIndex[this.getAABBIndex(blockState)].
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.CrossCollisionBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/CrossCollisionBlock.java:135 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.CrossCollisionBlock#makeShapes(float,float,float,float,float)
- Origin:
common - Source:
net/minecraft/world/level/block/CrossCollisionBlock.java:50 - Modifiers:
protected - Return:
VoxelShape[]
คืออะไร
สร้าง Shapes
ทำงานยังไง
มีการวนลูป. เรียกต่อ: box(), or(), empty(). คืนค่า: voxelShapes.
Parameters
float ffloat gfloat hfloat ifloat j
ตัวอย่างใช้งาน
@Override
protected VoxelShape[] makeShapes(float f, float g, float h, float i, float j) {
return super.makeShapes(f, g, h, i, j);
}
net.minecraft.world.level.block.CrossCollisionBlock#mirror(BlockState,Mirror)
- Origin:
common - Source:
net/minecraft/world/level/block/CrossCollisionBlock.java:163 - Modifiers:
protected - Return:
BlockState
คืออะไร
ดำเนินการ mirror ตาม implementation ของ CrossCollisionBlock
ทำงานยังไง
แยกกรณีด้วย switch. เรียกต่อ: setValue(), getValue(). มีจุด return อย่างน้อย 3 จุด.
Parameters
BlockState blockStateMirror mirror
ตัวอย่างใช้งาน
BlockState blockState = ...;
Mirror mirror = ...;
@Override
protected BlockState mirror(BlockState blockState, Mirror mirror) {
return super.mirror(blockState, mirror);
}
net.minecraft.world.level.block.CrossCollisionBlock#propagatesSkylightDown(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/CrossCollisionBlock.java:88 - Modifiers:
protected - Return:
boolean
คืออะไร
ดำเนินการ propagatesSkylightDown ตาม implementation ของ CrossCollisionBlock
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: !blockState.getValue(WATERLOGGED).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean propagatesSkylightDown(BlockState blockState) {
return super.propagatesSkylightDown(blockState);
}
net.minecraft.world.level.block.CrossCollisionBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/CrossCollisionBlock.java:140 - Modifiers:
protected - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
แยกกรณีด้วย switch. เรียกต่อ: setValue(), getValue(). คืนค่า: blockState.
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
BlockState blockState = ...;
Rotation rotation = ...;
@Override
protected BlockState rotate(BlockState blockState, Rotation rotation) {
return super.rotate(blockState, rotation);
}
CryingObsidianBlock
- Full name:
net.minecraft.world.level.block.CryingObsidianBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/CryingObsidianBlock.java - Type:
class - Modifiers:
public - Extends:
Block
net.minecraft.world.level.block.CryingObsidianBlock#animateTick(BlockState,Level,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/CryingObsidianBlock.java:24 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ animateTick ตาม implementation ของ CryingObsidianBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: nextInt(), getRandom(), relative(), getBlockState(), canOcclude(), isFaceSturdy(), getOpposite(), getStepX().
Parameters
BlockState blockStateLevel levelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
CryingObsidianBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
instance.animateTick(blockState, level, blockPos, randomSource);
net.minecraft.world.level.block.CryingObsidianBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/CryingObsidianBlock.java:15 - Modifiers:
public - Return:
MapCodec<CryingObsidianBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ CryingObsidianBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.CryingObsidianBlock#CryingObsidianBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/CryingObsidianBlock.java:20 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ CryingObsidianBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
CryingObsidianBlock instance = new CryingObsidianBlock(properties);
DaylightDetectorBlock
- Full name:
net.minecraft.world.level.block.DaylightDetectorBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/DaylightDetectorBlock.java - Type:
class - Modifiers:
public - Extends:
BaseEntityBlock
net.minecraft.world.level.block.DaylightDetectorBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/DaylightDetectorBlock.java:34 - Modifiers:
public - Return:
MapCodec<DaylightDetectorBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ DaylightDetectorBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.DaylightDetectorBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/DaylightDetectorBlock.java:117 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.DaylightDetectorBlock#DaylightDetectorBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/DaylightDetectorBlock.java:39 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ DaylightDetectorBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
DaylightDetectorBlock instance = new DaylightDetectorBlock(properties);
net.minecraft.world.level.block.DaylightDetectorBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/DaylightDetectorBlock.java:44 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
คืนค่า: SHAPE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.DaylightDetectorBlock#getSignal(BlockState,BlockGetter,BlockPos,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/DaylightDetectorBlock.java:54 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Signal
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: blockState.getValue(POWER).
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosDirection direction
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
Direction direction = ...;
@Override
protected int getSignal(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, Direction direction) {
return super.getSignal(blockState, blockGetter, blockPos, direction);
}
net.minecraft.world.level.block.DaylightDetectorBlock#getTicker(Level,BlockState,BlockEntityType<T>)
- Origin:
common - Source:
net/minecraft/world/level/block/DaylightDetectorBlock.java:103 - Modifiers:
public - Return:
BlockEntityTicker<T>
คืออะไร
อ่านค่า Ticker
ทำงานยังไง
เรียกต่อ: dimensionType(), hasSkyLight(), createTickerHelper().
Parameters
Level levelBlockState blockStateBlockEntityType<T> blockEntityType
ตัวอย่างใช้งาน
DaylightDetectorBlock instance = ...;
Level level = ...;
BlockState blockState = ...;
BlockEntityType<T> blockEntityType = ...;
BlockEntityTicker<T> result = instance.getTicker(level, blockState, blockEntityType);
net.minecraft.world.level.block.DaylightDetectorBlock#isSignalSource(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/DaylightDetectorBlock.java:93 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Signal Source
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean isSignalSource(BlockState blockState) {
return super.isSignalSource(blockState);
}
net.minecraft.world.level.block.DaylightDetectorBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/DaylightDetectorBlock.java:98 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ DaylightDetectorBlock
ทำงานยังไง
สร้างออบเจ็กต์: DaylightDetectorBlockEntity. คืนค่า: new DaylightDetectorBlockEntity(blockPos, blockState).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
DaylightDetectorBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
net.minecraft.world.level.block.DaylightDetectorBlock#useShapeForLightOcclusion(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/DaylightDetectorBlock.java:49 - Modifiers:
protected - Return:
boolean
คืออะไร
ใช้งาน Shape For Light Occlusion
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean useShapeForLightOcclusion(BlockState blockState) {
return super.useShapeForLightOcclusion(blockState);
}
net.minecraft.world.level.block.DaylightDetectorBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/DaylightDetectorBlock.java:77 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: mayBuild(), cycle(), setBlock(), gameEvent(), of(), updateSignalStrength(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
DeadBushBlock
- Full name:
net.minecraft.world.level.block.DeadBushBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/DeadBushBlock.java - Type:
class - Modifiers:
public - Extends:
BushBlock
net.minecraft.world.level.block.DeadBushBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/DeadBushBlock.java:17 - Modifiers:
public - Return:
MapCodec<DeadBushBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ DeadBushBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.DeadBushBlock#DeadBushBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/DeadBushBlock.java:22 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ DeadBushBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.DeadBushBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/DeadBushBlock.java:26 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
คืนค่า: SHAPE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.DeadBushBlock#mayPlaceOn(BlockState,BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/DeadBushBlock.java:31 - Modifiers:
protected - Return:
boolean
คืออะไร
ดำเนินการ mayPlaceOn ตาม implementation ของ DeadBushBlock
ทำงานยังไง
เรียกต่อ: is(). คืนค่า: blockState.is(BlockTags.DEAD_BUSH_MAY_PLACE_ON).
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
@Override
protected boolean mayPlaceOn(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos) {
return super.mayPlaceOn(blockState, blockGetter, blockPos);
}
DecoratedPotBlock
- Full name:
net.minecraft.world.level.block.DecoratedPotBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/DecoratedPotBlock.java - Type:
class - Modifiers:
public - Extends:
BaseEntityBlock - Implements:
SimpleWaterloggedBlock
net.minecraft.world.level.block.DecoratedPotBlock#appendHoverText(ItemStack,Item.TooltipContext,List<Component>,TooltipFlag)
- Origin:
common - Source:
net/minecraft/world/level/block/DecoratedPotBlock.java:217 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ appendHoverText ตาม implementation ของ DecoratedPotBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getOrDefault(), equals(), add(), of(), front(), left(), right(), back(). สร้างออบเจ็กต์: ItemStack.
Parameters
ItemStack itemStackItem.TooltipContext tooltipContextList<Component> listTooltipFlag tooltipFlag
ตัวอย่างใช้งาน
DecoratedPotBlock instance = ...;
ItemStack itemStack = ...;
Item.TooltipContext tooltipContext = ...;
List<Component> list = ...;
TooltipFlag tooltipFlag = ...;
instance.appendHoverText(itemStack, tooltipContext, list, tooltipFlag);
net.minecraft.world.level.block.DecoratedPotBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/DecoratedPotBlock.java:65 - Modifiers:
public - Return:
MapCodec<DecoratedPotBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ DecoratedPotBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.DecoratedPotBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/DecoratedPotBlock.java:164 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.DecoratedPotBlock#DecoratedPotBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/DecoratedPotBlock.java:70 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ DecoratedPotBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
DecoratedPotBlock instance = new DecoratedPotBlock(properties);
net.minecraft.world.level.block.DecoratedPotBlock#getAnalogOutputSignal(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/DecoratedPotBlock.java:252 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Analog Output Signal
ทำงานยังไง
เรียกต่อ: getRedstoneSignalFromBlockEntity(), getBlockEntity(). คืนค่า: AbstractContainerMenu.getRedstoneSignalFromBlockEntity(level.getBlockEntity(blockPos)).
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected int getAnalogOutputSignal(BlockState blockState, Level level, BlockPos blockPos) {
return super.getAnalogOutputSignal(blockState, level, blockPos);
}
net.minecraft.world.level.block.DecoratedPotBlock#getCloneItemStack(LevelReader,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/DecoratedPotBlock.java:237 - Modifiers:
protected - Return:
ItemStack
คืออะไร
อ่านค่า Clone Item Stack
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity(), getDecorations(), createDecoratedPotItem(). มีจุด return อย่างน้อย 2 จุด.
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockStateboolean bl
ตัวอย่างใช้งาน
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected ItemStack getCloneItemStack(LevelReader levelReader, BlockPos blockPos, BlockState blockState, boolean bl) {
return super.getCloneItemStack(levelReader, blockPos, blockState, bl);
}
net.minecraft.world.level.block.DecoratedPotBlock#getDrops(BlockState,LootParams.Builder)
- Origin:
common - Source:
net/minecraft/world/level/block/DecoratedPotBlock.java:181 - Modifiers:
protected - Return:
List<ItemStack>
คืออะไร
อ่านค่า Drops
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getOptionalParameter(), withDynamicDrop(), getDecorations(), ordered(), accept(), getDefaultInstance(). คืนค่า: super.getDrops(blockState, builder).
Parameters
BlockState blockStateLootParams.Builder builder
ตัวอย่างใช้งาน
BlockState blockState = ...;
LootParams.Builder builder = ...;
@Override
protected List<ItemStack> getDrops(BlockState blockState, LootParams.Builder builder) {
return super.getDrops(blockState, builder);
}
net.minecraft.world.level.block.DecoratedPotBlock#getFluidState(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/DecoratedPotBlock.java:207 - Modifiers:
protected - Return:
FluidState
คืออะไร
อ่านค่า Fluid State
ทำงานยังไง
เรียกต่อ: getValue(), getSource(). คืนค่า: blockState.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(blockState).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected FluidState getFluidState(BlockState blockState) {
return super.getFluidState(blockState);
}
net.minecraft.world.level.block.DecoratedPotBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/DecoratedPotBlock.java:159 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
คืนค่า: BOUNDING_BOX.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.DecoratedPotBlock#getSoundType(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/DecoratedPotBlock.java:212 - Modifiers:
protected - Return:
SoundType
คืออะไร
อ่านค่า Sound Type
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: blockState.getValue(CRACKED) ? SoundType.DECORATED_POT_CRACKED : SoundType.DECORATED_POT.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected SoundType getSoundType(BlockState blockState) {
return super.getSoundType(blockState);
}
net.minecraft.world.level.block.DecoratedPotBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/DecoratedPotBlock.java:93 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: getLevel(), getFluidState(), getClickedPos(), defaultBlockState(), setValue(), getHorizontalDirection(), getType().
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
DecoratedPotBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.DecoratedPotBlock#hasAnalogOutputSignal(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/DecoratedPotBlock.java:247 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Analog Output Signal
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean hasAnalogOutputSignal(BlockState blockState) {
return super.hasAnalogOutputSignal(blockState);
}
net.minecraft.world.level.block.DecoratedPotBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/DecoratedPotBlock.java:154 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.DecoratedPotBlock#mirror(BlockState,Mirror)
- Origin:
common - Source:
net/minecraft/world/level/block/DecoratedPotBlock.java:262 - Modifiers:
protected - Return:
BlockState
คืออะไร
ดำเนินการ mirror ตาม implementation ของ DecoratedPotBlock
ทำงานยังไง
เรียกต่อ: rotate(), getRotation(), getValue(). คืนค่า: blockState.rotate(mirror.getRotation(blockState.getValue(HORIZONTAL_FACING))).
Parameters
BlockState blockStateMirror mirror
ตัวอย่างใช้งาน
BlockState blockState = ...;
Mirror mirror = ...;
@Override
protected BlockState mirror(BlockState blockState, Mirror mirror) {
return super.mirror(blockState, mirror);
}
net.minecraft.world.level.block.DecoratedPotBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/DecoratedPotBlock.java:169 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ DecoratedPotBlock
ทำงานยังไง
สร้างออบเจ็กต์: DecoratedPotBlockEntity. คืนค่า: new DecoratedPotBlockEntity(blockPos, blockState).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
DecoratedPotBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
net.minecraft.world.level.block.DecoratedPotBlock#onProjectileHit(Level,BlockState,BlockHitResult,Projectile)
- Origin:
common - Source:
net/minecraft/world/level/block/DecoratedPotBlock.java:228 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Projectile Hit
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockPos(), mayInteract(), mayBreak(), setBlock(), setValue(), destroyBlock().
Parameters
Level levelBlockState blockStateBlockHitResult blockHitResultProjectile projectile
ตัวอย่างใช้งาน
Level level = ...;
BlockState blockState = ...;
BlockHitResult blockHitResult = ...;
Projectile projectile = ...;
@Override
protected void onProjectileHit(Level level, BlockState blockState, BlockHitResult blockHitResult, Projectile projectile) {
super.onProjectileHit(level, blockState, blockHitResult, projectile);
}
net.minecraft.world.level.block.DecoratedPotBlock#onRemove(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/DecoratedPotBlock.java:175 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Remove
ทำงานยังไง
เรียกต่อ: dropContentsOnDestroy().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onRemove(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onRemove(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.DecoratedPotBlock#playerWillDestroy(Level,BlockPos,BlockState,Player)
- Origin:
common - Source:
net/minecraft/world/level/block/DecoratedPotBlock.java:195 - Modifiers:
public - Return:
BlockState
คืออะไร
ดำเนินการ playerWillDestroy ตาม implementation ของ DecoratedPotBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getMainHandItem(), is(), hasTag(), setValue(), setBlock(). คืนค่า: super.playerWillDestroy(level, blockPos, blockState2, player).
Parameters
Level levelBlockPos blockPosBlockState blockStatePlayer player
ตัวอย่างใช้งาน
DecoratedPotBlock instance = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
Player player = ...;
BlockState result = instance.playerWillDestroy(level, blockPos, blockState, player);
net.minecraft.world.level.block.DecoratedPotBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/DecoratedPotBlock.java:257 - Modifiers:
protected - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
เรียกต่อ: setValue(), getValue(). คืนค่า: blockState.setValue(HORIZONTAL_FACING, rotation.rotate(blockState.getValue(HORIZONTAL_FACING))).
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
BlockState blockState = ...;
Rotation rotation = ...;
@Override
protected BlockState rotate(BlockState blockState, Rotation rotation) {
return super.rotate(blockState, rotation);
}
net.minecraft.world.level.block.DecoratedPotBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/DecoratedPotBlock.java:75 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), scheduleTick(), getTickDelay(). คืนค่า: super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource).
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
net.minecraft.world.level.block.DecoratedPotBlock#useItemOn(ItemStack,BlockState,Level,BlockPos,Player,InteractionHand,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/DecoratedPotBlock.java:102 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Item On
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity(), getTheItem(), isEmpty(), isSameItemSameComponents(), getCount(), getMaxStackSize(), wobble(), awardStat(). มีจุด return อย่างน้อย 4 จุด.
Parameters
ItemStack itemStackBlockState blockStateLevel levelBlockPos blockPosPlayer playerInteractionHand interactionHandBlockHitResult blockHitResult
ตัวอย่างใช้งาน
ItemStack itemStack = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
InteractionHand interactionHand = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useItemOn(ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult) {
return super.useItemOn(itemStack, blockState, level, blockPos, player, interactionHand, blockHitResult);
}
net.minecraft.world.level.block.DecoratedPotBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/DecoratedPotBlock.java:142 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity(), playSound(), wobble(), gameEvent(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
DetectorRailBlock
- Full name:
net.minecraft.world.level.block.DetectorRailBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/DetectorRailBlock.java - Type:
class - Modifiers:
public - Extends:
BaseRailBlock
net.minecraft.world.level.block.DetectorRailBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/DetectorRailBlock.java:34 - Modifiers:
public - Return:
MapCodec<DetectorRailBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ DetectorRailBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.DetectorRailBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/DetectorRailBlock.java:287 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.DetectorRailBlock#DetectorRailBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/DetectorRailBlock.java:39 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ DetectorRailBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
DetectorRailBlock instance = new DetectorRailBlock(properties);
net.minecraft.world.level.block.DetectorRailBlock#entityInside(BlockState,Level,BlockPos,Entity)
- Origin:
common - Source:
net/minecraft/world/level/block/DetectorRailBlock.java:49 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ entityInside ตาม implementation ของ DetectorRailBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), checkPressed().
Parameters
BlockState blockStateLevel levelBlockPos blockPosEntity entity
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Entity entity = ...;
@Override
protected void entityInside(BlockState blockState, Level level, BlockPos blockPos, Entity entity) {
super.entityInside(blockState, level, blockPos, entity);
}
net.minecraft.world.level.block.DetectorRailBlock#getAnalogOutputSignal(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/DetectorRailBlock.java:141 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Analog Output Signal
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), getInteractingMinecartOfType(), isEmpty(), get(), getCommandBlock(), getSuccessCount(), getRedstoneSignalFromContainer(). มีจุด return อย่างน้อย 3 จุด.
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected int getAnalogOutputSignal(BlockState blockState, Level level, BlockPos blockPos) {
return super.getAnalogOutputSignal(blockState, level, blockPos);
}
net.minecraft.world.level.block.DetectorRailBlock#getDirectSignal(BlockState,BlockGetter,BlockPos,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/DetectorRailBlock.java:70 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Direct Signal
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosDirection direction
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
Direction direction = ...;
@Override
protected int getDirectSignal(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, Direction direction) {
return super.getDirectSignal(blockState, blockGetter, blockPos, direction);
}
net.minecraft.world.level.block.DetectorRailBlock#getShapeProperty()
- Origin:
common - Source:
net/minecraft/world/level/block/DetectorRailBlock.java:131 - Modifiers:
public - Return:
Property<RailShape>
คืออะไร
อ่านค่า Shape Property
ทำงานยังไง
คืนค่า: SHAPE.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.DetectorRailBlock#getSignal(BlockState,BlockGetter,BlockPos,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/DetectorRailBlock.java:65 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Signal
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: blockState.getValue(POWERED) ? 15 : 0.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosDirection direction
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
Direction direction = ...;
@Override
protected int getSignal(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, Direction direction) {
return super.getSignal(blockState, blockGetter, blockPos, direction);
}
net.minecraft.world.level.block.DetectorRailBlock#hasAnalogOutputSignal(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/DetectorRailBlock.java:136 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Analog Output Signal
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean hasAnalogOutputSignal(BlockState blockState) {
return super.hasAnalogOutputSignal(blockState);
}
net.minecraft.world.level.block.DetectorRailBlock#isSignalSource(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/DetectorRailBlock.java:44 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Signal Source
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean isSignalSource(BlockState blockState) {
return super.isSignalSource(blockState);
}
net.minecraft.world.level.block.DetectorRailBlock#mirror(BlockState,Mirror)
- Origin:
common - Source:
net/minecraft/world/level/block/DetectorRailBlock.java:242 - Modifiers:
protected - Return:
BlockState
คืออะไร
ดำเนินการ mirror ตาม implementation ของ DetectorRailBlock
ทำงานยังไง
แยกกรณีด้วย switch. เรียกต่อ: getValue(), setValue(). มีจุด return อย่างน้อย 14 จุด.
Parameters
BlockState blockStateMirror mirror
ตัวอย่างใช้งาน
BlockState blockState = ...;
Mirror mirror = ...;
@Override
protected BlockState mirror(BlockState blockState, Mirror mirror) {
return super.mirror(blockState, mirror);
}
net.minecraft.world.level.block.DetectorRailBlock#onPlace(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/DetectorRailBlock.java:123 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Place
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), getBlock(), updateState(), checkPressed().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onPlace(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onPlace(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.DetectorRailBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/DetectorRailBlock.java:169 - Modifiers:
protected - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
แยกกรณีด้วย switch. เรียกต่อ: getValue(), setValue(). มีจุด return อย่างน้อย 29 จุด.
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
BlockState blockState = ...;
Rotation rotation = ...;
@Override
protected BlockState rotate(BlockState blockState, Rotation rotation) {
return super.rotate(blockState, rotation);
}
net.minecraft.world.level.block.DetectorRailBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/DetectorRailBlock.java:58 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), checkPressed().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.DetectorRailBlock#updatePowerToConnected(Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/DetectorRailBlock.java:114 - Modifiers:
protected - Return:
void
คืออะไร
อัปเดต Power To Connected
ทำงานยังไง
มีการวนลูป. เรียกต่อ: getConnections(), getBlockState(), neighborChanged(), getBlock(). สร้างออบเจ็กต์: RailState.
Parameters
Level levelBlockPos blockPosBlockState blockStateboolean bl
ตัวอย่างใช้งาน
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected void updatePowerToConnected(Level level, BlockPos blockPos, BlockState blockState, boolean bl) {
super.updatePowerToConnected(level, blockPos, blockState, bl);
}
DiodeBlock
- Full name:
net.minecraft.world.level.block.DiodeBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/DiodeBlock.java - Type:
class - Modifiers:
public abstract - Extends:
HorizontalDirectionalBlock
net.minecraft.world.level.block.DiodeBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/DiodeBlock.java:43 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: below(), canSurviveOn(), getBlockState(). คืนค่า: this.canSurviveOn(levelReader, blockPos2, levelReader.getBlockState(blockPos2)).
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.DiodeBlock#canSurviveOn(LevelReader,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/DiodeBlock.java:49 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive On
ทำงานยังไง
เรียกต่อ: isFaceSturdy(). คืนค่า: blockState.isFaceSturdy(levelReader, blockPos, Direction.UP, SupportType.RIGID).
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected boolean canSurviveOn(LevelReader levelReader, BlockPos blockPos, BlockState blockState) {
return super.canSurviveOn(levelReader, blockPos, blockState);
}
net.minecraft.world.level.block.DiodeBlock#checkTickOnNeighbor(Level,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/DiodeBlock.java:98 - Modifiers:
protected - Return:
void
คืออะไร
ตรวจสอบ Tick On Neighbor
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isLocked(), getValue(), shouldTurnOn(), getBlockTicks(), willTickThisTick(), shouldPrioritize(), scheduleTick(), getDelay().
Parameters
Level levelBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected void checkTickOnNeighbor(Level level, BlockPos blockPos, BlockState blockState) {
super.checkTickOnNeighbor(level, blockPos, blockState);
}
net.minecraft.world.level.block.DiodeBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/DiodeBlock.java:35 - Modifiers:
protected abstract - Return:
MapCodec<? extends DiodeBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ DiodeBlock
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.DiodeBlock#DiodeBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/DiodeBlock.java:31 - Modifiers:
protected - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ DiodeBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.DiodeBlock#getAlternateSignal(SignalGetter,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/DiodeBlock.java:135 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Alternate Signal
ทำงานยังไง
เรียกต่อ: getValue(), getClockWise(), getCounterClockWise(), sideInputDiodesOnly(), max(), getControlInputSignal(), relative().
Parameters
SignalGetter signalGetterBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
SignalGetter signalGetter = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected int getAlternateSignal(SignalGetter signalGetter, BlockPos blockPos, BlockState blockState) {
return super.getAlternateSignal(signalGetter, blockPos, blockState);
}
net.minecraft.world.level.block.DiodeBlock#getDelay(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/DiodeBlock.java:202 - Modifiers:
protected abstract - Return:
int
คืออะไร
อ่านค่า Delay
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected int getDelay(BlockState blockState) {
return super.getDelay(blockState);
}
net.minecraft.world.level.block.DiodeBlock#getDirectSignal(BlockState,BlockGetter,BlockPos,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/DiodeBlock.java:69 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Direct Signal
ทำงานยังไง
เรียกต่อ: getSignal(). คืนค่า: blockState.getSignal(blockGetter, blockPos, direction).
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosDirection direction
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
Direction direction = ...;
@Override
protected int getDirectSignal(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, Direction direction) {
return super.getDirectSignal(blockState, blockGetter, blockPos, direction);
}
net.minecraft.world.level.block.DiodeBlock#getInputSignal(Level,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/DiodeBlock.java:123 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Input Signal
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), relative(), getSignal(), getBlockState(), max(), is(). มีจุด return อย่างน้อย 2 จุด.
Parameters
Level levelBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected int getInputSignal(Level level, BlockPos blockPos, BlockState blockState) {
return super.getInputSignal(level, blockPos, blockState);
}
net.minecraft.world.level.block.DiodeBlock#getOutputSignal(BlockGetter,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/DiodeBlock.java:188 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Output Signal
ทำงานยังไง
คืนค่า: 15.
Parameters
BlockGetter blockGetterBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected int getOutputSignal(BlockGetter blockGetter, BlockPos blockPos, BlockState blockState) {
return super.getOutputSignal(blockGetter, blockPos, blockState);
}
net.minecraft.world.level.block.DiodeBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/DiodeBlock.java:38 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
คืนค่า: SHAPE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.DiodeBlock#getSignal(BlockState,BlockGetter,BlockPos,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/DiodeBlock.java:74 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Signal
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), getOutputSignal(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosDirection direction
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
Direction direction = ...;
@Override
protected int getSignal(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, Direction direction) {
return super.getSignal(blockState, blockGetter, blockPos, direction);
}
net.minecraft.world.level.block.DiodeBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/DiodeBlock.java:151 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: defaultBlockState(), setValue(), getHorizontalDirection(), getOpposite(). คืนค่า: this.defaultBlockState().setValue(FACING, blockPlaceContext.getHorizontalDirection().getOpposite()).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
DiodeBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.DiodeBlock#isDiode(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/DiodeBlock.java:192 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Diode
ทำงานยังไง
เรียกต่อ: getBlock(). คืนค่า: blockState.getBlock() instanceof DiodeBlock.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
net.minecraft.world.level.block.DiodeBlock#isLocked(LevelReader,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/DiodeBlock.java:115 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Locked
ทำงานยังไง
คืนค่า: false.
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
DiodeBlock instance = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isLocked(levelReader, blockPos, blockState);
net.minecraft.world.level.block.DiodeBlock#isSignalSource(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/DiodeBlock.java:146 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Signal Source
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean isSignalSource(BlockState blockState) {
return super.isSignalSource(blockState);
}
net.minecraft.world.level.block.DiodeBlock#neighborChanged(BlockState,Level,BlockPos,Block,Orientation,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/DiodeBlock.java:83 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ neighborChanged ตาม implementation ของ DiodeBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: canSurvive(), checkTickOnNeighbor(), hasBlockEntity(), getBlockEntity(), dropResources(), removeBlock(), values(), updateNeighborsAt().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlock blockOrientation orientationboolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Block block = ...;
Orientation orientation = ...;
@Override
protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, Orientation orientation, boolean bl) {
super.neighborChanged(blockState, level, blockPos, block, orientation, bl);
}
net.minecraft.world.level.block.DiodeBlock#onPlace(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/DiodeBlock.java:163 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Place
ทำงานยังไง
เรียกต่อ: updateNeighborsInFront().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onPlace(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onPlace(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.DiodeBlock#onRemove(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/DiodeBlock.java:168 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Remove
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), getBlock(), updateNeighborsInFront().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onRemove(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onRemove(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.DiodeBlock#setPlacedBy(Level,BlockPos,BlockState,LivingEntity,ItemStack)
- Origin:
common - Source:
net/minecraft/world/level/block/DiodeBlock.java:156 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Placed By
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: shouldTurnOn(), scheduleTick().
Parameters
Level levelBlockPos blockPosBlockState blockStateLivingEntity livingEntityItemStack itemStack
ตัวอย่างใช้งาน
DiodeBlock instance = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
LivingEntity livingEntity = ...;
ItemStack itemStack = ...;
instance.setPlacedBy(level, blockPos, blockState, livingEntity, itemStack);
net.minecraft.world.level.block.DiodeBlock#shouldPrioritize(BlockGetter,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/DiodeBlock.java:196 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าควร Prioritize
ทำงานยังไง
เรียกต่อ: getValue(), getOpposite(), getBlockState(), relative(), isDiode(). คืนค่า: isDiode(blockState2) && blockState2.getValue(FACING) != direction.
Parameters
BlockGetter blockGetterBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
DiodeBlock instance = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.shouldPrioritize(blockGetter, blockPos, blockState);
net.minecraft.world.level.block.DiodeBlock#shouldTurnOn(Level,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/DiodeBlock.java:119 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าควร Turn On
ทำงานยังไง
เรียกต่อ: getInputSignal(). คืนค่า: this.getInputSignal(level, blockPos, blockState) > 0.
Parameters
Level levelBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected boolean shouldTurnOn(Level level, BlockPos blockPos, BlockState blockState) {
return super.shouldTurnOn(level, blockPos, blockState);
}
net.minecraft.world.level.block.DiodeBlock#sideInputDiodesOnly()
- Origin:
common - Source:
net/minecraft/world/level/block/DiodeBlock.java:184 - Modifiers:
protected - Return:
boolean
คืออะไร
ดำเนินการ sideInputDiodesOnly ตาม implementation ของ DiodeBlock
ทำงานยังไง
คืนค่า: false.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.DiodeBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/DiodeBlock.java:53 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isLocked(), getValue(), shouldTurnOn(), setBlock(), setValue(), scheduleTick(), getDelay().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.DiodeBlock#updateNeighborsInFront(Level,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/DiodeBlock.java:176 - Modifiers:
protected - Return:
void
คืออะไร
อัปเดต Neighbors In Front
ทำงานยังไง
เรียกต่อ: getValue(), relative(), getOpposite(), initialOrientation(), neighborChanged(), updateNeighborsAtExceptFromFacing().
Parameters
Level levelBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected void updateNeighborsInFront(Level level, BlockPos blockPos, BlockState blockState) {
super.updateNeighborsInFront(level, blockPos, blockState);
}
DirectionalBlock
- Full name:
net.minecraft.world.level.block.DirectionalBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/DirectionalBlock.java - Type:
class - Modifiers:
public abstract - Extends:
Block
net.minecraft.world.level.block.DirectionalBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/DirectionalBlock.java:16 - Modifiers:
protected abstract - Return:
MapCodec<? extends DirectionalBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ DirectionalBlock
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.DirectionalBlock#DirectionalBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/DirectionalBlock.java:12 - Modifiers:
protected - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ DirectionalBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
DirectionalBlock instance = new DirectionalBlock(properties);
DirtPathBlock
- Full name:
net.minecraft.world.level.block.DirtPathBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/DirtPathBlock.java - Type:
class - Modifiers:
public - Extends:
Block
net.minecraft.world.level.block.DirtPathBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/DirtPathBlock.java:66 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: getBlockState(), above(), isSolid(), getBlock(). คืนค่า: !blockState2.isSolid() || blockState2.getBlock() instanceof FenceGateBlock.
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.DirtPathBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/DirtPathBlock.java:22 - Modifiers:
public - Return:
MapCodec<DirtPathBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ DirtPathBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.DirtPathBlock#DirtPathBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/DirtPathBlock.java:27 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ DirtPathBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.DirtPathBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/DirtPathBlock.java:72 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
คืนค่า: SHAPE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.DirtPathBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/DirtPathBlock.java:36 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: defaultBlockState(), canSurvive(), getLevel(), getClickedPos(), pushEntitiesUp().
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
DirtPathBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.DirtPathBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/DirtPathBlock.java:77 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.DirtPathBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/DirtPathBlock.java:61 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
เรียกต่อ: turnToDirt().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.DirtPathBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/DirtPathBlock.java:43 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canSurvive(), scheduleTick(). คืนค่า: super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource).
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
net.minecraft.world.level.block.DirtPathBlock#useShapeForLightOcclusion(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/DirtPathBlock.java:31 - Modifiers:
protected - Return:
boolean
คืออะไร
ใช้งาน Shape For Light Occlusion
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean useShapeForLightOcclusion(BlockState blockState) {
return super.useShapeForLightOcclusion(blockState);
}
DispenserBlock
- Full name:
net.minecraft.world.level.block.DispenserBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/DispenserBlock.java - Type:
class - Modifiers:
public - Extends:
BaseEntityBlock
net.minecraft.world.level.block.DispenserBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/DispenserBlock.java:54 - Modifiers:
public - Return:
MapCodec<? extends DispenserBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ DispenserBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.DispenserBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/DispenserBlock.java:177 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.DispenserBlock#dispenseFrom(ServerLevel,BlockState,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/DispenserBlock.java:82 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ dispenseFrom ตาม implementation ของ DispenserBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getBlockEntity(), orElse(), warn(), getRandomSlot(), levelEvent(), gameEvent(), of(), getBlockState(). สร้างออบเจ็กต์: BlockSource.
Parameters
ServerLevel serverLevelBlockState blockStateBlockPos blockPos
ตัวอย่างใช้งาน
ServerLevel serverLevel = ...;
BlockState blockState = ...;
BlockPos blockPos = ...;
@Override
protected void dispenseFrom(ServerLevel serverLevel, BlockState blockState, BlockPos blockPos) {
super.dispenseFrom(serverLevel, blockState, blockPos);
}
net.minecraft.world.level.block.DispenserBlock#DispenserBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/DispenserBlock.java:67 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ DispenserBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
DispenserBlock instance = new DispenserBlock(properties);
net.minecraft.world.level.block.DispenserBlock#getAnalogOutputSignal(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/DispenserBlock.java:162 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Analog Output Signal
ทำงานยังไง
เรียกต่อ: getRedstoneSignalFromBlockEntity(), getBlockEntity(). คืนค่า: AbstractContainerMenu.getRedstoneSignalFromBlockEntity(level.getBlockEntity(blockPos)).
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected int getAnalogOutputSignal(BlockState blockState, Level level, BlockPos blockPos) {
return super.getAnalogOutputSignal(blockState, level, blockPos);
}
net.minecraft.world.level.block.DispenserBlock#getDispenseMethod(Level,ItemStack)
- Origin:
common - Source:
net/minecraft/world/level/block/DispenserBlock.java:102 - Modifiers:
protected - Return:
DispenseItemBehavior
คืออะไร
อ่านค่า Dispense Method
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isItemEnabled(), enabledFeatures(), get(), getItem(), getDefaultDispenseMethod(). มีจุด return อย่างน้อย 2 จุด.
Parameters
Level levelItemStack itemStack
ตัวอย่างใช้งาน
Level level = ...;
ItemStack itemStack = ...;
@Override
protected DispenseItemBehavior getDispenseMethod(Level level, ItemStack itemStack) {
return super.getDispenseMethod(level, itemStack);
}
net.minecraft.world.level.block.DispenserBlock#getDispensePosition(BlockSource)
- Origin:
common - Source:
net/minecraft/world/level/block/DispenserBlock.java:148 - Modifiers:
public static - Return:
Position
คืออะไร
อ่านค่า Dispense Position
ทำงานยังไง
คืนค่า: getDispensePosition(blockSource, 0.7, Vec3.ZERO).
Parameters
BlockSource blockSource
ตัวอย่างใช้งาน
net.minecraft.world.level.block.DispenserBlock#getDispensePosition(BlockSource,double,Vec3)
- Origin:
common - Source:
net/minecraft/world/level/block/DispenserBlock.java:152 - Modifiers:
public static - Return:
Position
คืออะไร
อ่านค่า Dispense Position
ทำงานยังไง
เรียกต่อ: state(), getValue(), center(), add(), getStepX(), x(), getStepY(), y(). คืนค่า: blockSource.center().add(d * direction.getStepX() + vec3.x(), d * direction.getStepY() + vec3.y(), d * direction.getStepZ() + vec3.z()).
Parameters
BlockSource blockSourcedouble dVec3 vec3
ตัวอย่างใช้งาน
BlockSource blockSource = ...;
Vec3 vec3 = ...;
Position result = DispenserBlock.getDispensePosition(blockSource, 0.0D, vec3);
net.minecraft.world.level.block.DispenserBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/DispenserBlock.java:137 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: defaultBlockState(), setValue(), getNearestLookingDirection(), getOpposite(). คืนค่า: this.defaultBlockState().setValue(FACING, blockPlaceContext.getNearestLookingDirection().getOpposite()).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
DispenserBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.DispenserBlock#hasAnalogOutputSignal(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/DispenserBlock.java:157 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Analog Output Signal
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean hasAnalogOutputSignal(BlockState blockState) {
return super.hasAnalogOutputSignal(blockState);
}
net.minecraft.world.level.block.DispenserBlock#mirror(BlockState,Mirror)
- Origin:
common - Source:
net/minecraft/world/level/block/DispenserBlock.java:172 - Modifiers:
protected - Return:
BlockState
คืออะไร
ดำเนินการ mirror ตาม implementation ของ DispenserBlock
ทำงานยังไง
เรียกต่อ: rotate(), getRotation(), getValue(). คืนค่า: blockState.rotate(mirror.getRotation(blockState.getValue(FACING))).
Parameters
BlockState blockStateMirror mirror
ตัวอย่างใช้งาน
BlockState blockState = ...;
Mirror mirror = ...;
@Override
protected BlockState mirror(BlockState blockState, Mirror mirror) {
return super.mirror(blockState, mirror);
}
net.minecraft.world.level.block.DispenserBlock#neighborChanged(BlockState,Level,BlockPos,Block,Orientation,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/DispenserBlock.java:115 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ neighborChanged ตาม implementation ของ DispenserBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: hasNeighborSignal(), above(), getValue(), scheduleTick(), setBlock(), setValue().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlock blockOrientation orientationboolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Block block = ...;
Orientation orientation = ...;
@Override
protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, Orientation orientation, boolean bl) {
super.neighborChanged(blockState, level, blockPos, block, orientation, bl);
}
net.minecraft.world.level.block.DispenserBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/DispenserBlock.java:132 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ DispenserBlock
ทำงานยังไง
สร้างออบเจ็กต์: DispenserBlockEntity. คืนค่า: new DispenserBlockEntity(blockPos, blockState).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
DispenserBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
net.minecraft.world.level.block.DispenserBlock#onRemove(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/DispenserBlock.java:142 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Remove
ทำงานยังไง
เรียกต่อ: dropContentsOnDestroy().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onRemove(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onRemove(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.DispenserBlock#registerBehavior(ItemLike,DispenseItemBehavior)
- Origin:
common - Source:
net/minecraft/world/level/block/DispenserBlock.java:59 - Modifiers:
public static - Return:
void
คืออะไร
ลงทะเบียน Behavior
ทำงานยังไง
เรียกต่อ: put(), asItem().
Parameters
ItemLike itemLikeDispenseItemBehavior dispenseItemBehavior
ตัวอย่างใช้งาน
ItemLike itemLike = ...;
DispenseItemBehavior dispenseItemBehavior = ...;
DispenserBlock.registerBehavior(itemLike, dispenseItemBehavior);
net.minecraft.world.level.block.DispenserBlock#registerProjectileBehavior(ItemLike)
- Origin:
common - Source:
net/minecraft/world/level/block/DispenserBlock.java:63 - Modifiers:
public static - Return:
void
คืออะไร
ลงทะเบียน Projectile Behavior
ทำงานยังไง
เรียกต่อ: put(), asItem(). สร้างออบเจ็กต์: ProjectileDispenseBehavior.
Parameters
ItemLike itemLike
ตัวอย่างใช้งาน
net.minecraft.world.level.block.DispenserBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/DispenserBlock.java:167 - Modifiers:
protected - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
เรียกต่อ: setValue(), getValue(). คืนค่า: blockState.setValue(FACING, rotation.rotate(blockState.getValue(FACING))).
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
BlockState blockState = ...;
Rotation rotation = ...;
@Override
protected BlockState rotate(BlockState blockState, Rotation rotation) {
return super.rotate(blockState, rotation);
}
net.minecraft.world.level.block.DispenserBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/DispenserBlock.java:127 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
เรียกต่อ: dispenseFrom().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.DispenserBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/DispenserBlock.java:72 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity(), openMenu(), awardStat(). คืนค่า: InteractionResult.SUCCESS.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
DoorBlock
- Full name:
net.minecraft.world.level.block.DoorBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/DoorBlock.java - Type:
class - Modifiers:
public - Extends:
Block
net.minecraft.world.level.block.DoorBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/DoorBlock.java:244 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: below(), getBlockState(), getValue(), isFaceSturdy(), is(). คืนค่า: blockState.getValue(HALF) == DoubleBlockHalf.LOWER ? blockState2.isFaceSturdy(levelReader, blockPos2, Direction.UP) : blockState2.is(this).
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.DoorBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/DoorBlock.java:57 - Modifiers:
public - Return:
MapCodec<? extends DoorBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ DoorBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.DoorBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/DoorBlock.java:270 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.DoorBlock#DoorBlock(BlockSetType,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/DoorBlock.java:62 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ DoorBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: type. เรียกต่อ: sound(), soundType(), registerDefaultState(), any(), setValue().
Parameters
BlockSetType blockSetTypeBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockSetType blockSetType = ...;
BlockBehaviour.Properties properties = ...;
DoorBlock instance = new DoorBlock(blockSetType, properties);
net.minecraft.world.level.block.DoorBlock#getSeed(BlockState,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/DoorBlock.java:265 - Modifiers:
protected - Return:
long
คืออะไร
อ่านค่า Seed
ทำงานยังไง
เรียกต่อ: getX(), below(), getValue(), getY(), getZ(). คืนค่า: Mth.getSeed(blockPos.getX(), blockPos.below(blockState.getValue(HALF) == DoubleBlockHalf.LOWER ? 0 : 1).getY(), blockPos.getZ()).
Parameters
BlockState blockStateBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockPos blockPos = ...;
@Override
protected long getSeed(BlockState blockState, BlockPos blockPos) {
return super.getSeed(blockState, blockPos);
}
net.minecraft.world.level.block.DoorBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/DoorBlock.java:80 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
แยกกรณีด้วย switch. เรียกต่อ: getValue(). คืนค่า: switch (direction) { case SOUTH -> bl ? SOUTH_AABB : (bl2 ? EAST_AABB : WEST_AABB).
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.DoorBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/DoorBlock.java:145 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getClickedPos(), getLevel(), getY(), getMaxY(), getBlockState(), above(), canBeReplaced(), hasNeighborSignal(). คืนค่า: null.
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
DoorBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.DoorBlock#isOpen(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/DoorBlock.java:218 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Open
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: blockState.getValue(OPEN).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
DoorBlock instance = ...;
BlockState blockState = ...;
boolean result = instance.isOpen(blockState);
net.minecraft.world.level.block.DoorBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/DoorBlock.java:137 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
แยกกรณีด้วย switch. เรียกต่อ: getValue(). คืนค่า: switch (pathComputationType) { case LAND, AIR -> blockState.getValue(OPEN).
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.DoorBlock#isWoodenDoor(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/DoorBlock.java:279 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Wooden Door
ทำงานยังไง
เรียกต่อ: getBlock(), type(), canOpenByHand(). คืนค่า: blockState.getBlock() instanceof DoorBlock doorBlock && doorBlock.type().canOpenByHand().
Parameters
BlockState blockState
ตัวอย่างใช้งาน
net.minecraft.world.level.block.DoorBlock#isWoodenDoor(Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/DoorBlock.java:275 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Wooden Door
ทำงานยังไง
เรียกต่อ: getBlockState(). คืนค่า: isWoodenDoor(level.getBlockState(blockPos)).
Parameters
Level levelBlockPos blockPos
ตัวอย่างใช้งาน
Level level = ...;
BlockPos blockPos = ...;
boolean result = DoorBlock.isWoodenDoor(level, blockPos);
net.minecraft.world.level.block.DoorBlock#mirror(BlockState,Mirror)
- Origin:
common - Source:
net/minecraft/world/level/block/DoorBlock.java:260 - Modifiers:
protected - Return:
BlockState
คืออะไร
ดำเนินการ mirror ตาม implementation ของ DoorBlock
ทำงานยังไง
เรียกต่อ: rotate(), getRotation(), getValue(), cycle(). คืนค่า: mirror == Mirror.NONE ? blockState : blockState.rotate(mirror.getRotation(blockState.getValue(FACING))).cycle(HINGE).
Parameters
BlockState blockStateMirror mirror
ตัวอย่างใช้งาน
BlockState blockState = ...;
Mirror mirror = ...;
@Override
protected BlockState mirror(BlockState blockState, Mirror mirror) {
return super.mirror(blockState, mirror);
}
net.minecraft.world.level.block.DoorBlock#neighborChanged(BlockState,Level,BlockPos,Block,Orientation,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/DoorBlock.java:230 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ neighborChanged ตาม implementation ของ DoorBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: hasNeighborSignal(), relative(), getValue(), defaultBlockState(), is(), playSound(), gameEvent(), setBlock().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlock blockOrientation orientationboolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Block block = ...;
Orientation orientation = ...;
@Override
protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, Orientation orientation, boolean bl) {
super.neighborChanged(blockState, level, blockPos, block, orientation, bl);
}
net.minecraft.world.level.block.DoorBlock#onExplosionHit(BlockState,ServerLevel,BlockPos,Explosion,BiConsumer<ItemStack, BlockPos>)
- Origin:
common - Source:
net/minecraft/world/level/block/DoorBlock.java:117 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Explosion Hit
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canTriggerBlocks(), getValue(), canOpenByWindCharge(), setOpen(), isOpen().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosExplosion explosionBiConsumer<ItemStack, BlockPos> biConsumer
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
Explosion explosion = ...;
BiConsumer<ItemStack, BlockPos> biConsumer = ...;
@Override
protected void onExplosionHit(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, Explosion explosion, BiConsumer<ItemStack, BlockPos> biConsumer) {
super.onExplosionHit(blockState, serverLevel, blockPos, explosion, biConsumer);
}
net.minecraft.world.level.block.DoorBlock#playerWillDestroy(Level,BlockPos,BlockState,Player)
- Origin:
common - Source:
net/minecraft/world/level/block/DoorBlock.java:128 - Modifiers:
public - Return:
BlockState
คืออะไร
ดำเนินการ playerWillDestroy ตาม implementation ของ DoorBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isCreative(), hasCorrectToolForDrops(), preventDropFromBottomPart(). คืนค่า: super.playerWillDestroy(level, blockPos, blockState, player).
Parameters
Level levelBlockPos blockPosBlockState blockStatePlayer player
ตัวอย่างใช้งาน
DoorBlock instance = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
Player player = ...;
BlockState result = instance.playerWillDestroy(level, blockPos, blockState, player);
net.minecraft.world.level.block.DoorBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/DoorBlock.java:255 - Modifiers:
protected - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
เรียกต่อ: setValue(), getValue(). คืนค่า: blockState.setValue(FACING, rotation.rotate(blockState.getValue(FACING))).
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
BlockState blockState = ...;
Rotation rotation = ...;
@Override
protected BlockState rotate(BlockState blockState, Rotation rotation) {
return super.rotate(blockState, rotation);
}
net.minecraft.world.level.block.DoorBlock#setOpen(Entity,Level,BlockState,BlockPos,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/DoorBlock.java:222 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Open
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), getValue(), setBlock(), setValue(), playSound(), gameEvent().
Parameters
Entity entityLevel levelBlockState blockStateBlockPos blockPosboolean bl
ตัวอย่างใช้งาน
DoorBlock instance = ...;
Entity entity = ...;
Level level = ...;
BlockState blockState = ...;
BlockPos blockPos = ...;
instance.setOpen(entity, level, blockState, blockPos, true);
net.minecraft.world.level.block.DoorBlock#setPlacedBy(Level,BlockPos,BlockState,LivingEntity,ItemStack)
- Origin:
common - Source:
net/minecraft/world/level/block/DoorBlock.java:163 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Placed By
ทำงานยังไง
เรียกต่อ: setBlock(), above(), setValue().
Parameters
Level levelBlockPos blockPosBlockState blockStateLivingEntity livingEntityItemStack itemStack
ตัวอย่างใช้งาน
DoorBlock instance = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
LivingEntity livingEntity = ...;
ItemStack itemStack = ...;
instance.setPlacedBy(level, blockPos, blockState, livingEntity, itemStack);
net.minecraft.world.level.block.DoorBlock#type()
- Origin:
common - Source:
net/minecraft/world/level/block/DoorBlock.java:76 - Modifiers:
public - Return:
BlockSetType
คืออะไร
ดำเนินการ type ตาม implementation ของ DoorBlock
ทำงานยังไง
คืนค่า: this.type.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.DoorBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/DoorBlock.java:94 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), getAxis(), canSurvive(), defaultBlockState(), getBlock(), setValue().
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
net.minecraft.world.level.block.DoorBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/DoorBlock.java:205 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canOpenByHand(), cycle(), setBlock(), playSound(), getValue(), gameEvent(), isOpen(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
DoubleBlockCombiner
- Full name:
net.minecraft.world.level.block.DoubleBlockCombiner - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/DoubleBlockCombiner.java - Type:
class - Modifiers:
public
net.minecraft.world.level.block.DoubleBlockCombiner#combineWithNeigbour(BlockEntityType<S>,Function<BlockState, DoubleBlockCombiner.BlockType>,Function<BlockState, Direction>,Property<Direction>,BlockState,LevelAccessor,BlockPos,BiPredicate<LevelAccessor, BlockPos>)
- Origin:
common - Source:
net/minecraft/world/level/block/DoubleBlockCombiner.java:14 - Modifiers:
public static - Return:
DoubleBlockCombiner.NeighborCombineResult<S>
คืออะไร
ดำเนินการ combineWithNeigbour ตาม implementation ของ DoubleBlockCombiner
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity(), test(), apply(), relative(), getBlockState(), is(), getBlock(), getValue(). สร้างออบเจ็กต์: DoubleBlockCombiner.NeighborCombineResult.Single<>, DoubleBlockCombiner.NeighborCombineResult.Double<>. มีจุด return อย่างน้อย 6 จุด.
Parameters
BlockEntityType<S> blockEntityTypeFunction<BlockState, DoubleBlockCombiner.BlockType> functionFunction<BlockState, Direction> function2Property<Direction> propertyBlockState blockStateLevelAccessor levelAccessorBlockPos blockPosBiPredicate<LevelAccessor, BlockPos> biPredicate
ตัวอย่างใช้งาน
BlockEntityType<S> blockEntityType = ...;
Function<BlockState, DoubleBlockCombiner.BlockType> function = ...;
Function<BlockState, Direction> function2 = ...;
Property<Direction> property = ...;
BlockState blockState = ...;
LevelAccessor levelAccessor = ...;
BlockPos blockPos = ...;
BiPredicate<LevelAccessor, BlockPos> biPredicate = ...;
DoubleBlockCombiner.NeighborCombineResult<S> result = DoubleBlockCombiner.combineWithNeigbour(blockEntityType, function, function2, property, blockState, levelAccessor, blockPos, biPredicate);
DoubleBlockCombiner$Combiner
- Full name:
net.minecraft.world.level.block.DoubleBlockCombiner$Combiner - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/DoubleBlockCombiner.java - Type:
interface - Modifiers:
public
net.minecraft.world.level.block.DoubleBlockCombiner$Combiner#acceptDouble(S,S)
- Origin:
common - Source:
net/minecraft/world/level/block/DoubleBlockCombiner.java:68 - Modifiers: ``
- Return:
T
คืออะไร
รับค่า Double
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
S objectS object2
ตัวอย่างใช้งาน
DoubleBlockCombiner.Combiner instance = ...;
S object = ...;
S object2 = ...;
T result = instance.acceptDouble(object, object2);
net.minecraft.world.level.block.DoubleBlockCombiner$Combiner#acceptNone()
- Origin:
common - Source:
net/minecraft/world/level/block/DoubleBlockCombiner.java:72 - Modifiers: ``
- Return:
T
คืออะไร
รับค่า None
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.DoubleBlockCombiner$Combiner#acceptSingle(S)
- Origin:
common - Source:
net/minecraft/world/level/block/DoubleBlockCombiner.java:70 - Modifiers: ``
- Return:
T
คืออะไร
รับค่า Single
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
S object
ตัวอย่างใช้งาน
DoubleBlockCombiner.Combiner instance = ...;
S object = ...;
T result = instance.acceptSingle(object);
DoubleBlockCombiner$NeighborCombineResult
- Full name:
net.minecraft.world.level.block.DoubleBlockCombiner$NeighborCombineResult - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/DoubleBlockCombiner.java - Type:
interface - Modifiers:
public
net.minecraft.world.level.block.DoubleBlockCombiner$NeighborCombineResult#apply(DoubleBlockCombiner.Combiner<? super S, T>)
- Origin:
common - Source:
net/minecraft/world/level/block/DoubleBlockCombiner.java:76 - Modifiers: ``
- Return:
T
คืออะไร
นำไปใช้ apply
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
DoubleBlockCombiner.Combiner<? super S, T> combiner
ตัวอย่างใช้งาน
DoubleBlockCombiner.NeighborCombineResult instance = ...;
DoubleBlockCombiner.Combiner<? super S, T> combiner = ...;
T result = instance.apply(combiner);
DoublePlantBlock
- Full name:
net.minecraft.world.level.block.DoublePlantBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/DoublePlantBlock.java - Type:
class - Modifiers:
public - Extends:
BushBlock
net.minecraft.world.level.block.DoublePlantBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/DoublePlantBlock.java:79 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), getBlockState(), below(), is(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.DoublePlantBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/DoublePlantBlock.java:30 - Modifiers:
public - Return:
MapCodec<? extends DoublePlantBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ DoublePlantBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.DoublePlantBlock#copyWaterloggedFrom(LevelReader,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/DoublePlantBlock.java:95 - Modifiers:
public static - Return:
BlockState
คืออะไร
คัดลอก Waterlogged From
ทำงานยังไง
เรียกต่อ: hasProperty(), setValue(), isWaterAt().
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockState result = DoublePlantBlock.copyWaterloggedFrom(levelReader, blockPos, blockState);
net.minecraft.world.level.block.DoublePlantBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/DoublePlantBlock.java:132 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.DoublePlantBlock#DoublePlantBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/DoublePlantBlock.java:35 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ DoublePlantBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
DoublePlantBlock instance = new DoublePlantBlock(properties);
net.minecraft.world.level.block.DoublePlantBlock#getSeed(BlockState,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/DoublePlantBlock.java:137 - Modifiers:
protected - Return:
long
คืออะไร
อ่านค่า Seed
ทำงานยังไง
เรียกต่อ: getX(), below(), getValue(), getY(), getZ(). คืนค่า: Mth.getSeed(blockPos.getX(), blockPos.below(blockState.getValue(HALF) == DoubleBlockHalf.LOWER ? 0 : 1).getY(), blockPos.getZ()).
Parameters
BlockState blockStateBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockPos blockPos = ...;
@Override
protected long getSeed(BlockState blockState, BlockPos blockPos) {
return super.getSeed(blockState, blockPos);
}
net.minecraft.world.level.block.DoublePlantBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/DoublePlantBlock.java:63 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: getClickedPos(), getLevel(), getY(), getMaxY(), getBlockState(), above(), canBeReplaced().
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
DoublePlantBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.DoublePlantBlock#placeAt(LevelAccessor,BlockState,BlockPos,int)
- Origin:
common - Source:
net/minecraft/world/level/block/DoublePlantBlock.java:89 - Modifiers:
public static - Return:
void
คืออะไร
ดำเนินการ placeAt ตาม implementation ของ DoublePlantBlock
ทำงานยังไง
เรียกต่อ: above(), setBlock(), copyWaterloggedFrom(), setValue().
Parameters
LevelAccessor levelAccessorBlockState blockStateBlockPos blockPosint i
ตัวอย่างใช้งาน
LevelAccessor levelAccessor = ...;
BlockState blockState = ...;
BlockPos blockPos = ...;
DoublePlantBlock.placeAt(levelAccessor, blockState, blockPos, 0);
net.minecraft.world.level.block.DoublePlantBlock#playerDestroy(Level,Player,BlockPos,BlockState,BlockEntity,ItemStack)
- Origin:
common - Source:
net/minecraft/world/level/block/DoublePlantBlock.java:114 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ playerDestroy ตาม implementation ของ DoublePlantBlock
ทำงานยังไง
เรียกต่อ: defaultBlockState().
Parameters
Level levelPlayer playerBlockPos blockPosBlockState blockStateBlockEntity blockEntityItemStack itemStack
ตัวอย่างใช้งาน
DoublePlantBlock instance = ...;
Level level = ...;
Player player = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity blockEntity = ...;
ItemStack itemStack = ...;
instance.playerDestroy(level, player, blockPos, blockState, blockEntity, itemStack);
net.minecraft.world.level.block.DoublePlantBlock#playerWillDestroy(Level,BlockPos,BlockState,Player)
- Origin:
common - Source:
net/minecraft/world/level/block/DoublePlantBlock.java:101 - Modifiers:
public - Return:
BlockState
คืออะไร
ดำเนินการ playerWillDestroy ตาม implementation ของ DoublePlantBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isCreative(), preventDropFromBottomPart(), dropResources(), getMainHandItem(). คืนค่า: super.playerWillDestroy(level, blockPos, blockState, player).
Parameters
Level levelBlockPos blockPosBlockState blockStatePlayer player
ตัวอย่างใช้งาน
DoublePlantBlock instance = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
Player player = ...;
BlockState result = instance.playerWillDestroy(level, blockPos, blockState, player);
net.minecraft.world.level.block.DoublePlantBlock#preventDropFromBottomPart(Level,BlockPos,BlockState,Player)
- Origin:
common - Source:
net/minecraft/world/level/block/DoublePlantBlock.java:119 - Modifiers:
protected static - Return:
void
คืออะไร
ดำเนินการ preventDropFromBottomPart ตาม implementation ของ DoublePlantBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), below(), getBlockState(), is(), getBlock(), getFluidState(), defaultBlockState(), setBlock().
Parameters
Level levelBlockPos blockPosBlockState blockStatePlayer player
ตัวอย่างใช้งาน
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
Player player = ...;
@Override
protected void preventDropFromBottomPart(Level level, BlockPos blockPos, BlockState blockState, Player player) {
super.preventDropFromBottomPart(level, blockPos, blockState, player);
}
net.minecraft.world.level.block.DoublePlantBlock#setPlacedBy(Level,BlockPos,BlockState,LivingEntity,ItemStack)
- Origin:
common - Source:
net/minecraft/world/level/block/DoublePlantBlock.java:73 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Placed By
ทำงานยังไง
เรียกต่อ: above(), setBlock(), copyWaterloggedFrom(), defaultBlockState(), setValue().
Parameters
Level levelBlockPos blockPosBlockState blockStateLivingEntity livingEntityItemStack itemStack
ตัวอย่างใช้งาน
DoublePlantBlock instance = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
LivingEntity livingEntity = ...;
ItemStack itemStack = ...;
instance.setPlacedBy(level, blockPos, blockState, livingEntity, itemStack);
net.minecraft.world.level.block.DoublePlantBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/DoublePlantBlock.java:40 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), getAxis(), is(), canSurvive(), defaultBlockState(). คืนค่า: Blocks.AIR.defaultBlockState().
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
DragonEggBlock
- Full name:
net.minecraft.world.level.block.DragonEggBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/DragonEggBlock.java - Type:
class - Modifiers:
public - Extends:
FallingBlock
net.minecraft.world.level.block.DragonEggBlock#attack(BlockState,Level,BlockPos,Player)
- Origin:
common - Source:
net/minecraft/world/level/block/DragonEggBlock.java:43 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ attack ตาม implementation ของ DragonEggBlock
ทำงานยังไง
เรียกต่อ: teleport().
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer player
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
@Override
protected void attack(BlockState blockState, Level level, BlockPos blockPos, Player player) {
super.attack(blockState, level, blockPos, player);
}
net.minecraft.world.level.block.DragonEggBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/DragonEggBlock.java:23 - Modifiers:
public - Return:
MapCodec<DragonEggBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ DragonEggBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.DragonEggBlock#DragonEggBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/DragonEggBlock.java:28 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ DragonEggBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
DragonEggBlock instance = new DragonEggBlock(properties);
net.minecraft.world.level.block.DragonEggBlock#getDelayAfterPlace()
- Origin:
common - Source:
net/minecraft/world/level/block/DragonEggBlock.java:77 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Delay After Place
ทำงานยังไง
คืนค่า: 5.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.DragonEggBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/DragonEggBlock.java:32 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
คืนค่า: SHAPE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.DragonEggBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/DragonEggBlock.java:82 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.DragonEggBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/DragonEggBlock.java:37 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
เรียกต่อ: teleport(). คืนค่า: InteractionResult.SUCCESS.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
DropExperienceBlock
- Full name:
net.minecraft.world.level.block.DropExperienceBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/DropExperienceBlock.java - Type:
class - Modifiers:
public - Extends:
Block
net.minecraft.world.level.block.DropExperienceBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/DropExperienceBlock.java:19 - Modifiers:
public - Return:
MapCodec<? extends DropExperienceBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ DropExperienceBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
DropExperienceBlock instance = ...;
MapCodec<? extends DropExperienceBlock> result = instance.codec();
net.minecraft.world.level.block.DropExperienceBlock#DropExperienceBlock(IntProvider,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/DropExperienceBlock.java:24 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ DropExperienceBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: xpRange.
Parameters
IntProvider intProviderBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
IntProvider intProvider = ...;
BlockBehaviour.Properties properties = ...;
DropExperienceBlock instance = new DropExperienceBlock(intProvider, properties);
net.minecraft.world.level.block.DropExperienceBlock#spawnAfterBreak(BlockState,ServerLevel,BlockPos,ItemStack,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/DropExperienceBlock.java:29 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง entity ในโลก After Break
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: tryDropExperience().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosItemStack itemStackboolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
ItemStack itemStack = ...;
@Override
protected void spawnAfterBreak(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, ItemStack itemStack, boolean bl) {
super.spawnAfterBreak(blockState, serverLevel, blockPos, itemStack, bl);
}
DropperBlock
- Full name:
net.minecraft.world.level.block.DropperBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/DropperBlock.java - Type:
class - Modifiers:
public - Extends:
DispenserBlock
net.minecraft.world.level.block.DropperBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/DropperBlock.java:28 - Modifiers:
public - Return:
MapCodec<DropperBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ DropperBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.DropperBlock#dispenseFrom(ServerLevel,BlockState,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/DropperBlock.java:47 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ dispenseFrom ตาม implementation ของ DropperBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getBlockEntity(), orElse(), warn(), getRandomSlot(), levelEvent(), getItem(), isEmpty(), getBlockState(). สร้างออบเจ็กต์: BlockSource.
Parameters
ServerLevel serverLevelBlockState blockStateBlockPos blockPos
ตัวอย่างใช้งาน
ServerLevel serverLevel = ...;
BlockState blockState = ...;
BlockPos blockPos = ...;
@Override
protected void dispenseFrom(ServerLevel serverLevel, BlockState blockState, BlockPos blockPos) {
super.dispenseFrom(serverLevel, blockState, blockPos);
}
net.minecraft.world.level.block.DropperBlock#DropperBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/DropperBlock.java:33 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ DropperBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.DropperBlock#getDispenseMethod(Level,ItemStack)
- Origin:
common - Source:
net/minecraft/world/level/block/DropperBlock.java:37 - Modifiers:
protected - Return:
DispenseItemBehavior
คืออะไร
อ่านค่า Dispense Method
ทำงานยังไง
คืนค่า: DISPENSE_BEHAVIOUR.
Parameters
Level levelItemStack itemStack
ตัวอย่างใช้งาน
Level level = ...;
ItemStack itemStack = ...;
@Override
protected DispenseItemBehavior getDispenseMethod(Level level, ItemStack itemStack) {
return super.getDispenseMethod(level, itemStack);
}
net.minecraft.world.level.block.DropperBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/DropperBlock.java:42 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ DropperBlock
ทำงานยังไง
สร้างออบเจ็กต์: DropperBlockEntity. คืนค่า: new DropperBlockEntity(blockPos, blockState).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
DropperBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
EnchantingTableBlock
- Full name:
net.minecraft.world.level.block.EnchantingTableBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/EnchantingTableBlock.java - Type:
class - Modifiers:
public - Extends:
BaseEntityBlock
net.minecraft.world.level.block.EnchantingTableBlock#animateTick(BlockState,Level,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/EnchantingTableBlock.java:63 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ animateTick ตาม implementation ของ EnchantingTableBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: nextInt(), isValidBookShelf(), addParticle(), getX(), getY(), getZ(), nextFloat().
Parameters
BlockState blockStateLevel levelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
EnchantingTableBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
instance.animateTick(blockState, level, blockPos, randomSource);
net.minecraft.world.level.block.EnchantingTableBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/EnchantingTableBlock.java:39 - Modifiers:
public - Return:
MapCodec<EnchantingTableBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ EnchantingTableBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.EnchantingTableBlock#EnchantingTableBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/EnchantingTableBlock.java:44 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ EnchantingTableBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
EnchantingTableBlock instance = new EnchantingTableBlock(properties);
net.minecraft.world.level.block.EnchantingTableBlock#getMenuProvider(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/EnchantingTableBlock.java:102 - Modifiers:
protected - Return:
MenuProvider
คืออะไร
อ่านค่า Menu Provider
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity(), getDisplayName(), create(). สร้างออบเจ็กต์: SimpleMenuProvider, EnchantmentMenu. มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected MenuProvider getMenuProvider(BlockState blockState, Level level, BlockPos blockPos) {
return super.getMenuProvider(blockState, level, blockPos);
}
net.minecraft.world.level.block.EnchantingTableBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/EnchantingTableBlock.java:58 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
คืนค่า: SHAPE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.EnchantingTableBlock#getTicker(Level,BlockState,BlockEntityType<T>)
- Origin:
common - Source:
net/minecraft/world/level/block/EnchantingTableBlock.java:87 - Modifiers:
public - Return:
BlockEntityTicker<T>
คืออะไร
อ่านค่า Ticker
ทำงานยังไง
เรียกต่อ: createTickerHelper(). คืนค่า: level.isClientSide ? createTickerHelper(blockEntityType, BlockEntityType.ENCHANTING_TABLE, EnchantingTableBlockEntity::bookAnimationTick) : null.
Parameters
Level levelBlockState blockStateBlockEntityType<T> blockEntityType
ตัวอย่างใช้งาน
EnchantingTableBlock instance = ...;
Level level = ...;
BlockState blockState = ...;
BlockEntityType<T> blockEntityType = ...;
BlockEntityTicker<T> result = instance.getTicker(level, blockState, blockEntityType);
net.minecraft.world.level.block.EnchantingTableBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/EnchantingTableBlock.java:114 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.EnchantingTableBlock#isValidBookShelf(Level,BlockPos,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/EnchantingTableBlock.java:48 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Valid Book Shelf
ทำงานยังไง
เรียกต่อ: getBlockState(), offset(), is(), getX(), getY(), getZ().
Parameters
Level levelBlockPos blockPosBlockPos blockPos2
ตัวอย่างใช้งาน
Level level = ...;
BlockPos blockPos = ...;
BlockPos blockPos2 = ...;
boolean result = EnchantingTableBlock.isValidBookShelf(level, blockPos, blockPos2);
net.minecraft.world.level.block.EnchantingTableBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/EnchantingTableBlock.java:82 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ EnchantingTableBlock
ทำงานยังไง
สร้างออบเจ็กต์: EnchantingTableBlockEntity. คืนค่า: new EnchantingTableBlockEntity(blockPos, blockState).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
EnchantingTableBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
net.minecraft.world.level.block.EnchantingTableBlock#useShapeForLightOcclusion(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/EnchantingTableBlock.java:53 - Modifiers:
protected - Return:
boolean
คืออะไร
ใช้งาน Shape For Light Occlusion
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean useShapeForLightOcclusion(BlockState blockState) {
return super.useShapeForLightOcclusion(blockState);
}
net.minecraft.world.level.block.EnchantingTableBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/EnchantingTableBlock.java:93 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: openMenu(), getMenuProvider(). คืนค่า: InteractionResult.SUCCESS.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
EnderChestBlock
- Full name:
net.minecraft.world.level.block.EnderChestBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/EnderChestBlock.java - Type:
class - Modifiers:
public - Extends:
AbstractChestBlock<EnderChestBlockEntity> - Implements:
SimpleWaterloggedBlock
net.minecraft.world.level.block.EnderChestBlock#animateTick(BlockState,Level,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/EnderChestBlock.java:109 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ animateTick ตาม implementation ของ EnderChestBlock
ทำงานยังไง
มีการวนลูป. เรียกต่อ: nextInt(), getX(), getY(), nextFloat(), getZ(), addParticle().
Parameters
BlockState blockStateLevel levelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
EnderChestBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
instance.animateTick(blockState, level, blockPos, randomSource);
net.minecraft.world.level.block.EnderChestBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/EnderChestBlock.java:48 - Modifiers:
public - Return:
MapCodec<EnderChestBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ EnderChestBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.EnderChestBlock#combine(BlockState,Level,BlockPos,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/EnderChestBlock.java:58 - Modifiers:
public - Return:
DoubleBlockCombiner.NeighborCombineResult<? extends ChestBlockEntity>
คืออะไร
ดำเนินการ combine ตาม implementation ของ EnderChestBlock
ทำงานยังไง
คืนค่า: DoubleBlockCombiner.Combiner::acceptNone.
Parameters
BlockState blockStateLevel levelBlockPos blockPosboolean bl
ตัวอย่างใช้งาน
EnderChestBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
DoubleBlockCombiner.NeighborCombineResult<? extends ChestBlockEntity> result = instance.combine(blockState, level, blockPos, true);
net.minecraft.world.level.block.EnderChestBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/EnderChestBlock.java:134 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.EnderChestBlock#EnderChestBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/EnderChestBlock.java:53 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ EnderChestBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
EnderChestBlock instance = new EnderChestBlock(properties);
net.minecraft.world.level.block.EnderChestBlock#getFluidState(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/EnderChestBlock.java:139 - Modifiers:
protected - Return:
FluidState
คืออะไร
อ่านค่า Fluid State
ทำงานยังไง
เรียกต่อ: getValue(), getSource(). คืนค่า: blockState.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(blockState).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected FluidState getFluidState(BlockState blockState) {
return super.getFluidState(blockState);
}
net.minecraft.world.level.block.EnderChestBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/EnderChestBlock.java:63 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
คืนค่า: SHAPE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.EnderChestBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/EnderChestBlock.java:68 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: getLevel(), getFluidState(), getClickedPos(), defaultBlockState(), setValue(), getHorizontalDirection(), getOpposite(), getType().
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
EnderChestBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.EnderChestBlock#getTicker(Level,BlockState,BlockEntityType<T>)
- Origin:
common - Source:
net/minecraft/world/level/block/EnderChestBlock.java:103 - Modifiers:
public - Return:
BlockEntityTicker<T>
คืออะไร
อ่านค่า Ticker
ทำงานยังไง
เรียกต่อ: createTickerHelper(). คืนค่า: level.isClientSide ? createTickerHelper(blockEntityType, BlockEntityType.ENDER_CHEST, EnderChestBlockEntity::lidAnimateTick) : null.
Parameters
Level levelBlockState blockStateBlockEntityType<T> blockEntityType
ตัวอย่างใช้งาน
EnderChestBlock instance = ...;
Level level = ...;
BlockState blockState = ...;
BlockEntityType<T> blockEntityType = ...;
BlockEntityTicker<T> result = instance.getTicker(level, blockState, blockEntityType);
net.minecraft.world.level.block.EnderChestBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/EnderChestBlock.java:162 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.EnderChestBlock#mirror(BlockState,Mirror)
- Origin:
common - Source:
net/minecraft/world/level/block/EnderChestBlock.java:129 - Modifiers:
protected - Return:
BlockState
คืออะไร
ดำเนินการ mirror ตาม implementation ของ EnderChestBlock
ทำงานยังไง
เรียกต่อ: rotate(), getRotation(), getValue(). คืนค่า: blockState.rotate(mirror.getRotation(blockState.getValue(FACING))).
Parameters
BlockState blockStateMirror mirror
ตัวอย่างใช้งาน
BlockState blockState = ...;
Mirror mirror = ...;
@Override
protected BlockState mirror(BlockState blockState, Mirror mirror) {
return super.mirror(blockState, mirror);
}
net.minecraft.world.level.block.EnderChestBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/EnderChestBlock.java:98 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ EnderChestBlock
ทำงานยังไง
สร้างออบเจ็กต์: EnderChestBlockEntity. คืนค่า: new EnderChestBlockEntity(blockPos, blockState).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
EnderChestBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
net.minecraft.world.level.block.EnderChestBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/EnderChestBlock.java:124 - Modifiers:
protected - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
เรียกต่อ: setValue(), getValue(). คืนค่า: blockState.setValue(FACING, rotation.rotate(blockState.getValue(FACING))).
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
BlockState blockState = ...;
Rotation rotation = ...;
@Override
protected BlockState rotate(BlockState blockState, Rotation rotation) {
return super.rotate(blockState, rotation);
}
net.minecraft.world.level.block.EnderChestBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/EnderChestBlock.java:167 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity(), recheckOpen().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.EnderChestBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/EnderChestBlock.java:144 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), scheduleTick(), getTickDelay(). คืนค่า: super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource).
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
net.minecraft.world.level.block.EnderChestBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/EnderChestBlock.java:76 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getEnderChestInventory(), getBlockEntity(), above(), getBlockState(), isRedstoneConductor(), setActiveChest(), openMenu(), threeRows(). สร้างออบเจ็กต์: SimpleMenuProvider. มีจุด return อย่างน้อย 3 จุด.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
EndGatewayBlock
- Full name:
net.minecraft.world.level.block.EndGatewayBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/EndGatewayBlock.java - Type:
class - Modifiers:
public - Extends:
BaseEntityBlock - Implements:
Portal
net.minecraft.world.level.block.EndGatewayBlock#animateTick(BlockState,Level,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/EndGatewayBlock.java:51 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ animateTick ตาม implementation ของ EndGatewayBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getBlockEntity(), getParticleAmount(), getX(), nextDouble(), getY(), getZ(), nextInt(), nextBoolean().
Parameters
BlockState blockStateLevel levelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
EndGatewayBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
instance.animateTick(blockState, level, blockPos, randomSource);
net.minecraft.world.level.block.EndGatewayBlock#canBeReplaced(BlockState,Fluid)
- Origin:
common - Source:
net/minecraft/world/level/block/EndGatewayBlock.java:83 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Be Replaced
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStateFluid fluid
ตัวอย่างใช้งาน
BlockState blockState = ...;
Fluid fluid = ...;
@Override
protected boolean canBeReplaced(BlockState blockState, Fluid fluid) {
return super.canBeReplaced(blockState, fluid);
}
net.minecraft.world.level.block.EndGatewayBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/EndGatewayBlock.java:29 - Modifiers:
public - Return:
MapCodec<EndGatewayBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ EndGatewayBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.EndGatewayBlock#EndGatewayBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/EndGatewayBlock.java:34 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ EndGatewayBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
EndGatewayBlock instance = new EndGatewayBlock(properties);
net.minecraft.world.level.block.EndGatewayBlock#entityInside(BlockState,Level,BlockPos,Entity)
- Origin:
common - Source:
net/minecraft/world/level/block/EndGatewayBlock.java:88 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ entityInside ตาม implementation ของ EndGatewayBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canUsePortal(), getBlockEntity(), isCoolingDown(), setAsInsidePortal(), triggerCooldown().
Parameters
BlockState blockStateLevel levelBlockPos blockPosEntity entity
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Entity entity = ...;
@Override
protected void entityInside(BlockState blockState, Level level, BlockPos blockPos, Entity entity) {
super.entityInside(blockState, level, blockPos, entity);
}
net.minecraft.world.level.block.EndGatewayBlock#getCloneItemStack(LevelReader,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/EndGatewayBlock.java:78 - Modifiers:
protected - Return:
ItemStack
คืออะไร
อ่านค่า Clone Item Stack
ทำงานยังไง
คืนค่า: ItemStack.EMPTY.
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockStateboolean bl
ตัวอย่างใช้งาน
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected ItemStack getCloneItemStack(LevelReader levelReader, BlockPos blockPos, BlockState blockState, boolean bl) {
return super.getCloneItemStack(levelReader, blockPos, blockState, bl);
}
net.minecraft.world.level.block.EndGatewayBlock#getPortalDestination(ServerLevel,Entity,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/EndGatewayBlock.java:99 - Modifiers:
public - Return:
TeleportTransition
คืออะไร
อ่านค่า Portal Destination
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity(), getPortalPosition(), of(), union(). สร้างออบเจ็กต์: TeleportTransition. มีจุด return อย่างน้อย 2 จุด.
Parameters
ServerLevel serverLevelEntity entityBlockPos blockPos
ตัวอย่างใช้งาน
EndGatewayBlock instance = ...;
ServerLevel serverLevel = ...;
Entity entity = ...;
BlockPos blockPos = ...;
TeleportTransition result = instance.getPortalDestination(serverLevel, entity, blockPos);
net.minecraft.world.level.block.EndGatewayBlock#getRenderShape(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/EndGatewayBlock.java:118 - Modifiers:
protected - Return:
RenderShape
คืออะไร
อ่านค่า Render Shape
ทำงานยังไง
คืนค่า: RenderShape.INVISIBLE.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected RenderShape getRenderShape(BlockState blockState) {
return super.getRenderShape(blockState);
}
net.minecraft.world.level.block.EndGatewayBlock#getTicker(Level,BlockState,BlockEntityType<T>)
- Origin:
common - Source:
net/minecraft/world/level/block/EndGatewayBlock.java:43 - Modifiers:
public - Return:
BlockEntityTicker<T>
คืออะไร
อ่านค่า Ticker
ทำงานยังไง
เรียกต่อ: createTickerHelper().
Parameters
Level levelBlockState blockStateBlockEntityType<T> blockEntityType
ตัวอย่างใช้งาน
EndGatewayBlock instance = ...;
Level level = ...;
BlockState blockState = ...;
BlockEntityType<T> blockEntityType = ...;
BlockEntityTicker<T> result = instance.getTicker(level, blockState, blockEntityType);
net.minecraft.world.level.block.EndGatewayBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/EndGatewayBlock.java:38 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ EndGatewayBlock
ทำงานยังไง
สร้างออบเจ็กต์: TheEndGatewayBlockEntity. คืนค่า: new TheEndGatewayBlockEntity(blockPos, blockState).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
EndGatewayBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
EndPortalBlock
- Full name:
net.minecraft.world.level.block.EndPortalBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/EndPortalBlock.java - Type:
class - Modifiers:
public - Extends:
BaseEntityBlock - Implements:
Portal
net.minecraft.world.level.block.EndPortalBlock#animateTick(BlockState,Level,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/EndPortalBlock.java:101 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ animateTick ตาม implementation ของ EndPortalBlock
ทำงานยังไง
เรียกต่อ: getX(), nextDouble(), getY(), getZ(), addParticle().
Parameters
BlockState blockStateLevel levelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
EndPortalBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
instance.animateTick(blockState, level, blockPos, randomSource);
net.minecraft.world.level.block.EndPortalBlock#canBeReplaced(BlockState,Fluid)
- Origin:
common - Source:
net/minecraft/world/level/block/EndPortalBlock.java:114 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Be Replaced
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStateFluid fluid
ตัวอย่างใช้งาน
BlockState blockState = ...;
Fluid fluid = ...;
@Override
protected boolean canBeReplaced(BlockState blockState, Fluid fluid) {
return super.canBeReplaced(blockState, fluid);
}
net.minecraft.world.level.block.EndPortalBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/EndPortalBlock.java:33 - Modifiers:
public - Return:
MapCodec<EndPortalBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ EndPortalBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.EndPortalBlock#EndPortalBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/EndPortalBlock.java:38 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ EndPortalBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
EndPortalBlock instance = new EndPortalBlock(properties);
net.minecraft.world.level.block.EndPortalBlock#entityInside(BlockState,Level,BlockPos,Entity)
- Origin:
common - Source:
net/minecraft/world/level/block/EndPortalBlock.java:57 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ entityInside ตาม implementation ของ EndPortalBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canUsePortal(), dimension(), showEndCredits(), setAsInsidePortal().
Parameters
BlockState blockStateLevel levelBlockPos blockPosEntity entity
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Entity entity = ...;
@Override
protected void entityInside(BlockState blockState, Level level, BlockPos blockPos, Entity entity) {
super.entityInside(blockState, level, blockPos, entity);
}
net.minecraft.world.level.block.EndPortalBlock#getCloneItemStack(LevelReader,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/EndPortalBlock.java:109 - Modifiers:
protected - Return:
ItemStack
คืออะไร
อ่านค่า Clone Item Stack
ทำงานยังไง
คืนค่า: ItemStack.EMPTY.
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockStateboolean bl
ตัวอย่างใช้งาน
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected ItemStack getCloneItemStack(LevelReader levelReader, BlockPos blockPos, BlockState blockState, boolean bl) {
return super.getCloneItemStack(levelReader, blockPos, blockState, bl);
}
net.minecraft.world.level.block.EndPortalBlock#getEntityInsideCollisionShape(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/EndPortalBlock.java:52 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Entity Inside Collision Shape
ทำงานยังไง
เรียกต่อ: getShape(). คืนค่า: blockState.getShape(level, blockPos).
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected VoxelShape getEntityInsideCollisionShape(BlockState blockState, Level level, BlockPos blockPos) {
return super.getEntityInsideCollisionShape(blockState, level, blockPos);
}
net.minecraft.world.level.block.EndPortalBlock#getPortalDestination(ServerLevel,Entity,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/EndPortalBlock.java:68 - Modifiers:
public - Return:
TeleportTransition
คืออะไร
อ่านค่า Portal Destination
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: dimension(), getServer(), getLevel(), getSharedSpawnPos(), getBottomCenter(), createEndPlatform(), containing(), below(). สร้างออบเจ็กต์: TeleportTransition. มีจุด return อย่างน้อย 3 จุด.
Parameters
ServerLevel serverLevelEntity entityBlockPos blockPos
ตัวอย่างใช้งาน
EndPortalBlock instance = ...;
ServerLevel serverLevel = ...;
Entity entity = ...;
BlockPos blockPos = ...;
TeleportTransition result = instance.getPortalDestination(serverLevel, entity, blockPos);
net.minecraft.world.level.block.EndPortalBlock#getRenderShape(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/EndPortalBlock.java:119 - Modifiers:
protected - Return:
RenderShape
คืออะไร
อ่านค่า Render Shape
ทำงานยังไง
คืนค่า: RenderShape.INVISIBLE.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected RenderShape getRenderShape(BlockState blockState) {
return super.getRenderShape(blockState);
}
net.minecraft.world.level.block.EndPortalBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/EndPortalBlock.java:47 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
คืนค่า: SHAPE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.EndPortalBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/EndPortalBlock.java:42 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ EndPortalBlock
ทำงานยังไง
สร้างออบเจ็กต์: TheEndPortalBlockEntity. คืนค่า: new TheEndPortalBlockEntity(blockPos, blockState).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
EndPortalBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
EndPortalFrameBlock
- Full name:
net.minecraft.world.level.block.EndPortalFrameBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/EndPortalFrameBlock.java - Type:
class - Modifiers:
public - Extends:
Block
net.minecraft.world.level.block.EndPortalFrameBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/EndPortalFrameBlock.java:34 - Modifiers:
public - Return:
MapCodec<EndPortalFrameBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ EndPortalFrameBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.EndPortalFrameBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/EndPortalFrameBlock.java:79 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.EndPortalFrameBlock#EndPortalFrameBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/EndPortalFrameBlock.java:39 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ EndPortalFrameBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
EndPortalFrameBlock instance = new EndPortalFrameBlock(properties);
net.minecraft.world.level.block.EndPortalFrameBlock#getAnalogOutputSignal(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/EndPortalFrameBlock.java:64 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Analog Output Signal
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: blockState.getValue(HAS_EYE) ? 15 : 0.
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected int getAnalogOutputSignal(BlockState blockState, Level level, BlockPos blockPos) {
return super.getAnalogOutputSignal(blockState, level, blockPos);
}
net.minecraft.world.level.block.EndPortalFrameBlock#getOrCreatePortalShape()
- Origin:
common - Source:
net/minecraft/world/level/block/EndPortalFrameBlock.java:84 - Modifiers:
public static - Return:
BlockPattern
คืออะไร
อ่านค่า Or Create Portal Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: start(), aisle(), where(), hasState(), forBlock(), equalTo(), build(). คืนค่า: portalShape.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.EndPortalFrameBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/EndPortalFrameBlock.java:49 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: blockState.getValue(HAS_EYE) ? FULL_SHAPE : BASE_SHAPE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.EndPortalFrameBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/EndPortalFrameBlock.java:54 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: defaultBlockState(), setValue(), getHorizontalDirection(), getOpposite(). คืนค่า: this.defaultBlockState().setValue(FACING, blockPlaceContext.getHorizontalDirection().getOpposite()).setValue(HAS_EYE, false).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
EndPortalFrameBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.EndPortalFrameBlock#hasAnalogOutputSignal(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/EndPortalFrameBlock.java:59 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Analog Output Signal
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean hasAnalogOutputSignal(BlockState blockState) {
return super.hasAnalogOutputSignal(blockState);
}
net.minecraft.world.level.block.EndPortalFrameBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/EndPortalFrameBlock.java:119 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.EndPortalFrameBlock#mirror(BlockState,Mirror)
- Origin:
common - Source:
net/minecraft/world/level/block/EndPortalFrameBlock.java:74 - Modifiers:
protected - Return:
BlockState
คืออะไร
ดำเนินการ mirror ตาม implementation ของ EndPortalFrameBlock
ทำงานยังไง
เรียกต่อ: rotate(), getRotation(), getValue(). คืนค่า: blockState.rotate(mirror.getRotation(blockState.getValue(FACING))).
Parameters
BlockState blockStateMirror mirror
ตัวอย่างใช้งาน
BlockState blockState = ...;
Mirror mirror = ...;
@Override
protected BlockState mirror(BlockState blockState, Mirror mirror) {
return super.mirror(blockState, mirror);
}
net.minecraft.world.level.block.EndPortalFrameBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/EndPortalFrameBlock.java:69 - Modifiers:
protected - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
เรียกต่อ: setValue(), getValue(). คืนค่า: blockState.setValue(FACING, rotation.rotate(blockState.getValue(FACING))).
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
BlockState blockState = ...;
Rotation rotation = ...;
@Override
protected BlockState rotate(BlockState blockState, Rotation rotation) {
return super.rotate(blockState, rotation);
}
net.minecraft.world.level.block.EndPortalFrameBlock#useShapeForLightOcclusion(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/EndPortalFrameBlock.java:44 - Modifiers:
protected - Return:
boolean
คืออะไร
ใช้งาน Shape For Light Occlusion
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean useShapeForLightOcclusion(BlockState blockState) {
return super.useShapeForLightOcclusion(blockState);
}
EndRodBlock
- Full name:
net.minecraft.world.level.block.EndRodBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/EndRodBlock.java - Type:
class - Modifiers:
public - Extends:
RodBlock
net.minecraft.world.level.block.EndRodBlock#animateTick(BlockState,Level,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/EndRodBlock.java:36 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ animateTick ตาม implementation ของ EndRodBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), getX(), nextFloat(), getY(), getZ(), nextInt(), addParticle(), getStepX().
Parameters
BlockState blockStateLevel levelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
EndRodBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
instance.animateTick(blockState, level, blockPos, randomSource);
net.minecraft.world.level.block.EndRodBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/EndRodBlock.java:17 - Modifiers:
public - Return:
MapCodec<EndRodBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ EndRodBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.EndRodBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/EndRodBlock.java:56 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.EndRodBlock#EndRodBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/EndRodBlock.java:22 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ EndRodBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.EndRodBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/EndRodBlock.java:27 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: getClickedFace(), getLevel(), getBlockState(), getClickedPos(), relative(), getOpposite(), is(), getValue().
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
EndRodBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
EntityBlock
- Full name:
net.minecraft.world.level.block.EntityBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/EntityBlock.java - Type:
interface - Modifiers:
public
net.minecraft.world.level.block.EntityBlock#getListener(ServerLevel,T)
- Origin:
common - Source:
net/minecraft/world/level/block/EntityBlock.java:22 - Modifiers:
default - Return:
GameEventListener
คืออะไร
อ่านค่า Listener
ทำงานยังไง
คืนค่า: blockEntity instanceof GameEventListener.Provider<?> provider ? provider.getListener() : null.
Parameters
ServerLevel serverLevelT blockEntity
ตัวอย่างใช้งาน
EntityBlock instance = ...;
ServerLevel serverLevel = ...;
T blockEntity = ...;
GameEventListener result = instance.getListener(serverLevel, blockEntity);
net.minecraft.world.level.block.EntityBlock#getTicker(Level,BlockState,BlockEntityType<T>)
- Origin:
common - Source:
net/minecraft/world/level/block/EntityBlock.java:17 - Modifiers:
default - Return:
BlockEntityTicker<T>
คืออะไร
อ่านค่า Ticker
ทำงานยังไง
คืนค่า: null.
Parameters
Level levelBlockState blockStateBlockEntityType<T> blockEntityType
ตัวอย่างใช้งาน
EntityBlock instance = ...;
Level level = ...;
BlockState blockState = ...;
BlockEntityType<T> blockEntityType = ...;
BlockEntityTicker<T> result = instance.getTicker(level, blockState, blockEntityType);
net.minecraft.world.level.block.EntityBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/EntityBlock.java:14 - Modifiers: ``
- Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ EntityBlock
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
EntityBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
EyeblossomBlock
- Full name:
net.minecraft.world.level.block.EyeblossomBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/EyeblossomBlock.java - Type:
class - Modifiers:
public - Extends:
FlowerBlock
net.minecraft.world.level.block.EyeblossomBlock#animateTick(BlockState,Level,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/EyeblossomBlock.java:51 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ animateTick ตาม implementation ของ EyeblossomBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: emitSounds(), nextInt(), getBlockState(), below(), is(), playLocalSound(), getX(), getY().
Parameters
BlockState blockStateLevel levelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
EyeblossomBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
instance.animateTick(blockState, level, blockPos, randomSource);
net.minecraft.world.level.block.EyeblossomBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/EyeblossomBlock.java:36 - Modifiers:
public - Return:
MapCodec<? extends EyeblossomBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ EyeblossomBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.EyeblossomBlock#entityInside(BlockState,Level,BlockPos,Entity)
- Origin:
common - Source:
net/minecraft/world/level/block/EyeblossomBlock.java:103 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ entityInside ตาม implementation ของ EyeblossomBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isClientSide(), getDifficulty(), attractsBees(), hasEffect(), addEffect(), getBeeInteractionEffect().
Parameters
BlockState blockStateLevel levelBlockPos blockPosEntity entity
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Entity entity = ...;
@Override
protected void entityInside(BlockState blockState, Level level, BlockPos blockPos, Entity entity) {
super.entityInside(blockState, level, blockPos, entity);
}
net.minecraft.world.level.block.EyeblossomBlock#EyeblossomBlock(boolean,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/EyeblossomBlock.java:46 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ EyeblossomBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: type. เรียกต่อ: fromBoolean().
Parameters
boolean blBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
EyeblossomBlock instance = new EyeblossomBlock(true, properties);
net.minecraft.world.level.block.EyeblossomBlock#EyeblossomBlock(EyeblossomBlock.Type,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/EyeblossomBlock.java:41 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ EyeblossomBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: type.
Parameters
EyeblossomBlock.Type typeBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
EyeblossomBlock.Type type = ...;
BlockBehaviour.Properties properties = ...;
EyeblossomBlock instance = new EyeblossomBlock(type, properties);
net.minecraft.world.level.block.EyeblossomBlock#getBeeInteractionEffect()
- Origin:
common - Source:
net/minecraft/world/level/block/EyeblossomBlock.java:114 - Modifiers:
public - Return:
MobEffectInstance
คืออะไร
อ่านค่า Bee Interaction Effect
ทำงานยังไง
สร้างออบเจ็กต์: MobEffectInstance. คืนค่า: new MobEffectInstance(MobEffects.POISON, 25).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.EyeblossomBlock#randomTick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/EyeblossomBlock.java:61 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ randomTick ตาม implementation ของ EyeblossomBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: tryChangingState(), playSound(), transform().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void randomTick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.randomTick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.EyeblossomBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/EyeblossomBlock.java:70 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: tryChangingState(), playSound(), transform().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
EyeblossomBlock$Type
- Full name:
net.minecraft.world.level.block.EyeblossomBlock$Type - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/EyeblossomBlock.java - Type:
enum - Modifiers:
public
net.minecraft.world.level.block.EyeblossomBlock$Type#block()
- Origin:
common - Source:
net/minecraft/world/level/block/EyeblossomBlock.java:139 - Modifiers:
public - Return:
Block
คืออะไร
ดำเนินการ block ตาม implementation ของ EyeblossomBlock$Type
ทำงานยังไง
คืนค่า: this.open ? Blocks.OPEN_EYEBLOSSOM : Blocks.CLOSED_EYEBLOSSOM.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.EyeblossomBlock$Type#emitSounds()
- Origin:
common - Source:
net/minecraft/world/level/block/EyeblossomBlock.java:151 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ emitSounds ตาม implementation ของ EyeblossomBlock$Type
ทำงานยังไง
คืนค่า: this.open.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.EyeblossomBlock$Type#fromBoolean(boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/EyeblossomBlock.java:155 - Modifiers:
public static - Return:
EyeblossomBlock.Type
คืออะไร
ดำเนินการ fromBoolean ตาม implementation ของ EyeblossomBlock$Type
ทำงานยังไง
คืนค่า: bl ? OPEN : CLOSED.
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.level.block.EyeblossomBlock$Type#longSwitchSound()
- Origin:
common - Source:
net/minecraft/world/level/block/EyeblossomBlock.java:168 - Modifiers:
public - Return:
SoundEvent
คืออะไร
ดำเนินการ longSwitchSound ตาม implementation ของ EyeblossomBlock$Type
ทำงานยังไง
คืนค่า: this.longSwitchSound.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.EyeblossomBlock$Type#spawnTransformParticle(ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/EyeblossomBlock.java:159 - Modifiers:
public - Return:
void
คืออะไร
สร้าง entity ในโลก Transform Particle
ทำงานยังไง
เรียกต่อ: getCenter(), nextDouble(), add(), scale(), sendParticles(). สร้างออบเจ็กต์: Vec3, TrailParticleOption.
Parameters
ServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
EyeblossomBlock.Type instance = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
instance.spawnTransformParticle(serverLevel, blockPos, randomSource);
net.minecraft.world.level.block.EyeblossomBlock$Type#state()
- Origin:
common - Source:
net/minecraft/world/level/block/EyeblossomBlock.java:143 - Modifiers:
public - Return:
BlockState
คืออะไร
ดำเนินการ state ตาม implementation ของ EyeblossomBlock$Type
ทำงานยังไง
เรียกต่อ: block(), defaultBlockState(). คืนค่า: this.block().defaultBlockState().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.EyeblossomBlock$Type#transform()
- Origin:
common - Source:
net/minecraft/world/level/block/EyeblossomBlock.java:147 - Modifiers:
public - Return:
EyeblossomBlock.Type
คืออะไร
แปลงรูป transform
ทำงานยังไง
เรียกต่อ: fromBoolean(). คืนค่า: fromBoolean(!this.open).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
FaceAttachedHorizontalDirectionalBlock
- Full name:
net.minecraft.world.level.block.FaceAttachedHorizontalDirectionalBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/FaceAttachedHorizontalDirectionalBlock.java - Type:
class - Modifiers:
public abstract - Extends:
HorizontalDirectionalBlock
net.minecraft.world.level.block.FaceAttachedHorizontalDirectionalBlock#canAttach(LevelReader,BlockPos,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/FaceAttachedHorizontalDirectionalBlock.java:32 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Attach
ทำงานยังไง
เรียกต่อ: relative(), getBlockState(), isFaceSturdy(), getOpposite(). คืนค่า: levelReader.getBlockState(blockPos2).isFaceSturdy(levelReader, blockPos2, direction.getOpposite()).
Parameters
LevelReader levelReaderBlockPos blockPosDirection direction
ตัวอย่างใช้งาน
LevelReader levelReader = ...;
BlockPos blockPos = ...;
Direction direction = ...;
boolean result = FaceAttachedHorizontalDirectionalBlock.canAttach(levelReader, blockPos, direction);
net.minecraft.world.level.block.FaceAttachedHorizontalDirectionalBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/FaceAttachedHorizontalDirectionalBlock.java:27 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: canAttach(), getConnectedDirection(), getOpposite(). คืนค่า: canAttach(levelReader, blockPos, getConnectedDirection(blockState).getOpposite()).
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.FaceAttachedHorizontalDirectionalBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/FaceAttachedHorizontalDirectionalBlock.java:24 - Modifiers:
protected abstract - Return:
MapCodec<? extends FaceAttachedHorizontalDirectionalBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ FaceAttachedHorizontalDirectionalBlock
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
- ไม่มี
ตัวอย่างใช้งาน
@Override
protected MapCodec<? extends FaceAttachedHorizontalDirectionalBlock> codec() {
return super.codec();
}
net.minecraft.world.level.block.FaceAttachedHorizontalDirectionalBlock#FaceAttachedHorizontalDirectionalBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/FaceAttachedHorizontalDirectionalBlock.java:20 - Modifiers:
protected - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ FaceAttachedHorizontalDirectionalBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
FaceAttachedHorizontalDirectionalBlock instance = new FaceAttachedHorizontalDirectionalBlock(properties);
net.minecraft.world.level.block.FaceAttachedHorizontalDirectionalBlock#getConnectedDirection(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/FaceAttachedHorizontalDirectionalBlock.java:74 - Modifiers:
protected static - Return:
Direction
คืออะไร
อ่านค่า Connected Direction
ทำงานยังไง
แยกกรณีด้วย switch. เรียกต่อ: getValue(). มีจุด return อย่างน้อย 3 จุด.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected Direction getConnectedDirection(BlockState blockState) {
return super.getConnectedDirection(blockState);
}
net.minecraft.world.level.block.FaceAttachedHorizontalDirectionalBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/FaceAttachedHorizontalDirectionalBlock.java:37 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getNearestLookingDirections(), getAxis(), defaultBlockState(), setValue(), getHorizontalDirection(), getOpposite(), canSurvive(), getLevel(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
FaceAttachedHorizontalDirectionalBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.FaceAttachedHorizontalDirectionalBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/FaceAttachedHorizontalDirectionalBlock.java:58 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
เรียกต่อ: getConnectedDirection(), getOpposite(), canSurvive(), defaultBlockState().
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
Fallable
- Full name:
net.minecraft.world.level.block.Fallable - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/Fallable.java - Type:
interface - Modifiers:
public
net.minecraft.world.level.block.Fallable#getFallDamageSource(Entity)
- Origin:
common - Source:
net/minecraft/world/level/block/Fallable.java:17 - Modifiers:
default - Return:
DamageSource
คืออะไร
อ่านค่า Fall Damage Source
ทำงานยังไง
เรียกต่อ: damageSources(), fallingBlock(). คืนค่า: entity.damageSources().fallingBlock(entity).
Parameters
Entity entity
ตัวอย่างใช้งาน
Fallable instance = ...;
Entity entity = ...;
DamageSource result = instance.getFallDamageSource(entity);
net.minecraft.world.level.block.Fallable#onBrokenAfterFall(Level,BlockPos,FallingBlockEntity)
- Origin:
common - Source:
net/minecraft/world/level/block/Fallable.java:14 - Modifiers:
default - Return:
void
คืออะไร
จัดการเหตุการณ์ Broken After Fall
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
Level levelBlockPos blockPosFallingBlockEntity fallingBlockEntity
ตัวอย่างใช้งาน
Fallable instance = ...;
Level level = ...;
BlockPos blockPos = ...;
FallingBlockEntity fallingBlockEntity = ...;
instance.onBrokenAfterFall(level, blockPos, fallingBlockEntity);
net.minecraft.world.level.block.Fallable#onLand(Level,BlockPos,BlockState,BlockState,FallingBlockEntity)
- Origin:
common - Source:
net/minecraft/world/level/block/Fallable.java:11 - Modifiers:
default - Return:
void
คืออะไร
จัดการเหตุการณ์ Land
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
Level levelBlockPos blockPosBlockState blockStateBlockState blockState2FallingBlockEntity fallingBlockEntity
ตัวอย่างใช้งาน
Fallable instance = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockState blockState2 = ...;
FallingBlockEntity fallingBlockEntity = ...;
instance.onLand(level, blockPos, blockState, blockState2, fallingBlockEntity);
FallingBlock
- Full name:
net.minecraft.world.level.block.FallingBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/FallingBlock.java - Type:
class - Modifiers:
public abstract - Extends:
Block - Implements:
Fallable
net.minecraft.world.level.block.FallingBlock#animateTick(BlockState,Level,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/FallingBlock.java:67 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ animateTick ตาม implementation ของ FallingBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: nextInt(), below(), isFree(), getBlockState(), spawnParticleBelow(). สร้างออบเจ็กต์: BlockParticleOption.
Parameters
BlockState blockStateLevel levelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
FallingBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
instance.animateTick(blockState, level, blockPos, randomSource);
net.minecraft.world.level.block.FallingBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/FallingBlock.java:25 - Modifiers:
protected abstract - Return:
MapCodec<? extends FallingBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ FallingBlock
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.FallingBlock#falling(FallingBlockEntity)
- Origin:
common - Source:
net/minecraft/world/level/block/FallingBlock.java:56 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ falling ตาม implementation ของ FallingBlock
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
FallingBlockEntity fallingBlockEntity
ตัวอย่างใช้งาน
FallingBlockEntity fallingBlockEntity = ...;
@Override
protected void falling(FallingBlockEntity fallingBlockEntity) {
super.falling(fallingBlockEntity);
}
net.minecraft.world.level.block.FallingBlock#FallingBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/FallingBlock.java:21 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ FallingBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.FallingBlock#getDelayAfterPlace()
- Origin:
common - Source:
net/minecraft/world/level/block/FallingBlock.java:59 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Delay After Place
ทำงานยังไง
คืนค่า: 2.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.FallingBlock#getDustColor(BlockState,BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/FallingBlock.java:77 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Dust Color
ทำงานยังไง
คืนค่า: -16777216.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
FallingBlock instance = ...;
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
int result = instance.getDustColor(blockState, blockGetter, blockPos);
net.minecraft.world.level.block.FallingBlock#isFree(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/FallingBlock.java:63 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Free
ทำงานยังไง
เรียกต่อ: isAir(), is(), liquid(), canBeReplaced(). คืนค่า: blockState.isAir() || blockState.is(BlockTags.FIRE) || blockState.liquid() || blockState.canBeReplaced().
Parameters
BlockState blockState
ตัวอย่างใช้งาน
net.minecraft.world.level.block.FallingBlock#onPlace(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/FallingBlock.java:28 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Place
ทำงานยังไง
เรียกต่อ: scheduleTick(), getDelayAfterPlace().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onPlace(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onPlace(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.FallingBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/FallingBlock.java:48 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isFree(), getBlockState(), below(), getY(), getMinY(), fall(), falling().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.FallingBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/FallingBlock.java:33 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
เรียกต่อ: scheduleTick(), getDelayAfterPlace(). คืนค่า: super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource).
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
FarmBlock
- Full name:
net.minecraft.world.level.block.FarmBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/FarmBlock.java - Type:
class - Modifiers:
public - Extends:
Block
net.minecraft.world.level.block.FarmBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/FarmBlock.java:65 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: getBlockState(), above(), isSolid(), getBlock(). คืนค่า: !blockState2.isSolid() || blockState2.getBlock() instanceof FenceGateBlock || blockState2.getBlock() instanceof MovingPistonBlock.
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.FarmBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/FarmBlock.java:37 - Modifiers:
public - Return:
MapCodec<FarmBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ FarmBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.FarmBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/FarmBlock.java:142 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.FarmBlock#fallOn(Level,BlockState,BlockPos,Entity,float)
- Origin:
common - Source:
net/minecraft/world/level/block/FarmBlock.java:109 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ fallOn ตาม implementation ของ FarmBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: nextFloat(), getGameRules(), getBoolean(), getBbWidth(), getBbHeight(), turnToDirt().
Parameters
Level levelBlockState blockStateBlockPos blockPosEntity entityfloat f
ตัวอย่างใช้งาน
FarmBlock instance = ...;
Level level = ...;
BlockState blockState = ...;
BlockPos blockPos = ...;
Entity entity = ...;
instance.fallOn(level, blockState, blockPos, entity, 0.0F);
net.minecraft.world.level.block.FarmBlock#FarmBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/FarmBlock.java:42 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ FarmBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.FarmBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/FarmBlock.java:83 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
คืนค่า: SHAPE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.FarmBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/FarmBlock.java:71 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: defaultBlockState(), canSurvive(), getLevel(), getClickedPos().
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
FarmBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.FarmBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/FarmBlock.java:147 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.FarmBlock#randomTick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/FarmBlock.java:95 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ randomTick ตาม implementation ของ FarmBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), isNearWater(), isRainingAt(), above(), setBlock(), setValue(), shouldMaintainFarmland(), turnToDirt().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void randomTick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.randomTick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.FarmBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/FarmBlock.java:88 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canSurvive(), turnToDirt().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.FarmBlock#turnToDirt(Entity,BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/FarmBlock.java:122 - Modifiers:
public static - Return:
void
คืออะไร
ดำเนินการ turnToDirt ตาม implementation ของ FarmBlock
ทำงานยังไง
เรียกต่อ: pushEntitiesUp(), defaultBlockState(), setBlockAndUpdate(), gameEvent(), of().
Parameters
Entity entityBlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
Entity entity = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
FarmBlock.turnToDirt(entity, blockState, level, blockPos);
net.minecraft.world.level.block.FarmBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/FarmBlock.java:47 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canSurvive(), scheduleTick(). คืนค่า: super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource).
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
net.minecraft.world.level.block.FarmBlock#useShapeForLightOcclusion(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/FarmBlock.java:78 - Modifiers:
protected - Return:
boolean
คืออะไร
ใช้งาน Shape For Light Occlusion
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean useShapeForLightOcclusion(BlockState blockState) {
return super.useShapeForLightOcclusion(blockState);
}
FenceBlock
- Full name:
net.minecraft.world.level.block.FenceBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/FenceBlock.java - Type:
class - Modifiers:
public - Extends:
CrossCollisionBlock
net.minecraft.world.level.block.FenceBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/FenceBlock.java:30 - Modifiers:
public - Return:
MapCodec<FenceBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ FenceBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.FenceBlock#connectsTo(BlockState,boolean,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/FenceBlock.java:58 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ connectsTo ตาม implementation ของ FenceBlock
ทำงานยังไง
เรียกต่อ: getBlock(), isSameFence(), connectsToDirection(), isExceptionForConnection(). คืนค่า: !isExceptionForConnection(blockState) && bl || bl2 || bl3.
Parameters
BlockState blockStateboolean blDirection direction
ตัวอย่างใช้งาน
FenceBlock instance = ...;
BlockState blockState = ...;
Direction direction = ...;
boolean result = instance.connectsTo(blockState, true, direction);
net.minecraft.world.level.block.FenceBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/FenceBlock.java:118 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.FenceBlock#FenceBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/FenceBlock.java:35 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ FenceBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: occlusionByIndex. เรียกต่อ: registerDefaultState(), any(), setValue(), makeShapes().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.FenceBlock#getOcclusionShape(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/FenceBlock.java:43 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Occlusion Shape
ทำงานยังไง
เรียกต่อ: getAABBIndex(). คืนค่า: this.occlusionByIndex[this.getAABBIndex(blockState)].
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected VoxelShape getOcclusionShape(BlockState blockState) {
return super.getOcclusionShape(blockState);
}
net.minecraft.world.level.block.FenceBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/FenceBlock.java:74 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: getLevel(), getClickedPos(), getFluidState(), north(), east(), south(), west(), getBlockState().
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
FenceBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.FenceBlock#getVisualShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/FenceBlock.java:48 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Visual Shape
ทำงานยังไง
เรียกต่อ: getShape(). คืนค่า: this.getShape(blockState, blockGetter, blockPos, collisionContext).
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getVisualShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getVisualShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.FenceBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/FenceBlock.java:53 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.FenceBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/FenceBlock.java:95 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), scheduleTick(), getTickDelay(), getAxis(), isHorizontal(), setValue(), get(), connectsTo().
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
net.minecraft.world.level.block.FenceBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/FenceBlock.java:69 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
เรียกต่อ: isClientSide(), bindPlayerMobs(). คืนค่า: !level.isClientSide() ? LeadItem.bindPlayerMobs(player, level, blockPos) : InteractionResult.PASS.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
FenceGateBlock
- Full name:
net.minecraft.world.level.block.FenceGateBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/FenceGateBlock.java - Type:
class - Modifiers:
public - Extends:
HorizontalDirectionalBlock
net.minecraft.world.level.block.FenceGateBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/FenceGateBlock.java:58 - Modifiers:
public - Return:
MapCodec<FenceGateBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ FenceGateBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.FenceGateBlock#connectsToDirection(BlockState,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/FenceGateBlock.java:225 - Modifiers:
public static - Return:
boolean
คืออะไร
ดำเนินการ connectsToDirection ตาม implementation ของ FenceGateBlock
ทำงานยังไง
เรียกต่อ: getValue(), getAxis(), getClockWise(). คืนค่า: blockState.getValue(FACING).getAxis() == direction.getClockWise().getAxis().
Parameters
BlockState blockStateDirection direction
ตัวอย่างใช้งาน
BlockState blockState = ...;
Direction direction = ...;
boolean result = FenceGateBlock.connectsToDirection(blockState, direction);
net.minecraft.world.level.block.FenceGateBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/FenceGateBlock.java:220 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.FenceGateBlock#FenceGateBlock(WoodType,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/FenceGateBlock.java:63 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ FenceGateBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: type. เรียกต่อ: sound(), soundType(), registerDefaultState(), any(), setValue().
Parameters
WoodType woodTypeBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
WoodType woodType = ...;
BlockBehaviour.Properties properties = ...;
FenceGateBlock instance = new FenceGateBlock(woodType, properties);
net.minecraft.world.level.block.FenceGateBlock#getBlockSupportShape(BlockState,BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/FenceGateBlock.java:98 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Block Support Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), empty(), getAxis(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
@Override
protected VoxelShape getBlockSupportShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos) {
return super.getBlockSupportShape(blockState, blockGetter, blockPos);
}
net.minecraft.world.level.block.FenceGateBlock#getCollisionShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/FenceGateBlock.java:107 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Collision Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), empty(), getAxis(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getCollisionShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getCollisionShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.FenceGateBlock#getOcclusionShape(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/FenceGateBlock.java:116 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Occlusion Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), getAxis(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected VoxelShape getOcclusionShape(BlockState blockState) {
return super.getOcclusionShape(blockState);
}
net.minecraft.world.level.block.FenceGateBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/FenceGateBlock.java:69 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), getAxis(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.FenceGateBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/FenceGateBlock.java:139 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: getLevel(), getClickedPos(), hasNeighborSignal(), getHorizontalDirection(), getAxis(), isWall(), getBlockState(), west(). คืนค่า: this.defaultBlockState().setValue(FACING, direction).setValue(OPEN, bl).setValue(POWERED, bl).setValue(IN_WALL, bl2).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
FenceGateBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.FenceGateBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/FenceGateBlock.java:125 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
แยกกรณีด้วย switch. เรียกต่อ: getValue(). มีจุด return อย่างน้อย 4 จุด.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.FenceGateBlock#neighborChanged(BlockState,Level,BlockPos,Block,Orientation,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/FenceGateBlock.java:199 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ neighborChanged ตาม implementation ของ FenceGateBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: hasNeighborSignal(), getValue(), setBlock(), setValue(), playSound(), fenceGateOpen(), fenceGateClose(), getRandom().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlock blockOrientation orientationboolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Block block = ...;
Orientation orientation = ...;
@Override
protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, Orientation orientation, boolean bl) {
super.neighborChanged(blockState, level, blockPos, block, orientation, bl);
}
net.minecraft.world.level.block.FenceGateBlock#onExplosionHit(BlockState,ServerLevel,BlockPos,Explosion,BiConsumer<ItemStack, BlockPos>)
- Origin:
common - Source:
net/minecraft/world/level/block/FenceGateBlock.java:178 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Explosion Hit
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canTriggerBlocks(), getValue(), setBlockAndUpdate(), setValue(), playSound(), fenceGateClose(), fenceGateOpen(), getRandom().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosExplosion explosionBiConsumer<ItemStack, BlockPos> biConsumer
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
Explosion explosion = ...;
BiConsumer<ItemStack, BlockPos> biConsumer = ...;
@Override
protected void onExplosionHit(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, Explosion explosion, BiConsumer<ItemStack, BlockPos> biConsumer) {
super.onExplosionHit(blockState, serverLevel, blockPos, explosion, biConsumer);
}
net.minecraft.world.level.block.FenceGateBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/FenceGateBlock.java:78 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getAxis(), getValue(), getClockWise(), isWall(), getBlockState(), relative(), getOpposite(), setValue(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
net.minecraft.world.level.block.FenceGateBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/FenceGateBlock.java:155 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), setValue(), setBlock(), getDirection(), getOpposite(), playSound(), fenceGateOpen(), fenceGateClose(). คืนค่า: InteractionResult.SUCCESS.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
FireBlock
- Full name:
net.minecraft.world.level.block.FireBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/FireBlock.java - Type:
class - Modifiers:
public - Extends:
BaseFireBlock
net.minecraft.world.level.block.FireBlock#bootStrap()
- Origin:
common - Source:
net/minecraft/world/level/block/FireBlock.java:327 - Modifiers:
public static - Return:
void
คืออะไร
ดำเนินการ bootStrap ตาม implementation ของ FireBlock
ทำงานยังไง
เรียกต่อ: setFlammable().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.FireBlock#canBurn(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/FireBlock.java:302 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Burn
ทำงานยังไง
เรียกต่อ: getIgniteOdds(). คืนค่า: this.getIgniteOdds(blockState) > 0.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean canBurn(BlockState blockState) {
return super.canBurn(blockState);
}
net.minecraft.world.level.block.FireBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/FireBlock.java:152 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: below(), getBlockState(), isFaceSturdy(), isValidFireLocation(). คืนค่า: levelReader.getBlockState(blockPos2).isFaceSturdy(levelReader, blockPos2, Direction.UP) || this.isValidFireLocation(levelReader, blockPos).
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.FireBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/FireBlock.java:63 - Modifiers:
public - Return:
MapCodec<FireBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ FireBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.FireBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/FireBlock.java:317 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.FireBlock#FireBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/FireBlock.java:68 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ FireBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: shapesCache. เรียกต่อ: registerDefaultState(), any(), setValue(), copyOf(), getPossibleStates(), stream(), filter(), getValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.FireBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/FireBlock.java:123 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
เรียกต่อ: get(), setValue(). คืนค่า: this.shapesCache.get(blockState.setValue(AGE, 0)).
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.FireBlock#getStateForPlacement(BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/FireBlock.java:133 - Modifiers:
protected - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: below(), getBlockState(), canBurn(), isFaceSturdy(), defaultBlockState(), values(), get(), setValue(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
@Override
protected BlockState getStateForPlacement(BlockGetter blockGetter, BlockPos blockPos) {
return super.getStateForPlacement(blockGetter, blockPos);
}
net.minecraft.world.level.block.FireBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/FireBlock.java:128 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: getLevel(), getClickedPos(). คืนค่า: this.getStateForPlacement(blockPlaceContext.getLevel(), blockPlaceContext.getClickedPos()).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
FireBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.FireBlock#isNearRain(Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/FireBlock.java:234 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Near Rain
ทำงานยังไง
เรียกต่อ: isRainingAt(), west(), east(), north(), south().
Parameters
Level levelBlockPos blockPos
ตัวอย่างใช้งาน
Level level = ...;
BlockPos blockPos = ...;
@Override
protected boolean isNearRain(Level level, BlockPos blockPos) {
return super.isNearRain(level, blockPos);
}
net.minecraft.world.level.block.FireBlock#onPlace(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/FireBlock.java:307 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Place
ทำงานยังไง
เรียกต่อ: scheduleTick(), getFireTickDelay().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onPlace(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onPlace(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.FireBlock#setFlammable(Block,int,int)
- Origin:
common - Source:
net/minecraft/world/level/block/FireBlock.java:322 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Flammable
ทำงานยังไง
เรียกต่อ: put().
Parameters
Block blockint iint j
ตัวอย่างใช้งาน
net.minecraft.world.level.block.FireBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/FireBlock.java:158 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: scheduleTick(), getFireTickDelay(), getGameRules(), getBoolean(), canSurvive(), removeBlock(), getBlockState(), below(). สร้างออบเจ็กต์: BlockPos.MutableBlockPos.
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.FireBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/FireBlock.java:107 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
เรียกต่อ: canSurvive(), getStateWithAge(), getValue(), defaultBlockState().
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
FletchingTableBlock
- Full name:
net.minecraft.world.level.block.FletchingTableBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/FletchingTableBlock.java - Type:
class - Modifiers:
public - Extends:
CraftingTableBlock
net.minecraft.world.level.block.FletchingTableBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/FletchingTableBlock.java:15 - Modifiers:
public - Return:
MapCodec<FletchingTableBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ FletchingTableBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.FletchingTableBlock#FletchingTableBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/FletchingTableBlock.java:20 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ FletchingTableBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
FletchingTableBlock instance = new FletchingTableBlock(properties);
net.minecraft.world.level.block.FletchingTableBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/FletchingTableBlock.java:24 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
คืนค่า: InteractionResult.PASS.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
FlowerBlock
- Full name:
net.minecraft.world.level.block.FlowerBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/FlowerBlock.java - Type:
class - Modifiers:
public - Extends:
BushBlock - Implements:
SuspiciousEffectHolder
net.minecraft.world.level.block.FlowerBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/FlowerBlock.java:29 - Modifiers:
public - Return:
MapCodec<? extends FlowerBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ FlowerBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.FlowerBlock#FlowerBlock(Holder<MobEffect>,float,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/FlowerBlock.java:34 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ FlowerBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: makeEffectList().
Parameters
Holder<MobEffect> holderfloat fBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
Holder<MobEffect> holder = ...;
BlockBehaviour.Properties properties = ...;
FlowerBlock instance = new FlowerBlock(holder, 0.0F, properties);
net.minecraft.world.level.block.FlowerBlock#FlowerBlock(SuspiciousStewEffects,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/FlowerBlock.java:38 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ FlowerBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: suspiciousStewEffects.
Parameters
SuspiciousStewEffects suspiciousStewEffectsBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
SuspiciousStewEffects suspiciousStewEffects = ...;
BlockBehaviour.Properties properties = ...;
FlowerBlock instance = new FlowerBlock(suspiciousStewEffects, properties);
net.minecraft.world.level.block.FlowerBlock#getBeeInteractionEffect()
- Origin:
common - Source:
net/minecraft/world/level/block/FlowerBlock.java:58 - Modifiers:
public - Return:
MobEffectInstance
คืออะไร
อ่านค่า Bee Interaction Effect
ทำงานยังไง
คืนค่า: null.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.FlowerBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/FlowerBlock.java:47 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
เรียกต่อ: getOffset(), move(). คืนค่า: SHAPE.move(vec3.x, vec3.y, vec3.z).
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.FlowerBlock#getSuspiciousEffects()
- Origin:
common - Source:
net/minecraft/world/level/block/FlowerBlock.java:53 - Modifiers:
public - Return:
SuspiciousStewEffects
คืออะไร
อ่านค่า Suspicious Effects
ทำงานยังไง
คืนค่า: this.suspiciousStewEffects.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.FlowerBlock#makeEffectList(Holder<MobEffect>,float)
- Origin:
common - Source:
net/minecraft/world/level/block/FlowerBlock.java:43 - Modifiers:
protected static - Return:
SuspiciousStewEffects
คืออะไร
สร้าง Effect List
ทำงานยังไง
เรียกต่อ: of(), Entry(), floor(). สร้างออบเจ็กต์: SuspiciousStewEffects, SuspiciousStewEffects.Entry. คืนค่า: new SuspiciousStewEffects(List.of(new SuspiciousStewEffects.Entry(holder, Mth.floor(f * 20.0F)))).
Parameters
Holder<MobEffect> holderfloat f
ตัวอย่างใช้งาน
Holder<MobEffect> holder = ...;
@Override
protected SuspiciousStewEffects makeEffectList(Holder<MobEffect> holder, float f) {
return super.makeEffectList(holder, f);
}
FlowerPotBlock
- Full name:
net.minecraft.world.level.block.FlowerPotBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/FlowerPotBlock.java - Type:
class - Modifiers:
public - Extends:
Block
net.minecraft.world.level.block.FlowerPotBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/FlowerPotBlock.java:41 - Modifiers:
public - Return:
MapCodec<FlowerPotBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ FlowerPotBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.FlowerPotBlock#FlowerPotBlock(Block,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/FlowerPotBlock.java:46 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ FlowerPotBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: potted. เรียกต่อ: put().
Parameters
Block blockBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
Block block = ...;
BlockBehaviour.Properties properties = ...;
FlowerPotBlock instance = new FlowerPotBlock(block, properties);
net.minecraft.world.level.block.FlowerPotBlock#getCloneItemStack(LevelReader,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/FlowerPotBlock.java:94 - Modifiers:
protected - Return:
ItemStack
คืออะไร
อ่านค่า Clone Item Stack
ทำงานยังไง
เรียกต่อ: isEmpty(). สร้างออบเจ็กต์: ItemStack. คืนค่า: this.isEmpty() ? super.getCloneItemStack(levelReader, blockPos, blockState, bl) : new ItemStack(this.potted).
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockStateboolean bl
ตัวอย่างใช้งาน
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected ItemStack getCloneItemStack(LevelReader levelReader, BlockPos blockPos, BlockState blockState, boolean bl) {
return super.getCloneItemStack(levelReader, blockPos, blockState, bl);
}
net.minecraft.world.level.block.FlowerPotBlock#getPotted()
- Origin:
common - Source:
net/minecraft/world/level/block/FlowerPotBlock.java:119 - Modifiers:
public - Return:
Block
คืออะไร
อ่านค่า Potted
ทำงานยังไง
คืนค่า: this.potted.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.FlowerPotBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/FlowerPotBlock.java:52 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
คืนค่า: SHAPE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.FlowerPotBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/FlowerPotBlock.java:123 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.FlowerPotBlock#isRandomlyTicking(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/FlowerPotBlock.java:128 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Randomly Ticking
ทำงานยังไง
เรียกต่อ: is(). คืนค่า: blockState.is(Blocks.POTTED_OPEN_EYEBLOSSOM) || blockState.is(Blocks.POTTED_CLOSED_EYEBLOSSOM).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean isRandomlyTicking(BlockState blockState) {
return super.isRandomlyTicking(blockState);
}
net.minecraft.world.level.block.FlowerPotBlock#opposite(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/FlowerPotBlock.java:149 - Modifiers:
public - Return:
BlockState
คืออะไร
ดำเนินการ opposite ตาม implementation ของ FlowerPotBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), defaultBlockState(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
FlowerPotBlock instance = ...;
BlockState blockState = ...;
BlockState result = instance.opposite(blockState);
net.minecraft.world.level.block.FlowerPotBlock#randomTick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/FlowerPotBlock.java:133 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ randomTick ตาม implementation ของ FlowerPotBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: potted. เรียกต่อ: isRandomlyTicking(), dimensionType(), natural(), isNaturalNight(), setBlock(), opposite(), fromBoolean(), transform().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void randomTick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.randomTick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.FlowerPotBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/FlowerPotBlock.java:103 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
เรียกต่อ: canSurvive(), defaultBlockState().
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
net.minecraft.world.level.block.FlowerPotBlock#useItemOn(ItemStack,BlockState,Level,BlockPos,Player,InteractionHand,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/FlowerPotBlock.java:57 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Item On
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getItem(), getOrDefault(), getBlock(), defaultBlockState(), isAir(), isEmpty(), setBlock(), gameEvent(). มีจุด return อย่างน้อย 3 จุด.
Parameters
ItemStack itemStackBlockState blockStateLevel levelBlockPos blockPosPlayer playerInteractionHand interactionHandBlockHitResult blockHitResult
ตัวอย่างใช้งาน
ItemStack itemStack = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
InteractionHand interactionHand = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useItemOn(ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult) {
return super.useItemOn(itemStack, blockState, level, blockPos, player, interactionHand, blockHitResult);
}
net.minecraft.world.level.block.FlowerPotBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/FlowerPotBlock.java:78 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isEmpty(), addItem(), drop(), setBlock(), defaultBlockState(), gameEvent(). สร้างออบเจ็กต์: ItemStack. มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
FrogspawnBlock
- Full name:
net.minecraft.world.level.block.FrogspawnBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/FrogspawnBlock.java - Type:
class - Modifiers:
public - Extends:
Block
net.minecraft.world.level.block.FrogspawnBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/FrogspawnBlock.java:52 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: mayPlaceOn(), below(). คืนค่า: mayPlaceOn(levelReader, blockPos.below()).
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.FrogspawnBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/FrogspawnBlock.java:38 - Modifiers:
public - Return:
MapCodec<FrogspawnBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ FrogspawnBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.FrogspawnBlock#entityInside(BlockState,Level,BlockPos,Entity)
- Origin:
common - Source:
net/minecraft/world/level/block/FrogspawnBlock.java:91 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ entityInside ตาม implementation ของ FrogspawnBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getType(), equals(), destroyBlock().
Parameters
BlockState blockStateLevel levelBlockPos blockPosEntity entity
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Entity entity = ...;
@Override
protected void entityInside(BlockState blockState, Level level, BlockPos blockPos, Entity entity) {
super.entityInside(blockState, level, blockPos, entity);
}
net.minecraft.world.level.block.FrogspawnBlock#FrogspawnBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/FrogspawnBlock.java:43 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ FrogspawnBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
FrogspawnBlock instance = new FrogspawnBlock(properties);
net.minecraft.world.level.block.FrogspawnBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/FrogspawnBlock.java:47 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
คืนค่า: SHAPE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.FrogspawnBlock#onPlace(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/FrogspawnBlock.java:57 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Place
ทำงานยังไง
เรียกต่อ: scheduleTick(), getFrogspawnHatchDelay(), getRandom().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onPlace(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onPlace(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.FrogspawnBlock#setDefaultHatchDelay()
- Origin:
common - Source:
net/minecraft/world/level/block/FrogspawnBlock.java:141 - Modifiers:
public static - Return:
void
คืออะไร
กำหนดค่า Default Hatch Delay
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 2 statement).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.FrogspawnBlock#setHatchDelay(int,int)
- Origin:
common - Source:
net/minecraft/world/level/block/FrogspawnBlock.java:135 - Modifiers:
public static - Return:
void
คืออะไร
กำหนดค่า Hatch Delay
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 2 statement).
Parameters
int iint j
ตัวอย่างใช้งาน
net.minecraft.world.level.block.FrogspawnBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/FrogspawnBlock.java:82 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canSurvive(), destroyBlock(), hatchFrogspawn().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.FrogspawnBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/FrogspawnBlock.java:66 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
เรียกต่อ: canSurvive(), defaultBlockState().
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
FrostedIceBlock
- Full name:
net.minecraft.world.level.block.FrostedIceBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/FrostedIceBlock.java - Type:
class - Modifiers:
public - Extends:
IceBlock
net.minecraft.world.level.block.FrostedIceBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/FrostedIceBlock.java:28 - Modifiers:
public - Return:
MapCodec<FrostedIceBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ FrostedIceBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.FrostedIceBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/FrostedIceBlock.java:98 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.FrostedIceBlock#FrostedIceBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/FrostedIceBlock.java:33 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ FrostedIceBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
FrostedIceBlock instance = new FrostedIceBlock(properties);
net.minecraft.world.level.block.FrostedIceBlock#getCloneItemStack(LevelReader,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/FrostedIceBlock.java:103 - Modifiers:
protected - Return:
ItemStack
คืออะไร
อ่านค่า Clone Item Stack
ทำงานยังไง
คืนค่า: ItemStack.EMPTY.
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockStateboolean bl
ตัวอย่างใช้งาน
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected ItemStack getCloneItemStack(LevelReader levelReader, BlockPos blockPos, BlockState blockState, boolean bl) {
return super.getCloneItemStack(levelReader, blockPos, blockState, bl);
}
net.minecraft.world.level.block.FrostedIceBlock#neighborChanged(BlockState,Level,BlockPos,Block,Orientation,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/FrostedIceBlock.java:73 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ neighborChanged ตาม implementation ของ FrostedIceBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: defaultBlockState(), is(), fewerNeigboursThan(), melt().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlock blockOrientation orientationboolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Block block = ...;
Orientation orientation = ...;
@Override
protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, Orientation orientation, boolean bl) {
super.neighborChanged(blockState, level, blockPos, block, orientation, bl);
}
net.minecraft.world.level.block.FrostedIceBlock#onPlace(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/FrostedIceBlock.java:38 - Modifiers:
public - Return:
void
คืออะไร
จัดการเหตุการณ์ Place
ทำงานยังไง
เรียกต่อ: scheduleTick(), nextInt(), getRandom().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
FrostedIceBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
instance.onPlace(blockState, level, blockPos, blockState2, true);
net.minecraft.world.level.block.FrostedIceBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/FrostedIceBlock.java:43 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: nextInt(), fewerNeigboursThan(), getMaxLocalRawBrightness(), getValue(), getLightBlock(), slightlyMelt(), MutableBlockPos(), values(). สร้างออบเจ็กต์: BlockPos.MutableBlockPos.
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
FungusBlock
- Full name:
net.minecraft.world.level.block.FungusBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/FungusBlock.java - Type:
class - Modifiers:
public - Extends:
BushBlock - Implements:
BonemealableBlock
net.minecraft.world.level.block.FungusBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/FungusBlock.java:37 - Modifiers:
public - Return:
MapCodec<FungusBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ FungusBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.FungusBlock#FungusBlock(ResourceKey<ConfiguredFeature<?, ?>>,Block,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/FungusBlock.java:42 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ FungusBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: feature, requiredBlock.
Parameters
ResourceKey<ConfiguredFeature<?, ?>> resourceKeyBlock blockBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
ResourceKey<ConfiguredFeature<?, ?>> resourceKey = ...;
Block block = ...;
BlockBehaviour.Properties properties = ...;
FungusBlock instance = new FungusBlock(resourceKey, block, properties);
net.minecraft.world.level.block.FungusBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/FungusBlock.java:48 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
คืนค่า: SHAPE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.FungusBlock#isBonemealSuccess(Level,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/FungusBlock.java:71 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Bonemeal Success
ทำงานยังไง
เรียกต่อ: nextFloat(). คืนค่า: randomSource.nextFloat() < 0.4.
Parameters
Level levelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
FungusBlock instance = ...;
Level level = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isBonemealSuccess(level, randomSource, blockPos, blockState);
net.minecraft.world.level.block.FungusBlock#isValidBonemealTarget(LevelReader,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/FungusBlock.java:65 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Valid Bonemeal Target
ทำงานยังไง
เรียกต่อ: getBlockState(), below(), is(). คืนค่า: blockState2.is(this.requiredBlock).
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
FungusBlock instance = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isValidBonemealTarget(levelReader, blockPos, blockState);
net.minecraft.world.level.block.FungusBlock#mayPlaceOn(BlockState,BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/FungusBlock.java:53 - Modifiers:
protected - Return:
boolean
คืออะไร
ดำเนินการ mayPlaceOn ตาม implementation ของ FungusBlock
ทำงานยังไง
เรียกต่อ: is().
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
@Override
protected boolean mayPlaceOn(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos) {
return super.mayPlaceOn(blockState, blockGetter, blockPos);
}
net.minecraft.world.level.block.FungusBlock#performBonemeal(ServerLevel,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/FungusBlock.java:76 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ performBonemeal ตาม implementation ของ FungusBlock
ทำงานยังไง
เรียกต่อ: getFeature(), ifPresent(), value(), place(), getChunkSource(), getGenerator().
Parameters
ServerLevel serverLevelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
FungusBlock instance = ...;
ServerLevel serverLevel = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
instance.performBonemeal(serverLevel, randomSource, blockPos, blockState);
FurnaceBlock
- Full name:
net.minecraft.world.level.block.FurnaceBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/FurnaceBlock.java - Type:
class - Modifiers:
public - Extends:
AbstractFurnaceBlock
net.minecraft.world.level.block.FurnaceBlock#animateTick(BlockState,Level,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/FurnaceBlock.java:54 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ animateTick ตาม implementation ของ FurnaceBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), getX(), getY(), getZ(), nextDouble(), playLocalSound(), getAxis(), getStepX().
Parameters
BlockState blockStateLevel levelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
FurnaceBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
instance.animateTick(blockState, level, blockPos, randomSource);
net.minecraft.world.level.block.FurnaceBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/FurnaceBlock.java:25 - Modifiers:
public - Return:
MapCodec<FurnaceBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ FurnaceBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.FurnaceBlock#FurnaceBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/FurnaceBlock.java:30 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ FurnaceBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.FurnaceBlock#getTicker(Level,BlockState,BlockEntityType<T>)
- Origin:
common - Source:
net/minecraft/world/level/block/FurnaceBlock.java:39 - Modifiers:
public - Return:
BlockEntityTicker<T>
คืออะไร
อ่านค่า Ticker
ทำงานยังไง
เรียกต่อ: createFurnaceTicker(). คืนค่า: createFurnaceTicker(level, blockEntityType, BlockEntityType.FURNACE).
Parameters
Level levelBlockState blockStateBlockEntityType<T> blockEntityType
ตัวอย่างใช้งาน
FurnaceBlock instance = ...;
Level level = ...;
BlockState blockState = ...;
BlockEntityType<T> blockEntityType = ...;
BlockEntityTicker<T> result = instance.getTicker(level, blockState, blockEntityType);
net.minecraft.world.level.block.FurnaceBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/FurnaceBlock.java:34 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ FurnaceBlock
ทำงานยังไง
สร้างออบเจ็กต์: FurnaceBlockEntity. คืนค่า: new FurnaceBlockEntity(blockPos, blockState).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
FurnaceBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
net.minecraft.world.level.block.FurnaceBlock#openContainer(Level,BlockPos,Player)
- Origin:
common - Source:
net/minecraft/world/level/block/FurnaceBlock.java:45 - Modifiers:
protected - Return:
void
คืออะไร
เปิด Container
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity(), openMenu(), awardStat().
Parameters
Level levelBlockPos blockPosPlayer player
ตัวอย่างใช้งาน
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
@Override
protected void openContainer(Level level, BlockPos blockPos, Player player) {
super.openContainer(level, blockPos, player);
}
GlazedTerracottaBlock
- Full name:
net.minecraft.world.level.block.GlazedTerracottaBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/GlazedTerracottaBlock.java - Type:
class - Modifiers:
public - Extends:
HorizontalDirectionalBlock
net.minecraft.world.level.block.GlazedTerracottaBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/GlazedTerracottaBlock.java:12 - Modifiers:
public - Return:
MapCodec<GlazedTerracottaBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ GlazedTerracottaBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.GlazedTerracottaBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/GlazedTerracottaBlock.java:21 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.GlazedTerracottaBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/GlazedTerracottaBlock.java:26 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: defaultBlockState(), setValue(), getHorizontalDirection(), getOpposite(). คืนค่า: this.defaultBlockState().setValue(FACING, blockPlaceContext.getHorizontalDirection().getOpposite()).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
GlazedTerracottaBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.GlazedTerracottaBlock#GlazedTerracottaBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/GlazedTerracottaBlock.java:17 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ GlazedTerracottaBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
GlazedTerracottaBlock instance = new GlazedTerracottaBlock(properties);
GlowLichenBlock
- Full name:
net.minecraft.world.level.block.GlowLichenBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/GlowLichenBlock.java - Type:
class - Modifiers:
public - Extends:
MultifaceSpreadeableBlock - Implements:
BonemealableBlock
net.minecraft.world.level.block.GlowLichenBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/GlowLichenBlock.java:18 - Modifiers:
public - Return:
MapCodec<GlowLichenBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ GlowLichenBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.GlowLichenBlock#emission(int)
- Origin:
common - Source:
net/minecraft/world/level/block/GlowLichenBlock.java:27 - Modifiers:
public static - Return:
ToIntFunction<BlockState>
คืออะไร
ดำเนินการ emission ตาม implementation ของ GlowLichenBlock
ทำงานยังไง
เรียกต่อ: hasAnyFace(). คืนค่า: blockState -> MultifaceBlock.hasAnyFace(blockState) ? i : 0.
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.level.block.GlowLichenBlock#getSpreader()
- Origin:
common - Source:
net/minecraft/world/level/block/GlowLichenBlock.java:51 - Modifiers:
public - Return:
MultifaceSpreader
คืออะไร
อ่านค่า Spreader
ทำงานยังไง
คืนค่า: this.spreader.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.GlowLichenBlock#GlowLichenBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/GlowLichenBlock.java:23 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ GlowLichenBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
GlowLichenBlock instance = new GlowLichenBlock(properties);
net.minecraft.world.level.block.GlowLichenBlock#isBonemealSuccess(Level,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/GlowLichenBlock.java:36 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Bonemeal Success
ทำงานยังไง
คืนค่า: true.
Parameters
Level levelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
GlowLichenBlock instance = ...;
Level level = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isBonemealSuccess(level, randomSource, blockPos, blockState);
net.minecraft.world.level.block.GlowLichenBlock#isValidBonemealTarget(LevelReader,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/GlowLichenBlock.java:31 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Valid Bonemeal Target
ทำงานยังไง
เรียกต่อ: stream(), anyMatch(), canSpreadInAnyDirection(), getOpposite(). คืนค่า: Direction.stream().anyMatch(direction -> this.spreader.canSpreadInAnyDirection(blockState, levelReader, blockPos, direction.getOpposite())).
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
GlowLichenBlock instance = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isValidBonemealTarget(levelReader, blockPos, blockState);
net.minecraft.world.level.block.GlowLichenBlock#performBonemeal(ServerLevel,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/GlowLichenBlock.java:41 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ performBonemeal ตาม implementation ของ GlowLichenBlock
ทำงานยังไง
เรียกต่อ: spreadFromRandomFaceTowardRandomDirection().
Parameters
ServerLevel serverLevelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
GlowLichenBlock instance = ...;
ServerLevel serverLevel = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
instance.performBonemeal(serverLevel, randomSource, blockPos, blockState);
net.minecraft.world.level.block.GlowLichenBlock#propagatesSkylightDown(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/GlowLichenBlock.java:46 - Modifiers:
protected - Return:
boolean
คืออะไร
ดำเนินการ propagatesSkylightDown ตาม implementation ของ GlowLichenBlock
ทำงานยังไง
เรียกต่อ: getFluidState(), isEmpty(). คืนค่า: blockState.getFluidState().isEmpty().
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean propagatesSkylightDown(BlockState blockState) {
return super.propagatesSkylightDown(blockState);
}
GrassBlock
- Full name:
net.minecraft.world.level.block.GrassBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/GrassBlock.java - Type:
class - Modifiers:
public - Extends:
SpreadingSnowyDirtBlock - Implements:
BonemealableBlock
net.minecraft.world.level.block.GrassBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/GrassBlock.java:23 - Modifiers:
public - Return:
MapCodec<GrassBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ GrassBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.GrassBlock#getType()
- Origin:
common - Source:
net/minecraft/world/level/block/GrassBlock.java:91 - Modifiers:
public - Return:
BonemealableBlock.Type
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: BonemealableBlock.Type.NEIGHBOR_SPREADER.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.GrassBlock#GrassBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/GrassBlock.java:28 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ GrassBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.GrassBlock#isBonemealSuccess(Level,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/GrassBlock.java:37 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Bonemeal Success
ทำงานยังไง
คืนค่า: true.
Parameters
Level levelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
GrassBlock instance = ...;
Level level = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isBonemealSuccess(level, randomSource, blockPos, blockState);
net.minecraft.world.level.block.GrassBlock#isValidBonemealTarget(LevelReader,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/GrassBlock.java:32 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Valid Bonemeal Target
ทำงานยังไง
เรียกต่อ: getBlockState(), above(), isAir(). คืนค่า: levelReader.getBlockState(blockPos.above()).isAir().
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
GrassBlock instance = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isValidBonemealTarget(levelReader, blockPos, blockState);
net.minecraft.world.level.block.GrassBlock#performBonemeal(ServerLevel,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/GrassBlock.java:42 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ performBonemeal ตาม implementation ของ GrassBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: above(), defaultBlockState(), registryAccess(), lookupOrThrow(), get(), offset(), nextInt(), getBlockState().
Parameters
ServerLevel serverLevelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
GrassBlock instance = ...;
ServerLevel serverLevel = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
instance.performBonemeal(serverLevel, randomSource, blockPos, blockState);
GrindstoneBlock
- Full name:
net.minecraft.world.level.block.GrindstoneBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/GrindstoneBlock.java - Type:
class - Modifiers:
public - Extends:
FaceAttachedHorizontalDirectionalBlock
net.minecraft.world.level.block.GrindstoneBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/GrindstoneBlock.java:147 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.GrindstoneBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/GrindstoneBlock.java:95 - Modifiers:
public - Return:
MapCodec<GrindstoneBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ GrindstoneBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.GrindstoneBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/GrindstoneBlock.java:177 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.GrindstoneBlock#getCollisionShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/GrindstoneBlock.java:137 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Collision Shape
ทำงานยังไง
เรียกต่อ: getVoxelShape(). คืนค่า: this.getVoxelShape(blockState).
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getCollisionShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getCollisionShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.GrindstoneBlock#getMenuProvider(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/GrindstoneBlock.java:162 - Modifiers:
protected - Return:
MenuProvider
คืออะไร
อ่านค่า Menu Provider
ทำงานยังไง
เรียกต่อ: create(). สร้างออบเจ็กต์: SimpleMenuProvider, GrindstoneMenu. คืนค่า: new SimpleMenuProvider((i, inventory, player) -> new GrindstoneMenu(i, inventory, ContainerLevelAccess.create(level, blockPos)), CONTAINER_TITLE).
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected MenuProvider getMenuProvider(BlockState blockState, Level level, BlockPos blockPos) {
return super.getMenuProvider(blockState, level, blockPos);
}
net.minecraft.world.level.block.GrindstoneBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/GrindstoneBlock.java:142 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
เรียกต่อ: getVoxelShape(). คืนค่า: this.getVoxelShape(blockState).
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.GrindstoneBlock#GrindstoneBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/GrindstoneBlock.java:100 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ GrindstoneBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
GrindstoneBlock instance = new GrindstoneBlock(properties);
net.minecraft.world.level.block.GrindstoneBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/GrindstoneBlock.java:182 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.GrindstoneBlock#mirror(BlockState,Mirror)
- Origin:
common - Source:
net/minecraft/world/level/block/GrindstoneBlock.java:172 - Modifiers:
protected - Return:
BlockState
คืออะไร
ดำเนินการ mirror ตาม implementation ของ GrindstoneBlock
ทำงานยังไง
เรียกต่อ: rotate(), getRotation(), getValue(). คืนค่า: blockState.rotate(mirror.getRotation(blockState.getValue(FACING))).
Parameters
BlockState blockStateMirror mirror
ตัวอย่างใช้งาน
BlockState blockState = ...;
Mirror mirror = ...;
@Override
protected BlockState mirror(BlockState blockState, Mirror mirror) {
return super.mirror(blockState, mirror);
}
net.minecraft.world.level.block.GrindstoneBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/GrindstoneBlock.java:167 - Modifiers:
protected - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
เรียกต่อ: setValue(), getValue(). คืนค่า: blockState.setValue(FACING, rotation.rotate(blockState.getValue(FACING))).
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
BlockState blockState = ...;
Rotation rotation = ...;
@Override
protected BlockState rotate(BlockState blockState, Rotation rotation) {
return super.rotate(blockState, rotation);
}
net.minecraft.world.level.block.GrindstoneBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/GrindstoneBlock.java:152 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: openMenu(), getMenuProvider(), awardStat(). คืนค่า: InteractionResult.SUCCESS.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
GrowingPlantBlock
- Full name:
net.minecraft.world.level.block.GrowingPlantBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/GrowingPlantBlock.java - Type:
class - Modifiers:
public abstract - Extends:
Block
net.minecraft.world.level.block.GrowingPlantBlock#canAttachTo(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantBlock.java:61 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Attach To
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean canAttachTo(BlockState blockState) {
return super.canAttachTo(blockState);
}
net.minecraft.world.level.block.GrowingPlantBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantBlock.java:45 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: relative(), getOpposite(), getBlockState(), canAttachTo(), is(), getHeadBlock(), getBodyBlock(), isFaceSturdy().
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.GrowingPlantBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantBlock.java:29 - Modifiers:
protected abstract - Return:
MapCodec<? extends GrowingPlantBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ GrowingPlantBlock
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.GrowingPlantBlock#getBodyBlock()
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantBlock.java:72 - Modifiers:
protected abstract - Return:
Block
คืออะไร
อ่านค่า Body Block
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.GrowingPlantBlock#getHeadBlock()
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantBlock.java:70 - Modifiers:
protected abstract - Return:
GrowingPlantHeadBlock
คืออะไร
อ่านค่า Head Block
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.GrowingPlantBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantBlock.java:65 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
คืนค่า: this.shape.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.GrowingPlantBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantBlock.java:32 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: getLevel(), getBlockState(), getClickedPos(), relative(), is(), getHeadBlock(), getBodyBlock(), defaultBlockState().
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
GrowingPlantBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.GrowingPlantBlock#getStateForPlacement(RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantBlock.java:41 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: defaultBlockState(). คืนค่า: this.defaultBlockState().
Parameters
RandomSource randomSource
ตัวอย่างใช้งาน
GrowingPlantBlock instance = ...;
RandomSource randomSource = ...;
BlockState result = instance.getStateForPlacement(randomSource);
net.minecraft.world.level.block.GrowingPlantBlock#GrowingPlantBlock(BlockBehaviour.Properties,Direction,VoxelShape,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantBlock.java:22 - Modifiers:
protected - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ GrowingPlantBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: growthDirection, shape, scheduleFluidTicks.
Parameters
BlockBehaviour.Properties propertiesDirection directionVoxelShape voxelShapeboolean bl
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
Direction direction = ...;
VoxelShape voxelShape = ...;
GrowingPlantBlock instance = new GrowingPlantBlock(properties, direction, voxelShape, true);
net.minecraft.world.level.block.GrowingPlantBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantBlock.java:54 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canSurvive(), destroyBlock().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
GrowingPlantBodyBlock
- Full name:
net.minecraft.world.level.block.GrowingPlantBodyBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/GrowingPlantBodyBlock.java - Type:
class - Modifiers:
public abstract - Extends:
GrowingPlantBlock - Implements:
BonemealableBlock
net.minecraft.world.level.block.GrowingPlantBodyBlock#canBeReplaced(BlockState,BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantBodyBlock.java:89 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Be Replaced
ทำงานยังไง
เรียกต่อ: getItemInHand(), is(), getHeadBlock(), asItem(). คืนค่า: bl && blockPlaceContext.getItemInHand().is(this.getHeadBlock().asItem()) ? false : bl.
Parameters
BlockState blockStateBlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockPlaceContext blockPlaceContext = ...;
@Override
protected boolean canBeReplaced(BlockState blockState, BlockPlaceContext blockPlaceContext) {
return super.canBeReplaced(blockState, blockPlaceContext);
}
net.minecraft.world.level.block.GrowingPlantBodyBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantBodyBlock.java:26 - Modifiers:
protected abstract - Return:
MapCodec<? extends GrowingPlantBodyBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ GrowingPlantBodyBlock
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.GrowingPlantBodyBlock#getBodyBlock()
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantBodyBlock.java:95 - Modifiers:
protected - Return:
Block
คืออะไร
อ่านค่า Body Block
ทำงานยังไง
คืนค่า: this.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.GrowingPlantBodyBlock#getCloneItemStack(LevelReader,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantBodyBlock.java:60 - Modifiers:
protected - Return:
ItemStack
คืออะไร
อ่านค่า Clone Item Stack
ทำงานยังไง
เรียกต่อ: getHeadBlock(). สร้างออบเจ็กต์: ItemStack. คืนค่า: new ItemStack(this.getHeadBlock()).
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockStateboolean bl
ตัวอย่างใช้งาน
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected ItemStack getCloneItemStack(LevelReader levelReader, BlockPos blockPos, BlockState blockState, boolean bl) {
return super.getCloneItemStack(levelReader, blockPos, blockState, bl);
}
net.minecraft.world.level.block.GrowingPlantBodyBlock#GrowingPlantBodyBlock(BlockBehaviour.Properties,Direction,VoxelShape,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantBodyBlock.java:22 - Modifiers:
protected - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ GrowingPlantBodyBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties propertiesDirection directionVoxelShape voxelShapeboolean bl
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
Direction direction = ...;
VoxelShape voxelShape = ...;
GrowingPlantBodyBlock instance = new GrowingPlantBodyBlock(properties, direction, voxelShape, true);
net.minecraft.world.level.block.GrowingPlantBodyBlock#isBonemealSuccess(Level,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantBodyBlock.java:71 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Bonemeal Success
ทำงานยังไง
คืนค่า: true.
Parameters
Level levelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
GrowingPlantBodyBlock instance = ...;
Level level = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isBonemealSuccess(level, randomSource, blockPos, blockState);
net.minecraft.world.level.block.GrowingPlantBodyBlock#isValidBonemealTarget(LevelReader,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantBodyBlock.java:65 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Valid Bonemeal Target
ทำงานยังไง
เรียกต่อ: getHeadPos(), getBlock(), isPresent(), getHeadBlock(), canGrowInto(), getBlockState(), get(), relative(). คืนค่า: optional.isPresent() && this.getHeadBlock().canGrowInto(levelReader.getBlockState(optional.get().relative(this.growthDirection))).
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
GrowingPlantBodyBlock instance = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isValidBonemealTarget(levelReader, blockPos, blockState);
net.minecraft.world.level.block.GrowingPlantBodyBlock#performBonemeal(ServerLevel,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantBodyBlock.java:76 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ performBonemeal ตาม implementation ของ GrowingPlantBodyBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getHeadPos(), getBlock(), isPresent(), getBlockState(), get().
Parameters
ServerLevel serverLevelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
GrowingPlantBodyBlock instance = ...;
ServerLevel serverLevel = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
instance.performBonemeal(serverLevel, randomSource, blockPos, blockState);
net.minecraft.world.level.block.GrowingPlantBodyBlock#updateHeadAfterConvertedFromBody(BlockState,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantBodyBlock.java:29 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Head After Converted From Body
ทำงานยังไง
คืนค่า: blockState2.
Parameters
BlockState blockStateBlockState blockState2
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockState blockState2 = ...;
@Override
protected BlockState updateHeadAfterConvertedFromBody(BlockState blockState, BlockState blockState2) {
return super.updateHeadAfterConvertedFromBody(blockState, blockState2);
}
net.minecraft.world.level.block.GrowingPlantBodyBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantBodyBlock.java:33 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getOpposite(), canSurvive(), scheduleTick(), getHeadBlock(), is(), updateHeadAfterConvertedFromBody(), getStateForPlacement(), getTickDelay(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
GrowingPlantHeadBlock
- Full name:
net.minecraft.world.level.block.GrowingPlantHeadBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/GrowingPlantHeadBlock.java - Type:
class - Modifiers:
public abstract - Extends:
GrowingPlantBlock - Implements:
BonemealableBlock
net.minecraft.world.level.block.GrowingPlantHeadBlock#canGrowInto(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantHeadBlock.java:125 - Modifiers:
protected abstract - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Grow Into
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean canGrowInto(BlockState blockState) {
return super.canGrowInto(blockState);
}
net.minecraft.world.level.block.GrowingPlantHeadBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantHeadBlock.java:30 - Modifiers:
protected abstract - Return:
MapCodec<? extends GrowingPlantHeadBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ GrowingPlantHeadBlock
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.GrowingPlantHeadBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantHeadBlock.java:95 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.GrowingPlantHeadBlock#getBlocksToGrowWhenBonemealed(RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantHeadBlock.java:123 - Modifiers:
protected abstract - Return:
int
คืออะไร
อ่านค่า Blocks To Grow When Bonemealed
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
RandomSource randomSource
ตัวอย่างใช้งาน
RandomSource randomSource = ...;
@Override
protected int getBlocksToGrowWhenBonemealed(RandomSource randomSource) {
return super.getBlocksToGrowWhenBonemealed(randomSource);
}
net.minecraft.world.level.block.GrowingPlantHeadBlock#getGrowIntoState(BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantHeadBlock.java:53 - Modifiers:
protected - Return:
BlockState
คืออะไร
อ่านค่า Grow Into State
ทำงานยังไง
เรียกต่อ: cycle(). คืนค่า: blockState.cycle(AGE).
Parameters
BlockState blockStateRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
RandomSource randomSource = ...;
@Override
protected BlockState getGrowIntoState(BlockState blockState, RandomSource randomSource) {
return super.getGrowIntoState(blockState, randomSource);
}
net.minecraft.world.level.block.GrowingPlantHeadBlock#getHeadBlock()
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantHeadBlock.java:127 - Modifiers:
protected - Return:
GrowingPlantHeadBlock
คืออะไร
อ่านค่า Head Block
ทำงานยังไง
คืนค่า: this.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.GrowingPlantHeadBlock#getMaxAgeState(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantHeadBlock.java:57 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า Max Age State
ทำงานยังไง
เรียกต่อ: setValue(). คืนค่า: blockState.setValue(AGE, 25).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
GrowingPlantHeadBlock instance = ...;
BlockState blockState = ...;
BlockState result = instance.getMaxAgeState(blockState);
net.minecraft.world.level.block.GrowingPlantHeadBlock#getStateForPlacement(RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantHeadBlock.java:33 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: defaultBlockState(), setValue(), nextInt(). คืนค่า: this.defaultBlockState().setValue(AGE, randomSource.nextInt(25)).
Parameters
RandomSource randomSource
ตัวอย่างใช้งาน
GrowingPlantHeadBlock instance = ...;
RandomSource randomSource = ...;
BlockState result = instance.getStateForPlacement(randomSource);
net.minecraft.world.level.block.GrowingPlantHeadBlock#GrowingPlantHeadBlock(BlockBehaviour.Properties,Direction,VoxelShape,boolean,double)
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantHeadBlock.java:24 - Modifiers:
protected - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ GrowingPlantHeadBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: growPerTickProbability. เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties propertiesDirection directionVoxelShape voxelShapeboolean bldouble d
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
Direction direction = ...;
VoxelShape voxelShape = ...;
GrowingPlantHeadBlock instance = new GrowingPlantHeadBlock(properties, direction, voxelShape, true, 0.0D);
net.minecraft.world.level.block.GrowingPlantHeadBlock#isBonemealSuccess(Level,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantHeadBlock.java:105 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Bonemeal Success
ทำงานยังไง
คืนค่า: true.
Parameters
Level levelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
GrowingPlantHeadBlock instance = ...;
Level level = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isBonemealSuccess(level, randomSource, blockPos, blockState);
net.minecraft.world.level.block.GrowingPlantHeadBlock#isMaxAge(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantHeadBlock.java:61 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Max Age
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: blockState.getValue(AGE) == 25.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
GrowingPlantHeadBlock instance = ...;
BlockState blockState = ...;
boolean result = instance.isMaxAge(blockState);
net.minecraft.world.level.block.GrowingPlantHeadBlock#isRandomlyTicking(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantHeadBlock.java:38 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Randomly Ticking
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: blockState.getValue(AGE) < 25.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean isRandomlyTicking(BlockState blockState) {
return super.isRandomlyTicking(blockState);
}
net.minecraft.world.level.block.GrowingPlantHeadBlock#isValidBonemealTarget(LevelReader,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantHeadBlock.java:100 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Valid Bonemeal Target
ทำงานยังไง
เรียกต่อ: canGrowInto(), getBlockState(), relative(). คืนค่า: this.canGrowInto(levelReader.getBlockState(blockPos.relative(this.growthDirection))).
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
GrowingPlantHeadBlock instance = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isValidBonemealTarget(levelReader, blockPos, blockState);
net.minecraft.world.level.block.GrowingPlantHeadBlock#performBonemeal(ServerLevel,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantHeadBlock.java:110 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ performBonemeal ตาม implementation ของ GrowingPlantHeadBlock
ทำงานยังไง
มีการวนลูป. เรียกต่อ: relative(), min(), getValue(), getBlocksToGrowWhenBonemealed(), canGrowInto(), getBlockState(), setBlockAndUpdate(), setValue().
Parameters
ServerLevel serverLevelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
GrowingPlantHeadBlock instance = ...;
ServerLevel serverLevel = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
instance.performBonemeal(serverLevel, randomSource, blockPos, blockState);
net.minecraft.world.level.block.GrowingPlantHeadBlock#randomTick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantHeadBlock.java:43 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ randomTick ตาม implementation ของ GrowingPlantHeadBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), nextDouble(), relative(), canGrowInto(), getBlockState(), setBlockAndUpdate(), getGrowIntoState().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void randomTick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.randomTick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.GrowingPlantHeadBlock#updateBodyAfterConvertedFromHead(BlockState,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantHeadBlock.java:65 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Body After Converted From Head
ทำงานยังไง
คืนค่า: blockState2.
Parameters
BlockState blockStateBlockState blockState2
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockState blockState2 = ...;
@Override
protected BlockState updateBodyAfterConvertedFromHead(BlockState blockState, BlockState blockState2) {
return super.updateBodyAfterConvertedFromHead(blockState, blockState2);
}
net.minecraft.world.level.block.GrowingPlantHeadBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/GrowingPlantHeadBlock.java:69 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getOpposite(), canSurvive(), scheduleTick(), is(), getBodyBlock(), getTickDelay(), updateBodyAfterConvertedFromHead(), defaultBlockState(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
HalfTransparentBlock
- Full name:
net.minecraft.world.level.block.HalfTransparentBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/HalfTransparentBlock.java - Type:
class - Modifiers:
public - Extends:
Block
net.minecraft.world.level.block.HalfTransparentBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/HalfTransparentBlock.java:11 - Modifiers:
protected - Return:
MapCodec<? extends HalfTransparentBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ HalfTransparentBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.HalfTransparentBlock#HalfTransparentBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/HalfTransparentBlock.java:16 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ HalfTransparentBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
HalfTransparentBlock instance = new HalfTransparentBlock(properties);
net.minecraft.world.level.block.HalfTransparentBlock#skipRendering(BlockState,BlockState,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/HalfTransparentBlock.java:20 - Modifiers:
protected - Return:
boolean
คืออะไร
ดำเนินการ skipRendering ตาม implementation ของ HalfTransparentBlock
ทำงานยังไง
เรียกต่อ: is(). คืนค่า: blockState2.is(this) ? true : super.skipRendering(blockState, blockState2, direction).
Parameters
BlockState blockStateBlockState blockState2Direction direction
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockState blockState2 = ...;
Direction direction = ...;
@Override
protected boolean skipRendering(BlockState blockState, BlockState blockState2, Direction direction) {
return super.skipRendering(blockState, blockState2, direction);
}
HangingMossBlock
- Full name:
net.minecraft.world.level.block.HangingMossBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/HangingMossBlock.java - Type:
class - Modifiers:
public - Extends:
Block - Implements:
BonemealableBlock
net.minecraft.world.level.block.HangingMossBlock#animateTick(BlockState,Level,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/HangingMossBlock.java:45 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ animateTick ตาม implementation ของ HangingMossBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: nextInt(), getBlockState(), above(), is(), playLocalSound(), getX(), getY(), getZ().
Parameters
BlockState blockStateLevel levelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
HangingMossBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
instance.animateTick(blockState, level, blockPos, randomSource);
net.minecraft.world.level.block.HangingMossBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/HangingMossBlock.java:60 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: canStayAtPosition(). คืนค่า: this.canStayAtPosition(levelReader, blockPos).
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.HangingMossBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/HangingMossBlock.java:30 - Modifiers:
public - Return:
MapCodec<HangingMossBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ HangingMossBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.HangingMossBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/HangingMossBlock.java:96 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.HangingMossBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/HangingMossBlock.java:40 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: blockState.getValue(TIP) ? TIP_SHAPE : BASE_SHAPE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.HangingMossBlock#getTip(BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/HangingMossBlock.java:110 - Modifiers:
public - Return:
BlockPos
คืออะไร
อ่านค่า Tip
ทำงานยังไง
มีการวนลูป. เรียกต่อ: mutable(), move(), getBlockState(), is(), relative(), immutable(). คืนค่า: mutableBlockPos.relative(Direction.UP).immutable().
Parameters
BlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
HangingMossBlock instance = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
BlockPos result = instance.getTip(blockGetter, blockPos);
net.minecraft.world.level.block.HangingMossBlock#HangingMossBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/HangingMossBlock.java:35 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ HangingMossBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
HangingMossBlock instance = new HangingMossBlock(properties);
net.minecraft.world.level.block.HangingMossBlock#isBonemealSuccess(Level,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/HangingMossBlock.java:122 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Bonemeal Success
ทำงานยังไง
คืนค่า: true.
Parameters
Level levelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
HangingMossBlock instance = ...;
Level level = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isBonemealSuccess(level, randomSource, blockPos, blockState);
net.minecraft.world.level.block.HangingMossBlock#isValidBonemealTarget(LevelReader,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/HangingMossBlock.java:101 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Valid Bonemeal Target
ทำงานยังไง
เรียกต่อ: canGrowInto(), getBlockState(), getTip(), below(). คืนค่า: this.canGrowInto(levelReader.getBlockState(this.getTip(levelReader, blockPos).below())).
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
HangingMossBlock instance = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isValidBonemealTarget(levelReader, blockPos, blockState);
net.minecraft.world.level.block.HangingMossBlock#performBonemeal(ServerLevel,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/HangingMossBlock.java:127 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ performBonemeal ตาม implementation ของ HangingMossBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getTip(), below(), canGrowInto(), getBlockState(), setBlockAndUpdate(), setValue().
Parameters
ServerLevel serverLevelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
HangingMossBlock instance = ...;
ServerLevel serverLevel = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
instance.performBonemeal(serverLevel, randomSource, blockPos, blockState);
net.minecraft.world.level.block.HangingMossBlock#propagatesSkylightDown(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/HangingMossBlock.java:55 - Modifiers:
protected - Return:
boolean
คืออะไร
ดำเนินการ propagatesSkylightDown ตาม implementation ของ HangingMossBlock
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean propagatesSkylightDown(BlockState blockState) {
return super.propagatesSkylightDown(blockState);
}
net.minecraft.world.level.block.HangingMossBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/HangingMossBlock.java:89 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canStayAtPosition(), destroyBlock().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.HangingMossBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/HangingMossBlock.java:71 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canStayAtPosition(), scheduleTick(), setValue(), getBlockState(), below(), is(). คืนค่า: blockState.setValue(TIP, !levelReader.getBlockState(blockPos.below()).is(this)).
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
HangingRootsBlock
- Full name:
net.minecraft.world.level.block.HangingRootsBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/HangingRootsBlock.java - Type:
class - Modifiers:
public - Extends:
Block - Implements:
SimpleWaterloggedBlock
net.minecraft.world.level.block.HangingRootsBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/HangingRootsBlock.java:59 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: above(), getBlockState(), isFaceSturdy(). คืนค่า: blockState2.isFaceSturdy(levelReader, blockPos2, Direction.DOWN).
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.HangingRootsBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/HangingRootsBlock.java:27 - Modifiers:
public - Return:
MapCodec<HangingRootsBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ HangingRootsBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.HangingRootsBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/HangingRootsBlock.java:37 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.HangingRootsBlock#getFluidState(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/HangingRootsBlock.java:42 - Modifiers:
protected - Return:
FluidState
คืออะไร
อ่านค่า Fluid State
ทำงานยังไง
เรียกต่อ: getValue(), getSource(). คืนค่า: blockState.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(blockState).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected FluidState getFluidState(BlockState blockState) {
return super.getFluidState(blockState);
}
net.minecraft.world.level.block.HangingRootsBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/HangingRootsBlock.java:66 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
คืนค่า: SHAPE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.HangingRootsBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/HangingRootsBlock.java:47 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getLevel(), getFluidState(), getClickedPos(), setValue(), getType(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
HangingRootsBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.HangingRootsBlock#HangingRootsBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/HangingRootsBlock.java:32 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ HangingRootsBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
HangingRootsBlock instance = new HangingRootsBlock(properties);
net.minecraft.world.level.block.HangingRootsBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/HangingRootsBlock.java:71 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canSurvive(), defaultBlockState(), getValue(), scheduleTick(), getTickDelay(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
HayBlock
- Full name:
net.minecraft.world.level.block.HayBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/HayBlock.java - Type:
class - Modifiers:
public - Extends:
RotatedPillarBlock
net.minecraft.world.level.block.HayBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/HayBlock.java:14 - Modifiers:
public - Return:
MapCodec<HayBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ HayBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.HayBlock#fallOn(Level,BlockState,BlockPos,Entity,float)
- Origin:
common - Source:
net/minecraft/world/level/block/HayBlock.java:24 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ fallOn ตาม implementation ของ HayBlock
ทำงานยังไง
เรียกต่อ: causeFallDamage(), damageSources(), fall().
Parameters
Level levelBlockState blockStateBlockPos blockPosEntity entityfloat f
ตัวอย่างใช้งาน
HayBlock instance = ...;
Level level = ...;
BlockState blockState = ...;
BlockPos blockPos = ...;
Entity entity = ...;
instance.fallOn(level, blockState, blockPos, entity, 0.0F);
net.minecraft.world.level.block.HayBlock#HayBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/HayBlock.java:19 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ HayBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
HeavyCoreBlock
- Full name:
net.minecraft.world.level.block.HeavyCoreBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/HeavyCoreBlock.java - Type:
class - Modifiers:
public - Extends:
Block - Implements:
SimpleWaterloggedBlock
net.minecraft.world.level.block.HeavyCoreBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/HeavyCoreBlock.java:32 - Modifiers:
public - Return:
MapCodec<HeavyCoreBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ HeavyCoreBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.HeavyCoreBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/HeavyCoreBlock.java:37 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.HeavyCoreBlock#getFluidState(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/HeavyCoreBlock.java:60 - Modifiers:
protected - Return:
FluidState
คืออะไร
อ่านค่า Fluid State
ทำงานยังไง
เรียกต่อ: getValue(), getSource(). คืนค่า: blockState.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(blockState).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected FluidState getFluidState(BlockState blockState) {
return super.getFluidState(blockState);
}
net.minecraft.world.level.block.HeavyCoreBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/HeavyCoreBlock.java:71 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
คืนค่า: SHAPE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.HeavyCoreBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/HeavyCoreBlock.java:65 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: getLevel(), getFluidState(), getClickedPos(), defaultBlockState(), setValue(), is(). คืนค่า: this.defaultBlockState().setValue(WATERLOGGED, fluidState.is(Fluids.WATER)).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
HeavyCoreBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.HeavyCoreBlock#HeavyCoreBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/HeavyCoreBlock.java:27 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ HeavyCoreBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
HeavyCoreBlock instance = new HeavyCoreBlock(properties);
net.minecraft.world.level.block.HeavyCoreBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/HeavyCoreBlock.java:76 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.HeavyCoreBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/HeavyCoreBlock.java:42 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), scheduleTick(), getTickDelay(). คืนค่า: super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource).
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
HoneyBlock
- Full name:
net.minecraft.world.level.block.HoneyBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/HoneyBlock.java - Type:
class - Modifiers:
public - Extends:
HalfTransparentBlock
net.minecraft.world.level.block.HoneyBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/HoneyBlock.java:31 - Modifiers:
public - Return:
MapCodec<HoneyBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ HoneyBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.HoneyBlock#entityInside(BlockState,Level,BlockPos,Entity)
- Origin:
common - Source:
net/minecraft/world/level/block/HoneyBlock.java:61 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ entityInside ตาม implementation ของ HoneyBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isSlidingDown(), maybeDoSlideAchievement(), doSlideMovement(), maybeDoSlideEffects().
Parameters
BlockState blockStateLevel levelBlockPos blockPosEntity entity
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Entity entity = ...;
@Override
protected void entityInside(BlockState blockState, Level level, BlockPos blockPos, Entity entity) {
super.entityInside(blockState, level, blockPos, entity);
}
net.minecraft.world.level.block.HoneyBlock#fallOn(Level,BlockState,BlockPos,Entity,float)
- Origin:
common - Source:
net/minecraft/world/level/block/HoneyBlock.java:49 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ fallOn ตาม implementation ของ HoneyBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: playSound(), broadcastEntityEvent(), causeFallDamage(), damageSources(), fall(), getFallSound(), getVolume(), getPitch().
Parameters
Level levelBlockState blockStateBlockPos blockPosEntity entityfloat f
ตัวอย่างใช้งาน
HoneyBlock instance = ...;
Level level = ...;
BlockState blockState = ...;
BlockPos blockPos = ...;
Entity entity = ...;
instance.fallOn(level, blockState, blockPos, entity, 0.0F);
net.minecraft.world.level.block.HoneyBlock#getCollisionShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/HoneyBlock.java:44 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Collision Shape
ทำงานยังไง
คืนค่า: SHAPE.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getCollisionShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getCollisionShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.HoneyBlock#HoneyBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/HoneyBlock.java:36 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ HoneyBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.HoneyBlock#showJumpParticles(Entity)
- Origin:
common - Source:
net/minecraft/world/level/block/HoneyBlock.java:133 - Modifiers:
public static - Return:
void
คืออะไร
ดำเนินการ showJumpParticles ตาม implementation ของ HoneyBlock
ทำงานยังไง
เรียกต่อ: showParticles().
Parameters
Entity entity
ตัวอย่างใช้งาน
net.minecraft.world.level.block.HoneyBlock#showSlideParticles(Entity)
- Origin:
common - Source:
net/minecraft/world/level/block/HoneyBlock.java:129 - Modifiers:
public static - Return:
void
คืออะไร
ดำเนินการ showSlideParticles ตาม implementation ของ HoneyBlock
ทำงานยังไง
เรียกต่อ: showParticles().
Parameters
Entity entity
ตัวอย่างใช้งาน
HopperBlock
- Full name:
net.minecraft.world.level.block.HopperBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/HopperBlock.java - Type:
class - Modifiers:
public - Extends:
BaseEntityBlock
net.minecraft.world.level.block.HopperBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/HopperBlock.java:54 - Modifiers:
public - Return:
MapCodec<HopperBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ HopperBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.HopperBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/HopperBlock.java:172 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.HopperBlock#entityInside(BlockState,Level,BlockPos,Entity)
- Origin:
common - Source:
net/minecraft/world/level/block/HopperBlock.java:177 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ entityInside ตาม implementation ของ HopperBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity().
Parameters
BlockState blockStateLevel levelBlockPos blockPosEntity entity
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Entity entity = ...;
@Override
protected void entityInside(BlockState blockState, Level level, BlockPos blockPos, Entity entity) {
super.entityInside(blockState, level, blockPos, entity);
}
net.minecraft.world.level.block.HopperBlock#getAnalogOutputSignal(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/HopperBlock.java:157 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Analog Output Signal
ทำงานยังไง
เรียกต่อ: getRedstoneSignalFromBlockEntity(), getBlockEntity(). คืนค่า: AbstractContainerMenu.getRedstoneSignalFromBlockEntity(level.getBlockEntity(blockPos)).
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected int getAnalogOutputSignal(BlockState blockState, Level level, BlockPos blockPos) {
return super.getAnalogOutputSignal(blockState, level, blockPos);
}
net.minecraft.world.level.block.HopperBlock#getInteractionShape(BlockState,BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/HopperBlock.java:82 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Interaction Shape
ทำงานยังไง
แยกกรณีด้วย switch. เรียกต่อ: getValue(). มีจุด return อย่างน้อย 6 จุด.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
@Override
protected VoxelShape getInteractionShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos) {
return super.getInteractionShape(blockState, blockGetter, blockPos);
}
net.minecraft.world.level.block.HopperBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/HopperBlock.java:64 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
แยกกรณีด้วย switch. เรียกต่อ: getValue(). มีจุด return อย่างน้อย 6 จุด.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.HopperBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/HopperBlock.java:100 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: getClickedFace(), getOpposite(), defaultBlockState(), setValue(), getAxis(). คืนค่า: this.defaultBlockState().setValue(FACING, direction.getAxis() == Direction.Axis.Y ? Direction.DOWN : direction).setValue(ENABLED, true).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
HopperBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.HopperBlock#getTicker(Level,BlockState,BlockEntityType<T>)
- Origin:
common - Source:
net/minecraft/world/level/block/HopperBlock.java:111 - Modifiers:
public - Return:
BlockEntityTicker<T>
คืออะไร
อ่านค่า Ticker
ทำงานยังไง
เรียกต่อ: createTickerHelper(). คืนค่า: level.isClientSide ? null : createTickerHelper(blockEntityType, BlockEntityType.HOPPER, HopperBlockEntity::pushItemsTick).
Parameters
Level levelBlockState blockStateBlockEntityType<T> blockEntityType
ตัวอย่างใช้งาน
HopperBlock instance = ...;
Level level = ...;
BlockState blockState = ...;
BlockEntityType<T> blockEntityType = ...;
BlockEntityTicker<T> result = instance.getTicker(level, blockState, blockEntityType);
net.minecraft.world.level.block.HopperBlock#hasAnalogOutputSignal(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/HopperBlock.java:152 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Analog Output Signal
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean hasAnalogOutputSignal(BlockState blockState) {
return super.hasAnalogOutputSignal(blockState);
}
net.minecraft.world.level.block.HopperBlock#HopperBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/HopperBlock.java:59 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ HopperBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.HopperBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/HopperBlock.java:185 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.HopperBlock#mirror(BlockState,Mirror)
- Origin:
common - Source:
net/minecraft/world/level/block/HopperBlock.java:167 - Modifiers:
protected - Return:
BlockState
คืออะไร
ดำเนินการ mirror ตาม implementation ของ HopperBlock
ทำงานยังไง
เรียกต่อ: rotate(), getRotation(), getValue(). คืนค่า: blockState.rotate(mirror.getRotation(blockState.getValue(FACING))).
Parameters
BlockState blockStateMirror mirror
ตัวอย่างใช้งาน
BlockState blockState = ...;
Mirror mirror = ...;
@Override
protected BlockState mirror(BlockState blockState, Mirror mirror) {
return super.mirror(blockState, mirror);
}
net.minecraft.world.level.block.HopperBlock#neighborChanged(BlockState,Level,BlockPos,Block,Orientation,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/HopperBlock.java:134 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ neighborChanged ตาม implementation ของ HopperBlock
ทำงานยังไง
เรียกต่อ: checkPoweredState().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlock blockOrientation orientationboolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Block block = ...;
Orientation orientation = ...;
@Override
protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, Orientation orientation, boolean bl) {
super.neighborChanged(blockState, level, blockPos, block, orientation, bl);
}
net.minecraft.world.level.block.HopperBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/HopperBlock.java:106 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ HopperBlock
ทำงานยังไง
สร้างออบเจ็กต์: HopperBlockEntity. คืนค่า: new HopperBlockEntity(blockPos, blockState).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
HopperBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
net.minecraft.world.level.block.HopperBlock#onPlace(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/HopperBlock.java:117 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Place
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), getBlock(), checkPoweredState().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onPlace(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onPlace(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.HopperBlock#onRemove(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/HopperBlock.java:146 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Remove
ทำงานยังไง
เรียกต่อ: dropContentsOnDestroy().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onRemove(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onRemove(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.HopperBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/HopperBlock.java:162 - Modifiers:
protected - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
เรียกต่อ: setValue(), getValue(). คืนค่า: blockState.setValue(FACING, rotation.rotate(blockState.getValue(FACING))).
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
BlockState blockState = ...;
Rotation rotation = ...;
@Override
protected BlockState rotate(BlockState blockState, Rotation rotation) {
return super.rotate(blockState, rotation);
}
net.minecraft.world.level.block.HopperBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/HopperBlock.java:124 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity(), openMenu(), awardStat(). คืนค่า: InteractionResult.SUCCESS.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
HorizontalDirectionalBlock
- Full name:
net.minecraft.world.level.block.HorizontalDirectionalBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/HorizontalDirectionalBlock.java - Type:
class - Modifiers:
public abstract - Extends:
Block
net.minecraft.world.level.block.HorizontalDirectionalBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/HorizontalDirectionalBlock.java:17 - Modifiers:
protected abstract - Return:
MapCodec<? extends HorizontalDirectionalBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ HorizontalDirectionalBlock
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
- ไม่มี
ตัวอย่างใช้งาน
@Override
protected MapCodec<? extends HorizontalDirectionalBlock> codec() {
return super.codec();
}
net.minecraft.world.level.block.HorizontalDirectionalBlock#HorizontalDirectionalBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/HorizontalDirectionalBlock.java:13 - Modifiers:
protected - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ HorizontalDirectionalBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
HorizontalDirectionalBlock instance = new HorizontalDirectionalBlock(properties);
net.minecraft.world.level.block.HorizontalDirectionalBlock#mirror(BlockState,Mirror)
- Origin:
common - Source:
net/minecraft/world/level/block/HorizontalDirectionalBlock.java:25 - Modifiers:
protected - Return:
BlockState
คืออะไร
ดำเนินการ mirror ตาม implementation ของ HorizontalDirectionalBlock
ทำงานยังไง
เรียกต่อ: rotate(), getRotation(), getValue(). คืนค่า: blockState.rotate(mirror.getRotation(blockState.getValue(FACING))).
Parameters
BlockState blockStateMirror mirror
ตัวอย่างใช้งาน
BlockState blockState = ...;
Mirror mirror = ...;
@Override
protected BlockState mirror(BlockState blockState, Mirror mirror) {
return super.mirror(blockState, mirror);
}
net.minecraft.world.level.block.HorizontalDirectionalBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/HorizontalDirectionalBlock.java:20 - Modifiers:
protected - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
เรียกต่อ: setValue(), getValue(). คืนค่า: blockState.setValue(FACING, rotation.rotate(blockState.getValue(FACING))).
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
BlockState blockState = ...;
Rotation rotation = ...;
@Override
protected BlockState rotate(BlockState blockState, Rotation rotation) {
return super.rotate(blockState, rotation);
}
HugeMushroomBlock
- Full name:
net.minecraft.world.level.block.HugeMushroomBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/HugeMushroomBlock.java - Type:
class - Modifiers:
public - Extends:
Block
net.minecraft.world.level.block.HugeMushroomBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/HugeMushroomBlock.java:27 - Modifiers:
public - Return:
MapCodec<HugeMushroomBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ HugeMushroomBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.HugeMushroomBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/HugeMushroomBlock.java:88 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.HugeMushroomBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/HugeMushroomBlock.java:39 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: getLevel(), getClickedPos(), defaultBlockState(), setValue(), getBlockState(), below(), is(), above().
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
HugeMushroomBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.HugeMushroomBlock#HugeMushroomBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/HugeMushroomBlock.java:32 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ HugeMushroomBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
HugeMushroomBlock instance = new HugeMushroomBlock(properties);
net.minecraft.world.level.block.HugeMushroomBlock#mirror(BlockState,Mirror)
- Origin:
common - Source:
net/minecraft/world/level/block/HugeMushroomBlock.java:78 - Modifiers:
protected - Return:
BlockState
คืออะไร
ดำเนินการ mirror ตาม implementation ของ HugeMushroomBlock
ทำงานยังไง
เรียกต่อ: setValue(), get(), getValue().
Parameters
BlockState blockStateMirror mirror
ตัวอย่างใช้งาน
BlockState blockState = ...;
Mirror mirror = ...;
@Override
protected BlockState mirror(BlockState blockState, Mirror mirror) {
return super.mirror(blockState, mirror);
}
net.minecraft.world.level.block.HugeMushroomBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/HugeMushroomBlock.java:68 - Modifiers:
protected - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
เรียกต่อ: setValue(), get(), getValue().
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
BlockState blockState = ...;
Rotation rotation = ...;
@Override
protected BlockState rotate(BlockState blockState, Rotation rotation) {
return super.rotate(blockState, rotation);
}
net.minecraft.world.level.block.HugeMushroomBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/HugeMushroomBlock.java:52 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
เรียกต่อ: is(), setValue(), get().
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
IceBlock
- Full name:
net.minecraft.world.level.block.IceBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/IceBlock.java - Type:
class - Modifiers:
public - Extends:
HalfTransparentBlock
net.minecraft.world.level.block.IceBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/IceBlock.java:21 - Modifiers:
public - Return:
MapCodec<? extends IceBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ IceBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.IceBlock#IceBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/IceBlock.java:26 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ IceBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.IceBlock#melt(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/IceBlock.java:57 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ melt ตาม implementation ของ IceBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: dimensionType(), ultraWarm(), removeBlock(), setBlockAndUpdate(), meltsInto(), neighborChanged(), getBlock().
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected void melt(BlockState blockState, Level level, BlockPos blockPos) {
super.melt(blockState, level, blockPos);
}
net.minecraft.world.level.block.IceBlock#meltsInto()
- Origin:
common - Source:
net/minecraft/world/level/block/IceBlock.java:30 - Modifiers:
public static - Return:
BlockState
คืออะไร
ดำเนินการ meltsInto ตาม implementation ของ IceBlock
ทำงานยังไง
เรียกต่อ: defaultBlockState(). คืนค่า: Blocks.WATER.defaultBlockState().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.IceBlock#playerDestroy(Level,Player,BlockPos,BlockState,BlockEntity,ItemStack)
- Origin:
common - Source:
net/minecraft/world/level/block/IceBlock.java:34 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ playerDestroy ตาม implementation ของ IceBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: hasTag(), dimensionType(), ultraWarm(), removeBlock(), getBlockState(), below(), blocksMotion(), liquid().
Parameters
Level levelPlayer playerBlockPos blockPosBlockState blockStateBlockEntity blockEntityItemStack itemStack
ตัวอย่างใช้งาน
IceBlock instance = ...;
Level level = ...;
Player player = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity blockEntity = ...;
ItemStack itemStack = ...;
instance.playerDestroy(level, player, blockPos, blockState, blockEntity, itemStack);
net.minecraft.world.level.block.IceBlock#randomTick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/IceBlock.java:50 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ randomTick ตาม implementation ของ IceBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBrightness(), getLightBlock(), melt().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void randomTick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.randomTick(blockState, serverLevel, blockPos, randomSource);
}
InfestedBlock
- Full name:
net.minecraft.world.level.block.InfestedBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/InfestedBlock.java - Type:
class - Modifiers:
public - Extends:
Block
net.minecraft.world.level.block.InfestedBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/InfestedBlock.java:32 - Modifiers:
public - Return:
MapCodec<? extends InfestedBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ InfestedBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.InfestedBlock#getHostBlock()
- Origin:
common - Source:
net/minecraft/world/level/block/InfestedBlock.java:43 - Modifiers:
public - Return:
Block
คืออะไร
อ่านค่า Host Block
ทำงานยังไง
คืนค่า: this.hostBlock.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.InfestedBlock#hostStateByInfested(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/InfestedBlock.java:72 - Modifiers:
public - Return:
BlockState
คืออะไร
ดำเนินการ hostStateByInfested ตาม implementation ของ InfestedBlock
ทำงานยังไง
เรียกต่อ: getNewStateWithProperties(), getHostBlock(), defaultBlockState(). คืนค่า: getNewStateWithProperties(INFESTED_TO_HOST_STATES, blockState, () -> this.getHostBlock().defaultBlockState()).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
InfestedBlock instance = ...;
BlockState blockState = ...;
BlockState result = instance.hostStateByInfested(blockState);
net.minecraft.world.level.block.InfestedBlock#InfestedBlock(Block,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/InfestedBlock.java:37 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ InfestedBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: hostBlock. เรียกต่อ: destroyTime(), defaultDestroyTime(), explosionResistance(), put().
Parameters
Block blockBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
Block block = ...;
BlockBehaviour.Properties properties = ...;
InfestedBlock instance = new InfestedBlock(block, properties);
net.minecraft.world.level.block.InfestedBlock#infestedStateByHost(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/InfestedBlock.java:68 - Modifiers:
public static - Return:
BlockState
คืออะไร
ดำเนินการ infestedStateByHost ตาม implementation ของ InfestedBlock
ทำงานยังไง
เรียกต่อ: getNewStateWithProperties(), get(), getBlock(), defaultBlockState(). คืนค่า: getNewStateWithProperties(HOST_TO_INFESTED_STATES, blockState, () -> BLOCK_BY_HOST_BLOCK.get(blockState.getBlock()).defaultBlockState()).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
net.minecraft.world.level.block.InfestedBlock#isCompatibleHostBlock(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/InfestedBlock.java:47 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Compatible Host Block
ทำงานยังไง
เรียกต่อ: containsKey(), getBlock(). คืนค่า: BLOCK_BY_HOST_BLOCK.containsKey(blockState.getBlock()).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
net.minecraft.world.level.block.InfestedBlock#spawnAfterBreak(BlockState,ServerLevel,BlockPos,ItemStack,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/InfestedBlock.java:60 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง entity ในโลก After Break
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getGameRules(), getBoolean(), hasTag(), spawnInfestation().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosItemStack itemStackboolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
ItemStack itemStack = ...;
@Override
protected void spawnAfterBreak(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, ItemStack itemStack, boolean bl) {
super.spawnAfterBreak(blockState, serverLevel, blockPos, itemStack, bl);
}
InfestedRotatedPillarBlock
- Full name:
net.minecraft.world.level.block.InfestedRotatedPillarBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/InfestedRotatedPillarBlock.java - Type:
class - Modifiers:
public - Extends:
InfestedBlock
net.minecraft.world.level.block.InfestedRotatedPillarBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/InfestedRotatedPillarBlock.java:18 - Modifiers:
public - Return:
MapCodec<InfestedRotatedPillarBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ InfestedRotatedPillarBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
InfestedRotatedPillarBlock instance = ...;
MapCodec<InfestedRotatedPillarBlock> result = instance.codec();
net.minecraft.world.level.block.InfestedRotatedPillarBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/InfestedRotatedPillarBlock.java:33 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.InfestedRotatedPillarBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/InfestedRotatedPillarBlock.java:38 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: defaultBlockState(), setValue(), getClickedFace(), getAxis(). คืนค่า: this.defaultBlockState().setValue(RotatedPillarBlock.AXIS, blockPlaceContext.getClickedFace().getAxis()).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
InfestedRotatedPillarBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.InfestedRotatedPillarBlock#InfestedRotatedPillarBlock(Block,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/InfestedRotatedPillarBlock.java:23 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ InfestedRotatedPillarBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), defaultBlockState(), setValue().
Parameters
Block blockBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
Block block = ...;
BlockBehaviour.Properties properties = ...;
InfestedRotatedPillarBlock instance = new InfestedRotatedPillarBlock(block, properties);
net.minecraft.world.level.block.InfestedRotatedPillarBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/InfestedRotatedPillarBlock.java:28 - Modifiers:
protected - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
เรียกต่อ: rotatePillar(). คืนค่า: RotatedPillarBlock.rotatePillar(blockState, rotation).
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
BlockState blockState = ...;
Rotation rotation = ...;
@Override
protected BlockState rotate(BlockState blockState, Rotation rotation) {
return super.rotate(blockState, rotation);
}
IronBarsBlock
- Full name:
net.minecraft.world.level.block.IronBarsBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/IronBarsBlock.java - Type:
class - Modifiers:
public - Extends:
CrossCollisionBlock
net.minecraft.world.level.block.IronBarsBlock#attachsTo(BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/IronBarsBlock.java:99 - Modifiers:
public final - Return:
boolean
คืออะไร
ดำเนินการ attachsTo ตาม implementation ของ IronBarsBlock
ทำงานยังไง
เรียกต่อ: isExceptionForConnection(), getBlock(), is(). คืนค่า: !isExceptionForConnection(blockState) && bl || blockState.getBlock() instanceof IronBarsBlock || blockState.is(BlockTags.WALLS).
Parameters
BlockState blockStateboolean bl
ตัวอย่างใช้งาน
IronBarsBlock instance = ...;
BlockState blockState = ...;
boolean result = instance.attachsTo(blockState, true);
net.minecraft.world.level.block.IronBarsBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/IronBarsBlock.java:24 - Modifiers:
public - Return:
MapCodec<? extends IronBarsBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ IronBarsBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.IronBarsBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/IronBarsBlock.java:103 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.IronBarsBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/IronBarsBlock.java:36 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: getLevel(), getClickedPos(), getFluidState(), north(), south(), west(), east(), getBlockState().
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
IronBarsBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.IronBarsBlock#getVisualShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/IronBarsBlock.java:79 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Visual Shape
ทำงานยังไง
เรียกต่อ: empty(). คืนค่า: Shapes.empty().
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getVisualShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getVisualShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.IronBarsBlock#IronBarsBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/IronBarsBlock.java:29 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ IronBarsBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.IronBarsBlock#skipRendering(BlockState,BlockState,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/IronBarsBlock.java:84 - Modifiers:
protected - Return:
boolean
คืออะไร
ดำเนินการ skipRendering ตาม implementation ของ IronBarsBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), getAxis(), isHorizontal(), getValue(), get(), getOpposite(). มีจุด return อย่างน้อย 3 จุด.
Parameters
BlockState blockStateBlockState blockState2Direction direction
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockState blockState2 = ...;
Direction direction = ...;
@Override
protected boolean skipRendering(BlockState blockState, BlockState blockState2, Direction direction) {
return super.skipRendering(blockState, blockState2, direction);
}
net.minecraft.world.level.block.IronBarsBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/IronBarsBlock.java:57 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), scheduleTick(), getTickDelay(), getAxis(), isHorizontal(), setValue(), get(), attachsTo().
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
JigsawBlock
- Full name:
net.minecraft.world.level.block.JigsawBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/JigsawBlock.java - Type:
class - Modifiers:
public - Extends:
Block - Implements:
EntityBlock,GameMasterBlock
net.minecraft.world.level.block.JigsawBlock#canAttach(StructureTemplate.JigsawBlockInfo,StructureTemplate.JigsawBlockInfo)
- Origin:
common - Source:
net/minecraft/world/level/block/JigsawBlock.java:79 - Modifiers:
public static - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Attach
ทำงานยังไง
เรียกต่อ: getFrontFacing(), info(), state(), getTopFacing(), jointType(), getOpposite(), target(), equals(). คืนค่า: direction == direction2.getOpposite() && (bl || direction3 == direction4) && jigsawBlockInfo.target().equals(jigsawBlockInfo2.name()).
Parameters
StructureTemplate.JigsawBlockInfo jigsawBlockInfoStructureTemplate.JigsawBlockInfo jigsawBlockInfo2
ตัวอย่างใช้งาน
StructureTemplate.JigsawBlockInfo jigsawBlockInfo = ...;
StructureTemplate.JigsawBlockInfo jigsawBlockInfo2 = ...;
boolean result = JigsawBlock.canAttach(jigsawBlockInfo, jigsawBlockInfo2);
net.minecraft.world.level.block.JigsawBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/JigsawBlock.java:25 - Modifiers:
public - Return:
MapCodec<JigsawBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ JigsawBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.JigsawBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/JigsawBlock.java:35 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.JigsawBlock#getFrontFacing(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/JigsawBlock.java:89 - Modifiers:
public static - Return:
Direction
คืออะไร
อ่านค่า Front Facing
ทำงานยังไง
เรียกต่อ: getValue(), front(). คืนค่า: blockState.getValue(ORIENTATION).front().
Parameters
BlockState blockState
ตัวอย่างใช้งาน
net.minecraft.world.level.block.JigsawBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/JigsawBlock.java:50 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getClickedFace(), getAxis(), getHorizontalDirection(), getOpposite(), defaultBlockState(), setValue(), fromFrontAndTop(). คืนค่า: this.defaultBlockState().setValue(ORIENTATION, FrontAndTop.fromFrontAndTop(direction, direction2)).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
JigsawBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.JigsawBlock#getTopFacing(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/JigsawBlock.java:93 - Modifiers:
public static - Return:
Direction
คืออะไร
อ่านค่า Top Facing
ทำงานยังไง
เรียกต่อ: getValue(), top(). คืนค่า: blockState.getValue(ORIENTATION).top().
Parameters
BlockState blockState
ตัวอย่างใช้งาน
net.minecraft.world.level.block.JigsawBlock#JigsawBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/JigsawBlock.java:30 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ JigsawBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.JigsawBlock#mirror(BlockState,Mirror)
- Origin:
common - Source:
net/minecraft/world/level/block/JigsawBlock.java:45 - Modifiers:
protected - Return:
BlockState
คืออะไร
ดำเนินการ mirror ตาม implementation ของ JigsawBlock
ทำงานยังไง
เรียกต่อ: setValue(), rotation(), rotate(), getValue(). คืนค่า: blockState.setValue(ORIENTATION, mirror.rotation().rotate(blockState.getValue(ORIENTATION))).
Parameters
BlockState blockStateMirror mirror
ตัวอย่างใช้งาน
BlockState blockState = ...;
Mirror mirror = ...;
@Override
protected BlockState mirror(BlockState blockState, Mirror mirror) {
return super.mirror(blockState, mirror);
}
net.minecraft.world.level.block.JigsawBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/JigsawBlock.java:63 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ JigsawBlock
ทำงานยังไง
สร้างออบเจ็กต์: JigsawBlockEntity. คืนค่า: new JigsawBlockEntity(blockPos, blockState).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
JigsawBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
net.minecraft.world.level.block.JigsawBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/JigsawBlock.java:40 - Modifiers:
protected - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
เรียกต่อ: setValue(), rotation(), getValue(). คืนค่า: blockState.setValue(ORIENTATION, rotation.rotation().rotate(blockState.getValue(ORIENTATION))).
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
BlockState blockState = ...;
Rotation rotation = ...;
@Override
protected BlockState rotate(BlockState blockState, Rotation rotation) {
return super.rotate(blockState, rotation);
}
net.minecraft.world.level.block.JigsawBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/JigsawBlock.java:68 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getBlockEntity(), canUseGameMasterBlocks(), openJigsawBlock(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
JukeboxBlock
- Full name:
net.minecraft.world.level.block.JukeboxBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/JukeboxBlock.java - Type:
class - Modifiers:
public - Extends:
BaseEntityBlock
net.minecraft.world.level.block.JukeboxBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/JukeboxBlock.java:32 - Modifiers:
public - Return:
MapCodec<JukeboxBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ JukeboxBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.JukeboxBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/JukeboxBlock.java:110 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.JukeboxBlock#getAnalogOutputSignal(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/JukeboxBlock.java:105 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Analog Output Signal
ทำงานยังไง
เรียกต่อ: getBlockEntity(), getComparatorOutput(). คืนค่า: level.getBlockEntity(blockPos) instanceof JukeboxBlockEntity jukeboxBlockEntity ? jukeboxBlockEntity.getComparatorOutput() : 0.
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected int getAnalogOutputSignal(BlockState blockState, Level level, BlockPos blockPos) {
return super.getAnalogOutputSignal(blockState, level, blockPos);
}
net.minecraft.world.level.block.JukeboxBlock#getSignal(BlockState,BlockGetter,BlockPos,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/JukeboxBlock.java:95 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Signal
ทำงานยังไง
เรียกต่อ: getBlockEntity(), getSongPlayer(), isPlaying(). คืนค่า: blockGetter.getBlockEntity(blockPos) instanceof JukeboxBlockEntity jukeboxBlockEntity && jukeboxBlockEntity.getSongPlayer().isPlaying() ? 15 : 0.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosDirection direction
ตัวอย่างใช้งาน
JukeboxBlock instance = ...;
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
Direction direction = ...;
int result = instance.getSignal(blockState, blockGetter, blockPos, direction);
net.minecraft.world.level.block.JukeboxBlock#getTicker(Level,BlockState,BlockEntityType<T>)
- Origin:
common - Source:
net/minecraft/world/level/block/JukeboxBlock.java:115 - Modifiers:
public - Return:
BlockEntityTicker<T>
คืออะไร
อ่านค่า Ticker
ทำงานยังไง
เรียกต่อ: getValue(), createTickerHelper(). คืนค่า: blockState.getValue(HAS_RECORD) ? createTickerHelper(blockEntityType, BlockEntityType.JUKEBOX, JukeboxBlockEntity::tick) : null.
Parameters
Level levelBlockState blockStateBlockEntityType<T> blockEntityType
ตัวอย่างใช้งาน
JukeboxBlock instance = ...;
Level level = ...;
BlockState blockState = ...;
BlockEntityType<T> blockEntityType = ...;
BlockEntityTicker<T> result = instance.getTicker(level, blockState, blockEntityType);
net.minecraft.world.level.block.JukeboxBlock#hasAnalogOutputSignal(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/JukeboxBlock.java:100 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Analog Output Signal
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean hasAnalogOutputSignal(BlockState blockState) {
return super.hasAnalogOutputSignal(blockState);
}
net.minecraft.world.level.block.JukeboxBlock#isSignalSource(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/JukeboxBlock.java:90 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Signal Source
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
JukeboxBlock instance = ...;
BlockState blockState = ...;
boolean result = instance.isSignalSource(blockState);
net.minecraft.world.level.block.JukeboxBlock#JukeboxBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/JukeboxBlock.java:37 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ JukeboxBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.JukeboxBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/JukeboxBlock.java:85 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ JukeboxBlock
ทำงานยังไง
สร้างออบเจ็กต์: JukeboxBlockEntity. คืนค่า: new JukeboxBlockEntity(blockPos, blockState).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
JukeboxBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
net.minecraft.world.level.block.JukeboxBlock#onRemove(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/JukeboxBlock.java:74 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Remove
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), getBlock(), getBlockEntity(), popOutTheItem().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onRemove(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onRemove(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.JukeboxBlock#setPlacedBy(Level,BlockPos,BlockState,LivingEntity,ItemStack)
- Origin:
common - Source:
net/minecraft/world/level/block/JukeboxBlock.java:42 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Placed By
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getOrDefault(), contains(), setBlock(), setValue().
Parameters
Level levelBlockPos blockPosBlockState blockStateLivingEntity livingEntityItemStack itemStack
ตัวอย่างใช้งาน
JukeboxBlock instance = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
LivingEntity livingEntity = ...;
ItemStack itemStack = ...;
instance.setPlacedBy(level, blockPos, blockState, livingEntity, itemStack);
net.minecraft.world.level.block.JukeboxBlock#useItemOn(ItemStack,BlockState,Level,BlockPos,Player,InteractionHand,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/JukeboxBlock.java:61 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Item On
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), getItemInHand(), tryInsertIntoJukebox(), consumesAction(). มีจุด return อย่างน้อย 2 จุด.
Parameters
ItemStack itemStackBlockState blockStateLevel levelBlockPos blockPosPlayer playerInteractionHand interactionHandBlockHitResult blockHitResult
ตัวอย่างใช้งาน
ItemStack itemStack = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
InteractionHand interactionHand = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useItemOn(ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult) {
return super.useItemOn(itemStack, blockState, level, blockPos, player, interactionHand, blockHitResult);
}
net.minecraft.world.level.block.JukeboxBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/JukeboxBlock.java:51 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), getBlockEntity(), popOutTheItem(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
KelpBlock
- Full name:
net.minecraft.world.level.block.KelpBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/KelpBlock.java - Type:
class - Modifiers:
public - Extends:
GrowingPlantHeadBlock - Implements:
LiquidBlockContainer
net.minecraft.world.level.block.KelpBlock#canAttachTo(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/KelpBlock.java:44 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Attach To
ทำงานยังไง
เรียกต่อ: is(). คืนค่า: !blockState.is(Blocks.MAGMA_BLOCK).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean canAttachTo(BlockState blockState) {
return super.canAttachTo(blockState);
}
net.minecraft.world.level.block.KelpBlock#canGrowInto(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/KelpBlock.java:34 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Grow Into
ทำงานยังไง
เรียกต่อ: is(). คืนค่า: blockState.is(Blocks.WATER).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean canGrowInto(BlockState blockState) {
return super.canGrowInto(blockState);
}
net.minecraft.world.level.block.KelpBlock#canPlaceLiquid(Player,BlockGetter,BlockPos,BlockState,Fluid)
- Origin:
common - Source:
net/minecraft/world/level/block/KelpBlock.java:49 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Place Liquid
ทำงานยังไง
คืนค่า: false.
Parameters
Player playerBlockGetter blockGetterBlockPos blockPosBlockState blockStateFluid fluid
ตัวอย่างใช้งาน
KelpBlock instance = ...;
Player player = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
Fluid fluid = ...;
boolean result = instance.canPlaceLiquid(player, blockGetter, blockPos, blockState, fluid);
net.minecraft.world.level.block.KelpBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/KelpBlock.java:25 - Modifiers:
public - Return:
MapCodec<KelpBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ KelpBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.KelpBlock#getBlocksToGrowWhenBonemealed(RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/KelpBlock.java:59 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Blocks To Grow When Bonemealed
ทำงานยังไง
คืนค่า: 1.
Parameters
RandomSource randomSource
ตัวอย่างใช้งาน
RandomSource randomSource = ...;
@Override
protected int getBlocksToGrowWhenBonemealed(RandomSource randomSource) {
return super.getBlocksToGrowWhenBonemealed(randomSource);
}
net.minecraft.world.level.block.KelpBlock#getBodyBlock()
- Origin:
common - Source:
net/minecraft/world/level/block/KelpBlock.java:39 - Modifiers:
protected - Return:
Block
คืออะไร
อ่านค่า Body Block
ทำงานยังไง
คืนค่า: Blocks.KELP_PLANT.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.KelpBlock#getFluidState(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/KelpBlock.java:71 - Modifiers:
protected - Return:
FluidState
คืออะไร
อ่านค่า Fluid State
ทำงานยังไง
เรียกต่อ: getSource(). คืนค่า: Fluids.WATER.getSource(false).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected FluidState getFluidState(BlockState blockState) {
return super.getFluidState(blockState);
}
net.minecraft.world.level.block.KelpBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/KelpBlock.java:64 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: getLevel(), getFluidState(), getClickedPos(), is(), getAmount(). คืนค่า: fluidState.is(FluidTags.WATER) && fluidState.getAmount() == 8 ? super.getStateForPlacement(blockPlaceContext) : null.
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
KelpBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.KelpBlock#KelpBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/KelpBlock.java:30 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ KelpBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.KelpBlock#placeLiquid(LevelAccessor,BlockPos,BlockState,FluidState)
- Origin:
common - Source:
net/minecraft/world/level/block/KelpBlock.java:54 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ placeLiquid ตาม implementation ของ KelpBlock
ทำงานยังไง
คืนค่า: false.
Parameters
LevelAccessor levelAccessorBlockPos blockPosBlockState blockStateFluidState fluidState
ตัวอย่างใช้งาน
KelpBlock instance = ...;
LevelAccessor levelAccessor = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
FluidState fluidState = ...;
boolean result = instance.placeLiquid(levelAccessor, blockPos, blockState, fluidState);
KelpPlantBlock
- Full name:
net.minecraft.world.level.block.KelpPlantBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/KelpPlantBlock.java - Type:
class - Modifiers:
public - Extends:
GrowingPlantBodyBlock - Implements:
LiquidBlockContainer
net.minecraft.world.level.block.KelpPlantBlock#canAttachTo(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/KelpPlantBlock.java:39 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Attach To
ทำงานยังไง
เรียกต่อ: getHeadBlock(). คืนค่า: this.getHeadBlock().canAttachTo(blockState).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean canAttachTo(BlockState blockState) {
return super.canAttachTo(blockState);
}
net.minecraft.world.level.block.KelpPlantBlock#canPlaceLiquid(Player,BlockGetter,BlockPos,BlockState,Fluid)
- Origin:
common - Source:
net/minecraft/world/level/block/KelpPlantBlock.java:44 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Place Liquid
ทำงานยังไง
คืนค่า: false.
Parameters
Player playerBlockGetter blockGetterBlockPos blockPosBlockState blockStateFluid fluid
ตัวอย่างใช้งาน
KelpPlantBlock instance = ...;
Player player = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
Fluid fluid = ...;
boolean result = instance.canPlaceLiquid(player, blockGetter, blockPos, blockState, fluid);
net.minecraft.world.level.block.KelpPlantBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/KelpPlantBlock.java:20 - Modifiers:
public - Return:
MapCodec<KelpPlantBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ KelpPlantBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.KelpPlantBlock#getFluidState(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/KelpPlantBlock.java:34 - Modifiers:
protected - Return:
FluidState
คืออะไร
อ่านค่า Fluid State
ทำงานยังไง
เรียกต่อ: getSource(). คืนค่า: Fluids.WATER.getSource(false).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected FluidState getFluidState(BlockState blockState) {
return super.getFluidState(blockState);
}
net.minecraft.world.level.block.KelpPlantBlock#getHeadBlock()
- Origin:
common - Source:
net/minecraft/world/level/block/KelpPlantBlock.java:29 - Modifiers:
protected - Return:
GrowingPlantHeadBlock
คืออะไร
อ่านค่า Head Block
ทำงานยังไง
คืนค่า: (GrowingPlantHeadBlock)Blocks.KELP.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.KelpPlantBlock#KelpPlantBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/KelpPlantBlock.java:25 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ KelpPlantBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: block().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
KelpPlantBlock instance = new KelpPlantBlock(properties);
net.minecraft.world.level.block.KelpPlantBlock#placeLiquid(LevelAccessor,BlockPos,BlockState,FluidState)
- Origin:
common - Source:
net/minecraft/world/level/block/KelpPlantBlock.java:49 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ placeLiquid ตาม implementation ของ KelpPlantBlock
ทำงานยังไง
คืนค่า: false.
Parameters
LevelAccessor levelAccessorBlockPos blockPosBlockState blockStateFluidState fluidState
ตัวอย่างใช้งาน
KelpPlantBlock instance = ...;
LevelAccessor levelAccessor = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
FluidState fluidState = ...;
boolean result = instance.placeLiquid(levelAccessor, blockPos, blockState, fluidState);
LadderBlock
- Full name:
net.minecraft.world.level.block.LadderBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/LadderBlock.java - Type:
class - Modifiers:
public - Extends:
Block - Implements:
SimpleWaterloggedBlock
net.minecraft.world.level.block.LadderBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/LadderBlock.java:63 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: getValue(), canAttachTo(), relative(), getOpposite(). คืนค่า: this.canAttachTo(levelReader, blockPos.relative(direction.getOpposite()), direction).
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.LadderBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/LadderBlock.java:33 - Modifiers:
public - Return:
MapCodec<LadderBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ LadderBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.LadderBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/LadderBlock.java:129 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.LadderBlock#getFluidState(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/LadderBlock.java:134 - Modifiers:
protected - Return:
FluidState
คืออะไร
อ่านค่า Fluid State
ทำงานยังไง
เรียกต่อ: getValue(), getSource(). คืนค่า: blockState.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(blockState).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected FluidState getFluidState(BlockState blockState) {
return super.getFluidState(blockState);
}
net.minecraft.world.level.block.LadderBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/LadderBlock.java:43 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
แยกกรณีด้วย switch. เรียกต่อ: getValue(). มีจุด return อย่างน้อย 4 จุด.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.LadderBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/LadderBlock.java:91 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: replacingClickedOnBlock(), getLevel(), getBlockState(), getClickedPos(), relative(), getClickedFace(), getOpposite(), is(). มีจุด return อย่างน้อย 3 จุด.
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
LadderBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.LadderBlock#LadderBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/LadderBlock.java:38 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ LadderBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.LadderBlock#mirror(BlockState,Mirror)
- Origin:
common - Source:
net/minecraft/world/level/block/LadderBlock.java:124 - Modifiers:
protected - Return:
BlockState
คืออะไร
ดำเนินการ mirror ตาม implementation ของ LadderBlock
ทำงานยังไง
เรียกต่อ: rotate(), getRotation(), getValue(). คืนค่า: blockState.rotate(mirror.getRotation(blockState.getValue(FACING))).
Parameters
BlockState blockStateMirror mirror
ตัวอย่างใช้งาน
BlockState blockState = ...;
Mirror mirror = ...;
@Override
protected BlockState mirror(BlockState blockState, Mirror mirror) {
return super.mirror(blockState, mirror);
}
net.minecraft.world.level.block.LadderBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/LadderBlock.java:119 - Modifiers:
protected - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
เรียกต่อ: setValue(), getValue(). คืนค่า: blockState.setValue(FACING, rotation.rotate(blockState.getValue(FACING))).
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
BlockState blockState = ...;
Rotation rotation = ...;
@Override
protected BlockState rotate(BlockState blockState, Rotation rotation) {
return super.rotate(blockState, rotation);
}
net.minecraft.world.level.block.LadderBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/LadderBlock.java:69 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getOpposite(), getValue(), canSurvive(), defaultBlockState(), scheduleTick(), getTickDelay(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
LanternBlock
- Full name:
net.minecraft.world.level.block.LanternBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/LanternBlock.java - Type:
class - Modifiers:
public - Extends:
Block - Implements:
SimpleWaterloggedBlock
net.minecraft.world.level.block.LanternBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/LanternBlock.java:68 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: getConnectedDirection(), getOpposite(), canSupportCenter(), relative(). คืนค่า: Block.canSupportCenter(levelReader, blockPos.relative(direction), direction.getOpposite()).
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.LanternBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/LanternBlock.java:31 - Modifiers:
public - Return:
MapCodec<LanternBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ LanternBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.LanternBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/LanternBlock.java:63 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.LanternBlock#getConnectedDirection(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/LanternBlock.java:74 - Modifiers:
protected static - Return:
Direction
คืออะไร
อ่านค่า Connected Direction
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: blockState.getValue(HANGING) ? Direction.DOWN : Direction.UP.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected Direction getConnectedDirection(BlockState blockState) {
return super.getConnectedDirection(blockState);
}
net.minecraft.world.level.block.LanternBlock#getFluidState(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/LanternBlock.java:98 - Modifiers:
protected - Return:
FluidState
คืออะไร
อ่านค่า Fluid State
ทำงานยังไง
เรียกต่อ: getValue(), getSource(). คืนค่า: blockState.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(blockState).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected FluidState getFluidState(BlockState blockState) {
return super.getFluidState(blockState);
}
net.minecraft.world.level.block.LanternBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/LanternBlock.java:58 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: blockState.getValue(HANGING) ? HANGING_AABB : AABB.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.LanternBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/LanternBlock.java:41 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getLevel(), getFluidState(), getClickedPos(), getNearestLookingDirections(), getAxis(), defaultBlockState(), setValue(), canSurvive(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
LanternBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.LanternBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/LanternBlock.java:103 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.LanternBlock#LanternBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/LanternBlock.java:36 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ LanternBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.LanternBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/LanternBlock.java:78 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), scheduleTick(), getTickDelay(), getConnectedDirection(), getOpposite(), canSurvive(), defaultBlockState().
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
LavaCauldronBlock
- Full name:
net.minecraft.world.level.block.LavaCauldronBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/LavaCauldronBlock.java - Type:
class - Modifiers:
public - Extends:
AbstractCauldronBlock
net.minecraft.world.level.block.LavaCauldronBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/LavaCauldronBlock.java:14 - Modifiers:
public - Return:
MapCodec<LavaCauldronBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ LavaCauldronBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.LavaCauldronBlock#entityInside(BlockState,Level,BlockPos,Entity)
- Origin:
common - Source:
net/minecraft/world/level/block/LavaCauldronBlock.java:33 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ entityInside ตาม implementation ของ LavaCauldronBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isEntityInsideContent(), lavaHurt().
Parameters
BlockState blockStateLevel levelBlockPos blockPosEntity entity
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Entity entity = ...;
@Override
protected void entityInside(BlockState blockState, Level level, BlockPos blockPos, Entity entity) {
super.entityInside(blockState, level, blockPos, entity);
}
net.minecraft.world.level.block.LavaCauldronBlock#getAnalogOutputSignal(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/LavaCauldronBlock.java:40 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Analog Output Signal
ทำงานยังไง
คืนค่า: 3.
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected int getAnalogOutputSignal(BlockState blockState, Level level, BlockPos blockPos) {
return super.getAnalogOutputSignal(blockState, level, blockPos);
}
net.minecraft.world.level.block.LavaCauldronBlock#getContentHeight(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/LavaCauldronBlock.java:23 - Modifiers:
protected - Return:
double
คืออะไร
อ่านค่า Content Height
ทำงานยังไง
คืนค่า: 0.9375.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected double getContentHeight(BlockState blockState) {
return super.getContentHeight(blockState);
}
net.minecraft.world.level.block.LavaCauldronBlock#isFull(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/LavaCauldronBlock.java:28 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Full
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
LavaCauldronBlock instance = ...;
BlockState blockState = ...;
boolean result = instance.isFull(blockState);
net.minecraft.world.level.block.LavaCauldronBlock#LavaCauldronBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/LavaCauldronBlock.java:19 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ LavaCauldronBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
LavaCauldronBlock instance = new LavaCauldronBlock(properties);
LayeredCauldronBlock
- Full name:
net.minecraft.world.level.block.LayeredCauldronBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/LayeredCauldronBlock.java - Type:
class - Modifiers:
public - Extends:
AbstractCauldronBlock
net.minecraft.world.level.block.LayeredCauldronBlock#canReceiveStalactiteDrip(Fluid)
- Origin:
common - Source:
net/minecraft/world/level/block/LayeredCauldronBlock.java:52 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Receive Stalactite Drip
ทำงานยังไง
แก้ state: precipitationType. คืนค่า: fluid == Fluids.WATER && this.precipitationType == Biome.Precipitation.RAIN.
Parameters
Fluid fluid
ตัวอย่างใช้งาน
Fluid fluid = ...;
@Override
protected boolean canReceiveStalactiteDrip(Fluid fluid) {
return super.canReceiveStalactiteDrip(fluid);
}
net.minecraft.world.level.block.LayeredCauldronBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/LayeredCauldronBlock.java:36 - Modifiers:
public - Return:
MapCodec<LayeredCauldronBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ LayeredCauldronBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.LayeredCauldronBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/LayeredCauldronBlock.java:101 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.LayeredCauldronBlock#entityInside(BlockState,Level,BlockPos,Entity)
- Origin:
common - Source:
net/minecraft/world/level/block/LayeredCauldronBlock.java:62 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ entityInside ตาม implementation ของ LayeredCauldronBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isOnFire(), isEntityInsideContent(), clearFire(), mayInteract(), handleEntityOnFireInside().
Parameters
BlockState blockStateLevel levelBlockPos blockPosEntity entity
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Entity entity = ...;
@Override
protected void entityInside(BlockState blockState, Level level, BlockPos blockPos, Entity entity) {
super.entityInside(blockState, level, blockPos, entity);
}
net.minecraft.world.level.block.LayeredCauldronBlock#getAnalogOutputSignal(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/LayeredCauldronBlock.java:96 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Analog Output Signal
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: blockState.getValue(LEVEL).
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected int getAnalogOutputSignal(BlockState blockState, Level level, BlockPos blockPos) {
return super.getAnalogOutputSignal(blockState, level, blockPos);
}
net.minecraft.world.level.block.LayeredCauldronBlock#getContentHeight(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/LayeredCauldronBlock.java:57 - Modifiers:
protected - Return:
double
คืออะไร
อ่านค่า Content Height
ทำงานยังไง
เรียกต่อ: getValue(), intValue(). คืนค่า: (6.0 + blockState.getValue(LEVEL).intValue() * 3.0) / 16.0.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected double getContentHeight(BlockState blockState) {
return super.getContentHeight(blockState);
}
net.minecraft.world.level.block.LayeredCauldronBlock#handlePrecipitation(BlockState,Level,BlockPos,Biome.Precipitation)
- Origin:
common - Source:
net/minecraft/world/level/block/LayeredCauldronBlock.java:87 - Modifiers:
public - Return:
void
คืออะไร
จัดการ Precipitation
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: shouldHandlePrecipitation(), getValue(), cycle(), setBlockAndUpdate(), gameEvent(), of().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBiome.Precipitation precipitation
ตัวอย่างใช้งาน
LayeredCauldronBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Biome.Precipitation precipitation = ...;
instance.handlePrecipitation(blockState, level, blockPos, precipitation);
net.minecraft.world.level.block.LayeredCauldronBlock#isFull(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/LayeredCauldronBlock.java:47 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Full
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: blockState.getValue(LEVEL) == 3.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
LayeredCauldronBlock instance = ...;
BlockState blockState = ...;
boolean result = instance.isFull(blockState);
net.minecraft.world.level.block.LayeredCauldronBlock#LayeredCauldronBlock(Biome.Precipitation,CauldronInteraction.InteractionMap,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/LayeredCauldronBlock.java:41 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ LayeredCauldronBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: precipitationType. เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
Biome.Precipitation precipitationCauldronInteraction.InteractionMap interactionMapBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
Biome.Precipitation precipitation = ...;
CauldronInteraction.InteractionMap interactionMap = ...;
BlockBehaviour.Properties properties = ...;
LayeredCauldronBlock instance = new LayeredCauldronBlock(precipitation, interactionMap, properties);
net.minecraft.world.level.block.LayeredCauldronBlock#lowerFillLevel(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/LayeredCauldronBlock.java:80 - Modifiers:
public static - Return:
void
คืออะไร
ดำเนินการ lowerFillLevel ตาม implementation ของ LayeredCauldronBlock
ทำงานยังไง
เรียกต่อ: getValue(), defaultBlockState(), setValue(), setBlockAndUpdate(), gameEvent(), of().
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
LayeredCauldronBlock.lowerFillLevel(blockState, level, blockPos);
net.minecraft.world.level.block.LayeredCauldronBlock#receiveStalactiteDrip(BlockState,Level,BlockPos,Fluid)
- Origin:
common - Source:
net/minecraft/world/level/block/LayeredCauldronBlock.java:106 - Modifiers:
protected - Return:
void
คืออะไร
รับ Stalactite Drip
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isFull(), setValue(), getValue(), setBlockAndUpdate(), gameEvent(), of(), levelEvent().
Parameters
BlockState blockStateLevel levelBlockPos blockPosFluid fluid
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Fluid fluid = ...;
@Override
protected void receiveStalactiteDrip(BlockState blockState, Level level, BlockPos blockPos, Fluid fluid) {
super.receiveStalactiteDrip(blockState, level, blockPos, fluid);
}
LeavesBlock
- Full name:
net.minecraft.world.level.block.LeavesBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/LeavesBlock.java - Type:
class - Modifiers:
public - Extends:
Block - Implements:
SimpleWaterloggedBlock
net.minecraft.world.level.block.LeavesBlock#animateTick(BlockState,Level,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/LeavesBlock.java:134 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ animateTick ตาม implementation ของ LeavesBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isRainingAt(), above(), nextInt(), below(), getBlockState(), canOcclude(), isFaceSturdy(), spawnParticleBelow().
Parameters
BlockState blockStateLevel levelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
LeavesBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
instance.animateTick(blockState, level, blockPos, randomSource);
net.minecraft.world.level.block.LeavesBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/LeavesBlock.java:37 - Modifiers:
public - Return:
MapCodec<? extends LeavesBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ LeavesBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.LeavesBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/LeavesBlock.java:147 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.LeavesBlock#decaying(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/LeavesBlock.java:65 - Modifiers:
protected - Return:
boolean
คืออะไร
ดำเนินการ decaying ตาม implementation ของ LeavesBlock
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: !blockState.getValue(PERSISTENT) && blockState.getValue(DISTANCE) == 7.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean decaying(BlockState blockState) {
return super.decaying(blockState);
}
net.minecraft.world.level.block.LeavesBlock#getBlockSupportShape(BlockState,BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/LeavesBlock.java:47 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Block Support Shape
ทำงานยังไง
เรียกต่อ: empty(). คืนค่า: Shapes.empty().
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
@Override
protected VoxelShape getBlockSupportShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos) {
return super.getBlockSupportShape(blockState, blockGetter, blockPos);
}
net.minecraft.world.level.block.LeavesBlock#getFluidState(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/LeavesBlock.java:129 - Modifiers:
protected - Return:
FluidState
คืออะไร
อ่านค่า Fluid State
ทำงานยังไง
เรียกต่อ: getValue(), getSource(). คืนค่า: blockState.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(blockState).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected FluidState getFluidState(BlockState blockState) {
return super.getFluidState(blockState);
}
net.minecraft.world.level.block.LeavesBlock#getLightBlock(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/LeavesBlock.java:74 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Light Block
ทำงานยังไง
คืนค่า: 1.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected int getLightBlock(BlockState blockState) {
return super.getLightBlock(blockState);
}
net.minecraft.world.level.block.LeavesBlock#getOptionalDistanceAt(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/LeavesBlock.java:121 - Modifiers:
public static - Return:
OptionalInt
คืออะไร
อ่านค่า Optional Distance At
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), of(), hasProperty(), getValue(), empty(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
net.minecraft.world.level.block.LeavesBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/LeavesBlock.java:152 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: getLevel(), getFluidState(), getClickedPos(), defaultBlockState(), setValue(), getType(), updateDistance(). คืนค่า: updateDistance(blockState, blockPlaceContext.getLevel(), blockPlaceContext.getClickedPos()).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
LeavesBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.LeavesBlock#isRandomlyTicking(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/LeavesBlock.java:52 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Randomly Ticking
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: blockState.getValue(DISTANCE) == 7 && !blockState.getValue(PERSISTENT).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean isRandomlyTicking(BlockState blockState) {
return super.isRandomlyTicking(blockState);
}
net.minecraft.world.level.block.LeavesBlock#LeavesBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/LeavesBlock.java:42 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ LeavesBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.LeavesBlock#randomTick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/LeavesBlock.java:57 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ randomTick ตาม implementation ของ LeavesBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: decaying(), dropResources(), removeBlock().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void randomTick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.randomTick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.LeavesBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/LeavesBlock.java:69 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
เรียกต่อ: setBlock(), updateDistance().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.LeavesBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/LeavesBlock.java:79 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), scheduleTick(), getTickDelay(), getDistanceAt(). คืนค่า: blockState.
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
LecternBlock
- Full name:
net.minecraft.world.level.block.LecternBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/LecternBlock.java - Type:
class - Modifiers:
public - Extends:
BaseEntityBlock
net.minecraft.world.level.block.LecternBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/LecternBlock.java:79 - Modifiers:
public - Return:
MapCodec<LecternBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ LecternBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.LecternBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/LecternBlock.java:146 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.LecternBlock#getAnalogOutputSignal(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/LecternBlock.java:251 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Analog Output Signal
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), getBlockEntity(), getRedstoneSignal(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected int getAnalogOutputSignal(BlockState blockState, Level level, BlockPos blockPos) {
return super.getAnalogOutputSignal(blockState, level, blockPos);
}
net.minecraft.world.level.block.LecternBlock#getCollisionShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/LecternBlock.java:115 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Collision Shape
ทำงานยังไง
คืนค่า: SHAPE_COLLISION.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getCollisionShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getCollisionShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.LecternBlock#getDirectSignal(BlockState,BlockGetter,BlockPos,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/LecternBlock.java:241 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Direct Signal
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: direction == Direction.UP && blockState.getValue(POWERED) ? 15 : 0.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosDirection direction
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
Direction direction = ...;
@Override
protected int getDirectSignal(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, Direction direction) {
return super.getDirectSignal(blockState, blockGetter, blockPos, direction);
}
net.minecraft.world.level.block.LecternBlock#getMenuProvider(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/LecternBlock.java:289 - Modifiers:
protected - Return:
MenuProvider
คืออะไร
อ่านค่า Menu Provider
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: !blockState.getValue(HAS_BOOK) ? null : super.getMenuProvider(blockState, level, blockPos).
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected MenuProvider getMenuProvider(BlockState blockState, Level level, BlockPos blockPos) {
return super.getMenuProvider(blockState, level, blockPos);
}
net.minecraft.world.level.block.LecternBlock#getOcclusionShape(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/LecternBlock.java:89 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Occlusion Shape
ทำงานยังไง
คืนค่า: SHAPE_COMMON.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected VoxelShape getOcclusionShape(BlockState blockState) {
return super.getOcclusionShape(blockState);
}
net.minecraft.world.level.block.LecternBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/LecternBlock.java:120 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
แยกกรณีด้วย switch. เรียกต่อ: getValue(). มีจุด return อย่างน้อย 5 จุด.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.LecternBlock#getSignal(BlockState,BlockGetter,BlockPos,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/LecternBlock.java:236 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Signal
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: blockState.getValue(POWERED) ? 15 : 0.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosDirection direction
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
Direction direction = ...;
@Override
protected int getSignal(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, Direction direction) {
return super.getSignal(blockState, blockGetter, blockPos, direction);
}
net.minecraft.world.level.block.LecternBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/LecternBlock.java:99 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getLevel(), getItemInHand(), getPlayer(), canUseGameMasterBlocks(), getOrDefault(), contains(), defaultBlockState(), setValue(). คืนค่า: this.defaultBlockState().setValue(FACING, blockPlaceContext.getHorizontalDirection().getOpposite()).setValue(HAS_BOOK, bl).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
LecternBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.LecternBlock#hasAnalogOutputSignal(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/LecternBlock.java:246 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Analog Output Signal
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean hasAnalogOutputSignal(BlockState blockState) {
return super.hasAnalogOutputSignal(blockState);
}
net.minecraft.world.level.block.LecternBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/LecternBlock.java:303 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.LecternBlock#isSignalSource(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/LecternBlock.java:231 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Signal Source
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean isSignalSource(BlockState blockState) {
return super.isSignalSource(blockState);
}
net.minecraft.world.level.block.LecternBlock#LecternBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/LecternBlock.java:84 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ LecternBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.LecternBlock#mirror(BlockState,Mirror)
- Origin:
common - Source:
net/minecraft/world/level/block/LecternBlock.java:141 - Modifiers:
protected - Return:
BlockState
คืออะไร
ดำเนินการ mirror ตาม implementation ของ LecternBlock
ทำงานยังไง
เรียกต่อ: rotate(), getRotation(), getValue(). คืนค่า: blockState.rotate(mirror.getRotation(blockState.getValue(FACING))).
Parameters
BlockState blockStateMirror mirror
ตัวอย่างใช้งาน
BlockState blockState = ...;
Mirror mirror = ...;
@Override
protected BlockState mirror(BlockState blockState, Mirror mirror) {
return super.mirror(blockState, mirror);
}
net.minecraft.world.level.block.LecternBlock#newBlockEntity(BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/LecternBlock.java:151 - Modifiers:
public - Return:
BlockEntity
คืออะไร
ดำเนินการ newBlockEntity ตาม implementation ของ LecternBlock
ทำงานยังไง
สร้างออบเจ็กต์: LecternBlockEntity. คืนค่า: new LecternBlockEntity(blockPos, blockState).
Parameters
BlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
LecternBlock instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
BlockEntity result = instance.newBlockEntity(blockPos, blockState);
net.minecraft.world.level.block.LecternBlock#onRemove(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/LecternBlock.java:204 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Remove
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), getBlock(), getValue(), popBook(), updateBelow().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onRemove(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onRemove(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.LecternBlock#resetBookState(Entity,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/LecternBlock.java:176 - Modifiers:
public static - Return:
void
คืออะไร
รีเซ็ต Book State
ทำงานยังไง
เรียกต่อ: setValue(), setBlock(), gameEvent(), of(), updateBelow().
Parameters
Entity entityLevel levelBlockPos blockPosBlockState blockStateboolean bl
ตัวอย่างใช้งาน
Entity entity = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
LecternBlock.resetBookState(entity, level, blockPos, blockState, true);
net.minecraft.world.level.block.LecternBlock#rotate(BlockState,Rotation)
- Origin:
common - Source:
net/minecraft/world/level/block/LecternBlock.java:136 - Modifiers:
protected - Return:
BlockState
คืออะไร
หมุน rotate
ทำงานยังไง
เรียกต่อ: setValue(), getValue(). คืนค่า: blockState.setValue(FACING, rotation.rotate(blockState.getValue(FACING))).
Parameters
BlockState blockStateRotation rotation
ตัวอย่างใช้งาน
BlockState blockState = ...;
Rotation rotation = ...;
@Override
protected BlockState rotate(BlockState blockState, Rotation rotation) {
return super.rotate(blockState, rotation);
}
net.minecraft.world.level.block.LecternBlock#signalPageChange(Level,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/LecternBlock.java:183 - Modifiers:
public static - Return:
void
คืออะไร
ดำเนินการ signalPageChange ตาม implementation ของ LecternBlock
ทำงานยังไง
เรียกต่อ: changePowered(), scheduleTick(), getBlock(), levelEvent().
Parameters
Level levelBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
LecternBlock.signalPageChange(level, blockPos, blockState);
net.minecraft.world.level.block.LecternBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/LecternBlock.java:199 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
เรียกต่อ: changePowered().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.LecternBlock#tryPlaceBook(LivingEntity,Level,BlockPos,BlockState,ItemStack)
- Origin:
common - Source:
net/minecraft/world/level/block/LecternBlock.java:156 - Modifiers:
public static - Return:
boolean
คืออะไร
ดำเนินการ tryPlaceBook ตาม implementation ของ LecternBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), placeBook(). มีจุด return อย่างน้อย 2 จุด.
Parameters
LivingEntity livingEntityLevel levelBlockPos blockPosBlockState blockStateItemStack itemStack
ตัวอย่างใช้งาน
LivingEntity livingEntity = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
ItemStack itemStack = ...;
boolean result = LecternBlock.tryPlaceBook(livingEntity, level, blockPos, blockState, itemStack);
net.minecraft.world.level.block.LecternBlock#useItemOn(ItemStack,BlockState,Level,BlockPos,Player,InteractionHand,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/LecternBlock.java:263 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Item On
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), is(), tryPlaceBook(), isEmpty(). มีจุด return อย่างน้อย 3 จุด.
Parameters
ItemStack itemStackBlockState blockStateLevel levelBlockPos blockPosPlayer playerInteractionHand interactionHandBlockHitResult blockHitResult
ตัวอย่างใช้งาน
ItemStack itemStack = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
InteractionHand interactionHand = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useItemOn(ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult) {
return super.useItemOn(itemStack, blockState, level, blockPos, player, interactionHand, blockHitResult);
}
net.minecraft.world.level.block.LecternBlock#useShapeForLightOcclusion(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/LecternBlock.java:94 - Modifiers:
protected - Return:
boolean
คืออะไร
ใช้งาน Shape For Light Occlusion
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean useShapeForLightOcclusion(BlockState blockState) {
return super.useShapeForLightOcclusion(blockState);
}
net.minecraft.world.level.block.LecternBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/LecternBlock.java:276 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), openScreen(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
LeverBlock
- Full name:
net.minecraft.world.level.block.LeverBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/LeverBlock.java - Type:
class - Modifiers:
public - Extends:
FaceAttachedHorizontalDirectionalBlock
net.minecraft.world.level.block.LeverBlock#animateTick(BlockState,Level,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/LeverBlock.java:140 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ animateTick ตาม implementation ของ LeverBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), nextFloat(), makeParticle().
Parameters
BlockState blockStateLevel levelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
LeverBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
instance.animateTick(blockState, level, blockPos, randomSource);
net.minecraft.world.level.block.LeverBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/LeverBlock.java:48 - Modifiers:
public - Return:
MapCodec<LeverBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ LeverBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.LeverBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/LeverBlock.java:182 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.LeverBlock#getDirectSignal(BlockState,BlockGetter,BlockPos,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/LeverBlock.java:163 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Direct Signal
ทำงานยังไง
เรียกต่อ: getValue(), getConnectedDirection(). คืนค่า: blockState.getValue(POWERED) && getConnectedDirection(blockState) == direction ? 15 : 0.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosDirection direction
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
Direction direction = ...;
@Override
protected int getDirectSignal(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, Direction direction) {
return super.getDirectSignal(blockState, blockGetter, blockPos, direction);
}
net.minecraft.world.level.block.LeverBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/LeverBlock.java:58 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
แยกกรณีด้วย switch. เรียกต่อ: getValue(), getAxis(). มีจุด return อย่างน้อย 8 จุด.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.LeverBlock#getSignal(BlockState,BlockGetter,BlockPos,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/LeverBlock.java:158 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Signal
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: blockState.getValue(POWERED) ? 15 : 0.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosDirection direction
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
Direction direction = ...;
@Override
protected int getSignal(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, Direction direction) {
return super.getSignal(blockState, blockGetter, blockPos, direction);
}
net.minecraft.world.level.block.LeverBlock#isSignalSource(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/LeverBlock.java:168 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Signal Source
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean isSignalSource(BlockState blockState) {
return super.isSignalSource(blockState);
}
net.minecraft.world.level.block.LeverBlock#LeverBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/LeverBlock.java:53 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ LeverBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.LeverBlock#onExplosionHit(BlockState,ServerLevel,BlockPos,Explosion,BiConsumer<ItemStack, BlockPos>)
- Origin:
common - Source:
net/minecraft/world/level/block/LeverBlock.java:107 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Explosion Hit
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canTriggerBlocks(), pull().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosExplosion explosionBiConsumer<ItemStack, BlockPos> biConsumer
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
Explosion explosion = ...;
BiConsumer<ItemStack, BlockPos> biConsumer = ...;
@Override
protected void onExplosionHit(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, Explosion explosion, BiConsumer<ItemStack, BlockPos> biConsumer) {
super.onExplosionHit(blockState, serverLevel, blockPos, explosion, biConsumer);
}
net.minecraft.world.level.block.LeverBlock#onRemove(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/LeverBlock.java:147 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Remove
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), getBlock(), getValue(), updateNeighbours().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onRemove(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onRemove(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.LeverBlock#playSound(Player,LevelAccessor,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/LeverBlock.java:126 - Modifiers:
protected static - Return:
void
คืออะไร
ดำเนินการ playSound ตาม implementation ของ LeverBlock
ทำงานยังไง
เรียกต่อ: getValue().
Parameters
Player playerLevelAccessor levelAccessorBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
Player player = ...;
LevelAccessor levelAccessor = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected void playSound(Player player, LevelAccessor levelAccessor, BlockPos blockPos, BlockState blockState) {
super.playSound(player, levelAccessor, blockPos, blockState);
}
net.minecraft.world.level.block.LeverBlock#pull(BlockState,Level,BlockPos,Player)
- Origin:
common - Source:
net/minecraft/world/level/block/LeverBlock.java:118 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ pull ตาม implementation ของ LeverBlock
ทำงานยังไง
เรียกต่อ: cycle(), setBlock(), updateNeighbours(), playSound(), gameEvent(), getValue().
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer player
ตัวอย่างใช้งาน
LeverBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
instance.pull(blockState, level, blockPos, player);
net.minecraft.world.level.block.LeverBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/LeverBlock.java:93 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: cycle(), getValue(), makeParticle(), pull(). คืนค่า: InteractionResult.SUCCESS.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
LightBlock
- Full name:
net.minecraft.world.level.block.LightBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/LightBlock.java - Type:
class - Modifiers:
public - Extends:
Block - Implements:
SimpleWaterloggedBlock
net.minecraft.world.level.block.LightBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/LightBlock.java:38 - Modifiers:
public - Return:
MapCodec<LightBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ LightBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.LightBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/LightBlock.java:48 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.LightBlock#getCloneItemStack(LevelReader,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/LightBlock.java:106 - Modifiers:
protected - Return:
ItemStack
คืออะไร
อ่านค่า Clone Item Stack
ทำงานยังไง
เรียกต่อ: setLightOnStack(), getValue(). คืนค่า: setLightOnStack(super.getCloneItemStack(levelReader, blockPos, blockState, bl), blockState.getValue(LEVEL)).
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockStateboolean bl
ตัวอย่างใช้งาน
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected ItemStack getCloneItemStack(LevelReader levelReader, BlockPos blockPos, BlockState blockState, boolean bl) {
return super.getCloneItemStack(levelReader, blockPos, blockState, bl);
}
net.minecraft.world.level.block.LightBlock#getFluidState(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/LightBlock.java:101 - Modifiers:
protected - Return:
FluidState
คืออะไร
อ่านค่า Fluid State
ทำงานยังไง
เรียกต่อ: getValue(), getSource(). คืนค่า: blockState.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(blockState).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected FluidState getFluidState(BlockState blockState) {
return super.getFluidState(blockState);
}
net.minecraft.world.level.block.LightBlock#getRenderShape(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/LightBlock.java:73 - Modifiers:
protected - Return:
RenderShape
คืออะไร
อ่านค่า Render Shape
ทำงานยังไง
คืนค่า: RenderShape.INVISIBLE.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected RenderShape getRenderShape(BlockState blockState) {
return super.getRenderShape(blockState);
}
net.minecraft.world.level.block.LightBlock#getShadeBrightness(BlockState,BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/LightBlock.java:78 - Modifiers:
protected - Return:
float
คืออะไร
อ่านค่า Shade Brightness
ทำงานยังไง
คืนค่า: 1.0F.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
@Override
protected float getShadeBrightness(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos) {
return super.getShadeBrightness(blockState, blockGetter, blockPos);
}
net.minecraft.world.level.block.LightBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/LightBlock.java:63 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
เรียกต่อ: isHoldingItem(), block(), empty(). คืนค่า: collisionContext.isHoldingItem(Items.LIGHT) ? Shapes.block() : Shapes.empty().
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.LightBlock#LightBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/LightBlock.java:43 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ LightBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.LightBlock#propagatesSkylightDown(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/LightBlock.java:68 - Modifiers:
protected - Return:
boolean
คืออะไร
ดำเนินการ propagatesSkylightDown ตาม implementation ของ LightBlock
ทำงานยังไง
เรียกต่อ: getFluidState(), isEmpty(). คืนค่า: blockState.getFluidState().isEmpty().
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean propagatesSkylightDown(BlockState blockState) {
return super.propagatesSkylightDown(blockState);
}
net.minecraft.world.level.block.LightBlock#setLightOnStack(ItemStack,int)
- Origin:
common - Source:
net/minecraft/world/level/block/LightBlock.java:111 - Modifiers:
public static - Return:
ItemStack
คืออะไร
กำหนดค่า Light On Stack
ทำงานยังไง
เรียกต่อ: set(), with(). คืนค่า: itemStack.
Parameters
ItemStack itemStackint i
ตัวอย่างใช้งาน
net.minecraft.world.level.block.LightBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/LightBlock.java:83 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), scheduleTick(), getTickDelay(). คืนค่า: super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource).
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
net.minecraft.world.level.block.LightBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/LightBlock.java:53 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: canUseGameMasterBlocks(), setBlock(), cycle(). มีจุด return อย่างน้อย 2 จุด.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
LightningRodBlock
- Full name:
net.minecraft.world.level.block.LightningRodBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/LightningRodBlock.java - Type:
class - Modifiers:
public - Extends:
RodBlock - Implements:
SimpleWaterloggedBlock
net.minecraft.world.level.block.LightningRodBlock#animateTick(BlockState,Level,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/LightningRodBlock.java:102 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ animateTick ตาม implementation ของ LightningRodBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isThundering(), nextInt(), getGameTime(), getY(), getHeight(), getX(), getZ(), spawnParticlesAlongAxis().
Parameters
BlockState blockStateLevel levelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
LightningRodBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
instance.animateTick(blockState, level, blockPos, randomSource);
net.minecraft.world.level.block.LightningRodBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/LightningRodBlock.java:34 - Modifiers:
public - Return:
MapCodec<LightningRodBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ LightningRodBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.LightningRodBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/LightningRodBlock.java:131 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.LightningRodBlock#getDirectSignal(BlockState,BlockGetter,BlockPos,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/LightningRodBlock.java:79 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Direct Signal
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: blockState.getValue(POWERED) && blockState.getValue(FACING) == direction ? 15 : 0.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosDirection direction
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
Direction direction = ...;
@Override
protected int getDirectSignal(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, Direction direction) {
return super.getDirectSignal(blockState, blockGetter, blockPos, direction);
}
net.minecraft.world.level.block.LightningRodBlock#getFluidState(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/LightningRodBlock.java:69 - Modifiers:
protected - Return:
FluidState
คืออะไร
อ่านค่า Fluid State
ทำงานยังไง
เรียกต่อ: getValue(), getSource(). คืนค่า: blockState.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(blockState).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected FluidState getFluidState(BlockState blockState) {
return super.getFluidState(blockState);
}
net.minecraft.world.level.block.LightningRodBlock#getSignal(BlockState,BlockGetter,BlockPos,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/LightningRodBlock.java:74 - Modifiers:
protected - Return:
int
คืออะไร
อ่านค่า Signal
ทำงานยังไง
เรียกต่อ: getValue(). คืนค่า: blockState.getValue(POWERED) ? 15 : 0.
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosDirection direction
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
Direction direction = ...;
@Override
protected int getSignal(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, Direction direction) {
return super.getSignal(blockState, blockGetter, blockPos, direction);
}
net.minecraft.world.level.block.LightningRodBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/LightningRodBlock.java:44 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: getLevel(), getFluidState(), getClickedPos(), getType(), defaultBlockState(), setValue(), getClickedFace(). คืนค่า: this.defaultBlockState().setValue(FACING, blockPlaceContext.getClickedFace()).setValue(WATERLOGGED, bl).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
LightningRodBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.LightningRodBlock#isSignalSource(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/LightningRodBlock.java:136 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Signal Source
ทำงานยังไง
คืนค่า: true.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean isSignalSource(BlockState blockState) {
return super.isSignalSource(blockState);
}
net.minecraft.world.level.block.LightningRodBlock#LightningRodBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/LightningRodBlock.java:39 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ LightningRodBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
LightningRodBlock instance = new LightningRodBlock(properties);
net.minecraft.world.level.block.LightningRodBlock#onLightningStrike(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/LightningRodBlock.java:84 - Modifiers:
public - Return:
void
คืออะไร
จัดการเหตุการณ์ Lightning Strike
ทำงานยังไง
เรียกต่อ: setBlock(), setValue(), updateNeighbours(), scheduleTick(), levelEvent(), getValue(), getAxis(), ordinal().
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
LightningRodBlock instance = ...;
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
instance.onLightningStrike(blockState, level, blockPos);
net.minecraft.world.level.block.LightningRodBlock#onPlace(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/LightningRodBlock.java:122 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Place
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), getBlock(), getValue(), getBlockTicks(), hasScheduledTick(), setBlock(), setValue().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onPlace(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onPlace(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.LightningRodBlock#onRemove(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/LightningRodBlock.java:111 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Remove
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), getBlock(), getValue(), updateNeighbours().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onRemove(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onRemove(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.LightningRodBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/LightningRodBlock.java:96 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
เรียกต่อ: setBlock(), setValue(), updateNeighbours().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.LightningRodBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/LightningRodBlock.java:51 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), scheduleTick(), getTickDelay(). คืนค่า: super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource).
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
LiquidBlock
- Full name:
net.minecraft.world.level.block.LiquidBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/LiquidBlock.java - Type:
class - Modifiers:
public - Extends:
Block - Implements:
BucketPickup
net.minecraft.world.level.block.LiquidBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/LiquidBlock.java:60 - Modifiers:
public - Return:
MapCodec<LiquidBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ LiquidBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.LiquidBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/LiquidBlock.java:194 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.LiquidBlock#getCollisionShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/LiquidBlock.java:79 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Collision Shape
ทำงานยังไง
เรียกต่อ: isAbove(), getValue(), canStandOnFluid(), getFluidState(), above(), empty().
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getCollisionShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getCollisionShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.LiquidBlock#getDrops(BlockState,LootParams.Builder)
- Origin:
common - Source:
net/minecraft/world/level/block/LiquidBlock.java:124 - Modifiers:
protected - Return:
List<ItemStack>
คืออะไร
อ่านค่า Drops
ทำงานยังไง
เรียกต่อ: emptyList(). คืนค่า: Collections.emptyList().
Parameters
BlockState blockStateLootParams.Builder builder
ตัวอย่างใช้งาน
BlockState blockState = ...;
LootParams.Builder builder = ...;
@Override
protected List<ItemStack> getDrops(BlockState blockState, LootParams.Builder builder) {
return super.getDrops(blockState, builder);
}
net.minecraft.world.level.block.LiquidBlock#getFluidState(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/LiquidBlock.java:108 - Modifiers:
protected - Return:
FluidState
คืออะไร
อ่านค่า Fluid State
ทำงานยังไง
เรียกต่อ: getValue(), get(), min(). คืนค่า: this.stateCache.get(Math.min(i, 8)).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected FluidState getFluidState(BlockState blockState) {
return super.getFluidState(blockState);
}
net.minecraft.world.level.block.LiquidBlock#getPickupSound()
- Origin:
common - Source:
net/minecraft/world/level/block/LiquidBlock.java:209 - Modifiers:
public - Return:
Optional<SoundEvent>
คืออะไร
อ่านค่า Pickup Sound
ทำงานยังไง
คืนค่า: this.fluid.getPickupSound().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.LiquidBlock#getRenderShape(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/LiquidBlock.java:119 - Modifiers:
protected - Return:
RenderShape
คืออะไร
อ่านค่า Render Shape
ทำงานยังไง
คืนค่า: RenderShape.INVISIBLE.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected RenderShape getRenderShape(BlockState blockState) {
return super.getRenderShape(blockState);
}
net.minecraft.world.level.block.LiquidBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/LiquidBlock.java:129 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
เรียกต่อ: empty(). คืนค่า: Shapes.empty().
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.LiquidBlock#isPathfindable(BlockState,PathComputationType)
- Origin:
common - Source:
net/minecraft/world/level/block/LiquidBlock.java:103 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Pathfindable
ทำงานยังไง
เรียกต่อ: is(). คืนค่า: !this.fluid.is(FluidTags.LAVA).
Parameters
BlockState blockStatePathComputationType pathComputationType
ตัวอย่างใช้งาน
BlockState blockState = ...;
PathComputationType pathComputationType = ...;
@Override
protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) {
return super.isPathfindable(blockState, pathComputationType);
}
net.minecraft.world.level.block.LiquidBlock#isRandomlyTicking(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/LiquidBlock.java:88 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Randomly Ticking
ทำงานยังไง
เรียกต่อ: getFluidState(). คืนค่า: blockState.getFluidState().isRandomlyTicking().
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean isRandomlyTicking(BlockState blockState) {
return super.isRandomlyTicking(blockState);
}
net.minecraft.world.level.block.LiquidBlock#LiquidBlock(FlowingFluid,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/LiquidBlock.java:65 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ LiquidBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
มีการวนลูป. แก้ state: fluid, stateCache. เรียกต่อ: newArrayList(), add(), getSource(), getFlowing(), registerDefaultState(), any(), setValue().
Parameters
FlowingFluid flowingFluidBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
FlowingFluid flowingFluid = ...;
BlockBehaviour.Properties properties = ...;
LiquidBlock instance = new LiquidBlock(flowingFluid, properties);
net.minecraft.world.level.block.LiquidBlock#neighborChanged(BlockState,Level,BlockPos,Block,Orientation,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/LiquidBlock.java:159 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ neighborChanged ตาม implementation ของ LiquidBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: shouldSpreadLiquid(), scheduleTick(), getFluidState(), getType(), getTickDelay().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlock blockOrientation orientationboolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Block block = ...;
Orientation orientation = ...;
@Override
protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, Orientation orientation, boolean bl) {
super.neighborChanged(blockState, level, blockPos, block, orientation, bl);
}
net.minecraft.world.level.block.LiquidBlock#onPlace(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/LiquidBlock.java:134 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Place
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: shouldSpreadLiquid(), scheduleTick(), getFluidState(), getType(), getTickDelay().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onPlace(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onPlace(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.LiquidBlock#pickupBlock(Player,LevelAccessor,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/LiquidBlock.java:199 - Modifiers:
public - Return:
ItemStack
คืออะไร
ดำเนินการ pickupBlock ตาม implementation ของ LiquidBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), setBlock(), defaultBlockState(), getBucket(). สร้างออบเจ็กต์: ItemStack. มีจุด return อย่างน้อย 2 จุด.
Parameters
Player playerLevelAccessor levelAccessorBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
LiquidBlock instance = ...;
Player player = ...;
LevelAccessor levelAccessor = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
ItemStack result = instance.pickupBlock(player, levelAccessor, blockPos, blockState);
net.minecraft.world.level.block.LiquidBlock#propagatesSkylightDown(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/LiquidBlock.java:98 - Modifiers:
protected - Return:
boolean
คืออะไร
ดำเนินการ propagatesSkylightDown ตาม implementation ของ LiquidBlock
ทำงานยังไง
คืนค่า: false.
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected boolean propagatesSkylightDown(BlockState blockState) {
return super.propagatesSkylightDown(blockState);
}
net.minecraft.world.level.block.LiquidBlock#randomTick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/LiquidBlock.java:93 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ randomTick ตาม implementation ของ LiquidBlock
ทำงานยังไง
เรียกต่อ: getFluidState().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void randomTick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.randomTick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.LiquidBlock#skipRendering(BlockState,BlockState,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/LiquidBlock.java:114 - Modifiers:
protected - Return:
boolean
คืออะไร
ดำเนินการ skipRendering ตาม implementation ของ LiquidBlock
ทำงานยังไง
เรียกต่อ: getFluidState(), getType(), isSame(). คืนค่า: blockState2.getFluidState().getType().isSame(this.fluid).
Parameters
BlockState blockStateBlockState blockState2Direction direction
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockState blockState2 = ...;
Direction direction = ...;
@Override
protected boolean skipRendering(BlockState blockState, BlockState blockState2, Direction direction) {
return super.skipRendering(blockState, blockState2, direction);
}
net.minecraft.world.level.block.LiquidBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/LiquidBlock.java:141 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getFluidState(), isSource(), scheduleTick(), getType(), getTickDelay(). คืนค่า: super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource).
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
LiquidBlockContainer
- Full name:
net.minecraft.world.level.block.LiquidBlockContainer - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/LiquidBlockContainer.java - Type:
interface - Modifiers:
public
net.minecraft.world.level.block.LiquidBlockContainer#canPlaceLiquid(Player,BlockGetter,BlockPos,BlockState,Fluid)
- Origin:
common - Source:
net/minecraft/world/level/block/LiquidBlockContainer.java:13 - Modifiers: ``
- Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Place Liquid
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
Player playerBlockGetter blockGetterBlockPos blockPosBlockState blockStateFluid fluid
ตัวอย่างใช้งาน
LiquidBlockContainer instance = ...;
Player player = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
Fluid fluid = ...;
boolean result = instance.canPlaceLiquid(player, blockGetter, blockPos, blockState, fluid);
net.minecraft.world.level.block.LiquidBlockContainer#placeLiquid(LevelAccessor,BlockPos,BlockState,FluidState)
- Origin:
common - Source:
net/minecraft/world/level/block/LiquidBlockContainer.java:15 - Modifiers: ``
- Return:
boolean
คืออะไร
ดำเนินการ placeLiquid ตาม implementation ของ LiquidBlockContainer
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
LevelAccessor levelAccessorBlockPos blockPosBlockState blockStateFluidState fluidState
ตัวอย่างใช้งาน
LiquidBlockContainer instance = ...;
LevelAccessor levelAccessor = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
FluidState fluidState = ...;
boolean result = instance.placeLiquid(levelAccessor, blockPos, blockState, fluidState);
LoomBlock
- Full name:
net.minecraft.world.level.block.LoomBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/LoomBlock.java - Type:
class - Modifiers:
public - Extends:
HorizontalDirectionalBlock
net.minecraft.world.level.block.LoomBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/LoomBlock.java:24 - Modifiers:
public - Return:
MapCodec<LoomBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ LoomBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.LoomBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/LoomBlock.java:53 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.LoomBlock#getMenuProvider(BlockState,Level,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/LoomBlock.java:43 - Modifiers:
protected - Return:
MenuProvider
คืออะไร
อ่านค่า Menu Provider
ทำงานยังไง
เรียกต่อ: create(). สร้างออบเจ็กต์: SimpleMenuProvider, LoomMenu. คืนค่า: new SimpleMenuProvider((i, inventory, player) -> new LoomMenu(i, inventory, ContainerLevelAccess.create(level, blockPos)), CONTAINER_TITLE).
Parameters
BlockState blockStateLevel levelBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
@Override
protected MenuProvider getMenuProvider(BlockState blockState, Level level, BlockPos blockPos) {
return super.getMenuProvider(blockState, level, blockPos);
}
net.minecraft.world.level.block.LoomBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/LoomBlock.java:48 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: defaultBlockState(), setValue(), getHorizontalDirection(), getOpposite(). คืนค่า: this.defaultBlockState().setValue(FACING, blockPlaceContext.getHorizontalDirection().getOpposite()).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
LoomBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.LoomBlock#LoomBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/LoomBlock.java:29 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ LoomBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.LoomBlock#useWithoutItem(BlockState,Level,BlockPos,Player,BlockHitResult)
- Origin:
common - Source:
net/minecraft/world/level/block/LoomBlock.java:33 - Modifiers:
protected - Return:
InteractionResult
คืออะไร
ใช้งาน Without Item
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: openMenu(), getMenuProvider(), awardStat(). คืนค่า: InteractionResult.SUCCESS.
Parameters
BlockState blockStateLevel levelBlockPos blockPosPlayer playerBlockHitResult blockHitResult
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
Player player = ...;
BlockHitResult blockHitResult = ...;
@Override
protected InteractionResult useWithoutItem(BlockState blockState, Level level, BlockPos blockPos, Player player, BlockHitResult blockHitResult) {
return super.useWithoutItem(blockState, level, blockPos, player, blockHitResult);
}
MagmaBlock
- Full name:
net.minecraft.world.level.block.MagmaBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/MagmaBlock.java - Type:
class - Modifiers:
public - Extends:
Block
net.minecraft.world.level.block.MagmaBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/MagmaBlock.java:20 - Modifiers:
public - Return:
MapCodec<MagmaBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ MagmaBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.MagmaBlock#MagmaBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/MagmaBlock.java:25 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ MagmaBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
net.minecraft.world.level.block.MagmaBlock#onPlace(BlockState,Level,BlockPos,BlockState,boolean)
- Origin:
common - Source:
net/minecraft/world/level/block/MagmaBlock.java:61 - Modifiers:
protected - Return:
void
คืออะไร
จัดการเหตุการณ์ Place
ทำงานยังไง
เรียกต่อ: scheduleTick().
Parameters
BlockState blockStateLevel levelBlockPos blockPosBlockState blockState2boolean bl
ตัวอย่างใช้งาน
BlockState blockState = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState2 = ...;
@Override
protected void onPlace(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {
super.onPlace(blockState, level, blockPos, blockState2, bl);
}
net.minecraft.world.level.block.MagmaBlock#stepOn(Level,BlockPos,BlockState,Entity)
- Origin:
common - Source:
net/minecraft/world/level/block/MagmaBlock.java:29 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ stepOn ตาม implementation ของ MagmaBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isSteppingCarefully(), hurt(), damageSources(), hotFloor().
Parameters
Level levelBlockPos blockPosBlockState blockStateEntity entity
ตัวอย่างใช้งาน
MagmaBlock instance = ...;
Level level = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
Entity entity = ...;
instance.stepOn(level, blockPos, blockState, entity);
net.minecraft.world.level.block.MagmaBlock#tick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/MagmaBlock.java:38 - Modifiers:
protected - Return:
void
คืออะไร
ประมวลผล tick tick
ทำงานยังไง
เรียกต่อ: updateColumn(), above().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.tick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.MagmaBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/MagmaBlock.java:43 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), scheduleTick(). คืนค่า: super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource).
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
MangroveLeavesBlock
- Full name:
net.minecraft.world.level.block.MangroveLeavesBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/MangroveLeavesBlock.java - Type:
class - Modifiers:
public - Extends:
LeavesBlock - Implements:
BonemealableBlock
net.minecraft.world.level.block.MangroveLeavesBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/MangroveLeavesBlock.java:15 - Modifiers:
public - Return:
MapCodec<MangroveLeavesBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ MangroveLeavesBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.MangroveLeavesBlock#getParticlePos(BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/MangroveLeavesBlock.java:39 - Modifiers:
public - Return:
BlockPos
คืออะไร
อ่านค่า Particle Pos
ทำงานยังไง
เรียกต่อ: below(). คืนค่า: blockPos.below().
Parameters
BlockPos blockPos
ตัวอย่างใช้งาน
MangroveLeavesBlock instance = ...;
BlockPos blockPos = ...;
BlockPos result = instance.getParticlePos(blockPos);
net.minecraft.world.level.block.MangroveLeavesBlock#isBonemealSuccess(Level,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/MangroveLeavesBlock.java:29 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Bonemeal Success
ทำงานยังไง
คืนค่า: true.
Parameters
Level levelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
MangroveLeavesBlock instance = ...;
Level level = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isBonemealSuccess(level, randomSource, blockPos, blockState);
net.minecraft.world.level.block.MangroveLeavesBlock#isValidBonemealTarget(LevelReader,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/MangroveLeavesBlock.java:24 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Valid Bonemeal Target
ทำงานยังไง
เรียกต่อ: getBlockState(), below(), isAir(). คืนค่า: levelReader.getBlockState(blockPos.below()).isAir().
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
MangroveLeavesBlock instance = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isValidBonemealTarget(levelReader, blockPos, blockState);
net.minecraft.world.level.block.MangroveLeavesBlock#MangroveLeavesBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/MangroveLeavesBlock.java:20 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ MangroveLeavesBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
MangroveLeavesBlock instance = new MangroveLeavesBlock(properties);
net.minecraft.world.level.block.MangroveLeavesBlock#performBonemeal(ServerLevel,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/MangroveLeavesBlock.java:34 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ performBonemeal ตาม implementation ของ MangroveLeavesBlock
ทำงานยังไง
เรียกต่อ: setBlock(), below(), createNewHangingPropagule().
Parameters
ServerLevel serverLevelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
MangroveLeavesBlock instance = ...;
ServerLevel serverLevel = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
instance.performBonemeal(serverLevel, randomSource, blockPos, blockState);
MangrovePropaguleBlock
- Full name:
net.minecraft.world.level.block.MangrovePropaguleBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/MangrovePropaguleBlock.java - Type:
class - Modifiers:
public - Extends:
SaplingBlock - Implements:
SimpleWaterloggedBlock
net.minecraft.world.level.block.MangrovePropaguleBlock#canSurvive(BlockState,LevelReader,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/MangrovePropaguleBlock.java:86 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Survive
ทำงานยังไง
เรียกต่อ: isHanging(), getBlockState(), above(), is(). คืนค่า: isHanging(blockState) ? levelReader.getBlockState(blockPos.above()).is(Blocks.MANGROVE_LEAVES) : super.canSurvive(blockState, levelReader, blockPos).
Parameters
BlockState blockStateLevelReader levelReaderBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
@Override
protected boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) {
return super.canSurvive(blockState, levelReader, blockPos);
}
net.minecraft.world.level.block.MangrovePropaguleBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/MangrovePropaguleBlock.java:45 - Modifiers:
public - Return:
MapCodec<MangrovePropaguleBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ MangrovePropaguleBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.MangrovePropaguleBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/MangrovePropaguleBlock.java:55 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.MangrovePropaguleBlock#createNewHangingPropagule()
- Origin:
common - Source:
net/minecraft/world/level/block/MangrovePropaguleBlock.java:156 - Modifiers:
public static - Return:
BlockState
คืออะไร
สร้าง New Hanging Propagule
ทำงานยังไง
คืนค่า: createNewHangingPropagule(0).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.MangrovePropaguleBlock#createNewHangingPropagule(int)
- Origin:
common - Source:
net/minecraft/world/level/block/MangrovePropaguleBlock.java:160 - Modifiers:
public static - Return:
BlockState
คืออะไร
สร้าง New Hanging Propagule
ทำงานยังไง
เรียกต่อ: defaultBlockState(), setValue(). คืนค่า: Blocks.MANGROVE_PROPAGULE.defaultBlockState().setValue(HANGING, true).setValue(AGE, i).
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.level.block.MangrovePropaguleBlock#getFluidState(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/MangrovePropaguleBlock.java:111 - Modifiers:
protected - Return:
FluidState
คืออะไร
อ่านค่า Fluid State
ทำงานยังไง
เรียกต่อ: getValue(), getSource(). คืนค่า: blockState.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(blockState).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected FluidState getFluidState(BlockState blockState) {
return super.getFluidState(blockState);
}
net.minecraft.world.level.block.MangrovePropaguleBlock#getShape(BlockState,BlockGetter,BlockPos,CollisionContext)
- Origin:
common - Source:
net/minecraft/world/level/block/MangrovePropaguleBlock.java:73 - Modifiers:
protected - Return:
VoxelShape
คืออะไร
อ่านค่า Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getOffset(), getValue(), move(). คืนค่า: voxelShape.move(vec3.x, vec3.y, vec3.z).
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPosCollisionContext collisionContext
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
CollisionContext collisionContext = ...;
@Override
protected VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
return super.getShape(blockState, blockGetter, blockPos, collisionContext);
}
net.minecraft.world.level.block.MangrovePropaguleBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/MangrovePropaguleBlock.java:65 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: getLevel(), getFluidState(), getClickedPos(), getType(), setValue(). คืนค่า: super.getStateForPlacement(blockPlaceContext).setValue(WATERLOGGED, bl).setValue(AGE, 4).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
MangrovePropaguleBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.MangrovePropaguleBlock#isBonemealSuccess(Level,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/MangrovePropaguleBlock.java:134 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Bonemeal Success
ทำงานยังไง
เรียกต่อ: isHanging(), isFullyGrown(). คืนค่า: isHanging(blockState) ? !isFullyGrown(blockState) : super.isBonemealSuccess(level, randomSource, blockPos, blockState).
Parameters
Level levelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
MangrovePropaguleBlock instance = ...;
Level level = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isBonemealSuccess(level, randomSource, blockPos, blockState);
net.minecraft.world.level.block.MangrovePropaguleBlock#isValidBonemealTarget(LevelReader,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/MangrovePropaguleBlock.java:129 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Valid Bonemeal Target
ทำงานยังไง
เรียกต่อ: isHanging(), isFullyGrown(). คืนค่า: !isHanging(blockState) || !isFullyGrown(blockState).
Parameters
LevelReader levelReaderBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
MangrovePropaguleBlock instance = ...;
LevelReader levelReader = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
boolean result = instance.isValidBonemealTarget(levelReader, blockPos, blockState);
net.minecraft.world.level.block.MangrovePropaguleBlock#MangrovePropaguleBlock(TreeGrower,BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/MangrovePropaguleBlock.java:50 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ MangrovePropaguleBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
TreeGrower treeGrowerBlockBehaviour.Properties properties
ตัวอย่างใช้งาน
TreeGrower treeGrower = ...;
BlockBehaviour.Properties properties = ...;
MangrovePropaguleBlock instance = new MangrovePropaguleBlock(treeGrower, properties);
net.minecraft.world.level.block.MangrovePropaguleBlock#mayPlaceOn(BlockState,BlockGetter,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/block/MangrovePropaguleBlock.java:60 - Modifiers:
protected - Return:
boolean
คืออะไร
ดำเนินการ mayPlaceOn ตาม implementation ของ MangrovePropaguleBlock
ทำงานยังไง
เรียกต่อ: is(). คืนค่า: super.mayPlaceOn(blockState, blockGetter, blockPos) || blockState.is(Blocks.CLAY).
Parameters
BlockState blockStateBlockGetter blockGetterBlockPos blockPos
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockGetter blockGetter = ...;
BlockPos blockPos = ...;
@Override
protected boolean mayPlaceOn(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos) {
return super.mayPlaceOn(blockState, blockGetter, blockPos);
}
net.minecraft.world.level.block.MangrovePropaguleBlock#performBonemeal(ServerLevel,RandomSource,BlockPos,BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/MangrovePropaguleBlock.java:139 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ performBonemeal ตาม implementation ของ MangrovePropaguleBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isHanging(), isFullyGrown(), setBlock(), cycle().
Parameters
ServerLevel serverLevelRandomSource randomSourceBlockPos blockPosBlockState blockState
ตัวอย่างใช้งาน
MangrovePropaguleBlock instance = ...;
ServerLevel serverLevel = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
instance.performBonemeal(serverLevel, randomSource, blockPos, blockState);
net.minecraft.world.level.block.MangrovePropaguleBlock#randomTick(BlockState,ServerLevel,BlockPos,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/MangrovePropaguleBlock.java:116 - Modifiers:
protected - Return:
void
คืออะไร
ดำเนินการ randomTick ตาม implementation ของ MangrovePropaguleBlock
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isHanging(), nextInt(), advanceTree(), isFullyGrown(), setBlock(), cycle().
Parameters
BlockState blockStateServerLevel serverLevelBlockPos blockPosRandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
ServerLevel serverLevel = ...;
BlockPos blockPos = ...;
RandomSource randomSource = ...;
@Override
protected void randomTick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) {
super.randomTick(blockState, serverLevel, blockPos, randomSource);
}
net.minecraft.world.level.block.MangrovePropaguleBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/MangrovePropaguleBlock.java:91 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), scheduleTick(), getTickDelay(), canSurvive(), defaultBlockState().
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
MangroveRootsBlock
- Full name:
net.minecraft.world.level.block.MangroveRootsBlock - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/MangroveRootsBlock.java - Type:
class - Modifiers:
public - Extends:
Block - Implements:
SimpleWaterloggedBlock
net.minecraft.world.level.block.MangroveRootsBlock#codec()
- Origin:
common - Source:
net/minecraft/world/level/block/MangroveRootsBlock.java:23 - Modifiers:
public - Return:
MapCodec<MangroveRootsBlock>
คืออะไร
ดำเนินการ codec ตาม implementation ของ MangroveRootsBlock
ทำงานยังไง
คืนค่า: CODEC.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.MangroveRootsBlock#createBlockStateDefinition(StateDefinition.Builder<Block, BlockState>)
- Origin:
common - Source:
net/minecraft/world/level/block/MangroveRootsBlock.java:69 - Modifiers:
protected - Return:
void
คืออะไร
สร้าง Block State Definition
ทำงานยังไง
เรียกต่อ: add().
Parameters
StateDefinition.Builder<Block, BlockState> builder
ตัวอย่างใช้งาน
StateDefinition.Builder<Block, BlockState> builder = ...;
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
}
net.minecraft.world.level.block.MangroveRootsBlock#getFluidState(BlockState)
- Origin:
common - Source:
net/minecraft/world/level/block/MangroveRootsBlock.java:64 - Modifiers:
protected - Return:
FluidState
คืออะไร
อ่านค่า Fluid State
ทำงานยังไง
เรียกต่อ: getValue(), getSource(). คืนค่า: blockState.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(blockState).
Parameters
BlockState blockState
ตัวอย่างใช้งาน
BlockState blockState = ...;
@Override
protected FluidState getFluidState(BlockState blockState) {
return super.getFluidState(blockState);
}
net.minecraft.world.level.block.MangroveRootsBlock#getStateForPlacement(BlockPlaceContext)
- Origin:
common - Source:
net/minecraft/world/level/block/MangroveRootsBlock.java:38 - Modifiers:
public - Return:
BlockState
คืออะไร
อ่านค่า State For Placement
ทำงานยังไง
เรียกต่อ: getLevel(), getFluidState(), getClickedPos(), getType(), setValue(). คืนค่า: super.getStateForPlacement(blockPlaceContext).setValue(WATERLOGGED, bl).
Parameters
BlockPlaceContext blockPlaceContext
ตัวอย่างใช้งาน
MangroveRootsBlock instance = ...;
BlockPlaceContext blockPlaceContext = ...;
BlockState result = instance.getStateForPlacement(blockPlaceContext);
net.minecraft.world.level.block.MangroveRootsBlock#MangroveRootsBlock(BlockBehaviour.Properties)
- Origin:
common - Source:
net/minecraft/world/level/block/MangroveRootsBlock.java:28 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ MangroveRootsBlock ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: registerDefaultState(), any(), setValue().
Parameters
BlockBehaviour.Properties properties
ตัวอย่างใช้งาน
BlockBehaviour.Properties properties = ...;
MangroveRootsBlock instance = new MangroveRootsBlock(properties);
net.minecraft.world.level.block.MangroveRootsBlock#skipRendering(BlockState,BlockState,Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/MangroveRootsBlock.java:33 - Modifiers:
protected - Return:
boolean
คืออะไร
ดำเนินการ skipRendering ตาม implementation ของ MangroveRootsBlock
ทำงานยังไง
เรียกต่อ: is(), getAxis(). คืนค่า: blockState2.is(Blocks.MANGROVE_ROOTS) && direction.getAxis() == Direction.Axis.Y.
Parameters
BlockState blockStateBlockState blockState2Direction direction
ตัวอย่างใช้งาน
BlockState blockState = ...;
BlockState blockState2 = ...;
Direction direction = ...;
@Override
protected boolean skipRendering(BlockState blockState, BlockState blockState2, Direction direction) {
return super.skipRendering(blockState, blockState2, direction);
}
net.minecraft.world.level.block.MangroveRootsBlock#updateShape(BlockState,LevelReader,ScheduledTickAccess,BlockPos,Direction,BlockPos,BlockState,RandomSource)
- Origin:
common - Source:
net/minecraft/world/level/block/MangroveRootsBlock.java:46 - Modifiers:
protected - Return:
BlockState
คืออะไร
อัปเดต Shape
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), scheduleTick(), getTickDelay(). คืนค่า: super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource).
Parameters
BlockState blockStateLevelReader levelReaderScheduledTickAccess scheduledTickAccessBlockPos blockPosDirection directionBlockPos blockPos2BlockState blockState2RandomSource randomSource
ตัวอย่างใช้งาน
BlockState blockState = ...;
LevelReader levelReader = ...;
ScheduledTickAccess scheduledTickAccess = ...;
BlockPos blockPos = ...;
Direction direction = ...;
BlockPos blockPos2 = ...;
BlockState blockState2 = ...;
RandomSource randomSource = ...;
@Override
protected BlockState updateShape(BlockState blockState, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos, Direction direction, BlockPos blockPos2, BlockState blockState2, RandomSource randomSource) {
return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource);
}
Mirror
- Full name:
net.minecraft.world.level.block.Mirror - Package:
net.minecraft.world.level.block - Source:
common—net/minecraft/world/level/block/Mirror.java - Type:
enum - Modifiers:
public - Implements:
StringRepresentable
net.minecraft.world.level.block.Mirror#getRotation(Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/Mirror.java:38 - Modifiers:
public - Return:
Rotation
คืออะไร
อ่านค่า Rotation
ทำงานยังไง
เรียกต่อ: getAxis(). คืนค่า: (this != LEFT_RIGHT || axis != Direction.Axis.Z) && (this != FRONT_BACK || axis != Direction.Axis.X) ? Rotation.NONE : Rotation.CLOCKWISE_180.
Parameters
Direction direction
ตัวอย่างใช้งาน
Mirror instance = ...;
Direction direction = ...;
Rotation result = instance.getRotation(direction);
net.minecraft.world.level.block.Mirror#getSerializedName()
- Origin:
common - Source:
net/minecraft/world/level/block/Mirror.java:59 - Modifiers:
public - Return:
String
คืออะไร
อ่านค่า Serialized Name
ทำงานยังไง
คืนค่า: this.id.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.Mirror#mirror(Direction)
- Origin:
common - Source:
net/minecraft/world/level/block/Mirror.java:43 - Modifiers:
public - Return:
Direction
คืออะไร
ดำเนินการ mirror ตาม implementation ของ Mirror
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getAxis(), getOpposite(). มีจุด return อย่างน้อย 2 จุด.
Parameters
Direction direction
ตัวอย่างใช้งาน
net.minecraft.world.level.block.Mirror#mirror(int,int)
- Origin:
common - Source:
net/minecraft/world/level/block/Mirror.java:25 - Modifiers:
public - Return:
int
คืออะไร
ดำเนินการ mirror ตาม implementation ของ Mirror
ทำงานยังไง
แยกกรณีด้วย switch. มีจุด return อย่างน้อย 3 จุด.
Parameters
int iint j
ตัวอย่างใช้งาน
net.minecraft.world.level.block.Mirror#rotation()
- Origin:
common - Source:
net/minecraft/world/level/block/Mirror.java:51 - Modifiers:
public - Return:
OctahedralGroup
คืออะไร
ดำเนินการ rotation ตาม implementation ของ Mirror
ทำงานยังไง
คืนค่า: this.rotation.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.block.Mirror#symbol()
- Origin:
common - Source:
net/minecraft/world/level/block/Mirror.java:55 - Modifiers:
public - Return:
Component
คืออะไร
ดำเนินการ symbol ตาม implementation ของ Mirror
ทำงานยังไง
คืนค่า: this.symbol.
Parameters
- ไม่มี