Package net.minecraft.block
Class PistonBlock
java.lang.Object
net.minecraft.block.Block
net.minecraft.block.PistonBlock
public class PistonBlock extends Block
- Mappings:
Namespace Name official alsintermediary net/minecraft/class_369named net/minecraft/block/PistonBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.OffsetType, Block.Sound -
Field Summary
Fields Modifier and Type Field Description static DirectionPropertyDIRECTIONstatic BooleanPropertyEXTENDEDprivate booleanisStickyFields inherited from class net.minecraft.block.Block
ANVIL, BLOCK_STATES, blockEntity, boundingBoxMaxX, boundingBoxMaxY, boundingBoxMaxZ, boundingBoxMinX, boundingBoxMinY, boundingBoxMinZ, CLOTH, fullBlock, GLASS, GRASS, GRAVEL, LADDER, lightLevel, material, materialColor, opacity, ORE, particleGravity, RAIL, randomTicks, REGISTRY, resistance, SAND, SLIME, slipperiness, SNOW, sound, stateManager, stats, STONE, strength, transluscent, useNeighbourLight, WOOD -
Constructor Summary
Constructors Constructor Description PistonBlock(boolean bool) -
Method Summary
Modifier and Type Method Description voidappendCollisionBoxes(World world, BlockPos pos, BlockState state, Box box, List<Box> list, Entity entity)protected StateManagerappendProperties()Returns a new state manager with a property array.BoxgetCollisionBox(World world, BlockPos pos, BlockState state)Returns a box by adding the block's current location and the block's corresponding value in its Bounding BoxintgetData(BlockState state)Returns the data value for a blockstate Throws anIllegalArmumentExceptionas this method does not workBlockStategetStateFromData(World world, BlockPos pos, Direction dir, float float2, float float3, float float4, int id, LivingEntity entity)Returns a BlockState from an idbooleanhasTransperancy()static Directionmethod_1194(World world, BlockPos blockPos, LivingEntity livingEntity)static booleanmethod_1195(Block block, World world, BlockPos blockPos, Direction direction, boolean bool)static Directionmethod_1196(int int2)private voidmethod_1197(World world, BlockPos blockPos, BlockState blockState)BlockStatemethod_696(BlockState blockState)private booleanmove(World world, BlockPos pos, Direction dir, boolean retract)voidneighborUpdate(World world, BlockPos pos, BlockState state, Block block)Runs when its adjacent blocks are updated.voidonCreation(World world, BlockPos pos, BlockState state)Runs when the block is placed (by a player or enderman).booleanonEvent(World world, BlockPos pos, BlockState state, int id, int meta)Runs when an event takes placevoidonPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack)Runs when the block is placed by an entitybooleanrenderAsNormalBlock()Returns whether the block can be rendered as a normal blockvoidsetBlockItemBounds()Sets the bounds for the BlockItemvoidsetBoundingBox(WorldView view, BlockPos pos)private booleanshouldExtend(World world, BlockPos pos, Direction pistonFace)BlockStatestateFromData(int data)Returns a blockstate of the current block from it's idMethods inherited from class net.minecraft.block.Block
appendItemStacks, areBlocksEqual, blocksMovement, calcBlockBreakingData, canBePlacedAdjacent, canBePlacedAtPos, canBeReplaced, canCollide, canMobSpawnInside, createStackFromBlock, disableStats, dropAsItem, dropExperience, emitsRedstonePower, get, getAmbientOcclusionLightLevel, getBlastResistance, getBlendColor, getBlockColor, getBlockFromItem, getBlockState, getBlockType, getBonusDrops, getBrightness, getByBlockState, getById, getColor, getColor, getComparatorOutput, getDefaultState, getDropCount, getDropItem, getIdByBlock, getItemGroup, getLightLevel, getMaterial, getMaterialColor, getMaxX, getMaxY, getMaxZ, getMeta, getMeta, getMinX, getMinY, getMinZ, getOffsetType, getOpacity, getPickItem, getPistonInteractionType, getRenderLayerType, getSelectionBox, getStateFromRawId, getStateManager, getStrength, getStrongRedstonePower, getTickRate, getTranslatedName, getTranslationKey, getWeakRedstonePower, harvest, hasBlockEntity, hasCollision, hasCollision, hasComparatorOutput, hasStats, isEqualTo, isFire, isFlowerPot, isFullBlock, isFullCube, isLeafBlock, isNormalBlock, isReplaceable, isSideInvisible, isTransluscent, method_655, onBlockBreak, onBlockBreakStart, onBreakByPlayer, onBreakByPlayer, onBreaking, onDestroyedByExplosion, onEntityCollision, onEntityCollision, onLandedUpon, onSteppedOn, onUpdateTick, onUse, rainTick, randomDisplayTick, randomDropAsItem, requiresSilkTouch, scheduledTick, setBoundingBox, setDefaultState, setEntityVelocity, setItemGroup, setLightLevel, setOpacity, setResistance, setSound, setStrength, setTickRandomly, setTranslationKey, setUnbreakable, setup, shouldDropItemsOnExplosion, ticksRandomly, toString, usesNeighbourLight
-
Field Details
-
DIRECTION
- Mappings:
Namespace Name Mixin selector official aLals;a:Laml;intermediary field_1472Lnet/minecraft/class_369;field_1472:Lnet/minecraft/class_389;named DIRECTIONLnet/minecraft/block/PistonBlock;DIRECTION:Lnet/minecraft/state/property/DirectionProperty;
-
EXTENDED
- Mappings:
Namespace Name Mixin selector official bLals;b:Lamk;intermediary field_1473Lnet/minecraft/class_369;field_1473:Lnet/minecraft/class_388;named EXTENDEDLnet/minecraft/block/PistonBlock;EXTENDED:Lnet/minecraft/state/property/BooleanProperty;
-
isSticky
private final boolean isSticky- Mappings:
Namespace Name Mixin selector official NLals;N:Zintermediary field_1471Lnet/minecraft/class_369;field_1471:Znamed isStickyLnet/minecraft/block/PistonBlock;isSticky:Z
-
-
Constructor Details
-
PistonBlock
public PistonBlock(boolean bool)
-
-
Method Details
-
hasTransperancy
public boolean hasTransperancy()- Overrides:
hasTransperancyin classBlock- Mappings:
Namespace Name Mixin selector official cLafh;c()Zintermediary method_699Lnet/minecraft/class_160;method_699()Znamed hasTransperancyLnet/minecraft/block/Block;hasTransperancy()Z
-
onPlaced
public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack)Runs when the block is placed by an entity- Overrides:
onPlacedin classBlock- Parameters:
world- The world that the block is inpos- The block's positionstate- The block's BlockStateplacer- The entity who placed the blockitemStack- ItemStack instance- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lalz;Lpr;Lzx;)Vintermediary method_652Lnet/minecraft/class_160;method_652(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1752;Lnet/minecraft/class_2056;)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
Runs when its adjacent blocks are updated. It will also run when the block is placed or removed as Air is being updated.- Overrides:
neighborUpdatein classBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockStateblock- The adjacent Block that updated the current block- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lalz;Lafh;)Vintermediary method_648Lnet/minecraft/class_160;method_648(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_160;)Vnamed neighborUpdateLnet/minecraft/block/Block;neighborUpdate(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/Block;)V
-
onCreation
Runs when the block is placed (by a player or enderman).- Overrides:
onCreationin classBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockState- Mappings:
Namespace Name Mixin selector official cLafh;c(Ladm;Lcj;Lalz;)Vintermediary method_703Lnet/minecraft/class_160;method_703(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)Vnamed onCreationLnet/minecraft/block/Block;onCreation(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
getStateFromData
public BlockState getStateFromData(World world, BlockPos pos, Direction dir, float float2, float float3, float float4, int id, LivingEntity entity)Returns a BlockState from an id- Overrides:
getStateFromDatain classBlock- Parameters:
world- The world that the block is placed inpos- The block's positiondir- The block's direction- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lcq;FFFILpr;)Lalz;intermediary method_656Lnet/minecraft/class_160;method_656(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_1383;FFFILnet/minecraft/class_1752;)Lnet/minecraft/class_376;named getStateFromDataLnet/minecraft/block/Block;getStateFromData(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;FFFILnet/minecraft/entity/LivingEntity;)Lnet/minecraft/block/BlockState;
-
method_1197
- Mappings:
Namespace Name Mixin selector official eLals;e(Ladm;Lcj;Lalz;)Vintermediary method_1197Lnet/minecraft/class_369;method_1197(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)Vnamed method_1197Lnet/minecraft/block/PistonBlock;method_1197(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
shouldExtend
- Mappings:
Namespace Name Mixin selector official aLals;a(Ladm;Lcj;Lcq;)Zintermediary method_1192Lnet/minecraft/class_369;method_1192(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_1383;)Znamed shouldExtendLnet/minecraft/block/PistonBlock;shouldExtend(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)Z
-
onEvent
Runs when an event takes place- Overrides:
onEventin classBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockStateid- Idmeta- Metadata- Returns:
- Whether the event is successful
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lalz;II)Zintermediary method_647Lnet/minecraft/class_160;method_647(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;II)Znamed onEventLnet/minecraft/block/Block;onEvent(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;II)Z
-
setBoundingBox
- Overrides:
setBoundingBoxin classBlock- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladq;Lcj;)Vintermediary method_665Lnet/minecraft/class_160;method_665(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Vnamed setBoundingBoxLnet/minecraft/block/Block;setBoundingBox(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)V
-
setBlockItemBounds
public void setBlockItemBounds()Sets the bounds for the BlockItem- Overrides:
setBlockItemBoundsin classBlock- Mappings:
Namespace Name Mixin selector official jLafh;j()Vintermediary method_725Lnet/minecraft/class_160;method_725()Vnamed setBlockItemBoundsLnet/minecraft/block/Block;setBlockItemBounds()V
-
appendCollisionBoxes
public void appendCollisionBoxes(World world, BlockPos pos, BlockState state, Box box, List<Box> list, Entity entity)- Overrides:
appendCollisionBoxesin classBlock- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lalz;Laug;Ljava/util/List;Lpk;)Vintermediary method_649Lnet/minecraft/class_160;method_649(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_646;Ljava/util/List;Lnet/minecraft/class_1745;)Vnamed appendCollisionBoxesLnet/minecraft/block/Block;appendCollisionBoxes(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Box;Ljava/util/List;Lnet/minecraft/entity/Entity;)V
-
getCollisionBox
Returns a box by adding the block's current location and the block's corresponding value in its Bounding Box- Overrides:
getCollisionBoxin classBlock- Parameters:
world- The world that the block has been placedpos- The block's positionstate- The block's BlockState- Returns:
- The Collision box
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lalz;)Laug;intermediary method_645Lnet/minecraft/class_160;method_645(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)Lnet/minecraft/class_646;named getCollisionBoxLnet/minecraft/block/Block;getCollisionBox(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/util/math/Box;
-
renderAsNormalBlock
public boolean renderAsNormalBlock()Returns whether the block can be rendered as a normal block- Overrides:
renderAsNormalBlockin classBlock- Returns:
- Whether the block can be rendered as a normal block
- Mappings:
Namespace Name Mixin selector official dLafh;d()Zintermediary method_709Lnet/minecraft/class_160;method_709()Znamed renderAsNormalBlockLnet/minecraft/block/Block;renderAsNormalBlock()Z
-
method_1196
- Mappings:
Namespace Name Mixin selector official bLals;b(I)Lcq;intermediary method_1196Lnet/minecraft/class_369;method_1196(I)Lnet/minecraft/class_1383;named method_1196Lnet/minecraft/block/PistonBlock;method_1196(I)Lnet/minecraft/util/math/Direction;
-
method_1194
- Mappings:
Namespace Name Mixin selector official aLals;a(Ladm;Lcj;Lpr;)Lcq;intermediary method_1194Lnet/minecraft/class_369;method_1194(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_1752;)Lnet/minecraft/class_1383;named method_1194Lnet/minecraft/block/PistonBlock;method_1194(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/LivingEntity;)Lnet/minecraft/util/math/Direction;
-
method_1195
public static boolean method_1195(Block block, World world, BlockPos blockPos, Direction direction, boolean bool)- Mappings:
Namespace Name Mixin selector official aLals;a(Lafh;Ladm;Lcj;Lcq;Z)Zintermediary method_1195Lnet/minecraft/class_369;method_1195(Lnet/minecraft/class_160;Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_1383;Z)Znamed method_1195Lnet/minecraft/block/PistonBlock;method_1195(Lnet/minecraft/block/Block;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;Z)Z
-
move
- Mappings:
Namespace Name Mixin selector official aLals;a(Ladm;Lcj;Lcq;Z)Zintermediary method_1193Lnet/minecraft/class_369;method_1193(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_1383;Z)Znamed moveLnet/minecraft/block/PistonBlock;move(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;Z)Z
-
method_696
- Overrides:
method_696in classBlock- Mappings:
Namespace Name Mixin selector official bLafh;b(Lalz;)Lalz;intermediary method_696Lnet/minecraft/class_160;method_696(Lnet/minecraft/class_376;)Lnet/minecraft/class_376;named method_696Lnet/minecraft/block/Block;method_696(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/BlockState;
-
stateFromData
Returns a blockstate of the current block from it's id- Overrides:
stateFromDatain classBlock- Parameters:
data- The Blockstate's associated data value- Returns:
- The Default state
- Mappings:
Namespace Name Mixin selector official aLafh;a(I)Lalz;intermediary method_637Lnet/minecraft/class_160;method_637(I)Lnet/minecraft/class_376;named stateFromDataLnet/minecraft/block/Block;stateFromData(I)Lnet/minecraft/block/BlockState;
-
getData
Returns the data value for a blockstate Throws anIllegalArmumentExceptionas this method does not work- Overrides:
getDatain classBlock- Parameters:
state- The Blockstate- Returns:
- Zero
- Mappings:
Namespace Name Mixin selector official cLafh;c(Lalz;)Iintermediary method_706Lnet/minecraft/class_160;method_706(Lnet/minecraft/class_376;)Inamed getDataLnet/minecraft/block/Block;getData(Lnet/minecraft/block/BlockState;)I
-
appendProperties
Returns a new state manager with a property array.- Overrides:
appendPropertiesin classBlock- Returns:
- New state manager
- Mappings:
Namespace Name Mixin selector official eLafh;e()Lama;intermediary method_714Lnet/minecraft/class_160;method_714()Lnet/minecraft/class_378;named appendPropertiesLnet/minecraft/block/Block;appendProperties()Lnet/minecraft/state/StateManager;
-