If you are reading this article you probably already know Minecraft. We use Forge to manipulate the game Minecraft to make it do what we want. This could be anything, ranging from new cool creatures to entire new systems in the game.

如果您正在阅读本文,您可能已经知道Minecraft。 我们使用Forge来操纵Minecraft游戏,使其达到我们想要的效果。 可以是任何东西,从新的酷动物到游戏中的整个新系统。

Forge is a modding API. Minecraft Forge (or Forge for short) is a layer between our code and Minecraft itself.

Forge是改装API。 Minecraft Forge(或简称为Forge)是我们的代码与Minecraft本身之间的一层。

We cannot directly ask Minecraft to add items and do special cool things. That’s why we need an API (application programming interface) to handle our logic and make Minecraft recognise it.

我们不能直接要求Minecraft添加物品并做特别酷的事情。 这就是为什么我们需要一个API(应用程序编程接口)来处理我们的逻辑并使Minecraft识别它的原因。

听起来不错! 我该如何开始? (Sounds cool! How do I get started?)

  • You’ll need the JDK (Java development kit) which is a set of libraries, tools and the runtime environment to make Java programs and run them.您将需要JDK(Java开发工具包),它是一组库,工具和运行时环境,以制作和运行Java程序。
  • A Minecraft account which can be bought from their official website. (https://minecraft.net/en-us/store/)

    可以从其官方网站上购买的Minecraft帐户。 ( https://minecraft.net/zh-cn/store/ )

  • An IDE (Eclipse or IntelliJ are recommended for Minecraft development)IDE(对于Minecraft开发,建议使用Eclipse或IntelliJ)

After installing/acquiring these pieces of software, download your desired Forge version at https://files.minecraftforge.net/.

安装/获取这些软件后,请从https://files.minecraftforge.net/下载所需的Forge版本。

Tip: Hover over the information button and press direct download to avoid an Adfly virus!

提示 :将鼠标悬停在信息按钮上,然后按直接下载以避免Adfly病毒!

Once you have downloaded this ZIP you’ll be able to unzip it. Do so and cd (cmd/command) into the directory with all of the Forge files. Run gradlew setupDecompWorkspace.

下载此ZIP文件后,您就可以将其解压缩。 这样做,然后将cd(cmd / command)与所有Forge文件一起放入目录。 运行gradlew setupDecompWorkspace

Next up is picking your IDE (integrated development environment).

下一步是选择您的IDE(集成开发环境)。

  • Eclipse? gradlew eclipse.

    蚀? gradlew eclipse

  • IntelliJ? Import the build.gradle file in your IntelliJ setup.IntelliJ? 在IntelliJ设置中导入build.gradle文件。

好吧,现在呢? 如何添加新商品? (基本模组设定) (Okay now what? How do I add fancy new items? (Basic mod setup))

Hold your horses. There’s much more to it. You’ll have to texture an item of course, add code and so much more! In this article we’ll only look at some simple sample code which I also use for my own mods. Here it is!

稍安毋躁。 还有更多的东西。 您当然必须构造一个项目,添加代码等等! 在本文中,我们将只看一些简单的示例代码,这些代码也用于我自己的mod。 这里是!

`@Mod.EventBusSubscriber @Mod(modid = Version.MODID, name = Version.MODNAME, version = Version.VERSION) public class TheMod {

`@Mod.EventBusSubscriber @Mod(modid = Version.MOD ID,名称= Version.MOD NAME,版本= Version.VERSION)公共类TheMod {

public static ModMetadata metadata;public static File baseDir;
public static Configuration config;@SidedProxy(clientSide="com.ciphry.client.ClientProxy", serverSide="com.ciphry.common.CommonProxy")
public static CommonProxy proxy;@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {proxy.preInit(event);baseDir = new File(event.getModConfigurationDirectory(), MOD_ID);config = new Configuration(event.getSuggestedConfigurationFile());if (!baseDir.exists())baseDir.mkdir();
}@Mod.EventHandler
public void init(FMLInitializationEvent event) {proxy.init(event);}@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event) {proxy.postInit(event);
}

Use this code as you please. Just make sure you edit, for instance, the proxy strings and more. This should give you a basic overview of what a basic mod class looks like.

您可以随意使用此代码。 只需确保编辑例如代理字符串等即可。 这应该为您提供基本的mod类的基本概述。

翻译自: https://www.freecodecamp.org/news/minecraft-forge-how-to-download-install-and-use-forge/

Minecraft Forge:如何下载,安装和使用Forge相关推荐

  1. mcinabox运行库下载安装_手机mcinabox运行库安装包下载-mcinabox运行库文件手机版下载v1.0_289手游网...

    mcinabox运行库文件手机版是一个java版本我的世界运行的必备软件,很多手机版的用户不知道怎么下载,289这里为大家提供了mcinabox运行库文件手机版,下载后一键安装即可轻松完成,快速运行, ...

  2. Minecraft国际版下载

    Minecraft国际版下载 正文 第一步:下载文件 32位 64位 第二步:安装JAVA 这一步比较简单,直接安装就可以了 第三步:打开HMCL 注意 HMCL.exe尽量在自己专门存储应用的地方打 ...

  3. Redis学习之路(一)--下载安装redis

    redis学习之路--下载安装redis windows安装redis 1.下载redis 2.安装 3.查看是否安装成功 windows安装redis 1.下载redis 网址:https://gi ...

  4. git 下载 安装

    1.下载Git,官网地址:https://git-scm.com/,进入官网首页 在右下方的显示器中找到最新的版本下载,点击下载,跳转到下载页面 下载完成 2.安装Git 双击刚刚下载完成的安装文件, ...

  5. Docker初学5:下载安装可视化图形工具Portainer

    下载安装可视化图形工具Portainer # 搜索Portainer [root@iZh40ti53pk77iZ ~]# docker search portainer NAME DESCRIPTIO ...

  6. 01-01java概述 doc命令、jdk\jre下载安装、path、classpath配置、开发中常见小问题

    1:计算机概述(了解) (1)计算机(2)计算机硬件(3)计算机软件系统软件:window,linux,mac应用软件:qq,yy,飞秋(4)软件开发(理解)软件:是由数据和指令组成的.(计算器)开发 ...

  7. Kali Linux攻防系统(一:攻防系统Kali Linux下载安装与更新)

    任务一:攻防系统Kali Linux下载安装与更新 1.1.安装Kali Linux虚拟机 1.1.1.电脑硬件配置至少达到 CPU 内存 存储 >四核 >4G >20G 1.1.2 ...

  8. 平板电脑安装软件_题宝典软件升级了,微信公众号版不受影响,电脑版/手机APP/平板APP需要重新下载安装...

    亲爱的小伙伴们 大家好 题宝典软件升级了 那我们应该升级题库软件呢? 我们来一起看看 一.微信公众号版 进入步骤 关注本公众号(tbd339),点击菜单栏的"做题中心",如下图,然 ...

  9. windows10 下载 安装 使用 Sox

    windows10 下载 安装 使用 Sox 官网 http://sox.sourceforge.net/ 下载地址 https://sourceforge.net/projects/sox/file ...

最新文章

  1. php后台无法登入,PHP magento后台无法登录问题解决方法
  2. 使用Dynamic LINQ实现Ext Grid的远程排序
  3. ORA-00054: 资源正忙, 但指定以 NOWAIT 方式获取资源, 或者超时失效
  4. Delphi通过ADOQuery控件实现Sqlserver数据库多结果集的数据打印
  5. 敏捷外包工程系列之四:外包与敏捷开发专访(IIOM独家专访)
  6. 如何在钉钉上开发自己的应用_对企业来说无代码开发平台是否安全
  7. 在训练期间保存检查点
  8. indesign教程,如何创建和编辑图形元素的框架?
  9. cni k8s 插件安装_实现K8S中Pod带宽限制
  10. python 端口扫描_使用 python-nmap 进行端口扫描
  11. ansible set_fact模块
  12. springBoot项目改名
  13. 单月涨粉超600w,直播销售额破5亿,2月的黑马都是谁?
  14. windows xp 64位版本 有些失望~
  15. 【SAP Abap】关于销售凭证VBKD业务数据表的使用与注意事项
  16. 简单演示Exploit SEH原理(未开启SafeSEH模块)
  17. 【Arduino使用旋转编码器模块】
  18. 变分自编码器的推导,VAE的推导,ELBO|证据下界|训练方法
  19. 洛谷P3758/BZOJ4887 [TJOI2017] 可乐 [矩阵快速幂]
  20. 阿里软件开发工程师面经

热门文章

  1. Ubuntu 16.04 下修改免安裝版tomcat的內存大小
  2. 1107班html大赛比赛说明 同学们需注意的事项
  3. 线程的特点 java 1615387415
  4. 扩展图形输出 1111 java
  5. mysql知识汇总2019
  6. css-选择器-进阶-属性选择器-组选择器-nth选择器
  7. CSS浏览器兼容性与解决方法
  8. 机器学习——Day 3 多元线性回归
  9. 广州a货翡翠,深圳a货翡翠
  10. URL Loading System 概览