ClassPathMod.java
1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package com.mumfrey.liteloader.core;
import java.io.File;
import com.mumfrey.liteloader.resources.ModResourcePack;
import com.mumfrey.liteloader.resources.ModResourcePackDir;
/**
* Mod file reference for a file loaded from class path
*
* @author Adam Mummery-Smith
*/
public class ClassPathMod extends ModFile
{
private static final long serialVersionUID = -4759310661966590773L;
public ClassPathMod(File file, String name, String version)
{
super(file, "");
this.modName = name;
this.version = version;
}
@Override
protected void parseVersionFile(String strVersionData)
{
// Nope
}
@Override
public boolean registerAsResourcePack(String name)
{
if (this.resourcePack == null)
{
if (this.isDirectory())
{
this.resourcePack = new ModResourcePackDir(name, this);
}
else
{
this.resourcePack = new ModResourcePack(name, this);
}
return LiteLoader.getInstance().registerModResourcePack(this.resourcePack);
}
return false;
}
}