Distant Horizons API (Distant Horizons API)
Distant Horizons API 提供了一种与 Distant Horizons 进行交互和修改的方式,与 Minecraft 和模组加载器无关。如果你不是开发者,请不要下载。
如果你是开发者
在你的 Mods 文件夹中放置这个文件夹将不会产生任何效果。
示例项目在 GitLab 上包含了你开始使用 API 所需的所有基础知识。
额外资源
API JavaDocs
开发者 Wiki
Discord
如果你有任何问题或者以上两个文档没有解决的问题。
问题
如果你发现任何错误或者想要请求新功能,请使用主要的 Distant Horizons GitLab 问题页面。
来自Modrinth
4.0.0
DistantHorizonsApi-4.0.0.jar下载4.0.0#Release
# API Changes
### Highlights:
- Up API version 3.0.1 -> 4.0.0
### Full Changelog
**Additions:**
- IDhApiWorldProxy
- setReadOnly()
- getReadOnly()
- IDhApiLevelWrapper
- getDimensionName()
- getDhIdentifier()
- getDhSaveFolder()
- generateLod()
- Can be used to generate N-sized LODs
- IDhApiFogConfig
- enableDhFog()
- enableVanillaFog()
- EDhApiWorldGeneratorReturnType
- API_DATA_SOURCES
- IDhApiFullDataSource
- For use with the IDhApiWorldGenerator
- DhApiWorldUnloadEvent
- DhApiWorldLoadEvent
- IDhApiSaveStructure
- EDhApiDistantGeneratorMode
- FULL
<br/>
**Changes:**
- Up API version 3.0.1 -> 4.0.0
- IDhApiWorldGenerator
- rename runApiChunkValidation() -> runApiValidation()
- IDhApiHeightFogConfig
- heightFogMode -> heightFogDirection
- EDhApiHeightFogMode -> EDhApiHeightFogDirection
- EDhApiHeightFogMixMode
- BASIC -> SPHERICAL
- IGNORE_HEIGHT -> CYLINDRICAL
<br/>
**Bug Fixes:**
- Fix off by one error in the following IDhApiTerrainDataRepo methods when getting blocks in negative X and/or Z positions:
- getSingleDataPointAtBlockPos()
- getColumnDataAtBlockPos()
- getAllTerrainDataAtChunkPos()
- getAllTerrainDataAtRegionPos()
- getAllTerrainDataAtDetailLevelAndPos()
<br/>
**Removals:**
- IDhApiDimensionTypeWrapper
- getDimensionName()
- IDhApiWorldGenerator
- getMinGenerationGranularity()
- getMaxGenerationGranularity()
- isBusy()
- generateChunks() and generateApiChunks() byte granularity parameter
- int generationRequestChunkWidthCount is it's replacement and represents a different thing. Having the number of chunks wide is much easier to understand than the granularity.
- IDhApiMultiplayerConfig
- multiverseSimilarityRequirement()
- This config is no longer supported or needed
<br/>
**Deprecations:**
- IDhApiFogConfig
- drawMode()
- Use enableDhFog() instead
- The old method is kept but deprecated to prevent breaking support with Iris 1.7.5
- disableVanillaFog()
- Use enableVanillaFog() instead
- The old method is kept but deprecated to prevent breaking support with Iris 1.7.5
- EDhApiFogDrawMode
- USE_OPTIFINE_SETTING
展开
版本: 4.0.0
支持游戏: 1.16.5, 1.17.1, 1.18.2, 1.19.2, 1.19.4, 1.20.1, 1.20.4, 1.20.6, 1.21, 1.21.1, 1.21.3, 1.21.4
类型: Fabric
Forge
NeoForge
Release
下载次数: 41,794
3.0.0
DistantHorizonsApi-3.0.0-sources.jar下载3.0.0#Release
DistantHorizonsApi-3.0.0.jar下载3.0.0#Release
## Highlights:
- Due to breaking changes (mainly caused by incorrectly named objects) the api version number has been up from 2.1.0 to 3.0.0
- please make sure your implementing programs check the API version and handle old DH versions cleanly.
## Full Details:
updated javadocs
**Additions:**
- Generic Rendering API
- New objects include:
- DhApiRenderableBoxGroupShading
- DhApiRenderableBox
- DhApiBeforeGenericRenderSetupEvent
- DhApiBeforeGenericRenderCleanupEvent
- DhApiBeforeGenericObjectRenderEvent
- IDhApiRenderableBoxGroup
- IDhApiCustomRenderRegister
- IDhApiCustomRenderObjectFactory
- IDhApiGenericObjectShaderProgram
- IDhApiGenericRenderingConfig
- New bindings/methods include:
- DhApi.Delayed.IDhApiCustomRenderObjectFactory
- IDhApiLevelWrapper.getRenderRegister()
- IDhApiGraphicsConfig.IDhApiGenericRenderingConfig
- Optional memory caching to IDhApiTerrainDataRepo methods
- This allows for much faster raycasting and repeat query operations
- IDhApiTerrainDataCache
- New Enum EDhApiBlockMaterial
- New getter IDhApiBlockStateWrapper methods
- IDhApiBlockStateWrapper.getSerialString()
- IDhApiBlockStateWrapper.getMaterialId()
- New wrapper Factory methods to builder wrappers from resource location strings (IE "minecraft:stone", or "minecraft:plains")
- IDhApiWrapperFactory.getBiomeWrapper(String resourceLocationString, IDhApiLevelWrapper levelWrapper)
- IDhApiWrapperFactory.getDefaultBlockStateWrapper(String resourceLocationString, IDhApiLevelWrapper levelWrapper)
- Optional additional world gen DhApiChunk validation
**Bugfixes:**
- Fix/add AbstractDhApiChunkWorldGenerator.generateApiChunk()
- API Chunk generation was present previously but was broken preventing it's correct use
**Breaking Changes:**
- Renamed
- Math/Position objects
- Vec3f -> DhApiVec3f
- Vec3d -> DhApiVec3d
- Vec3i -> DhApiVec3i
- Mat4f -> DhApiMat4f
- Affected API objects:
- Vec3i -> DhApiVec3i
- DhApiRaycastResult
- DhApiBeforeBufferRenderEvent
- DhApiAfterRenderEvent
- IDhApiShaderProgram
- IDhApiCullingFrustum
- Mat4f -> DhApiMat4f
- DhApiRenderParam
- Removed
- IDhApiGpuBuffersConfig
- These config values didn't need to be changed by the end users (Note: if James is wrong and these do need to be changed in some edge cases, let him know so the change can be rolled back)
- this includes:
- gpuUploadMethod
- gpuUploadPerMegabyteInMilliseconds
**Deprecations:**
- IDhApiLevelWrapper.getHeight()
- This change is done so get min/max heigth are both viable methods
- use getMaxHeight() instead
- DhApiChunk constructor
- This change was due to the old constructor's parameters being in the wrong order (Specifically top and bottom positions being flipped)
- use DhApiChunk.create() instead
- DhApiTerrainDataPoint constructor
- This change was due to the old constructor's parameters being in the wrong order (Specifically top and bottom positions being flipped)
- use DhApiTerrainDataPoint.create() instead
- EDhApiGpuUploadMethod.BUFFER_MAPPING
- Buffer mapping was removed as an option due to memory leaks in the old system and having one system being simpler.
This can be reverted if users determine that buffer mapping is better in some situations.
- IDhApiWorldGenerator.isBusy()
- The method now has a default implementation but isn't used.
- The task queuing logic is now handled internally by DH
展开
版本: 3.0.0
支持游戏: 1.16.5, 1.17.1, 1.18.2, 1.19.2, 1.19.4, 1.20.1, 1.20.2, 1.20.4, 1.20.6, 1.21, 1.21.1
类型: Fabric
Forge
NeoForge
Release
下载次数: 178,140
2.1.0
DistantHorizonsApi-2.1.0.jar下载2.1.0#Release
**Additions**
- EDhApiUpdateBranch.AUTO
展开
版本: 2.1.0
支持游戏: 1.16.5, 1.17.1, 1.18.2, 1.19.2, 1.19.4, 1.20.1, 1.20.2, 1.20.4, 1.20.6, 1.21
类型: Fabric
Forge
NeoForge
Release
下载次数: 44,517
收录