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 cihintermediary net/minecraft/class_2665named net/minecraft/block/PistonBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.NeighborGroupNested 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 BooleanPropertyEXTENDEDprotected static VoxelShapeEXTENDED_DOWN_SHAPEprotected static VoxelShapeEXTENDED_EAST_SHAPEprotected static VoxelShapeEXTENDED_NORTH_SHAPEprotected static VoxelShapeEXTENDED_SOUTH_SHAPEprotected static VoxelShapeEXTENDED_UP_SHAPEprotected static VoxelShapeEXTENDED_WEST_SHAPEprivate booleanstickyFields inherited from class net.minecraft.block.FacingBlock
FACINGFields inherited from class net.minecraft.block.Block
LOGGER, STATE_IDS, stateManagerFields 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 voidappendProperties(StateManager.Builder<Block,BlockState> builder)booleancanPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type)VoxelShapegetOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)BlockStategetPlacementState(ItemPlacementContext ctx)booleanhasSidedTransparency(BlockState state)static booleanisMovable(BlockState state, World world, BlockPos pos, Direction direction, boolean canBreak, Direction pistonDir)BlockStatemirror(BlockState state, BlockMirror mirror)private booleanmove(World world, BlockPos pos, Direction dir, boolean retract)voidneighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean notify)voidonBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify)voidonPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack)booleanonSyncedBlockEvent(BlockState state, World world, BlockPos pos, int type, int data)BlockStaterotate(BlockState state, BlockRotation rotation)Applies a block rotation to a block state.private booleanshouldExtend(World world, BlockPos pos, Direction pistonFace)private voidtryMove(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, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, spawnBreakParticles, toStringMethods 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 bLcih;b:Lcjf;intermediary field_12191Lnet/minecraft/class_2665;field_12191:Lnet/minecraft/class_2746;named EXTENDEDLnet/minecraft/block/PistonBlock;EXTENDED:Lnet/minecraft/state/property/BooleanProperty;
-
EXTENDED_EAST_SHAPE
- Mappings:
Namespace Name Mixin selector official cLcih;c:Ldlg;intermediary field_12188Lnet/minecraft/class_2665;field_12188:Lnet/minecraft/class_265;named EXTENDED_EAST_SHAPELnet/minecraft/block/PistonBlock;EXTENDED_EAST_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
EXTENDED_WEST_SHAPE
- Mappings:
Namespace Name Mixin selector official dLcih;d:Ldlg;intermediary field_12184Lnet/minecraft/class_2665;field_12184:Lnet/minecraft/class_265;named EXTENDED_WEST_SHAPELnet/minecraft/block/PistonBlock;EXTENDED_WEST_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
EXTENDED_SOUTH_SHAPE
- Mappings:
Namespace Name Mixin selector official eLcih;e:Ldlg;intermediary field_12186Lnet/minecraft/class_2665;field_12186:Lnet/minecraft/class_265;named EXTENDED_SOUTH_SHAPELnet/minecraft/block/PistonBlock;EXTENDED_SOUTH_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
EXTENDED_NORTH_SHAPE
- Mappings:
Namespace Name Mixin selector official fLcih;f:Ldlg;intermediary field_12189Lnet/minecraft/class_2665;field_12189:Lnet/minecraft/class_265;named EXTENDED_NORTH_SHAPELnet/minecraft/block/PistonBlock;EXTENDED_NORTH_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
EXTENDED_UP_SHAPE
- Mappings:
Namespace Name Mixin selector official gLcih;g:Ldlg;intermediary field_12185Lnet/minecraft/class_2665;field_12185:Lnet/minecraft/class_265;named EXTENDED_UP_SHAPELnet/minecraft/block/PistonBlock;EXTENDED_UP_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
EXTENDED_DOWN_SHAPE
- Mappings:
Namespace Name Mixin selector official hLcih;h:Ldlg;intermediary field_12190Lnet/minecraft/class_2665;field_12190:Lnet/minecraft/class_265;named EXTENDED_DOWN_SHAPELnet/minecraft/block/PistonBlock;EXTENDED_DOWN_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
sticky
private final boolean sticky- Mappings:
Namespace Name Mixin selector official iLcih;i:Zintermediary field_12187Lnet/minecraft/class_2665;field_12187:Znamed stickyLnet/minecraft/block/PistonBlock;sticky:Z
-
-
Constructor Details
-
PistonBlock
- Mappings:
Namespace Name Mixin selector official <init>Lcih;<init>(ZLcin$c;)Vintermediary <init>Lnet/minecraft/class_2665;<init>(ZLnet/minecraft/class_4970$class_2251;)Vnamed <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:
getOutlineShapein classAbstractBlock- Mappings:
Namespace Name Mixin selector official aLcin;a(Lcio;Lbtu;Lfx;Ldks;)Ldlg;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;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;
-
onPlaced
public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack)- Overrides:
onPlacedin classBlock- Mappings:
Namespace Name Mixin selector official aLbxp;a(Lbuq;Lfx;Lcio;Lasb;Lboq;)Vintermediary method_9567Lnet/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;)Vnamed onPlacedLnet/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:
neighborUpdatein classAbstractBlock- Mappings:
Namespace Name Mixin selector official aLcin;a(Lcio;Lbuq;Lfx;Lbxp;Lfx;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_2338;Z)Vnamed neighborUpdateLnet/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:
onBlockAddedin classAbstractBlock- Mappings:
Namespace Name Mixin selector official bLcin;b(Lcio;Lbuq;Lfx;Lcio;Z)Vintermediary method_9615Lnet/minecraft/class_4970;method_9615(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Z)Vnamed onBlockAddedLnet/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:
getPlacementStatein classBlock- Mappings:
Namespace Name Mixin selector official aLbxp;a(Lbqq;)Lcio;intermediary method_9605Lnet/minecraft/class_2248;method_9605(Lnet/minecraft/class_1750;)Lnet/minecraft/class_2680;named getPlacementStateLnet/minecraft/block/Block;getPlacementState(Lnet/minecraft/item/ItemPlacementContext;)Lnet/minecraft/block/BlockState;
-
tryMove
- Mappings:
Namespace Name Mixin selector official aLcih;a(Lbuq;Lfx;Lcio;)Vintermediary method_11483Lnet/minecraft/class_2665;method_11483(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vnamed tryMoveLnet/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 aLcih;a(Lbuq;Lfx;Lgc;)Zintermediary method_11482Lnet/minecraft/class_2665;method_11482(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;)Znamed shouldExtendLnet/minecraft/block/PistonBlock;shouldExtend(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)Z
-
onSyncedBlockEvent
- Overrides:
onSyncedBlockEventin classAbstractBlock- Mappings:
Namespace Name Mixin selector official aLcin;a(Lcio;Lbuq;Lfx;II)Zintermediary method_9592Lnet/minecraft/class_4970;method_9592(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;II)Znamed onSyncedBlockEventLnet/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 aLcih;a(Lcio;Lbuq;Lfx;Lgc;ZLgc;)Zintermediary method_11484Lnet/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;)Znamed isMovableLnet/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 aLcih;a(Lbuq;Lfx;Lgc;Z)Zintermediary method_11481Lnet/minecraft/class_2665;method_11481(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;Z)Znamed moveLnet/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:
rotatein classAbstractBlock- Returns:
- the rotated block state
- Mappings:
Namespace Name Mixin selector official aLcin;a(Lcio;Lcdh;)Lcio;intermediary method_9598Lnet/minecraft/class_4970;method_9598(Lnet/minecraft/class_2680;Lnet/minecraft/class_2470;)Lnet/minecraft/class_2680;named rotateLnet/minecraft/block/AbstractBlock;rotate(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/BlockRotation;)Lnet/minecraft/block/BlockState;
-
mirror
- Overrides:
mirrorin classAbstractBlock- Mappings:
Namespace Name Mixin selector official aLcin;a(Lcio;Lcbw;)Lcio;intermediary method_9569Lnet/minecraft/class_4970;method_9569(Lnet/minecraft/class_2680;Lnet/minecraft/class_2415;)Lnet/minecraft/class_2680;named mirrorLnet/minecraft/block/AbstractBlock;mirror(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/BlockMirror;)Lnet/minecraft/block/BlockState;
-
appendProperties
- Overrides:
appendPropertiesin classBlock- Mappings:
Namespace Name Mixin selector official aLbxp;a(Lcip$a;)Vintermediary method_9515Lnet/minecraft/class_2248;method_9515(Lnet/minecraft/class_2689$class_2690;)Vnamed appendPropertiesLnet/minecraft/block/Block;appendProperties(Lnet/minecraft/state/StateManager$Builder;)V
-
hasSidedTransparency
- Overrides:
hasSidedTransparencyin classAbstractBlock- Mappings:
Namespace Name Mixin selector official e_Lcin;e_(Lcio;)Zintermediary method_9526Lnet/minecraft/class_4970;method_9526(Lnet/minecraft/class_2680;)Znamed hasSidedTransparencyLnet/minecraft/block/AbstractBlock;hasSidedTransparency(Lnet/minecraft/block/BlockState;)Z
-