Skip to content

Commit

Permalink
Update wiki to reflect the latest version of emotecraft and add a few…
Browse files Browse the repository at this point in the history
… new features
  • Loading branch information
Kale-Ko committed Sep 7, 2022
1 parent 3f29dfa commit f3e8807
Show file tree
Hide file tree
Showing 26 changed files with 150 additions and 147 deletions.
3 changes: 1 addition & 2 deletions .deepsource.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ enabled = true

[analyzers.meta]
environment = [
"browser",
"nodejs"
"browser"
]
43 changes: 24 additions & 19 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<meta name="description" content="The home of the official Emotecraft wiki.">
<meta name="keywords" content="Emotecraft, Emote, Emotes, Wiki, Minecraft, MC, Mod, Forge, ForgeMC, Fabric, FabricMC">
<meta name="robots" content="all">
<meta name="robots" content="index, follow">
<link rel="license" href="https://github.com/Kale-Ko/Emotecraft-Wiki/blob/master/LICENSE">
</head>

Expand Down Expand Up @@ -70,23 +70,21 @@
}

fetch("./pages/version.json").then(res => res.json()).then(versions => {
console.log("Lastest version is " + versions.version + ".")
console.log("Latest version is " + versions.version + ".")

var lastVersion = 0

document.cookie.split(';').forEach(cookie => {
if (cookie.trim().startsWith("lastVersion=")) {
lastVersion = parseInt(cookie.trim().substring(12, cookie.length))
}
})
if (localStorage.getItem("lastVersion" != null)) {
lastVersion = parseInt(localStorage.getItem("lastVersion")) || 0
}

document.cookie = "lastVersion=" + lastVersion + "; max-age=31536000; secure=false"
localStorage.setItem("lastVersion", lastVersion)

console.log("Current version is " + lastVersion + ".")

console.groupEnd()

if (versions.version > lastVersion) {
if (versions.version > lastVersion || versions.version == -1) {
console.log("Cache out of date, refreshing.")

caches.open("cache").then(cache => {
Expand All @@ -99,7 +97,7 @@

lastVersion = versions.version

document.cookie = "lastVersion=" + lastVersion + "; max-age=31536000; secure=false"
localStorage.setItem("lastVersion", lastVersion)
}

console.groupCollapsed("Fetching languages.")
Expand Down Expand Up @@ -161,7 +159,7 @@
}
})
} else {
console.log("Langauge \"" + lang + "\" does not exist.")
console.log("Language \"" + lang + "\" does not exist.")

return fetchWithCache("./pages/en/404-untranslated-language.md").then(res => res.text())
}
Expand Down Expand Up @@ -191,6 +189,7 @@

HtmlSanitizer.AllowedAttributes.id = true
HtmlSanitizer.AllowedAttributes.class = true
HtmlSanitizer.AllowedAttributes.download = true

var main = document.getElementById("main")
main.innerHTML = HtmlSanitizer.SanitizeHtml(marked.parse(markdown, { gfm: true, mangle: false, smartLists: true, smartypants: true }))
Expand All @@ -199,6 +198,14 @@
document.title = main.children.item(0).innerHTML + " - " + main.children.item(1).innerHTML
document.querySelector("html").lang = lang

var downloads = document.querySelectorAll("a.download")

downloads.forEach(download => {
fetch(download.href).then(res => res.blob()).then(data => {
download.href = URL.createObjectURL(data)
})
})

if (scrollElement != null && scrollElement != "top" && document.querySelector("#" + scrollElement) != null) document.querySelector("#" + scrollElement).scrollIntoView({ block: "center", inline: "center" })

console.groupCollapsed("Fetching sidebar in language \"" + lang + "\".")
Expand Down Expand Up @@ -288,15 +295,13 @@
})
})

var darkmode = true
var darkmode = ("matchMedia" in window ? window.matchMedia("(prefers-color-scheme: dark)").matches : true)

document.cookie.split(';').forEach(cookie => {
if (cookie.trim().startsWith("darkmode=")) {
darkmode = cookie.trim().substring(9, cookie.length) == "true"
}
})
if (localStorage.getItem("darkmode") != null) {
darkmode = localStorage.getItem("darkmode") == "true"
}

document.cookie = "darkmode=" + darkmode + "; max-age=31536000; secure=false"
localStorage.setItem("darkmode", darkmode)

if (darkmode) {
document.querySelector("html").classList.add("darkmode")
Expand All @@ -311,7 +316,7 @@

console.log("Switching darkmode " + (document.querySelector("html").classList.contains("darkmode") ? "on" : "off") + ".")

document.cookie = "darkmode=" + document.querySelector("html").classList.contains("darkmode") + "; max-age=31536000; secure=false"
localStorage.setItem("darkmode", darkmode)
})
</script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion pages/en/404-notfound.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

## 404 Not Found

The page you were looking for could not be found (Typo?)
The page you were looking for could not be found. (Typo?)
2 changes: 1 addition & 1 deletion pages/en/404-untranslated-language.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

## 404 Untranslated Language

The language you were trying to use has not been added yet, if you would like to help translate it see [this](./translating-wiki)
The language you were trying to use has not been added yet.
2 changes: 1 addition & 1 deletion pages/en/404-untranslated-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

## 404 Untranslated Page

The page you were trying to access has not been translated yet, if you would like to help translate it see [this](./translating-wiki)
The page you were trying to access has not been translated into that language yet.
2 changes: 1 addition & 1 deletion pages/en/a-helpful-feature.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## A Helpful Feature

If you are trying to quickly create and test emotes it can be a pain to have to restart Minecraft every time you want to test it.\
So instead if you place the emote file at `{.minecraft}/emote.json` and restart your game a special feature will be enabled in the mod.
So instead if you place the emote file at `.minecraft/emote.json` and restart your game a special feature will be enabled in the mod.

If you press the O key (Or whatever, its a configurable keybind) it will load the emote.json file and then attempt to play the emote so you don't have to restart each time.\
This will also provide additional feedback in the game log if something goes wrong.
9 changes: 4 additions & 5 deletions pages/en/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ Emotecraft is a mod for Minecraft Java that allows you to play emotes like on Mi

<img src="./assets/images/about/waving-emote.png" alt="Emotecraft being used" width="400" height="400">

It supports Forge and Fabric and is usually pretty quick to update to new versions of the game.
It supports Forge and Fabric and is usually pretty quick to update to new versions of the game.\
Downloads can be found [here](./downloads).

Downloads can be found [here](./downloads)
<span style="color: yellow;">**Important Note:**</span> The mod or plugin must also be installed on the server to be able to see other peoples emotes.

<span style="color: yellow;">**Important Note:**</span> The mod or plugin must also be installed on the server to be able to see others emotes.

Different mod loaders (Forge/Fabric) are also fully compatible with each other and the plugins, however different versions may not be (eg. 2.1.4 might not work with 2.1.1)
Different mod loaders (Forge/Fabric) are also fully compatible with each other and the plugins, however different versions may not be (eg. 2.1.4 might not work with 2.1.1).
14 changes: 7 additions & 7 deletions pages/en/creating-emotes-blender.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@

## Creating Emotes With Blender

**This requires basic knowledge of how to move and rotate objects as well as use keyframes in blender.** For help with this see [this](https://docs.blender.org/manual/en/latest/scene_layout/object/editing/transform/introduction.html) and [this](https://docs.blender.org/manual/en/latest/animation/keyframes/introduction.html)
**This requires basic knowledge of how to move and rotate objects as well as use keyframes in blender.** For help with this see [this](https://docs.blender.org/manual/en/latest/scene_layout/object/editing/transform/introduction.html) and [this](https://docs.blender.org/manual/en/latest/animation/keyframes/introduction.html).

To start you are going to need [Blender](https://www.blender.org/download/).
If you need help installing it see [this](https://docs.blender.org/manual/en/latest/getting_started/installing/index.html)
If you need help installing it see [this](https://docs.blender.org/manual/en/latest/getting_started/installing/index.html).

Then you are going to need the blender model, either with or without bend support. You can get it [here](./downloads#tool-downloads)
Then you are going to need the Blender model, either with or without bend support. You can get it [here](./downloads#tool-downloads).

Once you have blender installed open the model. You should be greeted with a readme, make sure to read it.\
Once you have Blender installed open the model. You should be greeted with a readme, make sure to read it.\
To get started switch to the animation tab. You can move and rotate any of the joints how you want and add keyframes.

When you are done or would like to test your emote switch to the export tab. Here you will see a script with a few variables you can edit. You can change the emoteName, emoteDescription, and author to whatever you want. If you want the emote to loop you can set loop to true and set the return tick to the tick you would like it to loop on/return to\
When you are done or would like to test your emote switch to the export tab. Here you will see a script with a few variables you can edit. You can change the emoteName, emoteDescription, and author to whatever you want. If you want the emote to loop you can set loop to true and set the return tick to the tick you would like it to loop on/return to.\
When you are done click the play/run button. This will generate an emote.json in the same place as the blend file.

Next see [Installing Custom Emotes](./install-emotes) to install the emote you created.\
If you are testing your emote a lot it is recommended you use [The Helpful Feature](./a-helpful-feature) but if you want you can still install it every time
If you are testing your emote a lot it is recommended you use [The Helpful Feature](./a-helpful-feature) but if you want you can still install it every time.

If you want you can add an icon for your emote, just put the image in the emotes folder as `{nameofemotefile}.png`
If you want you can add an icon for your emote, just put the image in the emotes folder as `{nameOfEmoteFile}.png`
You can also add music to your emotes. See [here](./creating-music)
16 changes: 8 additions & 8 deletions pages/en/creating-emotes-blockbench.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@

## Creating Emotes With Blockbench

**This requires basic knowledge of how to move and rotate objects as well as use keyframes in blockbench.** For help with this see [this](https://www.youtube.com/playlist?list=PLjl_U0ndTXFc--5aIGQhcKQd8pOa99iK-)
**This requires basic knowledge of how to move and rotate objects as well as use keyframes in blockbench.** For help with this see [this](https://www.youtube.com/playlist?list=PLjl_U0ndTXFc--5aIGQhcKQd8pOa99iK-).

To start you are going to need [Blockbench](https://www.blockbench.net/downloads).

Then you are going to need the blockbench model. You can get it [here](./downloads#tool-downloads).
**Note that the blockbench model does not support bends**
Then you are going to need the Blockbench model. You can get it [here](./downloads#tool-downloads).
**Note that the Blockbench model does not support bends**

Once you have blockbench installed open the model.\
Once you have Blockbench installed open the model.\
To get started switch to the Animate tab.

In the top left click the Add Animation button.\
You can change the name and other paramiters however you like. When your done click confirm
You can change the name and other parameters however you like. When your done click confirm.

You can now move and rotate any of the joints how you want and add keyframes.

When you are done click the save button (Or ctrl + s) and save it as emote.json (Or anything else as long as it ends in .json)
When you are done, click the save button (Or `Ctrl + S`) and save it as emote.json (Or anything else as long as it ends in .json)

Next see [Installing Custom Emotes](./install-emotes) to install the emote you created.\
If you are testing your emote a lot it is recommended you use [The Helpful Feature](./a-helpful-feature) but if you want you can still install it every time
If you are testing your emote a lot it is recommended you use [The Helpful Feature](./a-helpful-feature) but if you want you can still install it every time.

If you want you can add an icon for your emote, just put the image in the emotes folder as `{nameofemotefile}.png`
If you want you can add an icon for your emote, just put the image in the emotes folder as `{nameOfEmoteFile}.png`
You can also add music to your emotes. See [here](./creating-music)
5 changes: 4 additions & 1 deletion pages/en/creating-music.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ To start you will need [Open Note Block Studio](https://opennbs.org/). Click dow

Once that is done run the program, you should be greeted with a blank song. Here you can create the song (If you need help see [this](https://www.youtube.com/watch?v=NFXzons84U8))

You can now create your song.

<span style="color: yellow;">**Important Note:**</span> You may only use the default Minecraft sounds\
<span style="color: yellow;">**Important Note:**</span> The file may not be any bigger than 32kb or it will crash on servers

When you are done the song click save and save it to the emotes folder as `{nameofemotefile}.nbs`. Then restart your game and it should work.
When you are done the song click save and save it to the emotes folder as `{nameOfEmoteFile}.nbs`. Then restart your game and it should work.
8 changes: 4 additions & 4 deletions pages/en/download-emotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

## Downloading Custom Emotes

Currently you can download emotes from from the [Open Emotes Collection](https://emotes.kosmx.dev/), [#emote-list](https://discord.com/invite/CNnyrqvD2H) in the [Discord server](https://discord.com/invite/38e348fxVS), or from the old [Emote archive](https://github.com/KosmX/Emotecraft-emotes).
Currently you can download emotes from from the [Emotes Open Collection](https://emotes.kosmx.dev/), [#emote-list](https://discord.com/invite/CNnyrqvD2H) in the [Discord server](https://discord.com/invite/38e348fxVS), or from the old [Emote archive](https://github.com/KosmX/Emotecraft-emotes).

In the Open Emotes Collection find the emote your want using the search feature and then click the download button.
In the Emotes Open Collection find the emote your want using the search feature and then click the download button.

In the Discord server find the emote you want from #emote-list and then click the title of the embed (For older emotes click the download button in the bottom right).
In the Discord server find the emote you want from [#emote-list](https://discord.com/invite/CNnyrqvD2H) and then click the title of the embed (For older emotes click the download button in the bottom right).

In the emote archive find the emote you want (eg. <https://github.com/KosmX/Emotecraft-emotes/blob/master/emotes/Twerk.json>). Then click the "Raw" button. Finally Right Click -> Save as.
In the emote archive find the emote you want (eg. <https://github.com/KosmX/Emotecraft-emotes/blob/master/emotes/Twerk.json>). Then right click the "Raw" button and hit Save as.

Next see [Installing Custom Emotes](./install-emotes) to install them from there.
17 changes: 9 additions & 8 deletions pages/en/downloads.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@

### Mod Downloads

For Forge and Fabric downloads it is recommended to use [Modrinth](https://modrinth.com/mod/emotecraft/versions).\
but you can also use Curseforge ([Forge](https://www.curseforge.com/minecraft/mc-mods/emotecraft-forge/files), [Fabric](https://www.curseforge.com/minecraft/mc-mods/emotecraft/files))
For Forge and Fabric downloads it is recommended to use [Modrinth](https://modrinth.com/mod/emotecraft/versions),\
but you can also use Curseforge ([Forge](https://www.curseforge.com/minecraft/mc-mods/emotecraft-forge/files), [Fabric](https://www.curseforge.com/minecraft/mc-mods/emotecraft/files)).

For the Bukkit plugin go [here](https://dev.bukkit.org/projects/emotecraft-bukkit/files).
For the Bukkit/Spigot plugin you can get it from [Modrinth](https://modrinth.com/plugin/emotecraft-bukkit/versions) or [Bukkit](https://dev.bukkit.org/projects/emotecraft-bukkit/files).\
If you would like to use commands on Bukkit/Spigot you will also need [this](https://dev.bukkit.org/projects/emotecraft-command-extension/files).

The most up to date versions for all loaders and also Bungee can be found on [Github](https://github.com/KosmX/emotes/releases).
The most up to date versions for all loaders + Bungee and Velocity can be found on [Github](https://github.com/KosmX/emotes/releases).

Next see [Installing on Forge/Fabric](./install-client) to install the mod on your client or [Installing on a Server](./install-server) for a server.
Next see [Installing on Forge/Fabric](./install-client) to install the mod on your client, or [Installing on Bukkit/Spigot/Bungee](./install-server) for a server.

### Tool Downloads

[Blender with bends](https://github.com/KosmX/emotes/raw/dev/blender/emote_creator_bend.blend) (Reccomended)\
[Blender without bends](https://github.com/KosmX/emotes/raw/dev/blender/emote_creator.blend)
<a class="download" href="https://raw.githubusercontent.com/KosmX/emotes/dev/blender/emote_creator_bend.blend" download="emotecraft-model-bends.blend">Blender model with bends</a> (Recommended)\
<a class="download" href="https://raw.githubusercontent.com/KosmX/emotes/dev/blender/emote_creator.blend" download="emotecraft-model.blend">Blender model</a>

[Blockbench](https://github.com/KosmX/emotes/raw/dev/blender/model.bbmodel)
<a class="download" href="https://raw.githubusercontent.com/KosmX/emotes/dev/blender/model.bbmodel" download="emotecraft-model.bbmodel">Blockbench model</a>
Loading

0 comments on commit f3e8807

Please sign in to comment.