[英]Use /src/resources as source directory for a new package
I would like to create a new package in Inteliji IDEA (Community Edition) where the source directory is /src/main/resources.我想在 Inteliji IDEA(社区版)中创建一个新的 package,其中源目录是 /src/main/resources。 I am trying to create a simple forge mod, and need to create several packages in resources for handling textures and other assets.
我正在尝试创建一个简单的锻造模组,并且需要在资源中创建几个包来处理纹理和其他资产。 My file structure looks like this:
我的文件结构如下所示:
Main
>Java
>com.mycompany.project
>Package1
>Package2
>Main.java
Resources
>mcmod.info
>pack.mcmeta
Is there any way to create a package in /src/main/resources?有什么方法可以在 /src/main/resources 中创建 package 吗? I have seen examples of this being done in Eclipse, but I would prefer to not have to use two IDEs.
我在 Eclipse 中看到了这样的例子,但我宁愿不必使用两个 IDE。
Please refer to the documentation .请参阅文档。
I believe you can do it by right clicking on Resources
folder, then New
-> Directory
and then specify the package com.mycompany.project
.我相信你可以通过右键单击
Resources
文件夹,然后New
-> Directory
然后指定 package com.mycompany.project
来做到这一点。 Intellij will create the hierarchical package structure. Intellij 将创建分层 package 结构。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.