@@ -0,0 +1,2384 @@
+package com.matt.forgehax.mods;%0A%0Aimport com.matt.forgehax.events.RenderEvent;%0Aimport com.matt.forgehax.util.color.Colors;%0Aimport com.matt.forgehax.util.command.Setting;%0Aimport com.matt.forgehax.util.mod.Category;%0Aimport com.matt.forgehax.util.mod.ToggleMod;%0Aimport com.matt.forgehax.util.mod.loader.RegisterMod;%0Aimport com.matt.forgehax.util.tesselation.GeometryMasks;%0Aimport com.matt.forgehax.util.tesselation.GeometryTessellator;%0Aimport net.minecraft.client.renderer.vertex.DefaultVertexFormats;%0Aimport net.minecraft.util.math.BlockPos;%0Aimport net.minecraftforge.fml.common.eventhandler.SubscribeEvent;%0Aimport org.lwjgl.opengl.GL11;%0A%0A@RegisterMod%0Apublic class RegionBorder extends ToggleMod %7B%0A%0A%0A  private final Setting%3CInteger%3E chunkDistance =%0A    getCommandStub()%0A      .builders()%0A      .%3CInteger%3EnewSettingBuilder()%0A      .name(%22chunk-distance%22)%0A      .description(%22how many chunks in front of the region the border should be drawn. I you don't want it just set it to 0 so it is like the normal region border.%22)%0A      .defaultTo(5)%0A      .build();%0A%0A  private final Setting%3CBoolean%3E drawRegionBorder = getCommandStub().builders().%3CBoolean%3EnewSettingBuilder()%0A    .name(%22draw-region-border%22)%0A    .description(%22whether you even want to draw the actual region border.%22)%0A    .defaultTo(true)%0A    .build();%0A%0A%0A  public RegionBorder() %7B%0A    super(Category.RENDER, %22RegionBorder%22, false, %22Shows a border in front of the edge of the region you are in.%22);%0A  %7D%0A%0A  /**%0A   * to draw the border%0A   * @param event%0A   */%0A  @SubscribeEvent%0A  public void onRender(RenderEvent event) %7B%0A    event.getBuffer().begin(GL11.GL_LINES, DefaultVertexFormats.POSITION_COLOR);%0A%0A    BlockPos from = new BlockPos((((int) MC.player.posX) / 512) * 512, 0, (((int) MC.player.posZ) / 512) * 512);%0A    BlockPos to = from.add(511, 256, 511);%0A%0A    int color = Colors.ORANGE.toBuffer();%0A    if(drawRegionBorder.getAsBoolean()) %7B%0A      GeometryTessellator.drawCuboid(event.getBuffer(), from, to, GeometryMasks.Line.ALL, color);%0A    %7D%0A%0A    final int chunkDistanceSetting = chunkDistance.getAsInteger() * 16;%0A    from = from.add(chunkDistanceSetting, 0, chunkDistanceSetting);%0A    to = to.add(-chunkDistanceSetting, 0, -chunkDistanceSetting);%0A%0A    color = Colors.YELLOW.toBuffer();%0A    GeometryTessellator.drawCuboid(event.getBuffer(), from, to, GeometryMasks.Line.ALL, color);%0A%0A    event.getTessellator().draw();%0A  %7D%0A%0A%7D%0A%0A

Add RegionBorder mod