Actual JSON weather (?)
This commit is contained in:
@@ -92,16 +92,6 @@ public class ContentParser{
|
|||||||
readFields(result, data);
|
readFields(result, data);
|
||||||
return result;
|
return result;
|
||||||
});
|
});
|
||||||
put(Weather.class, (type, data) -> {
|
|
||||||
if(data.isString()){
|
|
||||||
return field(Weathers.class, data);
|
|
||||||
}
|
|
||||||
var bc = resolve(data.getString("type", ""), ParticleWeather.class);
|
|
||||||
data.remove("type");
|
|
||||||
Weather result = make(bc);
|
|
||||||
readFields(result, data);
|
|
||||||
return result;
|
|
||||||
});
|
|
||||||
put(DrawBlock.class, (type, data) -> {
|
put(DrawBlock.class, (type, data) -> {
|
||||||
if(data.isString()){
|
if(data.isString()){
|
||||||
//try to instantiate
|
//try to instantiate
|
||||||
@@ -327,7 +317,7 @@ public class ContentParser{
|
|||||||
readBundle(ContentType.weather, name, value);
|
readBundle(ContentType.weather, name, value);
|
||||||
}else{
|
}else{
|
||||||
readBundle(ContentType.weather, name, value);
|
readBundle(ContentType.weather, name, value);
|
||||||
item = make(resolve(getType(value), ParticleWeather.class));
|
item = make(resolve(getType(value), ParticleWeather.class), name);
|
||||||
}
|
}
|
||||||
currentContent = item;
|
currentContent = item;
|
||||||
read(() -> readFields(item, value));
|
read(() -> readFields(item, value));
|
||||||
|
|||||||
Reference in New Issue
Block a user