Package net.minecraft.block
Class FenceGateBlock
java.lang.Object
net.minecraft.block.AbstractBlock
net.minecraft.block.Block
net.minecraft.block.HorizontalFacingBlock
net.minecraft.block.FenceGateBlock
- All Implemented Interfaces:
ItemConvertible
public class FenceGateBlock extends HorizontalFacingBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.NeighborGroup
Nested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>
-
Field Summary
Fields Modifier and Type Field Description static BooleanProperty
IN_WALL
protected static VoxelShape
IN_WALL_X_AXIS_CULL_SHAPE
protected static VoxelShape
IN_WALL_X_AXIS_SHAPE
protected static VoxelShape
IN_WALL_Z_AXIS_CULL_SHAPE
protected static VoxelShape
IN_WALL_Z_AXIS_SHAPE
static BooleanProperty
OPEN
static BooleanProperty
POWERED
protected static VoxelShape
X_AXIS_COLLISION_SHAPE
protected static VoxelShape
X_AXIS_CULL_SHAPE
protected static VoxelShape
X_AXIS_SHAPE
protected static VoxelShape
Z_AXIS_COLLISION_SHAPE
protected static VoxelShape
Z_AXIS_CULL_SHAPE
protected static VoxelShape
Z_AXIS_SHAPE
Fields inherited from class net.minecraft.block.HorizontalFacingBlock
FACING
Fields inherited from class net.minecraft.block.Block
LOGGER, STATE_IDS, stateManager
Fields inherited from class net.minecraft.block.AbstractBlock
collidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier
-
Constructor Summary
Constructors Constructor Description FenceGateBlock(AbstractBlock.Settings settings)
-
Method Summary
Methods inherited from class net.minecraft.block.HorizontalFacingBlock
mirror, rotate
Methods inherited from class net.minecraft.block.Block
addStacksForDisplay, afterBreak, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getRawIdFromState, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, is, isFaceFullSquare, isIn, isShapeFullCube, isTranslucent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, pushEntitiesUpBeforeBlockChange, rainTick, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toString
Methods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPlaceAt, canReplace, createScreenHandlerFactory, emitsRedstonePower, getAmbientOcclusionLightLevel, getComparatorOutput, getDefaultMaterialColor, getDroppedStacks, getFluidState, getLootTableId, getOffsetType, getOpacity, getPistonBehavior, getRaycastShape, getRenderingSeed, getRenderType, getSidesShape, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasBlockEntity, hasComparatorOutput, hasSidedTransparency, isSideInvisible, onBlockAdded, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onStateReplaced, onSyncedBlockEvent, prepare, randomTick, scheduledTick
-
Field Details
-
OPEN
-
POWERED
-
IN_WALL
-
Z_AXIS_SHAPE
-
X_AXIS_SHAPE
-
IN_WALL_Z_AXIS_SHAPE
-
IN_WALL_X_AXIS_SHAPE
-
Z_AXIS_COLLISION_SHAPE
-
X_AXIS_COLLISION_SHAPE
-
Z_AXIS_CULL_SHAPE
-
X_AXIS_CULL_SHAPE
-
IN_WALL_Z_AXIS_CULL_SHAPE
-
IN_WALL_X_AXIS_CULL_SHAPE
-
-
Constructor Details
-
FenceGateBlock
-
-
Method Details
-
getOutlineShape
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)- Overrides:
getOutlineShape
in classAbstractBlock
-
getStateForNeighborUpdate
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom)- Overrides:
getStateForNeighborUpdate
in classAbstractBlock
-
getCollisionShape
public VoxelShape getCollisionShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)- Overrides:
getCollisionShape
in classAbstractBlock
-
getCullingShape
- Overrides:
getCullingShape
in classAbstractBlock
-
getPlacementState
- Overrides:
getPlacementState
in classBlock
-
isWall
-
onUse
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit)Called when this block is used by a player. This, by default, is bound to using the right mouse button.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()
.If the action result is successful on a logical client, then the action will be sent to the logical server for processing.
- Overrides:
onUse
in classAbstractBlock
- Returns:
- an action result that specifies if using the block was successful.
-
neighborUpdate
public void neighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean notify)- Overrides:
neighborUpdate
in classAbstractBlock
-
appendProperties
- Overrides:
appendProperties
in classBlock
-
canWallConnect
-