use of net.wurstclient.commands.PathCmd in project Wurst7 by Wurst-Imperium.
the class ProtectHack method onRender.
@Override
public void onRender(MatrixStack matrixStack, float partialTicks) {
if (!useAi.isChecked())
return;
PathCmd pathCmd = WURST.getCmds().pathCmd;
pathFinder.renderPath(matrixStack, pathCmd.isDebugMode(), pathCmd.isDepthTest());
}
use of net.wurstclient.commands.PathCmd in project Wurst7 by Wurst-Imperium.
the class FollowHack method onRender.
@Override
public void onRender(MatrixStack matrixStack, float partialTicks) {
PathCmd pathCmd = WURST.getCmds().pathCmd;
RenderSystem.setShader(GameRenderer::getPositionShader);
pathFinder.renderPath(matrixStack, pathCmd.isDebugMode(), pathCmd.isDepthTest());
}
use of net.wurstclient.commands.PathCmd in project Wurst7 by Wurst-Imperium.
the class FightBotHack method onRender.
@Override
public void onRender(MatrixStack matrixStack, float partialTicks) {
PathCmd pathCmd = WURST.getCmds().pathCmd;
RenderSystem.setShader(GameRenderer::getPositionShader);
pathFinder.renderPath(matrixStack, pathCmd.isDebugMode(), pathCmd.isDepthTest());
}
use of net.wurstclient.commands.PathCmd in project Wurst7 by Wurst-Imperium.
the class TreeBotHack method onRender.
@Override
public void onRender(MatrixStack matrixStack, float partialTicks) {
RenderSystem.setShader(GameRenderer::getPositionShader);
PathCmd pathCmd = WURST.getCmds().pathCmd;
if (treeFinder != null)
treeFinder.renderPath(matrixStack, pathCmd.isDebugMode(), pathCmd.isDepthTest());
if (angleFinder != null)
angleFinder.renderPath(matrixStack, pathCmd.isDebugMode(), pathCmd.isDepthTest());
// GL settings
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glEnable(GL11.GL_LINE_SMOOTH);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glDisable(GL11.GL_DEPTH_TEST);
if (tree != null)
drawTree(matrixStack);
if (currentBlock != null)
drawCurrentBlock(matrixStack, partialTicks);
// GL resets
RenderSystem.setShaderColor(1, 1, 1, 1);
GL11.glEnable(GL11.GL_DEPTH_TEST);
GL11.glDisable(GL11.GL_BLEND);
GL11.glDisable(GL11.GL_LINE_SMOOTH);
}
use of net.wurstclient.commands.PathCmd in project Wurst7 by Wurst-Imperium.
the class ExcavatorHack method onRender.
@Override
public void onRender(MatrixStack matrixStack, float partialTicks) {
if (pathFinder != null) {
PathCmd pathCmd = WURST.getCmds().pathCmd;
pathFinder.renderPath(matrixStack, pathCmd.isDebugMode(), pathCmd.isDepthTest());
}
// scale and offset
float scale = 7F / 8F;
double offset = (1D - scale) / 2D;
// GL settings
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glEnable(GL11.GL_LINE_SMOOTH);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glDisable(GL11.GL_DEPTH_TEST);
matrixStack.push();
RenderUtils.applyRenderOffset(matrixStack);
RenderSystem.setShader(GameRenderer::getPositionShader);
// area
if (area != null) {
GL11.glEnable(GL11.GL_DEPTH_TEST);
// recently scanned blocks
if (step == Step.SCAN_AREA && area.progress < 1)
for (int i = Math.max(0, area.blocksList.size() - area.scanSpeed); i < area.blocksList.size(); i++) {
BlockPos pos = area.blocksList.get(i);
matrixStack.push();
matrixStack.translate(pos.getX(), pos.getY(), pos.getZ());
matrixStack.translate(-0.005, -0.005, -0.005);
matrixStack.scale(1.01F, 1.01F, 1.01F);
RenderSystem.setShaderColor(0F, 1F, 0F, 0.15F);
RenderUtils.drawSolidBox(matrixStack);
RenderSystem.setShaderColor(0F, 0F, 0F, 0.5F);
RenderUtils.drawOutlinedBox(matrixStack);
matrixStack.pop();
}
matrixStack.push();
matrixStack.translate(area.minX + offset, area.minY + offset, area.minZ + offset);
matrixStack.scale(area.sizeX + scale, area.sizeY + scale, area.sizeZ + scale);
// area scanner
if (area.progress < 1) {
matrixStack.push();
matrixStack.translate(0, 0, area.progress);
matrixStack.scale(1, 1, 0);
RenderSystem.setShaderColor(0F, 1F, 0F, 0.3F);
RenderUtils.drawSolidBox(matrixStack);
RenderSystem.setShaderColor(0F, 0F, 0F, 0.5F);
RenderUtils.drawOutlinedBox(matrixStack);
matrixStack.pop();
}
// area box
RenderSystem.setShaderColor(0F, 0F, 0F, 0.5F);
RenderUtils.drawOutlinedBox(matrixStack);
matrixStack.pop();
GL11.glDisable(GL11.GL_DEPTH_TEST);
}
// selected positions
for (Step step : Step.SELECT_POSITION_STEPS) {
BlockPos pos = step.pos;
if (pos == null)
continue;
matrixStack.push();
matrixStack.translate(pos.getX(), pos.getY(), pos.getZ());
matrixStack.translate(offset, offset, offset);
matrixStack.scale(scale, scale, scale);
RenderSystem.setShaderColor(0F, 1F, 0F, 0.15F);
RenderUtils.drawSolidBox(matrixStack);
RenderSystem.setShaderColor(0F, 0F, 0F, 0.5F);
RenderUtils.drawOutlinedBox(matrixStack);
matrixStack.pop();
}
// area preview
if (area == null && step == Step.END_POS && step.pos != null) {
Area preview = new Area(Step.START_POS.pos, Step.END_POS.pos);
GL11.glEnable(GL11.GL_DEPTH_TEST);
// area box
matrixStack.push();
matrixStack.translate(preview.minX + offset, preview.minY + offset, preview.minZ + offset);
matrixStack.scale(preview.sizeX + scale, preview.sizeY + scale, preview.sizeZ + scale);
RenderSystem.setShaderColor(0F, 0F, 0F, 0.5F);
RenderUtils.drawOutlinedBox(matrixStack);
matrixStack.pop();
GL11.glDisable(GL11.GL_DEPTH_TEST);
}
// posLookingAt
if (posLookingAt != null) {
matrixStack.push();
matrixStack.translate(posLookingAt.getX(), posLookingAt.getY(), posLookingAt.getZ());
matrixStack.translate(offset, offset, offset);
matrixStack.scale(scale, scale, scale);
RenderSystem.setShader(GameRenderer::getPositionShader);
RenderSystem.setShaderColor(0.25F, 0.25F, 0.25F, 0.15F);
RenderUtils.drawSolidBox(matrixStack);
RenderSystem.setShaderColor(0F, 0F, 0F, 0.5F);
RenderUtils.drawOutlinedBox(matrixStack);
matrixStack.pop();
}
// currentBlock
if (currentBlock != null) {
// set position
matrixStack.translate(currentBlock.getX(), currentBlock.getY(), currentBlock.getZ());
// get progress
float progress;
if (BlockUtils.getHardness(currentBlock) < 1)
progress = IMC.getInteractionManager().getCurrentBreakingProgress();
else
progress = 1;
// set size
if (progress < 1) {
matrixStack.translate(0.5, 0.5, 0.5);
matrixStack.scale(progress, progress, progress);
matrixStack.translate(-0.5, -0.5, -0.5);
}
// get color
float red = progress * 2F;
float green = 2 - red;
// draw box
RenderSystem.setShaderColor(red, green, 0, 0.25F);
RenderUtils.drawSolidBox(matrixStack);
RenderSystem.setShaderColor(red, green, 0, 0.5F);
RenderUtils.drawOutlinedBox(matrixStack);
}
matrixStack.pop();
// GL resets
GL11.glEnable(GL11.GL_DEPTH_TEST);
GL11.glDisable(GL11.GL_BLEND);
GL11.glDisable(GL11.GL_LINE_SMOOTH);
}
Aggregations