Giter VIP home page Giter VIP logo

Comments (6)

bangbang93 avatar bangbang93 commented on August 26, 2024

把他们塞回moddir里,以免影响其他版本的mc正常工作

2013-11-08

bangbang93

发件人:s-kias [email protected]
发送时间:2013-11-08 20:15
主题:[BMCLV2] 请问为什么每次启动完mod独立文件夹就消失了? (#1)
收件人:"bangbang93/BMCLV2"[email protected]
抄送:

我想要每个版本都使用不同的mod,但是每次启动完后mod独立文件夹就消失掉了
我在源码的launcher.cs里面看到了相关代码:
if (Directory.Exists(@".minecraft\versions" + name + @"\mods"))
{
Directory.Delete(@".minecraft\versions" + name + @"\mods", true);
Dir.dircopy(@".minecraft\mods", @".minecraft\versions" + name + @"\mods");
Directory.Delete(@".minecraft\mods", true);
Directory.Delete(@".minecraft\versions" + name + @"\coremods", true);
Dir.dircopy(@".minecraft\coremods", @".minecraft\versions" + name + @"\coremods");
Directory.Delete(@".minecraft\coremods", true);
Directory.Delete(@".minecraft\versions" + name + @"\config", true);
Dir.dircopy(@".minecraft\config", @".minecraft\versions" + name + @"\config");
Directory.Delete(@".minecraft\config", true);
}
if (Directory.Exists(@".minecraft\versions" + name + @"\moddir"))
{
DirectoryInfo moddirs = new DirectoryInfo(@".minecraft\versions" + name + @"\moddir");
foreach (DirectoryInfo moddir in moddirs.GetDirectories())
{
moddir.Delete(true);
Dir.dircopy(@".minecraft" + moddir.Name, moddir.FullName);
Directory.Delete(@".minecraft" + moddir.Name, true);
}
}

看上去是把mod独立文件夹删掉然后把.minecraft/mods复制进去。。。求解释

Reply to this email directly or view it on GitHub.

from bmcl.

balthild avatar balthild commented on August 26, 2024

额,问题是,既然本来就是每个版本的mod独立文件夹,怎么会影响其他版本的运行呢

而且我的/.minecraft/mods这个文件夹本身就是不存在的,所以复制不过去,这样造成不管我放什么在/.minecraft/versions/xxx/mods启动时都消失了。

而放在/.minecraft/versions/xxx/moddir,正常启动,但是启动后forge显示根本没有加载到任何的mod

from bmcl.

bangbang93 avatar bangbang93 commented on August 26, 2024

因为forge只认.minecraft/mods
比如npcmod只认./minecraft/custormNPCS
假如有两个不同版本使用了不同版本的NPCmod,就会造成冲突。
不同版本的mc的mod共存在mods里也会挂

.minecraft/mods这个文件夹是由启动器在启动的时候生成的。
还有个bug我没解决。就是在启动的时候请确保没有打开.minecraft/versions/xxx/mods这个目录(包括资源管理器),否则可能会造成目录文件丢失

2013-11-09

bangbang93

发件人:s-kias [email protected]
发送时间:2013-11-09 07:30
主题:Re: [BMCLV2] 请问为什么每次启动完mod独立文件夹就消失了? (#1)
收件人:"bangbang93/BMCLV2"[email protected]
抄送:"bangbang93"[email protected]

额,问题是,既然本来就是每个版本的mod独立文件夹,怎么会影响其他版本的运行呢
而且我的/.minecraft/mods这个文件夹本身就是不存在的,所以复制不过去,这样造成不管我放什么在/.minecraft/versions/xxx/mods启动时都消失了。
而放在/.minecraft/versions/xxx/moddir,正常启动,但是启动后forge显示根本没有加载到任何的mod

Reply to this email directly or view it on GitHub.

from bmcl.

balthild avatar balthild commented on August 26, 2024

那这个启动器给每个版本加载不同mod的原理就是启动时把/.minecraft/versions/xxx/mods复制到/.minecraft/mods把

但是代码里面明明就是反过来复制的

from bmcl.

bangbang93 avatar bangbang93 commented on August 26, 2024

你看的是exit的部分。
进程退出的时候再复制回去,以保留mod配置等信息的修改

2013-11-09

bangbang93

发件人:s-kias [email protected]
发送时间:2013-11-09 12:56
主题:Re: [BMCLV2] 请问为什么每次启动完mod独立文件夹就消失了? (#1)
收件人:"bangbang93/BMCLV2"[email protected]
抄送:"bangbang93"[email protected]

那这个启动器给每个版本加载不同mod的原理就是启动时把/.minecraft/versions/xxx/mods复制到/.minecraft/mods把
但是代码里面明明就是反过来复制的

Reply to this email directly or view it on GitHub.

from bmcl.

balthild avatar balthild commented on August 26, 2024

哦,原来是这样,那希望能早日修复这个BUG,谢谢解答~

from bmcl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.