Refactor, remove unused class, add API docs
This commit is contained in:
@@ -1 +0,0 @@
|
||||
The external api package holds any code that interfaces between Distant Horizons and other mods or projects.
|
||||
@@ -1,6 +1,9 @@
|
||||
package com.seibel.distanthorizons.api.interfaces;
|
||||
|
||||
/**
|
||||
* Implemented by wrappers so developers can
|
||||
* access the underlying Minecraft object(s).
|
||||
*
|
||||
* @author James Seibel
|
||||
* @version 2023-6-17
|
||||
*/
|
||||
|
||||
+2
@@ -22,6 +22,8 @@ package com.seibel.distanthorizons.api.interfaces.block;
|
||||
import com.seibel.distanthorizons.api.interfaces.IDhApiUnsafeWrapper;
|
||||
|
||||
/**
|
||||
* A Minecraft version independent way of handling Biomes.
|
||||
*
|
||||
* @author James Seibel
|
||||
* @version 3-5-2022
|
||||
*/
|
||||
|
||||
+7
-10
@@ -30,23 +30,20 @@ import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue;
|
||||
*/
|
||||
public interface IDhApiNoiseTextureConfig extends IDhApiConfigGroup
|
||||
{
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
/** If enabled a noise texture will be rendered on the LODs. */
|
||||
IDhApiConfigValue<Boolean> noiseEnabled();
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
/** Defines how many steps of noise should be applied. */
|
||||
IDhApiConfigValue<Integer> noiseSteps();
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
/** Defines how intense the noise will be. */
|
||||
IDhApiConfigValue<Double> noiseIntensity();
|
||||
|
||||
/**
|
||||
* TODO
|
||||
* Defines how far should the noise texture render before it fades away. <br><br>
|
||||
*
|
||||
* 0.0 - the noise texture will render the entire LOD render distance. <br>
|
||||
* 3.0 - the noise texture will fade away at 1/3 of the LOD render distance.
|
||||
*/
|
||||
IDhApiConfigValue<Double> noiseDropoff();
|
||||
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@ public interface IDhApiTerrainDataRepo
|
||||
// getters //
|
||||
//=========//
|
||||
|
||||
/** Returns the terrain datapoint at the given block position, at or containing the given Y position. */
|
||||
/** Returns the terrain datapoint at the given block position, at/or containing the given Y position. */
|
||||
DhApiResult<DhApiTerrainDataPoint> getSingleDataPointAtBlockPos(IDhApiLevelWrapper levelWrapper, int blockPosX, int blockPosY, int blockPosZ);
|
||||
/** Returns every datapoint in the column located at the given block X and Z position top to bottom. */
|
||||
DhApiResult<DhApiTerrainDataPoint[]> getColumnDataAtBlockPos(IDhApiLevelWrapper levelWrapper, int blockPosX, int blockPosZ);
|
||||
@@ -76,7 +76,7 @@ public interface IDhApiTerrainDataRepo
|
||||
*
|
||||
* Notes: <br>
|
||||
* - Only works if the given {@link IDhApiLevelWrapper} points to a loaded level. <br>
|
||||
* - If the player travels to this chunk, or the chunk is updated is some other way; your data will be replaced
|
||||
* - If the player travels to this chunk, or the chunk is updated in some other way; your data will be replaced
|
||||
* by whatever the current chunk is. <br>
|
||||
* - This method may not update the LOD data immediately. Any other chunks have
|
||||
* been queued to update, they will be handled first.
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ package com.seibel.distanthorizons.api.interfaces.render;
|
||||
import com.seibel.distanthorizons.api.objects.DhApiResult;
|
||||
|
||||
/**
|
||||
* Used to interact with Distant Horizons rendering systems.
|
||||
* Used to interact with Distant Horizons' rendering system.
|
||||
*
|
||||
* @author James Seibel
|
||||
* @version 2023-2-8
|
||||
|
||||
-68
@@ -1,68 +0,0 @@
|
||||
/*
|
||||
* 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.distanthorizons.api.interfaces.world;
|
||||
|
||||
import com.seibel.distanthorizons.api.interfaces.IDhApiUnsafeWrapper;
|
||||
|
||||
/**
|
||||
* @author James Seibel
|
||||
* @version 2022-7-14
|
||||
*/
|
||||
public interface IDhApiChunkWrapper extends IDhApiUnsafeWrapper
|
||||
{
|
||||
/** Returns the absolute Y coordinate of the highest block for the given relative X and Z coordinates. */
|
||||
int getMaxY(int relativeX, int relativeZ);
|
||||
/** Returns the maximum absolute block position in the X direction. */
|
||||
int getMaxX();
|
||||
/** Returns the maximum absolute block position in the Z direction. */
|
||||
int getMaxZ();
|
||||
|
||||
/** Returns the absolute Y coordinate of the lowest block for the given relative X and Z coordinates. */
|
||||
int getMinY(int relativeX, int relativeZ);
|
||||
/** Returns the minimum absolute block position in the X direction. */
|
||||
int getMinX();
|
||||
/** Returns the minimum absolute block position in the Z direction. */
|
||||
int getMinZ();
|
||||
|
||||
/**
|
||||
* Returns true if this chunk's lighting has been built. <br>
|
||||
* Note: for some versions of Minecraft this value may be unreliable.
|
||||
*/
|
||||
boolean isLightCorrect();
|
||||
|
||||
/** TODO what side of the block should this return the light for? */
|
||||
default int getBlockLight(int x, int y, int z) {return -1;}
|
||||
/** TODO what side of the block should this return the light for? */
|
||||
default int getSkyLight(int x, int y, int z) {return -1;}
|
||||
|
||||
/**
|
||||
* Returns true if chunks exist in all 4 cardinal and 4 ordinal directions
|
||||
* relative to this chunk. <br>
|
||||
* IE: returns true if there are chunks to the North, South, East, West, NE, SE, SW, and NW
|
||||
* of this chunk.
|
||||
*/
|
||||
boolean doNearbyChunksExist();
|
||||
|
||||
|
||||
// TODO these will probably need replacing once 1.7's ID system is done
|
||||
//IBlockStateWrapper getBlockState(int x, int y, int z);
|
||||
//IBiomeWrapper getBiome(int x, int y, int z);
|
||||
|
||||
}
|
||||
+1
-1
@@ -25,7 +25,6 @@ import com.seibel.distanthorizons.api.interfaces.IDhApiUnsafeWrapper;
|
||||
* @author James Seibel
|
||||
* @version 2022-7-14
|
||||
*/
|
||||
// TODO: Make a dimension wrapper as well
|
||||
public interface IDhApiDimensionTypeWrapper extends IDhApiUnsafeWrapper
|
||||
{
|
||||
String getDimensionName();
|
||||
@@ -33,4 +32,5 @@ public interface IDhApiDimensionTypeWrapper extends IDhApiUnsafeWrapper
|
||||
boolean hasCeiling();
|
||||
|
||||
boolean hasSkyLight();
|
||||
|
||||
}
|
||||
|
||||
+2
-1
@@ -23,7 +23,8 @@ import com.seibel.distanthorizons.api.interfaces.IDhApiUnsafeWrapper;
|
||||
import com.seibel.distanthorizons.api.enums.worldGeneration.EDhApiLevelType;
|
||||
|
||||
/**
|
||||
* Can be either a Server or Client level.
|
||||
* Can be either a Server or Client level.<br>
|
||||
* A level is equivalent to a dimension in vanilla Minecraft.
|
||||
*
|
||||
* @author James Seibel
|
||||
* @version 2022-7-14
|
||||
|
||||
+2
-1
@@ -20,7 +20,8 @@
|
||||
package com.seibel.distanthorizons.api.interfaces.world;
|
||||
|
||||
/**
|
||||
* Used to interact with Distant Horizons current world.
|
||||
* Used to interact with Distant Horizons' current world. <br>
|
||||
* A world is equivalent to a single server connection or a singleplayer world.
|
||||
*
|
||||
* @author James Seibel
|
||||
* @version 2022-11-20
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
The events api package holds objects and methods for listening to events fired by Distant Horizons'.
|
||||
|
||||
Each interface should only contain one method and that method should match the name of the file. This is done so Developers can mix and match what events they want their classes to handle.
|
||||
+2
@@ -2,7 +2,9 @@ package com.seibel.distanthorizons.api.methods.events.interfaces;
|
||||
|
||||
/**
|
||||
* @author Cailin
|
||||
* @deprecated marked as deprecated since it isn't currently implemented
|
||||
*/
|
||||
@Deprecated
|
||||
public interface IDhServerMessageReceived<T> extends IDhApiEvent<T>
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* Holds objects and methods for listening to events fired by Distant Horizons'.
|
||||
*/
|
||||
package com.seibel.distanthorizons.api.methods.events;
|
||||
@@ -1 +0,0 @@
|
||||
The overide api package holds objects and methods for overriding Distant Horizons' backend systems, so they can be replaced and improved.
|
||||
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* The override api package holds objects and methods for overriding Distant Horizons' backend systems, so they can be replaced or improved.
|
||||
*/
|
||||
package com.seibel.distanthorizons.api.methods.override;
|
||||
@@ -1,5 +1,7 @@
|
||||
/**
|
||||
* <strong> Start Here </strong> <br>
|
||||
* {@link com.seibel.distanthorizons.api.DhApi} has almost every method you would want.
|
||||
* {@link com.seibel.distanthorizons.api.DhApi} has almost every method you would want. <br><br>
|
||||
*
|
||||
* This package contains every method and object that is safe to use within the API.
|
||||
*/
|
||||
package com.seibel.distanthorizons.api;
|
||||
|
||||
@@ -19,12 +19,9 @@
|
||||
|
||||
package com.seibel.distanthorizons.coreapi;
|
||||
|
||||
/**
|
||||
* This file is similar to mcmod.info
|
||||
*
|
||||
* @author James Seibel
|
||||
* @author Ran
|
||||
* @version 2023-6-29
|
||||
/**
|
||||
* This file is similar to mcmod.info
|
||||
* and contains most meta-information related to Distant Horizons.
|
||||
*/
|
||||
public final class ModInfo
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@ public class BitShiftUtil
|
||||
*/
|
||||
public static int powerOfTwo(int value) { return 1 << value; }
|
||||
/** see {@link BitShiftUtil#powerOfTwo(int)} for documentation */
|
||||
public static long powerOfTwo(long value) { return 1 << value; }
|
||||
public static long powerOfTwo(long value) { return 1L << value; }
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user