Tweaks
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user