You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although code for reading schem3 has been added in org.pesoft.worldpainter.layers.bo2.Scheme, due to some reasons, these codes actually cannot run correctly.
Scheme 3 puts all fields in a Component called "schematic", which was placed directly outside in previous versions. As jsons shown below:
Schem3
{
"": {
"Schematic": {
//...
}
}
}
Schem2
{
"": {
//...
}
}
So the Version judgment in the code is actually invalid. When running against schem3, these codes will never be able to read the correct Version value, resulting in a default value of "0".
publicfinalclassSchemextendsAbstractNBTItemimplementsWPObject {
@SuppressWarnings("unchecked") // Guaranteed by MinecraftpublicSchem(CompoundTagtag, StringfallBackName) {
super(tag);
finalintversion = getInt(TAG_VERSION); //cont read version in schem3, get value "0"//...switch (version) {
case1:
//...break;
case2:
//...break;
case3: //never go into this branch//...break;
default:
thrownewIllegalArgumentException("Schem version " + version + " not supported");
}
'''
The text was updated successfully, but these errors were encountered:
Although code for reading schem3 has been added in
org.pesoft.worldpainter.layers.bo2.Scheme
, due to some reasons, these codes actually cannot run correctly.Scheme 3 puts all fields in a Component called "schematic", which was placed directly outside in previous versions. As jsons shown below:
Schem3
Schem2
So the Version judgment in the code is actually invalid. When running against schem3, these codes will never be able to read the correct Version value, resulting in a default value of "0".
The text was updated successfully, but these errors were encountered: