Package net.minecraft.block
Class CarpetBlock
java.lang.Object
net.minecraft.block.Block
net.minecraft.block.CarpetBlock
public class CarpetBlock extends Block
- Mappings:
Namespace Name official aksintermediary net/minecraft/class_342named net/minecraft/block/CarpetBlock
-
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 EnumProperty<DyeColor>COLORFields 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 protectedCarpetBlock() -
Method Summary
Modifier and Type Method Description voidappendItemStacks(Item item, ItemGroup group, List<ItemStack> stacks)Appends ItemStacks to an itemgroup.protected StateManagerappendProperties()Returns a new state manager with a property array.booleancanBePlacedAtPos(World world, BlockPos pos)Returns whether the current block can be placed at a certainBlockPosintgetData(BlockState state)Returns the data value for a blockstate Throws anIllegalArmumentExceptionas this method does not workMaterialColorgetMaterialColor(BlockState state)Returns the block's material color from it's state Blockstates can have different material colorsintgetMeta(BlockState state)Returns the metadata value for a certain BlockStatebooleanhasTransperancy()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.protected voidmethod_1059(int int2)private booleanmethod_1060(World world, BlockPos blockPos)private booleanmethod_1061(World world, BlockPos blockPos, BlockState blockState)voidneighborUpdate(World world, BlockPos pos, BlockState state, Block block)Runs when its adjacent blocks are updated.booleanrenderAsNormalBlock()Returns whether the block can be rendered as a normal blockvoidsetBlockItemBounds()Sets the bounds for the BlockItemvoidsetBoundingBox(WorldView view, BlockPos pos)BlockStatestateFromData(int data)Returns a blockstate of the current block from it's idMethods inherited from class net.minecraft.block.Block
appendCollisionBoxes, areBlocksEqual, blocksMovement, calcBlockBreakingData, canBePlacedAdjacent, canBeReplaced, canCollide, canMobSpawnInside, createStackFromBlock, disableStats, dropAsItem, dropExperience, emitsRedstonePower, get, getAmbientOcclusionLightLevel, getBlastResistance, getBlendColor, getBlockColor, getBlockFromItem, getBlockState, getBlockType, getBonusDrops, getBrightness, getByBlockState, getById, getCollisionBox, getColor, getColor, getComparatorOutput, getDefaultState, getDropCount, getDropItem, getIdByBlock, getItemGroup, getLightLevel, getMaterial, getMaxX, getMaxY, getMaxZ, getMeta, getMinX, getMinY, getMinZ, getOffsetType, getOpacity, getPickItem, getPistonInteractionType, getRenderLayerType, getSelectionBox, getStateFromData, getStateFromRawId, getStateManager, getStrength, getStrongRedstonePower, getTickRate, getTranslatedName, getTranslationKey, getWeakRedstonePower, harvest, hasBlockEntity, hasCollision, hasCollision, hasComparatorOutput, hasStats, isEqualTo, isFire, isFlowerPot, isFullBlock, isFullCube, isLeafBlock, isNormalBlock, isReplaceable, isTransluscent, method_655, method_696, onBlockBreak, onBlockBreakStart, onBreakByPlayer, onBreakByPlayer, onBreaking, onCreation, onDestroyedByExplosion, onEntityCollision, onEntityCollision, onEvent, onLandedUpon, onPlaced, onSteppedOn, onUpdateTick, onUse, rainTick, randomDisplayTick, randomDropAsItem, requiresSilkTouch, scheduledTick, setBoundingBox, setDefaultState, setEntityVelocity, setItemGroup, setLightLevel, setOpacity, setResistance, setSound, setStrength, setTickRandomly, setTranslationKey, setUnbreakable, setup, shouldDropItemsOnExplosion, ticksRandomly, toString, usesNeighbourLight
-
Field Details
-
COLOR
- Mappings:
Namespace Name Mixin selector official aLaks;a:Lamm;intermediary field_1325Lnet/minecraft/class_342;field_1325:Lnet/minecraft/class_390;named COLORLnet/minecraft/block/CarpetBlock;COLOR:Lnet/minecraft/state/property/EnumProperty;
-
-
Constructor Details
-
CarpetBlock
protected CarpetBlock()
-
-
Method Details
-
getMaterialColor
Returns the block's material color from it's state Blockstates can have different material colors- Overrides:
getMaterialColorin classBlock- 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;
-
hasTransperancy
public boolean hasTransperancy()- Overrides:
hasTransperancyin classBlock- Mappings:
Namespace Name Mixin selector official cLafh;c()Zintermediary method_699Lnet/minecraft/class_160;method_699()Znamed hasTransperancyLnet/minecraft/block/Block;hasTransperancy()Z
-
renderAsNormalBlock
public boolean renderAsNormalBlock()Returns whether the block can be rendered as a normal block- Overrides:
renderAsNormalBlockin classBlock- Returns:
- Whether the block can be rendered as a normal block
- Mappings:
Namespace Name Mixin selector official dLafh;d()Zintermediary method_709Lnet/minecraft/class_160;method_709()Znamed renderAsNormalBlockLnet/minecraft/block/Block;renderAsNormalBlock()Z
-
setBlockItemBounds
public void setBlockItemBounds()Sets the bounds for the BlockItem- Overrides:
setBlockItemBoundsin classBlock- Mappings:
Namespace Name Mixin selector official jLafh;j()Vintermediary method_725Lnet/minecraft/class_160;method_725()Vnamed setBlockItemBoundsLnet/minecraft/block/Block;setBlockItemBounds()V
-
setBoundingBox
- Overrides:
setBoundingBoxin classBlock- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladq;Lcj;)Vintermediary method_665Lnet/minecraft/class_160;method_665(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Vnamed setBoundingBoxLnet/minecraft/block/Block;setBoundingBox(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)V
-
method_1059
protected void method_1059(int int2)- Mappings:
Namespace Name Mixin selector official bLaks;b(I)Vintermediary method_1059Lnet/minecraft/class_342;method_1059(I)Vnamed method_1059Lnet/minecraft/block/CarpetBlock;method_1059(I)V
-
canBePlacedAtPos
Returns whether the current block can be placed at a certainBlockPos- Overrides:
canBePlacedAtPosin classBlock- Returns:
- Whether the current block can be placed at a BlockPos
- Mappings:
Namespace Name Mixin selector official dLafh;d(Ladm;Lcj;)Zintermediary method_711Lnet/minecraft/class_160;method_711(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)Znamed canBePlacedAtPosLnet/minecraft/block/Block;canBePlacedAtPos(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Z
-
neighborUpdate
Runs when its adjacent blocks are updated. It will also run when the block is placed or removed as Air is being updated.- Overrides:
neighborUpdatein classBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockStateblock- The adjacent Block that updated the current block- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lalz;Lafh;)Vintermediary method_648Lnet/minecraft/class_160;method_648(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_160;)Vnamed neighborUpdateLnet/minecraft/block/Block;neighborUpdate(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/Block;)V
-
method_1061
- Mappings:
Namespace Name Mixin selector official eLaks;e(Ladm;Lcj;Lalz;)Zintermediary method_1061Lnet/minecraft/class_342;method_1061(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)Znamed method_1061Lnet/minecraft/block/CarpetBlock;method_1061(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Z
-
method_1060
- Mappings:
Namespace Name Mixin selector official eLaks;e(Ladm;Lcj;)Zintermediary method_1060Lnet/minecraft/class_342;method_1060(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)Znamed method_1060Lnet/minecraft/block/CarpetBlock;method_1060(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Z
-
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.- Overrides:
isSideInvisiblein classBlock- 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
-
getMeta
Returns the metadata value for a certain BlockState- Overrides:
getMetain classBlock- 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
-
appendItemStacks
@Environment(CLIENT) public void appendItemStacks(Item item, ItemGroup group, List<ItemStack> stacks)Appends ItemStacks to an itemgroup. Only called on the client.- Overrides:
appendItemStacksin classBlock- 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
-
stateFromData
Returns a blockstate of the current block from it's id- Overrides:
stateFromDatain classBlock- Parameters:
data- The Blockstate's associated data value- Returns:
- The Default state
- Mappings:
Namespace Name Mixin selector official aLafh;a(I)Lalz;intermediary method_637Lnet/minecraft/class_160;method_637(I)Lnet/minecraft/class_376;named stateFromDataLnet/minecraft/block/Block;stateFromData(I)Lnet/minecraft/block/BlockState;
-
getData
Returns the data value for a blockstate Throws anIllegalArmumentExceptionas this method does not work- Overrides:
getDatain classBlock- Parameters:
state- The Blockstate- Returns:
- Zero
- Mappings:
Namespace Name Mixin selector official cLafh;c(Lalz;)Iintermediary method_706Lnet/minecraft/class_160;method_706(Lnet/minecraft/class_376;)Inamed getDataLnet/minecraft/block/Block;getData(Lnet/minecraft/block/BlockState;)I
-
appendProperties
Returns a new state manager with a property array.- Overrides:
appendPropertiesin classBlock- Returns:
- New state manager
- Mappings:
Namespace Name Mixin selector official eLafh;e()Lama;intermediary method_714Lnet/minecraft/class_160;method_714()Lnet/minecraft/class_378;named appendPropertiesLnet/minecraft/block/Block;appendProperties()Lnet/minecraft/state/StateManager;
-