Class FenceGateBlock
- All Implemented Interfaces:
ItemConvertible,ToggleableFeature
- Mappings:
Namespace Name named net/minecraft/block/FenceGateBlockintermediary net/minecraft/class_2349official dqp
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.Offsetter, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Map<Direction.Axis, VoxelShape> private static final Map<Direction.Axis, VoxelShape> static final com.mojang.serialization.MapCodec<FenceGateBlock> static final BooleanPropertyprivate static final Map<Direction.Axis, VoxelShape> private static final Map<Direction.Axis, VoxelShape> static final BooleanPropertystatic final BooleanPropertyprivate static final Map<Direction.Axis, VoxelShape> private static final Map<Direction.Axis, VoxelShape> private final WoodTypeFields inherited from class net.minecraft.block.HorizontalFacingBlock
FACINGFields inherited from class net.minecraft.block.Block
field_31023, field_31024, field_31025, FORCE_STATE, FORCE_STATE_AND_SKIP_CALLBACKS_AND_DROPS, MOVED, NO_REDRAW, NOTIFY_ALL, NOTIFY_ALL_AND_REDRAW, NOTIFY_LISTENERS, NOTIFY_NEIGHBORS, REDRAW_ON_MAIN_THREAD, SKIP_BLOCK_ADDED_CALLBACK, SKIP_BLOCK_ENTITY_REPLACED_CALLBACK, SKIP_DROPS, SKIP_REDRAW_AND_BLOCK_ENTITY_REPLACED_CALLBACK, SKIP_REDSTONE_WIRE_STATE_REPLACEMENT, STATE_IDS, stateManagerFields inherited from class net.minecraft.block.AbstractBlock
collidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableKey, randomTicks, requiredFeatures, resistance, settings, slipperiness, soundGroup, translationKey, velocityMultiplierFields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
FEATURE_ENABLED_REGISTRY_KEYS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendProperties(StateManager.Builder<Block, BlockState> builder) Appends block state properties to this block.protected booleancanPathfindThrough(BlockState state, NavigationType type) Returns if an entity using navigation typetypecan navigate through this block.static booleancanWallConnect(BlockState state, Direction side) com.mojang.serialization.MapCodec<FenceGateBlock> getCodec()protected VoxelShapegetCollisionShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) protected VoxelShapegetCullingShape(BlockState state) protected VoxelShapegetOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) protected VoxelShapegetSidesShape(BlockState state, BlockView world, BlockPos pos) protected BlockStategetStateForNeighborUpdate(BlockState state, WorldView world, ScheduledTickView tickView, BlockPos pos, Direction direction, BlockPos neighborPos, BlockState neighborState, Random random) Returns the state of the block after a neighboring block's state change.private booleanisWall(BlockState state) protected voidneighborUpdate(BlockState state, World world, BlockPos pos, Block sourceBlock, @Nullable WireOrientation wireOrientation, boolean notify) Called when a neighboring block is updated.protected voidonExploded(BlockState state, ServerWorld world, BlockPos pos, Explosion explosion, BiConsumer<ItemStack, BlockPos> stackMerger) protected ActionResultonUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) Methods inherited from class net.minecraft.block.HorizontalFacingBlock
mirror, rotateMethods inherited from class net.minecraft.block.Block
afterBreak, asBlock, asItem, canMobSpawnInside, cannotConnect, createColumnShape, createColumnShape, createCubeShape, createCuboidShape, createCuboidShape, createCuboidZShape, createCuboidZShape, createCuboidZShape, createShapeArray, createShapeFunction, createShapeFunction, dropExperience, dropExperienceWhenMined, dropStack, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getRawIdFromState, getRegistryEntry, getSlipperiness, getStateFromRawId, getStateManager, getStateWithProperties, getVelocityMultiplier, hasDynamicBounds, 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.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPlaceAt, canReplace, createCodec, createScreenHandlerFactory, createSettingsCodec, emitsRedstonePower, getAmbientOcclusionLightLevel, getCameraCollisionShape, getComparatorOutput, getDefaultMapColor, getDroppedStacks, getFluidState, getHardness, getInsideCollisionShape, getLootTableKey, getMaxHorizontalModelOffset, getOpacity, getPickStack, getRaycastShape, getRenderingSeed, getRenderType, getRequiredFeatures, getSettings, getSoundGroup, getStrongRedstonePower, getTranslationKey, getVerticalModelOffsetMultiplier, getWeakRedstonePower, hasComparatorOutput, hasRandomTicks, hasSidedTransparency, isShapeFullCube, isSideInvisible, isTransparent, onBlockAdded, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onStateReplaced, onSyncedBlockEvent, onUseWithItem, prepare, randomTick, scheduledTickMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
isEnabled
-
Field Details
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/block/FenceGateBlock;CODEC:Lcom/mojang/serialization/MapCodec;intermediary field_46351Lnet/minecraft/class_2349;field_46351:Lcom/mojang/serialization/MapCodec;official aLdqp;a:Lcom/mojang/serialization/MapCodec;
-
OPEN
- Mappings:
Namespace Name Mixin selector named OPENLnet/minecraft/block/FenceGateBlock;OPEN:Lnet/minecraft/state/property/BooleanProperty;intermediary field_11026Lnet/minecraft/class_2349;field_11026:Lnet/minecraft/class_2746;official bLdqp;b:Lech;
-
POWERED
- Mappings:
Namespace Name Mixin selector named POWEREDLnet/minecraft/block/FenceGateBlock;POWERED:Lnet/minecraft/state/property/BooleanProperty;intermediary field_11021Lnet/minecraft/class_2349;field_11021:Lnet/minecraft/class_2746;official cLdqp;c:Lech;
-
IN_WALL
- Mappings:
Namespace Name Mixin selector named IN_WALLLnet/minecraft/block/FenceGateBlock;IN_WALL:Lnet/minecraft/state/property/BooleanProperty;intermediary field_11024Lnet/minecraft/class_2349;field_11024:Lnet/minecraft/class_2746;official dLdqp;d:Lech;
-
REGULAR_OUTLINE_SHAPES
- Mappings:
Namespace Name Mixin selector named REGULAR_OUTLINE_SHAPESLnet/minecraft/block/FenceGateBlock;REGULAR_OUTLINE_SHAPES:Ljava/util/Map;intermediary field_55756Lnet/minecraft/class_2349;field_55756:Ljava/util/Map;official fLdqp;f:Ljava/util/Map;
-
IN_WALL_OUTLINE_SHAPES
- Mappings:
Namespace Name Mixin selector named IN_WALL_OUTLINE_SHAPESLnet/minecraft/block/FenceGateBlock;IN_WALL_OUTLINE_SHAPES:Ljava/util/Map;intermediary field_55757Lnet/minecraft/class_2349;field_55757:Ljava/util/Map;official gLdqp;g:Ljava/util/Map;
-
CLOSED_COLLISION_SHAPES
- Mappings:
Namespace Name Mixin selector named CLOSED_COLLISION_SHAPESLnet/minecraft/block/FenceGateBlock;CLOSED_COLLISION_SHAPES:Ljava/util/Map;intermediary field_55758Lnet/minecraft/class_2349;field_55758:Ljava/util/Map;official hLdqp;h:Ljava/util/Map;
-
CLOSED_SIDES_SHAPES
- Mappings:
Namespace Name Mixin selector named CLOSED_SIDES_SHAPESLnet/minecraft/block/FenceGateBlock;CLOSED_SIDES_SHAPES:Ljava/util/Map;intermediary field_55759Lnet/minecraft/class_2349;field_55759:Ljava/util/Map;official iLdqp;i:Ljava/util/Map;
-
REGULAR_CULLING_SHAPES
- Mappings:
Namespace Name Mixin selector named REGULAR_CULLING_SHAPESLnet/minecraft/block/FenceGateBlock;REGULAR_CULLING_SHAPES:Ljava/util/Map;intermediary field_55754Lnet/minecraft/class_2349;field_55754:Ljava/util/Map;official DLdqp;D:Ljava/util/Map;
-
IN_WALL_CULLING_SHAPES
- Mappings:
Namespace Name Mixin selector named IN_WALL_CULLING_SHAPESLnet/minecraft/block/FenceGateBlock;IN_WALL_CULLING_SHAPES:Ljava/util/Map;intermediary field_55755Lnet/minecraft/class_2349;field_55755:Ljava/util/Map;official RLdqp;R:Ljava/util/Map;
-
type
- Mappings:
Namespace Name Mixin selector named typeLnet/minecraft/block/FenceGateBlock;type:Lnet/minecraft/block/WoodType;intermediary field_42758Lnet/minecraft/class_2349;field_42758:Lnet/minecraft/class_4719;official SLdqp;S:Lede;
-
-
Constructor Details
-
FenceGateBlock
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/block/FenceGateBlock;<init>(Lnet/minecraft/block/WoodType;Lnet/minecraft/block/AbstractBlock$Settings;)Vintermediary <init>Lnet/minecraft/class_2349;<init>(Lnet/minecraft/class_4719;Lnet/minecraft/class_4970$class_2251;)Vofficial <init>Ldqp;<init>(Lede;Lebp$d;)V
-
-
Method Details
-
getCodec
- Specified by:
getCodecin classHorizontalFacingBlock- Mappings:
Namespace Name Mixin selector named getCodecLnet/minecraft/block/AbstractBlock;getCodec()Lcom/mojang/serialization/MapCodec;intermediary method_53969Lnet/minecraft/class_4970;method_53969()Lcom/mojang/serialization/MapCodec;official aLebp;a()Lcom/mojang/serialization/MapCodec;
-
getOutlineShape
protected VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) - Overrides:
getOutlineShapein classAbstractBlock- See Also:
- Mappings:
Namespace Name Mixin selector named getOutlineShapeLnet/minecraft/block/AbstractBlock;getOutlineShape(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/ShapeContext;)Lnet/minecraft/util/shape/VoxelShape;intermediary method_9530Lnet/minecraft/class_4970;method_9530(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_3726;)Lnet/minecraft/class_265;official aLebp;a(Lebq;Ldjn;Liw;Lfgh;)Lfgw;
-
getStateForNeighborUpdate
protected BlockState getStateForNeighborUpdate(BlockState state, WorldView world, ScheduledTickView tickView, BlockPos pos, Direction direction, BlockPos neighborPos, BlockState neighborState, Random random) 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
neighborUpdate(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.block.Block, net.minecraft.world.block.WireOrientation, 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 classAbstractBlock- Parameters:
state- the state of this blockworld- the worldpos- the position of this blockdirection- the direction from this block to the neighborneighborPos- the position of the neighbor blockneighborState- the state of the updated neighbor block- Returns:
- the state of the block after a neighboring block's state change
- See Also:
- Mappings:
Namespace Name Mixin selector named getStateForNeighborUpdateLnet/minecraft/block/AbstractBlock;getStateForNeighborUpdate(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldView;Lnet/minecraft/world/tick/ScheduledTickView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/random/Random;)Lnet/minecraft/block/BlockState;intermediary method_9559Lnet/minecraft/class_4970;method_9559(Lnet/minecraft/class_2680;Lnet/minecraft/class_4538;Lnet/minecraft/class_10225;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_5819;)Lnet/minecraft/class_2680;official aLebp;a(Lebq;Ldkm;Ldky;Liw;Ljc;Liw;Lebq;Lbai;)Lebq;
-
getSidesShape
- Overrides:
getSidesShapein classAbstractBlock- See Also:
- Mappings:
Namespace Name Mixin selector named getSidesShapeLnet/minecraft/block/AbstractBlock;getSidesShape(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/shape/VoxelShape;intermediary method_25959Lnet/minecraft/class_4970;method_25959(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)Lnet/minecraft/class_265;official b_Lebp;b_(Lebq;Ldjn;Liw;)Lfgw;
-
getCollisionShape
protected VoxelShape getCollisionShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) - Overrides:
getCollisionShapein classAbstractBlock- See Also:
- Mappings:
Namespace Name Mixin selector named getCollisionShapeLnet/minecraft/block/AbstractBlock;getCollisionShape(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/ShapeContext;)Lnet/minecraft/util/shape/VoxelShape;intermediary method_9549Lnet/minecraft/class_4970;method_9549(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_3726;)Lnet/minecraft/class_265;official bLebp;b(Lebq;Ldjn;Liw;Lfgh;)Lfgw;
-
getCullingShape
- Overrides:
getCullingShapein classAbstractBlock- See Also:
- Mappings:
Namespace Name Mixin selector named getCullingShapeLnet/minecraft/block/AbstractBlock;getCullingShape(Lnet/minecraft/block/BlockState;)Lnet/minecraft/util/shape/VoxelShape;intermediary method_9571Lnet/minecraft/class_4970;method_9571(Lnet/minecraft/class_2680;)Lnet/minecraft/class_265;official d_Lebp;d_(Lebq;)Lfgw;
-
getPlacementState
- Overrides:
getPlacementStatein classBlock- Mappings:
Namespace Name Mixin selector named getPlacementStateLnet/minecraft/block/Block;getPlacementState(Lnet/minecraft/item/ItemPlacementContext;)Lnet/minecraft/block/BlockState;intermediary method_9605Lnet/minecraft/class_2248;method_9605(Lnet/minecraft/class_1750;)Lnet/minecraft/class_2680;official aLdno;a(Lded;)Lebq;
-
isWall
- Mappings:
Namespace Name Mixin selector named isWallLnet/minecraft/block/FenceGateBlock;isWall(Lnet/minecraft/block/BlockState;)Zintermediary method_10138Lnet/minecraft/class_2349;method_10138(Lnet/minecraft/class_2680;)Zofficial oLdqp;o(Lebq;)Z
-
onUse
protected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) - Overrides:
onUsein classAbstractBlock- Mappings:
Namespace Name Mixin selector named onUseLnet/minecraft/block/AbstractBlock;onUse(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/hit/BlockHitResult;)Lnet/minecraft/util/ActionResult;intermediary method_55766Lnet/minecraft/class_4970;method_55766(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;Lnet/minecraft/class_3965;)Lnet/minecraft/class_1269;official aLebp;a(Lebq;Ldkj;Liw;Lcsi;Lffy;)Lbvc;
-
onExploded
protected void onExploded(BlockState state, ServerWorld world, BlockPos pos, Explosion explosion, BiConsumer<ItemStack, BlockPos> stackMerger) - Overrides:
onExplodedin classAbstractBlock- Mappings:
Namespace Name Mixin selector named onExplodedLnet/minecraft/block/AbstractBlock;onExploded(Lnet/minecraft/block/BlockState;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/explosion/Explosion;Ljava/util/function/BiConsumer;)Vintermediary method_55124Lnet/minecraft/class_4970;method_55124(Lnet/minecraft/class_2680;Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Lnet/minecraft/class_1927;Ljava/util/function/BiConsumer;)Vofficial aLebp;a(Lebq;Lasb;Liw;Ldkc;Ljava/util/function/BiConsumer;)V
-
neighborUpdate
protected void neighborUpdate(BlockState state, World world, BlockPos pos, Block sourceBlock, @Nullable @Nullable WireOrientation wireOrientation, boolean notify) Called when a neighboring block is updated. This method should be overridden to perform an action with a side effect, most notably an activation of a redstone component. This can also be used to perform an action changing block states of other blocks, such asSpongeBlockwhich absorbs water.To replace the state of the block itself, override
getStateForNeighborUpdate(net.minecraft.block.BlockState, net.minecraft.world.WorldView, net.minecraft.world.tick.ScheduledTickView, net.minecraft.util.math.BlockPos, net.minecraft.util.math.Direction, net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState, net.minecraft.util.math.random.Random)instead.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.- Overrides:
neighborUpdatein classAbstractBlock- See Also:
- Mappings:
Namespace Name Mixin selector named neighborUpdateLnet/minecraft/block/AbstractBlock;neighborUpdate(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/Block;Lnet/minecraft/world/block/WireOrientation;Z)Vintermediary method_9612Lnet/minecraft/class_4970;method_9612(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2248;Lnet/minecraft/class_9904;Z)Vofficial aLebp;a(Lebq;Ldkj;Liw;Ldno;Lezi;Z)V
-
appendProperties
Appends 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 classBlock- Mappings:
Namespace Name Mixin selector named appendPropertiesLnet/minecraft/block/Block;appendProperties(Lnet/minecraft/state/StateManager$Builder;)Vintermediary method_9515Lnet/minecraft/class_2248;method_9515(Lnet/minecraft/class_2689$class_2690;)Vofficial aLdno;a(Lebr$a;)V
-
canWallConnect
- Mappings:
Namespace Name Mixin selector named canWallConnectLnet/minecraft/block/FenceGateBlock;canWallConnect(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Direction;)Zintermediary method_16703Lnet/minecraft/class_2349;method_16703(Lnet/minecraft/class_2680;Lnet/minecraft/class_2350;)Zofficial aLdqp;a(Lebq;Ljc;)Z
-