e418

模组

· 作者 5w14

[开发中] 一个提供数据驱动游戏事件支持的模组库。

0 本站下载 0 关注 更新于 1 年前

需要前置:Architectury API

最新 0.0.4 · 1.21.4 · NeoForge

一键开服(送7天)

e418

这是一个提供数据驱动游戏事件功能的模组库。

以下是一个数据驱动事件的示例:

{
  "name": "Example event",
  "description": "",
  "behaviours": [
    {
      // Modify context to select a random location around a random player
      "type": "e418:mutate_context",
      "mutators": [
        {
          "type": "e418:select_random_player",
        },
        {
          "type": "e418:select_random_location_around_player",
        },
      ],

      // Run only if the player is below 30 on Y-axis
      "run_conditions": [
        {
          "type": "e418:at_height",
          "below": 30,
        },
      ],

      // Play a cave sound
      "behaviours": [
        {
          "type": "e418:play_sound",
          "sound": "minecraft:ambient.cave",
          "volume": 1.0,
          "pitch": 0.8,
        },
      ],
    },
  ],
  "run_conditions": [],
  "queue_conditions": [],
}

作为依赖使用

虽然此库可以作为数据包驱动的插件的驱动核心,但你也可以使用模组来添加你的内容。

我们建议使用 Architectury 开发跨平台的插件。

在你的 gradle.properties 中添加版本字符串:

e418_version=0.0.2

添加 jitpack 仓库和依赖项:

// in root build.gradle
repositories {
  maven {
    url = "https://jitpack.io/"
    // Note: JitPack compile times may be slow on first build
  }
}

dependencies {
  // in common/build.gradle
  modImplementation "com.github.5w14.e418:e418-common:${project.e418_version}"

  // in fabric/build.gradle
  modImplementation "com.github.5w14.e418:e418-fabric:${project.e418_version}"

  // in neoforge/build.gradle
  modImplementation "com.github.5w14.e418:e418-neoforge:${project.e418_version}"
}

更多信息请查看 GitHub。

你是这个资源的作者?登录后可认领此资源。

评论 0

0.0
暂无评分
5 星
0
4 星
0
3 星
0
2 星
0
1 星
0
我的评分

登录后参与评分

还没有评论,来抢沙发吧

评论配图

相似资源