本文整理匯總了Java中net.minecraftforge.fml.common.ModContainer.getMetadata方法的典型用法代碼示例。如果您正苦於以下問題:Java ModContainer.getMetadata方法的具體用法?Java ModContainer.getMetadata怎麽用?Java ModContainer.getMetadata使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraftforge.fml.common.ModContainer
的用法示例。
在下文中一共展示了ModContainer.getMetadata方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: reloadMods
import net.minecraftforge.fml.common.ModContainer; //導入方法依賴的package包/類
private void reloadMods()
{
ArrayList<ModContainer> mods = modList.getMods();
mods.clear();
for (ModContainer m : Loader.instance().getActiveModList())
{
// If it passes the filter, and is not a child mod
if (m.getName().toLowerCase().contains(search.getText().toLowerCase()) && m.getMetadata().parentMod == null)
{
mods.add(m);
}
}
this.mods = mods;
lastFilterText = search.getText();
}
示例2: applyModContainer
import net.minecraftforge.fml.common.ModContainer; //導入方法依賴的package包/類
@Override
public void applyModContainer(ModContainer activeContainer)
{
this.modContainer = activeContainer;
this.modMetadata = activeContainer.getMetadata();
this.sourceFile = activeContainer.getSource();
this.suggestedConfigFile = new File(configurationDir, activeContainer.getModId()+".cfg");
}
示例3: getModMetadata
import net.minecraftforge.fml.common.ModContainer; //導入方法依賴的package包/類
private ModMetadata getModMetadata(String resourceDomain) {
ModContainer modContainer = modContainersForLowercaseIds.get(resourceDomain.toLowerCase(Locale.ENGLISH));
if (modContainer == null) {
ModMetadata modMetadata = new ModMetadata();
modMetadata.name = resourceDomain.equals("minecraft") ? "Minecraft" : "unknown";
return modMetadata;
} else {
return modContainer.getMetadata();
}
}
示例4: registerMod
import net.minecraftforge.fml.common.ModContainer; //導入方法依賴的package包/類
public static void registerMod(final ModContainer container, final String forgeVersion) {
REGISTERED_MODS.add(container);
final ModMetadata metadata = container.getMetadata();
if (metadata.description != null) {
metadata.description += "\n---\nCompiled against Forge " + forgeVersion;
}
}
示例5: enhanceMod
import net.minecraftforge.fml.common.ModContainer; //導入方法依賴的package包/類
public static void enhanceMod(Object mod) {
ModContainer mc = FMLCommonHandler.instance().findContainerFor(mod);
mc.getMetadata().description = enhanceDesc(mc.getMetadata().description);
}
示例6: getModMetadata
import net.minecraftforge.fml.common.ModContainer; //導入方法依賴的package包/類
@Nullable
public static ModMetadata getModMetadata(@Nonnull final String modId) {
final ModContainer container = findModContainer(modId);
return container != null ? container.getMetadata() : null;
}
示例7: enhanceMod
import net.minecraftforge.fml.common.ModContainer; //導入方法依賴的package包/類
@Deprecated
public static void enhanceMod(Object mod) {
ModContainer mc = FMLCommonHandler.instance().findContainerFor(mod);
mc.getMetadata().description = enhanceDesc(mc.getMetadata().description);
}
示例8: getModAuthors
import net.minecraftforge.fml.common.ModContainer; //導入方法依賴的package包/類
public List<String> getModAuthors() {
ModContainer container = identifyDonationItem();
return container != null? container.getMetadata().authorList : null;
}