Fixed web version bugs

This commit is contained in:
Anuken
2018-07-12 14:06:50 -04:00
parent 1f18e7beed
commit 8e9adeb4b4
5 changed files with 14 additions and 5 deletions

View File

@@ -121,7 +121,6 @@ public class MinimapRenderer implements Disposable{
int color = colorFor(world.tile(tile.x, tile.y));
pixmap.drawPixel(tile.x, pixmap.getHeight() - 1 - tile.y, color);
texture.bind();
Pixmaps.drawPixel(texture, tile.x, pixmap.getHeight() - 1 - tile.y, color);
}

View File

@@ -166,7 +166,7 @@ public class Maps implements Disposable{
for(String name : customMapNames){
try{
String data = Settings.getString("map-data-" + name);
String data = Settings.getString("map-data-" + name, "");
byte[] bytes = Base64Coder.decode(data);
loadMap(name, () -> new ByteArrayInputStream(bytes), true);
}catch (Exception e){
@@ -182,7 +182,7 @@ public class Maps implements Disposable{
if(!gwt){
return customMapDirectory.child(name + "." + mapExtension)::read;
}else{
String data = Settings.getString("map-data-" + name);
String data = Settings.getString("map-data-" + name, "");
byte[] bytes = Base64Coder.decode(data);
return () -> new ByteArrayInputStream(bytes);
}

View File

@@ -70,7 +70,7 @@ public class BuildBlock extends Block {
@Override
public void setBars(){
bars.replace(new BlockBar(BarType.health, true, tile -> (float)tile.<BuildEntity>entity().progress));
bars.replace(new BlockBar(BarType.health, true, tile -> tile.<BuildEntity>entity().progress));
}
@Override