Fix API enums missing "DhApi" prefix and remove unused Enums/code
This commit is contained in:
-56
@@ -1,56 +0,0 @@
|
||||
/*
|
||||
* This file is part of the Distant Horizons mod
|
||||
* licensed under the GNU LGPL v3 License.
|
||||
*
|
||||
* Copyright (C) 2020-2023 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.distanthorizons.api.enums.config;
|
||||
|
||||
/**
|
||||
* CONSTANT <br>
|
||||
* FREQUENT <br>
|
||||
* NORMAL <br>
|
||||
* RARE <br> <br>
|
||||
*
|
||||
* Determines how fast the buffers should be regenerated
|
||||
*
|
||||
* @author Leonardo Amato
|
||||
* @version 9-25-2021
|
||||
*/
|
||||
@Deprecated // not currently in use, if the config this enum represents is re-implemented, the deprecated flag can be removed
|
||||
public enum EBufferRebuildTimes
|
||||
{
|
||||
CONSTANT(0, 0, 0, 1),
|
||||
|
||||
FREQUENT(1000, 500, 2500, 1),
|
||||
|
||||
NORMAL(2000, 1000, 5000, 4),
|
||||
|
||||
RARE(5000, 2000, 10000, 16);
|
||||
|
||||
public final int playerMoveTimeout;
|
||||
public final int renderedChunkTimeout;
|
||||
public final int chunkChangeTimeout;
|
||||
public final int playerMoveDistance;
|
||||
|
||||
EBufferRebuildTimes(int playerMoveTimeout, int renderedChunkTimeout, int chunkChangeTimeout, int playerMoveDistance)
|
||||
{
|
||||
this.playerMoveTimeout = playerMoveTimeout;
|
||||
this.renderedChunkTimeout = renderedChunkTimeout;
|
||||
this.chunkChangeTimeout = chunkChangeTimeout;
|
||||
this.playerMoveDistance = playerMoveDistance;
|
||||
}
|
||||
}
|
||||
+4
-3
@@ -23,9 +23,10 @@ package com.seibel.distanthorizons.api.enums.config;
|
||||
* NONE, <br>
|
||||
* NON_COLLIDING, <br>
|
||||
*
|
||||
* @since API 1.0.0
|
||||
* @since API 1.1.0
|
||||
* @version 2024-4-6
|
||||
*/
|
||||
public enum EBlocksToAvoid
|
||||
public enum EDhApiBlocksToAvoid
|
||||
{
|
||||
// Reminder:
|
||||
// when adding items up the API minor version
|
||||
@@ -36,6 +37,6 @@ public enum EBlocksToAvoid
|
||||
|
||||
public final boolean noCollision;
|
||||
|
||||
EBlocksToAvoid(boolean noCollision) { this.noCollision = noCollision; }
|
||||
EDhApiBlocksToAvoid(boolean noCollision) { this.noCollision = noCollision; }
|
||||
|
||||
}
|
||||
+3
-2
@@ -20,9 +20,10 @@
|
||||
package com.seibel.distanthorizons.api.enums.config;
|
||||
|
||||
/**
|
||||
* @since API 1.0.0
|
||||
* @since API 1.1.0
|
||||
* @version 2024-4-6
|
||||
*/
|
||||
public enum EGLErrorHandlingMode
|
||||
public enum EDhApiGLErrorHandlingMode
|
||||
{
|
||||
IGNORE,
|
||||
LOG,
|
||||
+3
-2
@@ -20,9 +20,10 @@
|
||||
package com.seibel.distanthorizons.api.enums.config;
|
||||
|
||||
/**
|
||||
* @since API 1.0.0
|
||||
* @since API 1.1.0
|
||||
* @version 2024-4-6
|
||||
*/
|
||||
public enum EGlProfileMode
|
||||
public enum EDhApiGlProfileMode
|
||||
{
|
||||
CORE,
|
||||
COMPAT,
|
||||
+4
-4
@@ -28,10 +28,10 @@ package com.seibel.distanthorizons.api.enums.config;
|
||||
*
|
||||
* @author Leetom
|
||||
* @author James Seibel
|
||||
* @version 2022-7-2
|
||||
* @since API 1.0.0
|
||||
* @version 2024-4-6
|
||||
* @since API 1.1.0
|
||||
*/
|
||||
public enum EGpuUploadMethod
|
||||
public enum EDhApiGpuUploadMethod
|
||||
{
|
||||
/** Picks the best option based on the GPU the user has. */
|
||||
AUTO(false, false),
|
||||
@@ -60,7 +60,7 @@ public enum EGpuUploadMethod
|
||||
public final boolean useEarlyMapping;
|
||||
public final boolean useBufferStorage;
|
||||
|
||||
EGpuUploadMethod(boolean useEarlyMapping, boolean useBufferStorage)
|
||||
EDhApiGpuUploadMethod(boolean useEarlyMapping, boolean useBufferStorage)
|
||||
{
|
||||
this.useEarlyMapping = useEarlyMapping;
|
||||
this.useBufferStorage = useBufferStorage;
|
||||
+4
-3
@@ -26,9 +26,10 @@ package com.seibel.distanthorizons.api.enums.config;
|
||||
* HIGH <br>
|
||||
* UNLIMITED <br>
|
||||
*
|
||||
* @since API 1.0.0
|
||||
* @since API 1.1.0
|
||||
* @version 2024-4-6
|
||||
*/
|
||||
public enum EHorizontalQuality
|
||||
public enum EDhApiHorizontalQuality
|
||||
{
|
||||
// Reminder:
|
||||
// when adding items up the API minor version
|
||||
@@ -55,7 +56,7 @@ public enum EHorizontalQuality
|
||||
public final double quadraticBase;
|
||||
public final int distanceUnitInBlocks;
|
||||
|
||||
EHorizontalQuality(double quadraticBase, int distanceUnitInBlocks)
|
||||
EDhApiHorizontalQuality(double quadraticBase, int distanceUnitInBlocks)
|
||||
{
|
||||
this.quadraticBase = quadraticBase;
|
||||
this.distanceUnitInBlocks = distanceUnitInBlocks;
|
||||
+2
-2
@@ -24,10 +24,10 @@ package com.seibel.distanthorizons.api.enums.config;
|
||||
* OLD_LIGHTING <br>
|
||||
* NONE <br>
|
||||
*
|
||||
* @since API 1.0.0
|
||||
* @since API 1.1.0
|
||||
* @version 2024-4-6
|
||||
*/
|
||||
public enum ELodShading
|
||||
public enum EDhApiLodShading
|
||||
{
|
||||
// Reminder:
|
||||
// when adding items up the API minor version
|
||||
+7
-3
@@ -22,9 +22,10 @@ package com.seibel.distanthorizons.api.enums.config;
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
/**
|
||||
* @since API 1.0.0
|
||||
* @since API 1.1.0
|
||||
* @version 2024-4-6
|
||||
*/
|
||||
public enum ELoggerMode
|
||||
public enum EDhApiLoggerMode
|
||||
{
|
||||
DISABLED(Level.OFF, Level.OFF),
|
||||
LOG_ALL_TO_FILE(Level.ALL, Level.OFF),
|
||||
@@ -40,11 +41,14 @@ public enum ELoggerMode
|
||||
LOG_WARNING_TO_CHAT_AND_INFO_TO_FILE(Level.INFO, Level.WARN),
|
||||
LOG_ERROR_TO_CHAT_AND_INFO_TO_FILE(Level.INFO, Level.ERROR),
|
||||
;
|
||||
|
||||
public final Level levelForFile;
|
||||
public final Level levelForChat;
|
||||
ELoggerMode(Level levelForFile, Level levelForChat)
|
||||
|
||||
EDhApiLoggerMode(Level levelForFile, Level levelForChat)
|
||||
{
|
||||
this.levelForFile = levelForFile;
|
||||
this.levelForChat = levelForChat;
|
||||
}
|
||||
|
||||
}
|
||||
+13
-13
@@ -33,10 +33,10 @@ import com.seibel.distanthorizons.coreapi.util.MathUtil;
|
||||
*
|
||||
* @author James Seibel
|
||||
* @author Leonardo Amato
|
||||
* @version 2023-6-14
|
||||
* @since API 1.0.0
|
||||
* @since API 1.1.0
|
||||
* @version 2024-4-6
|
||||
*/
|
||||
public enum EMaxHorizontalResolution
|
||||
public enum EDhApiMaxHorizontalResolution
|
||||
{
|
||||
/** render 256 LODs for each chunk */
|
||||
BLOCK(16, 0),
|
||||
@@ -84,12 +84,12 @@ public enum EMaxHorizontalResolution
|
||||
* 2nd dimension: An array of all LodDetails that are less than or <br>
|
||||
* equal to that detailLevel
|
||||
*/
|
||||
private static EMaxHorizontalResolution[][] lowerDetailArrays;
|
||||
private static EDhApiMaxHorizontalResolution[][] lowerDetailArrays;
|
||||
|
||||
|
||||
|
||||
|
||||
EMaxHorizontalResolution(int newLengthCount, int newDetailLevel)
|
||||
EDhApiMaxHorizontalResolution(int newLengthCount, int newDetailLevel)
|
||||
{
|
||||
this.detailLevel = (byte) newDetailLevel;
|
||||
this.dataPointLengthCount = newLengthCount;
|
||||
@@ -129,20 +129,20 @@ public enum EMaxHorizontalResolution
|
||||
* Returns an array of all LodDetails that have a detail level
|
||||
* that is less than or equal to the given LodDetail
|
||||
*/
|
||||
public static EMaxHorizontalResolution[] getSelfAndLowerDetails(EMaxHorizontalResolution detail)
|
||||
public static EDhApiMaxHorizontalResolution[] getSelfAndLowerDetails(EDhApiMaxHorizontalResolution detail)
|
||||
{
|
||||
if (lowerDetailArrays == null)
|
||||
{
|
||||
// run first time setup
|
||||
lowerDetailArrays = new EMaxHorizontalResolution[EMaxHorizontalResolution.values().length][];
|
||||
lowerDetailArrays = new EDhApiMaxHorizontalResolution[EDhApiMaxHorizontalResolution.values().length][];
|
||||
|
||||
// go through each LodDetail
|
||||
for (EMaxHorizontalResolution currentDetail : EMaxHorizontalResolution.values())
|
||||
for (EDhApiMaxHorizontalResolution currentDetail : EDhApiMaxHorizontalResolution.values())
|
||||
{
|
||||
ArrayList<EMaxHorizontalResolution> lowerDetails = new ArrayList<>();
|
||||
ArrayList<EDhApiMaxHorizontalResolution> lowerDetails = new ArrayList<>();
|
||||
|
||||
// find the details lower than currentDetail
|
||||
for (EMaxHorizontalResolution compareDetail : EMaxHorizontalResolution.values())
|
||||
for (EDhApiMaxHorizontalResolution compareDetail : EDhApiMaxHorizontalResolution.values())
|
||||
{
|
||||
if (currentDetail.detailLevel <= compareDetail.detailLevel)
|
||||
{
|
||||
@@ -154,7 +154,7 @@ public enum EMaxHorizontalResolution
|
||||
Collections.sort(lowerDetails);
|
||||
Collections.reverse(lowerDetails);
|
||||
|
||||
lowerDetailArrays[currentDetail.detailLevel] = lowerDetails.toArray(new EMaxHorizontalResolution[lowerDetails.size()]);
|
||||
lowerDetailArrays[currentDetail.detailLevel] = lowerDetails.toArray(new EDhApiMaxHorizontalResolution[lowerDetails.size()]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,9 +162,9 @@ public enum EMaxHorizontalResolution
|
||||
}
|
||||
|
||||
/** Returns what detail level should be used at a given distance and maxDistance. */
|
||||
public static EMaxHorizontalResolution getDetailForDistance(EMaxHorizontalResolution maxDetailLevel, int distance, int maxDistance)
|
||||
public static EDhApiMaxHorizontalResolution getDetailForDistance(EDhApiMaxHorizontalResolution maxDetailLevel, int distance, int maxDistance)
|
||||
{
|
||||
EMaxHorizontalResolution[] lowerDetails = getSelfAndLowerDetails(maxDetailLevel);
|
||||
EDhApiMaxHorizontalResolution[] lowerDetails = getSelfAndLowerDetails(maxDetailLevel);
|
||||
int distanceBetweenDetails = maxDistance / lowerDetails.length;
|
||||
int index = MathUtil.clamp(0, distance / distanceBetweenDetails, lowerDetails.length - 1);
|
||||
|
||||
+3
-3
@@ -30,10 +30,10 @@ package com.seibel.distanthorizons.api.enums.config;
|
||||
* Determines how the multiplayer folders should be named.
|
||||
*
|
||||
* @author James Seibel
|
||||
* @version 2024-4-2
|
||||
* @since API 1.0.0
|
||||
* @since API 1.1.0
|
||||
* @version 2024-4-6
|
||||
*/
|
||||
public enum EServerFolderNameMode
|
||||
public enum EDhApiServerFolderNameMode
|
||||
{
|
||||
// Reminder:
|
||||
// when adding items up the API minor version
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.seibel.distanthorizons.api.enums.config;
|
||||
|
||||
/**
|
||||
* STABLE, <br>
|
||||
* NIGHTLY, <br><br>
|
||||
*
|
||||
* @since API 1.1.0
|
||||
* @version 2024-4-6
|
||||
*/
|
||||
public enum EDhApiUpdateBranch
|
||||
{
|
||||
STABLE,
|
||||
NIGHTLY
|
||||
}
|
||||
+3
-2
@@ -28,10 +28,11 @@ package com.seibel.distanthorizons.api.enums.config;
|
||||
* the vanilla Minecraft terrain.
|
||||
*
|
||||
* @author James Seibel
|
||||
* @version 2022-6-30
|
||||
* @since API 1.1.0
|
||||
* @version 2024-4-6
|
||||
*/
|
||||
@Deprecated // not currently in use, if the config this enum represents is re-implemented, the deprecated flag can be removed
|
||||
public enum EVanillaOverdraw
|
||||
public enum EDhApiVanillaOverdraw
|
||||
{
|
||||
// Reminder:
|
||||
// when adding items up the API minor version
|
||||
+4
-4
@@ -29,10 +29,10 @@ import com.seibel.distanthorizons.coreapi.util.MathUtil;
|
||||
* EXTREME <br>
|
||||
*
|
||||
* @author Leonardo Amato
|
||||
* @version 2023-2-5
|
||||
* @since API 1.0.0
|
||||
* @version 2024-4-6
|
||||
* @since API 1.1.0
|
||||
*/
|
||||
public enum EVerticalQuality
|
||||
public enum EDhApiVerticalQuality
|
||||
{
|
||||
HEIGHT_MAP( new int[]{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}),
|
||||
LOW( new int[]{4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1}),
|
||||
@@ -47,7 +47,7 @@ public enum EVerticalQuality
|
||||
|
||||
|
||||
|
||||
EVerticalQuality(int[] maxVerticalData) { this.maxVerticalData = maxVerticalData; }
|
||||
EDhApiVerticalQuality(int[] maxVerticalData) { this.maxVerticalData = maxVerticalData; }
|
||||
|
||||
|
||||
|
||||
-48
@@ -1,48 +0,0 @@
|
||||
/*
|
||||
* This file is part of the Distant Horizons mod
|
||||
* licensed under the GNU LGPL v3 License.
|
||||
*
|
||||
* Copyright (C) 2020-2023 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.distanthorizons.api.enums.config;
|
||||
|
||||
/**
|
||||
* AUTO <br>
|
||||
* Near_First <br>
|
||||
* Far_First <br> <br>
|
||||
*
|
||||
* Determines which LODs should have priority when generating
|
||||
* outside the normal view distance.
|
||||
*
|
||||
* @author Leonardo Amato
|
||||
* @version 12-1-2021
|
||||
*/
|
||||
@Deprecated // not currently in use, if the config this enum represents is re-implemented, the deprecated flag can be removed
|
||||
public enum EGenerationPriority
|
||||
{
|
||||
// Reminder:
|
||||
// when adding items up the API minor version
|
||||
// when removing items up the API major version
|
||||
|
||||
/** NEAR_FIRST when connected to servers and BALANCED when on single player */
|
||||
AUTO,
|
||||
|
||||
NEAR_FIRST,
|
||||
|
||||
BALANCED,
|
||||
|
||||
FAR_FIRST
|
||||
}
|
||||
-40
@@ -1,40 +0,0 @@
|
||||
/*
|
||||
* This file is part of the Distant Horizons mod
|
||||
* licensed under the GNU LGPL v3 License.
|
||||
*
|
||||
* Copyright (C) 2020-2023 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.distanthorizons.api.enums.config;
|
||||
|
||||
/**
|
||||
* DISTANT_HORIZONS, <br>
|
||||
* MINECRAFT,
|
||||
*
|
||||
* @author Leetom
|
||||
* @version 2023-6-7
|
||||
* @since API 1.0.0
|
||||
*/
|
||||
public enum ELightGenerationMode
|
||||
{
|
||||
// Reminder:
|
||||
// when adding items up the API minor version
|
||||
// when removing items up the API major version
|
||||
|
||||
DISTANT_HORIZONS,
|
||||
|
||||
MINECRAFT
|
||||
|
||||
}
|
||||
-51
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* This file is part of the Distant Horizons mod
|
||||
* licensed under the GNU LGPL v3 License.
|
||||
*
|
||||
* Copyright (C) 2020-2023 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.distanthorizons.api.enums.config;
|
||||
|
||||
/**
|
||||
* NONE <br>
|
||||
* LIGHT <br>
|
||||
* MEDIUM <br>
|
||||
* HEAVY <br>
|
||||
*
|
||||
* CUSTOM <br>
|
||||
*
|
||||
* @since API 1.0.0
|
||||
* @deprecated will be removed when DH updates to MC 1.21 <br>
|
||||
* After removal a float value will be used to control overdraw instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public enum EOverdrawPrevention
|
||||
{
|
||||
// Reminder:
|
||||
// when adding items up the API minor version
|
||||
// when removing items up the API major version
|
||||
|
||||
NONE,
|
||||
LIGHT,
|
||||
MEDIUM,
|
||||
HEAVY,
|
||||
|
||||
/**
|
||||
* Should not be passed in. <br>
|
||||
* Is returned if the overdraw value doesn't match any of the enums defined here.
|
||||
*/
|
||||
CUSTOM;
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package com.seibel.distanthorizons.api.enums.config;
|
||||
|
||||
public enum EUpdateBranch
|
||||
{
|
||||
STABLE,
|
||||
NIGHTLY
|
||||
}
|
||||
+3
-2
@@ -30,9 +30,10 @@ import com.seibel.distanthorizons.api.enums.config.DisallowSelectingViaConfigGui
|
||||
* HIGH, <br>
|
||||
* EXTREME, <br>
|
||||
*
|
||||
* @since API 1.0.0
|
||||
* @since API 1.1.0
|
||||
* @version 2024-4-6
|
||||
*/
|
||||
public enum EQualityPreset
|
||||
public enum EDhApiQualityPreset
|
||||
{
|
||||
// Reminder:
|
||||
// when adding items up the API minor version
|
||||
+3
-4
@@ -29,9 +29,10 @@ import com.seibel.distanthorizons.api.enums.config.DisallowSelectingViaConfigGui
|
||||
* BALANCED, <br>
|
||||
* AGGRESSIVE, <br>
|
||||
*
|
||||
* @since API 1.0.0
|
||||
* @since API 1.1.0
|
||||
* @version 2024-4-6
|
||||
*/
|
||||
public enum EThreadPreset
|
||||
public enum EDhApiThreadPreset
|
||||
{
|
||||
// Reminder:
|
||||
// when adding items up the API minor version
|
||||
@@ -44,8 +45,6 @@ public enum EThreadPreset
|
||||
LOW_IMPACT,
|
||||
BALANCED,
|
||||
AGGRESSIVE,
|
||||
|
||||
// temporarily removed due to stability concerns
|
||||
I_PAID_FOR_THE_WHOLE_CPU,
|
||||
|
||||
}
|
||||
+5
-11
@@ -28,10 +28,10 @@ package com.seibel.distanthorizons.api.enums.rendering;
|
||||
*
|
||||
* @author Leetom
|
||||
* @author James Seibel
|
||||
* @version 2023-6-7
|
||||
* @since API 1.0.0
|
||||
* @version 2024-4-6
|
||||
* @since API 1.1.0
|
||||
*/
|
||||
public enum EDebugRendering
|
||||
public enum EDhApiDebugRendering
|
||||
{
|
||||
// Reminder:
|
||||
// when adding items up the API minor version
|
||||
@@ -44,10 +44,6 @@ public enum EDebugRendering
|
||||
/** LOD colors are based on their detail */
|
||||
SHOW_DETAIL,
|
||||
|
||||
@Deprecated
|
||||
/** LOD colors are based on their gen mode. */
|
||||
SHOW_GENMODE,
|
||||
|
||||
/** Block Materials are often used by Iris shaders to determine how LODs should be rendered */
|
||||
SHOW_BLOCK_MATERIAL,
|
||||
|
||||
@@ -58,7 +54,7 @@ public enum EDebugRendering
|
||||
SHOW_RENDER_SOURCE_FLAG;
|
||||
|
||||
|
||||
public static EDebugRendering next(EDebugRendering type)
|
||||
public static EDhApiDebugRendering next(EDhApiDebugRendering type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -75,7 +71,7 @@ public enum EDebugRendering
|
||||
}
|
||||
}
|
||||
|
||||
public static EDebugRendering previous(EDebugRendering type)
|
||||
public static EDhApiDebugRendering previous(EDhApiDebugRendering type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -84,8 +80,6 @@ public enum EDebugRendering
|
||||
case SHOW_RENDER_SOURCE_FLAG:
|
||||
return SHOW_OVERLAPPING_QUADS;
|
||||
case SHOW_OVERLAPPING_QUADS:
|
||||
return SHOW_GENMODE;
|
||||
case SHOW_GENMODE:
|
||||
return SHOW_DETAIL;
|
||||
default:
|
||||
return OFF;
|
||||
+4
-3
@@ -24,10 +24,10 @@ package com.seibel.distanthorizons.api.enums.rendering;
|
||||
* USE_SKY_COLOR, <br>
|
||||
*
|
||||
* @author James Seibel
|
||||
* @version 2022-6-9
|
||||
* @since API 1.0.0
|
||||
* @version 2024-4-6
|
||||
* @since API 1.1.0
|
||||
*/
|
||||
public enum EFogColorMode
|
||||
public enum EDhApiFogColorMode
|
||||
{
|
||||
// Reminder:
|
||||
// when adding items: up the API minor version
|
||||
@@ -44,4 +44,5 @@ public enum EFogColorMode
|
||||
* https://www.curseforge.com/minecraft/mc-mods/clear-skies-forge-port
|
||||
*/
|
||||
USE_SKY_COLOR,
|
||||
|
||||
}
|
||||
+3
-2
@@ -26,9 +26,10 @@ package com.seibel.distanthorizons.api.enums.rendering;
|
||||
*
|
||||
* @author James Seibel
|
||||
* @version 2022-6-2
|
||||
* @since API 1.0.0
|
||||
* @since API 1.1.0
|
||||
*/
|
||||
public enum EFogDistance
|
||||
@Deprecated
|
||||
public enum EDhApiFogDistance
|
||||
{
|
||||
// Reminder:
|
||||
// when adding items up the API minor version
|
||||
+2
-2
@@ -25,10 +25,10 @@ package com.seibel.distanthorizons.api.enums.rendering;
|
||||
* FOG_DISABLED <br>
|
||||
*
|
||||
* @author James Seibel
|
||||
* @since API 1.1.0
|
||||
* @version 2022-6-2
|
||||
* @since API 1.0.0
|
||||
*/
|
||||
public enum EFogDrawMode
|
||||
public enum EDhApiFogDrawMode
|
||||
{
|
||||
// Reminder:
|
||||
// when adding items up the API minor version
|
||||
+3
-3
@@ -26,9 +26,9 @@ package com.seibel.distanthorizons.api.enums.rendering;
|
||||
*
|
||||
* @author Leetom
|
||||
* @version 2022-6-30
|
||||
* @since API 1.0.0
|
||||
* @since API 1.1.0
|
||||
*/
|
||||
public enum EFogFalloff
|
||||
public enum EDhApiFogFalloff
|
||||
{
|
||||
// Reminder:
|
||||
// when adding items up the API minor version
|
||||
@@ -38,5 +38,5 @@ public enum EFogFalloff
|
||||
LINEAR,
|
||||
EXPONENTIAL,
|
||||
EXPONENTIAL_SQUARED,
|
||||
// TEXTURE_BASED, // TODO: Impl this
|
||||
|
||||
}
|
||||
+3
-3
@@ -32,10 +32,10 @@ package com.seibel.distanthorizons.api.enums.rendering;
|
||||
* AVERAGE <br>
|
||||
*
|
||||
* @author Leetom
|
||||
* @version 2022-4-14
|
||||
* @since API 1.0.0
|
||||
* @version 2024-4-6
|
||||
* @since API 1.1.0
|
||||
*/
|
||||
public enum EHeightFogMixMode
|
||||
public enum EDhApiHeightFogMixMode
|
||||
{
|
||||
BASIC,
|
||||
IGNORE_HEIGHT,
|
||||
+4
-4
@@ -28,10 +28,10 @@ package com.seibel.distanthorizons.api.enums.rendering;
|
||||
* ABOVE_AND_BELOW_SET_HEIGHT, <br>
|
||||
*
|
||||
* @author Leetom
|
||||
* @version 6-30-2022
|
||||
* @since API 1.0.0
|
||||
* @version 2024-4-6
|
||||
* @since API 1.1.0
|
||||
*/
|
||||
public enum EHeightFogMode
|
||||
public enum EDhApiHeightFogMode
|
||||
{
|
||||
// Reminder:
|
||||
// when adding items up the API minor version
|
||||
@@ -49,7 +49,7 @@ public enum EHeightFogMode
|
||||
public final boolean above;
|
||||
public final boolean below;
|
||||
|
||||
EHeightFogMode(boolean basedOnCamera, boolean above, boolean below)
|
||||
EDhApiHeightFogMode(boolean basedOnCamera, boolean above, boolean below)
|
||||
{
|
||||
this.basedOnCamera = basedOnCamera;
|
||||
this.above = above;
|
||||
+5
-5
@@ -24,10 +24,10 @@ package com.seibel.distanthorizons.api.enums.rendering;
|
||||
* Debug <br>
|
||||
* Disabled <br>
|
||||
*
|
||||
* @version 2022-6-2
|
||||
* @since API 1.0.0
|
||||
* @since API 1.1.0
|
||||
* @version 2024-4-6
|
||||
*/
|
||||
public enum ERendererMode
|
||||
public enum EDhApiRendererMode
|
||||
{
|
||||
// Reminder:
|
||||
// when adding items up the API minor version
|
||||
@@ -40,7 +40,7 @@ public enum ERendererMode
|
||||
|
||||
|
||||
/** Used by the config GUI to cycle through the available rendering options */
|
||||
public static ERendererMode next(ERendererMode type)
|
||||
public static EDhApiRendererMode next(EDhApiRendererMode type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -54,7 +54,7 @@ public enum ERendererMode
|
||||
}
|
||||
|
||||
/** Used by the config GUI to cycle through the available rendering options */
|
||||
public static ERendererMode previous(ERendererMode type)
|
||||
public static EDhApiRendererMode previous(EDhApiRendererMode type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
+4
-3
@@ -24,9 +24,10 @@ package com.seibel.distanthorizons.api.enums.rendering;
|
||||
* FAKE, <br>
|
||||
* COMPLETE, <br>
|
||||
*
|
||||
* @since API 1.0.0
|
||||
* @since API 1.1.0
|
||||
* @version 2024-4-6
|
||||
*/
|
||||
public enum ETransparency
|
||||
public enum EDhApiTransparency
|
||||
{
|
||||
// Reminder:
|
||||
// when adding items up the API minor version
|
||||
@@ -40,7 +41,7 @@ public enum ETransparency
|
||||
public final boolean transparencyEnabled;
|
||||
public final boolean fakeTransparencyEnabled;
|
||||
|
||||
ETransparency(boolean transparencyEnabled, boolean fakeTransparencyEnabled)
|
||||
EDhApiTransparency(boolean transparencyEnabled, boolean fakeTransparencyEnabled)
|
||||
{
|
||||
this.transparencyEnabled = transparencyEnabled;
|
||||
this.fakeTransparencyEnabled = fakeTransparencyEnabled;
|
||||
-1
@@ -19,7 +19,6 @@
|
||||
|
||||
package com.seibel.distanthorizons.api.interfaces.config.both;
|
||||
|
||||
import com.seibel.distanthorizons.api.enums.config.ELightGenerationMode;
|
||||
import com.seibel.distanthorizons.api.enums.worldGeneration.EDhApiDistantGeneratorMode;
|
||||
import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue;
|
||||
import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigGroup;
|
||||
|
||||
-3
@@ -19,9 +19,6 @@
|
||||
|
||||
package com.seibel.distanthorizons.api.interfaces.config.client;
|
||||
|
||||
import com.seibel.distanthorizons.api.enums.rendering.EFogColorMode;
|
||||
import com.seibel.distanthorizons.api.enums.rendering.EFogDistance;
|
||||
import com.seibel.distanthorizons.api.enums.rendering.EFogDrawMode;
|
||||
import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigGroup;
|
||||
import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue;
|
||||
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@
|
||||
|
||||
package com.seibel.distanthorizons.api.interfaces.config.client;
|
||||
|
||||
import com.seibel.distanthorizons.api.enums.rendering.EDebugRendering;
|
||||
import com.seibel.distanthorizons.api.enums.rendering.EDhApiDebugRendering;
|
||||
import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue;
|
||||
import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigGroup;
|
||||
|
||||
@@ -33,7 +33,7 @@ import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigGroup;
|
||||
public interface IDhApiDebuggingConfig extends IDhApiConfigGroup
|
||||
{
|
||||
/** Can be used to debug the standard fake chunk rendering. */
|
||||
IDhApiConfigValue<EDebugRendering> debugRendering();
|
||||
IDhApiConfigValue<EDhApiDebugRendering> debugRendering();
|
||||
|
||||
/** If enabled debug keybindings can be used. */
|
||||
IDhApiConfigValue<Boolean> debugKeybindings();
|
||||
|
||||
+2
-3
@@ -19,8 +19,7 @@
|
||||
|
||||
package com.seibel.distanthorizons.api.interfaces.config.client;
|
||||
|
||||
import com.seibel.distanthorizons.api.enums.rendering.EFogFalloff;
|
||||
import com.seibel.distanthorizons.api.enums.rendering.*;
|
||||
import com.seibel.distanthorizons.api.enums.rendering.EDhApiFogFalloff;
|
||||
import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigGroup;
|
||||
import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue;
|
||||
|
||||
@@ -64,7 +63,7 @@ public interface IDhApiFarFogConfig extends IDhApiConfigGroup
|
||||
IDhApiConfigValue<Double> farFogMaxThickness();
|
||||
|
||||
/** Defines how the fog changes in thickness. */
|
||||
IDhApiConfigValue<EFogFalloff> farFogFalloff();
|
||||
IDhApiConfigValue<EDhApiFogFalloff> farFogFalloff();
|
||||
|
||||
/** Defines the fog density. */
|
||||
IDhApiConfigValue<Double> farFogDensity();
|
||||
|
||||
+6
-7
@@ -19,10 +19,9 @@
|
||||
|
||||
package com.seibel.distanthorizons.api.interfaces.config.client;
|
||||
|
||||
import com.seibel.distanthorizons.api.enums.rendering.EFogColorMode;
|
||||
import com.seibel.distanthorizons.api.enums.rendering.EFogDistance;
|
||||
import com.seibel.distanthorizons.api.enums.rendering.EFogDrawMode;
|
||||
import com.seibel.distanthorizons.api.enums.rendering.*;
|
||||
import com.seibel.distanthorizons.api.enums.rendering.EDhApiFogColorMode;
|
||||
import com.seibel.distanthorizons.api.enums.rendering.EDhApiFogDistance;
|
||||
import com.seibel.distanthorizons.api.enums.rendering.EDhApiFogDrawMode;
|
||||
import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigGroup;
|
||||
import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue;
|
||||
|
||||
@@ -59,13 +58,13 @@ public interface IDhApiFogConfig extends IDhApiConfigGroup
|
||||
//====================//
|
||||
|
||||
/** Defines at what distance fog is rendered on fake chunks. */
|
||||
IDhApiConfigValue<EFogDistance> distance();
|
||||
IDhApiConfigValue<EDhApiFogDistance> distance();
|
||||
|
||||
/** Should be used to enable/disable fog rendering. */
|
||||
IDhApiConfigValue<EFogDrawMode> drawMode();
|
||||
IDhApiConfigValue<EDhApiFogDrawMode> drawMode();
|
||||
|
||||
/** Can be used to enable support with mods that change vanilla MC's fog color. */
|
||||
IDhApiConfigValue<EFogColorMode> color();
|
||||
IDhApiConfigValue<EDhApiFogColorMode> color();
|
||||
|
||||
/**
|
||||
* If enabled attempts to disable vanilla MC's fog on real chunks. <br>
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@
|
||||
|
||||
package com.seibel.distanthorizons.api.interfaces.config.client;
|
||||
|
||||
import com.seibel.distanthorizons.api.enums.config.EGpuUploadMethod;
|
||||
import com.seibel.distanthorizons.api.enums.config.EDhApiGpuUploadMethod;
|
||||
import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigGroup;
|
||||
import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue;
|
||||
|
||||
@@ -34,7 +34,7 @@ public interface IDhApiGpuBuffersConfig extends IDhApiConfigGroup
|
||||
{
|
||||
|
||||
/** Defines how geometry data is uploaded to the GPU. */
|
||||
IDhApiConfigValue<EGpuUploadMethod> gpuUploadMethod();
|
||||
IDhApiConfigValue<EDhApiGpuUploadMethod> gpuUploadMethod();
|
||||
|
||||
/**
|
||||
* Defines how long we should wait after uploading one
|
||||
|
||||
+9
-21
@@ -20,9 +20,8 @@
|
||||
package com.seibel.distanthorizons.api.interfaces.config.client;
|
||||
|
||||
import com.seibel.distanthorizons.api.enums.config.*;
|
||||
import com.seibel.distanthorizons.api.enums.config.*;
|
||||
import com.seibel.distanthorizons.api.enums.rendering.ERendererMode;
|
||||
import com.seibel.distanthorizons.api.enums.rendering.ETransparency;
|
||||
import com.seibel.distanthorizons.api.enums.rendering.EDhApiRendererMode;
|
||||
import com.seibel.distanthorizons.api.enums.rendering.EDhApiTransparency;
|
||||
import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue;
|
||||
import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigGroup;
|
||||
|
||||
@@ -68,7 +67,7 @@ public interface IDhApiGraphicsConfig extends IDhApiConfigGroup
|
||||
*
|
||||
* Changing this config also changes {@link IDhApiGraphicsConfig#renderingEnabled()}'s value.
|
||||
*/
|
||||
IDhApiConfigValue<ERendererMode> renderingMode();
|
||||
IDhApiConfigValue<EDhApiRendererMode> renderingMode();
|
||||
|
||||
|
||||
|
||||
@@ -77,18 +76,18 @@ public interface IDhApiGraphicsConfig extends IDhApiConfigGroup
|
||||
//==================//
|
||||
|
||||
/** Defines how detailed fake chunks are in the horizontal direction */
|
||||
IDhApiConfigValue<EMaxHorizontalResolution> maxHorizontalResolution();
|
||||
IDhApiConfigValue<EDhApiMaxHorizontalResolution> maxHorizontalResolution();
|
||||
|
||||
/** Defines how detailed fake chunks are in the vertical direction */
|
||||
IDhApiConfigValue<EVerticalQuality> verticalQuality();
|
||||
IDhApiConfigValue<EDhApiVerticalQuality> verticalQuality();
|
||||
|
||||
/** Modifies the quadratic function fake chunks use for horizontal quality drop-off. */
|
||||
IDhApiConfigValue<EHorizontalQuality> horizontalQuality();
|
||||
IDhApiConfigValue<EDhApiHorizontalQuality> horizontalQuality();
|
||||
|
||||
IDhApiConfigValue<ETransparency> transparency();
|
||||
IDhApiConfigValue<EDhApiTransparency> transparency();
|
||||
|
||||
/** Defines what blocks won't be rendered as LODs. */
|
||||
IDhApiConfigValue<EBlocksToAvoid> blocksToAvoid();
|
||||
IDhApiConfigValue<EDhApiBlocksToAvoid> blocksToAvoid();
|
||||
|
||||
/**
|
||||
* Defines if the color of avoided blocks will color the block below them. <Br>
|
||||
@@ -112,17 +111,6 @@ public interface IDhApiGraphicsConfig extends IDhApiConfigGroup
|
||||
// advanced graphic settings //
|
||||
//===========================//
|
||||
|
||||
/**
|
||||
* Sets the distance used by the near clip plane to reduce
|
||||
* overdraw. <br>
|
||||
* Disabling this reduces holes in the world due to the near clip plane
|
||||
* being too close to the camera and the terrain not being covered by vanilla terrain.
|
||||
*
|
||||
* @deprecated Use {@link IDhApiGraphicsConfig#overdrawPreventionRadius()} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
IDhApiConfigValue<EOverdrawPrevention> overdrawPrevention();
|
||||
|
||||
/**
|
||||
* Sets the radius used by the near clip shader to reduce
|
||||
* overdraw. <br>
|
||||
@@ -172,7 +160,7 @@ public interface IDhApiGraphicsConfig extends IDhApiConfigGroup
|
||||
*
|
||||
* @since API 1.1.0
|
||||
*/
|
||||
IDhApiConfigValue<ELodShading> lodShading();
|
||||
IDhApiConfigValue<EDhApiLodShading> lodShading();
|
||||
|
||||
/**
|
||||
* Sets whether LODs outside the view frustum culling will
|
||||
|
||||
+6
-6
@@ -19,9 +19,9 @@
|
||||
|
||||
package com.seibel.distanthorizons.api.interfaces.config.client;
|
||||
|
||||
import com.seibel.distanthorizons.api.enums.rendering.EFogFalloff;
|
||||
import com.seibel.distanthorizons.api.enums.rendering.EHeightFogMixMode;
|
||||
import com.seibel.distanthorizons.api.enums.rendering.EHeightFogMode;
|
||||
import com.seibel.distanthorizons.api.enums.rendering.EDhApiFogFalloff;
|
||||
import com.seibel.distanthorizons.api.enums.rendering.EDhApiHeightFogMixMode;
|
||||
import com.seibel.distanthorizons.api.enums.rendering.EDhApiHeightFogMode;
|
||||
import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigGroup;
|
||||
import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue;
|
||||
|
||||
@@ -40,10 +40,10 @@ public interface IDhApiHeightFogConfig extends IDhApiConfigGroup
|
||||
{
|
||||
|
||||
/** Defines how the height fog mixes. */
|
||||
IDhApiConfigValue<EHeightFogMixMode> heightFogMixMode();
|
||||
IDhApiConfigValue<EDhApiHeightFogMixMode> heightFogMixMode();
|
||||
|
||||
/** Defines how the height fog is drawn relative to the camera or world. */
|
||||
IDhApiConfigValue<EHeightFogMode> heightFogMode();
|
||||
IDhApiConfigValue<EDhApiHeightFogMode> heightFogMode();
|
||||
|
||||
/**
|
||||
* Defines the height fog's base height if {@link IDhApiHeightFogConfig#heightFogMode()}
|
||||
@@ -64,7 +64,7 @@ public interface IDhApiHeightFogConfig extends IDhApiConfigGroup
|
||||
IDhApiConfigValue<Double> heightFogMaxThickness();
|
||||
|
||||
/** Defines how the height fog changes in thickness. */
|
||||
IDhApiConfigValue<EFogFalloff> heightFogFalloff();
|
||||
IDhApiConfigValue<EDhApiFogFalloff> heightFogFalloff();
|
||||
|
||||
/** Defines the height fog's density. */
|
||||
IDhApiConfigValue<Double> heightFogDensity();
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@
|
||||
package com.seibel.distanthorizons.api.interfaces.config.client;
|
||||
|
||||
import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue;
|
||||
import com.seibel.distanthorizons.api.enums.config.EServerFolderNameMode;
|
||||
import com.seibel.distanthorizons.api.enums.config.EDhApiServerFolderNameMode;
|
||||
import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigGroup;
|
||||
|
||||
/**
|
||||
@@ -37,7 +37,7 @@ public interface IDhApiMultiplayerConfig extends IDhApiConfigGroup
|
||||
* Defines how multiplayer server folders are named. <br>
|
||||
* Note: Changing this while connected to a multiplayer world will cause undefined behavior!
|
||||
*/
|
||||
IDhApiConfigValue<EServerFolderNameMode> folderSavingMode();
|
||||
IDhApiConfigValue<EDhApiServerFolderNameMode> folderSavingMode();
|
||||
|
||||
/**
|
||||
* Defines the necessary similarity (as a percent) that two potential levels
|
||||
|
||||
+6
-6
@@ -19,7 +19,7 @@
|
||||
|
||||
package com.seibel.distanthorizons.coreapi.util.converters;
|
||||
|
||||
import com.seibel.distanthorizons.api.enums.rendering.ERendererMode;
|
||||
import com.seibel.distanthorizons.api.enums.rendering.EDhApiRendererMode;
|
||||
import com.seibel.distanthorizons.coreapi.interfaces.config.IConverter;
|
||||
|
||||
/**
|
||||
@@ -28,17 +28,17 @@ import com.seibel.distanthorizons.coreapi.interfaces.config.IConverter;
|
||||
* @author James Seibel
|
||||
* @version 2022-6-30
|
||||
*/
|
||||
public class RenderModeEnabledConverter implements IConverter<ERendererMode, Boolean>
|
||||
public class RenderModeEnabledConverter implements IConverter<EDhApiRendererMode, Boolean>
|
||||
{
|
||||
|
||||
@Override public ERendererMode convertToCoreType(Boolean renderingEnabled)
|
||||
@Override public EDhApiRendererMode convertToCoreType(Boolean renderingEnabled)
|
||||
{
|
||||
return renderingEnabled ? ERendererMode.DEFAULT : ERendererMode.DISABLED;
|
||||
return renderingEnabled ? EDhApiRendererMode.DEFAULT : EDhApiRendererMode.DISABLED;
|
||||
}
|
||||
|
||||
@Override public Boolean convertToApiType(ERendererMode renderingMode)
|
||||
@Override public Boolean convertToApiType(EDhApiRendererMode renderingMode)
|
||||
{
|
||||
return renderingMode == ERendererMode.DEFAULT;
|
||||
return renderingMode == EDhApiRendererMode.DEFAULT;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user