Search in sources :

Example 11 with ChunkPos

use of net.minecraft.world.level.ChunkPos in project MinecraftForge by MinecraftForge.

the class ModelDataManager method onChunkUnload.

@SubscribeEvent
public static void onChunkUnload(ChunkEvent.Unload event) {
    if (!event.getChunk().getWorldForge().isClientSide())
        return;
    ChunkPos chunk = event.getChunk().getPos();
    needModelDataRefresh.remove(chunk);
    modelDataCache.remove(chunk);
}
Also used : ChunkPos(net.minecraft.world.level.ChunkPos) SubscribeEvent(net.minecraftforge.eventbus.api.SubscribeEvent)

Aggregations

ChunkPos (net.minecraft.world.level.ChunkPos)11 BlockPos (net.minecraft.core.BlockPos)3 Level (net.minecraft.world.level.Level)3 LevelChunk (net.minecraft.world.level.chunk.LevelChunk)3 HashSet (java.util.HashSet)2 ClientboundLightUpdatePacket (net.minecraft.network.protocol.game.ClientboundLightUpdatePacket)2 ServerChunkCache (net.minecraft.server.level.ServerChunkCache)2 ThreadedLevelLightEngine (net.minecraft.server.level.ThreadedLevelLightEngine)2 BlockState (net.minecraft.world.level.block.state.BlockState)2 LevelLightEngine (net.minecraft.world.level.lighting.LevelLightEngine)2 MaterialColor (net.minecraft.world.level.material.MaterialColor)2 SubscribeEvent (net.minecraftforge.eventbus.api.SubscribeEvent)2 CraftWorld (org.bukkit.craftbukkit.v1_17_R1.CraftWorld)2 BiomeNMSImpl (com.denizenscript.denizen.nms.v1_18.impl.BiomeNMSImpl)1 Preconditions (com.google.common.base.Preconditions)1 MapMaker (com.google.common.collect.MapMaker)1 WeakReference (java.lang.ref.WeakReference)1 Collections (java.util.Collections)1 Map (java.util.Map)1 Set (java.util.Set)1