This commit is contained in:
Anuken
2019-01-15 23:04:27 -05:00
parent 8c3d6d05ab
commit 6d01193e1e
2 changed files with 7 additions and 2 deletions

View File

@@ -266,7 +266,6 @@ public class TileEntity extends BaseEntity implements TargetTrait, HealthTrait{
//TODO better smoke effect, this one is awful
if(health != 0 && health < tile.block().health && !(tile.block() instanceof Wall) &&
Mathf.chance(0.009f * Time.delta() * (1f - health / tile.block().health))){
Effects.effect(Fx.smoke, x + Mathf.range(4), y + Mathf.range(4));
}

View File

@@ -194,7 +194,7 @@ public class MapIO{
}
}
public static Map readMap(DataInputStream stream) throws IOException{
public static Map readMap(String useName, DataInputStream stream) throws IOException{
ObjectMap<String, String> tags = new ObjectMap<>();
IntIntMap map = new IntIntMap();
@@ -218,6 +218,10 @@ public class MapIO{
map.put(id, block.id);
}
return new Map(useName);
}
public static Tile[][] readTiles(DataInputStream stream) throws IOException{
int width = stream.readShort();
int height = stream.readShort();
@@ -270,6 +274,8 @@ public class MapIO{
tiles[x][y] = tile;
}
return tiles;
}
public static void writeMapMeta(DataOutputStream stream, MapMeta meta) throws IOException{