跳到正文

TMM datapack_extension

作者:YUN-SAN3

Allows customizing game area settings of the Train Murder Mystery mod through datapacks.

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

TMM Datapack Extension

Allows customizing game area settings of the Train Murder Mystery mod through datapacks.

Key Features

  • No need to modify the original mod code
  • Flexible configuration of all game areas through datapack JSON files
  • Hot reload support – use /reload to apply changes without restarting

Customizable Areas

Includes: Player spawn position, spectator spawn position, ready area, play area offset, play area, reset template area, and reset paste area.

Datapack Usage Tutorial

You can download a sample datapack here.

1. Create Datapack Structure

Create the following folder structure:

my_tmm_config_datapack/
├── pack.mcmeta
└── data/
    └── trainmurdermystery/
        └── tmm_areas/
            └── custom_areas.json

2. Create Metadata File

Modification Instructions

Add to pack.mcmeta file:

{
  "pack": {
    "pack_format": 15,
    "description": "My TMM Custom Configuration"
  }
}

This mod enables customization of Train Murder Mystery game areas through datapacks. Users can modify the game areas by creating a datapack with custom configuration files.

3. Configure Game Areas

The extension will automatically load and apply any valid configuration found in datapacks under the path: data/trainmurdermystery/tmm_areas/custom_areas.json.

Configure in custom_areas.json file:

{
  "spawn_pos": {
    "pos": [-872.5, 0.0, -323.0],  // Player spawn position coordinates and orientation
    "yaw": 90.0,                     // Horizontal facing (-90=east, 0=south, 90=west, 180=north)
    "pitch": 0.0                      // Vertical facing (-90=looking up, 0=horizontal, 90=looking down)
  },
  "spectator_spawn_pos": {
    "pos": [-68.0, 133.0, -535.5],   // Spectator spawn position coordinates
    "yaw": -90.0,                     // Spectator horizontal facing
    "pitch": 15.0                     // Spectator vertical facing
  },
  "ready_area": {
    // Ready area where players must be to count as ready
    "minX": -1017.0,                  // Minimum X coordinate of the area
    "minY": -1.0,                     // Minimum Y coordinate of the area
    "minZ": -363.5,                   // Minimum Z coordinate of the area
    "maxX": -813.0,                   // Maximum X coordinate of the area
    "maxY": 3.0,                      // Maximum Y coordinate of the area
    "maxZ": -357.5                    // Maximum Z coordinate of the area
  },
  "play_area_offset": {
    // Coordinate offset when players are teleported from ready area to play area
    "x": 963.0,                       // X-axis offset
    "y": 121.0,                       // Y-axis offset
    "z": -175.0                       // Z-axis offset
  },
  "play_area": {
    // Game area where players are bound, going outside or falling will result in death
    "minX": -140.0,
    "minY": 118.0,
    "minZ": -550.5,
    "maxX": 230.0,
    "maxY": 200.0,
    "maxZ": -520.5
  },
  "reset_template_area": {
    // Area where the map reset base template is located
    "minX": -57.0,
    "minY": 64.0,
    "minZ": -531.0,
    "maxX": 177.0,
    "maxY": 74.0,
    "maxZ": -541.0
  },
  "reset_paste_area": {
    // Area where the template should be pasted during map reset
    "minX": -57.0,
    "minY": 119.0,
    "minZ": -531.0,
    "maxX": 177.0,
    "maxY": 129.0,
    "maxZ": -541.0
  }
}

Configuration values will override the default values from the original mod. If no custom configuration is found, the mod will use the original default values.

4. Installation and Usage

Place the datapack in the world’s datapacks folder

Note: This mod was developed with the assistance of AI technology.

常见问题

TMM datapack_extension 支持哪些 Minecraft 版本?

TMM datapack_extension 支持 Minecraft Java 版 1.21.1,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。

TMM datapack_extension 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅服务端。

评论

登录后评论和评分