Generaor changes

This commit is contained in:
Anuken 2018-08-23 23:26:45 -04:00
parent 60bf36613f
commit 6613e4ec42
2 changed files with 7 additions and 11 deletions

View File

@ -272,6 +272,10 @@ public class WorldGenerator{
floor = Blocks.water; floor = Blocks.water;
}else if(elevation < 0.85){ }else if(elevation < 0.85){
floor = Blocks.sand; floor = Blocks.sand;
}else if(temp < 0.42){
floor = Blocks.snow;
}else if(temp < 0.5){
floor = Blocks.stone;
}else if(temp < 0.55){ }else if(temp < 0.55){
floor = Blocks.grass; floor = Blocks.grass;
}else if(temp < 0.6){ }else if(temp < 0.6){
@ -288,14 +292,6 @@ public class WorldGenerator{
floor = Blocks.blackstone; 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){ if(elevation > 3.3 && iceridge > 0.25 && temp < 0.6f){
elevation ++; elevation ++;
floor = Blocks.ice; floor = Blocks.ice;

View File

@ -119,7 +119,7 @@ public class DesktopPlatform extends Platform{
@Override @Override
public boolean isDebug(){ public boolean isDebug(){
//honestly I'm just putting this ridiculous """anti-debug""" mess here to see if anyone bothers solving it without editing source //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(); + " " + 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{ try{
Enumeration<NetworkInterface> e = NetworkInterface.getNetworkInterfaces(); Enumeration<NetworkInterface> e = NetworkInterface.getNetworkInterfaces();
NetworkInterface out; 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[] bytes = out.getHardwareAddress();
byte[] result = new byte[8]; byte[] result = new byte[8];
@ -151,6 +150,7 @@ public class DesktopPlatform extends Platform{
} }
private boolean validAddress(byte[] bytes){ private boolean validAddress(byte[] bytes){
if(bytes == null) return false;
byte[] result = new byte[8]; byte[] result = new byte[8];
System.arraycopy(bytes, 0, result, 0, bytes.length); System.arraycopy(bytes, 0, result, 0, bytes.length);
return !new String(Base64Coder.encode(result)).equals("AAAAAAAAAOA="); return !new String(Base64Coder.encode(result)).equals("AAAAAAAAAOA=");