···44The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
55and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6677+### [1.3.3]
88+- Fixed commands not registering when running `/reload`.
99+- Cleaned up commands code a bit.
1010+- Finally added a nix development flake.
1111+712### [1.3.2]
813- Added Traditional Chinese (Hong Kong) translations. (Thanks to [Dicecan](https://github.com/Dicecan)
914- Updated Traditional Chinese (Taiwan) and Simplified Chinese translations. (Thanks to [Dicecan](https://github.com/Dicecan))
+18-7
README.md
···3333<br>
34343535### TODO:
3636-3736#### Planned commands:
3837- [ ] `/wild` - Teleports you to a random location in the Overworld
3938- [x] `/worldspawn` - Teleports you to the worldspawn
···5756- [x] Add Quilt support and NeoForge
585759586060-#### Want to help?
6161-5959+### Want to help?
62601. You can create a translation file so other people can use the mod in their native language: [translations.md](./common/src/main/resources/assets/teleport_commands/lang/translations.md)
636164626565-#### How to build
6666-w.i.p.
6767-just use correto21 and an intellij idea, then just run the build option that should appear. That's what I do :3
6363+### How to build
6464+#### Getting the correct environment
6565+If you are on nixos you can simply go into the folder of where you cloned the repo, and run `nix develop .`. This will give you the environment I use (apart from the IDE) :3.
6666+6767+On any other linux distro, just install the jetbrains jdk, or try openjdk21.
6868+6969+On windows probably go to the openjdk website and install the 21 version? idk goodluck.
7070+7171+#### Building
7272+Then on linux just do `./gradlew build` and to make it in a single mod jar `./gradlew mergeJars`.
68737474+Or on windows, just do `.\gradlew.bat build` and `.\gradlew.bat mergeJars`.
7575+Note that this isn't tested for windows, but I think that is how it works.
69767070-#### Notes
7777+#### Getting the jars
7878+Then you can find your jars in `fabric/build/libs/` (for fabric), `neoforge/build/libs/` (for neoforge) or `merged/build/libs/` (if you made the merged jar file).
71798080+If you have any issues just make an issue or contact me on Discord `@mrsnowy_`
8181+8282+### Notes
7283Colors:
7384- Green = When something succeeds and an action will happen
7485- Aqua = When something needs attention
···66public class Constants {
77 public static final String MOD_ID = "teleport_commands";
88 public static final String MOD_NAME = "Teleport Commands";
99- public static final String VERSION = "1.3.2";
99+ public static final String VERSION = "1.3.3";
10101111 public static final Logger LOGGER = LoggerFactory.getLogger(MOD_NAME);
1212}
···11package dev.mrsnowy.teleport_commands;
2233import com.google.gson.*;
44+import com.mojang.brigadier.CommandDispatcher;
45import dev.mrsnowy.teleport_commands.storage.StorageManager;
56import dev.mrsnowy.teleport_commands.commands.*;
67import dev.mrsnowy.teleport_commands.storage.DeathLocationStorage;
88+import net.minecraft.commands.CommandSourceStack;
79import net.minecraft.commands.Commands;
810import net.minecraft.server.MinecraftServer;
911import net.minecraft.server.level.ServerPlayer;
···3739 StorageManager.STORAGE = storageValidator(); // Initialize the storage file
3840 DeathLocationStorage.clearDeathLocations(); // Clear data of death locations.
39414040- // initialize commands, also allows me to easily disable any when there is a config
4141- Commands commandManager = server.getCommands();
4242- back.register(commandManager);
4343- home.register(commandManager);
4444- tpa.register(commandManager);
4545- warp.register(commandManager);
4646- worldspawn.register(commandManager);
4742 }
48434444+ // initialize commands, also allows me to easily disable any when there is a config
4545+ public static void registerCommands(CommandDispatcher<CommandSourceStack> dispatcher) {
4646+ back.register(dispatcher);
4747+ home.register(dispatcher);
4848+ tpa.register(dispatcher);
4949+ warp.register(dispatcher);
5050+ worldspawn.register(dispatcher);
5151+ }
49525053 // Runs when the playerDeath mixin calls it, updates the /back command position
5154 public static void onPlayerDeath(ServerPlayer player) {
···22# Every field you add must be added to the root build.gradle expandProps map.
3344# Project
55-version=1.3.2
55+version=1.3.3
66group=dev.mrsnowy.teleport_commands
77java_version=21
88