Class BlockPropertyTests.LightBlock

java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
net.neoforged.neoforge.debug.block.BlockPropertyTests.LightBlock
All Implemented Interfaces:
net.minecraft.world.flag.FeatureElement, net.minecraft.world.level.block.EntityBlock, net.minecraft.world.level.ItemLike, IBlockExtension
Enclosing class:
BlockPropertyTests

private static class BlockPropertyTests.LightBlock extends net.minecraft.world.level.block.Block implements net.minecraft.world.level.block.EntityBlock
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.world.level.block.state.BlockBehaviour

    net.minecraft.world.level.block.state.BlockBehaviour.BlockStateBase, net.minecraft.world.level.block.state.BlockBehaviour.OffsetFunction, net.minecraft.world.level.block.state.BlockBehaviour.OffsetType, net.minecraft.world.level.block.state.BlockBehaviour.Properties, net.minecraft.world.level.block.state.BlockBehaviour.StateArgumentPredicate<A>, net.minecraft.world.level.block.state.BlockBehaviour.StatePredicate
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Supplier<net.minecraft.world.level.block.entity.BlockEntityType<BlockPropertyTests.LightBlockEntity>>
     

    Fields inherited from class net.minecraft.world.level.block.Block

    BLOCK_STATE_REGISTRY, CODEC, INDESTRUCTIBLE, INSTANT, stateDefinition, UPDATE_ALL, UPDATE_ALL_IMMEDIATE, UPDATE_CLIENTS, UPDATE_IMMEDIATE, UPDATE_INVISIBLE, UPDATE_KNOWN_SHAPE, UPDATE_LIMIT, UPDATE_MOVE_BY_PISTON, UPDATE_NEIGHBORS, UPDATE_NONE, UPDATE_SKIP_ALL_SIDEEFFECTS, UPDATE_SKIP_BLOCK_ENTITY_SIDEEFFECTS, UPDATE_SKIP_ON_PLACE, UPDATE_SKIP_SHAPE_UPDATE_ON_WIRE, UPDATE_SUPPRESS_DROPS

    Fields inherited from class net.minecraft.world.level.block.state.BlockBehaviour

    descriptionId, drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDER

    Fields inherited from interface net.minecraft.world.flag.FeatureElement

    FILTERED_REGISTRIES
  • Constructor Summary

    Constructors
    Constructor
    Description
    LightBlock(net.minecraft.world.level.block.state.BlockBehaviour.Properties properties, Supplier<net.minecraft.world.level.block.entity.BlockEntityType<BlockPropertyTests.LightBlockEntity>> beType)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    getLightEmission(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos pos)
    Get a light value for this block, taking into account the given state and coordinates, normal ranges are between 0 and 15
    boolean
    hasDynamicLightEmission(net.minecraft.world.level.block.state.BlockState state)
    Whether this block has dynamic light emission which is not solely based on the BlockState and instead uses the BlockPos, the AuxiliaryLightManager or another external data source to determine its light value in IBlockExtension.getLightEmission(BlockState, BlockGetter, BlockPos)
    net.minecraft.world.level.block.entity.BlockEntity
    newBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
     
    net.minecraft.world.InteractionResult
    useWithoutItem(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, net.minecraft.world.phys.BlockHitResult hit)
     

    Methods inherited from class net.minecraft.world.level.block.Block

    animateTick, asBlock, asItem, box, boxes, boxZ, boxZ, boxZ, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, codec, column, column, createBlockStateDefinition, cube, cube, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, fallOn, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getShapeForEachState, getShapeForEachState, getSpeedFactor, getStateDefinition, getStateForPlacement, handlePrecipitation, hasDynamicShape, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isShapeFullBlock, playerDestroy, playerWillDestroy, popExperience, popResource, popResourceFromFace, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, shouldRenderFace, spawnDestroyParticles, stateById, stepOn, toString, tryDropExperience, updateEntityMovementAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOf

    Methods inherited from class net.minecraft.world.level.block.state.BlockBehaviour

    affectNeighborsAfterRemoval, attack, canBeReplaced, canBeReplaced, canSurvive, defaultDestroyTime, defaultMapColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCloneItemStack, getCollisionShape, getDescriptionId, getDestroyProgress, getDirectSignal, getDrops, getEntityInsideCollisionShape, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getShape, getSignal, getSoundType, getVisualShape, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isPathfindable, isRandomlyTicking, isSignalSource, mirror, neighborChanged, onExplosionHit, onPlace, onProjectileHit, propagatesSkylightDown, properties, propertiesCodec, randomTick, requiredFeatures, rotate, simpleCodec, skipRendering, spawnAfterBreak, tick, triggerEvent, updateIndirectNeighbourShapes, updateShape, useItemOn, useShapeForLightOcclusion

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface net.minecraft.world.level.block.EntityBlock

    getListener, getTicker

    Methods inherited from interface net.minecraft.world.flag.FeatureElement

    isEnabled
  • Field Details

  • Constructor Details

    • LightBlock

      public LightBlock(net.minecraft.world.level.block.state.BlockBehaviour.Properties properties, Supplier<net.minecraft.world.level.block.entity.BlockEntityType<BlockPropertyTests.LightBlockEntity>> beType)
  • Method Details

    • useWithoutItem

      public net.minecraft.world.InteractionResult useWithoutItem(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, net.minecraft.world.phys.BlockHitResult hit)
      Overrides:
      useWithoutItem in class net.minecraft.world.level.block.state.BlockBehaviour
    • hasDynamicLightEmission

      public boolean hasDynamicLightEmission(net.minecraft.world.level.block.state.BlockState state)
      Description copied from interface: IBlockExtension
      Whether this block has dynamic light emission which is not solely based on the BlockState and instead uses the BlockPos, the AuxiliaryLightManager or another external data source to determine its light value in IBlockExtension.getLightEmission(BlockState, BlockGetter, BlockPos)
      Specified by:
      hasDynamicLightEmission in interface IBlockExtension
      Parameters:
      state - the block state being checked
      Returns:
      true if this block cannot determine its light emission solely based on the block state, false otherwise
    • getLightEmission

      public int getLightEmission(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos pos)
      Description copied from interface: IBlockExtension
      Get a light value for this block, taking into account the given state and coordinates, normal ranges are between 0 and 15
      Specified by:
      getLightEmission in interface IBlockExtension
      Parameters:
      state - The state of this block
      level - The level this block is in, may be EmptyBlockGetter.INSTANCE, see implementation notes
      pos - The position of this block in the level, may be BlockPos.ZERO, see implementation notes
      Returns:
      The light value
    • newBlockEntity

      public net.minecraft.world.level.block.entity.BlockEntity newBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
      Specified by:
      newBlockEntity in interface net.minecraft.world.level.block.EntityBlock