389 lines
19 KiB
Text
389 lines
19 KiB
Text
{{disclaimer|mojangonly=1}}
|
|
{{exclusive|java}}
|
|
{{Infobox program
|
|
| title = Hey Wiki
|
|
| image = Hey Wiki logo.png
|
|
| imagesize = 100px
|
|
| author =
|
|
[[MCW:About|Minecraft Wiki]]
|
|
|
|
'''Main contributors'''
|
|
* [[User:Dianliang233|Dianliang233]]
|
|
| platform =
|
|
* [https://fabricmc.net/ Fabric]
|
|
* [https://neoforged.net/ NeoForge]
|
|
| programming language = {{w|Java (programming language)|Java}}
|
|
| version = 1.7.0
|
|
| date = June 1, 2024
|
|
| size = ~200 KiB
|
|
| license = [https://www.gnu.org/licenses/lgpl-3.0.en.html LGPL-3.0]
|
|
| source available = [https://github.com/mc-wiki/minecraft-mod-heywiki GitHub]
|
|
}}
|
|
{{shortcut|MCW:MOD}}
|
|
|
|
'''Hey Wiki''' is a client [[mod]] made by the [[MCW:About|Minecraft Wiki]] community that allows you to press {{key|H}} (customizable) to open the wiki page of the [[block]], [[item]], or [[entity]] you're aiming at, whether it's from vanilla or a mod. It supports [https://fabricmc.net/ Fabric] and [https://neoforged.net/ NeoForge].
|
|
|
|
This mod is available on [https://github.com/mc-wiki/minecraft-mod-heywiki GitHub], [https://modrinth.com/mod/hey-wiki Modrinth] and [https://curseforge.com/minecraft/mc-mods/hey-wiki CurseForge].
|
|
|
|
== Features ==
|
|
|
|
* Press {{key|H}} (customizable) to open the wiki (Minecraft Wiki or the respective mod wiki) page of the block/item/entity you're aiming at.
|
|
* Press {{key|Alt+H}} or {{key|opt+H}} to open the wiki page of the item in your main hand.
|
|
* Press {{key|B}} to open the wiki search screen. You can search for wiki pages by typing in the search bar.
|
|
* Adds several [[#Commands|commands]].
|
|
* [[#%5B%5BWiki links%5D%5D in chat|Link to a wiki page in chat]] using <code><nowiki>[[wiki link]]</nowiki></code> syntax.
|
|
|
|
[[File:Hey Wiki.mp4|500px|class=dynamic-video]]
|
|
|
|
=== How to use ===
|
|
|
|
# Install the mod. You can download it from [https://modrinth.com/mod/hey-wiki Modrinth] and [https://curseforge.com/minecraft/mc-mods/hey-wiki CurseForge]. Don't forget to install the [[#Dependencies|dependencies]].
|
|
# Point at a block/entity with your crosshair or hover over an item in your [[inventory]] with your cursor.
|
|
# Press the [[keybind]] (default is {{key|H}}).
|
|
# Either confirm the action or copy the link to your clipboard in the screen that pops up.
|
|
|
|
It is also supported to use [https://modrinth.com/mod/mcbrowser MCBrowser] and [https://modrinth.com/mod/mcef MCEF] for in-game browsing.
|
|
|
|
Optionally, you can change these behaviors in the config menu:
|
|
|
|
{{msgbox
|
|
| type = notice
|
|
| mini = 1
|
|
| text = You need to install [https://modrinth.com/mod/modmenu Mod Menu] or [https://www.curseforge.com/minecraft/mc-mods/menulogue Menulogue] to access the config menu on Fabric.
|
|
}}
|
|
|
|
* If confirmation is required to open the wiki page: default is true
|
|
* Which wiki language you prefer, overriding your game [[language]]: default is your game language
|
|
* (For Chinese users) Which Chinese variant you prefer, overriding your game language: default is your game language
|
|
* The keybind to open the wiki page: default is {{key|H}}
|
|
* Reach distance: default is 5.2 blocks (same as creative mode reach)
|
|
* Whether you are allowed to look up fluid: default is false
|
|
|
|
=== Commands ===
|
|
|
|
These [[command]]s are available:
|
|
|
|
* <code>/imfeelinglucky [<namespace>]</code> - Takes you wherever the mod decides.
|
|
** Example: <code>/imfeelinglucky minecraft</code> -> <code>https://minecraft.wiki/w/???????</code>
|
|
* <code>/wiki <pageName></code> - Opens the Minecraft Wiki page of the specified page name.
|
|
** Example: <code>/wiki creeper</code> -> <code>https://minecraft.wiki/w/?search=creeper</code>
|
|
** Alias: <code>/whatis</code>
|
|
* <code>/whatbiome</code> - Opens the Minecraft Wiki page of the [[biome]] you're currently in.
|
|
* <code>/whatstructure</code> - Opens the Minecraft Wiki page of the [[structure]] you're currently in.
|
|
** This command is only available in [[singleplayer]].
|
|
* <code>/whatcommand <command></code> - Opens the Minecraft Wiki page of the specified command.
|
|
** Example: <code>/whatcommand give</code> -> <code>https://minecraft.wiki/w/?search=%2Fgive</code>
|
|
** Alias: <code>/whatcmd</code>
|
|
* <code>/whatisthis</code> - Opens the Minecraft Wiki page of the block/item/entity you're aiming at.
|
|
* <code>/whatisthisitem</code> - Opens the Minecraft Wiki page of the item you're holding in you main hand.
|
|
** <code>/whatisthisitem offhand</code> - Same, but for the offhand.
|
|
|
|
Note that if you open a page with a command, the confirmation screen will not appear.
|
|
|
|
=== <nowiki>[[Wiki links]]</nowiki> in chat ===
|
|
|
|
Hey Wiki supports <code><nowiki>[[wiki links]]</nowiki></code> in chat. When you send a message with <code><nowiki>[[wiki link]]</nowiki></code> syntax, Hey Wiki will replace
|
|
it with a clickable link. The page name can include a namespace.
|
|
|
|
This also supports interwiki links. For example:
|
|
|
|
* <code><nowiki>[[aether:The Aether]]</nowiki></code> will link to the Aether Wiki page of "[https://aether.wiki.gg/wiki/The_Aether The Aether]" (interwiki)
|
|
* <code><nowiki>[[en:enderman]]</nowiki></code> will link to the English Minecraft Wiki page of "[[enderman]]" (interlanguage)
|
|
* <code><nowiki>[[minecraft:en:enderman]]</nowiki></code> will link to the English Minecraft Wiki page of "[[enderman]]" (interwiki and interlanguage)
|
|
|
|
== Supported wikis ==
|
|
|
|
Currently, Hey Wiki supports the following wikis:
|
|
|
|
* [[Minecraft Wiki]]
|
|
* [https://aether.wiki.gg Aether Wiki]
|
|
* [https://wiki.aidancbrady.com/wiki/Main_Page Mekanism Wiki]
|
|
* [http://benimatic.com/tfwiki/ The Twilight Forest Wiki]
|
|
* [https://guide.appliedenergistics.org/ Applied Energistics 2 Wiki]
|
|
* [https://stardustlabs.miraheze.org/ Stardust Labs Wiki]
|
|
* [https://create.fandom.com/ Create Wiki]
|
|
* [https://voidscape.tamaized.com/ Voidscape Wiki]
|
|
* [https://adventofascension.fandom.com/ Advent of Ascension Wiki]
|
|
* [https://doggytalentsnext.wiki.gg/ Doggy Talents Next Wiki]
|
|
|
|
If you want to add support for other wikis, you can [https://github.com/mc-wiki/minecraft-mod-heywiki/issues/new?labels=new+wiki%2Ctriage+needed&template=new_wiki.yml file an issue]. In addition, you can also add support for other wikis by using a resource pack.
|
|
|
|
== APIs ==
|
|
|
|
Hey Wiki provides several ways mod, mod pack, data pack, and custom server developers can leverage to support their creation.
|
|
|
|
=== Resource pack ===
|
|
|
|
{{msgbox
|
|
| type = notice
|
|
| mini = 1
|
|
| text = This API is stable since v1.6.0.
|
|
}}
|
|
|
|
Hey Wiki supports using resource pack to add support for other wikis. To do so, create a JSON file in the <code>assets/''<namespace>''/wiki_family/</code> folder in your resource pack with the following format:
|
|
|
|
<div class="treeview">
|
|
* {{nbt|compound}} The root tag
|
|
** {{nbt|list|namespace}}: Namespaces bound to the wiki family.
|
|
*** {{nbt|string}}: A [[namespace]].
|
|
** {{nbt|list|wikis}}: List of different language wikis.
|
|
*** {{nbt|compound}}: The root tag
|
|
**** {{nbt|string|article_url}}: The URL pattern for articles. to an article. <code>%s</code> will be replaced with the query.
|
|
**** {{nbt|string|mw_api_url}}: (Optional) URL to the MediaWiki API, if it exists.
|
|
**** {{nbt|string|search_url}}: (Optional) The URL pattern for searching. <code>%s</code> will be replaced with the query.
|
|
**** {{nbt|string|random_article}}: (Optional) The name of the random article page.
|
|
**** {{nbt|string|excerpt}}: (Optional) How Hey Wiki should fetch excerpts from the wiki. Either <code>text_extracts</code> or <code>none</code>. <code>text_extracts</code> only works for MediaWiki sites with the [[mw:Extension:TextExtracts|TextExtracts]] extension installed. You can check this by visiting [[Special:Version]] on the wiki.
|
|
**** {{nbt|string|search_provider}}: (Optional) Which provider to use for autocompleted search. Either <code>mediawiki</code> or <code>algolia</code>.
|
|
**** {{nbt|compound|algolia}}: (Optional) Required if Algolia is used as search provider.
|
|
***** {{nbt|string|api_url}}: URL to the API of Algolia instance.
|
|
***** {{nbt|string|index_name}}: Name of the Algolia search index.
|
|
***** {{nbt|string|api_key}}: An Algolia API key. You MUST give the API key '''read-only permission''' with (optional) rate limit. Please see [https://www.algolia.com/doc/guides/security/api-keys/ Algolia documentation] for detail.
|
|
***** {{nbt|string|app_id}}: Algolia application ID.
|
|
**** {{nbt|compound|language}}: Information on the language of the wiki.
|
|
***** {{nbt|string|wiki_language}}: The language code of the wiki.
|
|
***** {{nbt|boolean|main}}: Whether this is the main language. If true, this language will be fallback if no other language matches.
|
|
***** {{nbt|string|default}}: The default in-game language that the wiki supports. This will be fallback if the in-game language is not supported by the wiki.
|
|
***** {{nbt|string|regex}}: A regular expression. If the regex matches the in-game language, this wiki will be used when config is auto
|
|
***** {{nbt|string|exclude}}: (Optional) A regular expression. Ditto, but for exclusion.
|
|
***** {{nbt|string|lang_override}}: (Optional) A custom language code that allows you to override translation keys to specific pages. A translation file should exist at <code>assets/<namespace>/lang/<lang_override>.json</code>.
|
|
</div>
|
|
|
|
{{Collapse
|
|
|title='''Example JSON'''
|
|
|content=
|
|
{{filename|assets/example/wiki_family/minecraft.json}}
|
|
<syntaxhighlight lang="json">
|
|
{
|
|
// The namespaces that is bound to the wiki family
|
|
"namespace": [
|
|
"minecraft"
|
|
],
|
|
// List of different language wikis
|
|
"wikis": [
|
|
{
|
|
// The URL pattern for articles. %s will be replaced with the query
|
|
"article_url": "https://minecraft.wiki/?search=%s",
|
|
// (Optional) If the wiki is a MediaWiki wiki, the API URL
|
|
"mw_api_url": "https://minecraft.wiki/api.php",
|
|
// (Optional) The URL pattern for searching. %s will be replaced with the query.
|
|
"search_url": "https://minecraft.wiki/?search=%s",
|
|
// (Optional) The page name for the random article
|
|
"random_article": "Special:RandomRootPage/Main",
|
|
// (Optional) How Hey Wiki should fetch excerpts from the wiki. Either "text_extracts" or "none".
|
|
// "text_extracts" only works for MediaWiki sites with the TextExtracts and PageImages extension installed. You can check this by visiting Special:Version on the wiki.
|
|
"excerpt": "text_extracts",
|
|
// (Optional) Which provider to use for autocompleted search. Either "mediawiki" or "algolia".
|
|
"search_provider": "mediawiki",
|
|
// (Optional) If you use algolia as search provider, you MUST fill out the following fields
|
|
"algolia": {
|
|
"api_url": "https://example-dsn.algolia.net/",
|
|
"index_name": "example",
|
|
"api_key": "efcc14a8c70a1489d18cfd565cce53ca",
|
|
"app_id": "9957A67102"
|
|
},
|
|
"language": {
|
|
// The language code of the wiki
|
|
"wiki_language": "en",
|
|
// Whether this is the main language. If true, this language will be fallback if no other language matches
|
|
"main": true,
|
|
// The default in-game language that the wiki supports. This will be fallback if the in-game language is not supported by the wiki
|
|
"default": "en_us",
|
|
// If the regex matches the in-game language, this wiki will be used when config is auto
|
|
"regex": "^en_.*",
|
|
// (Optional) Ditto, but for exclusion
|
|
"exclude": null,
|
|
// (Optional) A custom language code that allows you to override translation keys to specific pages. A translation file should exist at assets/<namespace>/lang/<lang_override>.json
|
|
"lang_override": "minecraft_en"
|
|
}
|
|
},
|
|
{
|
|
// Another language
|
|
"article_url": "https://de.minecraft.wiki/?search=%s",
|
|
"language": {
|
|
"wiki_language": "de",
|
|
"default": "de_de",
|
|
"regex": "^de_.*",
|
|
"exclude": null
|
|
}
|
|
}
|
|
]
|
|
}
|
|
</syntaxhighlight>
|
|
}}
|
|
|
|
You also want to include a translation file in <samp>assets/<namespace>/lang/</samp> folder with the following format:
|
|
|
|
{{filename|assets/example/lang/en_us.json}}
|
|
<syntaxhighlight lang="json">
|
|
{
|
|
// Assuming the definition is located at `assets/example/wiki_family/minecraft.json`
|
|
"wiki_family.example.minecraft": "Minecraft Wiki"
|
|
}
|
|
</syntaxhighlight>
|
|
|
|
=== Custom item via data component or NBT ===
|
|
|
|
{{msgbox
|
|
| type = content
|
|
| mini = 1
|
|
| text = This API is an experimental feature and might change at any time.
|
|
}}
|
|
|
|
Data pack and custom server authors can use <code>heywiki:identifier</code>, <code>heywiki:translation_key</code> and <code>heywiki:fallback_title</code> in <code>custom_data</code> [[data component]] to provide custom namespace and name for an item. However, this only accounts for custom items. For 1.20.4, you can populate these fields directly in [[Item format|NBT]].
|
|
|
|
You need to use the method above to register a new wiki with a custom namespace using resource pack. If it is not feasible to ask your players to download a resource pack, we can also ship it with the mod itself.
|
|
|
|
<tabber>
|
|
|-| 1.21 =
|
|
<div class="treeview">
|
|
* {{nbt|compound|components}}: Parent tag.
|
|
** {{nbt|compound|minecraft:custom_data}}
|
|
*** {{nbt|string|heywiki:identifier}} A custom identifier for the item. It should be in the format of <samp><''namespace''>:<''id''></samp>.
|
|
*** {{nbt|string|heywiki:fallback_title}} (Optional) A custom fallback title for the item. If this is missing, the path (id) of the identifier is used instead.
|
|
*** {{nbt|string|heywiki:translation_key}} (Optional) A custom translation key for the item. If this is missing or the translation key is not defined, the fallback title is used instead.
|
|
</div>
|
|
|-| 1.20.4 =
|
|
<div class="treeview">
|
|
* {{nbt|compound|tag}}: Parent tag.
|
|
** {{nbt|string|heywiki:identifier}} A custom identifier for the item. It should be in the format of <samp><''namespace''>:<''id''></samp>.
|
|
** {{nbt|string|heywiki:translation_key}} A custom translation key for the item.
|
|
</div>
|
|
</tabber>
|
|
|
|
For example, on "niceserver", to have a bone item to resolve to the "Drill" page, you will first need to register
|
|
the "niceserver" namespace per above. Then you can give the player this item:
|
|
|
|
<tabber>
|
|
|-| 1.21 =
|
|
<syntaxhighlight lang="mcfunction">
|
|
/give @s minecraft:bone[minecraft:custom_data={"heywiki:identifier": "niceserver:drill", "heywiki:fallback_title": "Drill", "heywiki:translation_key": "item.niceserver.drill"}]
|
|
</syntaxhighlight>
|
|
|-| 1.20.4 =
|
|
<syntaxhighlight lang="mcfunction">
|
|
/give @s minecraft:bone{"heywiki:identifier": "niceserver:drill", "heywiki:translation_key": "item.niceserver.drill"}
|
|
</syntaxhighlight>
|
|
</tabber>
|
|
|
|
== Dependencies ==
|
|
|
|
For Fabric:
|
|
|
|
* (Required) [https://modrinth.com/mod/fabric-api Fabric API]
|
|
* (Required) [https://modrinth.com/mod/architectury-api Architectury API]: for multi-modloader compatibility
|
|
* (Required) [https://modrinth.com/mod/cloth-config Cloth Config]: for configuration
|
|
* (Recommended) [https://modrinth.com/mod/modmenu Mod Menu]: to access the config menu
|
|
* (Optional) [https://modrinth.com/mod/mcbrowser MCBrowser] and [https://modrinth.com/mod/mcef MCEF]: for in-game browser
|
|
* (Optional) [https://modrinth.com/mod/rei REI]/[https://modrinth.com/mod/emi EMI]/[https://modrinth.com/mod/jei JEI]: integration supported
|
|
|
|
For NeoForge:
|
|
|
|
* (Required) [https://modrinth.com/mod/architectury-api Architectury API]: for multi-modloader compatibility
|
|
* (Required) [https://modrinth.com/mod/cloth-config Cloth Config]: for configuration
|
|
* (Optional) [https://modrinth.com/mod/rei REI]/[https://modrinth.com/mod/emi EMI]/[https://modrinth.com/mod/jei JEI]: integration supported
|
|
|
|
== Versioning ==
|
|
|
|
=== Hey Wiki ===
|
|
Hey Wiki itself follows [https://semver.org/ Semantic Versioning]. The version number is in the format of
|
|
<code><nowiki><major>.<minor>.<patch>[-<prerelease>]</nowiki></code>. The version number is incremented based on the following rules:
|
|
|
|
* '''Major''': Incremented when breaking changes are made to stable, public API.
|
|
* '''Minor''': Incremented when new features to stable, public API are added in a backwards-compatible manner.
|
|
* '''Patch''': Incremented when bug fixes are made.
|
|
|
|
Changelogs for Hey Wiki can be seen at [[MCW:Hey Wiki/Releases]].
|
|
|
|
=== Minecraft ===
|
|
Hey Wiki supports multiple versions of Minecraft.
|
|
|
|
Every Minecraft version is assigned a support status:
|
|
* '''Active''': This version receives new features and bug fixes. Features will be backported as much as reasonably possible.
|
|
* '''Maintenance''': This version receives only bug fixes and security patches. Features are generally not backported.
|
|
* '''End of Life (EOL)''': No further updates should be expected.
|
|
|
|
The current Minecraft release and the master branches are always Active. Pull requests should almost always go to <code>master</code>. If they're accepted, they should be cherry-picked to other Active branches.
|
|
|
|
When a new snapshot releases, <code>master</code> branch is updated to that snapshot. Snapshots might receive only one version or no version at all. Only Fabric is supported for snapshots.
|
|
|
|
Old Minecraft versions are provided with Long Term Support (LTS) based on their popularity and the community's interest. LTS versions receive Active support at first. After some time, they will be downgraded to Maintenance. Old snapshots are not supported.
|
|
|
|
The following table shows which versions are supported:
|
|
|
|
{| class="wikitable plainlinks"
|
|
![https://github.com/mc-wiki/minecraft-mod-heywiki/branches Git branch]
|
|
!Minecraft version
|
|
!Support
|
|
!LTS
|
|
!Modloader
|
|
|-
|
|
|<code>[https://github.com/mc-wiki/minecraft-mod-heywiki master]</code>
|
|
|[[Java Edition 1.21.2|1.21.2]]
|
|
|{{tc|Yes|Active (latest release)}}
|
|
|{{tc|planned|?}}
|
|
|Fabric, Neoforge
|
|
|-
|
|
|<code>[https://github.com/mc-wiki/minecraft-mod-heywiki/tree/mc/1.21.1 mc/1.21.1]</code>
|
|
|[[Java Edition 1.21|1.21]], [[Java Edition 1.21.1|1.21.1]]
|
|
|{{tc|Yes|Active (LTS)}}
|
|
|{{tc|Yes}}
|
|
|Fabric, Neoforge
|
|
|-
|
|
|<code>[https://github.com/mc-wiki/minecraft-mod-heywiki/tree/mc/1.20.6 mc/1.20.6]</code>
|
|
|[[Java Edition 1.20.6|1.20.6]]
|
|
|{{tc|No|EOL}}
|
|
|{{tc|No}}
|
|
|Fabric, Neoforge
|
|
|-
|
|
|<code>[https://github.com/mc-wiki/minecraft-mod-heywiki/tree/mc/1.20.5 mc/1.20.5]</code>
|
|
|[[Java Edition 1.20.5|1.20.5]]
|
|
|{{tc|No|EOL}}
|
|
|{{tc|No}}
|
|
|Fabric, Neoforge
|
|
|-
|
|
|<code>[https://github.com/mc-wiki/minecraft-mod-heywiki/tree/mc/1.20.4 mc/1.20.4]</code>
|
|
|[[Java Edition 1.20.4|1.20.4]]
|
|
|{{tc|partial|Maintenance (LTS)}}
|
|
|{{tc|Yes}}
|
|
|Fabric, Neoforge
|
|
|-
|
|
|N/A
|
|
|''Outdated snapshots''
|
|
|{{tc|No|EOL}}
|
|
|{{tc|No}}
|
|
|Fabric
|
|
|}
|
|
|
|
== Language support ==
|
|
Hey Wiki is available in multiple languages.
|
|
|
|
It is translated by the community on [https://crowdin.com/project/hey-wiki Crowdin]. It currently supports the following languages:
|
|
|
|
* German - Germany ({{cd|de_de}})
|
|
* English - US ({{cd|en_us}})
|
|
* Spanish - Spain ({{cd|es_es}})
|
|
* Persian - Iran ({{cd|fa_ir}})
|
|
* Finnish - Finland ({{cd|fi_fi}})
|
|
* French - France ({{cd|fr_fr}})
|
|
* Hebrew - Israel ({{cd|he_il}})
|
|
* Italian - Italy ({{cd|it_it}})
|
|
* Japanese - Japan ({{cd|ja_jp}})
|
|
* Korean - South Korea ({{cd|ko_kr}})
|
|
* Classical Chinese ({{cd|lzh}})
|
|
* Dutch - Netherlands ({{cd|nl_nl}})
|
|
* Portuguese - Brazil ({{cd|pt_br}})
|
|
* Portuguese - Portugal ({{cd|pt_pt}})
|
|
* Russian - Russia ({{cd|ru_ru}})
|
|
* Thai - Thailand ({{cd|th_th}})
|
|
* Ukrainian - Ukraine ({{cd|uk_ua}})
|
|
* Chinese Simplified - Chinese Mainland ({{cd|zh_cn}})
|
|
* Chinese Traditional - Hong Kong ({{cd|zh_hk}})
|
|
* Chinese Traditional - Taiwan ({{cd|zh_tw}})
|
|
|
|
== Navigation ==
|
|
{{Navbox mods}}
|
|
|
|
[[fr:Minecraft Wiki:Hey Wiki]]
|
|
[[ja:Minecraft Wiki:Hey Wiki]]
|
|
[[pt:Comunidade:Hey Wiki]]
|
|
[[uk:Minecraft Wiki:Hey Wiki]]
|
|
[[zh:Minecraft Wiki:Hey Wiki]]
|