Class LevelChunkAuxiliaryLightManager

java.lang.Object
net.neoforged.neoforge.common.world.LevelChunkAuxiliaryLightManager
All Implemented Interfaces:
INBTSerializable<net.minecraft.nbt.ListTag>, AuxiliaryLightManager

@Internal public final class LevelChunkAuxiliaryLightManager extends Object implements AuxiliaryLightManager, INBTSerializable<net.minecraft.nbt.ListTag>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    private final Map<net.minecraft.core.BlockPos,Byte>
     
    private final net.minecraft.world.level.chunk.LevelChunk
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    LevelChunkAuxiliaryLightManager(net.minecraft.world.level.chunk.LevelChunk owner)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    deserializeNBT(net.minecraft.core.HolderLookup.Provider provider, net.minecraft.nbt.ListTag list)
     
    int
    getLightAt(net.minecraft.core.BlockPos pos)
    Returns the light value at the given position or 0 if none is present.
    void
    handleLightDataSync(Map<net.minecraft.core.BlockPos,Byte> lights)
     
    net.minecraft.network.protocol.Packet<?>
    sendLightDataTo(net.minecraft.network.protocol.game.ClientboundLevelChunkWithLightPacket chunkPacket)
     
    @Nullable net.minecraft.nbt.ListTag
    serializeNBT(net.minecraft.core.HolderLookup.Provider provider)
     
    void
    setLightAt(net.minecraft.core.BlockPos pos, int value)
    Set the light value at the given position to the given value

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface net.neoforged.neoforge.common.world.AuxiliaryLightManager

    removeLightAt
  • Field Details

    • LIGHT_NBT_KEY

      public static final String LIGHT_NBT_KEY
      See Also:
    • owner

      private final net.minecraft.world.level.chunk.LevelChunk owner
    • lights

      private final Map<net.minecraft.core.BlockPos,Byte> lights
  • Constructor Details

    • LevelChunkAuxiliaryLightManager

      public LevelChunkAuxiliaryLightManager(net.minecraft.world.level.chunk.LevelChunk owner)
  • Method Details

    • setLightAt

      public void setLightAt(net.minecraft.core.BlockPos pos, int value)
      Description copied from interface: AuxiliaryLightManager
      Set the light value at the given position to the given value
      Specified by:
      setLightAt in interface AuxiliaryLightManager
    • getLightAt

      public int getLightAt(net.minecraft.core.BlockPos pos)
      Description copied from interface: AuxiliaryLightManager
      Returns the light value at the given position or 0 if none is present.
      Specified by:
      getLightAt in interface AuxiliaryLightManager
      Returns:
      the light value at the given position or 0 if none is present
    • serializeNBT

      @Nullable public @Nullable net.minecraft.nbt.ListTag serializeNBT(net.minecraft.core.HolderLookup.Provider provider)
      Specified by:
      serializeNBT in interface INBTSerializable<net.minecraft.nbt.ListTag>
    • deserializeNBT

      public void deserializeNBT(net.minecraft.core.HolderLookup.Provider provider, net.minecraft.nbt.ListTag list)
      Specified by:
      deserializeNBT in interface INBTSerializable<net.minecraft.nbt.ListTag>
    • sendLightDataTo

      public net.minecraft.network.protocol.Packet<?> sendLightDataTo(net.minecraft.network.protocol.game.ClientboundLevelChunkWithLightPacket chunkPacket)
    • handleLightDataSync

      public void handleLightDataSync(Map<net.minecraft.core.BlockPos,Byte> lights)