Skip to content

Commit

Permalink
Maintenance work on the docs (#44)
Browse files Browse the repository at this point in the history
* Maintenance work on the docs
  • Loading branch information
stantios authored Jan 19, 2024
1 parent ebb5fcd commit 4a8d54b
Show file tree
Hide file tree
Showing 34 changed files with 128 additions and 148 deletions.
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## JourneyMap Docs
# JourneyMap Docs

This repository contains user documentation for the JourneyMap mod. Written in markdown and compiled into a static site using [MkDocs](https://www.mkdocs.org/) and [Material for Mkdocs](https://squidfunk.github.io/mkdocs-material/).

### Contributing
## Contributing

We are happy to accept pull requests for documentation changes. If you would like to contribute, please fork this repository and submit a pull request. If you are not familiar with Git or GitHub, you can also submit an issue with your suggested changes, and we will add them to the documentation.

Expand All @@ -13,16 +13,13 @@ When submitting a pull request, please follow these guidelines:

## Installing

To run the documentation locally, you will need to first install MkDocs and Material for MkDocs. You can do this by running the following commands:
To run the documentation locally, you will need to first install MkDocs and Material for MkDocs. You can do this by running the following command:

- `pip install mkdocs`
- `pip install mkdocs-material`
- `pip install mkdocs-glightbox`
- `pip install mike`
- `pip install -r requirements.txt`

These commands will install MkDocs and Material for MkDocs.


Run one of the following commands to start the local documentation server:

1. `mkdocs serve -f ./config/en/mkdocs.yml`
2. `python -m mkdocs serve -f ./config/en/mkdocs.yml`
22 changes: 15 additions & 7 deletions config/en/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,26 @@ theme:
name: material
custom_dir: ../../overrides
palette:
- scheme: default
primary: indigo
accent: indigo

# Palette toggle for automatic mode
- media: "(prefers-color-scheme)"
toggle:
icon: material/brightness-auto
name: Switch to light mode

# Palette toggle for light mode
- media: "(prefers-color-scheme: light)"
scheme: default
toggle:
icon: material/brightness-7
name: Switch to dark mode
- scheme: slate
primary: indigo
accent: indigo

# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
toggle:
icon: material/brightness-4
name: Switch to light mode
name: Switch to system preference

extra:
version:
Expand Down
4 changes: 3 additions & 1 deletion docs/en/About/credits.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# **Credits**

>"It is amazing what you can accomplish if you do not care who gets the credit." - Harry S. Truman
## **Under The Hood**

JourneyMap includes and/or makes use of the following software under their respective licenses:
JourneyMap includes and/or makes use of the following software under their respective licenses:

**Minecraft**

Expand Down
2 changes: 1 addition & 1 deletion docs/en/About/licensing.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## **Licensing**
# **Licensing**

JourneyMap is distributed under an All Rights Reserved license. This means that you may not alter, host or distribute JourneyMap yourself.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/About/support.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## **Live Help on Discord**
# **Live Help on Discord**

**Support is available on the public [JourneyMap Discord server](https://discord.gg/eP8gE69)**

Expand Down
2 changes: 1 addition & 1 deletion docs/en/Client Docs/full-screen-map.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## **Full-Screen Map**
# **Full-Screen Map**

By pressing the full-screen map key (by default, the ++j++ key), you can open the full-screen map.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/Client Docs/installing.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ If you prefer a more complete guide you can read and follow along with at your o
- [The CurseForge Launcher](https://download.curseforge.com/)
- [MultiMC](https://multimc.org/)
- [The official Minecraft Launcher](https://www.minecraft.net/download)

We recommend MultiMC for ease of use, but any launcher will work just fine.

2. Ensure that you have a copy of Java installed. If not, you can download a copy from the [Adoptium website](https://adoptium.net/temurin/releases/).
Expand Down
2 changes: 1 addition & 1 deletion docs/en/Client Docs/settings/advanced.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## **Advanced Settings**
# **Advanced Settings**

This section contains advanced settings for power users and those that may wish to tweak some of JourneyMap’s internals.

Expand Down
4 changes: 2 additions & 2 deletions docs/en/Client Docs/settings/cartography.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## **Cartography Settings**
# **Cartography Settings**

The cartography settings allow you to customize how the map is rendered, and what is shown on it.

Expand Down Expand Up @@ -35,6 +35,6 @@ The default option for each setting below is marked with **bold text.**
| Setting | Options | Description |
|----------------------|---------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Reveal Shape | <ul><li>Square</li><li>**Circle**</li></ul> | Whether to reveal chunks in a circle or square - circle reveals show fewer chunks at once, and so perform better |
| Render Delay | Range: 0 - 10 (in seconds, Default: **2**) | How often JourneyMap should try to render the chunks around you - Higher values can result in better performance, but may result in chunks being missed when travelling at high speed |
| Render Delay | Range: 0 - 10 (in seconds, Default: **2**) | How often JourneyMap should try to render the chunks around you - Higher values can result in better performance, but may result in chunks being missed when traveling at high speed |
| Cave Max Distance | Range: 0 - 32 (in chunks, Default: **0**) | The maximum distance within which to attempt to render the map while in a cave - if you set this higher than your render distance, then this will use that instead |
| Surface Max Distance | Range: 0 - 32 (in chunks, default: **0**) | The maximum distance within which to attempt to render the map while above ground -if you set this higher than your render distance, then this will use that instead |
2 changes: 1 addition & 1 deletion docs/en/Client Docs/settings/full-screen-map.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## **Full-Screen Map Settings**
# **Full-Screen Map Settings**

The full-screen map provides a large, scrollable view of your entire map. Just like the minimap presets, it can be
customized to a great deal.
Expand Down
2 changes: 1 addition & 1 deletion docs/en/Client Docs/settings/grid.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## **Grid Settings**
# **Grid Settings**

Both minimap presets and the full-screen map may have a configurable grid overlay. You can customize this overlay by clicking on the Edit Grid… button below the settings in each respective category.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/Client Docs/settings/minimap.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## **Minimap Settings**
# **Minimap Settings**

JourneyMap allows you to have two minimap presets. Each preset represents a separate set of settings - essentially
allowing you to have two distinct minimaps available to switch between.
Expand Down
2 changes: 1 addition & 1 deletion docs/en/Client Docs/settings/overview.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## **Settings**
# **Settings**

JourneyMap provides more than a few configuration options, allowing you to customize the behaviour and appearance of many different aspects of the mod. All of these settings are made available through the settings manager.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/Client Docs/settings/waypoint-beacon.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## **Waypoint Beacon Settings**
# **Waypoint Beacon Settings**

By default, waypoints are displayed in the world using a beacon beam in the distance, which allows you to see where they
are from anywhere in the world. By default, you can look towards the beam and see the waypoint’s icon and label as well.
Expand Down
2 changes: 1 addition & 1 deletion docs/en/Client Docs/settings/waypoint.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## **Waypoint Settings**
# **Waypoint Settings**

This category allows you to change some settings relating to how [waypoints](../waypoints.md) behave and are displayed.
Waypoints also have a number of individual settings - you can find out about those
Expand Down
2 changes: 1 addition & 1 deletion docs/en/Client Docs/settings/webmap.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## **Webmap Settings**
# **Webmap Settings**

The webmap is an entirely different way to view your map - in a web browser instead of from directly within Minecraft. This allows you to have a map view visible on another screen, or even another device!

Expand Down
9 changes: 5 additions & 4 deletions docs/en/Client Docs/waypoints.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## **Waypoints**
# **Waypoints**

Waypoints allow you to mark specific locations on your map, in order to keep track of those locations or easily find your way back to them later.

Expand Down Expand Up @@ -38,7 +38,7 @@ Each waypoint has the following options available:

- **Teleport**: If allowed by the server, teleport directly to the waypoint
- **Find**: Find the waypoint on the [full-screen map](full-screen-map.md)
- **On/Off**: Toggle the waypoint’s visibilty ingame
- **On/Off**: Toggle the waypoint’s visibility ingame
- **Remove**: Delete the waypoint
- **Edit**: Open the waypoint editor
- **Chat**: Copy the waypoint’s information to the chat box, as shown:
Expand Down Expand Up @@ -82,9 +82,10 @@ In JourneyMap 5.8.5, a new command was added which allows you to create, delete
- Reloads waypoints in the waypoint directory without having to restart.
- Primarily used when dropping waypoint files into the folder while the game is running.

```
```text
/jm reload
```

The create and delete commands are only available when the server has JourneyMap installed and if the player has op permissions. You can find more information about the add and delete commands [here](https://teamjm.github.io/journeymap-docs/Server%20Docs/waypoints/).

## **How to Share Waypoints and Locations**
Expand All @@ -108,7 +109,7 @@ A location must minimally have the x and z coordinates, but any of the following
A location consists of 2 or more ''name:value'' pairs, separated with commas. Any of the following values is supported:

- x (integer) **required**
- y (integer)
- y (integer)
- z (integer) **required**
- dim (integer)
- name (string, no quotes, no commas)
14 changes: 7 additions & 7 deletions docs/en/Server Docs/Commands/waypoint_command.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
## **Waypoint Commands**
# **Waypoint Commands**

Commands allows you to create and delete waypoints from the chat.

Note: <u>It will not be ported to older versions<u>
Note: <u>It will not be ported to older versions</u>

- Command: waypoint
- Alias: wp

**Create Waypoint**

```
```text
fields in [] are optional ->
[player] is the target player, if no player is specified it sends to all
[announce] is whether the player has a notification that a waypoint is being created, if it is not specified, defaults to false it is created silently.
Expand All @@ -19,7 +19,7 @@ fields in [] are optional ->

**Examples**

```
```text
- /waypoint create "Spawn" minecraft:overworld 1 50 12 aqua
- /waypoint create "Home" minecraft:overworld 1 50 12 aqua mysticdrew
- /waypoint create "Home" minecraft:overworld 1 50 12 aqua true~~ currently bugged in v5.8.x
Expand All @@ -28,9 +28,9 @@ fields in [] are optional ->

**Delete Waypoint**

Note: <u>Only deletes waypoints created by command<u>
Note: <u>Only deletes waypoints created by command</u>

```
```text
/waypoint delete "WaypointName"
/waypoint delete "WaypointName" true
/waypoint delete "WaypointName" mysticdrew
Expand All @@ -39,4 +39,4 @@ Note: <u>Only deletes waypoints created by command<u>

**As of JourneyMap 5.9.0**

All waypoint commands require use of the player field. It takes a player or a list of players or `@a` for both create and delete.
All waypoint commands require use of the player field. It takes a player or a list of players or `@a` for both create and delete.
24 changes: 16 additions & 8 deletions docs/en/Server Docs/Endpoints/waypoint.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## **Waypoints**
# **Waypoints**

The External Waypoint Packet Listener is a feature that allows the server to send waypoints to the client. This is useful for server admins who want to provide waypoints to players without requiring an addon mod.

Expand All @@ -7,26 +7,31 @@ The External Waypoint Packet Listener is a feature that allows the server to sen
Below is an example of what the packet json looks like and what information the server sends to the client to process and interpret.

Packet Identifier
```

```text
discriminator:0
channel:journeymap:waypoint
```

Packet Buffer

```text
<code>waypoint StringUtf</code> value -> waypointjson.toString();
<code>action StringUtf</code> value-> "create" or "delete"
<code>announce Boolean</code> -> value true or false : Announce determines if the user is notified when a waypoint is created or deleted.
```

Packet Reader (journeymap's client code)
```

```text
this.waypoint = buf.readUtf();
this.action = buf.readUtf();
this.announce = buf.readBoolean();
```

**Example Create Payload**

```
```json
{
"id": "home_-10,70,32",
"name": "home",
Expand All @@ -47,6 +52,7 @@ this.announce = buf.readBoolean();
}
```

```text
id -> <code>id = "name + "_" + x + "," + y + "," + z"</code> this format is required.<br>
name -> waypoint name<br>
icon -> <code>journeymap:ui/img/waypoint-icon.png</code> this is required<br>
Expand All @@ -61,19 +67,20 @@ g -> green value<br>
b -> blue value<br>
persistent -> <code>true</code> saves to disk, will load when the user restarts minecraft, or changes dimensions. <code>false</code> is not saved to disk, is removed from memory when the user exists minecraft<br>
dimensions -> list of dimensions<br>

```

**Example Delete Payload**

```
```json
{
"name": "test"
}
```

name -> waypoint name is all that is required to delete the waypoint.
Example implementation using CraftBukkit
```

```java
public static void createWaypoint(Player player, String name, IntVector3 pos, WaypointType type, ChatColor color) {
Color rgb = color.getColor();
JsonObject obj = new JsonObject();
Expand Down Expand Up @@ -119,7 +126,8 @@ Example implementation using CraftBukkit

If you have the PacketDataSerializer (PacketBuffer) deobfuscated it would most likely use buffer.writeString(...) rather than buffer.a(...)
If you want to use a different buffer/write manually the internals of that method are something like:
```

```java
public PacketDataSerializer writeString(String s, int byteLimit) {

byte[] bytes = s.getBytes(StandardCharsets.UTF_8);
Expand Down
Loading

0 comments on commit 4a8d54b

Please sign in to comment.