use of biomesoplenty.client.texture.ForgeRedirectedResourcePack in project BiomesOPlenty by Glitchfiend.
the class ClientProxy method replaceForgeResources.
private static void replaceForgeResources() {
if (MiscConfigurationHandler.overrideForgeBuckets) {
FMLClientHandler clientHandler = FMLClientHandler.instance();
List<IResourcePack> resourcePackList = ReflectionHelper.getPrivateValue(FMLClientHandler.class, clientHandler, "resourcePackList");
Map<String, IResourcePack> resourcePackMap = ReflectionHelper.getPrivateValue(FMLClientHandler.class, clientHandler, "resourcePackMap");
LegacyV2Adapter resourcePack = (LegacyV2Adapter) clientHandler.getResourcePackFor("forge");
// Remove the old resource pack from the registry
resourcePackList.remove(resourcePack);
resourcePackMap.remove("forge");
// Replace Forge's resource pack with our modified version
ForgeRedirectedResourcePack redirectedResourcePack = new ForgeRedirectedResourcePack(FMLCommonHandler.instance().findContainerFor("forge"));
// Add our new resource pack in its place
resourcePackList.add(redirectedResourcePack);
resourcePackMap.put("forge", redirectedResourcePack);
}
}
Aggregations