本文整理汇总了Java中net.minecraftforge.fml.common.versioning.ArtifactVersion类的典型用法代码示例。如果您正苦于以下问题:Java ArtifactVersion类的具体用法?Java ArtifactVersion怎么用?Java ArtifactVersion使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ArtifactVersion类属于net.minecraftforge.fml.common.versioning包,在下文中一共展示了ArtifactVersion类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: drawScreen
import net.minecraftforge.fml.common.versioning.ArtifactVersion; //导入依赖的package包/类
/**
* Draws the screen and all the components in it.
*/
@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks)
{
this.drawDefaultBackground();
int offset = Math.max(85 - modsMissing.missingMods.size() * 10, 10);
this.drawCenteredString(this.fontRendererObj, "Forge Mod Loader could not connect to this server", this.width / 2, offset, 0xFFFFFF);
offset += 10;
this.drawCenteredString(this.fontRendererObj, "The mods and versions listed below could not be found", this.width / 2, offset, 0xFFFFFF);
offset += 10;
this.drawCenteredString(this.fontRendererObj, "They are required to play on this server", this.width / 2, offset, 0xFFFFFF);
offset += 5;
for (ArtifactVersion v : modsMissing.missingMods)
{
offset += 10;
this.drawCenteredString(this.fontRendererObj, String.format("%s : %s", v.getLabel(), v.getRangeString()), this.width / 2, offset, 0xEEEEEE);
}
super.drawScreen(mouseX, mouseY, partialTicks);
}
示例2: drawScreen
import net.minecraftforge.fml.common.versioning.ArtifactVersion; //导入依赖的package包/类
/**
* Draws the screen and all the components in it.
*/
@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks)
{
this.drawDefaultBackground();
int offset = Math.max(85 - modsMissing.missingMods.size() * 10, 10);
String modMissingDependenciesText = I18n.format("fml.messages.mod.missing.dependencies", TextFormatting.BOLD + modsMissing.getModName() + TextFormatting.RESET);
this.drawCenteredString(this.fontRendererObj, modMissingDependenciesText, this.width / 2, offset, 0xFFFFFF);
offset+=10;
String fixMissingDependenciesText = I18n.format("fml.messages.mod.missing.dependencies.fix", modsMissing.getModName());
this.drawCenteredString(this.fontRendererObj, fixMissingDependenciesText, this.width / 2, offset, 0xFFFFFF);
offset+=5;
for (ArtifactVersion v : modsMissing.missingMods)
{
offset+=10;
if (v instanceof DefaultArtifactVersion)
{
DefaultArtifactVersion dav = (DefaultArtifactVersion)v;
if (dav.getRange() != null)
{
String message = String.format(TextFormatting.BOLD + "%s " + TextFormatting.RESET + "%s", v.getLabel(), dav.getRange().toStringFriendly());
this.drawCenteredString(this.fontRendererObj, message, this.width / 2, offset, 0xEEEEEE);
continue;
}
}
this.drawCenteredString(this.fontRendererObj, String.format("%s : %s", v.getLabel(), v.getRangeString()), this.width / 2, offset, 0xEEEEEE);
}
offset+=20;
String seeLogText = I18n.format("fml.messages.mod.missing.dependencies.see.log", clientLog.getName());
this.drawCenteredString(this.fontRendererObj, seeLogText, this.width / 2, offset, 0xFFFFFF);
for (int i = 0; i < this.buttonList.size(); ++i)
{
this.buttonList.get(i).drawButton(this.mc, mouseX, mouseY);
}
}
示例3: sendEventToModContainer
import net.minecraftforge.fml.common.versioning.ArtifactVersion; //导入依赖的package包/类
private void sendEventToModContainer(FMLEvent stateEvent, ModContainer mc)
{
String modId = mc.getModId();
Collection<String> requirements = Collections2.transform(mc.getRequirements(),new ArtifactVersionNameFunction());
for (ArtifactVersion av : mc.getDependencies())
{
if (av.getLabel()!= null && requirements.contains(av.getLabel()) && modStates.containsEntry(av.getLabel(),ModState.ERRORED))
{
FMLLog.log(modId, Level.ERROR, "Skipping event %s and marking errored mod %s since required dependency %s has errored", stateEvent.getEventType(), modId, av.getLabel());
modStates.put(modId, ModState.ERRORED);
return;
}
}
activeContainer = mc;
stateEvent.applyModContainer(activeContainer());
ThreadContext.put("mod", modId);
FMLLog.log(modId, Level.TRACE, "Sending event %s to mod %s", stateEvent.getEventType(), modId);
eventChannels.get(modId).post(stateEvent);
FMLLog.log(modId, Level.TRACE, "Sent event %s to mod %s", stateEvent.getEventType(), modId);
ThreadContext.remove("mod");
activeContainer = null;
if (stateEvent instanceof FMLStateEvent)
{
if (!errors.containsKey(modId))
{
modStates.put(modId, ((FMLStateEvent)stateEvent).getModState());
}
else
{
modStates.put(modId, ModState.ERRORED);
}
}
}
示例4: APIContainer
import net.minecraftforge.fml.common.versioning.ArtifactVersion; //导入依赖的package包/类
public APIContainer(String providedAPI, String apiVersion, File source, ArtifactVersion ownerMod)
{
this.providedAPI = providedAPI;
this.version = apiVersion;
this.ownerMod = ownerMod;
this.ourVersion = new DefaultArtifactVersion(providedAPI, apiVersion);
this.referredMods = Lists.newArrayList();
this.source = source;
this.currentReferents = Sets.newHashSet();
this.packages = Sets.newHashSet();
}
示例5: printStackTrace
import net.minecraftforge.fml.common.versioning.ArtifactVersion; //导入依赖的package包/类
@Override
protected void printStackTrace(WrappedPrintStream stream)
{
stream.println("Missing Mods:");
for (ArtifactVersion v : missingMods)
{
stream.println(String.format("\t%s : %s", v.getLabel(), v.getRangeString()));
}
stream.println("");
}
示例6: ModContainer
import net.minecraftforge.fml.common.versioning.ArtifactVersion; //导入依赖的package包/类
/**
* Initialize the mod
*/
public ModContainer() {
super(meta = new ModMetadata());
meta.authorList = Arrays.asList("cazzar");
meta.description = "The core library for cazzar's mods";
meta.modId = Reference.MOD_ID;
meta.name = "Cazzar Core Lib";
meta.dependants = Arrays.asList((ArtifactVersion) new DefaultArtifactVersion("jukeboxreloaded", true));
meta.url = "http://www.cazzar.net/";
meta.version = getVersionFromJar();
}
示例7: processModsList
import net.minecraftforge.fml.common.versioning.ArtifactVersion; //导入依赖的package包/类
public static void processModsList(Map<String, Object> json)
{
for(ModVersionInfo info : registeredMods)
{
Map<String, String> versionInfo = (Map<String, String>)json.get(info.modName);
if(versionInfo != null && versionInfo.containsKey(info.mcVersion))
{
ArtifactVersion current = new DefaultArtifactVersion(info.modVersion);
String lat = versionInfo.get(info.mcVersion);
ArtifactVersion latest = new DefaultArtifactVersion(lat);
int diff = latest.compareTo(current);
if(diff > 0)
{
info.modVersionNew = lat.trim();
modsWithUpdates.add(info);
if(requireLogging && !info.isModClientOnly)
{
iChunUtil.LOGGER.info("[NEW UPDATE AVAILABLE] " + info.modName + " - " + info.modVersionNew);
}
}
}
}
requireLogging = false;
updatesChecked = true;
}
示例8: getRequirements
import net.minecraftforge.fml.common.versioning.ArtifactVersion; //导入依赖的package包/类
@Override
public Set<ArtifactVersion> getRequirements()
{
return wrappedContainer.getRequirements();
}
示例9: getDependencies
import net.minecraftforge.fml.common.versioning.ArtifactVersion; //导入依赖的package包/类
@Override
public List<ArtifactVersion> getDependencies()
{
return wrappedContainer.getDependencies();
}
示例10: getDependants
import net.minecraftforge.fml.common.versioning.ArtifactVersion; //导入依赖的package包/类
@Override
public List<ArtifactVersion> getDependants()
{
return wrappedContainer.getDependants();
}
示例11: getProcessedVersion
import net.minecraftforge.fml.common.versioning.ArtifactVersion; //导入依赖的package包/类
@Override
public ArtifactVersion getProcessedVersion()
{
return wrappedContainer.getProcessedVersion();
}
示例12: write
import net.minecraftforge.fml.common.versioning.ArtifactVersion; //导入依赖的package包/类
@Override
public void write(JsonWriter out, ArtifactVersion value) throws IOException
{
// no op - we never write these out
}
示例13: read
import net.minecraftforge.fml.common.versioning.ArtifactVersion; //导入依赖的package包/类
@Override
public ArtifactVersion read(JsonReader in) throws IOException
{
return VersionParser.parseVersionReference(in.nextString());
}
示例14: getDependants
import net.minecraftforge.fml.common.versioning.ArtifactVersion; //导入依赖的package包/类
@Override
public List<ArtifactVersion> getDependants()
{
return referredMods;
}
示例15: getDependencies
import net.minecraftforge.fml.common.versioning.ArtifactVersion; //导入依赖的package包/类
@Override
public List<ArtifactVersion> getDependencies()
{
return selfReferenced ? ImmutableList.<ArtifactVersion>of() : ImmutableList.of(ownerMod);
}