Package net.minecraft.block
Class DoublePlantBlock
java.lang.Object
net.minecraft.block.Block
net.minecraft.block.PlantBlock
net.minecraft.block.DoublePlantBlock
- All Implemented Interfaces:
Growable
public class DoublePlantBlock extends PlantBlock implements Growable
- Mappings:
Namespace Name official agiintermediary net/minecraft/class_195named net/minecraft/block/DoublePlantBlock
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDoublePlantBlock.DoublePlantTypestatic classDoublePlantBlock.HalfTypeNested classes/interfaces inherited from class net.minecraft.block.Block
Block.OffsetType, Block.Sound -
Field Summary
Fields Modifier and Type Field Description static EnumProperty<Direction>FACINGstatic EnumProperty<DoublePlantBlock.HalfType>HALFstatic EnumProperty<DoublePlantBlock.DoublePlantType>VARIANTFields inherited from class net.minecraft.block.Block
ANVIL, BLOCK_STATES, blockEntity, boundingBoxMaxX, boundingBoxMaxY, boundingBoxMaxZ, boundingBoxMinX, boundingBoxMinY, boundingBoxMinZ, CLOTH, fullBlock, GLASS, GRASS, GRAVEL, LADDER, lightLevel, material, materialColor, opacity, ORE, particleGravity, RAIL, randomTicks, REGISTRY, resistance, SAND, SLIME, slipperiness, SNOW, sound, stateManager, stats, STONE, strength, transluscent, useNeighbourLight, WOOD -
Constructor Summary
Constructors Constructor Description DoublePlantBlock() -
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.booleancanBeFertilized(World world, Random random, BlockPos pos, BlockState state)booleancanBePlacedAtPos(World world, BlockPos pos)Returns whether the current block can be placed at a certainBlockPosbooleancanGrow(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 positionintgetData(BlockState state)Returns the data value for a blockstate Throws anIllegalArmumentExceptionas this method does not workItemgetDropItem(BlockState blockState, Random random, int state)Returns the item that must be dropped when the block is brokenintgetMeta(BlockState state)Returns the metadata value for a certain BlockStateintgetMeta(World world, BlockPos pos)Returns metadata from a world and a BlockPosBlock.OffsetTypegetOffsetType()Returns the block's offset type.DoublePlantBlock.DoublePlantTypegetVariant(WorldView worldView, BlockPos blockPos)voidgrow(World world, Random random, BlockPos pos, BlockState state)voidharvest(World world, PlayerEntity player, BlockPos pos, BlockState state, BlockEntity be)Runs every time a player begins to break the block.booleanisReplaceable(World world, BlockPos pos)protected voidmethod_754(World world, BlockPos blockPos, BlockState blockState)booleanmethod_755(World world, BlockPos blockPos, BlockState blockState)voidmethod_826(World world, BlockPos blockPos, DoublePlantBlock.DoublePlantType doublePlantType, int int2)private booleanmethod_827(World world, BlockPos blockPos, BlockState blockState, PlayerEntity playerEntity)voidonBreakByPlayer(World world, BlockPos pos, BlockState state, PlayerEntity player)Runs when the block is broken by a player.voidonPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack)Runs when the block is placed by an entityvoidsetBoundingBox(WorldView view, BlockPos pos)BlockStatestateFromData(int data)Returns a blockstate of the current block from it's idMethods inherited from class net.minecraft.block.PlantBlock
canPlantOnTop, getCollisionBox, getRenderLayerType, hasTransperancy, neighborUpdate, renderAsNormalBlock, scheduledTickMethods inherited from class net.minecraft.block.Block
appendCollisionBoxes, areBlocksEqual, blocksMovement, calcBlockBreakingData, canBePlacedAdjacent, canBeReplaced, canCollide, canMobSpawnInside, createStackFromBlock, disableStats, dropAsItem, dropExperience, emitsRedstonePower, get, getAmbientOcclusionLightLevel, getBlastResistance, getBlendColor, getBlockFromItem, getBlockType, getBonusDrops, getBrightness, getByBlockState, getById, getColor, getColor, getComparatorOutput, getDefaultState, getDropCount, getIdByBlock, getItemGroup, getLightLevel, getMaterial, getMaterialColor, getMaxX, getMaxY, getMaxZ, getMinX, getMinY, getMinZ, getOpacity, getPickItem, getPistonInteractionType, getSelectionBox, getStateFromData, getStateFromRawId, getStateManager, getStrength, getStrongRedstonePower, getTickRate, getTranslatedName, getTranslationKey, getWeakRedstonePower, hasBlockEntity, hasCollision, hasCollision, hasComparatorOutput, hasStats, isEqualTo, isFire, isFlowerPot, isFullBlock, isFullCube, isLeafBlock, isNormalBlock, isSideInvisible, isTransluscent, method_655, method_696, onBlockBreak, onBlockBreakStart, onBreakByPlayer, onBreaking, onCreation, onDestroyedByExplosion, onEntityCollision, onEntityCollision, onEvent, onLandedUpon, onSteppedOn, onUpdateTick, onUse, rainTick, randomDisplayTick, randomDropAsItem, requiresSilkTouch, setBlockItemBounds, setBoundingBox, setDefaultState, setEntityVelocity, setItemGroup, setLightLevel, setOpacity, setResistance, setSound, setStrength, setTickRandomly, setTranslationKey, setUnbreakable, setup, shouldDropItemsOnExplosion, ticksRandomly, toString, usesNeighbourLight
-
Field Details
-
VARIANT
- Mappings:
Namespace Name Mixin selector official aLagi;a:Lamm;intermediary field_880Lnet/minecraft/class_195;field_880:Lnet/minecraft/class_390;named VARIANTLnet/minecraft/block/DoublePlantBlock;VARIANT:Lnet/minecraft/state/property/EnumProperty;
-
HALF
- Mappings:
Namespace Name Mixin selector official bLagi;b:Lamm;intermediary field_881Lnet/minecraft/class_195;field_881:Lnet/minecraft/class_390;named HALFLnet/minecraft/block/DoublePlantBlock;HALF:Lnet/minecraft/state/property/EnumProperty;
-
FACING
- Mappings:
Namespace Name Mixin selector official NLagi;N:Lamm;intermediary field_879Lnet/minecraft/class_195;field_879:Lnet/minecraft/class_390;named FACINGLnet/minecraft/block/DoublePlantBlock;FACING:Lnet/minecraft/state/property/EnumProperty;
-
-
Constructor Details
-
DoublePlantBlock
public DoublePlantBlock()
-
-
Method Details
-
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
-
getVariant
- Mappings:
Namespace Name Mixin selector official eLagi;e(Ladq;Lcj;)Lagi$b;intermediary method_828Lnet/minecraft/class_195;method_828(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Lnet/minecraft/class_195$class_197;named getVariantLnet/minecraft/block/DoublePlantBlock;getVariant(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/DoublePlantBlock$DoublePlantType;
-
canBePlacedAtPos
Returns whether the current block can be placed at a certainBlockPos- Overrides:
canBePlacedAtPosin classPlantBlock- 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
-
isReplaceable
- Overrides:
isReplaceablein classBlock- 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
-
method_754
- Overrides:
method_754in classPlantBlock- Mappings:
Namespace Name Mixin selector official eLafm;e(Ladm;Lcj;Lalz;)Vintermediary method_754Lnet/minecraft/class_167;method_754(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)Vnamed method_754Lnet/minecraft/block/PlantBlock;method_754(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
method_755
- Overrides:
method_755in classPlantBlock- Mappings:
Namespace Name Mixin selector official fLafm;f(Ladm;Lcj;Lalz;)Zintermediary method_755Lnet/minecraft/class_167;method_755(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)Znamed method_755Lnet/minecraft/block/PlantBlock;method_755(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Z
-
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;
-
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
-
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
-
method_826
public void method_826(World world, BlockPos blockPos, DoublePlantBlock.DoublePlantType doublePlantType, int int2)- Mappings:
Namespace Name Mixin selector official aLagi;a(Ladm;Lcj;Lagi$b;I)Vintermediary method_826Lnet/minecraft/class_195;method_826(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_195$class_197;I)Vnamed method_826Lnet/minecraft/block/DoublePlantBlock;method_826(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/DoublePlantBlock$DoublePlantType;I)V
-
onPlaced
public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack)Runs when the block is placed by an entity- Overrides:
onPlacedin classBlock- 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
-
harvest
public void harvest(World world, PlayerEntity player, BlockPos pos, BlockState state, BlockEntity be)Runs every time a player begins to break the block.- Overrides:
harvestin classBlock- 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
-
onBreakByPlayer
Runs when the block is broken by a player.- Overrides:
onBreakByPlayerin classBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockStateplayer- The player who broke the block- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lalz;Lwn;)Vintermediary method_653Lnet/minecraft/class_160;method_653(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1963;)Vnamed onBreakByPlayerLnet/minecraft/block/Block;onBreakByPlayer(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/player/PlayerEntity;)V
-
method_827
private boolean method_827(World world, BlockPos blockPos, BlockState blockState, PlayerEntity playerEntity)- Mappings:
Namespace Name Mixin selector official bLagi;b(Ladm;Lcj;Lalz;Lwn;)Zintermediary method_827Lnet/minecraft/class_195;method_827(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1963;)Znamed method_827Lnet/minecraft/block/DoublePlantBlock;method_827(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/player/PlayerEntity;)Z
-
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
-
getMeta
Returns metadata from a world and a BlockPos- Overrides:
getMetain classBlock- 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
-
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
-
stateFromData
Returns a blockstate of the current block from it's id- Overrides:
stateFromDatain classBlock- Parameters:
data- The Blockstate's associated data value- Returns:
- The Default state
- Mappings:
Namespace Name Mixin selector official aLafh;a(I)Lalz;intermediary method_637Lnet/minecraft/class_160;method_637(I)Lnet/minecraft/class_376;named stateFromDataLnet/minecraft/block/Block;stateFromData(I)Lnet/minecraft/block/BlockState;
-
getBlockState
Returns the current block's blockstate at a certain position- Overrides:
getBlockStatein classBlock- Parameters:
state- The original blockstateview- WorldView instancepos- The block's position- Returns:
- state
- Mappings:
Namespace Name Mixin selector official aLafh;a(Lalz;Ladq;Lcj;)Lalz;intermediary method_673Lnet/minecraft/class_160;method_673(Lnet/minecraft/class_376;Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Lnet/minecraft/class_376;named getBlockStateLnet/minecraft/block/Block;getBlockState(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/BlockState;
-
getData
Returns the data value for a blockstate Throws anIllegalArmumentExceptionas this method does not work- Overrides:
getDatain classBlock- Parameters:
state- The Blockstate- Returns:
- Zero
- Mappings:
Namespace Name Mixin selector official cLafh;c(Lalz;)Iintermediary method_706Lnet/minecraft/class_160;method_706(Lnet/minecraft/class_376;)Inamed getDataLnet/minecraft/block/Block;getData(Lnet/minecraft/block/BlockState;)I
-
appendProperties
Returns a new state manager with a property array.- Overrides:
appendPropertiesin classBlock- Returns:
- New state manager
- Mappings:
Namespace Name Mixin selector official eLafh;e()Lama;intermediary method_714Lnet/minecraft/class_160;method_714()Lnet/minecraft/class_378;named appendPropertiesLnet/minecraft/block/Block;appendProperties()Lnet/minecraft/state/StateManager;
-
getOffsetType
Returns the block's offset type. Used by grass and flowers.- Overrides:
getOffsetTypein classBlock- 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;
-