Jump to content
  • Home
  • Files
  • Docs
  • Merch
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • How do you get the minecraft install folder?
1.13 Update Notes for Mod Creators
Sign in to follow this  
Followers 0
gummby8

How do you get the minecraft install folder?

By gummby8, March 15, 2016 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

gummby8    26

gummby8

gummby8    26

  • Diamond Finder
  • gummby8
  • Members
  • 26
  • 479 posts
Posted March 15, 2016

We use a mod called Schematica that saves schematics to a folder .minecraft\Schematics or ServerRoot\Schematics.

 

I need to figure out how to create the path to that folder.

File file = new File(SomethingSomething + "\Schematics");
NBTTagCompound nbtdata = SchematicUtil.readTagCompoundFromFile(file);

 

Also where would I need to put the schematic folder for my Eclipse workspace to see it?

 

Thank you,

  • Quote

Share this post


Link to post
Share on other sites

MCenderdragon    15

MCenderdragon

MCenderdragon    15

  • Creeper Killer
  • MCenderdragon
  • Forge Modder
  • 15
  • 130 posts
Posted March 15, 2016

I am not sure, but I think the Minecraft class should have a field or a method to get the current dir in use.

  • Quote

Share this post


Link to post
Share on other sites

Ernio    598

Ernio

Ernio    598

  • Reality Controller
  • Ernio
  • Forge Modder
  • 598
  • 2638 posts
Posted March 15, 2016

Minecraft.getMinecraft().mcDataDir; // use on Client.jar, returns launch directory (game can be launched anywhere).
or
new File("."); // I use it for Dedicated.jar - gives you dir where you launched server (root).

 

Note that you need proxy for Minecraft.class call.

  • Quote

Share this post


Link to post
Share on other sites

gummby8    26

gummby8

gummby8    26

  • Diamond Finder
  • gummby8
  • Members
  • 26
  • 479 posts
Posted March 15, 2016

Minecraft.getMinecraft().mcDataDir; // use on Client.jar, returns launch directory (game can be launched anywhere).
or
new File("."); // I use it for Dedicated.jar - gives you dir where you launched server (root).

 

Note that you need proxy for Minecraft.class call.

 

I believe...

 

new File(".");

 

..is what I am looking for since it will be grabbing the schematic files server side.

 

I had it make a directory at "./NERP"

 

It appears in the "run" folder in my Eclipse workbench

 

Huzza. Thanks

  • Quote

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 0
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Iceo
      1.12.2 Server Crash with Applied Energistics 2

      By Iceo · Posted just now

      Is there a way to fix this?
    • d0sboots
      "gradlew eclipse" in a clean forge 1.13.2 fails

      By d0sboots · Posted 6 minutes ago

      I tried gradlew build --refresh-dependencies, it doesn't change anything. Remember, this happens even if the .gradle directory is completely deleted.   It looks like this got broken with https://github.com/MinecraftForge/ForgeGradle/pull/617. It appears to already by fixed in https://github.com/MinecraftForge/ForgeGradle/pull/635, but that PR hasn't been merged yet.
    • Rixxaw
      Minecraft Core Issue/Forge Issue???

      By Rixxaw · Posted 18 minutes ago

      Download the Twitch App, and go to "Mods" then select a modpack from the list of packs there.  Assuming you are attempting to "Create" your own modpack.  There are thousands of modpacks already created and it is very likely you will find one with the mods you want.  If  Not, look for a Vanilla+ pack, and then unlock the profile, and add whatever mods you want.  The App will make sure they are of the right version and what not.  Thus you essentially create your own pack that way in a sense.
    • Iceo
      1.12.2 Server Crash with Applied Energistics 2

      By Iceo · Posted 18 minutes ago

      I dont know what you mean by OpenJDK don't you use that for developing mods?
    • Iceo
      1.12.2 Server Crash with Applied Energistics 2

      By Iceo · Posted 41 minutes ago

      I have no idea what you mean. I just run it using server.pro using a tutorial I found and I get this crash. I run it fine on client though.
  • Topics

    • Iceo
      4
      1.12.2 Server Crash with Applied Energistics 2

      By Iceo
      Started 54 minutes ago

    • d0sboots
      8
      "gradlew eclipse" in a clean forge 1.13.2 fails

      By d0sboots
      Started December 2

    • Aaronade
      2
      Minecraft Core Issue/Forge Issue???

      By Aaronade
      Started 4 hours ago

    • runescaper
      7
      Minecraft Forge Mods Won't Load for Me

      By runescaper
      Started 1 hour ago

    • catcube
      6
      is there a way to get alpha Textures, sounds and old lighting into MC 1.13.2? (Hire a modder?)

      By catcube
      Started November 27, 2018

  • Who's Online (See full list)

    • Iceo
    • Choco
    • Lordyammer
    • Rixxaw
    • Elrol_Arrowsend
    • ErYizus
    • Nuparu00
    • enduringgamer
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • How do you get the minecraft install folder?
  • Theme
  • Contact Us
  • Discord

Copyright © 2019 ForgeDevelopment LLC · Ads by Curse Powered by Invision Community