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 -
Constructor Summary
ConstructorsConstructorDescriptionLevelChunkAuxiliaryLightManager
(net.minecraft.world.level.chunk.LevelChunk owner) -
Method Summary
Modifier and TypeMethodDescriptionvoid
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 valueMethods 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
- See Also:
-
owner
private final net.minecraft.world.level.chunk.LevelChunk owner -
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 interfaceAuxiliaryLightManager
-
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 interfaceAuxiliaryLightManager
- 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 interfaceINBTSerializable<net.minecraft.nbt.ListTag>
-
deserializeNBT
public void deserializeNBT(net.minecraft.core.HolderLookup.Provider provider, net.minecraft.nbt.ListTag list) - Specified by:
deserializeNBT
in interfaceINBTSerializable<net.minecraft.nbt.ListTag>
-
sendLightDataTo
public net.minecraft.network.protocol.Packet<?> sendLightDataTo(net.minecraft.network.protocol.game.ClientboundLevelChunkWithLightPacket chunkPacket) -
handleLightDataSync
-