WireframeLines extends WireframeShape { public WireframeLines setRenderCap(int renderCap) { this.renderCap = renderCap; return this; } WireframeLines(Vector3 origin, Iterable<ReadonlyVector3> relativePoints);  WireframeLines(Iterable<ReadonlyVector3> absolutePoints); Iterable<ReadonlyVector3> getPoints(); WireframeLines setPoints(Iterable<ReadonlyVector3> points); int getRenderCap(); WireframeLines setRenderCap(int renderCap); @Override ReadonlyVector3 getOriginReadonly();  }
@Test public void testRender() { MockMinecraftAccess mc = new MockMinecraftAccess(); ArrayList<ReadonlyVector3> arr = new ArrayList<ReadonlyVector3>(); for (boolean seeThru : new boolean[] {true, false}) { arr.clear(); WireframeLines shape = new WireframeLines(arr); shape.setLineStyle(Color.WHITE.copy(), 1.0F, seeThru); assertEquals(seeThru, shape.isVisibleThroughTerrain()); mc.reset(); shape.render(mc); mc.assertCountsEqual(0, 0, seeThru); shape.render(mc); shape.render(mc); shape.render(mc); mc.assertCountsEqual(0, 0, seeThru); arr.add(new Vector3(0.0, 5.5, -12.5)); mc.reset(); shape.render(mc); mc.assertCountsEqual(1, 1, seeThru); shape.render(mc); shape.render(mc); shape.render(mc); mc.assertCountsEqual(4, 4, seeThru); arr.add(new Vector3(7.0, 5.5, -12.5)); mc.reset(); shape.render(mc); mc.assertCountsEqual(1, 2, seeThru); shape.render(mc); shape.render(mc); shape.render(mc); mc.assertCountsEqual(4, 8, seeThru); arr.add(new Vector3(7.0, 15.5, -12.5)); mc.reset(); shape.render(mc); mc.assertCountsEqual(1, 3, seeThru); shape.render(mc); shape.render(mc); shape.render(mc); mc.assertCountsEqual(4, 12, seeThru); arr.add(new Vector3(7.0, 15.5, -6.5)); arr.add(new Vector3(7.0, 12.5, -3.5)); arr.add(new Vector3(17.0, 12.5, -3.5)); arr.add(new Vector3(17.0, 6.5, -3.5)); arr.add(new Vector3(12.0, 7.5, -3.5)); arr.add(new Vector3(10.0, 7.5, 3.5)); arr.add(new Vector3(10.0, 7.5, 6.0)); arr.add(new Vector3(20.0, 17.5, 6.0)); assertEquals(11, arr.size()); mc.reset(); shape.render(mc); mc.assertCountsEqual(1, 11, seeThru); shape.render(mc); shape.render(mc); shape.render(mc); mc.assertCountsEqual(4, 44, seeThru); shape.setRenderCap(5); mc.reset(); shape.render(mc); mc.assertCountsEqual(1, 6, seeThru); shape.render(mc); shape.render(mc); shape.render(mc); mc.assertCountsEqual(4, 24, seeThru); shape.setRenderCap(-1); mc.reset(); shape.render(mc); mc.assertCountsEqual(1, 11, seeThru); shape.render(mc); shape.render(mc); shape.render(mc); mc.assertCountsEqual(4, 44, seeThru); shape.setRenderCap(9001); mc.reset(); shape.render(mc); mc.assertCountsEqual(1, 11, seeThru); shape.render(mc); shape.render(mc); shape.render(mc); mc.assertCountsEqual(4, 44, seeThru); } }