@@ -53,6 +53,7 @@ public class DungeonMap {
5353 private static final ResourceLocation GREEN_CHECK = new ResourceLocation ("notenoughupdates:dungeon_map/green_check.png" );
5454 private static final ResourceLocation WHITE_CHECK = new ResourceLocation ("notenoughupdates:dungeon_map/white_check.png" );
5555 private static final ResourceLocation QUESTION = new ResourceLocation ("notenoughupdates:dungeon_map/question.png" );
56+ private static final ResourceLocation CROSS = new ResourceLocation ("notenoughupdates:dungeon_map/cross.png" );
5657
5758 private static final ResourceLocation ROOM_RED = new ResourceLocation ("notenoughupdates:dungeon_map/rooms_default/red_room.png" );
5859 private static final ResourceLocation ROOM_BROWN = new ResourceLocation ("notenoughupdates:dungeon_map/rooms_default/brown_room.png" );
@@ -187,6 +188,8 @@ public void renderNoRotate(int roomSize, int connectorSize, int rotation) {
187188 indicatorTex = GREEN_CHECK ;
188189 } else if (tick .getRed () == 13 && tick .getGreen () == 13 && tick .getBlue () == 13 ) {
189190 indicatorTex = QUESTION ;
191+ } else if (tick .getRed () == 255 && tick .getGreen () == 0 && tick .getBlue () == 0 ) {
192+ indicatorTex = CROSS ;
190193 }
191194 if (indicatorTex != null ) {
192195 Minecraft .getMinecraft ().getTextureManager ().bindTexture (indicatorTex );
@@ -353,12 +356,14 @@ private static void upload(Shader shader, int width, int height, int scale, floa
353356
354357 public int getRenderRoomSize () {
355358 int roomSizeOption = NotEnoughUpdates .INSTANCE .manager .config .dmRoomSize .value .intValue ();
356- return roomSizeOption == 0 ? 12 : roomSizeOption == 2 ? 20 : 16 ;
359+ if (roomSizeOption <= 0 ) return 12 ;
360+ return 12 + roomSizeOption *4 ;
357361 }
358362
359363 public int getRenderConnSize () {
360364 int roomSizeOption = NotEnoughUpdates .INSTANCE .manager .config .dmRoomSize .value .intValue ();
361- return roomSizeOption == 0 ? 3 : roomSizeOption == 2 ? 5 : 4 ;
365+ if (roomSizeOption <= 0 ) return 3 ;
366+ return 3 + roomSizeOption ;
362367 }
363368
364369 private HashMap <Integer , Float > borderRadiusCache = new HashMap <>();
@@ -429,8 +434,8 @@ public void render(int centerX, int centerY) {
429434 rotation = (int )playerPos .rotation ;
430435 }
431436
432- int mapSizeX = borderSizeOption == 0 ? 90 : borderSizeOption == 2 ? 160 : 120 ;
433- int mapSizeY = borderSizeOption == 0 ? 90 : borderSizeOption == 2 ? 160 : 120 ;
437+ int mapSizeX = borderSizeOption == 0 ? 90 : borderSizeOption == 2 ? 160 : borderSizeOption == 3 ? 240 : 120 ;
438+ int mapSizeY = borderSizeOption == 0 ? 90 : borderSizeOption == 2 ? 160 : borderSizeOption == 3 ? 240 : 120 ;
434439 int roomsSizeX = (maxRoomX -minRoomX )*(renderRoomSize +renderConnSize )+renderRoomSize ;
435440 int roomsSizeY = (maxRoomY -minRoomY )*(renderRoomSize +renderConnSize )+renderRoomSize ;
436441 int mapCenterX = mapSizeX /2 ;
@@ -588,7 +593,7 @@ public void render(int centerX, int centerY) {
588593 float deltaX = entityPos .getRenderX () - pos .getRenderX ();
589594 float deltaY = entityPos .getRenderY () - pos .getRenderY ();
590595
591- /* if(deltaX > (renderRoomSize + renderConnSize)/2) {
596+ if (deltaX > (renderRoomSize + renderConnSize )/2 ) {
592597 deltaX -= (renderRoomSize + renderConnSize );
593598 } else if (deltaX < -(renderRoomSize + renderConnSize )/2 ) {
594599 deltaX += (renderRoomSize + renderConnSize );
@@ -597,7 +602,7 @@ public void render(int centerX, int centerY) {
597602 deltaY -= (renderRoomSize + renderConnSize );
598603 } else if (deltaY < -(renderRoomSize + renderConnSize )/2 ) {
599604 deltaY += (renderRoomSize + renderConnSize );
600- }*/
605+ }
601606
602607 x += deltaX ;
603608 y += deltaY ;
@@ -636,13 +641,18 @@ public void render(int centerX, int centerY) {
636641 }
637642 }
638643
644+ boolean headLayer = false ;
639645 int pixelWidth = 8 ;
640646 int pixelHeight = 8 ;
647+ if (renderRoomSize >= 24 ) {
648+ pixelWidth = pixelHeight = 12 ;
649+ }
641650 GlStateManager .color (1 , 1 , 1 , 1 );
642651 if (NotEnoughUpdates .INSTANCE .manager .config .dmPlayerHeads .value >= 1 &&
643652 playerSkinMap .containsKey (entry .getKey ())) {
644653 Minecraft .getMinecraft ().getTextureManager ().bindTexture (playerSkinMap .get (entry .getKey ()));
645654
655+ headLayer = true ;
646656 if (NotEnoughUpdates .INSTANCE .manager .config .dmPlayerHeads .value >= 3 ) {
647657 minU = 9 /64f ;
648658 minV = 9 /64f ;
@@ -656,8 +666,8 @@ public void render(int centerX, int centerY) {
656666 }
657667
658668 if (NotEnoughUpdates .INSTANCE .manager .config .dmPlayerHeads .value >= 2 ) {
659- pixelWidth = 6 ;
660- pixelHeight = 6 ;
669+ pixelWidth = pixelWidth * 6 / 8 ;
670+ pixelHeight = pixelHeight * 6 / 8 ;
661671 }
662672 } else {
663673 Minecraft .getMinecraft ().getTextureManager ().bindTexture (mapIcons );
@@ -682,6 +692,14 @@ public void render(int centerX, int centerY) {
682692 worldrenderer .pos (-pixelWidth /2f , -pixelHeight /2f , 30 +((float )k * -0.005F )).tex (minU , maxV ).endVertex ();
683693 tessellator .draw ();
684694
695+ if (headLayer ) {
696+ worldrenderer .begin (7 , DefaultVertexFormats .POSITION_TEX );
697+ worldrenderer .pos (-pixelWidth /2f , pixelHeight /2f , 30 +((float )k * -0.005F )+0.001f ).tex (minU +0.5f , minV ).endVertex ();
698+ worldrenderer .pos (pixelWidth /2f , pixelHeight /2f , 30 +((float )k * -0.005F )+0.001f ).tex (maxU +0.5f , minV ).endVertex ();
699+ worldrenderer .pos (pixelWidth /2f , -pixelHeight /2f , 30 +((float )k * -0.005F )+0.001f ).tex (maxU +0.5f , maxV ).endVertex ();
700+ worldrenderer .pos (-pixelWidth /2f , -pixelHeight /2f , 30 +((float )k * -0.005F )+0.001f ).tex (minU +0.5f , maxV ).endVertex ();
701+ tessellator .draw ();
702+ }
685703 GlStateManager .popMatrix ();
686704 k --;
687705 }
@@ -775,7 +793,7 @@ public void render(int centerX, int centerY) {
775793 Minecraft .getMinecraft ().getTextureManager ().bindTexture (rl );
776794 GlStateManager .color (1 , 1 , 1 , 1 );
777795
778- int size = borderSizeOption == 0 ? 165 : borderSizeOption == 2 ? 300 : 220 ;
796+ int size = borderSizeOption == 0 ? 165 : borderSizeOption == 2 ? 300 : borderSizeOption == 3 ? 440 : 220 ;
779797 Utils .drawTexturedRect (-size /2 , -size /2 , size , size , GL11 .GL_NEAREST );
780798 }
781799
@@ -1308,6 +1326,12 @@ public void onRenderOverlay(RenderGameOverlayEvent event) {
13081326 if (SBInfo .getInstance ().getLocation () == null || !SBInfo .getInstance ().getLocation ().equals ("dungeon" )) {
13091327 return ;
13101328 }
1329+ if (Minecraft .getMinecraft ().gameSettings .showDebugInfo ||
1330+ (Minecraft .getMinecraft ().gameSettings .keyBindPlayerList .isKeyDown () &&
1331+ (!Minecraft .getMinecraft ().isIntegratedServerRunning () ||
1332+ Minecraft .getMinecraft ().thePlayer .sendQueue .getPlayerInfoMap ().size () > 1 ))) {
1333+ return ;
1334+ }
13111335
13121336 ItemStack stack = Minecraft .getMinecraft ().thePlayer .inventory .mainInventory [8 ];
13131337 boolean holdingBow = stack != null && stack .getItem () == Items .arrow ;
0 commit comments