Esempio n. 1
0
    @SideOnly(Side.CLIENT)
    private void updateEffects(MovingObjectPosition res, boolean isGood) {
      double x, y, z;
      if (res != null) {
        x = res.hitVec.xCoord;
        y = res.hitVec.yCoord;
        z = res.hitVec.zCoord;
        if (res.typeOfHit == MovingObjectType.ENTITY) {
          y += res.entityHit.getEyeHeight();
        }
      } else {
        Motion3D mo = new Motion3D(player, true).move(DISTANCE);
        x = mo.px;
        y = mo.py;
        z = mo.pz;
      }
      arc.setFromTo(
          player.posX, player.posY + ACRenderingHelper.getHeightFix(player), player.posZ, x, y, z);

      if (isGood) {
        surround.updatePos(res.blockX + 0.5, res.blockY, res.blockZ + 0.5);
        surround.draw = true;
      } else {
        surround.draw = false;
      }
    }
  private static void drawBox(double x, double y, double width, double height) {
    BG_COLOR.bind();
    HudUtils.colorRect(x, y, width, height);

    ACRenderingHelper.drawGlow(x, y, width, height, GLOW_SIZE, GLOW_COLOR);
  }