mmb.engine.mods.Modfile Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of multimachinebuilder Show documentation
Show all versions of multimachinebuilder Show documentation
Dependency for the MultiMachineBuilder, a voxel game about building an industrial empire in a finite world.
THIS RELEASE IS NOT PLAYABLE. To play the game, donwload from >ITCH.IO LINK HERE< or >GH releases link here<
/**
*
*/
package mmb.engine.mods;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import mmb.engine.files.AdvancedFile;
import mmb.engine.files.OnlineFile;
/**
* @author oskar
*
*/
public class Modfile {
public final String path;
public ModfileState state = ModfileState.MEDIA;
public final AdvancedFile file;
public boolean hasValidData = false;
private final Set classnames0 = new HashSet<>();
public final Set classnames = Collections.unmodifiableSet(classnames0);
public boolean isOnline() {
return file instanceof OnlineFile;
}
public Modfile(String path, AdvancedFile file) {
super();
this.path = path;
this.file = file;
}
public void addClassName(String path) {
int classExtName = 6;
String shorter = path.substring(0, path.length() - 6);
shorter = shorter.replace('/', '.');
shorter = shorter.replace('\\', '.');
classnames0.add(shorter);
Mods.classnames.add(shorter);
}
}