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.ShapePairKey
Nested 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 final boolean
private final boolean
private final boolean
static final com.mojang.serialization.MapCodec
<MultifaceBlock> protected static final Direction[]
private static final Map
<Direction, BooleanProperty> private final Function
<BlockState, VoxelShape> static final BooleanProperty
Fields 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_ALL_SIDEEFFECTS, UPDATE_SKIP_BLOCK_ENTITY_SIDEEFFECTS, UPDATE_SKIP_ON_PLACE, UPDATE_SKIP_SHAPE_UPDATE_ON_WIRE, UPDATE_SUPPRESS_DROPS
Fields inherited from class net.minecraft.world.level.block.state.BlockBehaviour
descriptionId, drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDER
Fields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionavailableFaces
(BlockState p_221585_) static boolean
canAttachTo
(BlockGetter p_383192_, BlockPos p_383013_, Direction p_383221_) static boolean
canAttachTo
(BlockGetter p_153830_, Direction p_153831_, BlockPos p_153832_, BlockState p_153833_) protected boolean
canBeReplaced
(BlockState p_153848_, BlockPlaceContext p_153849_) protected boolean
canSurvive
(BlockState p_153888_, LevelReader p_153889_, BlockPos p_153890_) protected com.mojang.serialization.MapCodec
<? extends MultifaceBlock> codec()
protected void
private static BlockState
getDefaultMultifaceState
(StateDefinition<Block, BlockState> p_153919_) static BooleanProperty
getFaceProperty
(Direction p_153934_) protected FluidState
getFluidState
(BlockState p_389529_) protected VoxelShape
getShape
(BlockState p_153851_, BlockGetter p_153852_, BlockPos p_153853_, CollisionContext p_153854_) getStateForPlacement
(BlockPlaceContext p_153824_) getStateForPlacement
(BlockState p_153941_, BlockGetter p_153942_, BlockPos p_153943_, Direction p_153944_) protected static boolean
hasAnyFace
(BlockState p_153961_) private static boolean
hasAnyVacantFace
(BlockState p_153963_) static boolean
hasFace
(BlockState p_153901_, Direction p_153902_) protected boolean
isFaceSupported
(Direction p_153921_) boolean
isValidStateForPlacement
(BlockGetter p_221572_, BlockState p_221573_, BlockPos p_221574_, Direction p_221575_) private Function
<BlockState, VoxelShape> private BlockState
mapDirections
(BlockState p_153911_, Function<Direction, Direction> p_153912_) protected BlockState
mirror
(BlockState p_153892_, Mirror p_153893_) static byte
pack
(Collection<Direction> p_221577_) private static BlockState
removeFace
(BlockState p_153898_, BooleanProperty p_153899_) protected BlockState
rotate
(BlockState p_153895_, Rotation p_153896_) unpack
(byte p_221570_) 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_) Methods inherited from class net.minecraft.world.level.block.Block
animateTick, asBlock, asItem, box, boxes, boxZ, boxZ, boxZ, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, column, column, cube, cube, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, fallOn, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getShapeForEachState, 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, withPropertiesOf
Methods inherited from class net.minecraft.world.level.block.state.BlockBehaviour
affectNeighborsAfterRemoval, 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, propagatesSkylightDown, properties, propertiesCodec, randomTick, requiredFeatures, simpleCodec, skipRendering, spawnAfterBreak, tick, triggerEvent, updateIndirectNeighbourShapes, useItemOn, useShapeForLightOcclusion, useWithoutItem
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabled
Methods 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, playFallSound, playStepSound, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay, shouldHideAdjacentFluidFace, supportsExternalFaceHiding
Methods inherited from interface net.neoforged.neoforge.common.extensions.IBucketPickupExtension
getPickupSound
Methods inherited from interface net.minecraft.world.level.block.SimpleWaterloggedBlock
canPlaceLiquid, getPickupSound, pickupBlock, placeLiquid
-
Field Details
-
CODEC
-
WATERLOGGED
-
PROPERTY_BY_DIRECTION
-
DIRECTIONS
-
shapes
-
canRotate
private final boolean canRotate -
canMirrorX
private final boolean canMirrorX -
canMirrorZ
private final boolean canMirrorZ
-
-
Constructor Details
-
MultifaceBlock
-
-
Method Details
-
codec
-
makeShapes
-
availableFaces
-
unpack
-
pack
-
isFaceSupported
-
createBlockStateDefinition
- Overrides:
createBlockStateDefinition
in 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:
updateShape
in classBlockBehaviour
-
getFluidState
- Overrides:
getFluidState
in classBlockBehaviour
-
getShape
protected VoxelShape getShape(BlockState p_153851_, BlockGetter p_153852_, BlockPos p_153853_, CollisionContext p_153854_) - Overrides:
getShape
in classBlockBehaviour
-
canSurvive
- Overrides:
canSurvive
in classBlockBehaviour
-
canBeReplaced
- Overrides:
canBeReplaced
in classBlockBehaviour
-
getStateForPlacement
- Overrides:
getStateForPlacement
in classBlock
-
isValidStateForPlacement
public boolean isValidStateForPlacement(BlockGetter p_221572_, BlockState p_221573_, BlockPos p_221574_, Direction p_221575_) -
getStateForPlacement
@Nullable public BlockState getStateForPlacement(BlockState p_153941_, BlockGetter p_153942_, BlockPos p_153943_, Direction p_153944_) -
rotate
- Overrides:
rotate
in classBlockBehaviour
-
mirror
- Overrides:
mirror
in classBlockBehaviour
-
mapDirections
-
hasFace
-
canAttachTo
-
canAttachTo
public static boolean canAttachTo(BlockGetter p_153830_, Direction p_153831_, BlockPos p_153832_, BlockState p_153833_) -
removeFace
-
getFaceProperty
-
getDefaultMultifaceState
-
hasAnyFace
-
hasAnyVacantFace
-