mirror of
https://github.com/barkeser2002/Tenet.git
synced 2026-09-25 05:39:57 +03:00
15 lines
857 B
Diff
15 lines
857 B
Diff
--- a/com/mojang/blaze3d/vertex/VertexFormat.java
|
|
+++ b/com/mojang/blaze3d/vertex/VertexFormat.java
|
|
@@ -176,4 +_,11 @@
|
|
return i;
|
|
}
|
|
}
|
|
+
|
|
+ public ImmutableMap<String, VertexFormatElement> getElementMapping() { return elementMapping; }
|
|
+ public int getOffset(int index) { return offsets.getInt(index); }
|
|
+ public boolean hasPosition() { return elements.stream().anyMatch(e -> e.getUsage() == VertexFormatElement.Usage.POSITION); }
|
|
+ public boolean hasNormal() { return elements.stream().anyMatch(e -> e.getUsage() == VertexFormatElement.Usage.NORMAL); }
|
|
+ public boolean hasColor() { return elements.stream().anyMatch(e -> e.getUsage() == VertexFormatElement.Usage.COLOR); }
|
|
+ public boolean hasUV(int which) { return elements.stream().anyMatch(e -> e.getUsage() == VertexFormatElement.Usage.UV && e.getIndex() == which); }
|
|
}
|