make code pretty and use case statements thanks to darkis feedback

This commit is contained in:
Bella 2020-01-13 08:52:09 -05:00
parent 267e29cb74
commit 0588ffde84
1 changed files with 25 additions and 14 deletions

View File

@ -121,21 +121,32 @@ public class HoleESP extends Module {
} }
KamiTessellator.prepare(GL11.GL_QUADS); KamiTessellator.prepare(GL11.GL_QUADS);
safeHoles.forEach((blockPos, isBedrock) -> {
safeHoles.forEach((blockPos, isBedrock) -> { switch (renderBlocksSetting.getValue()) {
if (isBedrock && renderBlocksSetting.getValue().equals(RenderBlocks.BEDROCK)) { case BOTH: {
drawBox(blockPos, r2.getValue(), g2.getValue(), b2.getValue()); if (isBedrock) {
} else if (!isBedrock && renderBlocksSetting.getValue().equals(RenderBlocks.OBBY)){ drawBox(blockPos, r2.getValue(), g2.getValue(), b2.getValue());
drawBox(blockPos, r1.getValue(), g1.getValue(), b1.getValue()); }
} else if (isBedrock && renderBlocksSetting.getValue().equals(RenderBlocks.BOTH)) { else {
drawBox(blockPos, r2.getValue(), g2.getValue(), b2.getValue()); drawBox(blockPos, r1.getValue(), g1.getValue(), b1.getValue());
} else if (!isBedrock && renderBlocksSetting.getValue().equals(RenderBlocks.BOTH)) { }
drawBox(blockPos, r1.getValue(), g1.getValue(), b1.getValue()); break;
} }
}); case OBBY: {
if (!isBedrock) {
drawBox(blockPos, r1.getValue(), g1.getValue(), b1.getValue());
}
break;
}
case BEDROCK: {
if (isBedrock) {
drawBox(blockPos, r2.getValue(), g2.getValue(), b2.getValue());
}
break;
}
}
});
KamiTessellator.release(); KamiTessellator.release();
} }
private void drawBox(BlockPos blockPos, int r, int g, int b) { private void drawBox(BlockPos blockPos, int r, int g, int b) {