<commit_before>package me.nallar.patched;

import java.util.WeakHashMap;

import com.google.common.collect.ImmutableSetMultimap;

import net.minecraft.world.ChunkCoordIntPair;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeChunkManager;

public abstract class PatchForgeChunkManager extends ForgeChunkManager {
	public static void staticConstruct() {
		forcedChunks = new WeakHashMap<World, ImmutableSetMultimap<ChunkCoordIntPair, Ticket>>();
	}

	public static ImmutableSetMultimap<ChunkCoordIntPair, Ticket> getPersistentChunksFor(World world) {
		ImmutableSetMultimap<ChunkCoordIntPair, Ticket> forcedChunks = ForgeChunkManager.forcedChunks.get(world);
		return forcedChunks == null ? ImmutableSetMultimap.<ChunkCoordIntPair, Ticket>of() : forcedChunks;
	}
}<commit_msg>There is no need for weak keys here - world unload event causes removal<commit_after>package me.nallar.patched;

import java.util.HashMap;

import com.google.common.collect.ImmutableSetMultimap;

import net.minecraft.world.ChunkCoordIntPair;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeChunkManager;

public abstract class PatchForgeChunkManager extends ForgeChunkManager {
	public static void staticConstruct() {
		forcedChunks = new HashMap<World, ImmutableSetMultimap<ChunkCoordIntPair, Ticket>>();
	}

	public static ImmutableSetMultimap<ChunkCoordIntPair, Ticket> getPersistentChunksFor(World world) {
		ImmutableSetMultimap<ChunkCoordIntPair, Ticket> forcedChunks = ForgeChunkManager.forcedChunks.get(world);
		return forcedChunks == null ? ImmutableSetMultimap.<ChunkCoordIntPair, Ticket>of() : forcedChunks;
	}
}
{'fraction_non_alphanumeric': 0.08444714459295262, 'fraction_numerical': 0.0, 'mean_word_length': 7.62303664921466, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3629430', 'n_tokens_mistral': 507, 'n_tokens_neox': 500, 'n_words': 98}