Package net.minecraft.block
Class BedBlock
java.lang.Object
net.minecraft.block.Block
net.minecraft.block.HorizontalFacingBlock
net.minecraft.block.BedBlock
public class BedBlock extends HorizontalFacingBlock
- Mappings:
Namespace Name official afgintermediary net/minecraft/class_158named net/minecraft/block/BedBlock
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBedBlock.BedBlockTypeNested classes/interfaces inherited from class net.minecraft.block.Block
Block.OffsetType, Block.Sound -
Field Summary
Fields Modifier and Type Field Description static EnumProperty<BedBlock.BedBlockType>BED_TYPEstatic BooleanPropertyOCCUPIEDFields inherited from class net.minecraft.block.HorizontalFacingBlock
FACINGFields 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 BedBlock() -
Method Summary
Modifier and Type Method Description protected StateManagerappendProperties()Returns a new state manager with a property array.BlockStategetBlockState(BlockState state, WorldView view, BlockPos pos)Returns the current block's blockstate at a certain positionintgetData(BlockState state)Returns the data value for a blockstate Throws anIllegalArmumentExceptionas this method does not workItemgetDropItem(BlockState blockState, Random random, int state)Returns the item that must be dropped when the block is brokenItemgetPickItem(World world, BlockPos pos)Called when a player presses the pick block key while facing the block.intgetPistonInteractionType()Returns the block's piston interaction type, as provided by it's material.RenderLayergetRenderLayerType()Returns the appropriate RenderLayer for a block.booleanhasTransperancy()static BlockPosmethod_611(World world, BlockPos blockPos, int int2)protected static booleanmethod_612(World world, BlockPos blockPos)private PlayerEntitymethod_613(World world, BlockPos blockPos)private voidmethod_614()voidneighborUpdate(World world, BlockPos pos, BlockState state, Block block)Runs when its adjacent blocks are updated.voidonBreakByPlayer(World world, BlockPos pos, BlockState state, PlayerEntity player)Runs when the block is broken by a player.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.voidrandomDropAsItem(World world, BlockPos pos, BlockState state, float chance, int id)Called when the block must be dropped as an item bydropAsItem, but luck is taken into consideration here.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, canBePlacedAdjacent, canBePlacedAtPos, canBeReplaced, canCollide, canMobSpawnInside, createStackFromBlock, disableStats, dropAsItem, dropExperience, emitsRedstonePower, get, getAmbientOcclusionLightLevel, getBlastResistance, getBlendColor, getBlockColor, getBlockFromItem, getBlockType, getBonusDrops, getBrightness, getByBlockState, getById, getCollisionBox, getColor, getColor, getComparatorOutput, getDefaultState, getDropCount, getIdByBlock, getItemGroup, getLightLevel, getMaterial, getMaterialColor, getMaxX, getMaxY, getMaxZ, getMeta, getMeta, getMinX, getMinY, getMinZ, getOffsetType, getOpacity, getSelectionBox, getStateFromData, 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, method_696, onBlockBreak, onBlockBreakStart, onBreakByPlayer, onBreaking, onCreation, onDestroyedByExplosion, onEntityCollision, onEntityCollision, onEvent, onLandedUpon, onPlaced, onSteppedOn, onUpdateTick, rainTick, randomDisplayTick, requiresSilkTouch, scheduledTick, setBlockItemBounds, setBoundingBox, setDefaultState, setEntityVelocity, setItemGroup, setLightLevel, setOpacity, setResistance, setSound, setStrength, setTickRandomly, setTranslationKey, setUnbreakable, setup, shouldDropItemsOnExplosion, ticksRandomly, toString, usesNeighbourLight
-
Field Details
-
BED_TYPE
- Mappings:
Namespace Name Mixin selector official aLafg;a:Lamm;intermediary field_570Lnet/minecraft/class_158;field_570:Lnet/minecraft/class_390;named BED_TYPELnet/minecraft/block/BedBlock;BED_TYPE:Lnet/minecraft/state/property/EnumProperty;
-
OCCUPIED
- Mappings:
Namespace Name Mixin selector official bLafg;b:Lamk;intermediary field_571Lnet/minecraft/class_158;field_571:Lnet/minecraft/class_388;named OCCUPIEDLnet/minecraft/block/BedBlock;OCCUPIED:Lnet/minecraft/state/property/BooleanProperty;
-
-
Constructor Details
-
BedBlock
public BedBlock()
-
-
Method Details
-
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
-
method_613
- Mappings:
Namespace Name Mixin selector official fLafg;f(Ladm;Lcj;)Lwn;intermediary method_613Lnet/minecraft/class_158;method_613(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)Lnet/minecraft/class_1963;named method_613Lnet/minecraft/block/BedBlock;method_613(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/entity/player/PlayerEntity;
-
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
-
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
-
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
-
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
-
getDropItem
Returns the item that must be dropped when the block is broken- Overrides:
getDropItemin classBlock- Parameters:
blockState- The block's BlockStaterandom- Random objectstate- State- Returns:
- The Item that drops after the block breaks
- Mappings:
Namespace Name Mixin selector official aLafh;a(Lalz;Ljava/util/Random;I)Lzw;intermediary method_674Lnet/minecraft/class_160;method_674(Lnet/minecraft/class_376;Ljava/util/Random;I)Lnet/minecraft/class_2054;named getDropItemLnet/minecraft/block/Block;getDropItem(Lnet/minecraft/block/BlockState;Ljava/util/Random;I)Lnet/minecraft/item/Item;
-
method_614
private void method_614()- Mappings:
Namespace Name Mixin selector official lLafg;l()Vintermediary method_614Lnet/minecraft/class_158;method_614()Vnamed method_614Lnet/minecraft/block/BedBlock;method_614()V
-
method_611
- Mappings:
Namespace Name Mixin selector official aLafg;a(Ladm;Lcj;I)Lcj;intermediary method_611Lnet/minecraft/class_158;method_611(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;I)Lnet/minecraft/class_1372;named method_611Lnet/minecraft/block/BedBlock;method_611(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;I)Lnet/minecraft/util/math/BlockPos;
-
method_612
- Mappings:
Namespace Name Mixin selector official eLafg;e(Ladm;Lcj;)Zintermediary method_612Lnet/minecraft/class_158;method_612(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)Znamed method_612Lnet/minecraft/block/BedBlock;method_612(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Z
-
randomDropAsItem
Called when the block must be dropped as an item bydropAsItem, but luck is taken into consideration here.- Overrides:
randomDropAsItemin classBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockStatechance- The chance (luck factor)id- Id- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lalz;FI)Vintermediary method_646Lnet/minecraft/class_160;method_646(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;FI)Vnamed randomDropAsItemLnet/minecraft/block/Block;randomDropAsItem(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;FI)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
-
getRenderLayerType
Returns the appropriate RenderLayer for a block. Only called on the client.- Overrides:
getRenderLayerTypein classBlock- Returns:
- The block's RenderLayer
- Mappings:
Namespace Name Mixin selector official mLafh;m()Ladf;intermediary method_731Lnet/minecraft/class_160;method_731()Lnet/minecraft/class_91;named getRenderLayerTypeLnet/minecraft/block/Block;getRenderLayerType()Lnet/minecraft/client/render/RenderLayer;
-
getPickItem
Called when a player presses the pick block key while facing the block. It returns the item that must be placed into the player's inventory.- Overrides:
getPickItemin classBlock- Returns:
- The Item that must be placed into the player's inventory
- Mappings:
Namespace Name Mixin selector official cLafh;c(Ladm;Lcj;)Lzw;intermediary method_702Lnet/minecraft/class_160;method_702(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)Lnet/minecraft/class_2054;named getPickItemLnet/minecraft/block/Block;getPickItem(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/item/Item;
-
onBreakByPlayer
Runs when the block is broken by a player.- Overrides:
onBreakByPlayerin classBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockStateplayer- The player who broke the block- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lalz;Lwn;)Vintermediary method_653Lnet/minecraft/class_160;method_653(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1963;)Vnamed onBreakByPlayerLnet/minecraft/block/Block;onBreakByPlayer(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/player/PlayerEntity;)V
-
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;
-
getBlockState
Returns the current block's blockstate at a certain position- Overrides:
getBlockStatein classBlock- Parameters:
state- The original blockstateview- WorldView instancepos- The block's position- Returns:
- state
- Mappings:
Namespace Name Mixin selector official aLafh;a(Lalz;Ladq;Lcj;)Lalz;intermediary method_673Lnet/minecraft/class_160;method_673(Lnet/minecraft/class_376;Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Lnet/minecraft/class_376;named getBlockStateLnet/minecraft/block/Block;getBlockState(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)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;
-