Where to start with creating Minecraft client mods [closed]

核能气质少年 提交于 2019-12-03 01:25:12

问题


I've looked all over the net and YouTube and for some reason this is some top secret information or something but I'm trying to find out where to get started on making a Minecraft client mod, preferably something that can be put into a pack like feed the beast or technicpack for simplicity for users but either way is fine.

How would I go about creating a mod? I'm familiar with eclipse and java programming itself but I don't know where to start writing a plugin.

I've tried setting up Minecraft Forge but for some reason it is so incredibly confusing and very messy. can't I just include some Minecraft library, start with a simple boilerplate and go from there? (Like developing for Bukkit)


回答1:


Choosing a modding method

When creating minecraft client mods my research has found that different methods of creating mods. of the choices listed here, they have different perks:

  • Source modding: Confusing to install mods, difficult to develop for, highest probability of breaking (especially after an update), but allows for the most features to be added.
  • ModLoader: Easier to use, limited features, not used often, unable to find support?
  • Minecraft Forge: Slightly more difficult to develop, more extendable, large API, easy to install mods, frequently used (FTB, Technic)

Minecraft Forge is probably one of the better options as of right now (March 2014) so here is a short intro to getting started:

Setting up Minecraft Forge with Eclipse (Mac & PC)

  1. Download & install Java Development Kit 7 (Also works w/ JDK 8, but not JDK 9+)
  2. Download & install eclipse (or other Java IDE such as IntelliJ, etc.)
  3. Download Src (MDK) files of Minecraft Forge for the version of Minecraft you want to develop. (I Suggest Recommended)
  4. Extract the files to a folder of your choosing (ex. /Library/Java/). Windows: Shift + Right Click into the white space of the folder and select "Open command window here" OR for Mac: open Terminal and navigate to the directory of the extracted files.
  5. Run this command. Windows: gradlew setupDecompWorkspace OR Mac: ./gradlew setupDecompWorkspace
  6. If previous command finishes successfully, run the following. Windows: gradlew eclipse OR Mac: ./gradlew eclipse (Note: You can substitute the name of another IDE. Ex. gradlew idea)
  7. Open Eclipse. If this is your first time using eclipse you will get a popup saying "Select a workspace". If this is the case, browse to the extracted files, select the "eclipse" folder and press "OK". If this is NOT your first time using eclipse, go to File > Switch Workspace > other... and select the eclipse folder inside the folder where you extracted the forge files.
  8. That's all, you should now have a forge environment ready to go to start creating mods.

Getting forge to work the way you would expect it to

    There are no sounds playing in minecraft?

  • Go into the eclipse directory and copy the "assets" folder and paste it up one directory (where gradlew.bat is).

    I didn't get a login screen so my username isn't there

  • Single-Player
    To add your username go into eclipse and navigate to "Run > Run Configurations.. > java Application > client > Arguments" and under "Program arguments:" add the following replacing "steve" with your username --username steve.
  • Multi-Player
    For testing in a multi-player you must authenticate yourself or the server wont allow you on. You do basically the same thing as you would in single player but instead of '--username steve' you would replace it with your Minecraft account email address and add your password as so replacing 312mine! with your own password --username steve@minecraft.net --password 321mine!.
    note You can use the authenticated version in single-player as well but it's not necessary.

Helpful resources

  • Video Tutorial for Setting up Minecraft Forge: http://youtu.be/ZCCyGJxEFNM
  • Basic Modding: http://www.minecraftforge.net/wiki/Basic_Modding Slightly Outdated (1)
  • Mod development Support: http://www.minecraftforum.net/forum/140-modification-development/
  • More Support: http://www.minecraftforum.net/forum/56-mapping-and-modding/ (1)

(1) Links Curtousy of Dylan Meeus



来源:https://stackoverflow.com/questions/22739920/where-to-start-with-creating-minecraft-client-mods

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!