Do not load clientside-only classes in serverside ShapeDispatcher code (#1642)
fixed use of client side classes in shape dispatcher
This commit is contained in:
1 parent
2133675ac7
commit
d49be89e23
2 files changed
+12
-14
No files matched your search
@@ -563,7 +563,7 @@ public class ShapesRenderer
|
||||
else
|
||||
RenderSystem.enableCull();
|
||||
|
||||
bufferBuilder.begin(shape.mode, DefaultVertexFormat.POSITION_COLOR);
|
||||
bufferBuilder.begin(VertexFormat.Mode.values()[shape.mode], DefaultVertexFormat.POSITION_COLOR);
|
||||
for(int i=0;i<shape.vertex_list.size();i++){
|
||||
Vec3 vec=shape.vertex_list.get(i);
|
||||
if(shape.relative.get(i)){
|
||||
@@ -585,7 +585,7 @@ public class ShapesRenderer
|
||||
double cz, float partialTick) {
|
||||
if(shape.a==0){return;}
|
||||
|
||||
if (shape.mode==Mode.TRIANGLE_FAN){
|
||||
if (shape.mode==6){
|
||||
builder.begin(VertexFormat.Mode.DEBUG_LINE_STRIP, DefaultVertexFormat.POSITION_COLOR);
|
||||
Vec3 vec0=null;
|
||||
for(int i=0;i<shape.vertex_list.size();i++){
|
||||
@@ -613,7 +613,7 @@ public class ShapesRenderer
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (shape.mode==Mode.TRIANGLE_STRIP){
|
||||
if (shape.mode==5){
|
||||
builder.begin(VertexFormat.Mode.DEBUG_LINE_STRIP, DefaultVertexFormat.POSITION_COLOR);
|
||||
Vec3 vec=shape.vertex_list.get(1);
|
||||
if(shape.relative.get(1)){
|
||||
@@ -648,7 +648,7 @@ public class ShapesRenderer
|
||||
tessellator.end();
|
||||
return;
|
||||
}
|
||||
if (shape.mode==Mode.TRIANGLES){
|
||||
if (shape.mode==4){
|
||||
builder.begin(VertexFormat.Mode.DEBUG_LINES, DefaultVertexFormat.POSITION_COLOR);
|
||||
for (int i=0;i<shape.vertex_list.size();i++){
|
||||
Vec3 vecA=shape.vertex_list.get(i);
|
||||
|
||||
Reference in new issue
Block a user