Add vertical quality config listener and Api clearRenderCache

This commit is contained in:
James Seibel
2023-02-09 20:24:53 -06:00
parent 1b137eae50
commit 6441f2aa6c
12 changed files with 195 additions and 38 deletions
@@ -3,6 +3,7 @@ package com.seibel.lod.api;
import com.seibel.lod.api.interfaces.config.IDhApiConfig;
import com.seibel.lod.api.interfaces.override.IDhApiOverrideable;
import com.seibel.lod.api.interfaces.override.worldGenerator.IDhApiWorldGeneratorOverrideRegister;
import com.seibel.lod.api.interfaces.render.IDhApiRenderProxy;
import com.seibel.lod.api.interfaces.world.IDhApiWorldProxy;
import com.seibel.lod.api.methods.override.DhApiWorldGeneratorOverrideRegister;
import com.seibel.lod.core.DependencyInjection.ApiEventInjector;
@@ -25,7 +26,7 @@ import com.seibel.lod.core.interfaces.dependencyInjection.IOverrideInjector;
* the concrete object we replaced, there would be issues.
*
* @author James Seibel
* @version 2022-11-24
* @version 2023-2-9
*/
public class DhApiMain
{
@@ -53,6 +54,10 @@ public class DhApiMain
* Designed to be used in conjunction with {@link DhApiMain.Delayed#terrainRepo}.
*/
public static IDhApiWorldProxy worldProxy = null;
/** Used to interact with Distant Horizons' rendering system. */
public static IDhApiRenderProxy renderProxy = null;
}
@@ -0,0 +1,47 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 James Seibel
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod.api.interfaces.render;
import com.seibel.lod.api.objects.DhApiResult;
/**
* Used to interact with Distant Horizons rendering systems.
*
* @author James Seibel
* @version 2023-2-8
*/
public interface IDhApiRenderProxy
{
/**
* Forces any cached render data to be deleted and regenerated.
* This is generally called whenever resource packs are changed or specific
* rendering settings are changed in Distant Horizon's config. <Br><Br>
*
* If this is called on a dedicated server it won't do anything and will return {@link DhApiResult#success} = false <Br><Br>
*
* Background: <Br>
* Distant Horizons has two different file formats: Full data and Render data. <Br>
* - Full data files store the block, biome, etc. information and is the result of loading or generating new chunks. <Br>
* - Render data files store LOD colors and are created using the Full data and currently loaded resource packs. <Br>
* This is the data cleared by this method.
*/
DhApiResult<Boolean> clearRenderDataCache();
}