Skip to content

Commit

Permalink
Update Minecraft Wiki links to new domain (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
misode authored Sep 27, 2023
1 parent 5b104fb commit 48efdc0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions map_prepare/lib/anvil/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ def from_numeric_id(cls, block_id: int, data: int=0):
data
Numeric data, used to represent variants of the block
"""
# See https://minecraft.gamepedia.com/Java_Edition_data_value/Pre-flattening
# and https://minecraft.gamepedia.com/Java_Edition_data_value for current values
# See https://minecraft.wiki/w/Java_Edition_data_value/Pre-flattening
# and https://minecraft.wiki/w/Java_Edition_data_value for current values
key = f'{block_id}:{data}'
if key not in LEGACY_ID_MAP:
raise KeyError(f'Block {key} not found')
Expand Down
6 changes: 3 additions & 3 deletions map_prepare/lib/anvil/chunk.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# so a block value isn't in multiple elements of the array
_VERSION_20w17a = 2529

# This is the version where "The Flattening" (https://minecraft.gamepedia.com/Java_Edition_1.13/Flattening) happened
# This is the version where "The Flattening" (https://minecraft.wiki/w/Java_Edition_1.13/Flattening) happened
# where blocks went from numeric ids to namespaced ids (namespace:block_id)
_VERSION_17w47a = 1451

Expand Down Expand Up @@ -61,7 +61,7 @@ def __init__(self, nbt_data: nbt.NBTFile):
self.version = nbt_data['DataVersion'].value
except KeyError:
# Version is pre-1.9 snapshot 15w32a, so world does not have a Data Version.
# See https://minecraft.fandom.com/wiki/Data_version
# See https://minecraft.wiki/w/Data_version
self.version = None

if self.version < _VERSION_21w43a:
Expand Down Expand Up @@ -160,7 +160,7 @@ def get_block(self, x: int, y: int, z: int, section: Union[int, nbt.TAG_Compound
y %= 16

if self.version is None or self.version < _VERSION_17w47a:
# Explained in depth here https://minecraft.gamepedia.com/index.php?title=Chunk_format&oldid=1153403#Block_format
# Explained in depth here https://minecraft.wiki/w/Chunk_format?oldid=1153403#Block_format

if section is None or 'Blocks' not in section:
if force_new:
Expand Down

0 comments on commit 48efdc0

Please sign in to comment.