Package net.minecraft.block
Class Block
java.lang.Object
net.minecraft.block.Block
- Direct Known Subclasses:
AbstractButtonBlock,AbstractFluidBlock,AbstractPressurePlateBlock,AbstractRailBlock,AirBlock,BarrierBlock,BaseLeavesBlock,BigMushroomBlock,BlockWithEntity,BookshelfBlock,CactusBlock,CakeBlock,CarpetBlock,CauldronBlock,ClayBlock,CobwebBlock,CraftingTableBlock,DirtBlock,DoorBlock,DragonEggBlock,EndPortalFrameBlock,FallingBlock,FarmlandBlock,FenceBlock,FireBlock,GlowstoneBlock,GrassBlock,HardenedClayBlock,HorizontalFacingBlock,InfestedBlock,LadderBlock,LeverBlock,MelonBlock,MyceliumBlock,NetherBrickBlock,NetherrackBlock,ObsidianBlock,OreBlock,PackedIceBlock,PaneBlock,PillarBlock,PistonBlock,PistonHeadBlock,PlanksBlock,PlantBlock,PrismarineBlock,QuartzBlock,RedSandstoneBlock,RedstoneBlock,RedstoneLampBlock,RedstoneOreBlock,RedstoneWireBlock,SandstoneBlock,SeaLanternBlock,SlabBlock,SnowBlock,SnowLayerBlock,SoulSandBlock,SpongeBlock,StairsBlock,StoneBlock,StoneBrickBlock,SugarCaneBlock,TntBlock,TorchBlock,TransparentBlock,TrapdoorBlock,TripwireBlock,TripwireHookBlock,VineBlock,WallBlock,WoolBlock
The Block class provides useful methods and fields for creation of Blocks.
All blocks extend the Block class.
The Block class also registers all the blocks.
- Mappings:
Namespace Name official afhintermediary net/minecraft/class_197named net/minecraft/block/Block
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final IdentifierThe Identifier for Airstatic final Block.SoundAnvil sound typeprotected floatStores the current block's resistancestatic final IdList<BlockState>A List of all blockstates, used by Debug worldsprotected booleanSpecifies whether the current block has a block entityprotected doubleStores the Maximum value on the X axis for the voxel shapeprotected doubleStores the Maximum value on the Y axis for the voxel shapeprotected doubleStores the Maximum value on the Z axis for the voxel shapeprotected doubleStores the Minimum value on the X axis for the voxel shapeprotected doubleStores the Minimum value on the Y axis for the voxel shapeprotected doubleStores the Minimum value on the Z axis for the voxel shapestatic final Block.SoundCloth sound typeprivate BlockStateStores the block's default stateprotected booleanSpecifies whether the current block is a full blockstatic final Block.SoundGlass sound typestatic final Block.SoundGrass sound typestatic final Block.SoundGravel sound typeprotected floatStores the current block's hardnessprivate ItemGroupstatic final Block.SoundLadder sound typeprotected intStores the block's luminescenceprotected final MaterialStores the current block's materialprotected final MaterialColorStores the current block's material colorprotected intStores the light opacity of the blockstatic final Block.SoundOre sound typefloatStores the current block's particles' gravitystatic final Block.SoundRail sound typeprotected booleanSpecifies whether the current block ticks randomlystatic final BiDefaultedRegistry<Identifier,Block> The Registry object to which all blocks get registered tostatic final Block.SoundSand sound typestatic final Block.SoundSlime sound typefloatStores the current block's slipperiness Used By Ice and Packed Icestatic final Block.SoundSnow sound typeStores the current block's sound typeprotected final StateManagerStores the block's state managerprotected booleanSpecifies whether the current block is tracked for statsstatic final Block.SoundStone sound typeprivate StringStores the block's translation keyprotected booleanSpecifies whether the current block is transluscentprotected booleanstatic final Block.SoundWood sound type -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedOverloaded Block constructor that calls the other with the default material colorBlock(Material material, MaterialColor color) Block constructor which initializes all fields to their default values and assigns the material and material color to the specified parameters -
Method Summary
Modifier and TypeMethodDescriptionvoidappendCollisionBoxes(World world, BlockPos pos, BlockState state, Box box, List<Box> list, Entity entity) voidappendItemStacks(Item item, ItemGroup group, List<ItemStack> stacks) Appends ItemStacks to an itemgroup.protected StateManagerReturns a new state manager with a property array.static booleanareBlocksEqual(Block one, Block two) Returns whether two blocks are equal.booleanblocksMovement(BlockView view, BlockPos pos) floatcalcBlockBreakingData(PlayerEntity player, World world, BlockPos pos) Calculates how fast or slow the block must be broken by a Player.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 certainBlockPosbooleancanBeReplaced(World world, BlockPos pos, Direction dir, ItemStack stack) Returns whether the current block can be replaced.booleancanCollide(BlockState state, boolean bl) Returns whether entities can collide with the blockbooleanReturns whether mobs can spawn inside the block.protected ItemStackcreateStackFromBlock(BlockState state) Creates and returns and ItemStack from a block.protected BlockDisables tracking by stats for the current block.final voiddropAsItem(World world, BlockPos pos, BlockState state, int id) Runs when the block must be dropped as an item.protected voiddropExperience(World world, BlockPos pos, int size) Runs when the block is broken to drop experience.booleanReturns whether the current block emits a redstone signal.static BlockReturns a block from it's namefloatReturns the block's ambient occlusion light level on the basis of whether it is a normal block.floatgetBlastResistance(Entity entity) Returns the block's blast resistance as per the entity provided.final intgetBlendColor(BlockView world, BlockPos pos) intgetBlockColor(BlockView view, BlockPos pos, int id) Returns the current block's colorstatic BlockgetBlockFromItem(Item item) Returns a block by converting a blockitem to a blockgetBlockState(BlockState state, BlockView view, BlockPos pos) Returns the current block's blockstate at a certain positionintintgetBonusDrops(int id, Random rand) Returns the number bonus drops for a block when broken.intgetBrightness(BlockView blockView, BlockPos pos) static intgetByBlockState(BlockState state) Returns a certain Block's id from a blockstatestatic BlockgetById(int id) Returns a certain block from its idgetCollisionBox(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 BoxintgetColor()intgetColor(BlockState state) intgetComparatorOutput(World world, BlockPos pos) Returns the block's comparator output value.intgetData(BlockState state) Returns the data value for a blockstate Throws anIllegalArmumentExceptionas this method does not workfinal BlockStateReturns the block's default BlockState.intgetDropCount(Random rand) Returns the amount of items the block should drop on breaking without bonus rolls.getDropItem(BlockState blockState, Random random, int state) Returns the item that must be dropped when the block is brokenstatic intgetIdByBlock(Block block) Returns a certain block's idReturns the block's ItemGroup.intReturns the block's luminescenceReturns the block's materialgetMaterialColor(BlockState state) Returns the block's material color from it's state Blockstates can have different material colorsfinal doublegetMaxX()Returns the block's bounding box' minimum Y valuefinal doublegetMaxY()Returns the block's bounding box' maximum X valuefinal doublegetMaxZ()Returns the block's bounding box' maximum Z valueintgetMeta(BlockState state) Returns the metadata value for a certain BlockStateintReturns metadata from a world and a BlockPosfinal doublegetMinX()Returns the block's bounding box' minimum X valuefinal doublegetMinY()Returns the block's bounding box' minimum Z valuefinal doublegetMinZ()Returns the block's bounding box' maximum Y valueReturns the block's offset type.intReturns the current block's opacitygetPickItem(World world, BlockPos pos) Called when a player presses the pick block key while facing the block.intReturns the block's piston interaction type, as provided by it's material.Returns the appropriate RenderLayer for a block.getSelectionBox(World world, BlockPos pos) getStateFromData(World world, BlockPos pos, Direction dir, float float2, float float3, float float4, int id, LivingEntity entity) Returns a BlockState from an idstatic BlockStategetStateFromRawId(int id) Returns a BlockState from it's idReturns the current state manager.floatgetStrength(World world, BlockPos pos) Returns the current block's strengthintgetStrongRedstonePower(BlockView view, BlockPos pos, BlockState state, Direction facing) Returns the block's strong redstone power.intgetTickRate(World world) Returns the block's tick rate.Translates and returns the translation keyReturns the block's translation keyintgetWeakRedstonePower(BlockView view, BlockPos pos, BlockState state, Direction facing) Returns the block's weak redstone power.voidharvest(World world, PlayerEntity player, BlockPos pos, BlockState state, BlockEntity be) Runs every time a player begins to break the block.booleanReturns whether the current block has a block entitybooleanReturns whether a block has collision, i.e.booleanhasCollision(BlockView blockView, BlockPos pos, Direction direction) booleanReturns whether the block provides comparator output.booleanhasStats()Returns whether the current block should be tracked for statsbooleanbooleanReturns whether the current block and another block are equalbooleanisFire()booleanbooleanChecks whether the current block is a full blockbooleanChecks whether the current block is a full cube.booleanChecks whether the current block is a normal block (used only byLeavesBlock)booleanChecks whether the block is a normal block.booleanisReplaceable(World world, BlockPos pos) booleanisSideInvisible(BlockView view, BlockPos pos, Direction facing) Returns whether the current block has connected sides, i.e its side faces are invisible when covered by other blocks.booleanChecks whether the current block is transluscentprivate booleanmethod_402(Vec3d vec) method_414(World world, BlockPos pos, Vec3d vec1, Vec3d vec2) private booleanmethod_432(Vec3d vec) private booleanmethod_443(Vec3d vec) method_8666(BlockState blockState) voidneighborUpdate(World world, BlockPos pos, BlockState state, Block block) Runs when its adjacent blocks are updated.static voidonBlockBreak(World world, BlockPos pos, ItemStack item) Runs when a block is brokenvoidonBlockBreakStart(World world, BlockPos pos, PlayerEntity player) voidonBreakByPlayer(World world, BlockPos pos, BlockState state) Runs when the block is broken by the playervoidonBreakByPlayer(World world, BlockPos pos, BlockState state, PlayerEntity player) Runs when the block is broken by a player.voidonBreaking(World world, BlockPos pos, BlockState state) Runs when the block is removed (by an entity or explosion).voidonCreation(World world, BlockPos pos, BlockState state) Runs when the block is placed (by a player or enderman).voidonDestroyedByExplosion(World world, BlockPos pos, Explosion explosion) voidonEntityCollision(World world, BlockPos pos, BlockState state, Entity entity) Runs every time an entity collides with the blockonEntityCollision(World world, BlockPos pos, Entity entity, Vec3d velocity) booleanonEvent(World world, BlockPos pos, BlockState state, int id, int meta) Runs when an event takes placevoidonLandedUpon(World world, BlockPos pos, Entity entity, float distance) Runs when an entity falls on the block.voidonPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) Runs when the block is placed by an entityvoidonSteppedOn(World world, BlockPos pos, Entity entity) Runs every time an entity steps on the Block.voidonUpdateTick(World world, BlockPos pos, BlockState state, Random rand) Runs when the block is updatedbooleanonUse(World world, BlockPos pos, BlockState state, PlayerEntity player, Direction direction, float float2, float float3, float float4) Runs when the block is used, i.e.voidRuns every tick when raining.voidrandomDisplayTick(World world, BlockPos pos, BlockState state, Random rand) Runs every random display Tick.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.private static voidRegisters a block to the registryprivate static voidregister(int id, Identifier identifier, Block block) Registers a block to the registrybooleanReturns whether the block can be rendered as a normal blockprotected booleanvoidscheduledTick(World world, BlockPos pos, BlockState state, Random rand) Runs when the block is updated as per a schedulevoidSets the bounds for the BlockItemprotected final voidsetBoundingBox(float minX, float minY, float minZ, float maxX, float maxY, float maxZ) Sets the block's bounding box.voidsetBoundingBox(BlockView view, BlockPos pos) protected final voidsetDefaultState(BlockState state) Sets the block's default BlockState.voidsetEntityVelocity(World world, Entity entity) Sets the speed of an entity moving on the blocksetItemGroup(ItemGroup group) Sets the block's ItemGroup.protected BlocksetLightLevel(float lightLevel) Sets the block's luminescence.protected BlocksetOpacity(int opacity) Sets the block's light opacity.protected BlocksetResistance(float resistance) Sets the block's resistance.protected BlocksetSound(Block.Sound sound) Sets the block's sound type.protected BlocksetStrength(float strength) Sets the current block's strength.protected BlocksetTickRandomly(boolean tickRandomly) Sets whether the current block has random ticks.setTranslationKey(String key) Sets the block's localization key.protected BlockSets the current block as unbreakable.static voidsetup()Registers all blocksbooleanshouldDropItemsOnExplosion(Explosion explosion) Returns whether the block should drop as an Item during an explosion.stateFromData(int data) Returns a blockstate of the current block from it's idbooleanReturns whether the current block has random tickstoString()booleanChecks whether the current block uses light from the adjacent block
-
Field Details
-
AIR_ID
The Identifier for Air- Mappings:
Namespace Name Mixin selector official aLafh;a:Ljy;intermediary field_9282Lnet/minecraft/class_197;field_9282:Lnet/minecraft/class_1653;named AIR_IDLnet/minecraft/block/Block;AIR_ID:Lnet/minecraft/util/Identifier;
-
REGISTRY
The Registry object to which all blocks get registered to- Mappings:
Namespace Name Mixin selector official cLafh;c:Lco;intermediary field_9283Lnet/minecraft/class_197;field_9283:Lnet/minecraft/class_1940;named REGISTRYLnet/minecraft/block/Block;REGISTRY:Lnet/minecraft/util/registry/BiDefaultedRegistry;
-
BLOCK_STATES
A List of all blockstates, used by Debug worlds- Mappings:
Namespace Name Mixin selector official dLafh;d:Lct;intermediary field_9284Lnet/minecraft/class_197;field_9284:Lnet/minecraft/class_1942;named BLOCK_STATESLnet/minecraft/block/Block;BLOCK_STATES:Lnet/minecraft/util/collection/IdList;
-
ORE
Ore sound type- Mappings:
Namespace Name Mixin selector official eLafh;e:Lafh$b;intermediary field_483Lnet/minecraft/class_197;field_483:Lnet/minecraft/class_197$class_200;named ORELnet/minecraft/block/Block;ORE:Lnet/minecraft/block/Block$Sound;
-
WOOD
Wood sound type- Mappings:
Namespace Name Mixin selector official fLafh;f:Lafh$b;intermediary field_484Lnet/minecraft/class_197;field_484:Lnet/minecraft/class_197$class_200;named WOODLnet/minecraft/block/Block;WOOD:Lnet/minecraft/block/Block$Sound;
-
GRAVEL
Gravel sound type- Mappings:
Namespace Name Mixin selector official gLafh;g:Lafh$b;intermediary field_7261Lnet/minecraft/class_197;field_7261:Lnet/minecraft/class_197$class_200;named GRAVELLnet/minecraft/block/Block;GRAVEL:Lnet/minecraft/block/Block$Sound;
-
GRASS
Grass sound type- Mappings:
Namespace Name Mixin selector official hLafh;h:Lafh$b;intermediary field_486Lnet/minecraft/class_197;field_486:Lnet/minecraft/class_197$class_200;named GRASSLnet/minecraft/block/Block;GRASS:Lnet/minecraft/block/Block$Sound;
-
STONE
Stone sound type- Mappings:
Namespace Name Mixin selector official iLafh;i:Lafh$b;intermediary field_487Lnet/minecraft/class_197;field_487:Lnet/minecraft/class_197$class_200;named STONELnet/minecraft/block/Block;STONE:Lnet/minecraft/block/Block$Sound;
-
RAIL
Rail sound type- Mappings:
Namespace Name Mixin selector official jLafh;j:Lafh$b;intermediary field_7262Lnet/minecraft/class_197;field_7262:Lnet/minecraft/class_197$class_200;named RAILLnet/minecraft/block/Block;RAIL:Lnet/minecraft/block/Block$Sound;
-
GLASS
Glass sound type- Mappings:
Namespace Name Mixin selector official kLafh;k:Lafh$b;intermediary field_7263Lnet/minecraft/class_197;field_7263:Lnet/minecraft/class_197$class_200;named GLASSLnet/minecraft/block/Block;GLASS:Lnet/minecraft/block/Block$Sound;
-
CLOTH
Cloth sound type- Mappings:
Namespace Name Mixin selector official lLafh;l:Lafh$b;intermediary field_7264Lnet/minecraft/class_197;field_7264:Lnet/minecraft/class_197$class_200;named CLOTHLnet/minecraft/block/Block;CLOTH:Lnet/minecraft/block/Block$Sound;
-
SAND
Sand sound type- Mappings:
Namespace Name Mixin selector official mLafh;m:Lafh$b;intermediary field_7265Lnet/minecraft/class_197;field_7265:Lnet/minecraft/class_197$class_200;named SANDLnet/minecraft/block/Block;SAND:Lnet/minecraft/block/Block$Sound;
-
SNOW
Snow sound type- Mappings:
Namespace Name Mixin selector official nLafh;n:Lafh$b;intermediary field_7266Lnet/minecraft/class_197;field_7266:Lnet/minecraft/class_197$class_200;named SNOWLnet/minecraft/block/Block;SNOW:Lnet/minecraft/block/Block$Sound;
-
LADDER
Ladder sound type- Mappings:
Namespace Name Mixin selector official oLafh;o:Lafh$b;intermediary field_7267Lnet/minecraft/class_197;field_7267:Lnet/minecraft/class_197$class_200;named LADDERLnet/minecraft/block/Block;LADDER:Lnet/minecraft/block/Block$Sound;
-
ANVIL
Anvil sound type- Mappings:
Namespace Name Mixin selector official pLafh;p:Lafh$b;intermediary field_7268Lnet/minecraft/class_197;field_7268:Lnet/minecraft/class_197$class_200;named ANVILLnet/minecraft/block/Block;ANVIL:Lnet/minecraft/block/Block$Sound;
-
SLIME
Slime sound type- Mappings:
Namespace Name Mixin selector official qLafh;q:Lafh$b;intermediary field_9285Lnet/minecraft/class_197;field_9285:Lnet/minecraft/class_197$class_200;named SLIMELnet/minecraft/block/Block;SLIME:Lnet/minecraft/block/Block$Sound;
-
itemGroup
- Mappings:
Namespace Name Mixin selector official bLafh;b:Lyz;intermediary field_372Lnet/minecraft/class_197;field_372:Lnet/minecraft/class_1041;named itemGroupLnet/minecraft/block/Block;itemGroup:Lnet/minecraft/item/itemgroup/ItemGroup;
-
fullBlock
protected boolean fullBlockSpecifies whether the current block is a full block- Mappings:
Namespace Name Mixin selector official rLafh;r:Zintermediary field_7269Lnet/minecraft/class_197;field_7269:Znamed fullBlockLnet/minecraft/block/Block;fullBlock:Z
-
opacity
protected int opacityStores the light opacity of the block- Mappings:
Namespace Name Mixin selector official sLafh;s:Iintermediary field_7270Lnet/minecraft/class_197;field_7270:Inamed opacityLnet/minecraft/block/Block;opacity:I
-
transluscent
protected boolean transluscentSpecifies whether the current block is transluscent- Mappings:
Namespace Name Mixin selector official tLafh;t:Zintermediary field_7271Lnet/minecraft/class_197;field_7271:Znamed transluscentLnet/minecraft/block/Block;transluscent:Z
-
lightLevel
protected int lightLevelStores the block's luminescence- Mappings:
Namespace Name Mixin selector official uLafh;u:Iintermediary field_7272Lnet/minecraft/class_197;field_7272:Inamed lightLevelLnet/minecraft/block/Block;lightLevel:I
-
useNeighbourLight
protected boolean useNeighbourLight- Mappings:
Namespace Name Mixin selector official vLafh;v:Zintermediary field_7273Lnet/minecraft/class_197;field_7273:Znamed useNeighbourLightLnet/minecraft/block/Block;useNeighbourLight:Z
-
hardness
protected float hardnessStores the current block's hardness- Mappings:
Namespace Name Mixin selector official wLafh;w:Fintermediary field_467Lnet/minecraft/class_197;field_467:Fnamed hardnessLnet/minecraft/block/Block;hardness:F
-
blastResistance
protected float blastResistanceStores the current block's resistance- Mappings:
Namespace Name Mixin selector official xLafh;x:Fintermediary field_468Lnet/minecraft/class_197;field_468:Fnamed blastResistanceLnet/minecraft/block/Block;blastResistance:F
-
stats
protected boolean statsSpecifies whether the current block is tracked for stats- Mappings:
Namespace Name Mixin selector official yLafh;y:Zintermediary field_470Lnet/minecraft/class_197;field_470:Znamed statsLnet/minecraft/block/Block;stats:Z
-
randomTicks
protected boolean randomTicksSpecifies whether the current block ticks randomly- Mappings:
Namespace Name Mixin selector official zLafh;z:Zintermediary field_471Lnet/minecraft/class_197;field_471:Znamed randomTicksLnet/minecraft/block/Block;randomTicks:Z
-
blockEntity
protected boolean blockEntitySpecifies whether the current block has a block entity- Mappings:
Namespace Name Mixin selector official ALafh;A:Zintermediary field_472Lnet/minecraft/class_197;field_472:Znamed blockEntityLnet/minecraft/block/Block;blockEntity:Z
-
boundingBoxMinX
protected double boundingBoxMinXStores the Minimum value on the X axis for the voxel shape- Mappings:
Namespace Name Mixin selector official BLafh;B:Dintermediary field_473Lnet/minecraft/class_197;field_473:Dnamed boundingBoxMinXLnet/minecraft/block/Block;boundingBoxMinX:D
-
boundingBoxMinY
protected double boundingBoxMinYStores the Minimum value on the Y axis for the voxel shape- Mappings:
Namespace Name Mixin selector official CLafh;C:Dintermediary field_474Lnet/minecraft/class_197;field_474:Dnamed boundingBoxMinYLnet/minecraft/block/Block;boundingBoxMinY:D
-
boundingBoxMinZ
protected double boundingBoxMinZStores the Minimum value on the Z axis for the voxel shape- Mappings:
Namespace Name Mixin selector official DLafh;D:Dintermediary field_475Lnet/minecraft/class_197;field_475:Dnamed boundingBoxMinZLnet/minecraft/block/Block;boundingBoxMinZ:D
-
boundingBoxMaxX
protected double boundingBoxMaxXStores the Maximum value on the X axis for the voxel shape- Mappings:
Namespace Name Mixin selector official ELafh;E:Dintermediary field_476Lnet/minecraft/class_197;field_476:Dnamed boundingBoxMaxXLnet/minecraft/block/Block;boundingBoxMaxX:D
-
boundingBoxMaxY
protected double boundingBoxMaxYStores the Maximum value on the Y axis for the voxel shape- Mappings:
Namespace Name Mixin selector official FLafh;F:Dintermediary field_477Lnet/minecraft/class_197;field_477:Dnamed boundingBoxMaxYLnet/minecraft/block/Block;boundingBoxMaxY:D
-
boundingBoxMaxZ
protected double boundingBoxMaxZStores the Maximum value on the Z axis for the voxel shape- Mappings:
Namespace Name Mixin selector official GLafh;G:Dintermediary field_478Lnet/minecraft/class_197;field_478:Dnamed boundingBoxMaxZLnet/minecraft/block/Block;boundingBoxMaxZ:D
-
sound
Stores the current block's sound type- Mappings:
Namespace Name Mixin selector official HLafh;H:Lafh$b;intermediary field_479Lnet/minecraft/class_197;field_479:Lnet/minecraft/class_197$class_200;named soundLnet/minecraft/block/Block;sound:Lnet/minecraft/block/Block$Sound;
-
particleGravity
public float particleGravityStores the current block's particles' gravity- Mappings:
Namespace Name Mixin selector official ILafh;I:Fintermediary field_480Lnet/minecraft/class_197;field_480:Fnamed particleGravityLnet/minecraft/block/Block;particleGravity:F
-
material
Stores the current block's material- See Also:
- Mappings:
Namespace Name Mixin selector official JLafh;J:Larm;intermediary field_481Lnet/minecraft/class_197;field_481:Lnet/minecraft/class_63;named materialLnet/minecraft/block/Block;material:Lnet/minecraft/block/Material;
-
materialColor
Stores the current block's material color- See Also:
- Mappings:
Namespace Name Mixin selector official KLafh;K:Larn;intermediary field_9279Lnet/minecraft/class_197;field_9279:Lnet/minecraft/class_65;named materialColorLnet/minecraft/block/Block;materialColor:Lnet/minecraft/block/MaterialColor;
-
slipperiness
public float slipperinessStores the current block's slipperiness Used By Ice and Packed Ice- Mappings:
Namespace Name Mixin selector official LLafh;L:Fintermediary field_482Lnet/minecraft/class_197;field_482:Fnamed slipperinessLnet/minecraft/block/Block;slipperiness:F
-
stateManager
Stores the block's state manager- Mappings:
Namespace Name Mixin selector official MLafh;M:Lama;intermediary field_9280Lnet/minecraft/class_197;field_9280:Lnet/minecraft/class_2233;named stateManagerLnet/minecraft/block/Block;stateManager:Lnet/minecraft/state/StateManager;
-
defaultState
Stores the block's default state- Mappings:
Namespace Name Mixin selector official NLafh;N:Lalz;intermediary field_9281Lnet/minecraft/class_197;field_9281:Lnet/minecraft/class_2232;named defaultStateLnet/minecraft/block/Block;defaultState:Lnet/minecraft/block/BlockState;
-
translationKey
Stores the block's translation key- Mappings:
Namespace Name Mixin selector official OLafh;O:Ljava/lang/String;intermediary field_425Lnet/minecraft/class_197;field_425:Ljava/lang/String;named translationKeyLnet/minecraft/block/Block;translationKey:Ljava/lang/String;
-
-
Constructor Details
-
Block
Block constructor which initializes all fields to their default values and assigns the material and material color to the specified parameters- 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_197;<init>(Lnet/minecraft/class_63;Lnet/minecraft/class_65;)Vnamed <init>Lnet/minecraft/block/Block;<init>(Lnet/minecraft/block/Material;Lnet/minecraft/block/MaterialColor;)V
-
Block
Overloaded Block constructor that calls the other with the default material color- Parameters:
material- The block's material- Mappings:
Namespace Name Mixin selector official <init>Lafh;<init>(Larm;)Vintermediary <init>Lnet/minecraft/class_197;<init>(Lnet/minecraft/class_63;)Vnamed <init>Lnet/minecraft/block/Block;<init>(Lnet/minecraft/block/Material;)V
-
-
Method Details
-
getIdByBlock
Returns a certain block's id- Parameters:
block- The block for which the id is returned- Returns:
- Block id
- Mappings:
Namespace Name Mixin selector official aLafh;a(Lafh;)Iintermediary method_6445Lnet/minecraft/class_197;method_6445(Lnet/minecraft/class_197;)Inamed getIdByBlockLnet/minecraft/block/Block;getIdByBlock(Lnet/minecraft/block/Block;)I
-
getByBlockState
Returns a certain Block's id from a blockstate- Parameters:
state- The BlockState for which the id is returned- Returns:
- Block id
- Mappings:
Namespace Name Mixin selector official fLafh;f(Lalz;)Iintermediary method_8677Lnet/minecraft/class_197;method_8677(Lnet/minecraft/class_2232;)Inamed getByBlockStateLnet/minecraft/block/Block;getByBlockState(Lnet/minecraft/block/BlockState;)I
-
getById
Returns a certain block from its id- Parameters:
id- The id for which the Block is returned- Returns:
- The Block
- Mappings:
Namespace Name Mixin selector official cLafh;c(I)Lafh;intermediary method_6448Lnet/minecraft/class_197;method_6448(I)Lnet/minecraft/class_197;named getByIdLnet/minecraft/block/Block;getById(I)Lnet/minecraft/block/Block;
-
getStateFromRawId
Returns a BlockState from it's id- Parameters:
id- The BlockState's id- Returns:
- The Blockstate
- Mappings:
Namespace Name Mixin selector official dLafh;d(I)Lalz;intermediary method_8672Lnet/minecraft/class_197;method_8672(I)Lnet/minecraft/class_2232;named getStateFromRawIdLnet/minecraft/block/Block;getStateFromRawId(I)Lnet/minecraft/block/BlockState;
-
getBlockFromItem
Returns a block by converting a blockitem to a block- Parameters:
item- The item that must be converted to a block- Returns:
- The block
- Mappings:
Namespace Name Mixin selector official aLafh;a(Lzw;)Lafh;intermediary method_6442Lnet/minecraft/class_197;method_6442(Lnet/minecraft/class_1069;)Lnet/minecraft/class_197;named getBlockFromItemLnet/minecraft/block/Block;getBlockFromItem(Lnet/minecraft/item/Item;)Lnet/minecraft/block/Block;
-
get
Returns a block from it's name- Parameters:
id- The block's name- Returns:
- The block
- Mappings:
Namespace Name Mixin selector official bLafh;b(Ljava/lang/String;)Lafh;intermediary method_6446Lnet/minecraft/class_197;method_6446(Ljava/lang/String;)Lnet/minecraft/class_197;named getLnet/minecraft/block/Block;get(Ljava/lang/String;)Lnet/minecraft/block/Block;
-
isFullBlock
public boolean isFullBlock()Checks whether the current block is a full block- Returns:
- fullBlock
- Mappings:
Namespace Name Mixin selector official oLafh;o()Zintermediary method_6451Lnet/minecraft/class_197;method_6451()Znamed isFullBlockLnet/minecraft/block/Block;isFullBlock()Z
-
getOpacity
public int getOpacity()Returns the current block's opacity- Returns:
- opacity
- Mappings:
Namespace Name Mixin selector official pLafh;p()Iintermediary method_6452Lnet/minecraft/class_197;method_6452()Inamed getOpacityLnet/minecraft/block/Block;getOpacity()I
-
isTransluscent
Checks whether the current block is transluscent- Returns:
- transluscent
- Mappings:
Namespace Name Mixin selector official qLafh;q()Zintermediary method_6453Lnet/minecraft/class_197;method_6453()Znamed isTransluscentLnet/minecraft/block/Block;isTransluscent()Z
-
getLightLevel
public int getLightLevel()Returns the block's luminescence- Returns:
- lightLevel
- Mappings:
Namespace Name Mixin selector official rLafh;r()Iintermediary method_6454Lnet/minecraft/class_197;method_6454()Inamed getLightLevelLnet/minecraft/block/Block;getLightLevel()I
-
usesNeighbourLight
public boolean usesNeighbourLight()Checks whether the current block uses light from the adjacent block- Returns:
- useNeighbourLight
- Mappings:
Namespace Name Mixin selector official sLafh;s()Zintermediary method_6455Lnet/minecraft/class_197;method_6455()Znamed usesNeighbourLightLnet/minecraft/block/Block;usesNeighbourLight()Z
-
getMaterial
Returns the block's material- Returns:
- material
- Mappings:
Namespace Name Mixin selector official tLafh;t()Larm;intermediary method_6456Lnet/minecraft/class_197;method_6456()Lnet/minecraft/class_63;named getMaterialLnet/minecraft/block/Block;getMaterial()Lnet/minecraft/block/Material;
-
getMaterialColor
Returns the block's material color from it's state Blockstates can have different material colors- Parameters:
state- The Blockstate for which the material color is returned- Returns:
- materialColor
- Mappings:
Namespace Name Mixin selector official gLafh;g(Lalz;)Larn;intermediary method_8680Lnet/minecraft/class_197;method_8680(Lnet/minecraft/class_2232;)Lnet/minecraft/class_65;named getMaterialColorLnet/minecraft/block/Block;getMaterialColor(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/MaterialColor;
-
stateFromData
Returns a blockstate of the current block from it's id- Parameters:
data- The Blockstate's associated data value- Returns:
- The Default state
- Mappings:
Namespace Name Mixin selector official aLafh;a(I)Lalz;intermediary method_8635Lnet/minecraft/class_197;method_8635(I)Lnet/minecraft/class_2232;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- Parameters:
state- The Blockstate- Returns:
- Zero
- Mappings:
Namespace Name Mixin selector official cLafh;c(Lalz;)Iintermediary method_8671Lnet/minecraft/class_197;method_8671(Lnet/minecraft/class_2232;)Inamed getDataLnet/minecraft/block/Block;getData(Lnet/minecraft/block/BlockState;)I
-
getBlockState
Returns the current block's blockstate at a certain position- Parameters:
state- The original blockstateview- BlockView instancepos- The block's position- Returns:
- state
- Mappings:
Namespace Name Mixin selector official aLafh;a(Lalz;Ladq;Lcj;)Lalz;intermediary method_8656Lnet/minecraft/class_197;method_8656(Lnet/minecraft/class_2232;Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;)Lnet/minecraft/class_2232;named getBlockStateLnet/minecraft/block/Block;getBlockState(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/BlockState;
-
setSound
Sets the block's sound type. Used in registering blocks.- Parameters:
sound- The block's sound type- Returns:
- The current block
- Mappings:
Namespace Name Mixin selector official aLafh;a(Lafh$b;)Lafh;intermediary method_401Lnet/minecraft/class_197;method_401(Lnet/minecraft/class_197$class_200;)Lnet/minecraft/class_197;named setSoundLnet/minecraft/block/Block;setSound(Lnet/minecraft/block/Block$Sound;)Lnet/minecraft/block/Block;
-
setOpacity
Sets the block's light opacity. Used in registering blocks.- Parameters:
opacity- The block's light opacity- Returns:
- The current block
- Mappings:
Namespace Name Mixin selector official eLafh;e(I)Lafh;intermediary method_6450Lnet/minecraft/class_197;method_6450(I)Lnet/minecraft/class_197;named setOpacityLnet/minecraft/block/Block;setOpacity(I)Lnet/minecraft/block/Block;
-
setLightLevel
Sets the block's luminescence. Used in registering blocks.- Parameters:
lightLevel- The block's luminescence- Returns:
- The current block
- Mappings:
Namespace Name Mixin selector official aLafh;a(F)Lafh;intermediary method_6441Lnet/minecraft/class_197;method_6441(F)Lnet/minecraft/class_197;named setLightLevelLnet/minecraft/block/Block;setLightLevel(F)Lnet/minecraft/block/Block;
-
setResistance
Sets the block's resistance. Used in registering blocks.- Parameters:
resistance- The block's resistance- Returns:
- The current block
- Mappings:
Namespace Name Mixin selector official bLafh;b(F)Lafh;intermediary method_430Lnet/minecraft/class_197;method_430(F)Lnet/minecraft/class_197;named setResistanceLnet/minecraft/block/Block;setResistance(F)Lnet/minecraft/block/Block;
-
isNormalBlock
public boolean isNormalBlock()Checks whether the block is a normal block. A normal block is one that blocks movement and can be rendered as a normal block.- Returns:
- Whether the block is a normal block
- Mappings:
Namespace Name Mixin selector official uLafh;u()Zintermediary method_6458Lnet/minecraft/class_197;method_6458()Znamed isNormalBlockLnet/minecraft/block/Block;isNormalBlock()Z
-
isFullCube
public boolean isFullCube()Checks whether the current block is a full cube. A block is a full cube when it can be rendered as a normal block, does not emit redstone power and is opaque.- Returns:
- Whether the current block is a full cube
- Mappings:
Namespace Name Mixin selector official vLafh;v()Zintermediary method_6459Lnet/minecraft/class_197;method_6459()Znamed isFullCubeLnet/minecraft/block/Block;isFullCube()Z
-
isLeafBlock
public boolean isLeafBlock()Checks whether the current block is a normal block (used only byLeavesBlock)- Returns:
- Whether the current block is a normal block
- Mappings:
Namespace Name Mixin selector official wLafh;w()Zintermediary method_8688Lnet/minecraft/class_197;method_8688()Znamed isLeafBlockLnet/minecraft/block/Block;isLeafBlock()Z
-
renderAsNormalBlock
public boolean renderAsNormalBlock()Returns whether the block can be rendered as a normal block- Returns:
- Whether the block can be rendered as a normal block
- Mappings:
Namespace Name Mixin selector official dLafh;d()Zintermediary method_441Lnet/minecraft/class_197;method_441()Znamed renderAsNormalBlockLnet/minecraft/block/Block;renderAsNormalBlock()Z
-
blocksMovement
- Mappings:
Namespace Name Mixin selector official bLafh;b(Ladq;Lcj;)Zintermediary method_8663Lnet/minecraft/class_197;method_8663(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;)Znamed blocksMovementLnet/minecraft/block/Block;blocksMovement(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)Z
-
getBlockType
public int getBlockType()- Mappings:
Namespace Name Mixin selector official bLafh;b()Iintermediary method_429Lnet/minecraft/class_197;method_429()Inamed getBlockTypeLnet/minecraft/block/Block;getBlockType()I
-
isReplaceable
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;)Zintermediary method_8638Lnet/minecraft/class_197;method_8638(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;)Znamed isReplaceableLnet/minecraft/block/Block;isReplaceable(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Z
-
setStrength
Sets the current block's strength. Used in registering blocks.- Parameters:
strength- The block's strength- Returns:
- The current block
- Mappings:
Namespace Name Mixin selector official cLafh;c(F)Lafh;intermediary method_442Lnet/minecraft/class_197;method_442(F)Lnet/minecraft/class_197;named setStrengthLnet/minecraft/block/Block;setStrength(F)Lnet/minecraft/block/Block;
-
setUnbreakable
Sets the current block as unbreakable. Used in registering blocks. Setting the strength as -1 makes the block unbreakable. Used by barriers and command blocks.- Returns:
- The current block
- Mappings:
Namespace Name Mixin selector official xLafh;x()Lafh;intermediary method_474Lnet/minecraft/class_197;method_474()Lnet/minecraft/class_197;named setUnbreakableLnet/minecraft/block/Block;setUnbreakable()Lnet/minecraft/block/Block;
-
getStrength
Returns the current block's strength- Parameters:
world- The world where the block is placedpos- The block's position- Returns:
- The block's strength
- Mappings:
Namespace Name Mixin selector official gLafh;g(Ladm;Lcj;)Fintermediary method_8679Lnet/minecraft/class_197;method_8679(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;)Fnamed getStrengthLnet/minecraft/block/Block;getStrength(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)F
-
setTickRandomly
Sets whether the current block has random ticks. Used in registering blocks.- Parameters:
tickRandomly- Whether the current block should have random ticks- Returns:
- The current block
- Mappings:
Namespace Name Mixin selector official aLafh;a(Z)Lafh;intermediary method_440Lnet/minecraft/class_197;method_440(Z)Lnet/minecraft/class_197;named setTickRandomlyLnet/minecraft/block/Block;setTickRandomly(Z)Lnet/minecraft/block/Block;
-
ticksRandomly
public boolean ticksRandomly()Returns whether the current block has random ticks- Returns:
- Whether the current block has random ticks
- Mappings:
Namespace Name Mixin selector official yLafh;y()Zintermediary method_476Lnet/minecraft/class_197;method_476()Znamed ticksRandomlyLnet/minecraft/block/Block;ticksRandomly()Z
-
hasBlockEntity
public boolean hasBlockEntity()Returns whether the current block has a block entity- Returns:
- Whether the current block has a block entity
- Mappings:
Namespace Name Mixin selector official zLafh;z()Zintermediary method_478Lnet/minecraft/class_197;method_478()Znamed hasBlockEntityLnet/minecraft/block/Block;hasBlockEntity()Z
-
setBoundingBox
protected final void setBoundingBox(float minX, float minY, float minZ, float maxX, float maxY, float maxZ) Sets the block's bounding box. It accepts six parameters: The minimum and maximum for each of the three axes.- Parameters:
minX- Minimum X valueminY- Minimum Y valueminZ- Minimum Z valuemaxX- Maximum X valuemaxY- Maximum Y valuemaxZ- Maximum Z value- Mappings:
Namespace Name Mixin selector official aLafh;a(FFFFFF)Vintermediary method_394Lnet/minecraft/class_197;method_394(FFFFFF)Vnamed setBoundingBoxLnet/minecraft/block/Block;setBoundingBox(FFFFFF)V
-
getBrightness
- Mappings:
Namespace Name Mixin selector official cLafh;c(Ladq;Lcj;)Iintermediary method_8670Lnet/minecraft/class_197;method_8670(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;)Inamed getBrightnessLnet/minecraft/block/Block;getBrightness(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)I
-
isSideInvisible
Returns whether the current block has connected sides, i.e its side faces are invisible when covered by other blocks. Used by glass to prevent the white dots from appearing everywhere through adjacent glass blocks.- Parameters:
view- BlockView instancepos- The current block's positionfacing- The direction the block is facing- Returns:
- Whether the current block has connected sides
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladq;Lcj;Lcq;)Zintermediary method_8654Lnet/minecraft/class_197;method_8654(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;Lnet/minecraft/class_1354;)Znamed isSideInvisibleLnet/minecraft/block/Block;isSideInvisible(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)Z
-
hasCollision
- Mappings:
Namespace Name Mixin selector official bLafh;b(Ladq;Lcj;Lcq;)Zintermediary method_8665Lnet/minecraft/class_197;method_8665(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;Lnet/minecraft/class_1354;)Znamed hasCollisionLnet/minecraft/block/Block;hasCollision(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)Z
-
getSelectionBox
- Mappings:
Namespace Name Mixin selector official bLafh;b(Ladm;Lcj;)Laug;intermediary method_8657Lnet/minecraft/class_197;method_8657(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;)Lnet/minecraft/class_231;named getSelectionBoxLnet/minecraft/block/Block;getSelectionBox(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/Box;
-
appendCollisionBoxes
public void appendCollisionBoxes(World world, BlockPos pos, BlockState state, Box box, List<Box> list, Entity entity) - Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lalz;Laug;Ljava/util/List;Lpk;)Vintermediary method_8642Lnet/minecraft/class_197;method_8642(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Lnet/minecraft/class_231;Ljava/util/List;Lnet/minecraft/class_864;)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- 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_8640Lnet/minecraft/class_197;method_8640(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)Lnet/minecraft/class_231;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()- Mappings:
Namespace Name Mixin selector official cLafh;c()Zintermediary method_449Lnet/minecraft/class_197;method_449()Znamed hasTransperancyLnet/minecraft/block/Block;hasTransperancy()Z
-
canCollide
Returns whether entities can collide with the block- Parameters:
state- The block's BlockState- Returns:
- Whether the block has collision
- Mappings:
Namespace Name Mixin selector official aLafh;a(Lalz;Z)Zintermediary method_400Lnet/minecraft/class_197;method_400(Lnet/minecraft/class_2232;Z)Znamed canCollideLnet/minecraft/block/Block;canCollide(Lnet/minecraft/block/BlockState;Z)Z
-
hasCollision
public boolean hasCollision()Returns whether a block has collision, i.e. stops entities- Returns:
- Whether a block has collision
- Mappings:
Namespace Name Mixin selector official ALafh;A()Zintermediary method_469Lnet/minecraft/class_197;method_469()Znamed hasCollisionLnet/minecraft/block/Block;hasCollision()Z
-
onUpdateTick
Runs when the block is updated- 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_8643Lnet/minecraft/class_197;method_8643(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;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- 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_8661Lnet/minecraft/class_197;method_8661(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;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
-
randomDisplayTick
@Environment(CLIENT) public void randomDisplayTick(World world, BlockPos pos, BlockState state, Random rand) Runs every random display Tick. Useful for displaying particles around a block, like Redstone Ore.- 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 cLafh;c(Ladm;Lcj;Lalz;Ljava/util/Random;)Vintermediary method_8669Lnet/minecraft/class_197;method_8669(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Ljava/util/Random;)Vnamed randomDisplayTickLnet/minecraft/block/Block;randomDisplayTick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Ljava/util/Random;)V
-
onBreakByPlayer
Runs when the block is broken by the player- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockState- Mappings:
Namespace Name Mixin selector official dLafh;d(Ladm;Lcj;Lalz;)Vintermediary method_8674Lnet/minecraft/class_197;method_8674(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)Vnamed onBreakByPlayerLnet/minecraft/block/Block;onBreakByPlayer(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)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.- 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_8641Lnet/minecraft/class_197;method_8641(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Lnet/minecraft/class_197;)Vnamed neighborUpdateLnet/minecraft/block/Block;neighborUpdate(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/Block;)V
-
getTickRate
Returns the block's tick rate. Default is 10.- Parameters:
world- The world that the block is placed in- Returns:
- Tick rate
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;)Iintermediary method_4789Lnet/minecraft/class_197;method_4789(Lnet/minecraft/class_1150;)Inamed getTickRateLnet/minecraft/block/Block;getTickRate(Lnet/minecraft/world/World;)I
-
onCreation
Runs when the block is placed (by a player or enderman).- 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_8668Lnet/minecraft/class_197;method_8668(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)Vnamed onCreationLnet/minecraft/block/Block;onCreation(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
onBreaking
Runs when the block is removed (by an entity or explosion).- 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_8659Lnet/minecraft/class_197;method_8659(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)Vnamed onBreakingLnet/minecraft/block/Block;onBreaking(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
getDropCount
Returns the amount of items the block should drop on breaking without bonus rolls.- Parameters:
rand- Random object- Returns:
- Amount of items to be dropped
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ljava/util/Random;)Iintermediary method_403Lnet/minecraft/class_197;method_403(Ljava/util/Random;)Inamed getDropCountLnet/minecraft/block/Block;getDropCount(Ljava/util/Random;)I
-
getDropItem
Returns the item that must be dropped when the block is broken- 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_398Lnet/minecraft/class_197;method_398(Lnet/minecraft/class_2232;Ljava/util/Random;I)Lnet/minecraft/class_1069;named getDropItemLnet/minecraft/block/Block;getDropItem(Lnet/minecraft/block/BlockState;Ljava/util/Random;I)Lnet/minecraft/item/Item;
-
calcBlockBreakingData
Calculates how fast or slow the block must be broken by a Player. Status effects such as Haste and Mining fatigue are taken into consideration.- Parameters:
player- The player breaking the blockworld- The world that the block is placed inpos- The block's position- Returns:
- Speed of breaking
- Mappings:
Namespace Name Mixin selector official aLafh;a(Lwn;Ladm;Lcj;)Fintermediary method_405Lnet/minecraft/class_197;method_405(Lnet/minecraft/class_988;Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;)Fnamed calcBlockBreakingDataLnet/minecraft/block/Block;calcBlockBreakingData(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)F
-
dropAsItem
Runs when the block must be dropped as an item. Called when the block is broken or an enderman holding the block dies.- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockStateid- Id- Mappings:
Namespace Name Mixin selector official bLafh;b(Ladm;Lcj;Lalz;I)Vintermediary method_8660Lnet/minecraft/class_197;method_8660(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;I)Vnamed dropAsItemLnet/minecraft/block/Block;dropAsItem(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;I)V
-
randomDropAsItem
Called when the block must be dropped as an item bydropAsItem, but luck is taken into consideration here.- 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_410Lnet/minecraft/class_197;method_410(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;FI)Vnamed randomDropAsItemLnet/minecraft/block/Block;randomDropAsItem(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;FI)V
-
onBlockBreak
Runs when a block is broken- Parameters:
world- The world that the block is placed inpos- The block's positionitem- Allows creating an ItemEntity- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lzx;)Vintermediary method_8649Lnet/minecraft/class_197;method_8649(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_1071;)Vnamed onBlockBreakLnet/minecraft/block/Block;onBlockBreak(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/item/ItemStack;)V
-
dropExperience
Runs when the block is broken to drop experience. Since entities are being spawned, most of it only happens on a ServerWorld.- Parameters:
world- The world that the block is placed inpos- The block's positionsize- Size- Mappings:
Namespace Name Mixin selector official bLafh;b(Ladm;Lcj;I)Vintermediary method_8658Lnet/minecraft/class_197;method_8658(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;I)Vnamed dropExperienceLnet/minecraft/block/Block;dropExperience(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;I)V
-
getMeta
Returns the metadata value for a certain BlockState- Parameters:
state- The BlockState- Returns:
- Metadata value
- Mappings:
Namespace Name Mixin selector official aLafh;a(Lalz;)Iintermediary method_8655Lnet/minecraft/class_197;method_8655(Lnet/minecraft/class_2232;)Inamed getMetaLnet/minecraft/block/Block;getMeta(Lnet/minecraft/block/BlockState;)I
-
getBlastResistance
Returns the block's blast resistance as per the entity provided.- Parameters:
entity- The entity that blast resistance must be calculated for- Returns:
- Blast Resistance
- Mappings:
Namespace Name Mixin selector official aLafh;a(Lpk;)Fintermediary method_404Lnet/minecraft/class_197;method_404(Lnet/minecraft/class_864;)Fnamed getBlastResistanceLnet/minecraft/block/Block;getBlastResistance(Lnet/minecraft/entity/Entity;)F
-
method_414
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Laui;Laui;)Lauh;intermediary method_414Lnet/minecraft/class_197;method_414(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_236;Lnet/minecraft/class_236;)Lnet/minecraft/class_234;named method_414Lnet/minecraft/block/Block;method_414(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Vec3d;)Lnet/minecraft/util/hit/BlockHitResult;
-
method_402
- Mappings:
Namespace Name Mixin selector official aLafh;a(Laui;)Zintermediary method_402Lnet/minecraft/class_197;method_402(Lnet/minecraft/class_236;)Znamed method_402Lnet/minecraft/block/Block;method_402(Lnet/minecraft/util/math/Vec3d;)Z
-
method_432
- Mappings:
Namespace Name Mixin selector official bLafh;b(Laui;)Zintermediary method_432Lnet/minecraft/class_197;method_432(Lnet/minecraft/class_236;)Znamed method_432Lnet/minecraft/block/Block;method_432(Lnet/minecraft/util/math/Vec3d;)Z
-
method_443
- Mappings:
Namespace Name Mixin selector official cLafh;c(Laui;)Zintermediary method_443Lnet/minecraft/class_197;method_443(Lnet/minecraft/class_236;)Znamed method_443Lnet/minecraft/block/Block;method_443(Lnet/minecraft/util/math/Vec3d;)Z
-
onDestroyedByExplosion
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Ladi;)Vintermediary method_8639Lnet/minecraft/class_197;method_8639(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_1147;)Vnamed onDestroyedByExplosionLnet/minecraft/block/Block;onDestroyedByExplosion(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/explosion/Explosion;)V
-
getRenderLayerType
Returns the appropriate RenderLayer for a block. Only called on the client.- Returns:
- The block's RenderLayer
- Mappings:
Namespace Name Mixin selector official mLafh;m()Ladf;intermediary method_8687Lnet/minecraft/class_197;method_8687()Lnet/minecraft/class_2165;named getRenderLayerTypeLnet/minecraft/block/Block;getRenderLayerType()Lnet/minecraft/client/render/BlockRenderLayer;
-
canBeReplaced
Returns whether the current block can be replaced. Useful for grass like blocks.- Parameters:
world- The world that the block is placed inpos- The block's positiondir- The block's directionstack- ItemStack- Returns:
- Whether the current block can be replaced
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lcq;Lzx;)Zintermediary method_8646Lnet/minecraft/class_197;method_8646(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_1354;Lnet/minecraft/class_1071;)Znamed canBeReplacedLnet/minecraft/block/Block;canBeReplaced(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;Lnet/minecraft/item/ItemStack;)Z
-
canBePlacedAdjacent
Returns whether blocks can be placed adjacent to it.- 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_8662Lnet/minecraft/class_197;method_8662(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_1354;)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- Returns:
- Whether the current block can be placed at a BlockPos
- Mappings:
Namespace Name Mixin selector official dLafh;d(Ladm;Lcj;)Zintermediary method_8673Lnet/minecraft/class_197;method_8673(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;)Znamed canBePlacedAtPosLnet/minecraft/block/Block;canBePlacedAtPos(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Z
-
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.- 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_421Lnet/minecraft/class_197;method_421(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Lnet/minecraft/class_988;Lnet/minecraft/class_1354;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
-
onSteppedOn
Runs every time an entity steps on the Block. Used by redstone ore to change it's state.- Parameters:
world- The world that the block is placed inpos- The block's positionentity- The entity who stepped on the block- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lpk;)Vintermediary method_437Lnet/minecraft/class_197;method_437(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_864;)Vnamed onSteppedOnLnet/minecraft/block/Block;onSteppedOn(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/Entity;)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- 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_8645Lnet/minecraft/class_197;method_8645(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_1354;FFFILnet/minecraft/class_1699;)Lnet/minecraft/class_2232;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;
-
onBlockBreakStart
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lwn;)Vintermediary method_420Lnet/minecraft/class_197;method_420(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_988;)Vnamed onBlockBreakStartLnet/minecraft/block/Block;onBlockBreakStart(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;)V
-
onEntityCollision
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lpk;Laui;)Laui;intermediary method_8648Lnet/minecraft/class_197;method_8648(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_864;Lnet/minecraft/class_236;)Lnet/minecraft/class_236;named onEntityCollisionLnet/minecraft/block/Block;onEntityCollision(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/Entity;Lnet/minecraft/util/math/Vec3d;)Lnet/minecraft/util/math/Vec3d;
-
setBoundingBox
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladq;Lcj;)Vintermediary method_8652Lnet/minecraft/class_197;method_8652(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;)Vnamed setBoundingBoxLnet/minecraft/block/Block;setBoundingBox(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)V
-
getMinX
public final double getMinX()Returns the block's bounding box' minimum X value- Returns:
- Minimum X value
- Mappings:
Namespace Name Mixin selector official BLafh;B()Dintermediary method_4189Lnet/minecraft/class_197;method_4189()Dnamed getMinXLnet/minecraft/block/Block;getMinX()D
-
getMaxX
public final double getMaxX()Returns the block's bounding box' minimum Y value- Returns:
- Minimum Y value
- Mappings:
Namespace Name Mixin selector official CLafh;C()Dintermediary method_4190Lnet/minecraft/class_197;method_4190()Dnamed getMaxXLnet/minecraft/block/Block;getMaxX()D
-
getMinY
public final double getMinY()Returns the block's bounding box' minimum Z value- Returns:
- Minimum Z value
- Mappings:
Namespace Name Mixin selector official DLafh;D()Dintermediary method_4191Lnet/minecraft/class_197;method_4191()Dnamed getMinYLnet/minecraft/block/Block;getMinY()D
-
getMaxY
public final double getMaxY()Returns the block's bounding box' maximum X value- Returns:
- Maximum X value
- Mappings:
Namespace Name Mixin selector official ELafh;E()Dintermediary method_4192Lnet/minecraft/class_197;method_4192()Dnamed getMaxYLnet/minecraft/block/Block;getMaxY()D
-
getMinZ
public final double getMinZ()Returns the block's bounding box' maximum Y value- Returns:
- Maximum Y value
- Mappings:
Namespace Name Mixin selector official FLafh;F()Dintermediary method_4193Lnet/minecraft/class_197;method_4193()Dnamed getMinZLnet/minecraft/block/Block;getMinZ()D
-
getMaxZ
public final double getMaxZ()Returns the block's bounding box' maximum Z value- Returns:
- Maximum Z value
- Mappings:
Namespace Name Mixin selector official GLafh;G()Dintermediary method_4183Lnet/minecraft/class_197;method_4183()Dnamed getMaxZLnet/minecraft/block/Block;getMaxZ()D
-
getColor
- Mappings:
Namespace Name Mixin selector official HLafh;H()Iintermediary method_470Lnet/minecraft/class_197;method_470()Inamed getColorLnet/minecraft/block/Block;getColor()I
-
getColor
- Mappings:
Namespace Name Mixin selector official hLafh;h(Lalz;)Iintermediary method_8681Lnet/minecraft/class_197;method_8681(Lnet/minecraft/class_2232;)Inamed getColorLnet/minecraft/block/Block;getColor(Lnet/minecraft/block/BlockState;)I
-
getBlockColor
Returns the current block's color- Parameters:
view- BlockView instancepos- The block's positionid- Id- Returns:
- Block color
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladq;Lcj;I)Iintermediary method_438Lnet/minecraft/class_197;method_438(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;I)Inamed getBlockColorLnet/minecraft/block/Block;getBlockColor(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;I)I
-
getBlendColor
- Mappings:
Namespace Name Mixin selector official dLafh;d(Ladq;Lcj;)Iintermediary method_8675Lnet/minecraft/class_197;method_8675(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;)Inamed getBlendColorLnet/minecraft/block/Block;getBlendColor(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)I
-
getWeakRedstonePower
Returns the block's weak redstone power.- Parameters:
view- BlockView 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_8653Lnet/minecraft/class_197;method_8653(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Lnet/minecraft/class_1354;)Inamed getWeakRedstonePowerLnet/minecraft/block/Block;getWeakRedstonePower(Lnet/minecraft/world/BlockView;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.- Returns:
- Whether the current block emits a redstone signal
- Mappings:
Namespace Name Mixin selector official iLafh;i()Zintermediary method_466Lnet/minecraft/class_197;method_466()Znamed emitsRedstonePowerLnet/minecraft/block/Block;emitsRedstonePower()Z
-
onEntityCollision
Runs every time an entity collides with the block- 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_416Lnet/minecraft/class_197;method_416(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Lnet/minecraft/class_864;)Vnamed onEntityCollisionLnet/minecraft/block/Block;onEntityCollision(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/Entity;)V
-
getStrongRedstonePower
Returns the block's strong redstone power.- Parameters:
view- BlockView 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_8664Lnet/minecraft/class_197;method_8664(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Lnet/minecraft/class_1354;)Inamed getStrongRedstonePowerLnet/minecraft/block/Block;getStrongRedstonePower(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Direction;)I
-
setBlockItemBounds
public void setBlockItemBounds()Sets the bounds for the BlockItem- Mappings:
Namespace Name Mixin selector official jLafh;j()Vintermediary method_456Lnet/minecraft/class_197;method_456()Vnamed setBlockItemBoundsLnet/minecraft/block/Block;setBlockItemBounds()V
-
harvest
public void harvest(World world, PlayerEntity player, BlockPos pos, BlockState state, BlockEntity be) Runs every time a player begins to break the block.- Parameters:
world- The world that the block is placed inplayer- The player who is mining the blockpos- The block's positionstate- The block's BlockStatebe- The block entity in the block- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lwn;Lcj;Lalz;Lakw;)Vintermediary method_8651Lnet/minecraft/class_197;method_8651(Lnet/minecraft/class_1150;Lnet/minecraft/class_988;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Lnet/minecraft/class_226;)Vnamed harvestLnet/minecraft/block/Block;harvest(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/BlockEntity;)V
-
requiresSilkTouch
protected boolean requiresSilkTouch()- Mappings:
Namespace Name Mixin selector official ILafh;I()Zintermediary method_475Lnet/minecraft/class_197;method_475()Znamed requiresSilkTouchLnet/minecraft/block/Block;requiresSilkTouch()Z
-
createStackFromBlock
Creates and returns and ItemStack from a block.- Parameters:
state- The block's BlockState- Returns:
- An ItemStack instance containing the block
- Mappings:
Namespace Name Mixin selector official iLafh;i(Lalz;)Lzx;intermediary method_8682Lnet/minecraft/class_197;method_8682(Lnet/minecraft/class_2232;)Lnet/minecraft/class_1071;named createStackFromBlockLnet/minecraft/block/Block;createStackFromBlock(Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
-
getBonusDrops
Returns the number bonus drops for a block when broken.- Parameters:
id- Idrand- Random object- Returns:
- Bonus drops for a block
- Mappings:
Namespace Name Mixin selector official aLafh;a(ILjava/util/Random;)Iintermediary method_397Lnet/minecraft/class_197;method_397(ILjava/util/Random;)Inamed getBonusDropsLnet/minecraft/block/Block;getBonusDrops(ILjava/util/Random;)I
-
onPlaced
public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) Runs when the block is placed by an entity- 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_419Lnet/minecraft/class_197;method_419(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Lnet/minecraft/class_1699;Lnet/minecraft/class_1071;)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
-
canMobSpawnInside
public boolean canMobSpawnInside()Returns whether mobs can spawn inside the block. Used for Air.- Returns:
- Whether mobs can spawn inside the block
- Mappings:
Namespace Name Mixin selector official gLafh;g()Zintermediary method_8678Lnet/minecraft/class_197;method_8678()Znamed canMobSpawnInsideLnet/minecraft/block/Block;canMobSpawnInside()Z
-
setTranslationKey
Sets the block's localization key. Used in registering blocks.- Parameters:
key- The Translation key- Returns:
- The Current block
- Mappings:
Namespace Name Mixin selector official cLafh;c(Ljava/lang/String;)Lafh;intermediary method_433Lnet/minecraft/class_197;method_433(Ljava/lang/String;)Lnet/minecraft/class_197;named setTranslationKeyLnet/minecraft/block/Block;setTranslationKey(Ljava/lang/String;)Lnet/minecraft/block/Block;
-
getTranslatedName
Translates and returns the translation key- Returns:
- Translated name
- Mappings:
Namespace Name Mixin selector official fLafh;f()Ljava/lang/String;intermediary method_480Lnet/minecraft/class_197;method_480()Ljava/lang/String;named getTranslatedNameLnet/minecraft/block/Block;getTranslatedName()Ljava/lang/String;
-
getTranslationKey
Returns the block's translation key- Returns:
- Translation Key
- Mappings:
Namespace Name Mixin selector official aLafh;a()Ljava/lang/String;intermediary method_392Lnet/minecraft/class_197;method_392()Ljava/lang/String;named getTranslationKeyLnet/minecraft/block/Block;getTranslationKey()Ljava/lang/String;
-
onEvent
Runs when an event takes place- 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_435Lnet/minecraft/class_197;method_435(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;II)Znamed onEventLnet/minecraft/block/Block;onEvent(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;II)Z
-
hasStats
public boolean hasStats()Returns whether the current block should be tracked for stats- Returns:
- Whether the current block should be tracked for stats
- Mappings:
Namespace Name Mixin selector official JLafh;J()Zintermediary method_481Lnet/minecraft/class_197;method_481()Znamed hasStatsLnet/minecraft/block/Block;hasStats()Z
-
disableStats
Disables tracking by stats for the current block. Used in registering blocks.- Returns:
- The current block
- Mappings:
Namespace Name Mixin selector official KLafh;K()Lafh;intermediary method_482Lnet/minecraft/class_197;method_482()Lnet/minecraft/class_197;named disableStatsLnet/minecraft/block/Block;disableStats()Lnet/minecraft/block/Block;
-
getPistonInteractionType
public int getPistonInteractionType()Returns the block's piston interaction type, as provided by it's material.- Returns:
- Current block's piston interaction type
- Mappings:
Namespace Name Mixin selector official kLafh;k()Iintermediary method_453Lnet/minecraft/class_197;method_453()Inamed getPistonInteractionTypeLnet/minecraft/block/Block;getPistonInteractionType()I
-
getAmbientOcclusionLightLevel
Returns the block's ambient occlusion light level on the basis of whether it is a normal block. Only called on the client.- Returns:
- The block's ambient occlusion light level
- Mappings:
Namespace Name Mixin selector official hLafh;h()Fintermediary method_6440Lnet/minecraft/class_197;method_6440()Fnamed getAmbientOcclusionLightLevelLnet/minecraft/block/Block;getAmbientOcclusionLightLevel()F
-
onLandedUpon
Runs when an entity falls on the block.- Parameters:
world- The world that the block is placed inpos- The block's positionentity- The entity who fell on the blockdistance- The relative height from which the entity fell- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lpk;F)Vintermediary method_8647Lnet/minecraft/class_197;method_8647(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_864;F)Vnamed onLandedUponLnet/minecraft/block/Block;onLandedUpon(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/Entity;F)V
-
setEntityVelocity
Sets the speed of an entity moving on the block- Parameters:
world- The world that the block is placed inentity- The entity that the speed must be changed for- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lpk;)Vintermediary method_8650Lnet/minecraft/class_197;method_8650(Lnet/minecraft/class_1150;Lnet/minecraft/class_864;)Vnamed setEntityVelocityLnet/minecraft/block/Block;setEntityVelocity(Lnet/minecraft/world/World;Lnet/minecraft/entity/Entity;)V
-
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.- 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_8667Lnet/minecraft/class_197;method_8667(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;)Lnet/minecraft/class_1069;named getPickItemLnet/minecraft/block/Block;getPickItem(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/item/Item;
-
getMeta
Returns metadata from a world and a BlockPos- Parameters:
world- The world that the block is placed inpos- The block's position- Returns:
- Metadata
- Mappings:
Namespace Name Mixin selector official jLafh;j(Ladm;Lcj;)Iintermediary method_8683Lnet/minecraft/class_197;method_8683(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;)Inamed getMetaLnet/minecraft/block/Block;getMeta(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)I
-
appendItemStacks
@Environment(CLIENT) public void appendItemStacks(Item item, ItemGroup group, List<ItemStack> stacks) Appends ItemStacks to an itemgroup. Only called on the client.- Parameters:
item- The Item that must be addedgroup- The ItemGroup that the item must be added tostacks- The list of currently added ItemStacks to the ItemGroup- Mappings:
Namespace Name Mixin selector official aLafh;a(Lzw;Lyz;Ljava/util/List;)Vintermediary method_399Lnet/minecraft/class_197;method_399(Lnet/minecraft/class_1069;Lnet/minecraft/class_1041;Ljava/util/List;)Vnamed appendItemStacksLnet/minecraft/block/Block;appendItemStacks(Lnet/minecraft/item/Item;Lnet/minecraft/item/itemgroup/ItemGroup;Ljava/util/List;)V
-
getItemGroup
Returns the block's ItemGroup. Only called on the client.- Returns:
- The Block's item group
- Mappings:
Namespace Name Mixin selector official LLafh;L()Lyz;intermediary method_483Lnet/minecraft/class_197;method_483()Lnet/minecraft/class_1041;named getItemGroupLnet/minecraft/block/Block;getItemGroup()Lnet/minecraft/item/itemgroup/ItemGroup;
-
setItemGroup
Sets the block's ItemGroup. Used in registering blocks.- Parameters:
group- The itemgroup that the block must be added to- Returns:
- The current block
- Mappings:
Namespace Name Mixin selector official aLafh;a(Lyz;)Lafh;intermediary method_406Lnet/minecraft/class_197;method_406(Lnet/minecraft/class_1041;)Lnet/minecraft/class_197;named setItemGroupLnet/minecraft/block/Block;setItemGroup(Lnet/minecraft/item/itemgroup/ItemGroup;)Lnet/minecraft/block/Block;
-
onBreakByPlayer
Runs when the block is broken by a player.- 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_8644Lnet/minecraft/class_197;method_8644(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Lnet/minecraft/class_988;)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
-
rainTick
Runs every tick when raining. Used my cauldrons to randomly fill up when raining.- Parameters:
world- The world that the block is placed inpos- The block's position- Mappings:
Namespace Name Mixin selector official kLafh;k(Ladm;Lcj;)Vintermediary method_8685Lnet/minecraft/class_197;method_8685(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;)Vnamed rainTickLnet/minecraft/block/Block;rainTick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)V
-
isFlowerPot
- Mappings:
Namespace Name Mixin selector official MLafh;M()Zintermediary method_4188Lnet/minecraft/class_197;method_4188()Znamed isFlowerPotLnet/minecraft/block/Block;isFlowerPot()Z
-
isFire
public boolean isFire()- Mappings:
Namespace Name Mixin selector official NLafh;N()Zintermediary method_4187Lnet/minecraft/class_197;method_4187()Znamed isFireLnet/minecraft/block/Block;isFire()Z
-
shouldDropItemsOnExplosion
Returns whether the block should drop as an Item during an explosion.- Parameters:
explosion- The explosion that caused the block to break- Returns:
- Whether the block should drop as an item during an explosion
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladi;)Zintermediary method_4184Lnet/minecraft/class_197;method_4184(Lnet/minecraft/class_1147;)Znamed shouldDropItemsOnExplosionLnet/minecraft/block/Block;shouldDropItemsOnExplosion(Lnet/minecraft/world/explosion/Explosion;)Z
-
isEqualTo
Returns whether the current block and another block are equal- Parameters:
block- The other block- Returns:
- Whether the current block and the other block are equal
- Mappings:
Namespace Name Mixin selector official bLafh;b(Lafh;)Zintermediary method_6447Lnet/minecraft/class_197;method_6447(Lnet/minecraft/class_197;)Znamed isEqualToLnet/minecraft/block/Block;isEqualTo(Lnet/minecraft/block/Block;)Z
-
areBlocksEqual
Returns whether two blocks are equal.- Returns:
- Whether two blocks are equal
- Mappings:
Namespace Name Mixin selector official aLafh;a(Lafh;Lafh;)Zintermediary method_6443Lnet/minecraft/class_197;method_6443(Lnet/minecraft/class_197;Lnet/minecraft/class_197;)Znamed areBlocksEqualLnet/minecraft/block/Block;areBlocksEqual(Lnet/minecraft/block/Block;Lnet/minecraft/block/Block;)Z
-
hasComparatorOutput
public boolean hasComparatorOutput()Returns whether the block provides comparator output. Used in blocks with entities like Chests and Droppers.- Returns:
- Whether the block provides comparator output
- Mappings:
Namespace Name Mixin selector official OLafh;O()Zintermediary method_4797Lnet/minecraft/class_197;method_4797()Znamed hasComparatorOutputLnet/minecraft/block/Block;hasComparatorOutput()Z
-
getComparatorOutput
Returns the block's comparator output value. Used in blocks with entities like Chests and Droppers.- Returns:
- The block's comparator output value
- Mappings:
Namespace Name Mixin selector official lLafh;l(Ladm;Lcj;)Iintermediary method_8686Lnet/minecraft/class_197;method_8686(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;)Inamed getComparatorOutputLnet/minecraft/block/Block;getComparatorOutput(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)I
-
method_8666
- Mappings:
Namespace Name Mixin selector official bLafh;b(Lalz;)Lalz;intermediary method_8666Lnet/minecraft/class_197;method_8666(Lnet/minecraft/class_2232;)Lnet/minecraft/class_2232;named method_8666Lnet/minecraft/block/Block;method_8666(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/BlockState;
-
appendProperties
Returns a new state manager with a property array.- Returns:
- New state manager
- Mappings:
Namespace Name Mixin selector official eLafh;e()Lama;intermediary method_8676Lnet/minecraft/class_197;method_8676()Lnet/minecraft/class_2233;named appendPropertiesLnet/minecraft/block/Block;appendProperties()Lnet/minecraft/state/StateManager;
-
getStateManager
Returns the current state manager.- Returns:
- The current state manager
- Mappings:
Namespace Name Mixin selector official PLafh;P()Lama;intermediary method_8632Lnet/minecraft/class_197;method_8632()Lnet/minecraft/class_2233;named getStateManagerLnet/minecraft/block/Block;getStateManager()Lnet/minecraft/state/StateManager;
-
setDefaultState
Sets the block's default BlockState.- Parameters:
state- The default state- Mappings:
Namespace Name Mixin selector official jLafh;j(Lalz;)Vintermediary method_8684Lnet/minecraft/class_197;method_8684(Lnet/minecraft/class_2232;)Vnamed setDefaultStateLnet/minecraft/block/Block;setDefaultState(Lnet/minecraft/block/BlockState;)V
-
getDefaultState
Returns the block's default BlockState.- Returns:
- The block's default BlockState
- Mappings:
Namespace Name Mixin selector official QLafh;Q()Lalz;intermediary method_8633Lnet/minecraft/class_197;method_8633()Lnet/minecraft/class_2232;named getDefaultStateLnet/minecraft/block/Block;getDefaultState()Lnet/minecraft/block/BlockState;
-
getOffsetType
Returns the block's offset type. Used by grass and flowers.- Returns:
- The block's offset type
- Mappings:
Namespace Name Mixin selector official RLafh;R()Lafh$a;intermediary method_8634Lnet/minecraft/class_197;method_8634()Lnet/minecraft/class_197$class_2177;named getOffsetTypeLnet/minecraft/block/Block;getOffsetType()Lnet/minecraft/block/Block$OffsetType;
-
toString
-
setup
public static void setup()Registers all blocks- Mappings:
Namespace Name Mixin selector official SLafh;S()Vintermediary method_6457Lnet/minecraft/class_197;method_6457()Vnamed setupLnet/minecraft/block/Block;setup()V
-
register
Registers a block to the registry- Parameters:
id- The block's Ididentifier- The block's Identifierblock- The block object- Mappings:
Namespace Name Mixin selector official aLafh;a(ILjy;Lafh;)Vintermediary method_8637Lnet/minecraft/class_197;method_8637(ILnet/minecraft/class_1653;Lnet/minecraft/class_197;)Vnamed registerLnet/minecraft/block/Block;register(ILnet/minecraft/util/Identifier;Lnet/minecraft/block/Block;)V
-
register
Registers a block to the registry- Parameters:
id- The block's Idname- The block's nameblock- The block object- Mappings:
Namespace Name Mixin selector official aLafh;a(ILjava/lang/String;Lafh;)Vintermediary method_8636Lnet/minecraft/class_197;method_8636(ILjava/lang/String;Lnet/minecraft/class_197;)Vnamed registerLnet/minecraft/block/Block;register(ILjava/lang/String;Lnet/minecraft/block/Block;)V
-