Select the types of activity you want to include in your feed.
a lot of stuff
Added translation system, added quilt support, improved messages, improved performance by changing the death event to be player specific (not on all entities), replaced all events with mixins...
···2828### TODO:
29293030#### Planned commands:
3131-- `/wild` - Teleports you to a random location in the Overworld
3232-- `/worldspawn` - Teleports you to the worldspawn
3333-- `/spawn <dimension>` - Teleports you to your spawnpoint in a dimension, defaults to your current dimension
3131+-[ ] `/wild` - Teleports you to a random location in the Overworld
3232+-[ ] `/worldspawn` - Teleports you to the worldspawn
3333+-[ ] `/spawn <dimension>` - Teleports you to your spawnpoint in a dimension, defaults to your current dimension
34343535#### Improvements:
3636-- Modify /back to check if the location is safe and automatically choose a nearby location that is safe
3737-- Create a config to add any delays and disable commands, also add commands for operators in game
3838-- Add translation file
3939-- Improve responses for commands
4040-- Add a perm system
4141-- Limit tpa requests for a player
4242-- Add Quilt support and maybe NeoForge
3636+-[ ] Modify /back to check if the location is safe and automatically choose a nearby location that is safe
3737+-[ ] Create a config to add any delays and disable commands, also add commands for operators in game
3838+-[ ] Add a perm system
3939+-[ ] Limit tpa requests for a player
4040+-[x] Add translation system
4141+-[x] Improve responses for commands
4242+-[x] Add Quilt support and NeoForge
4343+4444+4545+### Want to help?
4646+4747+#### You can create a Translation file so other people can use the mod in their native language
4848+1. Clone the repository
4949+2. Go to `common/src/main/resources/assets/teleport_commands/lang/`
5050+3. Go to [here](https://minecraft.wiki/w/Language) and pick the in-game locale code for the language you want to translate
5151+4. Copy `en_us.toml` and paste it in a new file called `[in-game locale code here].toml`
5252+5. Translate the file
5353+6. Submit a pull request with your translation :D!
···11package dev.mrsnowy.teleport_commands;
2233import net.fabricmc.api.ModInitializer;
44-import net.fabricmc.fabric.api.event.lifecycle.v1.ServerEntityEvents;
55-import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents;
66-import net.minecraft.server.level.ServerPlayer;
77-88-import java.util.Objects;
94105public class fabricInit implements ModInitializer {
116···1510 // However, some things (like resources) may still be uninitialized.
1611 // Proceed with mild caution.
17121818- TeleportCommands.LOGGER.info("Teleport Commands loaded! Hello Fabric!");
1919-2020- // initialize the mod
2121- ServerLifecycleEvents.SERVER_STARTED.register((server) -> {
2222- TeleportCommands.initializeMod(server, "Fabric");
2323- });
2424-2525-2626- // check if it is a player and check if the player died
2727- ServerEntityEvents.ENTITY_UNLOAD.register((entity, world) -> {
2828- if (entity instanceof ServerPlayer player) {
2929- if (player.getRemovalReason() != null && (Objects.equals(player.getRemovalReason().toString(), "KILLED") || Objects.equals(player.getRemovalReason().toString(), "DISCARDED"))) {
3030- TeleportCommands.onPlayerDeath(player);
3131- }
3232- }
3333- });
1313+ TeleportCommands.MOD_LOADER = "Fabric";
3414 }
3515}
···11package dev.mrsnowy.teleport_commands;
2233-import net.neoforged.bus.api.EventPriority;
44-import net.neoforged.bus.api.IEventBus;
55-import net.neoforged.bus.api.SubscribeEvent;
63import net.neoforged.fml.common.Mod;
77-import net.neoforged.neoforge.event.entity.living.LivingDeathEvent;
88-import net.neoforged.neoforge.event.server.ServerStartingEvent;
99-import net.minecraft.server.level.ServerPlayer;
104115@Mod(TeleportCommands.MOD_ID)
126public class neoforgeInit {
1371414- public neoforgeInit(IEventBus eventBus) {
88+ public neoforgeInit() {
159 // This method is invoked by the NeoForge mod loader when it is ready
1610 // to load your mod. You can access NeoForge and Common code in this
1711 // project.
18121919- TeleportCommands.LOGGER.info("Teleport Commands loaded! Hello NeoForge!");
2020- }
2121-2222- @Mod.EventBusSubscriber(modid = TeleportCommands.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE)
2323- private static class NeoForgeEventSubscriber {
2424-2525- @SubscribeEvent(priority = EventPriority.HIGHEST)
2626- private static void onServerStarting(ServerStartingEvent event) {
2727- // initialize the mod
2828- TeleportCommands.initializeMod(event.getServer(), "NeoForge");
2929- }
3030-3131- @SubscribeEvent(priority = EventPriority.HIGHEST)
3232- private static void onEntityUnload(LivingDeathEvent event) {
3333- // check if it is a player
3434- if (event.getEntity() instanceof ServerPlayer player) {
3535- TeleportCommands.onPlayerDeath(player);
3636- }
3737- }
1313+ TeleportCommands.MOD_LOADER = "NeoForge";
3814 }
3915}
4016
+2
neoforge/src/main/resources/META-INF/mods.toml
···1212credits="${credits}" #optional
1313authors = "${mod_author}" #optional
1414description = '''${description}''' #mandatory (Supports multiline text)
1515+[[mixins]]
1616+config = "${mod_id}.mixins.json"
1517[[dependencies.${mod_id}]] #optional
1618modId = "neoforge" #mandatory
1719type="required" #mandatory (Can be one of "required", "optional", "incompatible" or "discouraged")
···11+package dev.mrsnowy.teleport_commands;
22+33+import org.quiltmc.loader.api.ModContainer;
44+import org.quiltmc.qsl.base.api.entrypoint.ModInitializer;
55+66+public class quiltInit implements ModInitializer {
77+88+ @Override
99+ public void onInitialize(ModContainer mod) {
1010+ // This code runs as soon as Minecraft is in a mod-load-ready state.
1111+ // However, some things (like resources) may still be uninitialized.
1212+ // Proceed with mild caution.
1313+1414+ TeleportCommands.MOD_LOADER = "Quilt";
1515+ }
1616+}