mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-24 05:54:41 +00:00
Fix BrandingControl caching text through resource reload
This commit is contained in:
1 parent
98a470d813
commit
98ef5049f4
2 files changed
+21
No files matched your search
@@ -21,11 +21,16 @@ package net.minecraftforge.fml;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.minecraft.resources.IResourceManager;
|
||||
import net.minecraftforge.resource.IResourceType;
|
||||
import net.minecraftforge.resource.VanillaResourceType;
|
||||
import net.minecraftforge.versions.forge.ForgeVersion;
|
||||
import net.minecraftforge.versions.mcp.MCPVersion;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
public class BrandingControl
|
||||
@@ -70,4 +75,11 @@ public class BrandingControl
|
||||
public static String getServerBranding() {
|
||||
return "forge";
|
||||
}
|
||||
|
||||
public static void clearCaches(IResourceManager resourceManager, Predicate<IResourceType> resourcePredicate) {
|
||||
if (resourcePredicate.test(VanillaResourceType.LANGUAGES)) {
|
||||
brandings = null;
|
||||
brandingsNoMC = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user