From 87e239af4ba414989bcca2c0f676fa79ec417297 Mon Sep 17 00:00:00 2001 From: wifi_left Date: Fri, 29 Mar 2024 23:24:51 +0800 Subject: [PATCH] Fix grammer errors --- ErrorMessages.js | 2 +- debug/test_result.mcfunction | 6 +++++- index.js | 6 +++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ErrorMessages.js b/ErrorMessages.js index c22a56d..bad3315 100644 --- a/ErrorMessages.js +++ b/ErrorMessages.js @@ -1,7 +1,7 @@ const ERROR_MESSAGES = { NOT_ENOUGHT_ARGUMENTS: "# SyntaxError: Not enough command arguments.", UNKNOWN_ARGUMENTS: "# SyntaxError: Unknown command arguments.", - UNSUPPORTED:"## Unsupport transformation", + UNSUPPORTED:"## WARNING: Unsupport transformation", WARNING_MAY_CAUSE_PROBLEM: "## WARNING: The transformation may cause problem. You might need to modify it by yourself." } module.exports = { ERROR_MESSAGES } diff --git a/debug/test_result.mcfunction b/debug/test_result.mcfunction index 09a9ddc..11758ce 100644 --- a/debug/test_result.mcfunction +++ b/debug/test_result.mcfunction @@ -1,6 +1,10 @@ +## +## Datapack Upgrader v1.0.0 by wifi_left +## If you encounter a problem, make an issue on https://github.com/wifi-left/Datapack-Upgrader +## # execute store result block 1 1 1 Items[0].tag.display.Name byte 1 if data entity @s {"Inventory":[{id:"minecraft:emerald",Count:1b,tag:{Enchantments:[{id:"minecraft:sharpness",lvl:1}]}}]} ## WARNING: The transformation may cause problem. You might need to modify it by yourself. data modify block ~ ~ ~ Items[0].components."minecraft:enchantments".levels set from block ~ ~ ~ Items[1].components."minecraft:enchantments".levels -## Unsupport transformation +## WARNING: Unsupport transformation data merge block ~ ~ ~ {Items:[{tag:{display:{Name:'"1"'}}}]} diff --git a/index.js b/index.js index 09534b5..808a663 100644 --- a/index.js +++ b/index.js @@ -7,7 +7,7 @@ const pathLib = require('path') console.warn("###") console.warn("### Datapack Upgrader v" + package.version + " by " + package.author) -console.warn("### If you encounter a problem, make a issue on " + package.homepage) +console.warn("### If you encounter a problem, make an issue on " + package.homepage) console.warn("### ") const { NBTools, getNbtContent, getNbtType, warpKey } = require("./NBTool.js"); var OutputFile = null; @@ -90,6 +90,10 @@ while (i < argvs.length) { writeDebugLine(error); continue; } + writeLine("##") + writeLine("## Datapack Upgrader v" + package.version + " by " + package.author) + writeLine("## If you encounter a problem, make an issue on " + package.homepage) + writeLine("## ") let arrs = content.replace("\r", "").split("\n"); for (let j = 0; j < arrs.length; j++) writeLine(transformCommand(arrs[j].trim()));