Package net.minecraft.world.level.block
Class MultifaceBlock
java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
net.minecraft.world.level.block.MultifaceBlock
- All Implemented Interfaces:
FeatureElement,BucketPickup,LiquidBlockContainer,SimpleWaterloggedBlock,ItemLike,IBlockExtension,IBucketPickupExtension
- Direct Known Subclasses:
MultifaceSpreadeableBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.Block
Block.ShapePairKeyNested classes/interfaces inherited from class net.minecraft.world.level.block.state.BlockBehaviour
BlockBehaviour.BlockStateBase, BlockBehaviour.OffsetFunction, BlockBehaviour.OffsetType, BlockBehaviour.Properties, BlockBehaviour.StateArgumentPredicate<A>, BlockBehaviour.StatePredicate -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final floatprivate final booleanprivate final booleanprivate final booleanstatic final com.mojang.serialization.MapCodec<MultifaceBlock> protected static final Direction[]private static final VoxelShapeprivate static final VoxelShapeprivate static final VoxelShapeprivate static final Map<Direction, BooleanProperty> private static final Map<Direction, VoxelShape> private final ImmutableMap<BlockState, VoxelShape> private static final VoxelShapeprivate static final VoxelShapestatic final BooleanPropertyprivate static final VoxelShapeFields inherited from class 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_SHAPE_UPDATE_ON_WIRE, UPDATE_SUPPRESS_DROPSFields inherited from class net.minecraft.world.level.block.state.BlockBehaviour
descriptionId, drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDERFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionavailableFaces(BlockState pState) private static VoxelShapecalculateMultifaceShape(BlockState pState) static booleancanAttachTo(BlockGetter pLevel, BlockPos pPos, Direction pDirection) static booleancanAttachTo(BlockGetter pLevel, Direction pDirection, BlockPos pPos, BlockState pState) protected booleancanBeReplaced(BlockState p_153848_, BlockPlaceContext p_153849_) protected booleancanSurvive(BlockState p_153888_, LevelReader p_153889_, BlockPos p_153890_) protected com.mojang.serialization.MapCodec<? extends MultifaceBlock> codec()protected voidprivate static BlockStategetDefaultMultifaceState(StateDefinition<Block, BlockState> pStateDefinition) static BooleanPropertygetFaceProperty(Direction pDirection) protected FluidStategetFluidState(BlockState p_389529_) protected VoxelShapegetShape(BlockState p_153851_, BlockGetter p_153852_, BlockPos p_153853_, CollisionContext p_153854_) getStateForPlacement(BlockPlaceContext p_153824_) getStateForPlacement(BlockState pCurrentState, BlockGetter pLevel, BlockPos pPos, Direction pLookingDirection) protected static booleanhasAnyFace(BlockState pState) private static booleanhasAnyVacantFace(BlockState pState) static booleanhasFace(BlockState pState, Direction pDirection) protected booleanisFaceSupported(Direction pFace) booleanisValidStateForPlacement(BlockGetter pLevel, BlockState pState, BlockPos pPos, Direction pDirection) private BlockStatemapDirections(BlockState pState, Function<Direction, Direction> pDirectionalFunction) protected BlockStatemirror(BlockState p_153892_, Mirror p_153893_) Returns the blockstate with the given mirror of the passed blockstate.static bytepack(Collection<Direction> pDirections) private static BlockStateremoveFace(BlockState pState, BooleanProperty pFaceProp) protected BlockStaterotate(BlockState p_153895_, Rotation p_153896_) Returns the blockstate with the given rotation from the passed blockstate.unpack(byte pPackedDirections) protected BlockStateupdateShape(BlockState p_153904_, LevelReader p_374463_, ScheduledTickAccess p_374073_, BlockPos p_153908_, Direction p_153905_, BlockPos p_153909_, BlockState p_153906_, RandomSource p_374390_) Methods inherited from class net.minecraft.world.level.block.Block
animateTick, appendHoverText, asBlock, asItem, box, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, fallOn, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getShapeForEachState, getSpeedFactor, getStateDefinition, handlePrecipitation, hasDynamicShape, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isShapeFullBlock, playerDestroy, playerWillDestroy, popExperience, popResource, popResourceFromFace, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, shouldRenderFace, spawnDestroyParticles, stateById, stepOn, toString, tryDropExperience, updateEntityMovementAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOfMethods inherited from class net.minecraft.world.level.block.state.BlockBehaviour
attack, canBeReplaced, defaultDestroyTime, defaultMapColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCloneItemStack, getCollisionShape, getDescriptionId, getDestroyProgress, getDirectSignal, getDrops, getEntityInsideCollisionShape, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getSignal, getSoundType, getVisualShape, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isPathfindable, isRandomlyTicking, isSignalSource, neighborChanged, onExplosionHit, onPlace, onProjectileHit, onRemove, propagatesSkylightDown, properties, propertiesCodec, randomTick, requiredFeatures, simpleCodec, skipRendering, spawnAfterBreak, tick, triggerEvent, updateIndirectNeighbourShapes, useItemOn, useShapeForLightOcclusion, useWithoutItemMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabledMethods inherited from interface 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, onCaughtFire, onDestroyedByPlayer, onDestroyedByPushReaction, onNeighborChange, onTreeGrow, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay, shouldHideAdjacentFluidFace, supportsExternalFaceHidingMethods inherited from interface net.neoforged.neoforge.common.extensions.IBucketPickupExtension
getPickupSoundMethods inherited from interface net.minecraft.world.level.block.SimpleWaterloggedBlock
canPlaceLiquid, getPickupSound, pickupBlock, placeLiquid
-
Field Details
-
CODEC
-
WATERLOGGED
-
AABB_OFFSET
private static final float AABB_OFFSET- See Also:
-
UP_AABB
-
DOWN_AABB
-
WEST_AABB
-
EAST_AABB
-
NORTH_AABB
-
SOUTH_AABB
-
PROPERTY_BY_DIRECTION
-
SHAPE_BY_DIRECTION
-
DIRECTIONS
-
shapesCache
-
canRotate
private final boolean canRotate -
canMirrorX
private final boolean canMirrorX -
canMirrorZ
private final boolean canMirrorZ
-
-
Constructor Details
-
MultifaceBlock
-
-
Method Details
-
codec
-
availableFaces
-
unpack
-
pack
-
isFaceSupported
-
createBlockStateDefinition
- Overrides:
createBlockStateDefinitionin classBlock
-
updateShape
protected BlockState updateShape(BlockState p_153904_, LevelReader p_374463_, ScheduledTickAccess p_374073_, BlockPos p_153908_, Direction p_153905_, BlockPos p_153909_, BlockState p_153906_, RandomSource p_374390_) - Overrides:
updateShapein classBlockBehaviour
-
getFluidState
- Overrides:
getFluidStatein classBlockBehaviour
-
getShape
protected VoxelShape getShape(BlockState p_153851_, BlockGetter p_153852_, BlockPos p_153853_, CollisionContext p_153854_) - Overrides:
getShapein classBlockBehaviour
-
canSurvive
- Overrides:
canSurvivein classBlockBehaviour
-
canBeReplaced
- Overrides:
canBeReplacedin classBlockBehaviour
-
getStateForPlacement
- Overrides:
getStateForPlacementin classBlock
-
isValidStateForPlacement
public boolean isValidStateForPlacement(BlockGetter pLevel, BlockState pState, BlockPos pPos, Direction pDirection) -
getStateForPlacement
@Nullable public BlockState getStateForPlacement(BlockState pCurrentState, BlockGetter pLevel, BlockPos pPos, Direction pLookingDirection) -
rotate
Description copied from class:BlockBehaviourReturns the blockstate with the given rotation from the passed blockstate. If inapplicable, returns the passed blockstate.- Overrides:
rotatein classBlockBehaviour
-
mirror
Description copied from class:BlockBehaviourReturns the blockstate with the given mirror of the passed blockstate. If inapplicable, returns the passed blockstate.- Overrides:
mirrorin classBlockBehaviour
-
mapDirections
private BlockState mapDirections(BlockState pState, Function<Direction, Direction> pDirectionalFunction) -
hasFace
-
canAttachTo
-
canAttachTo
public static boolean canAttachTo(BlockGetter pLevel, Direction pDirection, BlockPos pPos, BlockState pState) -
removeFace
-
getFaceProperty
-
getDefaultMultifaceState
private static BlockState getDefaultMultifaceState(StateDefinition<Block, BlockState> pStateDefinition) -
calculateMultifaceShape
-
hasAnyFace
-
hasAnyVacantFace
-