Jump to content

OneGaming36

Members
  • Posts

    9
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Location
    Germany

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

OneGaming36's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. This one works fine too, thank you for your help.
  2. JayJay1989 did just release a working version of the mod on github, after I asked him for help. https://github.com/JayJay1989/gamesense-sdk/releases Thank you anyways @loordgek and Merry Christmas.
  3. Wow! Thank you sooo much. I'd really appreciate it.
  4. Alright thank you, I guess I need to wait till someone does it, altough its been already at least 1 month ago. Maybe I will try to learn all this myself, but I suppose it takes a lot of time, which I don't really have.
  5. No idea how this works, I guess I need to learn a lot first before I can do this. Do you know where I could find someone who would do this for me? Is github the only place for things like this?
  6. https://github.com/SteelSeries/gamesense-sdk/pull/39/commits/13d59b2726fc984e30566a6baeb1b4675e4345e6
  7. Alright, I will have a look into this. As I said, I'm programming, especially in java, is new to me and I'm really trying my best. So the website says they have been porting it to 1.12.2, how can I download the new version of the mod? I don't really get how the website and all the content in the list are supposed to work.
  8. Modified code of mcmod.info [ { "modid": "gamesense", "name": "GameSense Mod", "description": "This is a mod that sends events to SteelSeries Engine 3 GameSense.", "version": "1.11", "mcversion": "1.12.2", "url": "", "updateUrl": "", "authorList": ["David Tibbetts"], "credits": "Thanks to MinecraftForge for providing the framework.", "logoFile": "", "screenshots": [], "dependencies": [] } ] Modified code of GameSenseMod.class // // Source code recreated from a .class file by IntelliJ IDEA // (powered by Fernflower decompiler) // package com.sse3.gamesense; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ChatComponentText; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.Mod.Instance; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import org.apache.http.HttpResponse; import org.apache.http.client.config.RequestConfig; import org.apache.http.client.methods.HttpPost; import org.apache.http.conn.ConnectTimeoutException; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.message.BasicHeader; import org.json.JSONException; import org.json.JSONObject; @Mod( modid = "gamesense", name = "gamesense", version = "1.11", acceptedMinecraftVersions = "[1.12.2]" ) public class GameSenseMod { public static final String MODID = "gamesense"; public static final String VERSION = "1.11"; @Instance("gamesense") public static GameSenseMod instance; private CloseableHttpClient sseClient = null; private HttpPost ssePost = null; private String sse3Address = ""; private Boolean isConnected = false; private long lastTick = 0L; public GameSenseMod() { } public void SendGameEvent(String eventName, int data, EntityPlayer player) { JSONObject eventData = new JSONObject(); eventData.put("value", data); this.SendGameEvent(eventName, eventData, player); } public void SendGameEvent(String eventName, Boolean data, EntityPlayer player) { JSONObject eventData = new JSONObject(); eventData.put("value", data); this.SendGameEvent(eventName, eventData, player); } public void SendGameEvent(String eventName, String data, EntityPlayer player) { JSONObject eventData = new JSONObject(); eventData.put("value", data); this.SendGameEvent(eventName, eventData, player); } public void SendGameEvent(String eventName, JSONObject dataObject, EntityPlayer player) { JSONObject event = new JSONObject(); event.put("game", "SSMCMOD"); event.put("event", eventName); event.put("data", dataObject.toString()); this.executePost(event.toString(), player); } private void executePost(String urlParameters, EntityPlayer player) { try { if (!this.isConnected) { if (System.currentTimeMillis() - this.lastTick < 5000L) { return; } this.lastTick = System.currentTimeMillis(); } this.isConnected = true; StringEntity se = new StringEntity(urlParameters); se.setContentType(new BasicHeader("Content-Type", "application/json")); this.ssePost.setEntity(se); HttpResponse response = this.sseClient.execute(this.ssePost); if (response != null) { this.ssePost.reset(); } } catch (ConnectTimeoutException var5) { this.isConnected = false; if (player != null) { player.func_145747_a(new ChatComponentText("There was an error connecting to SteelSeries Engine 3")); } } catch (Exception var6) { ; } } private void ConnectToSSE3() { String jsonAddress = ""; String corePropsFileName; BufferedReader coreProps; try { corePropsFileName = System.getenv("PROGRAMDATA") + "\\SteelSeries\\SteelSeries Engine 3\\coreProps.json"; coreProps = new BufferedReader(new FileReader(corePropsFileName)); jsonAddress = coreProps.readLine(); System.out.println("Opened coreprops.json and read: " + jsonAddress); coreProps.close(); } catch (FileNotFoundException var7) { System.out.println("coreprops.json not found (Mac check)"); } catch (IOException var8) { var8.printStackTrace(); System.out.println("Something terrible happened looking for coreProps.json"); } if (jsonAddress == "") { try { corePropsFileName = "/Library/Application Support/SteelSeries Engine 3/coreProps.json"; coreProps = new BufferedReader(new FileReader(corePropsFileName)); jsonAddress = coreProps.readLine(); System.out.println("Opened coreprops.json and read: " + jsonAddress); coreProps.close(); } catch (FileNotFoundException var5) { System.out.println("coreprops.json not found (Windows check)"); } catch (IOException var6) { var6.printStackTrace(); System.out.println("Something terrible happened looking for coreProps.json"); } } try { if (jsonAddress != "") { JSONObject obj = new JSONObject(jsonAddress); this.sse3Address = "http://" + obj.getString("address") + "/game_event"; } else { this.sse3Address = "http://localhost:3000/game_event"; } this.sseClient = HttpClients.createDefault(); RequestConfig sseReqCfg = RequestConfig.custom().setSocketTimeout(10).setConnectTimeout(10).setConnectionRequestTimeout(50).build(); this.ssePost = new HttpPost(this.sse3Address); this.ssePost.setConfig(sseReqCfg); } catch (JSONException var4) { var4.printStackTrace(); System.out.println("Something terrible happened creating JSONObject from coreProps.json."); } } @EventHandler public void preInit(FMLPreInitializationEvent event) { } @EventHandler public void init(FMLInitializationEvent event) { this.ConnectToSSE3(); } @EventHandler public void postInit(FMLPostInitializationEvent event) { MinecraftForge.EVENT_BUS.register(new GameSenseEventReceiver(Minecraft.func_71410_x())); } } If you need any more info just tell me.
  9. Hey guys, I got a new computer which actually supports Steelseries GameSense, a mod which changes the lighting of my keyboard depending on events ingame (like low health, being hungry, ...). So if I have full health my keyboard is green, but the lower my health gets it turns yellow/orange and finally red. Now this mod seems to be only available on MC 1.8, but I need it to work on MC 1.12.2 (latest version). So I tried to reprogram it and change everything inside the coding which says version 1.8 to 1.12.2 (check pictures, where it says 1.8 I changed it to 1.12.2). I saved everything and put the modified mod into the Forge mod folder. But now the forge won't load the mod anymore (Forge 1.12.2), it just starts the game and doesn't show the mods in the mod list (ingame), although everything worked fine with unmoddified files on 1.8. Could you guys please help me to make this mod running on the latest MC versions, in this case 1.12.2? I don't have too much knowledge about java, but I'm doing my best to learn about it and figure out how everything works, or in my case doesn't work. Thanks for your help!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.