Separate out Generic object rendering
This commit is contained in:
@@ -23,6 +23,7 @@ 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.IDhApiRenderProxy;
|
||||
import com.seibel.distanthorizons.api.methods.events.abstractEvents.DhApiAfterDhInitEvent;
|
||||
import com.seibel.distanthorizons.api.methods.override.DhApiWorldGeneratorOverrideRegister;
|
||||
@@ -127,6 +128,7 @@ public class DhApi
|
||||
*/
|
||||
public static IDhApiWrapperFactory wrapperFactory = null;
|
||||
|
||||
public static IDhApiCustomRenderRegister renderRegister = null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.seibel.distanthorizons.api.interfaces.render;
|
||||
|
||||
import com.seibel.distanthorizons.api.objects.render.DhApiRenderableBox;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IDhApiCustomRenderRegister
|
||||
{
|
||||
void add(IDhApiRenderableBoxGroup cubeGroup) throws IllegalArgumentException;
|
||||
|
||||
IDhApiRenderableBoxGroup remove(long id);
|
||||
|
||||
|
||||
IDhApiRenderableBoxGroup createForSingleBox(DhApiRenderableBox cube);
|
||||
IDhApiRenderableBoxGroup createRelativePositionedGroup(float originBlockX, float originBlockY, float originBlockZ, List<DhApiRenderableBox> cubeList);
|
||||
IDhApiRenderableBoxGroup createAbsolutePositionedGroup(List<DhApiRenderableBox> cubeList);
|
||||
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.seibel.distanthorizons.api.interfaces.render;
|
||||
|
||||
import com.seibel.distanthorizons.api.methods.events.sharedParameterObjects.DhApiRenderParam;
|
||||
import com.seibel.distanthorizons.api.objects.render.DhApiRenderableBox;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public interface IDhApiRenderableBoxGroup extends List<DhApiRenderableBox>
|
||||
{
|
||||
|
||||
|
||||
long getId();
|
||||
void setOriginBlockPos(float x, float y, float z);
|
||||
float getOriginBlockX();
|
||||
float getOriginBlockY();
|
||||
float getOriginBlockZ();
|
||||
|
||||
void setPreRenderFunc(Consumer<DhApiRenderParam> renderEventParam);
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.seibel.distanthorizons.api.objects.render;
|
||||
|
||||
|
||||
import com.seibel.distanthorizons.coreapi.util.math.Vec3f;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
public final class DhApiRenderableBox
|
||||
{
|
||||
public Vec3f minPos;
|
||||
public Vec3f maxPos;
|
||||
public Color color;
|
||||
|
||||
public boolean fullBright = false;
|
||||
|
||||
|
||||
|
||||
public DhApiRenderableBox(Vec3f minPos, Vec3f maxPos, Color color)
|
||||
{
|
||||
this.minPos = minPos;
|
||||
this.maxPos = maxPos;
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user