Skip to content

Commit

Permalink
add tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
radmanplays committed Feb 17, 2024
1 parent 61ef9cf commit fd2d29a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default defineConfig({
text: 'Getting started',
collapsed: false,
items: [
{ text: 'How to Install Mods', link: '/apidocs/how-to-install-mods' },
{ text: 'Introduction', link: '/apidocs/' },
// ...
],
Expand Down
20 changes: 20 additions & 0 deletions docs/apidocs/how-to-install-mods.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# How to install mods

1. Open the compiled client
2. click the "Mods" button in the main menu or the pause menu
3. click "Add New" to install a mod from a url or click "Upload" to upload a Mod

heres a example mod to test this out with:

url : https://raw.githubusercontent.com/eaglerforge/eaglerforge.github.io/main/docs/example.js

the code inside of the example mod :
```
function runCode() {
if (document.pointerLockElement != null){//if pointerlock is enabled (the player is in game)
ModAPI.displayToChat({msg: "hello"})
ModAPI.displayToChat({msg: "welcome to eaglerforge!"})
}
}
var intervalId = setInterval(runCode, 50);//run the code in a loop
```

0 comments on commit fd2d29a

Please sign in to comment.