Package net.minecraft.block
Class AbstractPressurePlateBlock
java.lang.Object
net.minecraft.block.Block
net.minecraft.block.AbstractPressurePlateBlock
- Direct Known Subclasses:
PressurePlateBlock,WeightedPressurePlateBlock
public abstract class AbstractPressurePlateBlock extends Block
- Mappings:
Namespace Name official afdintermediary net/minecraft/class_153named net/minecraft/block/AbstractPressurePlateBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.OffsetType, Block.Sound -
Field Summary
Fields 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 Modifier Constructor Description protectedAbstractPressurePlateBlock(Material material)protectedAbstractPressurePlateBlock(Material material, MaterialColor color) -
Method Summary
Modifier and Type Method Description booleanblocksMovement(WorldView view, BlockPos pos)booleancanBePlacedAtPos(World world, BlockPos pos)Returns whether the current block can be placed at a certainBlockPosprivate booleancanBePlacedOnBlockBelow(World world, BlockPos pos)booleancanMobSpawnInside()Returns whether mobs can spawn inside the block.booleanemitsRedstonePower()Returns whether the current block emits a redstone signal.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 Boxprotected abstract intgetMinRedstoneOutput(BlockState state)intgetPistonInteractionType()Returns the block's piston interaction type, as provided by it's material.protected abstract intgetRedstoneOutput(World world, BlockPos pos)intgetStrongRedstonePower(WorldView view, BlockPos pos, BlockState state, Direction facing)Returns the block's strong redstone power.intgetTickRate(World world)Returns the block's tick rate.intgetWeakRedstonePower(WorldView view, BlockPos pos, BlockState state, Direction facing)Returns the block's weak redstone power.booleanhasTransperancy()protected voidmethod_582(World world, BlockPos pos, BlockState state, int int2)protected Boxmethod_584(BlockPos pos)voidneighborUpdate(World world, BlockPos pos, BlockState state, Block block)Runs when its adjacent blocks are updated.voidonBreaking(World world, BlockPos pos, BlockState state)Runs when the block is removed (by an entity or explosion).voidonEntityCollision(World world, BlockPos pos, BlockState state, Entity entity)Runs every time an entity collides with the blockvoidonUpdateTick(World world, BlockPos pos, BlockState state, Random rand)Runs when the block is updatedbooleanrenderAsNormalBlock()Returns whether the block can be rendered as a normal blockvoidscheduledTick(World world, BlockPos pos, BlockState state, Random rand)Runs when the block is updated as per a schedulevoidsetBlockItemBounds()Sets the bounds for the BlockItemprotected voidsetBoundingBox(BlockState state)voidsetBoundingBox(WorldView view, BlockPos pos)protected abstract BlockStatesetRedstoneOutput(BlockState state, int value)protected voidupdateNeighbours(World world, BlockPos pos)Methods inherited from class net.minecraft.block.Block
appendCollisionBoxes, appendItemStacks, appendProperties, areBlocksEqual, calcBlockBreakingData, canBePlacedAdjacent, canBeReplaced, canCollide, createStackFromBlock, disableStats, dropAsItem, dropExperience, get, getAmbientOcclusionLightLevel, getBlastResistance, getBlendColor, getBlockColor, getBlockFromItem, getBlockState, getBlockType, getBonusDrops, getBrightness, getByBlockState, getById, getColor, getColor, getComparatorOutput, getData, getDefaultState, getDropCount, getDropItem, getIdByBlock, getItemGroup, getLightLevel, getMaterial, getMaterialColor, getMaxX, getMaxY, getMaxZ, getMeta, getMeta, getMinX, getMinY, getMinZ, getOffsetType, getOpacity, getPickItem, getRenderLayerType, getSelectionBox, getStateFromData, getStateFromRawId, getStateManager, getStrength, getTranslatedName, getTranslationKey, harvest, hasBlockEntity, hasCollision, hasCollision, hasComparatorOutput, hasStats, isEqualTo, isFire, isFlowerPot, isFullBlock, isFullCube, isLeafBlock, isNormalBlock, isReplaceable, isSideInvisible, isTransluscent, method_655, method_696, onBlockBreak, onBlockBreakStart, onBreakByPlayer, onBreakByPlayer, onCreation, onDestroyedByExplosion, onEntityCollision, onEvent, onLandedUpon, onPlaced, onSteppedOn, onUse, rainTick, randomDisplayTick, randomDropAsItem, requiresSilkTouch, setBoundingBox, setDefaultState, setEntityVelocity, setItemGroup, setLightLevel, setOpacity, setResistance, setSound, setStrength, setTickRandomly, setTranslationKey, setUnbreakable, setup, shouldDropItemsOnExplosion, stateFromData, ticksRandomly, toString, usesNeighbourLight
-
Constructor Details
-
AbstractPressurePlateBlock
- Parameters:
material- The block's material- Mappings:
Namespace Name Mixin selector official <init>Lafh;<init>(Larm;)Vintermediary <init>Lnet/minecraft/class_160;<init>(Lnet/minecraft/class_591;)Vnamed <init>Lnet/minecraft/block/Block;<init>(Lnet/minecraft/block/Material;)V
-
AbstractPressurePlateBlock
- Parameters:
material- The block's materialcolor- The block's material color- Mappings:
Namespace Name Mixin selector official <init>Lafh;<init>(Larm;Larn;)Vintermediary <init>Lnet/minecraft/class_160;<init>(Lnet/minecraft/class_591;Lnet/minecraft/class_592;)Vnamed <init>Lnet/minecraft/block/Block;<init>(Lnet/minecraft/block/Material;Lnet/minecraft/block/MaterialColor;)V
-
-
Method Details
-
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
-
setBoundingBox
- Mappings:
Namespace Name Mixin selector official dLafd;d(Lalz;)Vintermediary method_585Lnet/minecraft/class_153;method_585(Lnet/minecraft/class_376;)Vnamed setBoundingBoxLnet/minecraft/block/AbstractPressurePlateBlock;setBoundingBox(Lnet/minecraft/block/BlockState;)V
-
getTickRate
Returns the block's tick rate. Default is 10.- Overrides:
getTickRatein classBlock- Parameters:
world- The world that the block is placed in- Returns:
- Tick rate
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;)Iintermediary method_642Lnet/minecraft/class_160;method_642(Lnet/minecraft/class_99;)Inamed getTickRateLnet/minecraft/block/Block;getTickRate(Lnet/minecraft/world/World;)I
-
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;
-
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
-
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
-
blocksMovement
- Overrides:
blocksMovementin classBlock- Mappings:
Namespace Name Mixin selector official bLafh;b(Ladq;Lcj;)Zintermediary method_692Lnet/minecraft/class_160;method_692(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Znamed blocksMovementLnet/minecraft/block/Block;blocksMovement(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Z
-
canMobSpawnInside
public boolean canMobSpawnInside()Returns whether mobs can spawn inside the block. Used for Air.- Overrides:
canMobSpawnInsidein classBlock- Returns:
- Whether mobs can spawn inside the block
- Mappings:
Namespace Name Mixin selector official gLafh;g()Zintermediary method_718Lnet/minecraft/class_160;method_718()Znamed canMobSpawnInsideLnet/minecraft/block/Block;canMobSpawnInside()Z
-
canBePlacedAtPos
Returns whether the current block can be placed at a certainBlockPos- Overrides:
canBePlacedAtPosin classBlock- Returns:
- Whether the current block can be placed at a BlockPos
- Mappings:
Namespace Name Mixin selector official dLafh;d(Ladm;Lcj;)Zintermediary method_711Lnet/minecraft/class_160;method_711(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)Znamed canBePlacedAtPosLnet/minecraft/block/Block;canBePlacedAtPos(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Z
-
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
-
canBePlacedOnBlockBelow
- Mappings:
Namespace Name Mixin selector official mLafd;m(Ladm;Lcj;)Zintermediary method_589Lnet/minecraft/class_153;method_589(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)Znamed canBePlacedOnBlockBelowLnet/minecraft/block/AbstractPressurePlateBlock;canBePlacedOnBlockBelow(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Z
-
onUpdateTick
Runs when the block is updated- Overrides:
onUpdateTickin classBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockStaterand- Random object- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lalz;Ljava/util/Random;)Vintermediary method_650Lnet/minecraft/class_160;method_650(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Ljava/util/Random;)Vnamed onUpdateTickLnet/minecraft/block/Block;onUpdateTick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Ljava/util/Random;)V
-
scheduledTick
Runs when the block is updated as per a schedule- Overrides:
scheduledTickin classBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockStaterand- Random object- Mappings:
Namespace Name Mixin selector official bLafh;b(Ladm;Lcj;Lalz;Ljava/util/Random;)Vintermediary method_690Lnet/minecraft/class_160;method_690(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Ljava/util/Random;)Vnamed scheduledTickLnet/minecraft/block/Block;scheduledTick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Ljava/util/Random;)V
-
onEntityCollision
Runs every time an entity collides with the block- Overrides:
onEntityCollisionin classBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockStateentity- The entity that collided with the block- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lalz;Lpk;)Vintermediary method_651Lnet/minecraft/class_160;method_651(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1745;)Vnamed onEntityCollisionLnet/minecraft/block/Block;onEntityCollision(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/Entity;)V
-
method_582
- Mappings:
Namespace Name Mixin selector official aLafd;a(Ladm;Lcj;Lalz;I)Vintermediary method_582Lnet/minecraft/class_153;method_582(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;I)Vnamed method_582Lnet/minecraft/block/AbstractPressurePlateBlock;method_582(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;I)V
-
method_584
- Mappings:
Namespace Name Mixin selector official aLafd;a(Lcj;)Laug;intermediary method_584Lnet/minecraft/class_153;method_584(Lnet/minecraft/class_1372;)Lnet/minecraft/class_646;named method_584Lnet/minecraft/block/AbstractPressurePlateBlock;method_584(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/Box;
-
onBreaking
Runs when the block is removed (by an entity or explosion).- Overrides:
onBreakingin 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 bLafh;b(Ladm;Lcj;Lalz;)Vintermediary method_688Lnet/minecraft/class_160;method_688(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)Vnamed onBreakingLnet/minecraft/block/Block;onBreaking(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
updateNeighbours
- Mappings:
Namespace Name Mixin selector official eLafd;e(Ladm;Lcj;)Vintermediary method_586Lnet/minecraft/class_153;method_586(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)Vnamed updateNeighboursLnet/minecraft/block/AbstractPressurePlateBlock;updateNeighbours(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)V
-
getWeakRedstonePower
Returns the block's weak redstone power.- Overrides:
getWeakRedstonePowerin classBlock- Parameters:
view- WorldView instancepos- The block's positionstate- The block's BlockStatefacing- The block's direction- Returns:
- Block's weak redstone power
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladq;Lcj;Lalz;Lcq;)Iintermediary method_667Lnet/minecraft/class_160;method_667(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1383;)Inamed getWeakRedstonePowerLnet/minecraft/block/Block;getWeakRedstonePower(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Direction;)I
-
getStrongRedstonePower
public int getStrongRedstonePower(WorldView view, BlockPos pos, BlockState state, Direction facing)Returns the block's strong redstone power.- Overrides:
getStrongRedstonePowerin classBlock- Parameters:
view- WorldView instancepos- The block's positionstate- The block's BlockStatefacing- The block's direction- Returns:
- The Block's strong redstone power
- Mappings:
Namespace Name Mixin selector official bLafh;b(Ladq;Lcj;Lalz;Lcq;)Iintermediary method_693Lnet/minecraft/class_160;method_693(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1383;)Inamed getStrongRedstonePowerLnet/minecraft/block/Block;getStrongRedstonePower(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Direction;)I
-
emitsRedstonePower
public boolean emitsRedstonePower()Returns whether the current block emits a redstone signal. Used by comparators, Redstone Blocks, etc.- Overrides:
emitsRedstonePowerin classBlock- Returns:
- Whether the current block emits a redstone signal
- Mappings:
Namespace Name Mixin selector official iLafh;i()Zintermediary method_723Lnet/minecraft/class_160;method_723()Znamed emitsRedstonePowerLnet/minecraft/block/Block;emitsRedstonePower()Z
-
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
-
getPistonInteractionType
public int getPistonInteractionType()Returns the block's piston interaction type, as provided by it's material.- Overrides:
getPistonInteractionTypein classBlock- Returns:
- Current block's piston interaction type
- Mappings:
Namespace Name Mixin selector official kLafh;k()Iintermediary method_728Lnet/minecraft/class_160;method_728()Inamed getPistonInteractionTypeLnet/minecraft/block/Block;getPistonInteractionType()I
-
getRedstoneOutput
- Mappings:
Namespace Name Mixin selector official fLafd;f(Ladm;Lcj;)Iintermediary method_588Lnet/minecraft/class_153;method_588(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)Inamed getRedstoneOutputLnet/minecraft/block/AbstractPressurePlateBlock;getRedstoneOutput(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)I
-
getMinRedstoneOutput
- Mappings:
Namespace Name Mixin selector official eLafd;e(Lalz;)Iintermediary method_587Lnet/minecraft/class_153;method_587(Lnet/minecraft/class_376;)Inamed getMinRedstoneOutputLnet/minecraft/block/AbstractPressurePlateBlock;getMinRedstoneOutput(Lnet/minecraft/block/BlockState;)I
-
setRedstoneOutput
- Mappings:
Namespace Name Mixin selector official aLafd;a(Lalz;I)Lalz;intermediary method_583Lnet/minecraft/class_153;method_583(Lnet/minecraft/class_376;I)Lnet/minecraft/class_376;named setRedstoneOutputLnet/minecraft/block/AbstractPressurePlateBlock;setRedstoneOutput(Lnet/minecraft/block/BlockState;I)Lnet/minecraft/block/BlockState;
-