re-add generic rendering to the API
This commit is contained in:
@@ -23,8 +23,9 @@ import com.seibel.distanthorizons.api.interfaces.events.IDhApiEventInjector;
|
||||
import com.seibel.distanthorizons.api.interfaces.factories.IDhApiWrapperFactory;
|
||||
import com.seibel.distanthorizons.api.interfaces.override.IDhApiOverrideable;
|
||||
import com.seibel.distanthorizons.api.interfaces.override.worldGenerator.IDhApiWorldGeneratorOverrideRegister;
|
||||
import com.seibel.distanthorizons.api.interfaces.render.IDhApiCustomRenderRegister;
|
||||
import com.seibel.distanthorizons.api.interfaces.render.IDhApiCustomRenderObjectFactory;
|
||||
import com.seibel.distanthorizons.api.interfaces.render.IDhApiRenderProxy;
|
||||
import com.seibel.distanthorizons.api.interfaces.world.IDhApiLevelWrapper;
|
||||
import com.seibel.distanthorizons.api.methods.events.abstractEvents.DhApiAfterDhInitEvent;
|
||||
import com.seibel.distanthorizons.api.methods.override.DhApiWorldGeneratorOverrideRegister;
|
||||
import com.seibel.distanthorizons.coreapi.ModInfo;
|
||||
@@ -128,11 +129,12 @@ public class DhApi
|
||||
*/
|
||||
public static IDhApiWrapperFactory wrapperFactory = null;
|
||||
|
||||
///**
|
||||
// * Used to add custom objects to DH's render pass.
|
||||
// * @since API 3.0.0
|
||||
// */
|
||||
//public static IDhApiCustomRenderRegister renderRegister = null;
|
||||
/**
|
||||
* Used to create custom renderable objects. <br>
|
||||
* These objects can be added to the renderer in {@link IDhApiLevelWrapper}
|
||||
* @since API 3.0.0
|
||||
*/
|
||||
public static IDhApiCustomRenderObjectFactory customRenderObjectFactory = null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.seibel.distanthorizons.api.interfaces.render;
|
||||
|
||||
import com.seibel.distanthorizons.api.objects.math.DhApiVec3f;
|
||||
import com.seibel.distanthorizons.api.objects.render.DhApiRenderableBox;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Handles creating
|
||||
* {@link IDhApiRenderableBoxGroup} objects,
|
||||
* which can be added via a {@link IDhApiCustomRenderRegister}.
|
||||
*
|
||||
* @see IDhApiCustomRenderRegister
|
||||
* @see IDhApiRenderableBoxGroup
|
||||
*
|
||||
* @author James Seibel
|
||||
* @version 2024-7-3
|
||||
* @since API 3.0.0
|
||||
*/
|
||||
public interface IDhApiCustomRenderObjectFactory
|
||||
{
|
||||
IDhApiRenderableBoxGroup createForSingleBox(DhApiRenderableBox cube);
|
||||
IDhApiRenderableBoxGroup createRelativePositionedGroup(DhApiVec3f originBlockPos, List<DhApiRenderableBox> cubeList);
|
||||
IDhApiRenderableBoxGroup createAbsolutePositionedGroup(List<DhApiRenderableBox> cubeList);
|
||||
|
||||
}
|
||||
+14
-13
@@ -1,18 +1,24 @@
|
||||
package com.seibel.distanthorizons.api.interfaces.render;
|
||||
|
||||
import com.seibel.distanthorizons.api.objects.math.DhApiVec3f;
|
||||
import com.seibel.distanthorizons.api.objects.render.DhApiRenderableBox;
|
||||
|
||||
import java.util.List;
|
||||
import com.seibel.distanthorizons.api.DhApi;
|
||||
import com.seibel.distanthorizons.api.interfaces.world.IDhApiLevelWrapper;
|
||||
import com.seibel.distanthorizons.api.interfaces.world.IDhApiWorldProxy;
|
||||
|
||||
/**
|
||||
* Handles adding, removing, and creating
|
||||
* Handles adding and removing
|
||||
* {@link IDhApiRenderableBoxGroup} objects,
|
||||
* which can be used to render custom objects into
|
||||
* DH's terrain.
|
||||
* from DH's renderer. <br><br>
|
||||
*
|
||||
* Can be accessed in
|
||||
* {@link DhApi.Delayed#worldProxy} -> {@link IDhApiLevelWrapper}.
|
||||
*
|
||||
* @see IDhApiCustomRenderObjectFactory
|
||||
* @see IDhApiRenderableBoxGroup
|
||||
* @see IDhApiWorldProxy
|
||||
* @see IDhApiLevelWrapper
|
||||
*
|
||||
* @author James Seibel
|
||||
* @version 2024-6-30
|
||||
* @version 2024-7-3
|
||||
* @since API 3.0.0
|
||||
*/
|
||||
public interface IDhApiCustomRenderRegister
|
||||
@@ -21,9 +27,4 @@ public interface IDhApiCustomRenderRegister
|
||||
|
||||
IDhApiRenderableBoxGroup remove(long id);
|
||||
|
||||
|
||||
IDhApiRenderableBoxGroup createForSingleBox(DhApiRenderableBox cube);
|
||||
IDhApiRenderableBoxGroup createRelativePositionedGroup(DhApiVec3f originBlockPos, List<DhApiRenderableBox> cubeList);
|
||||
IDhApiRenderableBoxGroup createAbsolutePositionedGroup(List<DhApiRenderableBox> cubeList);
|
||||
|
||||
}
|
||||
|
||||
+7
@@ -21,6 +21,7 @@ package com.seibel.distanthorizons.api.interfaces.world;
|
||||
|
||||
import com.seibel.distanthorizons.api.interfaces.IDhApiUnsafeWrapper;
|
||||
import com.seibel.distanthorizons.api.enums.worldGeneration.EDhApiLevelType;
|
||||
import com.seibel.distanthorizons.api.interfaces.render.IDhApiCustomRenderRegister;
|
||||
|
||||
/**
|
||||
* Can be either a Server or Client level.<br>
|
||||
@@ -49,4 +50,10 @@ public interface IDhApiLevelWrapper extends IDhApiUnsafeWrapper
|
||||
*/
|
||||
default int getMinHeight() { return 0; }
|
||||
|
||||
/**
|
||||
* Will return null if called on the server,
|
||||
* or if called before the renderer has been set up.
|
||||
*/
|
||||
IDhApiCustomRenderRegister getRenderRegister();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user