diff options
| author | BuildTools <james.jenour@protonmail.com> | 2021-01-24 17:11:22 +0800 |
|---|---|---|
| committer | BuildTools <james.jenour@protonmail.com> | 2021-01-24 17:11:22 +0800 |
| commit | 64959d248b383375274628b5e8d83cd7f9c4e96d (patch) | |
| tree | dc08ffe36b900b40e5e46cbd888986ab218a1152 /src/main/java/io | |
| parent | ca13cc0c881480a8d3f0d653eab937f336fd870e (diff) | |
| download | NotEnoughUpdates-64959d248b383375274628b5e8d83cd7f9c4e96d.tar.gz NotEnoughUpdates-64959d248b383375274628b5e8d83cd7f9c4e96d.tar.bz2 NotEnoughUpdates-64959d248b383375274628b5e8d83cd7f9c4e96d.zip | |
PRE10
Diffstat (limited to 'src/main/java/io')
21 files changed, 1202 insertions, 135 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java index 59d71520..4682a744 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java @@ -4,7 +4,6 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import io.github.moulberry.notenoughupdates.auction.CustomAHGui; -import io.github.moulberry.notenoughupdates.core.config.Position; import io.github.moulberry.notenoughupdates.cosmetics.CapeManager; import io.github.moulberry.notenoughupdates.dungeons.DungeonBlocks; import io.github.moulberry.notenoughupdates.dungeons.DungeonWin; @@ -12,8 +11,8 @@ import io.github.moulberry.notenoughupdates.gamemodes.SBGamemodes; import io.github.moulberry.notenoughupdates.miscfeatures.*; import io.github.moulberry.notenoughupdates.miscgui.*; import io.github.moulberry.notenoughupdates.profileviewer.GuiProfileViewer; -import io.github.moulberry.notenoughupdates.textoverlays.TextOverlay; -import io.github.moulberry.notenoughupdates.textoverlays.TextOverlayStyle; +import io.github.moulberry.notenoughupdates.overlays.TextOverlay; +import io.github.moulberry.notenoughupdates.overlays.TextOverlayStyle; import io.github.moulberry.notenoughupdates.util.Constants; import io.github.moulberry.notenoughupdates.util.RequestFocusListener; import io.github.moulberry.notenoughupdates.util.SBInfo; @@ -176,6 +175,7 @@ public class NEUEventListener { CrystalOverlay.tick(); DwarvenMinesTextures.tick(); FairySouls.tick(); + MiningStuff.tick(); for(TextOverlay overlay : textOverlays) { overlay.tick(); } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java index 12a95484..9012e67e 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java @@ -1512,6 +1512,8 @@ public class NEUOverlay extends Gui { * is enabled) */ public void renderOverlay() { + GlStateManager.enableDepth(); + int width = Utils.peekGuiScale().getScaledWidth(); int height = Utils.peekGuiScale().getScaledHeight(); int mouseX = Mouse.getX() * width / Minecraft.getMinecraft().displayWidth; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java index ad42fcfd..f2f41b17 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java @@ -24,6 +24,7 @@ import io.github.moulberry.notenoughupdates.miscgui.HelpGUI; import io.github.moulberry.notenoughupdates.miscgui.NEUOverlayPlacements; import io.github.moulberry.notenoughupdates.options.NEUConfig; import io.github.moulberry.notenoughupdates.options.NEUConfigEditor; +import io.github.moulberry.notenoughupdates.overlays.FuelBar; import io.github.moulberry.notenoughupdates.profileviewer.GuiProfileViewer; import io.github.moulberry.notenoughupdates.profileviewer.PlayerStats; import io.github.moulberry.notenoughupdates.profileviewer.ProfileViewer; @@ -80,8 +81,8 @@ import java.util.regex.Pattern; @Mod(modid = NotEnoughUpdates.MODID, version = NotEnoughUpdates.VERSION, clientSideOnly = true) public class NotEnoughUpdates { public static final String MODID = "notenoughupdates"; - public static final String VERSION = "1.7.1-REL"; - public static final int VERSION_ID = 10701; + public static final String VERSION = "2.0.0-REL"; + public static final int VERSION_ID = 20000; public static NotEnoughUpdates INSTANCE = null; @@ -767,7 +768,7 @@ public class NotEnoughUpdates { if (j / 4 == 0) { c = new Color((i + i / 128 & 1) * 8 + 16 << 24, true); } else { - c = new Color(MapColor.mapColorArray[j / 4].func_151643_b(j & 3), true); + c = new Color(MapColor.mapColorArray[j / 4].getMapColor(j & 3), true); } json.addProperty(x+":"+y, c.getRGB()); @@ -906,6 +907,8 @@ public class NotEnoughUpdates { MinecraftForge.EVENT_BUS.register(new CrystalOverlay()); MinecraftForge.EVENT_BUS.register(new ItemCooldowns()); MinecraftForge.EVENT_BUS.register(new DwarvenMinesTextures()); + MinecraftForge.EVENT_BUS.register(new DwarvenMinesWaypoints()); + MinecraftForge.EVENT_BUS.register(new FuelBar()); ClientCommandHandler.instance.registerCommand(collectionLogCommand); ClientCommandHandler.instance.registerCommand(cosmeticsCommand); @@ -1057,7 +1060,6 @@ public class NotEnoughUpdates { //Stolen from Biscut's SkyblockAddons public void updateSkyblockScoreboard() { final Pattern SERVER_BRAND_PATTERN = Pattern.compile("(.+) <- (?:.+)"); - final String HYPIXEL_SERVER_BRAND = "BungeeCord (Hypixel)"; Minecraft mc = Minecraft.getMinecraft(); @@ -1067,7 +1069,7 @@ public class NotEnoughUpdates { if (matcher.find()) { // Group 1 is the server brand. - if(!matcher.group(1).equals(HYPIXEL_SERVER_BRAND)) { + if(!matcher.group(1).toLowerCase().contains("hypixel")) { hasSkyblockScoreboard = false; return; } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/Position.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/Position.java index b30aa680..3bd4e9d2 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/Position.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/Position.java @@ -9,16 +9,34 @@ public class Position { private int x; @Expose private int y; + @Expose + private boolean centerX; + @Expose + private boolean centerY; public Position(int x, int y) { + this(x, y, false, false); + } + + public Position(int x, int y, boolean centerX, boolean centerY) { this.x = x; this.y = y; + this.centerX = centerX; + this.centerY = centerY; } public Position clone() { return new Position(x, y); } + public boolean isCenterX() { + return centerX; + } + + public boolean isCenterY() { + return centerY; + } + public int getRawX() { return x; } @@ -28,19 +46,39 @@ public class Position { } public int getAbsX(ScaledResolution scaledResolution) { + int width = scaledResolution.getScaledWidth(); + + if(centerX) { + return width/2 + x; + } + + int ret = x; if(x < 0) { - return scaledResolution.getScaledWidth() + x; - } else { - return x; + ret = width + x; } + + if(ret < 0) ret = 0; + if(ret > width) ret = width; + + return ret; } public int getAbsY(ScaledResolution scaledResolution) { + int height = scaledResolution.getScaledHeight(); + + if(centerY) { + return height/2 + y; + } + + int ret = y; if(y < 0) { - return scaledResolution.getScaledHeight() + y; - } else { - return y; + ret = height + y; } + + if(ret < 0) ret = 0; + if(ret > height) ret = height; + + return ret; } public int moveX(int deltaX, int objWidth, ScaledResolution scaledResolution) { @@ -48,6 +86,21 @@ public class Position { boolean wasPositiveX = this.x >= 0; this.x += deltaX; + if(centerX) { + if(wasPositiveX) { + if(this.x > screenWidth/2-objWidth) { + deltaX += screenWidth/2-objWidth-this.x; + this.x = screenWidth/2-objWidth; + } + } else { + if(this.x < -screenWidth/2) { + deltaX += -screenWidth/2-this.x; + this.x = -screenWidth/2; + } + } + return deltaX; + } + if(wasPositiveX) { if(this.x < 2) { deltaX += 2-this.x; @@ -82,6 +135,21 @@ public class Position { boolean wasPositiveY = this.y >= 0; this.y += deltaY; + if(centerY) { + if(wasPositiveY) { + if(this.y > screenHeight/2-objHeight) { + deltaY += screenHeight/2-objHeight-this.y; + this.y = screenHeight/2-objHeight; + } + } else { + if(this.y < -screenHeight/2) { + deltaY += -screenHeight/2-this.y; + this.y = -screenHeight/2; + } + } + return deltaY; + } + if(wasPositiveY) { if(this.y < 2) { deltaY += 2-this.y; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiPositionEditor.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiPositionEditor.java index 117a97bd..c5b6b3d8 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiPositionEditor.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiPositionEditor.java @@ -2,10 +2,12 @@ package io.github.moulberry.notenoughupdates.core.config.gui; import io.github.moulberry.notenoughupdates.core.config.Position; import io.github.moulberry.notenoughupdates.core.util.render.RenderUtils; +import io.github.moulberry.notenoughupdates.util.Utils; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Gui; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.ScaledResolution; +import org.lwjgl.input.Mouse; import java.io.IOException; @@ -25,6 +27,8 @@ public class GuiPositionEditor extends GuiScreen { private int oldMouseX = 0; private int oldMouseY = 0; + private int guiScaleOverride = -1; + public GuiPositionEditor(Position position, int elementWidth, int elementHeight, Runnable renderCallback, Runnable positionChangedCallback, @@ -38,6 +42,11 @@ public class GuiPositionEditor extends GuiScreen { this.closedCallback = closedCallback; } + public GuiPositionEditor withScale(int scale) { + this.guiScaleOverride = scale; + return this; + } + @Override public void onGuiClosed() { super.onGuiClosed(); @@ -47,10 +56,18 @@ public class GuiPositionEditor extends GuiScreen { @Override public void drawScreen(int mouseX, int mouseY, float partialTicks) { super.drawScreen(mouseX, mouseY, partialTicks); - ScaledResolution scaledResolution = new ScaledResolution(Minecraft.getMinecraft()); + ScaledResolution scaledResolution; + if(guiScaleOverride >= 0) { + scaledResolution = Utils.pushGuiScale(guiScaleOverride); + } else { + scaledResolution = new ScaledResolution(Minecraft.getMinecraft()); + } + this.width = scaledResolution.getScaledWidth(); this.height = scaledResolution.getScaledHeight(); + mouseX = Mouse.getX() * width / Minecraft.getMinecraft().displayWidth; + mouseY = height - Mouse.getY() * height / Minecraft.getMinecraft().displayHeight - 1; drawDefaultBackground(); @@ -64,7 +81,13 @@ public class GuiPositionEditor extends GuiScreen { int x = position.getAbsX(scaledResolution); int y = position.getAbsY(scaledResolution); + if(position.isCenterX()) x -= elementWidth/2; + if(position.isCenterY()) y -= elementHeight/2; Gui.drawRect(x, y, x+elementWidth, y+elementHeight, 0x80404040); + + if(guiScaleOverride >= 0) { + Utils.pushGuiScale(-1); + } } @Override @@ -72,10 +95,19 @@ public class GuiPositionEditor extends GuiScreen { super.mouseClicked(mouseX, mouseY, mouseButton); if(mouseButton == 0) { - ScaledResolution scaledResolution = new ScaledResolution(Minecraft.getMinecraft()); + ScaledResolution scaledResolution; + if(guiScaleOverride >= 0) { + scaledResolution = Utils.pushGuiScale(guiScaleOverride); + } else { + scaledResolution = new ScaledResolution(Minecraft.getMinecraft()); + } + mouseX = Mouse.getX() * width / Minecraft.getMinecraft().displayWidth; + mouseY = height - Mouse.getY() * height / Minecraft.getMinecraft().displayHeight - 1; int x = position.getAbsX(scaledResolution); int y = position.getAbsY(scaledResolution); + if(position.isCenterX()) x -= elementWidth/2; + if(position.isCenterY()) y -= elementHeight/2; if(mouseX >= x && mouseY >= y && mouseX <= x+elementWidth && mouseY <= y+elementHeight) { @@ -83,6 +115,10 @@ public class GuiPositionEditor extends GuiScreen { grabbedX = mouseX; grabbedY = mouseY; } + + if(guiScaleOverride >= 0) { + Utils.pushGuiScale(-1); + } } } @@ -96,14 +132,26 @@ public class GuiPositionEditor extends GuiScreen { protected void mouseClickMove(int mouseX, int mouseY, int clickedMouseButton, long timeSinceLastClick) { super.mouseClickMove(mouseX, mouseY, clickedMouseButton, timeSinceLastClick); - ScaledResolution scaledResolution = new ScaledResolution(Minecraft.getMinecraft()); if(clicked) { + ScaledResolution scaledResolution; + if(guiScaleOverride >= 0) { + scaledResolution = Utils.pushGuiScale(guiScaleOverride); + } else { + scaledResolution = new ScaledResolution(Minecraft.getMinecraft()); + } + mouseX = Mouse.getX() * width / Minecraft.getMinecraft().displayWidth; + mouseY = height - Mouse.getY() * height / Minecraft.getMinecraft().displayHeight - 1; + oldMouseX = mouseX; oldMouseY = mouseY; grabbedX += position.moveX(mouseX - grabbedX, elementWidth, scaledResolution); grabbedY += position.moveY(mouseY - grabbedY, elementHeight, scaledResolution); positionChangedCallback.run(); + + if(guiScaleOverride >= 0) { + Utils.pushGuiScale(-1); + } } } } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonMap.java b/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonMap.java index be2b030a..993eb78b 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonMap.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonMap.java @@ -1400,7 +1400,7 @@ public class DungeonMap { if (j / 4 == 0) { c = new Color((i + i / 128 & 1) * 8 + 16 << 24, true); } else { - c = new Color(MapColor.mapColorArray[j / 4].func_151643_b(j & 3), true); + c = new Color(MapColor.mapColorArray[j / 4].getMapColor(j & 3), true); } colourMap[x][y] = c; @@ -1469,8 +1469,10 @@ public class DungeonMap { Position pos = NotEnoughUpdates.INSTANCE.config.dungeonMap.dmPosition; int size = 80 + Math.round(40*NotEnoughUpdates.INSTANCE.config.dungeonMap.dmBorderSize); - renderMap(pos.getAbsX(event.resolution)+size/2, pos.getAbsY(event.resolution)+size/2, + ScaledResolution scaledResolution = Utils.pushGuiScale(2); + renderMap(pos.getAbsX(scaledResolution)+size/2, pos.getAbsY(scaledResolution)+size/2, colourMap, decorations, roomSizeBlocks, actualPlayers, true, event.partialTicks); + Utils.pushGuiScale(-1); } } } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/dungeons/GuiDungeonMapEditor.java b/src/main/java/io/github/moulberry/notenoughupdates/dungeons/GuiDungeonMapEditor.java index cd951830..041cd842 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/dungeons/GuiDungeonMapEditor.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/dungeons/GuiDungeonMapEditor.java @@ -353,11 +353,11 @@ public class GuiDungeonMapEditor extends GuiScreen { Utils.drawHoveringText(tooltipToDisplay, mouseX, mouseY, width, height, 200, Minecraft.getMinecraft().fontRendererObj); } + Utils.pushGuiScale(-1); + if(activeColourEditor != null) { activeColourEditor.render(); } - - Utils.pushGuiScale(-1); } public void drawSlider(Field option, int centerX, int centerY) { @@ -474,18 +474,18 @@ public class GuiDungeonMapEditor extends GuiScreen { players.add(Minecraft.getMinecraft().thePlayer.getName()); GlStateManager.color(1, 1, 1, 1); - ScaledResolution scaledResolution = new ScaledResolution(Minecraft.getMinecraft()); - Minecraft.getMinecraft().displayGuiScreen(new GuiPositionEditor( NotEnoughUpdates.INSTANCE.config.dungeonMap.dmPosition, size, size, () -> { + ScaledResolution scaledResolution = Utils.pushGuiScale(2); demoMap.renderMap(NotEnoughUpdates.INSTANCE.config.dungeonMap.dmPosition.getAbsX(scaledResolution)+size/2, NotEnoughUpdates.INSTANCE.config.dungeonMap.dmPosition.getAbsY(scaledResolution)+size/2, NotEnoughUpdates.INSTANCE.colourMap, decorations, 0, players, false, 0); + Utils.pushGuiScale(-1); }, () -> { }, () -> NotEnoughUpdates.INSTANCE.openGui = new GuiDungeonMapEditor() - )); + ).withScale(2)); return; } } @@ -497,9 +497,10 @@ public class GuiDungeonMapEditor extends GuiScreen { public void handleMouseInput() throws IOException { super.handleMouseInput(); - int mouseX = Mouse.getEventX() * this.width / this.mc.displayWidth; - int mouseY = this.height - Mouse.getEventY() * this.height / this.mc.displayHeight - 1; if(activeColourEditor != null) { + ScaledResolution realRes = new ScaledResolution(Minecraft.getMinecraft()); + int mouseX = Mouse.getEventX() * realRes.getScaledWidth() / this.mc.displayWidth; + int mouseY = realRes.getScaledHeight() - Mouse.getEventY() * realRes.getScaledHeight() / this.mc.displayHeight - 1; activeColourEditor.mouseInput(mouseX, mouseY); } } @@ -567,13 +568,21 @@ public class GuiDungeonMapEditor extends GuiScreen { options.dmCompat++; if(options.dmCompat > 2) options.dmCompat = 0; break; - case 26: - activeColourEditor = new GuiElementColour(mouseX, mouseY, options.dmBackgroundColour, - (col) -> options.dmBackgroundColour = col, () -> activeColourEditor = null); + case 26: { + ScaledResolution realRes = new ScaledResolution(Minecraft.getMinecraft()); + mouseX = Mouse.getEventX() * realRes.getScaledWidth() / this.mc.displayWidth; + mouseY = realRes.getScaledHeight() - Mouse.getEventY() * realRes.getScaledHeight() / this.mc.displayHeight - 1; + activeColourEditor = new GuiElementColour(mouseX, mouseY, options.dmBackgroundColour, + (col) -> options.dmBackgroundColour = col, () -> activeColourEditor = null); + } break; - case 27: - activeColourEditor = new GuiElementColour(mouseX, mouseY, options.dmBorderColour, - (col) -> options.dmBorderColour = col, () -> activeColourEditor = null); + case 27: { + ScaledResolution realRes = new ScaledResolution(Minecraft.getMinecraft()); + mouseX = Mouse.getEventX() * realRes.getScaledWidth() / this.mc.displayWidth; + mouseY = realRes.getScaledHeight() - Mouse.getEventY() * realRes.getScaledHeight() / this.mc.displayHeight - 1; + activeColourEditor = new GuiElementColour(mouseX, mouseY, options.dmBorderColour, + (col) -> options.dmBorderColour = col, () -> activeColourEditor = null); + } break; case 28: options.dmChromaBorder = !options.dmChromaBorder; break; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CommissionOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CommissionOverlay.java index 33cf9c4b..decfbf3f 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CommissionOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CommissionOverlay.java @@ -6,8 +6,8 @@ import io.github.moulberry.notenoughupdates.NotEnoughUpdates; import io.github.moulberry.notenoughupdates.core.config.Position; import io.github.moulberry.notenoughupdates.core.util.StringUtils; import io.github.moulberry.notenoughupdates.core.util.lerp.LerpUtils; -import io.github.moulberry.notenoughupdates.textoverlays.TextOverlay; -import io.github.moulberry.notenoughupdates.textoverlays.TextOverlayStyle; +import io.github.moulberry.notenoughupdates.overlays.TextOverlay; +import io.github.moulberry.notenoughupdates.overlays.TextOverlayStyle; import io.github.moulberry.notenoughupdates.util.SBInfo; import net.minecraft.client.Minecraft; import net.minecraft.client.network.NetworkPlayerInfo; @@ -28,14 +28,17 @@ public class CommissionOverlay extends TextOverlay { super(position, styleSupplier); } + public static Map<String, Float> commissionProgress = new LinkedHashMap<>(); + @Override public void update() { - overlayStrings = new ArrayList<>(); + overlayStrings = null; if(SBInfo.getInstance().getLocation() == null) return; if(!SBInfo.getInstance().getLocation().equals("mining_3")) return; - Map<String, Float> commissionProgress = new LinkedHashMap<>(); + overlayStrings = new ArrayList<>(); + commissionProgress.clear(); List<String> forgeStrings = new ArrayList<>(); String mithrilPowder = null; @@ -44,7 +47,7 @@ public class CommissionOverlay extends TextOverlay { List<NetworkPlayerInfo> players = playerOrdering.sortedCopy(Minecraft.getMinecraft().thePlayer.sendQueue.getPlayerInfoMap()); for(NetworkPlayerInfo info : players) { String name = Minecraft.getMinecraft().ingameGUI.getTabList().getPlayerName(info); - if(name.contains("Mithril Powder")) { + if(name.contains("Mithril Powder:")) { mithrilPowder = trimIgnoreColour(name); } if(name.equals(RESET.toString()+BLUE+BOLD+"Forges"+RESET)) { diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesTextures.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesTextures.java index 4a639287..42712c39 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesTextures.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesTextures.java @@ -1,27 +1,232 @@ package io.github.moulberry.notenoughupdates.miscfeatures; +import com.google.gson.*; +import io.github.moulberry.notenoughupdates.NotEnoughUpdates; import io.github.moulberry.notenoughupdates.util.SBInfo; +import io.github.moulberry.notenoughupdates.util.SpecialColour; +import net.minecraft.block.BlockClay; +import net.minecraft.block.BlockColored; +import net.minecraft.block.BlockHardenedClay; +import net.minecraft.block.BlockStone; +import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.GlStateManager; +import net.minecraft.entity.Entity; +import net.minecraft.init.Blocks; +import net.minecraft.item.EnumDyeColor; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; +import net.minecraft.util.MathHelper; +import net.minecraft.util.ResourceLocation; import net.minecraft.world.ChunkCoordIntPair; import net.minecraft.world.biome.BiomeGenBase; +import net.minecraftforge.client.event.RenderWorldLastEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import org.lwjgl.input.Keyboard; +import org.lwjgl.input.Mouse; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Set; +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.util.*; public class DwarvenMinesTextures { - private static final byte biomeId1 = (byte)(BiomeGenBase.extremeHillsEdge.biomeID & 255); - private static final byte[] biomeMap1 = new byte[16*16]; - private static final byte biomeId2 = (byte)(BiomeGenBase.extremeHillsPlus.biomeID & 255); - private static final byte[] biomeMap2 = new byte[16*16]; - static { - Arrays.fill(biomeMap1, biomeId1); - Arrays.fill(biomeMap2, biomeId2); + /*private static final HashSet<BlockPos> blocks = new HashSet<>(); + private static final HashSet<ChunkCoordIntPair> ignoredChunks = new HashSet<>(); + private static final HashMap<ChunkCoordIntPair, HashMap<ChunkCoordIntPair, Set<BlockPos>>> ignoredBlocks = new HashMap<>( |
