I am at the moment engaged on a Minecraft mod (Minecraft 1.12.2) utilizing Minecraft Forge the place the participant can use a hotkey to ship out a “SOS” message in a discord-server utilizing a discord-bot. This SOS-message may include issues like the present coordinates of the participant, the time of day, and so on.
Now, I am a complete beginner on this subject and when attempting to implement this mod I am struggling to get sure details about the participant (on this case the present coordinates). I assume this may be accessed by a sure class (undecided whether or not that is true or not), however when looking out the online most search-results inform you see your present coordinates in recreation (which isn’t what I need: I need to have the ability to take these coordinates and ship them to a discord-bot for instance).
Anybody who has expertise on this subject and will assist me?
Only for data: tha title of the mod is “KDPVP” and my present program is written within the “KdPvp.java” file contained in the bundle “com.cy4.kdpvp” contained in the src/essential/java folder of my challenge.
The present code in “KdPvp.java”:
bundle com.cy4.kdpvp;
import internet.minecraftforge.fml.widespread.Mod;
@Mod(modid = KdPvp.MODID, title = KdPvp.NAME, model = KdPvp.VERSION)
public class KdPvp
{
public static closing String MODID = "kdpvp";
public static closing String NAME = "KDPVP";
public static closing String VERSION = "1.0";
public void sendSos()
{
// TODO take the present coordinates and ship them to the discord bot
}
}