Package net.minecraft.block
Class LeverBlock
java.lang.Object
net.minecraft.block.Block
net.minecraft.block.LeverBlock
public class LeverBlock extends Block
- Mappings:
Namespace Name official ahuintermediary net/minecraft/class_241named net/minecraft/block/LeverBlock
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLeverBlock.LeverTypeNested classes/interfaces inherited from class net.minecraft.block.Block
Block.OffsetType, Block.Sound -
Field Summary
Fields Modifier and Type Field Description static EnumProperty<LeverBlock.LeverType>FACINGstatic BooleanPropertyPOWEREDFields 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 protectedLeverBlock() -
Method Summary
Modifier and Type Method Description protected StateManagerappendProperties()Returns a new state manager with a property array.booleancanBePlacedAdjacent(World world, BlockPos pos, Direction direction)Returns whether blocks can be placed adjacent to it.booleancanBePlacedAtPos(World world, BlockPos pos)Returns whether the current block can be placed at a certainBlockPosbooleanemitsRedstonePower()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 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 idintgetStrongRedstonePower(WorldView view, BlockPos pos, BlockState state, Direction facing)Returns the block's strong redstone power.intgetWeakRedstonePower(WorldView view, BlockPos pos, BlockState state, Direction facing)Returns the block's weak redstone power.booleanhasTransperancy()protected static booleanmethod_895(World world, BlockPos blockPos, Direction direction)static intmethod_896(Direction direction)private booleanmethod_897(World world, BlockPos blockPos, BlockState blockState)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).booleanonUse(World world, BlockPos pos, BlockState state, PlayerEntity player, Direction direction, float float2, float float3, float float4)Runs when the block is used, i.e.booleanrenderAsNormalBlock()Returns whether the block can be rendered as a normal blockvoidsetBoundingBox(WorldView view, BlockPos pos)BlockStatestateFromData(int data)Returns a blockstate of the current block from it's idMethods inherited from class net.minecraft.block.Block
appendCollisionBoxes, appendItemStacks, areBlocksEqual, blocksMovement, calcBlockBreakingData, canBeReplaced, canCollide, canMobSpawnInside, createStackFromBlock, disableStats, dropAsItem, dropExperience, 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, getTickRate, 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, onEntityCollision, onEvent, onLandedUpon, onPlaced, onSteppedOn, onUpdateTick, rainTick, randomDisplayTick, randomDropAsItem, requiresSilkTouch, scheduledTick, setBlockItemBounds, setBoundingBox, setDefaultState, setEntityVelocity, setItemGroup, setLightLevel, setOpacity, setResistance, setSound, setStrength, setTickRandomly, setTranslationKey, setUnbreakable, setup, shouldDropItemsOnExplosion, ticksRandomly, toString, usesNeighbourLight
-
Field Details
-
FACING
- Mappings:
Namespace Name Mixin selector official aLahu;a:Lamm;intermediary field_1013Lnet/minecraft/class_241;field_1013:Lnet/minecraft/class_390;named FACINGLnet/minecraft/block/LeverBlock;FACING:Lnet/minecraft/state/property/EnumProperty;
-
POWERED
- Mappings:
Namespace Name Mixin selector official bLahu;b:Lamk;intermediary field_1014Lnet/minecraft/class_241;field_1014:Lnet/minecraft/class_388;named POWEREDLnet/minecraft/block/LeverBlock;POWERED:Lnet/minecraft/state/property/BooleanProperty;
-
-
Constructor Details
-
LeverBlock
protected LeverBlock()
-
-
Method Details
-
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
-
canBePlacedAdjacent
Returns whether blocks can be placed adjacent to it.- Overrides:
canBePlacedAdjacentin classBlock- Parameters:
world- The world that the block is placed inpos- The block's positiondirection- The block's direction- Returns:
- Whether blocks can be placed adjacent to it
- Mappings:
Namespace Name Mixin selector official bLafh;b(Ladm;Lcj;Lcq;)Zintermediary method_691Lnet/minecraft/class_160;method_691(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_1383;)Znamed canBePlacedAdjacentLnet/minecraft/block/Block;canBePlacedAdjacent(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)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
-
method_895
- Mappings:
Namespace Name Mixin selector official aLahu;a(Ladm;Lcj;Lcq;)Zintermediary method_895Lnet/minecraft/class_241;method_895(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_1383;)Znamed method_895Lnet/minecraft/block/LeverBlock;method_895(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)Z
-
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_896
- Mappings:
Namespace Name Mixin selector official aLahu;a(Lcq;)Iintermediary method_896Lnet/minecraft/class_241;method_896(Lnet/minecraft/class_1383;)Inamed method_896Lnet/minecraft/block/LeverBlock;method_896(Lnet/minecraft/util/math/Direction;)I
-
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
-
method_897
- Mappings:
Namespace Name Mixin selector official eLahu;e(Ladm;Lcj;Lalz;)Zintermediary method_897Lnet/minecraft/class_241;method_897(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)Znamed method_897Lnet/minecraft/block/LeverBlock;method_897(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)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
-
onUse
public boolean onUse(World world, BlockPos pos, BlockState state, PlayerEntity player, Direction direction, float float2, float float3, float float4)Runs when the block is used, i.e. right clicked in most cases. It is similar to the same method in Item, but this method is called only when the player uses it when the block is placed, not when the player is holding the BlockItem.- Overrides:
onUsein classBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockStateplayer- The player who used the blockdirection- The direction that the block is facing- Returns:
- Whether the action is succesful
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lalz;Lwn;Lcq;FFF)Zintermediary method_654Lnet/minecraft/class_160;method_654(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1963;Lnet/minecraft/class_1383;FFF)Znamed onUseLnet/minecraft/block/Block;onUse(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/math/Direction;FFF)Z
-
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
-
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
-
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;
-