Package net.minecraft.block
Class DaylightDetectorBlock
java.lang.Object
net.minecraft.block.Block
net.minecraft.block.BlockWithEntity
net.minecraft.block.DaylightDetectorBlock
- All Implemented Interfaces:
BlockEntityProvider
- Mappings:
Namespace Name official againtermediary net/minecraft/class_1448named net/minecraft/block/DaylightDetectorBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.OffsetType, Block.Sound -
Field Summary
FieldsFields inherited from class net.minecraft.block.Block
ANVIL, blastResistance, BLOCK_STATES, blockEntity, boundingBoxMaxX, boundingBoxMaxY, boundingBoxMaxZ, boundingBoxMinX, boundingBoxMinY, boundingBoxMinZ, CLOTH, fullBlock, GLASS, GRASS, GRAVEL, hardness, LADDER, lightLevel, material, materialColor, opacity, ORE, particleGravity, RAIL, randomTicks, REGISTRY, SAND, SLIME, slipperiness, SNOW, sound, stateManager, stats, STONE, transluscent, useNeighbourLight, WOOD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappendItemStacks(Item item, ItemGroup group, List<ItemStack> stacks) Appends ItemStacks to an itemgroup.protected StateManagerReturns a new state manager with a property array.createBlockEntity(World world, int id) booleanReturns whether the current block emits a redstone signal.intintgetData(BlockState state) Returns the data value for a blockstate Throws anIllegalArmumentExceptionas this method does not workgetDropItem(BlockState blockState, Random random, int state) Returns the item that must be dropped when the block is brokengetPickItem(World world, BlockPos pos) Called when a player presses the pick block key while facing the block.intgetWeakRedstonePower(BlockView view, BlockPos pos, BlockState state, Direction facing) Returns the block's weak redstone power.booleanbooleanonUse(World world, BlockPos pos, BlockState state, PlayerEntity player, Direction direction, float float2, float float3, float float4) Runs when the block is used, i.e.booleanReturns whether the block can be rendered as a normal blockvoidsetBoundingBox(BlockView view, BlockPos pos) stateFromData(int data) Returns a blockstate of the current block from it's idvoidupdateState(World world, BlockPos pos) Methods inherited from class net.minecraft.block.BlockWithEntity
method_8602, method_8603, onBreaking, onEventMethods inherited from class net.minecraft.block.Block
appendCollisionBoxes, areBlocksEqual, blocksMovement, calcBlockBreakingData, canBePlacedAdjacent, canBePlacedAtPos, canBeReplaced, canCollide, canMobSpawnInside, createStackFromBlock, disableStats, dropAsItem, dropExperience, get, getAmbientOcclusionLightLevel, getBlastResistance, getBlendColor, getBlockColor, getBlockFromItem, getBlockState, getBonusDrops, getBrightness, getByBlockState, getById, getCollisionBox, getColor, getColor, getComparatorOutput, getDefaultState, getDropCount, getIdByBlock, getItemGroup, getLightLevel, getMaterial, getMaterialColor, getMaxX, getMaxY, getMaxZ, getMeta, getMeta, getMinX, getMinY, getMinZ, getOffsetType, getOpacity, getPistonInteractionType, getRenderLayerType, getSelectionBox, getStateFromData, getStateFromRawId, getStateManager, getStrength, getStrongRedstonePower, getTickRate, getTranslatedName, getTranslationKey, harvest, hasBlockEntity, hasCollision, hasCollision, hasComparatorOutput, hasStats, isEqualTo, isFire, isFlowerPot, isFullBlock, isFullCube, isLeafBlock, isNormalBlock, isReplaceable, isSideInvisible, isTransluscent, method_414, method_8666, neighborUpdate, onBlockBreak, onBlockBreakStart, onBreakByPlayer, onBreakByPlayer, onCreation, onDestroyedByExplosion, onEntityCollision, onEntityCollision, onLandedUpon, onPlaced, onSteppedOn, onUpdateTick, rainTick, randomDisplayTick, randomDropAsItem, requiresSilkTouch, scheduledTick, setBlockItemBounds, setBoundingBox, setDefaultState, setEntityVelocity, setItemGroup, setLightLevel, setOpacity, setResistance, setSound, setStrength, setTickRandomly, setTranslationKey, setUnbreakable, setup, shouldDropItemsOnExplosion, ticksRandomly, toString, usesNeighbourLight
-
Field Details
-
POWER
- Mappings:
Namespace Name Mixin selector official aLaga;a:Lamn;intermediary field_9350Lnet/minecraft/class_1448;field_9350:Lnet/minecraft/class_2246;named POWERLnet/minecraft/block/DaylightDetectorBlock;POWER:Lnet/minecraft/state/property/IntProperty;
-
inverted
private final boolean inverted- Mappings:
Namespace Name Mixin selector official bLaga;b:Zintermediary field_9351Lnet/minecraft/class_1448;field_9351:Znamed invertedLnet/minecraft/block/DaylightDetectorBlock;inverted:Z
-
-
Constructor Details
-
DaylightDetectorBlock
public DaylightDetectorBlock(boolean inverted) - Mappings:
Namespace Name Mixin selector official <init>Laga;<init>(Z)Vintermediary <init>Lnet/minecraft/class_1448;<init>(Z)Vnamed <init>Lnet/minecraft/block/DaylightDetectorBlock;<init>(Z)V
-
-
Method Details
-
setBoundingBox
- Overrides:
setBoundingBoxin classBlock- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladq;Lcj;)Vintermediary method_8652Lnet/minecraft/class_197;method_8652(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;)Vnamed setBoundingBoxLnet/minecraft/block/Block;setBoundingBox(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)V
-
getWeakRedstonePower
Returns the block's weak redstone power.- Overrides:
getWeakRedstonePowerin classBlock- Parameters:
view- BlockView instancepos- The block's positionstate- The block's BlockStatefacing- The block's direction- Returns:
- Block's weak redstone power
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladq;Lcj;Lalz;Lcq;)Iintermediary method_8653Lnet/minecraft/class_197;method_8653(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Lnet/minecraft/class_1354;)Inamed getWeakRedstonePowerLnet/minecraft/block/Block;getWeakRedstonePower(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Direction;)I
-
updateState
- Mappings:
Namespace Name Mixin selector official fLaga;f(Ladm;Lcj;)Vintermediary method_8716Lnet/minecraft/class_1448;method_8716(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;)Vnamed updateStateLnet/minecraft/block/DaylightDetectorBlock;updateState(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)V
-
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.- Overrides:
onUsein classBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockStateplayer- The player who used the blockdirection- The direction that the block is facing- Returns:
- Whether the action is succesful
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lalz;Lwn;Lcq;FFF)Zintermediary method_421Lnet/minecraft/class_197;method_421(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Lnet/minecraft/class_988;Lnet/minecraft/class_1354;FFF)Znamed onUseLnet/minecraft/block/Block;onUse(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/math/Direction;FFF)Z
-
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_398Lnet/minecraft/class_197;method_398(Lnet/minecraft/class_2232;Ljava/util/Random;I)Lnet/minecraft/class_1069;named getDropItemLnet/minecraft/block/Block;getDropItem(Lnet/minecraft/block/BlockState;Ljava/util/Random;I)Lnet/minecraft/item/Item;
-
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.- Overrides:
getPickItemin classBlock- Returns:
- The Item that must be placed into the player's inventory
- Mappings:
Namespace Name Mixin selector official cLafh;c(Ladm;Lcj;)Lzw;intermediary method_8667Lnet/minecraft/class_197;method_8667(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;)Lnet/minecraft/class_1069;named getPickItemLnet/minecraft/block/Block;getPickItem(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/item/Item;
-
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_441Lnet/minecraft/class_197;method_441()Znamed renderAsNormalBlockLnet/minecraft/block/Block;renderAsNormalBlock()Z
-
hasTransperancy
public boolean hasTransperancy()- Overrides:
hasTransperancyin classBlock- Mappings:
Namespace Name Mixin selector official cLafh;c()Zintermediary method_449Lnet/minecraft/class_197;method_449()Znamed hasTransperancyLnet/minecraft/block/Block;hasTransperancy()Z
-
getBlockType
public int getBlockType()- Overrides:
getBlockTypein classBlockWithEntity- Mappings:
Namespace Name Mixin selector official bLafh;b()Iintermediary method_429Lnet/minecraft/class_197;method_429()Inamed getBlockTypeLnet/minecraft/block/Block;getBlockType()I
-
emitsRedstonePower
public boolean emitsRedstonePower()Returns whether the current block emits a redstone signal. Used by comparators, Redstone Blocks, etc.- Overrides:
emitsRedstonePowerin classBlock- Returns:
- Whether the current block emits a redstone signal
- Mappings:
Namespace Name Mixin selector official iLafh;i()Zintermediary method_466Lnet/minecraft/class_197;method_466()Znamed emitsRedstonePowerLnet/minecraft/block/Block;emitsRedstonePower()Z
-
createBlockEntity
- Mappings:
Namespace Name Mixin selector official aLagq;a(Ladm;I)Lakw;intermediary method_309Lnet/minecraft/class_1451;method_309(Lnet/minecraft/class_1150;I)Lnet/minecraft/class_226;named createBlockEntityLnet/minecraft/block/BlockEntityProvider;createBlockEntity(Lnet/minecraft/world/World;I)Lnet/minecraft/block/entity/BlockEntity;
-
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_8635Lnet/minecraft/class_197;method_8635(I)Lnet/minecraft/class_2232;named stateFromDataLnet/minecraft/block/Block;stateFromData(I)Lnet/minecraft/block/BlockState;
-
getData
Returns the data value for a blockstate Throws anIllegalArmumentExceptionas this method does not work- Overrides:
getDatain classBlock- Parameters:
state- The Blockstate- Returns:
- Zero
- Mappings:
Namespace Name Mixin selector official cLafh;c(Lalz;)Iintermediary method_8671Lnet/minecraft/class_197;method_8671(Lnet/minecraft/class_2232;)Inamed getDataLnet/minecraft/block/Block;getData(Lnet/minecraft/block/BlockState;)I
-
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_8676Lnet/minecraft/class_197;method_8676()Lnet/minecraft/class_2233;named appendPropertiesLnet/minecraft/block/Block;appendProperties()Lnet/minecraft/state/StateManager;
-
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_399Lnet/minecraft/class_197;method_399(Lnet/minecraft/class_1069;Lnet/minecraft/class_1041;Ljava/util/List;)Vnamed appendItemStacksLnet/minecraft/block/Block;appendItemStacks(Lnet/minecraft/item/Item;Lnet/minecraft/item/itemgroup/ItemGroup;Ljava/util/List;)V
-