本文整理了Java中net.minecraftforge.fml.common.Mod
类的一些代码示例,展示了Mod
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Mod
类的具体详情如下:
包路径:net.minecraftforge.fml.common.Mod
类名称:Mod
暂无
代码示例来源:origin: EngineHub/WorldEdit
@Mod(modid = ForgeWorldEdit.MOD_ID, name = "WorldEdit", version = "%VERSION%", acceptableRemoteVersions = "*")
public class ForgeWorldEdit {
代码示例来源:origin: EngineHub/WorldEdit
/**
* Get the version of the WorldEdit-for-Forge implementation.
*
* @return a version string
*/
String getInternalVersion() {
return ForgeWorldEdit.class.getAnnotation(Mod.class).version();
}
代码示例来源:origin: iLexiconn/LLibrary
if (updateContainer != null) {
final ModContainer[] modContainer = { null };
Loader.instance().getModList().stream().filter(container -> container.getModId().equals(annotation.modid())).forEach(container -> modContainer[0] = container);
LLibrary.LOGGER.warn("Couldn't find mod container with id " + annotation.modid() + ". Skipping registration of object " + mod + ".");
return;
LLibrary.LOGGER.warn("Failed to load update container for mod " + annotation.name() + " (" + annotation.modid() + ")!");
LLibrary.LOGGER.warn("Failed to load update container for mod " + annotation.name() + " (" + annotation.modid() + ")!");
代码示例来源:origin: RS485/LogisticsPipes
@Override
public String getName() {
return LogisticsPipes.class.getAnnotation(Mod.class).name();
}
代码示例来源:origin: iLexiconn/LLibrary
@Override
public void initElements() {
this.addElement(new ButtonElement<>(this, "<", 0, 0, 30, 20, button -> {
this.mc.displayGuiScreen(this.parent);
return true;
}).withColorScheme(this.getReturnButtonColorScheme()));
this.addElement(new LabelElement<>(this, this.parentName, 35, 6));
this.addElement(new LabelElement<>(this, this.mod.name().toUpperCase() + " SETTINGS", 35, 26));
ListElement<ConfigGUI> categoryList = (ListElement<ConfigGUI>) new ListElement<>(this, 0, 40, 120, this.height - 40, this.categories.stream().map(ConfigCategory::getName).collect(Collectors.toList()), 20, list -> {
this.selectedCategory = this.categories.get(list.getSelectedIndex());
this.propertyElements.values().forEach(this::removeElement);
this.propertyElements.clear();
return true;
}).withPersistence(true).withColorScheme(this.getSidebarColorScheme());
categoryList.setSelectedIndex(0);
this.selectedCategory = this.categories.get(0);
this.addElement(categoryList);
this.propertyElements.clear();
}
代码示例来源:origin: AppliedEnergistics/Applied-Energistics-2
@Mod( modid = "uvlightmapjsontest", name = "UVLightmapJsonTest", version = "0.0.0" )
public class UVLightmapJsonTest
代码示例来源:origin: RS485/LogisticsPipes
@Override
public String getVersion() {
return LogisticsPipes.class.getAnnotation(Mod.class).version();
}
代码示例来源:origin: SlimeKnights/TinkersConstruct
@Mod(modid = TConstruct.modID,
name = TConstruct.modName,
version = TConstruct.modVersion,
代码示例来源:origin: lucko/spark
@Override
public String getVersion() {
return SparkForgeMod.class.getAnnotation(Mod.class).version();
}
代码示例来源:origin: AppliedEnergistics/Applied-Energistics-2
@Mod( modid = AppEng.MOD_ID, acceptedMinecraftVersions = "[1.12.2]", name = AppEng.MOD_NAME, version = AEConfig.VERSION, dependencies = AppEng.MOD_DEPENDENCIES, guiFactory = "appeng.client.gui.config.AEConfigGuiFactory", certificateFingerprint = "dfa4d3ac143316c6f32aa1a1beda1e34d42132e5" )
public final class AppEng
代码示例来源:origin: RS485/LogisticsPipes
@Override
public void executeCommand(ICommandSender sender, String[] args) {
sender.sendMessage(new TextComponentString(String.format("LogisticsPipes %s for Minecraft %s.", LogisticsPipes.class.getAnnotation(Mod.class).version(), LPConstants.MCVersion)));
VersionChecker versionChecker = LogisticsPipes.versionChecker;
sender.sendMessage(new TextComponentString(versionChecker.getVersionCheckerStatus()));
if (versionChecker.isVersionCheckDone() && versionChecker.getVersionInfo().isNewVersionAvailable()) {
sender.sendMessage(new TextComponentString("Use \"/logisticspipes changelog\" to see a changelog."));
}
}
}
代码示例来源:origin: Vazkii/Botania
@Mod(modid = LibMisc.MOD_ID, name = LibMisc.MOD_NAME, version = LibMisc.VERSION, dependencies = LibMisc.DEPENDENCIES, guiFactory = LibMisc.GUI_FACTORY)
public class Botania {
代码示例来源:origin: superzanti/ServerSync
@Mod(modid=RefStrings.MODID, name=RefStrings.NAME, version=RefStrings.VERSION,
serverSideOnly=true, acceptableRemoteVersions="*")
public class ForgeLoaderNET {
@EventHandler
public void startServersync(FMLPreInitializationEvent _e) {
Main.main(new String[]{"server"});
}
}
代码示例来源:origin: AntiqueAtlasTeam/AntiqueAtlas
@Mod(modid = AntiqueAtlasOverlayMod.MODID, version = AntiqueAtlasOverlayMod.VERSION, name = AntiqueAtlasOverlayMod.MODID, clientSideOnly = true, dependencies = "required-after:antiqueatlas;after:forge@[13.20.0.2262,)")
public class AntiqueAtlasOverlayMod {
public static final String MODID = "antiqueatlasoverlay";
public static final String VERSION = "1.2";
public static final Logger LOGGER = LogManager.getLogger("AntiqueAtlasOverlay");
}
代码示例来源:origin: Darkhax-Minecraft/Tesla
@Mod(modid = "tesla", name = "Tesla", version = "@VERSION@", certificateFingerprint = "@FINGERPRINT@")
public class Tesla {
private static final Logger LOG = LogManager.getLogger("Tesla");
@EventHandler
public void preInit (FMLPreInitializationEvent event) {
CapabilityManager.INSTANCE.register(ITeslaConsumer.class, new CapabilityTeslaConsumer<>(), BaseTeslaContainer.class);
CapabilityManager.INSTANCE.register(ITeslaProducer.class, new CapabilityTeslaProducer<>(), BaseTeslaContainer.class);
CapabilityManager.INSTANCE.register(ITeslaHolder.class, new CapabilityTeslaHolder<>(), BaseTeslaContainer.class);
}
@EventHandler
public void onFingerprintViolation (FMLFingerprintViolationEvent event) {
LOG.error("Invalid fingerprint detected! The file " + event.getSource().getName() + " may have been tampered with. This version will NOT be supported by the author!");
}
}
代码示例来源:origin: elucent/Albedo
@Mod(modid = Albedo.MODID, version = Albedo.VERSION, name = Albedo.NAME, guiFactory = "elucent.albedo.gui.AlbedoGuiFactory", clientSideOnly=true)
public class Albedo
{
public static final String MODID = "albedo";
public static final String VERSION = "0.1.2";
public static final String NAME = "Albedo";
public static boolean inited = false;
@SideOnly(Side.CLIENT)
@EventHandler
public void preinit(FMLPreInitializationEvent event)
{
((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(new ShaderUtil());
MinecraftForge.EVENT_BUS.register(new EventManager());
MinecraftForge.EVENT_BUS.register(new ConfigManager());
ConfigManager.init(event.getSuggestedConfigurationFile());
}
}
代码示例来源:origin: lorddusk/HQM
@Mod(modid = HQM.MODID, name = HQM.MODNAME, version = HQM.MODVERSION)
public class HQM{
代码示例来源:origin: lucko/spark
@Mod(
modid = "spark",
name = "spark",
代码示例来源:origin: CFPAOrg/I18nUpdateMod
@Mod(modid = I18nUpdateMod.MODID, name = I18nUpdateMod.NAME, clientSideOnly = true, acceptedMinecraftVersions = "[1.12]", version = I18nUpdateMod.VERSION, dependencies = "after:defaultoptions")
public class I18nUpdateMod {
public final static String MODID = "i18nmod";
代码示例来源:origin: SleepyTrousers/EnderIO
@Mod(modid = EnderIODummy.MODID, name = EnderIODummy.MOD_NAME, version = EnderIO.VERSION, dependencies = "after:" + EnderIO.MODID)
public class EnderIODummy {
public static final @Nonnull String MODID = "enderiobase";
public static final @Nonnull String DOMAIN = "enderio";
public static final @Nonnull String MOD_NAME = "Ender IO Base";
}
内容来源于网络,如有侵权,请联系作者删除!