Skip to content

Debug command

XiaoColorful edited this page Jul 27, 2026 · 2 revisions

English

调试指令

wiki 版本:0.0.1.1

服务端指令

设置调试模式

/customgun debug [enable]

开启或关闭调试模式

  • enable(bool):调试模式开关

测试IO

/customgun debug testIO [lenient]

测试JSON输入/输出序列化

  • lenient(bool):是否宽松模式

测试枪械数据

/customgun debug testGunData [rl]

测试读取指定枪械数据并输出到文件

  • rl(字符串):枪械数据的ResourceLocation

导出全部数据

/customgun debug testAllData [indent] [path]

将所有已加载的数据包导出到指定路径

  • indent(整数):JSON缩进空格数
  • path(字符串):导出目录路径

测试Mixin

/customgun debug mixinTest [target]

验证Mixin是否正确应用

  • target(字面量):测试目标,可选值为ILivingShooterGunProjectileIEntityHitboxHistory

客户端指令

测试声音文件

/customgun debug testGetSound [rl]

测试指定声音文件是否可被资源管理器加载

  • rl(字符串):声音文件的ResourceLocation

English

wiki verison: 0.0.1.1

Server command

Set debug mode

/customgun debug [enable]

Enable or disable debug mode

  • enable (bool): Debug mode toggle

Test IO

/customgun debug testIO [lenient]

Test JSON input/output serialization

  • lenient (bool): Lenient mode

Test gun data

/customgun debug testGunData [rl]

Read specified gun data and output to file

  • rl (string): ResourceLocation of the gun data

Export all data

/customgun debug testAllData [indent] [path]

Export all loaded data packs to the specified path

  • indent (integer): Number of JSON indent spaces
  • path (string): Export directory path

Test Mixin

/customgun debug mixinTest [target]

Verify that Mixin is correctly applied

  • target (literal): Test target, options are ILivingShooter, GunProjectile, IEntityHitboxHistory

Client command

Test sound file

/customgun debug testGetSound [rl]

Test whether the specified sound file can be loaded by the resource manager

  • rl (string): ResourceLocation of the sound file

🌐 Language / 语言


Clone this wiki locally