mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-26 02:19:23 +00:00
修复部分资源包生成
This commit is contained in:
@@ -167,11 +167,11 @@ public class SelectItemModel implements ItemModel {
|
||||
if (whenObj instanceof JsonArray array) {
|
||||
List<String> whens = new ArrayList<>(array.size());
|
||||
for (JsonElement o : array) {
|
||||
whens.add(o.toString());
|
||||
whens.add(o.getAsString());
|
||||
}
|
||||
either = Either.ofFallback(whens);
|
||||
} else if (whenObj instanceof JsonPrimitive primitive) {
|
||||
either = Either.ofPrimary(primitive.toString());
|
||||
either = Either.ofPrimary(primitive.getAsString());
|
||||
} else {
|
||||
throw new IllegalArgumentException("when is expected to be either JsonPrimitive or JsonArray");
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ public class SimpleConditionProperty implements ConditionProperty {
|
||||
public static class Reader implements ConditionPropertyReader {
|
||||
@Override
|
||||
public ConditionProperty read(JsonObject json) {
|
||||
return new SimpleConditionProperty(Key.of(json.get("property").toString()));
|
||||
return new SimpleConditionProperty(Key.of(json.get("property").getAsString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ public class SimpleRangeDispatchProperty implements RangeDispatchProperty {
|
||||
public static class Reader implements RangeDispatchPropertyReader {
|
||||
@Override
|
||||
public RangeDispatchProperty read(JsonObject json) {
|
||||
Key type = Key.of(json.get("property").toString());
|
||||
Key type = Key.of(json.get("property").getAsString());
|
||||
return new SimpleRangeDispatchProperty(type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ public class SimpleSelectProperty implements SelectProperty {
|
||||
public static class Reader implements SelectPropertyReader {
|
||||
@Override
|
||||
public SelectProperty read(JsonObject json) {
|
||||
Key type = Key.of(json.get("property").toString());
|
||||
Key type = Key.of(json.get("property").getAsString());
|
||||
return new SimpleSelectProperty(type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ public class SimpleSpecialModel implements SpecialModel {
|
||||
public static class Reader implements SpecialModelReader {
|
||||
@Override
|
||||
public SpecialModel read(JsonObject json) {
|
||||
Key type = Key.of(json.get("type").toString());
|
||||
Key type = Key.of(json.get("type").getAsString());
|
||||
return new SimpleSpecialModel(type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ commons_io_version=2.18.0
|
||||
commons_imaging_version=1.0.0-alpha6
|
||||
commons_lang3_version=3.17.0
|
||||
sparrow_nbt_version=0.9.1
|
||||
sparrow_util_version=0.49.2
|
||||
sparrow_util_version=0.50
|
||||
fastutil_version=8.5.15
|
||||
netty_version=4.1.121.Final
|
||||
joml_version=1.10.8
|
||||
|
||||
Reference in New Issue
Block a user