-
Posts
76 -
Joined
-
Last visited
Zane49er's Achievements
Stone Miner (3/8)
3
Reputation
-
Yes, thank you. Everything seems to be working.
-
"Team" doesn't seem to even be an option, and thanks for the suggestion, but sorry, I'm going to take that as a last resort.
-
Ok, it's sort of working now... it has stupid git repository reminders EVERYWHERE, but it runs... Do you know how to remove those? as well as being annoying, they obstruct the error reminders.
-
I agree that the "Oxygen" update is stupid. I wish I could go back, but there is zero back-compatibility so I'd have to reset everything... I'll try that then.
-
Yes... though it isn't out of the question that the repository was improperly configured...
-
It says that "either they already exist in this workspace or their project description file is corrupt."
-
https://snag.gy/nC2Rrq.jpg
-
Alright, those worked, but it still shows as empty.
-
It seems that I'll have to install or find JDK... Thought I did that already, but apparently not...
-
Nope, the build failed and the window closed before I could see why.
-
I think this might actually be the problem - it was downloaded to a profile that doesn't exist on the new computer. I'll move it somewhere sensible.
-
Sorry for yet another newbie question, but... I just replaced my computer, and can't figure out how to re-add my code from the repository to my new eclipse install. The code probably isn't necessary, but it's here: https://github.com/zane49er2/VMC I have already tried downloading it and selecting the main folder as a workspace, but that showed an empty workspace with no projects.
-
May be deleted for uselessness, but this path isn't working
Zane49er replied to Zane49er's topic in Modder Support
Thanks. I'm surprised I didn't notice that. The first slash was the cause of the crash, removing it gives the exact result I want: String resourceName = "assets/vmc/BookPages/" + pageID + ".json"; BufferedReader pageScan = new BufferedReader(new InputStreamReader(getClass().getClassLoader ().getResourceAsStream(resourceName), "UTF-8")); JsonObject pageData = new Gson().fromJson(pageScan, JsonObject.class); pageName = pageData.get("name").getAsString(); -
May be deleted for uselessness, but this path isn't working
Zane49er replied to Zane49er's topic in Modder Support
String resourceName = "/assets/vmc/BookPages/" + pageID + ".json"; BufferedReader pageScan = new BufferedReader(new InputStreamReader(getClass().getClassLoader ().getResourceAsStream(resourceName), "UTF-8")); String pageString = ""; while(pageScan.ready()){ pageString += pageScan.readLine(); } JsonObject pageData = new Gson().fromJson(ResourceManager.getString(pageString), JsonObject.class); pageName = pageData.get("name").getAsString(); I guess I should explain why I'm doing this. Before attempting to make this .json file into a string, I was reading a plain text file and reading each line into a variable in an object in an array. The text files obviously started to get really ugly, so I wanted to format it as JSON, which is exactly the format that I was emulating with the arrays. GSON made this mostly easy except that it needs a string for an input. Is there a way I can get this JSON document into a string, or am I missing something that would make this much easier? The code above causes nullpointerexception crash from the inputStreamReader on the second line, which was previously working fine. -
May be deleted for uselessness, but this path isn't working
Zane49er replied to Zane49er's topic in Modder Support
I'm having a hard time understanding what this is doing. What is HardLib and why are you getting its runtime class? How do you go from byte array to something usable? I see the toString method there, but also on the bufferedReader.