类 TntBlock
java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
net.minecraft.world.level.block.TntBlock
- 所有已实现的接口:
FeatureElement
,ItemLike
,IBlockExtension
-
嵌套类概要
从类继承的嵌套类/接口 net.minecraft.world.level.block.Block
Block.ShapePairKey
从类继承的嵌套类/接口 net.minecraft.world.level.block.state.BlockBehaviour
BlockBehaviour.BlockStateBase, BlockBehaviour.OffsetFunction, BlockBehaviour.OffsetType, BlockBehaviour.Properties, BlockBehaviour.StateArgumentPredicate<A>, BlockBehaviour.StatePredicate
-
字段概要
字段从类继承的字段 net.minecraft.world.level.block.Block
BLOCK_STATE_REGISTRY, INDESTRUCTIBLE, INSTANT, stateDefinition, UPDATE_ALL, UPDATE_ALL_IMMEDIATE, UPDATE_CLIENTS, UPDATE_IMMEDIATE, UPDATE_INVISIBLE, UPDATE_KNOWN_SHAPE, UPDATE_LIMIT, UPDATE_MOVE_BY_PISTON, UPDATE_NEIGHBORS, UPDATE_NONE, UPDATE_SKIP_ALL_SIDEEFFECTS, UPDATE_SKIP_BLOCK_ENTITY_SIDEEFFECTS, UPDATE_SKIP_ON_PLACE, UPDATE_SKIP_SHAPE_UPDATE_ON_WIRE, UPDATE_SUPPRESS_DROPS
从类继承的字段 net.minecraft.world.level.block.state.BlockBehaviour
descriptionId, drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDER
从接口继承的字段 net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明com.mojang.serialization.MapCodec
<TntBlock> codec()
protected void
boolean
dropFromExplosion
(Explosion p_57427_) protected void
neighborChanged
(BlockState p_57457_, Level p_57458_, BlockPos p_57459_, Block p_57460_, Orientation p_364510_, boolean p_57462_) boolean
onCaughtFire
(BlockState state, Level world, BlockPos pos, Direction face, LivingEntity igniter) If the block is flammable, this is called when it gets lit on fire.protected void
onPlace
(BlockState p_57466_, Level p_57467_, BlockPos p_57468_, BlockState p_57469_, boolean p_57470_) protected void
onProjectileHit
(Level p_57429_, BlockState p_57430_, BlockHitResult p_57431_, Projectile p_57432_) playerWillDestroy
(Level p_57445_, BlockPos p_57446_, BlockState p_57447_, Player p_57448_) static boolean
已过时。private static boolean
prime
(Level p_394104_, BlockPos p_393490_, LivingEntity p_411047_) protected InteractionResult
useItemOn
(ItemStack p_316149_, BlockState p_316217_, Level p_316520_, BlockPos p_316601_, Player p_316770_, InteractionHand p_316393_, BlockHitResult p_316532_) void
wasExploded
(ServerLevel p_364953_, BlockPos p_57442_, Explosion p_57443_) 从类继承的方法 net.minecraft.world.level.block.Block
animateTick, asBlock, asItem, box, boxes, boxZ, boxZ, boxZ, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, column, column, cube, cube, defaultBlockState, destroy, dropResources, dropResources, dropResources, fallOn, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getShapeForEachState, getShapeForEachState, getSpeedFactor, getStateDefinition, getStateForPlacement, handlePrecipitation, hasDynamicShape, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isShapeFullBlock, playerDestroy, popExperience, popResource, popResourceFromFace, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, shouldRenderFace, spawnDestroyParticles, stateById, stepOn, toString, tryDropExperience, updateEntityMovementAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, withPropertiesOf
从类继承的方法 net.minecraft.world.level.block.state.BlockBehaviour
affectNeighborsAfterRemoval, attack, canBeReplaced, canBeReplaced, canSurvive, defaultDestroyTime, defaultMapColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCloneItemStack, getCollisionShape, getDescriptionId, getDestroyProgress, getDirectSignal, getDrops, getEntityInsideCollisionShape, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getShape, getSignal, getSoundType, getVisualShape, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isPathfindable, isRandomlyTicking, isSignalSource, mirror, onExplosionHit, propagatesSkylightDown, properties, propertiesCodec, randomTick, requiredFeatures, rotate, simpleCodec, skipRendering, spawnAfterBreak, tick, triggerEvent, updateIndirectNeighbourShapes, updateShape, useShapeForLightOcclusion, useWithoutItem
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
从接口继承的方法 net.minecraft.world.flag.FeatureElement
isEnabled
从接口继承的方法 net.neoforged.neoforge.common.extensions.IBlockExtension
addLandingEffects, addRunningEffects, canBeHydrated, canConnectRedstone, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, canSustainPlant, collisionExtendsVertically, getAdjacentBlockPathType, getAppearance, getBeaconColorMultiplier, getBedDirection, getBlockPathType, getBubbleColumnDirection, getCloneItemStack, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFriction, getLightEmission, getMapColor, getPistonPushReaction, getRespawnPosition, getSoundType, getStateAtViewpoint, getToolModifiedState, getWeakChanges, hasDynamicLightEmission, hidesNeighborFace, isBed, isBurning, isConduitFrame, isEmpty, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, makesOpenTrapdoorAboveClimbable, onBlockExploded, onBlockStateChange, onDestroyedByPlayer, onDestroyedByPushReaction, onNeighborChange, onTreeGrow, playFallSound, playStepSound, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay, shouldHideAdjacentFluidFace, supportsExternalFaceHiding
-
字段详细资料
-
CODEC
-
UNSTABLE
-
-
构造器详细资料
-
TntBlock
-
-
方法详细资料
-
codec
-
onPlace
protected void onPlace(BlockState p_57466_, Level p_57467_, BlockPos p_57468_, BlockState p_57469_, boolean p_57470_) - 覆盖:
onPlace
在类中BlockBehaviour
-
neighborChanged
protected void neighborChanged(BlockState p_57457_, Level p_57458_, BlockPos p_57459_, Block p_57460_, @Nullable Orientation p_364510_, boolean p_57462_) - 覆盖:
neighborChanged
在类中BlockBehaviour
-
playerWillDestroy
public BlockState playerWillDestroy(Level p_57445_, BlockPos p_57446_, BlockState p_57447_, Player p_57448_) - 覆盖:
playerWillDestroy
在类中Block
-
wasExploded
- 覆盖:
wasExploded
在类中Block
-
prime
-
prime
@Deprecated private static boolean prime(Level p_394104_, BlockPos p_393490_, @Nullable LivingEntity p_411047_) -
useItemOn
protected InteractionResult useItemOn(ItemStack p_316149_, BlockState p_316217_, Level p_316520_, BlockPos p_316601_, Player p_316770_, InteractionHand p_316393_, BlockHitResult p_316532_) - 覆盖:
useItemOn
在类中BlockBehaviour
-
onProjectileHit
protected void onProjectileHit(Level p_57429_, BlockState p_57430_, BlockHitResult p_57431_, Projectile p_57432_) - 覆盖:
onProjectileHit
在类中BlockBehaviour
-
dropFromExplosion
- 覆盖:
dropFromExplosion
在类中Block
-
createBlockStateDefinition
- 覆盖:
createBlockStateDefinition
在类中Block
-
onCaughtFire
public boolean onCaughtFire(BlockState state, Level world, BlockPos pos, @Nullable Direction face, @Nullable LivingEntity igniter) 从接口复制的说明:IBlockExtension
If the block is flammable, this is called when it gets lit on fire.The return value determines whether a flint-and-steel in a dispenser was used successfully and should be damaged
- 参数:
state
- The current stateworld
- The current levelpos
- Block position in levelface
- The direction that the fire is coming fromigniter
- The entity that lit the fire- 返回:
- whether the block was successfully set on fire (i.e. TNT is allowed to explode and was primed)
-
IBlockStateExtension.onCaughtFire(Level,BlockPos,net.minecraft.core.Direction,LivingEntity)
instead