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
public class Block extends Object
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_160named net/minecraft/block/Block
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBlock.OffsetTypestatic classBlock.Sound -
Field Summary
Fields Modifier and Type Field Description private static IdentifierAIR_IDThe Identifier for Airstatic Block.SoundANVILAnvil sound typestatic IdList<BlockState>BLOCK_STATESA List of all blockstates, used by Debug worldsprotected booleanblockEntitySpecifies whether the current block has a block entityprotected doubleboundingBoxMaxXStores the Maximum value on the X axis for the voxel shapeprotected doubleboundingBoxMaxYStores the Maximum value on the Y axis for the voxel shapeprotected doubleboundingBoxMaxZStores the Maximum value on the Z axis for the voxel shapeprotected doubleboundingBoxMinXStores the Minimum value on the X axis for the voxel shapeprotected doubleboundingBoxMinYStores the Minimum value on the Y axis for the voxel shapeprotected doubleboundingBoxMinZStores the Minimum value on the Z axis for the voxel shapestatic Block.SoundCLOTHCloth sound typeprivate BlockStatedefaultStateStores the block's default stateprotected booleanfullBlockSpecifies whether the current block is a full blockstatic Block.SoundGLASSGlass sound typestatic Block.SoundGRASSGrass sound typestatic Block.SoundGRAVELGravel sound typeprivate ItemGroupitemGroupstatic Block.SoundLADDERLadder sound typeprotected intlightLevelStores the block's luminescenceprotected MaterialmaterialStores the current block's materialprotected MaterialColormaterialColorStores the current block's material colorprotected intopacityStores the light opacity of the blockstatic Block.SoundOREOre sound typefloatparticleGravityStores the current block's particles' gravitystatic Block.SoundRAILRail sound typeprotected booleanrandomTicksSpecifies whether the current block ticks randomlystatic BiDefaultedRegistry<Identifier,Block>REGISTRYThe Registry object to which all blocks get registered toprotected floatresistanceStores the current block's resistancestatic Block.SoundSANDSand sound typestatic Block.SoundSLIMESlime sound typefloatslipperinessStores the current block's slipperiness Used By Ice and Packed Icestatic Block.SoundSNOWSnow sound typeBlock.SoundsoundStores the current block's sound typeprotected StateManagerstateManagerStores the block's state managerprotected booleanstatsSpecifies whether the current block is tracked for statsstatic Block.SoundSTONEStone sound typeprotected floatstrengthStores the current block's hardnessprivate StringtranslationKeyStores the block's translation keyprotected booleantransluscentSpecifies whether the current block is transluscentprotected booleanuseNeighbourLightstatic Block.SoundWOODWood sound type -
Constructor Summary
Constructors Modifier Constructor Description protectedBlock(Material material)Overloaded 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 Type Method Description voidappendCollisionBoxes(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 StateManagerappendProperties()Returns a new state manager with a property array.static booleanareBlocksEqual(Block one, Block two)Returns whether two blocks are equal.booleanblocksMovement(WorldView 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 blockbooleancanMobSpawnInside()Returns whether mobs can spawn inside the block.protected ItemStackcreateStackFromBlock(BlockState state)Creates and returns and ItemStack from a block.protected BlockdisableStats()Disables tracking by stats for the current block.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.booleanemitsRedstonePower()Returns whether the current block emits a redstone signal.static Blockget(String id)Returns a block from it's namefloatgetAmbientOcclusionLightLevel()Returns 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.intgetBlendColor(WorldView world, BlockPos pos)intgetBlockColor(WorldView view, BlockPos pos, int id)Returns the current block's colorstatic BlockgetBlockFromItem(Item item)Returns a block by converting a blockitem to a blockBlockStategetBlockState(BlockState state, WorldView view, BlockPos pos)Returns the current block's blockstate at a certain positionintgetBlockType()intgetBonusDrops(int id, Random rand)Returns the number bonus drops for a block when broken.intgetBrightness(WorldView worldView, BlockPos pos)static intgetByBlockState(BlockState state)Returns a certain Block's id from a blockstatestatic BlockgetById(int id)Returns a certain block from its idBoxgetCollisionBox(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 workBlockStategetDefaultState()Returns the block's default BlockState.intgetDropCount(Random rand)Returns the amount of items the block should drop on breaking without bonus rolls.ItemgetDropItem(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 idItemGroupgetItemGroup()Returns the block's ItemGroup.intgetLightLevel()Returns the block's luminescenceMaterialgetMaterial()Returns the block's materialMaterialColorgetMaterialColor(BlockState state)Returns the block's material color from it's state Blockstates can have different material colorsdoublegetMaxX()Returns the block's bounding box' minimum Y valuedoublegetMaxY()Returns the block's bounding box' maximum X valuedoublegetMaxZ()Returns the block's bounding box' maximum Z valueintgetMeta(BlockState state)Returns the metadata value for a certain BlockStateintgetMeta(World world, BlockPos pos)Returns metadata from a world and a BlockPosdoublegetMinX()Returns the block's bounding box' minimum X valuedoublegetMinY()Returns the block's bounding box' minimum Z valuedoublegetMinZ()Returns the block's bounding box' maximum Y valueBlock.OffsetTypegetOffsetType()Returns the block's offset type.intgetOpacity()Returns the current block's opacityItemgetPickItem(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.BoxgetSelectionBox(World world, BlockPos pos)BlockStategetStateFromData(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 idStateManagergetStateManager()Returns the current state manager.floatgetStrength(World world, BlockPos pos)Returns the current block's strengthintgetStrongRedstonePower(WorldView view, BlockPos pos, BlockState state, Direction facing)Returns the block's strong redstone power.intgetTickRate(World world)Returns the block's tick rate.StringgetTranslatedName()Translates and returns the translation keyStringgetTranslationKey()Returns the block's translation keyintgetWeakRedstonePower(WorldView 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.booleanhasBlockEntity()Returns whether the current block has a block entitybooleanhasCollision()Returns whether a block has collision, i.e.booleanhasCollision(WorldView worldView, BlockPos pos, Direction direction)booleanhasComparatorOutput()Returns whether the block provides comparator output.booleanhasStats()Returns whether the current block should be tracked for statsbooleanhasTransperancy()booleanisEqualTo(Block block)Returns whether the current block and another block are equalbooleanisFire()booleanisFlowerPot()booleanisFullBlock()Checks whether the current block is a full blockbooleanisFullCube()Checks whether the current block is a full cube.booleanisLeafBlock()Checks whether the current block is a normal block (used only byLeavesBlock)booleanisNormalBlock()Checks whether the block is a normal block.booleanisReplaceable(World world, BlockPos pos)booleanisSideInvisible(WorldView 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.booleanisTransluscent()Checks whether the current block is transluscentHitResultmethod_655(World world, BlockPos pos, Vec3d vec1, Vec3d vec2)private booleanmethod_676(Vec3d vec)BlockStatemethod_696(BlockState blockState)private booleanmethod_697(Vec3d vec)private booleanmethod_707(Vec3d vec)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 blockVec3donEntityCollision(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.voidrainTick(World world, BlockPos pos)Runs 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 voidregister(int id, String name, Block block)Registers a block to the registryprivate static voidregister(int id, Identifier identifier, Block block)Registers a block to the registrybooleanrenderAsNormalBlock()Returns whether the block can be rendered as a normal blockprotected booleanrequiresSilkTouch()voidscheduledTick(World world, BlockPos pos, BlockState state, Random rand)Runs when the block is updated as per a schedulevoidsetBlockItemBounds()Sets the bounds for the BlockItemprotected voidsetBoundingBox(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)Sets the block's bounding box.voidsetBoundingBox(WorldView view, BlockPos pos)protected voidsetDefaultState(BlockState state)Sets the block's default BlockState.voidsetEntityVelocity(World world, Entity entity)Sets the speed of an entity moving on the blockBlocksetItemGroup(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.BlocksetTranslationKey(String key)Sets the block's localization key.protected BlocksetUnbreakable()Sets the current block as unbreakable.static voidsetup()Registers all blocksbooleanshouldDropItemsOnExplosion(Explosion explosion)Returns whether the block should drop as an Item during an explosion.BlockStatestateFromData(int data)Returns a blockstate of the current block from it's idbooleanticksRandomly()Returns whether the current block has random ticksStringtoString()booleanusesNeighbourLight()Checks 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_591Lnet/minecraft/class_160;field_591:Lnet/minecraft/class_1605;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_593Lnet/minecraft/class_160;field_593:Lnet/minecraft/class_1381;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_594Lnet/minecraft/class_160;field_594:Lnet/minecraft/class_1389;named BLOCK_STATESLnet/minecraft/block/Block;BLOCK_STATES:Lnet/minecraft/util/IdList;
-
ORE
Ore sound type- Mappings:
Namespace Name Mixin selector official eLafh;e:Lafh$b;intermediary field_595Lnet/minecraft/class_160;field_595:Lnet/minecraft/class_160$class_162;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_596Lnet/minecraft/class_160;field_596:Lnet/minecraft/class_160$class_162;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_597Lnet/minecraft/class_160;field_597:Lnet/minecraft/class_160$class_162;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_598Lnet/minecraft/class_160;field_598:Lnet/minecraft/class_160$class_162;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_599Lnet/minecraft/class_160;field_599:Lnet/minecraft/class_160$class_162;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_600Lnet/minecraft/class_160;field_600:Lnet/minecraft/class_160$class_162;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_601Lnet/minecraft/class_160;field_601:Lnet/minecraft/class_160$class_162;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_602Lnet/minecraft/class_160;field_602:Lnet/minecraft/class_160$class_162;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_603Lnet/minecraft/class_160;field_603:Lnet/minecraft/class_160$class_162;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_604Lnet/minecraft/class_160;field_604:Lnet/minecraft/class_160$class_162;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_605Lnet/minecraft/class_160;field_605:Lnet/minecraft/class_160$class_162;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_606Lnet/minecraft/class_160;field_606:Lnet/minecraft/class_160$class_162;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_607Lnet/minecraft/class_160;field_607:Lnet/minecraft/class_160$class_162;named SLIMELnet/minecraft/block/Block;SLIME:Lnet/minecraft/block/Block$Sound;
-
itemGroup
- Mappings:
Namespace Name Mixin selector official bLafh;b:Lyz;intermediary field_592Lnet/minecraft/class_160;field_592:Lnet/minecraft/class_2029;named itemGroupLnet/minecraft/block/Block;itemGroup:Lnet/minecraft/item/ItemGroup;
-
fullBlock
protected boolean fullBlockSpecifies whether the current block is a full block- Mappings:
Namespace Name Mixin selector official rLafh;r:Zintermediary field_608Lnet/minecraft/class_160;field_608: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_609Lnet/minecraft/class_160;field_609: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_610Lnet/minecraft/class_160;field_610: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_611Lnet/minecraft/class_160;field_611:Inamed lightLevelLnet/minecraft/block/Block;lightLevel:I
-
useNeighbourLight
protected boolean useNeighbourLight- Mappings:
Namespace Name Mixin selector official vLafh;v:Zintermediary field_612Lnet/minecraft/class_160;field_612:Znamed useNeighbourLightLnet/minecraft/block/Block;useNeighbourLight:Z
-
strength
protected float strengthStores the current block's hardness- Mappings:
Namespace Name Mixin selector official wLafh;w:Fintermediary field_613Lnet/minecraft/class_160;field_613:Fnamed strengthLnet/minecraft/block/Block;strength:F
-
resistance
protected float resistanceStores the current block's resistance- Mappings:
Namespace Name Mixin selector official xLafh;x:Fintermediary field_614Lnet/minecraft/class_160;field_614:Fnamed resistanceLnet/minecraft/block/Block;resistance:F
-
stats
protected boolean statsSpecifies whether the current block is tracked for stats- Mappings:
Namespace Name Mixin selector official yLafh;y:Zintermediary field_615Lnet/minecraft/class_160;field_615: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_616Lnet/minecraft/class_160;field_616: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_576Lnet/minecraft/class_160;field_576: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_577Lnet/minecraft/class_160;field_577: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_578Lnet/minecraft/class_160;field_578: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_579Lnet/minecraft/class_160;field_579: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_580Lnet/minecraft/class_160;field_580: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_581Lnet/minecraft/class_160;field_581: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_582Lnet/minecraft/class_160;field_582: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_583Lnet/minecraft/class_160;field_583:Lnet/minecraft/class_160$class_162;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_584Lnet/minecraft/class_160;field_584:Fnamed particleGravityLnet/minecraft/block/Block;particleGravity:F
-
material
Stores the current block's material- See Also:
Material- Mappings:
Namespace Name Mixin selector official JLafh;J:Larm;intermediary field_585Lnet/minecraft/class_160;field_585:Lnet/minecraft/class_591;named materialLnet/minecraft/block/Block;material:Lnet/minecraft/block/Material;
-
materialColor
Stores the current block's material color- See Also:
MaterialColor- Mappings:
Namespace Name Mixin selector official KLafh;K:Larn;intermediary field_586Lnet/minecraft/class_160;field_586:Lnet/minecraft/class_592;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_587Lnet/minecraft/class_160;field_587: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_588Lnet/minecraft/class_160;field_588:Lnet/minecraft/class_378;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_589Lnet/minecraft/class_160;field_589:Lnet/minecraft/class_376;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_590Lnet/minecraft/class_160;field_590: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_160;<init>(Lnet/minecraft/class_591;Lnet/minecraft/class_592;)Vnamed <init>Lnet/minecraft/block/Block;<init>(Lnet/minecraft/block/Material;Lnet/minecraft/block/MaterialColor;)V
-
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_160;<init>(Lnet/minecraft/class_591;)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_670Lnet/minecraft/class_160;method_670(Lnet/minecraft/class_160;)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_717Lnet/minecraft/class_160;method_717(Lnet/minecraft/class_376;)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_701Lnet/minecraft/class_160;method_701(I)Lnet/minecraft/class_160;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_710Lnet/minecraft/class_160;method_710(I)Lnet/minecraft/class_376;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_681Lnet/minecraft/class_160;method_681(Lnet/minecraft/class_2054;)Lnet/minecraft/class_160;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_698Lnet/minecraft/class_160;method_698(Ljava/lang/String;)Lnet/minecraft/class_160;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_732Lnet/minecraft/class_160;method_732()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_733Lnet/minecraft/class_160;method_733()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_734Lnet/minecraft/class_160;method_734()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_735Lnet/minecraft/class_160;method_735()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_736Lnet/minecraft/class_160;method_736()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_737Lnet/minecraft/class_160;method_737()Lnet/minecraft/class_591;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_720Lnet/minecraft/class_160;method_720(Lnet/minecraft/class_376;)Lnet/minecraft/class_592;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_637Lnet/minecraft/class_160;method_637(I)Lnet/minecraft/class_376;named stateFromDataLnet/minecraft/block/Block;stateFromData(I)Lnet/minecraft/block/BlockState;
-
getData
Returns the data value for a blockstate Throws anIllegalArmumentExceptionas this method does not work- 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
-
getBlockState
Returns the current block's blockstate at a certain position- 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;
-
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_669Lnet/minecraft/class_160;method_669(Lnet/minecraft/class_160$class_162;)Lnet/minecraft/class_160;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_715Lnet/minecraft/class_160;method_715(I)Lnet/minecraft/class_160;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_635Lnet/minecraft/class_160;method_635(F)Lnet/minecraft/class_160;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_685Lnet/minecraft/class_160;method_685(F)Lnet/minecraft/class_160;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_738Lnet/minecraft/class_160;method_738()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_739Lnet/minecraft/class_160;method_739()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_740Lnet/minecraft/class_160;method_740()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_709Lnet/minecraft/class_160;method_709()Znamed renderAsNormalBlockLnet/minecraft/block/Block;renderAsNormalBlock()Z
-
blocksMovement
- Mappings:
Namespace Name Mixin selector official bLafh;b(Ladq;Lcj;)Zintermediary method_692Lnet/minecraft/class_160;method_692(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Znamed blocksMovementLnet/minecraft/block/Block;blocksMovement(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Z
-
getBlockType
public int getBlockType()- Mappings:
Namespace Name Mixin selector official bLafh;b()Iintermediary method_684Lnet/minecraft/class_160;method_684()Inamed getBlockTypeLnet/minecraft/block/Block;getBlockType()I
-
isReplaceable
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;)Zintermediary method_643Lnet/minecraft/class_160;method_643(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)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_700Lnet/minecraft/class_160;method_700(F)Lnet/minecraft/class_160;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_741Lnet/minecraft/class_160;method_741()Lnet/minecraft/class_160;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_719Lnet/minecraft/class_160;method_719(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)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_683Lnet/minecraft/class_160;method_683(Z)Lnet/minecraft/class_160;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_742Lnet/minecraft/class_160;method_742()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_743Lnet/minecraft/class_160;method_743()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_636Lnet/minecraft/class_160;method_636(FFFFFF)Vnamed setBoundingBoxLnet/minecraft/block/Block;setBoundingBox(FFFFFF)V
-
getBrightness
- Mappings:
Namespace Name Mixin selector official cLafh;c(Ladq;Lcj;)Iintermediary method_705Lnet/minecraft/class_160;method_705(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Inamed getBrightnessLnet/minecraft/block/Block;getBrightness(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)I
-
isSideInvisible
@Environment(CLIENT) public boolean isSideInvisible(WorldView 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. Used by glass to prevent the white dots from appearing everywhere through adjacent glass blocks.- Parameters:
view- WorldView 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_668Lnet/minecraft/class_160;method_668(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;Lnet/minecraft/class_1383;)Znamed isSideInvisibleLnet/minecraft/block/Block;isSideInvisible(Lnet/minecraft/world/WorldView;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_694Lnet/minecraft/class_160;method_694(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;Lnet/minecraft/class_1383;)Znamed hasCollisionLnet/minecraft/block/Block;hasCollision(Lnet/minecraft/world/WorldView;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_686Lnet/minecraft/class_160;method_686(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)Lnet/minecraft/class_646;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_649Lnet/minecraft/class_160;method_649(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_646;Ljava/util/List;Lnet/minecraft/class_1745;)Vnamed appendCollisionBoxesLnet/minecraft/block/Block;appendCollisionBoxes(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Box;Ljava/util/List;Lnet/minecraft/entity/Entity;)V
-
getCollisionBox
Returns a box by adding the block's current location and the block's corresponding value in its Bounding Box- Parameters:
world- The world that the block has been placedpos- The block's positionstate- The block's BlockState- Returns:
- The Collision box
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lalz;)Laug;intermediary method_645Lnet/minecraft/class_160;method_645(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)Lnet/minecraft/class_646;named getCollisionBoxLnet/minecraft/block/Block;getCollisionBox(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/util/math/Box;
-
hasTransperancy
public boolean hasTransperancy()- Mappings:
Namespace Name Mixin selector official cLafh;c()Zintermediary method_699Lnet/minecraft/class_160;method_699()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_675Lnet/minecraft/class_160;method_675(Lnet/minecraft/class_376;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_615Lnet/minecraft/class_160;method_615()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_650Lnet/minecraft/class_160;method_650(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Ljava/util/Random;)Vnamed onUpdateTickLnet/minecraft/block/Block;onUpdateTick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Ljava/util/Random;)V
-
scheduledTick
Runs when the block is updated as per a schedule- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockStaterand- Random object- Mappings:
Namespace Name Mixin selector official bLafh;b(Ladm;Lcj;Lalz;Ljava/util/Random;)Vintermediary method_690Lnet/minecraft/class_160;method_690(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Ljava/util/Random;)Vnamed scheduledTickLnet/minecraft/block/Block;scheduledTick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Ljava/util/Random;)V
-
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_704Lnet/minecraft/class_160;method_704(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;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_712Lnet/minecraft/class_160;method_712(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)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_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
-
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_642Lnet/minecraft/class_160;method_642(Lnet/minecraft/class_99;)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_703Lnet/minecraft/class_160;method_703(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)Vnamed onCreationLnet/minecraft/block/Block;onCreation(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
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_688Lnet/minecraft/class_160;method_688(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)Vnamed onBreakingLnet/minecraft/block/Block;onBreaking(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
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_677Lnet/minecraft/class_160;method_677(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_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;
-
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_679Lnet/minecraft/class_160;method_679(Lnet/minecraft/class_1963;Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)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_689Lnet/minecraft/class_160;method_689(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;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_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
-
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_662Lnet/minecraft/class_160;method_662(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_2056;)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_687Lnet/minecraft/class_160;method_687(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;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_672Lnet/minecraft/class_160;method_672(Lnet/minecraft/class_376;)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_678Lnet/minecraft/class_160;method_678(Lnet/minecraft/class_1745;)Fnamed getBlastResistanceLnet/minecraft/block/Block;getBlastResistance(Lnet/minecraft/entity/Entity;)F
-
method_655
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Laui;Laui;)Lauh;intermediary method_655Lnet/minecraft/class_160;method_655(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_649;Lnet/minecraft/class_649;)Lnet/minecraft/class_647;named method_655Lnet/minecraft/block/Block;method_655(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Vec3d;)Lnet/minecraft/util/hit/HitResult;
-
method_676
- Mappings:
Namespace Name Mixin selector official aLafh;a(Laui;)Zintermediary method_676Lnet/minecraft/class_160;method_676(Lnet/minecraft/class_649;)Znamed method_676Lnet/minecraft/block/Block;method_676(Lnet/minecraft/util/math/Vec3d;)Z
-
method_697
- Mappings:
Namespace Name Mixin selector official bLafh;b(Laui;)Zintermediary method_697Lnet/minecraft/class_160;method_697(Lnet/minecraft/class_649;)Znamed method_697Lnet/minecraft/block/Block;method_697(Lnet/minecraft/util/math/Vec3d;)Z
-
method_707
- Mappings:
Namespace Name Mixin selector official cLafh;c(Laui;)Zintermediary method_707Lnet/minecraft/class_160;method_707(Lnet/minecraft/class_649;)Znamed method_707Lnet/minecraft/block/Block;method_707(Lnet/minecraft/util/math/Vec3d;)Z
-
onDestroyedByExplosion
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Ladi;)Vintermediary method_644Lnet/minecraft/class_160;method_644(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_93;)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_731Lnet/minecraft/class_160;method_731()Lnet/minecraft/class_91;named getRenderLayerTypeLnet/minecraft/block/Block;getRenderLayerType()Lnet/minecraft/client/render/RenderLayer;
-
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_657Lnet/minecraft/class_160;method_657(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_1383;Lnet/minecraft/class_2056;)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_691Lnet/minecraft/class_160;method_691(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_1383;)Znamed canBePlacedAdjacentLnet/minecraft/block/Block;canBePlacedAdjacent(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)Z
-
canBePlacedAtPos
Returns whether the current block can be placed at a certainBlockPos- Returns:
- Whether the current block can be placed at a BlockPos
- Mappings:
Namespace Name Mixin selector official dLafh;d(Ladm;Lcj;)Zintermediary method_711Lnet/minecraft/class_160;method_711(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)Znamed canBePlacedAtPosLnet/minecraft/block/Block;canBePlacedAtPos(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Z
-
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_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
-
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_658Lnet/minecraft/class_160;method_658(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_1745;)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_656Lnet/minecraft/class_160;method_656(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_1383;FFFILnet/minecraft/class_1752;)Lnet/minecraft/class_376;named getStateFromDataLnet/minecraft/block/Block;getStateFromData(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;FFFILnet/minecraft/entity/LivingEntity;)Lnet/minecraft/block/BlockState;
-
onBlockBreakStart
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lwn;)Vintermediary method_661Lnet/minecraft/class_160;method_661(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_1963;)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_660Lnet/minecraft/class_160;method_660(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_1745;Lnet/minecraft/class_649;)Lnet/minecraft/class_649;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_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
-
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_616Lnet/minecraft/class_160;method_616()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_617Lnet/minecraft/class_160;method_617()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_618Lnet/minecraft/class_160;method_618()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_619Lnet/minecraft/class_160;method_619()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_620Lnet/minecraft/class_160;method_620()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_621Lnet/minecraft/class_160;method_621()Dnamed getMaxZLnet/minecraft/block/Block;getMaxZ()D
-
getColor
- Mappings:
Namespace Name Mixin selector official HLafh;H()Iintermediary method_622Lnet/minecraft/class_160;method_622()Inamed getColorLnet/minecraft/block/Block;getColor()I
-
getColor
- Mappings:
Namespace Name Mixin selector official hLafh;h(Lalz;)Iintermediary method_722Lnet/minecraft/class_160;method_722(Lnet/minecraft/class_376;)Inamed getColorLnet/minecraft/block/Block;getColor(Lnet/minecraft/block/BlockState;)I
-
getBlockColor
Returns the current block's color- Parameters:
view- WorldView instancepos- The block's positionid- Id- Returns:
- Block color
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladq;Lcj;I)Iintermediary method_666Lnet/minecraft/class_160;method_666(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;I)Inamed getBlockColorLnet/minecraft/block/Block;getBlockColor(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;I)I
-
getBlendColor
- Mappings:
Namespace Name Mixin selector official dLafh;d(Ladq;Lcj;)Iintermediary method_713Lnet/minecraft/class_160;method_713(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Inamed getBlendColorLnet/minecraft/block/Block;getBlendColor(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)I
-
getWeakRedstonePower
Returns the block's weak redstone power.- Parameters:
view- WorldView instancepos- The block's positionstate- The block's BlockStatefacing- The block's direction- Returns:
- Block's weak redstone power
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladq;Lcj;Lalz;Lcq;)Iintermediary method_667Lnet/minecraft/class_160;method_667(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1383;)Inamed getWeakRedstonePowerLnet/minecraft/block/Block;getWeakRedstonePower(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Direction;)I
-
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_723Lnet/minecraft/class_160;method_723()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_651Lnet/minecraft/class_160;method_651(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1745;)Vnamed onEntityCollisionLnet/minecraft/block/Block;onEntityCollision(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/Entity;)V
-
getStrongRedstonePower
public int getStrongRedstonePower(WorldView view, BlockPos pos, BlockState state, Direction facing)Returns the block's strong redstone power.- Parameters:
view- WorldView instancepos- The block's positionstate- The block's BlockStatefacing- The block's direction- Returns:
- The Block's strong redstone power
- Mappings:
Namespace Name Mixin selector official bLafh;b(Ladq;Lcj;Lalz;Lcq;)Iintermediary method_693Lnet/minecraft/class_160;method_693(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1383;)Inamed getStrongRedstonePowerLnet/minecraft/block/Block;getStrongRedstonePower(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Direction;)I
-
setBlockItemBounds
public void setBlockItemBounds()Sets the bounds for the BlockItem- Mappings:
Namespace Name Mixin selector official jLafh;j()Vintermediary method_725Lnet/minecraft/class_160;method_725()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_664Lnet/minecraft/class_160;method_664(Lnet/minecraft/class_99;Lnet/minecraft/class_1963;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_348;)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_623Lnet/minecraft/class_160;method_623()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_724Lnet/minecraft/class_160;method_724(Lnet/minecraft/class_376;)Lnet/minecraft/class_2056;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_639Lnet/minecraft/class_160;method_639(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_652Lnet/minecraft/class_160;method_652(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1752;Lnet/minecraft/class_2056;)Vnamed onPlacedLnet/minecraft/block/Block;onPlaced(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/item/ItemStack;)V
-
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_718Lnet/minecraft/class_160;method_718()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_708Lnet/minecraft/class_160;method_708(Ljava/lang/String;)Lnet/minecraft/class_160;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_716Lnet/minecraft/class_160;method_716()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_634Lnet/minecraft/class_160;method_634()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_647Lnet/minecraft/class_160;method_647(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;II)Znamed onEventLnet/minecraft/block/Block;onEvent(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;II)Z
-
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_624Lnet/minecraft/class_160;method_624()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_625Lnet/minecraft/class_160;method_625()Lnet/minecraft/class_160;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_728Lnet/minecraft/class_160;method_728()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_721Lnet/minecraft/class_160;method_721()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_659Lnet/minecraft/class_160;method_659(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_1745;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_663Lnet/minecraft/class_160;method_663(Lnet/minecraft/class_99;Lnet/minecraft/class_1745;)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_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;
-
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_726Lnet/minecraft/class_160;method_726(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)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_682Lnet/minecraft/class_160;method_682(Lnet/minecraft/class_2054;Lnet/minecraft/class_2029;Ljava/util/List;)Vnamed appendItemStacksLnet/minecraft/block/Block;appendItemStacks(Lnet/minecraft/item/Item;Lnet/minecraft/item/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_626Lnet/minecraft/class_160;method_626()Lnet/minecraft/class_2029;named getItemGroupLnet/minecraft/block/Block;getItemGroup()Lnet/minecraft/item/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_680Lnet/minecraft/class_160;method_680(Lnet/minecraft/class_2029;)Lnet/minecraft/class_160;named setItemGroupLnet/minecraft/block/Block;setItemGroup(Lnet/minecraft/item/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_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
-
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_729Lnet/minecraft/class_160;method_729(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)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_627Lnet/minecraft/class_160;method_627()Znamed isFlowerPotLnet/minecraft/block/Block;isFlowerPot()Z
-
isFire
public boolean isFire()- Mappings:
Namespace Name Mixin selector official NLafh;N()Zintermediary method_628Lnet/minecraft/class_160;method_628()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_641Lnet/minecraft/class_160;method_641(Lnet/minecraft/class_93;)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_695Lnet/minecraft/class_160;method_695(Lnet/minecraft/class_160;)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_671Lnet/minecraft/class_160;method_671(Lnet/minecraft/class_160;Lnet/minecraft/class_160;)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_629Lnet/minecraft/class_160;method_629()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_730Lnet/minecraft/class_160;method_730(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)Inamed getComparatorOutputLnet/minecraft/block/Block;getComparatorOutput(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)I
-
method_696
- Mappings:
Namespace Name Mixin selector official bLafh;b(Lalz;)Lalz;intermediary method_696Lnet/minecraft/class_160;method_696(Lnet/minecraft/class_376;)Lnet/minecraft/class_376;named method_696Lnet/minecraft/block/Block;method_696(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/BlockState;
-
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_714Lnet/minecraft/class_160;method_714()Lnet/minecraft/class_378;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_630Lnet/minecraft/class_160;method_630()Lnet/minecraft/class_378;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_727Lnet/minecraft/class_160;method_727(Lnet/minecraft/class_376;)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_631Lnet/minecraft/class_160;method_631()Lnet/minecraft/class_376;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_632Lnet/minecraft/class_160;method_632()Lnet/minecraft/class_160$class_161;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_633Lnet/minecraft/class_160;method_633()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_640Lnet/minecraft/class_160;method_640(ILnet/minecraft/class_1605;Lnet/minecraft/class_160;)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_638Lnet/minecraft/class_160;method_638(ILjava/lang/String;Lnet/minecraft/class_160;)Vnamed registerLnet/minecraft/block/Block;register(ILjava/lang/String;Lnet/minecraft/block/Block;)V
-