Package net.minecraft.block
Class PistonBlock
java.lang.Object
net.minecraft.block.AbstractBlock
net.minecraft.block.Block
net.minecraft.block.FacingBlock
net.minecraft.block.PistonBlock
- All Implemented Interfaces:
ItemConvertible
public class PistonBlock extends FacingBlock
- Mappings:
Namespace Name official chm
intermediary net/minecraft/class_2665
named net/minecraft/block/PistonBlock
-
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
EXTENDED
protected static VoxelShape
EXTENDED_DOWN_SHAPE
protected static VoxelShape
EXTENDED_EAST_SHAPE
protected static VoxelShape
EXTENDED_NORTH_SHAPE
protected static VoxelShape
EXTENDED_SOUTH_SHAPE
protected static VoxelShape
EXTENDED_UP_SHAPE
protected static VoxelShape
EXTENDED_WEST_SHAPE
private boolean
sticky
Fields inherited from class net.minecraft.block.FacingBlock
FACING
Fields inherited from class net.minecraft.block.Block
LOGGER, STATE_IDS, stateManager
Fields inherited from class net.minecraft.block.AbstractBlock
collidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier
-
Constructor Summary
Constructors Constructor Description PistonBlock(boolean sticky, AbstractBlock.Settings settings)
-
Method Summary
Modifier and Type Method Description protected void
appendProperties(StateManager.Builder<Block,BlockState> builder)
boolean
canPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type)
VoxelShape
getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
BlockState
getPlacementState(ItemPlacementContext ctx)
boolean
hasSidedTransparency(BlockState state)
static boolean
isMovable(BlockState state, World world, BlockPos pos, Direction direction, boolean canBreak, Direction pistonDir)
BlockState
mirror(BlockState state, BlockMirror mirror)
private boolean
move(World world, BlockPos pos, Direction dir, boolean retract)
void
neighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean notify)
void
onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify)
void
onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack)
boolean
onSyncedBlockEvent(BlockState state, World world, BlockPos pos, int type, int data)
BlockState
rotate(BlockState state, BlockRotation rotation)
Applies a block rotation to a block state.private boolean
shouldExtend(World world, BlockPos pos, Direction pistonFace)
private void
tryMove(World world, BlockPos pos, BlockState state)
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, getShapesForStates, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, isFaceFullSquare, isShapeFullCube, isTranslucent, method_33614, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toString
Methods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPlaceAt, canReplace, createScreenHandlerFactory, emitsRedstonePower, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getLootTableId, getMaxModelOffset, getOffsetType, getOpacity, getPistonBehavior, getRaycastShape, getRenderingSeed, getRenderType, getSidesShape, getStateForNeighborUpdate, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasComparatorOutput, isSideInvisible, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onStateReplaced, onUse, prepare, randomTick, scheduledTick
-
Field Details
-
EXTENDED
- Mappings:
Namespace Name Mixin selector official b
Lchm;b:Lcik;
intermediary field_12191
Lnet/minecraft/class_2665;field_12191:Lnet/minecraft/class_2746;
named EXTENDED
Lnet/minecraft/block/PistonBlock;EXTENDED:Lnet/minecraft/state/property/BooleanProperty;
-
EXTENDED_EAST_SHAPE
- Mappings:
Namespace Name Mixin selector official c
Lchm;c:Ldjn;
intermediary field_12188
Lnet/minecraft/class_2665;field_12188:Lnet/minecraft/class_265;
named EXTENDED_EAST_SHAPE
Lnet/minecraft/block/PistonBlock;EXTENDED_EAST_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
EXTENDED_WEST_SHAPE
- Mappings:
Namespace Name Mixin selector official d
Lchm;d:Ldjn;
intermediary field_12184
Lnet/minecraft/class_2665;field_12184:Lnet/minecraft/class_265;
named EXTENDED_WEST_SHAPE
Lnet/minecraft/block/PistonBlock;EXTENDED_WEST_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
EXTENDED_SOUTH_SHAPE
- Mappings:
Namespace Name Mixin selector official e
Lchm;e:Ldjn;
intermediary field_12186
Lnet/minecraft/class_2665;field_12186:Lnet/minecraft/class_265;
named EXTENDED_SOUTH_SHAPE
Lnet/minecraft/block/PistonBlock;EXTENDED_SOUTH_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
EXTENDED_NORTH_SHAPE
- Mappings:
Namespace Name Mixin selector official f
Lchm;f:Ldjn;
intermediary field_12189
Lnet/minecraft/class_2665;field_12189:Lnet/minecraft/class_265;
named EXTENDED_NORTH_SHAPE
Lnet/minecraft/block/PistonBlock;EXTENDED_NORTH_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
EXTENDED_UP_SHAPE
- Mappings:
Namespace Name Mixin selector official g
Lchm;g:Ldjn;
intermediary field_12185
Lnet/minecraft/class_2665;field_12185:Lnet/minecraft/class_265;
named EXTENDED_UP_SHAPE
Lnet/minecraft/block/PistonBlock;EXTENDED_UP_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
EXTENDED_DOWN_SHAPE
- Mappings:
Namespace Name Mixin selector official h
Lchm;h:Ldjn;
intermediary field_12190
Lnet/minecraft/class_2665;field_12190:Lnet/minecraft/class_265;
named EXTENDED_DOWN_SHAPE
Lnet/minecraft/block/PistonBlock;EXTENDED_DOWN_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
sticky
private final boolean sticky- Mappings:
Namespace Name Mixin selector official i
Lchm;i:Z
intermediary field_12187
Lnet/minecraft/class_2665;field_12187:Z
named sticky
Lnet/minecraft/block/PistonBlock;sticky:Z
-
-
Constructor Details
-
PistonBlock
- Mappings:
Namespace Name Mixin selector official <init>
Lchm;<init>(ZLchs$c;)V
intermediary <init>
Lnet/minecraft/class_2665;<init>(ZLnet/minecraft/class_4970$class_2251;)V
named <init>
Lnet/minecraft/block/PistonBlock;<init>(ZLnet/minecraft/block/AbstractBlock$Settings;)V
-
-
Method Details
-
getOutlineShape
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)- Overrides:
getOutlineShape
in classAbstractBlock
- Mappings:
Namespace Name Mixin selector official a
Lchs;a(Lcht;Lbsz;Lfx;Ldiz;)Ldjn;
intermediary method_9530
Lnet/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;
named getOutlineShape
Lnet/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;
-
onPlaced
public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack)- Overrides:
onPlaced
in classBlock
- Mappings:
Namespace Name Mixin selector official a
Lbwu;a(Lbtv;Lfx;Lcht;Lari;Lbnv;)V
intermediary method_9567
Lnet/minecraft/class_2248;method_9567(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_1309;Lnet/minecraft/class_1799;)V
named onPlaced
Lnet/minecraft/block/Block;onPlaced(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/item/ItemStack;)V
-
neighborUpdate
public void neighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean notify)- Overrides:
neighborUpdate
in classAbstractBlock
- Mappings:
Namespace Name Mixin selector official a
Lchs;a(Lcht;Lbtv;Lfx;Lbwu;Lfx;Z)V
intermediary method_9612
Lnet/minecraft/class_4970;method_9612(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2248;Lnet/minecraft/class_2338;Z)V
named neighborUpdate
Lnet/minecraft/block/AbstractBlock;neighborUpdate(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/Block;Lnet/minecraft/util/math/BlockPos;Z)V
-
onBlockAdded
public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify)- Overrides:
onBlockAdded
in classAbstractBlock
- Mappings:
Namespace Name Mixin selector official b
Lchs;b(Lcht;Lbtv;Lfx;Lcht;Z)V
intermediary method_9615
Lnet/minecraft/class_4970;method_9615(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Z)V
named onBlockAdded
Lnet/minecraft/block/AbstractBlock;onBlockAdded(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Z)V
-
getPlacementState
- Overrides:
getPlacementState
in classBlock
- Mappings:
Namespace Name Mixin selector official a
Lbwu;a(Lbpv;)Lcht;
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;
-
tryMove
- Mappings:
Namespace Name Mixin selector official a
Lchm;a(Lbtv;Lfx;Lcht;)V
intermediary method_11483
Lnet/minecraft/class_2665;method_11483(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
named tryMove
Lnet/minecraft/block/PistonBlock;tryMove(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
shouldExtend
- Mappings:
Namespace Name Mixin selector official a
Lchm;a(Lbtv;Lfx;Lgc;)Z
intermediary method_11482
Lnet/minecraft/class_2665;method_11482(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;)Z
named shouldExtend
Lnet/minecraft/block/PistonBlock;shouldExtend(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)Z
-
onSyncedBlockEvent
- Overrides:
onSyncedBlockEvent
in classAbstractBlock
- Mappings:
Namespace Name Mixin selector official a
Lchs;a(Lcht;Lbtv;Lfx;II)Z
intermediary method_9592
Lnet/minecraft/class_4970;method_9592(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;II)Z
named onSyncedBlockEvent
Lnet/minecraft/block/AbstractBlock;onSyncedBlockEvent(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;II)Z
-
isMovable
public static boolean isMovable(BlockState state, World world, BlockPos pos, Direction direction, boolean canBreak, Direction pistonDir)- Mappings:
Namespace Name Mixin selector official a
Lchm;a(Lcht;Lbtv;Lfx;Lgc;ZLgc;)Z
intermediary method_11484
Lnet/minecraft/class_2665;method_11484(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;ZLnet/minecraft/class_2350;)Z
named isMovable
Lnet/minecraft/block/PistonBlock;isMovable(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;ZLnet/minecraft/util/math/Direction;)Z
-
move
- Mappings:
Namespace Name Mixin selector official a
Lchm;a(Lbtv;Lfx;Lgc;Z)Z
intermediary method_11481
Lnet/minecraft/class_2665;method_11481(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;Z)Z
named move
Lnet/minecraft/block/PistonBlock;move(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;Z)Z
-
rotate
Applies a block rotation to a block state.By default, this returns the provided block state.
- Overrides:
rotate
in classAbstractBlock
- Returns:
- the rotated block state
- Mappings:
Namespace Name Mixin selector official a
Lchs;a(Lcht;Lccm;)Lcht;
intermediary method_9598
Lnet/minecraft/class_4970;method_9598(Lnet/minecraft/class_2680;Lnet/minecraft/class_2470;)Lnet/minecraft/class_2680;
named rotate
Lnet/minecraft/block/AbstractBlock;rotate(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/BlockRotation;)Lnet/minecraft/block/BlockState;
-
mirror
- Overrides:
mirror
in classAbstractBlock
- Mappings:
Namespace Name Mixin selector official a
Lchs;a(Lcht;Lcbb;)Lcht;
intermediary method_9569
Lnet/minecraft/class_4970;method_9569(Lnet/minecraft/class_2680;Lnet/minecraft/class_2415;)Lnet/minecraft/class_2680;
named mirror
Lnet/minecraft/block/AbstractBlock;mirror(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/BlockMirror;)Lnet/minecraft/block/BlockState;
-
appendProperties
- Overrides:
appendProperties
in classBlock
- Mappings:
Namespace Name Mixin selector official a
Lbwu;a(Lchu$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
-
hasSidedTransparency
- Overrides:
hasSidedTransparency
in classAbstractBlock
- Mappings:
Namespace Name Mixin selector official e_
Lchs;e_(Lcht;)Z
intermediary method_9526
Lnet/minecraft/class_4970;method_9526(Lnet/minecraft/class_2680;)Z
named hasSidedTransparency
Lnet/minecraft/block/AbstractBlock;hasSidedTransparency(Lnet/minecraft/block/BlockState;)Z
-