Package net.minecraft.block
Class GrassBlock
java.lang.Object
net.minecraft.block.Block
net.minecraft.block.GrassBlock
- All Implemented Interfaces:
Growable
public class GrassBlock extends Block implements Growable
- Mappings:
Namespace Name official aheintermediary net/minecraft/class_223named net/minecraft/block/GrassBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.OffsetType, Block.Sound -
Field Summary
Fields Modifier and Type Field Description static BooleanPropertySNOWYFields inherited from class net.minecraft.block.Block
ANVIL, BLOCK_STATES, blockEntity, boundingBoxMaxX, boundingBoxMaxY, boundingBoxMaxZ, boundingBoxMinX, boundingBoxMinY, boundingBoxMinZ, CLOTH, fullBlock, GLASS, GRASS, GRAVEL, LADDER, lightLevel, material, materialColor, opacity, ORE, particleGravity, RAIL, randomTicks, REGISTRY, resistance, SAND, SLIME, slipperiness, SNOW, sound, stateManager, stats, STONE, strength, transluscent, useNeighbourLight, WOOD -
Constructor Summary
Constructors Modifier Constructor Description protectedGrassBlock() -
Method Summary
Modifier and Type Method Description protected StateManagerappendProperties()Returns a new state manager with a property array.booleancanBeFertilized(World world, Random random, BlockPos pos, BlockState state)booleancanGrow(World world, BlockPos pos, BlockState state, boolean bl)intgetBlockColor(WorldView view, BlockPos pos, int id)Returns the current block's colorBlockStategetBlockState(BlockState state, WorldView view, BlockPos pos)Returns the current block's blockstate at a certain positionintgetColor()intgetColor(BlockState state)intgetData(BlockState state)Returns the data value for a blockstate Throws anIllegalArmumentExceptionas this method does not workItemgetDropItem(BlockState blockState, Random random, int state)Returns the item that must be dropped when the block is brokenRenderLayergetRenderLayerType()Returns the appropriate RenderLayer for a block.voidgrow(World world, Random random, BlockPos pos, BlockState state)voidscheduledTick(World world, BlockPos pos, BlockState state, Random rand)Runs when the block is updated as per a scheduleMethods inherited from class net.minecraft.block.Block
appendCollisionBoxes, appendItemStacks, areBlocksEqual, blocksMovement, calcBlockBreakingData, canBePlacedAdjacent, canBePlacedAtPos, canBeReplaced, canCollide, canMobSpawnInside, createStackFromBlock, disableStats, dropAsItem, dropExperience, emitsRedstonePower, get, getAmbientOcclusionLightLevel, getBlastResistance, getBlendColor, getBlockFromItem, getBlockType, getBonusDrops, getBrightness, getByBlockState, getById, getCollisionBox, getComparatorOutput, getDefaultState, getDropCount, getIdByBlock, getItemGroup, getLightLevel, getMaterial, getMaterialColor, getMaxX, getMaxY, getMaxZ, getMeta, getMeta, getMinX, getMinY, getMinZ, getOffsetType, getOpacity, getPickItem, getPistonInteractionType, getSelectionBox, getStateFromData, getStateFromRawId, getStateManager, getStrength, getStrongRedstonePower, getTickRate, getTranslatedName, getTranslationKey, getWeakRedstonePower, harvest, hasBlockEntity, hasCollision, hasCollision, hasComparatorOutput, hasStats, hasTransperancy, isEqualTo, isFire, isFlowerPot, isFullBlock, isFullCube, isLeafBlock, isNormalBlock, isReplaceable, isSideInvisible, isTransluscent, method_655, method_696, neighborUpdate, onBlockBreak, onBlockBreakStart, onBreakByPlayer, onBreakByPlayer, onBreaking, onCreation, onDestroyedByExplosion, onEntityCollision, onEntityCollision, onEvent, onLandedUpon, onPlaced, onSteppedOn, onUpdateTick, onUse, rainTick, randomDisplayTick, randomDropAsItem, renderAsNormalBlock, requiresSilkTouch, setBlockItemBounds, setBoundingBox, setBoundingBox, setDefaultState, setEntityVelocity, setItemGroup, setLightLevel, setOpacity, setResistance, setSound, setStrength, setTickRandomly, setTranslationKey, setUnbreakable, setup, shouldDropItemsOnExplosion, stateFromData, ticksRandomly, toString, usesNeighbourLight
-
Field Details
-
SNOWY
- Mappings:
Namespace Name Mixin selector official aLahe;a:Lamk;intermediary field_975Lnet/minecraft/class_223;field_975:Lnet/minecraft/class_388;named SNOWYLnet/minecraft/block/GrassBlock;SNOWY:Lnet/minecraft/state/property/BooleanProperty;
-
-
Constructor Details
-
GrassBlock
protected GrassBlock()
-
-
Method Details
-
getBlockState
Returns the current block's blockstate at a certain position- Overrides:
getBlockStatein classBlock- Parameters:
state- The original blockstateview- WorldView instancepos- The block's position- Returns:
- state
- Mappings:
Namespace Name Mixin selector official aLafh;a(Lalz;Ladq;Lcj;)Lalz;intermediary method_673Lnet/minecraft/class_160;method_673(Lnet/minecraft/class_376;Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Lnet/minecraft/class_376;named getBlockStateLnet/minecraft/block/Block;getBlockState(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/BlockState;
-
getColor
-
getColor
-
getBlockColor
Returns the current block's color- Overrides:
getBlockColorin classBlock- 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
-
scheduledTick
Runs when the block is updated as per a schedule- Overrides:
scheduledTickin classBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockStaterand- Random object- Mappings:
Namespace Name Mixin selector official bLafh;b(Ladm;Lcj;Lalz;Ljava/util/Random;)Vintermediary method_690Lnet/minecraft/class_160;method_690(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Ljava/util/Random;)Vnamed scheduledTickLnet/minecraft/block/Block;scheduledTick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Ljava/util/Random;)V
-
getDropItem
Returns the item that must be dropped when the block is broken- Overrides:
getDropItemin classBlock- Parameters:
blockState- The block's BlockStaterandom- Random objectstate- State- Returns:
- The Item that drops after the block breaks
- Mappings:
Namespace Name Mixin selector official aLafh;a(Lalz;Ljava/util/Random;I)Lzw;intermediary method_674Lnet/minecraft/class_160;method_674(Lnet/minecraft/class_376;Ljava/util/Random;I)Lnet/minecraft/class_2054;named getDropItemLnet/minecraft/block/Block;getDropItem(Lnet/minecraft/block/BlockState;Ljava/util/Random;I)Lnet/minecraft/item/Item;
-
canGrow
- Specified by:
canGrowin interfaceGrowable- Mappings:
Namespace Name Mixin selector official aLafj;a(Ladm;Lcj;Lalz;Z)Zintermediary method_750Lnet/minecraft/class_164;method_750(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Z)Znamed canGrowLnet/minecraft/block/Growable;canGrow(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Z)Z
-
canBeFertilized
- Specified by:
canBeFertilizedin interfaceGrowable- Mappings:
Namespace Name Mixin selector official aLafj;a(Ladm;Ljava/util/Random;Lcj;Lalz;)Zintermediary method_751Lnet/minecraft/class_164;method_751(Lnet/minecraft/class_99;Ljava/util/Random;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)Znamed canBeFertilizedLnet/minecraft/block/Growable;canBeFertilized(Lnet/minecraft/world/World;Ljava/util/Random;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Z
-
grow
- Specified by:
growin interfaceGrowable- Mappings:
Namespace Name Mixin selector official bLafj;b(Ladm;Ljava/util/Random;Lcj;Lalz;)Vintermediary method_752Lnet/minecraft/class_164;method_752(Lnet/minecraft/class_99;Ljava/util/Random;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)Vnamed growLnet/minecraft/block/Growable;grow(Lnet/minecraft/world/World;Ljava/util/Random;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
getRenderLayerType
Returns the appropriate RenderLayer for a block. Only called on the client.- Overrides:
getRenderLayerTypein classBlock- Returns:
- The block's RenderLayer
- Mappings:
Namespace Name Mixin selector official mLafh;m()Ladf;intermediary method_731Lnet/minecraft/class_160;method_731()Lnet/minecraft/class_91;named getRenderLayerTypeLnet/minecraft/block/Block;getRenderLayerType()Lnet/minecraft/client/render/RenderLayer;
-
getData
Returns the data value for a blockstate Throws anIllegalArmumentExceptionas this method does not work- Overrides:
getDatain classBlock- Parameters:
state- The Blockstate- Returns:
- Zero
- Mappings:
Namespace Name Mixin selector official cLafh;c(Lalz;)Iintermediary method_706Lnet/minecraft/class_160;method_706(Lnet/minecraft/class_376;)Inamed getDataLnet/minecraft/block/Block;getData(Lnet/minecraft/block/BlockState;)I
-
appendProperties
Returns a new state manager with a property array.- Overrides:
appendPropertiesin classBlock- Returns:
- New state manager
- Mappings:
Namespace Name Mixin selector official eLafh;e()Lama;intermediary method_714Lnet/minecraft/class_160;method_714()Lnet/minecraft/class_378;named appendPropertiesLnet/minecraft/block/Block;appendProperties()Lnet/minecraft/state/StateManager;
-