Jump to content

tuskiomi

Forge Modder
  • Posts

    153
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    >:O THE CHUNKS ARE LOADING!

Recent Profile Visitors

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

tuskiomi's Achievements

Creeper Killer

Creeper Killer (4/8)

13

Reputation

  1. Hello all. It's been a while since my last post, I need some assistance from those who are familiar with the internals of the forge modding API. I want to create a wrapper around the current forge API that will allow calls to the code via HTTP. This, in theory, would allow any and all mods to run as a standalone executable, with local networking being the interface between processes. I only want to do this a server-side modification, as there would be little benefit from a client perspective. What this would do is allow a deployment of forge (and mods) over a micro services manager (ex: Kubernetes), Not only would this increase performance of mod-heavy packs significantly, it would allow for dynamic and on-the-fly updates to mods and even server jars. In all, I think this would be a drastically beneficial addition, so I want to give it a shot. My question to the community is: What would be the downsides, and what features do you think would not be possible / would be a slog to implement?
  2. Pretty much what it says on the tin. I'm looking to play around with the minecraft source code, and MCP for 1.12 really doesn't have anything close to complete function mappings. What version of forge is the most complete in terms of function mappings?
  3. Even if hashing took 10x longer, it would still be 10x shorter than stitching.
  4. I like the sound of parallel loading, but I seriously doubt that textures can be stitched in parallel, but if that's been parallelized, good work, i'm impressed. One thing I'm not sure of is this statement "I don't feel like periodically cleaning my disk of cached texture atlases, especially since different packs with the same mods would cause a new atlas set to be cached, and a resource pack change would cause a re-cache, and pack devs would see their test installation bloat with every mod added to the pack." Let's think of set theory. We have set M. set M contains all mods in your mod pack. any mod 'm' is a set containing three items: 1: s, the space that the mod takes up. 2: a set C containing source files for the mod. 3: a set R, which contains all of the resources that a mod uses. Similarly, we have an Atlas set A, for which there is one A for every one M. Set A contains all R sets within M, as well as a D set, for Directory. The A set also contains a unique element s, which is the space that A takes up. Then it follows that so long as set C is lesser in space than set D, then Mc will take up less space than Ac. In short, The atlas will always take up less space than the mods, considering that most worlds are bigger than the mods, then space won't be an issue, especially if you cull old atlases automatically.
  5. See the benchmark below. I think you are very wrong. 1.) That Is really not something that a mod should have access to. 2.) Like in Minecraft, the easter eggs are still in the game and loaded even when it is not present. Same concept flies here. 3.) That's why you hash the textures as well, not just the mod versions and names If the textures change, the jar changes, and the hash will be different. Ok! Here's my script that can load, hash ,and unload mod files in 356ms(+/- 40ms) on my computer, using the mods for the Feed-The-Beast Continuum modpack, during which the texture stitching takes 34.5 seconds, with 500ms of human error. import java.io.IOException; public class ShaHasher { public static void main(String[] args) { String cmd = "7z h -scrcSHA1 mods"; String result = ""; long timeStart = System.currentTimeMillis(); try { result = execCmd(cmd); } catch (IOException e) { e.printStackTrace(); } System.out.println(result); System.out.println("^^^CMD OUTPUT^^^"); System.out.println("Extracted SHA1 for data only: "+ getSHAContents(result)); System.out.println("Extracted SHA1 for data and names: "+ getSHAContentsAndNames(result)); System.out.print("Time taken: "); long timeStop = System.currentTimeMillis(); System.out.print(timeStop-timeStart); System.out.println(" ms."); } public static String getSHAContents(String toExtractFrom) { int loc = toExtractFrom.indexOf("SHA1 for data:"); loc +=16; while(toExtractFrom.charAt(loc) == ' ') { loc++; } int end = loc; while(toExtractFrom.charAt(end) != '\n') { end++; } return toExtractFrom.substring(loc,end-1); } public static String getSHAContentsAndNames(String toExtractFrom) { int loc = toExtractFrom.indexOf("SHA1 for data and names:"); loc +=26; while(toExtractFrom.charAt(loc) == ' ') { loc++; } int end = loc; while(toExtractFrom.charAt(end) != '\n') { end++; } return toExtractFrom.substring(loc,end-1); } public static String execCmd(String cmd) throws java.io.IOException { Process proc = Runtime.getRuntime().exec(cmd); java.io.InputStream is = proc.getInputStream(); java.util.Scanner s = (new java.util.Scanner(is)).useDelimiter("\\A"); String val = ""; if (s.hasNext()) { val = s.next(); } else { val = ""; } s.close(); return val; } } here is the output of the program. https://pastebin.com/7mTLdmkq What else can I benchark for ya?
  6. It's not really a question at this point. It is ridiculous that forge does not save the workload and dynamically generates texture maps every time. Here is how this can be done easily: When loading for the first time: 1) save a SHA checksum of all mods UUIDs (name+version) . This will be used to validate that the current mod's textures are up to date. 2) save all pngs on the drive with the checksum, and a map of item/block to the drive. 3) save a SHA checksum of all images + maps to the drive as well, to prevent user tampering. When loading after the first time: 1) load all the mods + textures, and generate a SHA checksum (This is also done the first load, but it doesn't save the sum this time) 2) verify that the sum matches the current textureset. 3) load the textures +maps. take a checksum (this should be very fast) 4) if the sum does not match, make a new textureset as if it is the first time booting, Otherwise: 5) skip stitching, and load fast. It's something that's been an annoyance for many years now, and it really should be fixed.
  7. 1/2 your posts are this If you want to look for a file image height, see here: http://stackoverflow.com/questions/672916/how-to-get-image-height-and-width-using-java if you have a resource location, you can use that to find the file, non?
  8. He is talking about the animation when the hand receeds to grab the next item in the hotbar.
  9. I beleive there is no option to disable this in minecraft right now. it is a naitive part of the game, and is likely not to change.
  10. Yes, you need a class to represent the sword. To do this, you'd make a new class that extends Item.
  11. That is something to keep in mind. i am, just going to be using to be supporting the uno, and other, common devices. like I said, i want this to be in a normal dev enviroment.
  12. Thanks, i'm going to read up on this. Any clue how long it would take to unpack a 23Mb .dll file on a standard 7200 rpm hdd? My guess is 5 seconds max. The library itself is less than 23Mb, but i want an upper limit.
  13. I had trouble deciding the forum to post this to myself. is there a way that i may pack it in to the .jar file itself?
  14. Arduino doesn't have network capabilities, sadly. I'm expecting users to have the bootloaders installed, and connected via USB, the same way development was made to work.
×
×
  • Create New...

Important Information

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