Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我用 eclipse 制作了一个 minecraft mod,我有我的 .java 文件。我不太确定如何使它成为每个人都可以使用的类文件,有人可以帮助我吗?谢谢。
如果您已经编写了代码,只需将其添加到您当前的代码中即可。
package yourpackage.name; public class example { //Insert your code all within these brackets. }
如果您想创建一个新类,请右键单击 src 文件夹,然后选择新包。将其命名为 mine.craft.mod 然后右键单击您新创建的包并选择新类。为其提供一个名称,例如 example.java 并选择完成。它应该创建一个新创建的类。