Add generic object materials

This commit is contained in:
James Seibel
2024-07-11 18:12:58 -05:00
parent 17aa85ad24
commit e9d254f8c4
7 changed files with 70 additions and 17 deletions
@@ -1,11 +1,25 @@
package com.seibel.distanthorizons.api.enums.rendering;
/**
* contains the indices used by Iris to determine how different block types should be rendered
* contains the indices used by shaders to determine
* how different block types should be rendered. <br><br>
*
* USE_OPTIFINE_FOG_SETTING, <br>
* FOG_ENABLED, <br>
* FOG_DISABLED <br>
* UNKOWN, <br>
* LEAVES, <br>
* STONE, <br>
* WOOD, <br>
* METAL, <br>
* DIRT, <br>
* LAVA, <br>
* DEEPSLATE, <br>
* SNOW, <br>
* SAND, <br>
* TERRACOTTA, <br>
* NETHER_STONE, <br>
* WATER, <br>
* GRASS, <br>
* AIR, <br>
* ILLUMINATED, <br>
*
* @author James Seibel
* @since API 3.0.0
@@ -1,6 +1,7 @@
package com.seibel.distanthorizons.api.objects.render;
import com.seibel.distanthorizons.api.enums.rendering.EDhApiBlockMaterial;
import com.seibel.distanthorizons.api.interfaces.render.IDhApiRenderableBoxGroup;
import com.seibel.distanthorizons.api.objects.math.DhApiVec3d;
import com.seibel.distanthorizons.api.objects.math.DhApiVec3f;
@@ -22,6 +23,7 @@ public class DhApiRenderableBox
public DhApiVec3d maxPos;
public Color color;
public byte material;
@@ -29,20 +31,21 @@ public class DhApiRenderableBox
// constructors //
//==============//
public DhApiRenderableBox(DhApiVec3d minPos, float width, Color color)
public DhApiRenderableBox(DhApiVec3d minPos, float width, Color color, EDhApiBlockMaterial material)
{
this(minPos, new DhApiVec3d(
minPos.x + width,
minPos.y + width,
minPos.z + width
), color);
), color, material);
}
public DhApiRenderableBox(DhApiVec3d minPos, DhApiVec3d maxPos, Color color)
public DhApiRenderableBox(DhApiVec3d minPos, DhApiVec3d maxPos, Color color, EDhApiBlockMaterial material)
{
this.minPos = minPos;
this.maxPos = maxPos;
this.color = color;
this.material = material.index;
}
}