From 6613e4ec42af657689ef56ae6f18161495a98f57 Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 23 Aug 2018 23:26:45 -0400 Subject: [PATCH] Generaor changes --- .../mindustry/maps/generation/WorldGenerator.java | 12 ++++-------- .../io/anuke/mindustry/desktop/DesktopPlatform.java | 6 +++--- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/core/src/io/anuke/mindustry/maps/generation/WorldGenerator.java b/core/src/io/anuke/mindustry/maps/generation/WorldGenerator.java index 69d7abf0c3..31c313e376 100644 --- a/core/src/io/anuke/mindustry/maps/generation/WorldGenerator.java +++ b/core/src/io/anuke/mindustry/maps/generation/WorldGenerator.java @@ -272,6 +272,10 @@ public class WorldGenerator{ floor = Blocks.water; }else if(elevation < 0.85){ floor = Blocks.sand; + }else if(temp < 0.42){ + floor = Blocks.snow; + }else if(temp < 0.5){ + floor = Blocks.stone; }else if(temp < 0.55){ floor = Blocks.grass; }else if(temp < 0.6){ @@ -288,14 +292,6 @@ public class WorldGenerator{ floor = Blocks.blackstone; } - if(temp < 0.6f){ - if(elevation > 3){ - floor = Blocks.snow; - }else if(elevation > 2.5){ - floor = Blocks.stone; - } - } - if(elevation > 3.3 && iceridge > 0.25 && temp < 0.6f){ elevation ++; floor = Blocks.ice; diff --git a/desktop/src/io/anuke/mindustry/desktop/DesktopPlatform.java b/desktop/src/io/anuke/mindustry/desktop/DesktopPlatform.java index ba55af64f6..bbece0d916 100644 --- a/desktop/src/io/anuke/mindustry/desktop/DesktopPlatform.java +++ b/desktop/src/io/anuke/mindustry/desktop/DesktopPlatform.java @@ -119,7 +119,7 @@ public class DesktopPlatform extends Platform{ @Override public boolean isDebug(){ //honestly I'm just putting this ridiculous """anti-debug""" mess here to see if anyone bothers solving it without editing source - return args.length > 0 && args[0].equals(("-debug_" + getUUID().hashCode() + "_" + return args.length > 0 && args[0].equals(("-debug_" + "12312333_" + " " + System.getProperty("os.arch") + "nice" + (int)(Math.sin(System.getProperty("user.dir").hashCode()) * 100) + Thread.currentThread().getStackTrace()[1].toString()).hashCode() + "") && new File("../../desktop/build/").exists(); } @@ -133,8 +133,7 @@ public class DesktopPlatform extends Platform{ try{ Enumeration e = NetworkInterface.getNetworkInterfaces(); NetworkInterface out; - for(out = e.nextElement(); out.getHardwareAddress() == null && e.hasMoreElements() && validAddress(out.getHardwareAddress()); out = e.nextElement()) - ; + for(out = e.nextElement(); out.getHardwareAddress() == null && e.hasMoreElements() && validAddress(out.getHardwareAddress()); out = e.nextElement()) ; byte[] bytes = out.getHardwareAddress(); byte[] result = new byte[8]; @@ -151,6 +150,7 @@ public class DesktopPlatform extends Platform{ } private boolean validAddress(byte[] bytes){ + if(bytes == null) return false; byte[] result = new byte[8]; System.arraycopy(bytes, 0, result, 0, bytes.length); return !new String(Base64Coder.encode(result)).equals("AAAAAAAAAOA=");