Skip to content

Commit

Permalink
Revert Bedrock biome name changes (#248)
Browse files Browse the repository at this point in the history
* Revert Bedrock biome name changes

I forgot that these strings are also used to map dimensions across platforms.
It would probably make sense to have a local dimension name that is platform dependent and then global names that are shared between platforms for common dimensions.

* Fixed dimension names in test data
  • Loading branch information
gentlegiantJGC committed Jun 15, 2023
1 parent 3f82600 commit d5e5f72
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 30 deletions.
6 changes: 3 additions & 3 deletions amulet/level/formats/leveldb_world/dimension.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
log = logging.getLogger(__name__)

InternalDimension = Optional[int]
OVERWORLD = "Overworld"
THE_NETHER = "Nether"
THE_END = "TheEnd"
OVERWORLD = "minecraft:overworld"
THE_NETHER = "minecraft:the_nether"
THE_END = "minecraft:the_end"


class ActorCounter:
Expand Down
7 changes: 7 additions & 0 deletions amulet/level/formats/leveldb_world/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,13 @@ def _reload_world(self):

try:
dimension_name = value.get_string("DimensionName").py_str
# The dimension names are stored differently TODO: split local and global names
dimension_name = {
"Overworld": "minecraft:overworld",
"Nether": "minecraft:the_nether",
"TheEnd": "minecraft:the_end",
}.get(dimension_name, dimension_name)

except KeyError:
# Some entries seem to not have a dimension assigned to them. Is there a default? We will skip over these for now.
# {'LastSavedBaseGameVersion': StringTag("1.19.81"), 'LastSavedDimensionHeightRange': CompoundTag({'max': ShortTag(320), 'min': ShortTag(-64)})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"origin": "vanilla"
},
"dim_height": {
"Overworld": [[-30000000, 0, -30000000], [30000000, 256, 30000000]],
"Nether": [[-30000000, 0, -30000000], [30000000, 128, 30000000]],
"TheEnd": [[-30000000, 0, -30000000], [30000000, 256, 30000000]]
"minecraft:overworld": [[-30000000, 0, -30000000], [30000000, 256, 30000000]],
"minecraft:the_nether": [[-30000000, 0, -30000000], [30000000, 128, 30000000]],
"minecraft:the_end": [[-30000000, 0, -30000000], [30000000, 256, 30000000]]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"origin": "vanilla"
},
"dim_height": {
"Overworld": [[-30000000, -64, -30000000], [30000000, 320, 30000000]],
"Nether": [[-30000000, 0, -30000000], [30000000, 128, 30000000]],
"TheEnd": [[-30000000, 0, -30000000], [30000000, 256, 30000000]]
"minecraft:overworld": [[-30000000, -64, -30000000], [30000000, 320, 30000000]],
"minecraft:the_nether": [[-30000000, 0, -30000000], [30000000, 128, 30000000]],
"minecraft:the_end": [[-30000000, 0, -30000000], [30000000, 256, 30000000]]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"origin": "vanilla"
},
"dim_height": {
"Overworld": [[-30000000, 0, -30000000], [30000000, 256, 30000000]],
"Nether": [[-30000000, 0, -30000000], [30000000, 128, 30000000]],
"TheEnd": [[-30000000, 0, -30000000], [30000000, 256, 30000000]]
"minecraft:overworld": [[-30000000, 0, -30000000], [30000000, 256, 30000000]],
"minecraft:the_nether": [[-30000000, 0, -30000000], [30000000, 128, 30000000]],
"minecraft:the_end": [[-30000000, 0, -30000000], [30000000, 256, 30000000]]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"origin": "vanilla"
},
"dim_height": {
"Overworld": [[-30000000, -64, -30000000], [30000000, 320, 30000000]],
"Nether": [[-30000000, 0, -30000000], [30000000, 128, 30000000]],
"TheEnd": [[-30000000, 0, -30000000], [30000000, 256, 30000000]]
"minecraft:overworld": [[-30000000, -64, -30000000], [30000000, 320, 30000000]],
"minecraft:the_nether": [[-30000000, 0, -30000000], [30000000, 128, 30000000]],
"minecraft:the_end": [[-30000000, 0, -30000000], [30000000, 256, 30000000]]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"origin": "vanilla"
},
"dim_height": {
"Overworld": [[-30000000, 0, -30000000], [30000000, 256, 30000000]],
"Nether": [[-30000000, 0, -30000000], [30000000, 128, 30000000]],
"TheEnd": [[-30000000, 0, -30000000], [30000000, 256, 30000000]]
"minecraft:overworld": [[-30000000, 0, -30000000], [30000000, 256, 30000000]],
"minecraft:the_nether": [[-30000000, 0, -30000000], [30000000, 128, 30000000]],
"minecraft:the_end": [[-30000000, 0, -30000000], [30000000, 256, 30000000]]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"origin": "vanilla"
},
"dim_height": {
"Overworld": [[-30000000, 0, -30000000], [30000000, 256, 30000000]],
"Nether": [[-30000000, 0, -30000000], [30000000, 128, 30000000]],
"TheEnd": [[-30000000, 0, -30000000], [30000000, 256, 30000000]]
"minecraft:overworld": [[-30000000, 0, -30000000], [30000000, 256, 30000000]],
"minecraft:the_nether": [[-30000000, 0, -30000000], [30000000, 128, 30000000]],
"minecraft:the_end": [[-30000000, 0, -30000000], [30000000, 256, 30000000]]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"origin": "vanilla"
},
"dim_height": {
"Overworld": [[-30000000, -64, -30000000], [30000000, 320, 30000000]],
"Nether": [[-30000000, 0, -30000000], [30000000, 128, 30000000]],
"TheEnd": [[-30000000, 0, -30000000], [30000000, 256, 30000000]]
"minecraft:overworld": [[-30000000, -64, -30000000], [30000000, 320, 30000000]],
"minecraft:the_nether": [[-30000000, 0, -30000000], [30000000, 128, 30000000]],
"minecraft:the_end": [[-30000000, 0, -30000000], [30000000, 256, 30000000]]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"origin": "vanilla"
},
"dim_height": {
"Overworld": [[-30000000, -64, -30000000], [30000000, 320, 30000000]],
"Nether": [[-30000000, 0, -30000000], [30000000, 128, 30000000]],
"TheEnd": [[-30000000, 0, -30000000], [30000000, 256, 30000000]]
"minecraft:overworld": [[-30000000, -64, -30000000], [30000000, 320, 30000000]],
"minecraft:the_nether": [[-30000000, 0, -30000000], [30000000, 128, 30000000]],
"minecraft:the_end": [[-30000000, 0, -30000000], [30000000, 256, 30000000]]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"origin": "vanilla"
},
"dim_height": {
"Overworld": [[-30000000, -64, -30000000], [30000000, 320, 30000000]],
"Nether": [[-30000000, 0, -30000000], [30000000, 128, 30000000]],
"TheEnd": [[-30000000, 0, -30000000], [30000000, 256, 30000000]]
"minecraft:overworld": [[-30000000, -64, -30000000], [30000000, 320, 30000000]],
"minecraft:the_nether": [[-30000000, 0, -30000000], [30000000, 128, 30000000]],
"minecraft:the_end": [[-30000000, 0, -30000000], [30000000, 256, 30000000]]
}
}

0 comments on commit d5e5f72

Please sign in to comment.