允许在整合包中使用此模组!
您可以将此模组包含在公开或私人的 Minecraft 整合包中,前提是模组文件未被修改,且从其官方 Modrinth 或 CurseForge 页面下载。
SnAssets 资源库 - 通用
SnAssets 通用库是我在自己的项目中经常使用的大量资源的集合,现在已打包成方便其他模组开发者使用的形式:只需将此项目作为依赖项并通过 JSON 引用资源即可!
500+ 种音效,适用于:
碎片、枪械、爆炸、火箭、雨声、车门声、车轮滚动声、换弹声、风声以及其他杂项音效!
关于引擎音效,请参阅 SnAssets - Engines(其中包含大量音效,因此对于不使用任何引擎音效的用户来说,将其分开是合理的)。
读者须知:
SN Assets 是一个跨加载器的 Minecraft 资源库,供其他模组使用。它包含可复用的纹理、粒子精灵、音效以及命名空间下的其他资源文件夹:
snassets
使用方法:
- 将 SnAssets 添加为模组的依赖项。
- 通过您自己的粒子 JSON 引用粒子纹理,例如:
snassets:bang0
- 通过您自己的
sounds.json 引用音效文件,例如:"snassets:bulletimpact/bullethit_glass0"
- SnAssets 还包含其自身生成的
sounds.json,因此在加载器/API 支持的情况下,可以直接引用音效 ID。
请勿从此库中复制资源
将 SnAssets 作为依赖项并通过 JSON 或代码引用资源是可以的。
严禁从本库中提取实际的 PNG、OGG 或其他资源文件,并将其粘贴、捆绑或重新分发到您自己的模组中。
详细使用方法:
SnAssets - 如何引用来自其他模组的资源
====================================================
模组 ID / 命名空间:
snassets
SnAssets 是一个资源库。你的模组应依赖它,然后通过命名空间来引用其资源。
请勿将实际的 PNG 或 OGG 文件复制到你的模组中。
1. 引用粒子纹理
--------------------------------
粒子纹理位于 SnAssets 内部的以下路径:
assets/snassets/textures/particle/
当从你自己的粒子 JSON 中引用粒子纹理时,请使用:
snassets:
SnAssets 示例文件:
assets/snassets/textures/particle/bang0.png
从你模组的粒子 JSON 中按如下方式引用:
assets/examplemod/particles/example_bang.json
{
"textures": [
"snassets:bang0"
]
}
多帧示例:
{
"textures": [
"snassets:bang0",
"snassets:bang1",
"snassets:bang2",
"snassets:bang3"
]
}
如果纹理位于子文件夹中,请保留子文件夹路径。
SnAssets 示例文件:
assets/snassets/textures/particle/bulletholes/bullethole_basic.png
引用方式:
snassets:bulletholes/bullethole_basic
重要提示:
SnAssets 仅提供纹理文件。
如果你的加载器/版本需要,你的模组仍需注册或定义粒子类型。
2. 引用声音
---------------------
声音文件位于 SnAssets 内部的以下路径:
assets/snassets/sounds/
SnAssets 还包含:
assets/snassets/sounds.json
该文件定义了所有包含的 OGG 文件的声音事件 ID。
SnAssets 声音文件示例:
assets/snassets/sounds/bulletimpact/bullethit_glass0.ogg
直接使用的 SnAssets 声音事件 ID:
snassets:bulletimpact/bullethit_glass0
引用声音时不要包含 ".ogg" 后缀。
推荐的兼容性方法
--------------------------------
为了获得最佳兼容性,请在你的模组中定义自己的声音事件,并将其指向 SnAssets 的 OGG 文件。
你模组中的示例文件:
assets/examplemod/sounds.json
{
"weapon.bullet_hit_glass": {
"sounds": [
"snassets:bulletimpact/bullethit_glass0"
]
}
}
然后你的模组可以播放:
examplemod:weapon.bullet_hit_glass
这样可以让你的模组拥有声音事件,而 SnAssets 提供实际的音频文件。
替代的直接方法
-------------------------
在你的加载器、Minecraft 版本、命令或 API 直接接受声音标识符的地方,你可以使用 SnAssets 的声音事件 ID:
snassets:bulletimpact/bullethit_glass0
如果你的代码 API 要求注册 SoundEvent 对象,请注册你自己的声音事件并使用上述推荐的兼容性方法。
3. 依赖项示例
----------------------
Fabric fabric.mod.json:
{
"depends": {
"snassets": "*"
}
}
Forge / NeoForge mods.toml:
[[dependencies.examplemod]]
modId="snassets"
mandatory=true
versionRange="[1.0.0,)"
ordering="NONE"
side="BOTH"
将 "examplemod" 替换为你自己的模组 ID。
4. 使用规则
-------------
允许:
将 SnAssets 设为依赖项,并通过 JSON 或代码引用其资源。
不允许:
从 SnAssets 中提取 PNG、OGG 或其他资源文件并粘贴到你的模组中。
You're allowed to use this mod in your modpacks!
You may include this mod in public or private Minecraft modpacks, provided the mod file is unmodified and downloaded from its official Modrinth or CurseForge page
SnAssets Asset Library - General
The SnAssets General Library is a collection of many of my assets I regularly use in my own projects, now compact for any other modder to use by making this project a dependency and referencing assets via JSON!
500+ sounds for:
Debris, firearms, explosions, rockets, rain sounds, car doors, wheel rolling sounds, reloading sounds, wind sounds and miscellaneous sounds!
For engine sounds, please see SnAssets - Engines (Theres a LOT in them, hence a split is reasonable for those that wont be using any engine sounds)
Reader:
SN Assets is a cross-loader Minecraft asset library for other mods to use. It contains reusable textures, particle sprites, sounds, and other asset folders under the namespace:
snassets
How to use:
- Add SnAssets as a dependency for your mod.
- Reference particle textures from your own particle JSON, for example:
snassets:bang0
- Reference sound files through your own
sounds.json, for example: "snassets:bulletimpact/bullethit_glass0"
- SnAssets also includes its own generated
sounds.json, so sound IDs can be referenced directly where the loader/API supports that.
Do not copy assets out of this library
It is fine to make SnAssets a dependency and reference assets via JSON or code.
It is prohibited to take the actual PNG, OGG, or other asset files from this library and paste, bundle, or redistribute them inside your own mod.
Detailed how to use:
SnAssets - How to reference assets from another mod
====================================================
Mod id / namespace:
snassets
SnAssets is an asset library. Your mod should depend on it, then reference its assets by namespace.
Do not copy the actual PNG or OGG files into your own mod.
1. Referencing particle textures
--------------------------------
Particle textures live here inside SnAssets:
assets/snassets/textures/particle/
When referencing a particle texture from your own particle JSON, use:
snassets:
Example SnAssets file:
assets/snassets/textures/particle/bang0.png
Reference it from your mod's particle JSON like this:
assets/examplemod/particles/example_bang.json
{
"textures": [
"snassets:bang0"
]
}
Example with multiple frames:
{
"textures": [
"snassets:bang0",
"snassets:bang1",
"snassets:bang2",
"snassets:bang3"
]
}
If the texture is in a subfolder, keep the subfolder path.
Example SnAssets file:
assets/snassets/textures/particle/bulletholes/bullethole_basic.png
Reference:
snassets:bulletholes/bullethole_basic
Important:
SnAssets only provides the texture files.
Your own mod still needs to register or define the particle type if your loader/version requires that.
2. Referencing sounds
---------------------
Sound files live here inside SnAssets:
assets/snassets/sounds/
SnAssets also includes:
assets/snassets/sounds.json
That file defines sound event IDs for all included OGG files.
Example SnAssets sound file:
assets/snassets/sounds/bulletimpact/bullethit_glass0.ogg
Direct SnAssets sound event ID:
snassets:bulletimpact/bullethit_glass0
Do not include ".ogg" when referencing sounds.
Recommended compatibility method
--------------------------------
For best compatibility, define your own sound event in your mod and point it at the SnAssets OGG file.
Example file in your mod:
assets/examplemod/sounds.json
{
"weapon.bullet_hit_glass": {
"sounds": [
"snassets:bulletimpact/bullethit_glass0"
]
}
}
Your mod would then play:
examplemod:weapon.bullet_hit_glass
This lets your mod own the sound event while SnAssets provides the actual audio file.
Alternative direct method
-------------------------
Where your loader, Minecraft version, command, or API accepts a sound identifier directly, you can use the SnAssets sound event ID:
snassets:bulletimpact/bullethit_glass0
If your code API requires registered SoundEvent objects, register your own sound event and use the recommended compatibility method above.
3. Dependency examples
----------------------
Fabric fabric.mod.json:
{
"depends": {
"snassets": "*"
}
}
Forge / NeoForge mods.toml:
[[dependencies.examplemod]]
modId="snassets"
mandatory=true
versionRange="[1.0.0,)"
ordering="NONE"
side="BOTH"
Replace "examplemod" with your own mod id.
4. Usage rule
-------------
Allowed:
Make SnAssets a dependency and reference its assets through JSON or code.
Not allowed:
Taking PNG, OGG, or other asset files out of SnAssets and pasting them into your own mod.
评论 0
登录后参与评分
还没有评论,来抢沙发吧