public class DaylightDetectorBlock extends BlockWithEntity
Block.NeighborGroupAbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>| Modifier and Type | Field and Description |
|---|---|
static BooleanProperty |
INVERTED |
static IntProperty |
POWER |
protected static VoxelShape |
SHAPE |
LOGGER, STATE_IDS, stateManagercollidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier| Constructor and Description |
|---|
DaylightDetectorBlock(AbstractBlock.Settings settings) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendProperties(StateManager.Builder<Block,BlockState> builder) |
BlockEntity |
createBlockEntity(BlockView world) |
boolean |
emitsRedstonePower(BlockState state) |
VoxelShape |
getOutlineShape(BlockState state,
BlockView world,
BlockPos pos,
ShapeContext context) |
BlockRenderType |
getRenderType(BlockState state) |
int |
getWeakRedstonePower(BlockState state,
BlockView world,
BlockPos pos,
Direction direction) |
boolean |
hasSidedTransparency(BlockState state) |
ActionResult |
onUse(BlockState state,
World world,
BlockPos pos,
PlayerEntity player,
Hand hand,
BlockHitResult hit)
Called when this block is used by a player.
|
static void |
updateState(BlockState state,
World world,
BlockPos pos) |
createScreenHandlerFactory, onSyncedBlockEventaddStacksForDisplay, afterBreak, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getPlacementState, getRawIdFromState, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, is, isFaceFullSquare, isIn, isShapeFullCube, isTranslucent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, pushEntitiesUpBeforeBlockChange, rainTick, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toStringcalcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canPlaceAt, canReplace, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMaterialColor, getDroppedStacks, getFluidState, getLootTableId, getOffsetType, getOpacity, getPistonBehavior, getRaycastShape, getRenderingSeed, getSidesShape, getStateForNeighborUpdate, getStrongRedstonePower, getVisualShape, hasBlockEntity, hasComparatorOutput, isSideInvisible, mirror, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onStateReplaced, prepare, randomTick, rotate, scheduledTickpublic static final IntProperty POWER
public static final BooleanProperty INVERTED
protected static final VoxelShape SHAPE
public DaylightDetectorBlock(AbstractBlock.Settings settings)
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
getOutlineShape in class AbstractBlockpublic boolean hasSidedTransparency(BlockState state)
hasSidedTransparency in class AbstractBlockpublic int getWeakRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction)
getWeakRedstonePower in class AbstractBlockpublic static void updateState(BlockState state, World world, BlockPos pos)
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit)
This method is called on both the logical client and logical server, so take caution when overriding this method.
The logical side can be checked using world.isClient().
If the action result is successful on a logical client, then the action will be sent to the logical server for processing.
onUse in class AbstractBlockpublic BlockRenderType getRenderType(BlockState state)
getRenderType in class BlockWithEntitypublic boolean emitsRedstonePower(BlockState state)
emitsRedstonePower in class AbstractBlockpublic BlockEntity createBlockEntity(BlockView world)
protected void appendProperties(StateManager.Builder<Block,BlockState> builder)
appendProperties in class Block