Class BarrierBlock
- All Implemented Interfaces:
- FluidDrainable,- FluidFillable,- Waterloggable,- ItemConvertible,- ToggleableFeature
- Mappings:
- Namespace - Name - official - cvx- intermediary - net/minecraft/class_2213- named - net/minecraft/block/BarrierBlock
- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraft.block.BlockBlock.NeighborGroupNested classes/interfaces inherited from class net.minecraft.block.AbstractBlockAbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.Offsetter, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<BarrierBlock>static final BooleanPropertyFields inherited from class net.minecraft.block.Blockfield_31023, field_31024, field_31025, field_31035, FORCE_STATE, MOVED, NO_REDRAW, NOTIFY_ALL, NOTIFY_ALL_AND_REDRAW, NOTIFY_LISTENERS, NOTIFY_NEIGHBORS, REDRAW_ON_MAIN_THREAD, SKIP_DROPS, STATE_IDS, stateManagerFields inherited from class net.minecraft.block.AbstractBlockcollidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableId, randomTicks, requiredFeatures, resistance, settings, slipperiness, soundGroup, velocityMultiplierFields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeatureFEATURE_ENABLED_REGISTRY_KEYS
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidappendProperties(StateManager.Builder<Block, BlockState> builder) Appends block state properties to this block.booleancanFillWithFluid(@Nullable PlayerEntity player, BlockView world, BlockPos pos, BlockState state, Fluid fluid) floatgetAmbientOcclusionLightLevel(BlockState state, BlockView world, BlockPos pos) com.mojang.serialization.MapCodec<BarrierBlock>getCodec()getFluidState(BlockState state) Returns the state's associated fluid state.getRenderType(BlockState state) Returns the block's render type (invisible, animated, model).getStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) Returns the state of the block after a neighboring block's state change.booleanisTransparent(BlockState state, BlockView world, BlockPos pos) tryDrainFluid(@Nullable PlayerEntity player, WorldAccess world, BlockPos pos, BlockState state) Methods inherited from class net.minecraft.block.BlockafterBreak, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropExperienceWhenMined, dropStack, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getRawIdFromState, getRegistryEntry, getShapesForStates, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getStateWithProperties, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, isFaceFullSquare, isShapeFullCube, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, spawnBreakParticles, toStringMethods inherited from class net.minecraft.block.AbstractBlockcalcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canPlaceAt, canReplace, createCodec, createScreenHandlerFactory, createSettingsCodec, emitsRedstonePower, getCameraCollisionShape, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getHardness, getLootTableId, getMaxHorizontalModelOffset, getOpacity, getOutlineShape, getRaycastShape, getRenderingSeed, getRequiredFeatures, getSettings, getSidesShape, getStrongRedstonePower, getVerticalModelOffsetMultiplier, getWeakRedstonePower, hasComparatorOutput, hasSidedTransparency, isCullingShapeFullCube, isShapeFullCube, isSideInvisible, mirror, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onExploded, onProjectileHit, onStacksDropped, onStateReplaced, onSyncedBlockEvent, onUse, prepare, randomTick, rotate, scheduledTickMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeatureisEnabledMethods inherited from interface net.minecraft.block.WaterloggablegetBucketFillSound, tryFillWithFluid
- 
Field Details- 
CODEC- Mappings:
- Namespace - Name - Mixin selector - official - a- Lcvx;a:Lcom/mojang/serialization/MapCodec;- intermediary - field_46266- Lnet/minecraft/class_2213;field_46266:Lcom/mojang/serialization/MapCodec;- named - CODEC- Lnet/minecraft/block/BarrierBlock;CODEC:Lcom/mojang/serialization/MapCodec;
 
- 
WATERLOGGED- Mappings:
- Namespace - Name - Mixin selector - official - b- Lcvx;b:Ldjy;- intermediary - field_45144- Lnet/minecraft/class_2213;field_45144:Lnet/minecraft/class_2746;- named - WATERLOGGED- Lnet/minecraft/block/BarrierBlock;WATERLOGGED:Lnet/minecraft/state/property/BooleanProperty;
 
 
- 
- 
Constructor Details- 
BarrierBlock- Mappings:
- Namespace - Name - Mixin selector - official - <init>- Ldjg;<init>(Ldjg$d;)V- intermediary - <init>- Lnet/minecraft/class_4970;<init>(Lnet/minecraft/class_4970$class_2251;)V- named - <init>- Lnet/minecraft/block/AbstractBlock;<init>(Lnet/minecraft/block/AbstractBlock$Settings;)V
 
 
- 
- 
Method Details- 
getCodec- Overrides:
- getCodecin class- Block
- Mappings:
- Namespace - Name - Mixin selector - official - a- Ldjg;a()Lcom/mojang/serialization/MapCodec;- intermediary - method_53969- Lnet/minecraft/class_4970;method_53969()Lcom/mojang/serialization/MapCodec;- named - getCodec- Lnet/minecraft/block/AbstractBlock;getCodec()Lcom/mojang/serialization/MapCodec;
 
- 
isTransparent- Overrides:
- isTransparentin class- Block
- Mappings:
- Namespace - Name - Mixin selector - official - a_- Lcwq;a_(Ldjh;Lcsv;Lhx;)Z- intermediary - method_9579- Lnet/minecraft/class_2248;method_9579(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)Z- named - isTransparent- Lnet/minecraft/block/Block;isTransparent(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)Z
 
- 
getRenderTypeReturns the block's render type (invisible, animated, model).- Overrides:
- getRenderTypein class- AbstractBlock
- Returns:
- the block's render type (invisible, animated, model)
- Mappings:
- Namespace - Name - Mixin selector - official - b_- Ldjg;b_(Ldjh;)Ldcv;- intermediary - method_9604- Lnet/minecraft/class_4970;method_9604(Lnet/minecraft/class_2680;)Lnet/minecraft/class_2464;- named - getRenderType- Lnet/minecraft/block/AbstractBlock;getRenderType(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/BlockRenderType;
 
- 
getAmbientOcclusionLightLevel- Overrides:
- getAmbientOcclusionLightLevelin class- AbstractBlock
- Mappings:
- Namespace - Name - Mixin selector - official - d- Ldjg;d(Ldjh;Lcsv;Lhx;)F- intermediary - method_9575- Lnet/minecraft/class_4970;method_9575(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)F- named - getAmbientOcclusionLightLevel- Lnet/minecraft/block/AbstractBlock;getAmbientOcclusionLightLevel(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)F
 
- 
getStateForNeighborUpdatepublic BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) Returns the state of the block after a neighboring block's state change.Returning Blocks.AIRbreaks the block. This is useful to implement supporting block requirement for blocks (if used along withAbstractBlock.canPlaceAt(net.minecraft.block.BlockState, net.minecraft.world.WorldView, net.minecraft.util.math.BlockPos)).Side effects like activating a redstone component (but not scheduling a tick) should be performed in AbstractBlock.neighborUpdate(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.block.Block, net.minecraft.util.math.BlockPos, boolean)instead. If the block supports waterlogging and currently has water, this method should be overridden to tick the fluid at the block's position.This method is called on both the logical client and logical server, so take caution when overriding this method. The logical side can be checked using World.isClient. This is not called ifBlock.FORCE_STATEflag is set in thesetBlockStatecall.This method can be used for multiple purposes. Here are some examples: - FenceBlockuses it to update the fence's connection when a horizontally neighboring block's state is changed.
- PlantBlockuses it to break the plant if the state change causes it to lose its supporting block.
- DoorBlockuses it to copy the state of the other half of the door.
- SlabBlockuses it to schedule the fluid to tick if waterlogged.
- SoulSandBlockuses it to schedule the water block above to tick so that it becomes a bubble column.
- FallingBlockuses it to schedule the block to tick so that it can fall if needed.
 - Overrides:
- getStateForNeighborUpdatein class- AbstractBlock
- Parameters:
- state- the state of this block
- direction- the direction from this block to the neighbor
- neighborState- the state of the updated neighbor block
- world- the world
- pos- the position of this block
- neighborPos- the position of the neighbor block
- Returns:
- the state of the block after a neighboring block's state change
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - a- Ldjg;a(Ldjh;Lic;Ldjh;Lctq;Lhx;Lhx;)Ldjh;- intermediary - method_9559- Lnet/minecraft/class_4970;method_9559(Lnet/minecraft/class_2680;Lnet/minecraft/class_2350;Lnet/minecraft/class_2680;Lnet/minecraft/class_1936;Lnet/minecraft/class_2338;Lnet/minecraft/class_2338;)Lnet/minecraft/class_2680;- named - getStateForNeighborUpdate- Lnet/minecraft/block/AbstractBlock;getStateForNeighborUpdate(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Direction;Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldAccess;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/BlockState;
 
- 
getFluidStateReturns the state's associated fluid state.Waterloggable blocks must override this to return Fluids.WATER.getStill(false)when waterlogged.- Overrides:
- getFluidStatein class- AbstractBlock
- Returns:
- the state's associated fluid state
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - c_- Ldjg;c_(Ldjh;)Leer;- intermediary - method_9545- Lnet/minecraft/class_4970;method_9545(Lnet/minecraft/class_2680;)Lnet/minecraft/class_3610;- named - getFluidState- Lnet/minecraft/block/AbstractBlock;getFluidState(Lnet/minecraft/block/BlockState;)Lnet/minecraft/fluid/FluidState;
 
- 
getPlacementState- Overrides:
- getPlacementStatein class- Block
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lcwq;a(Lcph;)Ldjh;- intermediary - method_9605- Lnet/minecraft/class_2248;method_9605(Lnet/minecraft/class_1750;)Lnet/minecraft/class_2680;- named - getPlacementState- Lnet/minecraft/block/Block;getPlacementState(Lnet/minecraft/item/ItemPlacementContext;)Lnet/minecraft/block/BlockState;
 
- 
appendPropertiesAppends block state properties to this block. To use this, override and callStateManager.Builder.add(net.minecraft.state.property.Property<?>[])inside the method. SeePropertiesfor the list of pre-defined properties.- Overrides:
- appendPropertiesin class- Block
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lcwq;a(Ldji$a;)V- intermediary - method_9515- Lnet/minecraft/class_2248;method_9515(Lnet/minecraft/class_2689$class_2690;)V- named - appendProperties- Lnet/minecraft/block/Block;appendProperties(Lnet/minecraft/state/StateManager$Builder;)V
 
- 
tryDrainFluidpublic ItemStack tryDrainFluid(@Nullable @Nullable PlayerEntity player, WorldAccess world, BlockPos pos, BlockState state) - Specified by:
- tryDrainFluidin interface- FluidDrainable
- Specified by:
- tryDrainFluidin interface- Waterloggable
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lcwx;a(Lcfi;Lctq;Lhx;Ldjh;)Lcmy;- intermediary - method_9700- Lnet/minecraft/class_2263;method_9700(Lnet/minecraft/class_1657;Lnet/minecraft/class_1936;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Lnet/minecraft/class_1799;- named - tryDrainFluid- Lnet/minecraft/block/FluidDrainable;tryDrainFluid(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/world/WorldAccess;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
 
- 
canFillWithFluidpublic boolean canFillWithFluid(@Nullable @Nullable PlayerEntity player, BlockView world, BlockPos pos, BlockState state, Fluid fluid) - Specified by:
- canFillWithFluidin interface- FluidFillable
- Specified by:
- canFillWithFluidin interface- Waterloggable
- Mappings:
- Namespace - Name - Mixin selector - official - a- Ldbg;a(Lcfi;Lcsv;Lhx;Ldjh;Leeq;)Z- intermediary - method_10310- Lnet/minecraft/class_2402;method_10310(Lnet/minecraft/class_1657;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_3611;)Z- named - canFillWithFluid- Lnet/minecraft/block/FluidFillable;canFillWithFluid(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/fluid/Fluid;)Z
 
 
-