All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mmb.engine.mods.Modfile Maven / Gradle / Ivy

Go to download

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<

There is a newer version: 0.6
Show newest version
/**
 * 
 */
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);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy