shapes renderer WIP
This commit is contained in:
1 parent
cfe1b7d837
commit
7c0a377d71
1 file changed
+53
@@ -0,0 +1,53 @@
|
|||||||
|
package carpet.script.utils;
|
||||||
|
|
||||||
|
import net.minecraft.client.render.VertexConsumer;
|
||||||
|
import net.minecraft.client.render.VertexConsumerProvider;
|
||||||
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ShapesRenderer
|
||||||
|
{
|
||||||
|
List<ExpiringShape> shapes;
|
||||||
|
|
||||||
|
void render(MatrixStack matrices, VertexConsumerProvider vertexConsumers, double cameraX, double cameraY, double cameraZ){
|
||||||
|
|
||||||
|
}
|
||||||
|
void addShape() {}
|
||||||
|
|
||||||
|
|
||||||
|
public abstract static class ExpiringShape
|
||||||
|
{
|
||||||
|
protected int r;
|
||||||
|
protected int g;
|
||||||
|
protected int b;
|
||||||
|
protected int a;
|
||||||
|
protected int expiryTick = 0;
|
||||||
|
public abstract void render(MatrixStack matrix, VertexConsumer vertexConsumer);
|
||||||
|
public ExpiringShape expiresIn(int ticks)
|
||||||
|
{
|
||||||
|
expiryTick = ticks;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class SolidLine extends ExpiringShape
|
||||||
|
{
|
||||||
|
public SolidLine(Vec3d from, Vec3d to, int r, int g, int b, int a)
|
||||||
|
{
|
||||||
|
this.r = r;
|
||||||
|
this.g = g;
|
||||||
|
this.b = b;
|
||||||
|
this.a = a;
|
||||||
|
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void render(MatrixStack matrix, VertexConsumer vertexConsumer)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in new issue
Block a user