From df7f10d7aee4baaddb531729e0989b0b5506127f Mon Sep 17 00:00:00 2001 From: dirtTW Date: Sun, 28 Jul 2024 16:41:58 +0700 Subject: [PATCH 1/8] Added Traditional Chinese (zh_tw.json) Added Traditional Chinese localization --- src/main/resources/assets/sit/lang/zh_tw.json | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 src/main/resources/assets/sit/lang/zh_tw.json diff --git a/src/main/resources/assets/sit/lang/zh_tw.json b/src/main/resources/assets/sit/lang/zh_tw.json new file mode 100644 index 0000000..62f239a --- /dev/null +++ b/src/main/resources/assets/sit/lang/zh_tw.json @@ -0,0 +1,51 @@ +{ + "config.sit.empty": "空", + "config.sit.restrictive": "限制", + "config.sit.none": "無", + "config.sit.category.general": "一般", + "config.sit.category.general.tooltip": "一般設定", + "config.sit.category.main_hand": "主手", + "config.sit.category.main_hand.tooltip": "主手設定", + "config.sit.category.off_hand": "副手", + "config.sit.category.off_hand.tooltip": "副手設定", + "config.sit.general.keep_active": "保持活躍", + "config.sit.general.keep_active.description": "即使在登出/關閉時,也保持實體處於活躍狀態", + "config.sit.general.sittable": "可坐的方塊", + "config.sit.general.sittable.description": "切換坐在不同方塊類型上的能力。", + "config.sit.general.sit_while_seated": "坐下時坐下", + "config.sit.general.sit_while_seated.description": "切換已經坐在一個方塊上時,坐在其他方塊上的能力。", + "config.sit.general.sittable.stairs": "階梯", + "config.sit.general.sittable.slabs": "半磚", + "config.sit.general.sittable.carpets": "地毯", + "config.sit.general.sittable.full_blocks": "完整方塊", + "config.sit.general.sittable.custom": "自訂", + "config.sit.general.sittable.custom.description": "啟用新增自訂方塊以供坐下。", + "config.sit.general.sittable_blocks": "自訂可坐方塊", + "config.sit.general.sittable_blocks.description": "新增自訂可坐方塊!", + "config.sit.general.sittable_blocks.description_2": "範例:%s", + "config.sit.general.sittable_blocks.description_4": "第一個條目:自訂方塊", + "config.sit.general.sittable_blocks.description_5": "第二個條目:坐姿高度(0-1 之間的數字,例如 0.52)", + "config.sit.general.sittable_blocks.description_6": "第三個條目:碰撞箱大小(玩家下馬時在實體上方生成的位置)", + "config.sit.general.sittable_blocks.description_7": "第四個條目(可選):坐下的必要方塊狀態(輸入「!」排除方塊狀態)", + "config.sit.general.sittable_blocks.description_8": "使用「|」分隔不同的條目!", + "config.sit.hand": "手部設定", + "config.sit.hand.requirements": "需求", + "config.sit.hand.requirements.description": "坐下的手部需求。", + "config.sit.hand.requirements.description_2": "空 = 手必須是空的", + "config.sit.hand.requirements.description_3": "限制 = 為手部狀態設定限制", + "config.sit.hand.requirements.description_4": "無 = 隨時可以坐下", + "config.sit.hand.restrictions": "限制", + "config.sit.hand.restrictions.description": "切換預設的手部限制以供坐下。", + "config.sit.hand.restrictions.blocks": "方塊", + "config.sit.hand.restrictions.food": "食物", + "config.sit.hand.restrictions.usable": "可使用的", + "config.sit.hand.restrictions.usable.description": "例如:弓、三叉戟、盾牌", + "config.sit.hand.whitelist": "白名單", + "config.sit.hand.whitelist.description": "為玩家可以用來坐下的物品建立自訂白名單。", + "config.sit.hand.blacklist": "黑名單", + "config.sit.hand.blacklist.description": "為玩家無法用來坐下的物品建立自訂黑名單。", + "config.sit.hand.list.description": "範例:", + "config.sit.hand.list.description_2": "「minecraft:torch」", + "key.sit.command.reloaded": "已重新載入設定!", + "key.sit.command.purged": "已清除所有活躍的椅子實體!" +} \ No newline at end of file From 67a79a0707ddc7afd9bf286e53b61594545ec1e9 Mon Sep 17 00:00:00 2001 From: Oth3r Date: Thu, 8 Aug 2024 10:20:20 -0500 Subject: [PATCH 2/8] 1.21.1 support --- gradle.properties | 6 +++--- src/main/resources/fabric.mod.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gradle.properties b/gradle.properties index 294ae81..28c3dac 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,8 +4,8 @@ org.gradle.parallel=true # Fabric Properties # check these on https://fabricmc.net/develop -minecraft_version=1.21 -yarn_mappings=1.21+build.1 +minecraft_version=1.21.1 +yarn_mappings=1.21.1+build.1 loader_version=0.15.11 # Mod Properties @@ -14,6 +14,6 @@ maven_group=one.oth3r archives_base_name=sit! # Dependencies -fabric_version=0.100.1+1.21 +fabric_version=0.102.0+1.21.1 modmenu_version=11.0.0-beta.1 yacl_version=3.5.0+1.21-fabric diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 95deb70..b311131 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -27,7 +27,7 @@ }, "depends": { "fabricloader": ">=0.14.21", - "minecraft": "=${minecraft_version}", + "minecraft": ">=1.21 <=${minecraft_version}", "java": ">=17", "fabric-api": "*" }, From f8aa5a9fb26618b2db7f6a967968c579b8b2b970 Mon Sep 17 00:00:00 2001 From: Oth3r Date: Thu, 8 Aug 2024 10:25:03 -0500 Subject: [PATCH 3/8] added traditional chinese to the config language list --- src/main/java/one/oth3r/sit/file/Config.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/one/oth3r/sit/file/Config.java b/src/main/java/one/oth3r/sit/file/Config.java index 994d89c..f40c834 100644 --- a/src/main/java/one/oth3r/sit/file/Config.java +++ b/src/main/java/one/oth3r/sit/file/Config.java @@ -177,7 +177,7 @@ public class Config { Gson gson = new GsonBuilder().disableHtmlEscaping().create(); file.write("# Sit! Config\n"); file.write("\nversion="+defaults.version); - file.write("\n# all available languages: en_us, ru_ru, es_es"); + file.write("\n# all available languages: en_us, ru_ru, es_es, zh_tw"); file.write("\nlang=" + lang); file.write("\n\n# "+lang("general.keep_active.description")); file.write("\nkeep-active=" + keepActive); From cd21eb87e545b61f4cdafdadbf63f21b19af5863 Mon Sep 17 00:00:00 2001 From: Oth3r Date: Thu, 8 Aug 2024 10:26:02 -0500 Subject: [PATCH 4/8] 1.1.9+1.21-1.21.1 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 28c3dac..dda8d8e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ yarn_mappings=1.21.1+build.1 loader_version=0.15.11 # Mod Properties -mod_version=1.1.8+1.21 +mod_version=1.1.9+1.21-1.21.1 maven_group=one.oth3r archives_base_name=sit! From 89bc57e02f499b4c52cb7029cc56dfaf001e3e35 Mon Sep 17 00:00:00 2001 From: dirtTW <31981880+yichifauzi@users.noreply.github.com> Date: Thu, 8 Aug 2024 23:48:07 +0700 Subject: [PATCH 5/8] Update zh_tw.json --- src/main/resources/assets/sit/lang/zh_tw.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/resources/assets/sit/lang/zh_tw.json b/src/main/resources/assets/sit/lang/zh_tw.json index 62f239a..391b9cf 100644 --- a/src/main/resources/assets/sit/lang/zh_tw.json +++ b/src/main/resources/assets/sit/lang/zh_tw.json @@ -4,10 +4,10 @@ "config.sit.none": "無", "config.sit.category.general": "一般", "config.sit.category.general.tooltip": "一般設定", - "config.sit.category.main_hand": "主手", - "config.sit.category.main_hand.tooltip": "主手設定", - "config.sit.category.off_hand": "副手", - "config.sit.category.off_hand.tooltip": "副手設定", + "config.sit.category.main_hand": "慣用手", + "config.sit.category.main_hand.tooltip": "慣用手設定", + "config.sit.category.off_hand": "非慣用手", + "config.sit.category.off_hand.tooltip": "非慣用手設定", "config.sit.general.keep_active": "保持活躍", "config.sit.general.keep_active.description": "即使在登出/關閉時,也保持實體處於活躍狀態", "config.sit.general.sittable": "可坐的方塊", @@ -48,4 +48,4 @@ "config.sit.hand.list.description_2": "「minecraft:torch」", "key.sit.command.reloaded": "已重新載入設定!", "key.sit.command.purged": "已清除所有活躍的椅子實體!" -} \ No newline at end of file +} From 5b649da2b977af0fd530616df7a8c3dc250fdb92 Mon Sep 17 00:00:00 2001 From: Oth3r <68134921+Oth3r@users.noreply.github.com> Date: Tue, 13 Aug 2024 11:35:38 -0500 Subject: [PATCH 6/8] Create bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 38 +++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..08a7feb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,38 @@ +name: Bug Report +description: Report a bug +labels: ["bug"] +body: + - type: markdown + attributes: + value: | + Please fill out the sections below to help identify and fix the bug + - type: textarea + id: description + attributes: + label: Describe your issue + placeholder: When I type a command an error appears + validations: + required: true + - type: textarea + id: steps + attributes: + label: Steps to reproduce + placeholder: | + 1. Go to config + 2. Enter the text "blah blah" + 3. Click done + validations: + required: true + - type: textarea + id: expected + attributes: + label: What was the expected result? + placeholder: I expected this to happen + - type: textarea + id: screenshots + attributes: + label: Put here any screenshots or videos (optional) + - type: markdown + attributes: + value: | + Thanks for reporting this issue! From de6c8a257a2f7d9277802f5f5cfe51497dde205a Mon Sep 17 00:00:00 2001 From: Oth3r Date: Sat, 24 Aug 2024 16:45:54 -0500 Subject: [PATCH 7/8] makes sure the block interaction event only works on server player, fixes #13 --- src/main/java/one/oth3r/sit/Events.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/one/oth3r/sit/Events.java b/src/main/java/one/oth3r/sit/Events.java index a604bab..8e155db 100644 --- a/src/main/java/one/oth3r/sit/Events.java +++ b/src/main/java/one/oth3r/sit/Events.java @@ -11,6 +11,7 @@ import net.minecraft.block.enums.SlabType; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityType; import net.minecraft.entity.decoration.DisplayEntity; +import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.BlockItem; import net.minecraft.item.ItemStack; import net.minecraft.registry.Registries; @@ -212,6 +213,8 @@ public class Events { Sit.commandManager = s.getCommandManager(); UseBlockCallback.EVENT.register((pl, world, hand, hitResult) -> { if (!Config.handSitting) return ActionResult.PASS; + // make sure its a server player + if (pl.getClass() != ServerPlayerEntity.class) return ActionResult.PASS; ServerPlayerEntity player = Sit.server.getPlayerManager().getPlayer(pl.getUuid()); if (player == null) return ActionResult.PASS; if (hand == net.minecraft.util.Hand.MAIN_HAND && hitResult.getType() == HitResult.Type.BLOCK) { From a72934c357769b8903854042eafcce9471b8a2c5 Mon Sep 17 00:00:00 2001 From: Oth3r Date: Sat, 24 Aug 2024 16:47:07 -0500 Subject: [PATCH 8/8] v1.1.10 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index dda8d8e..6713d50 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ yarn_mappings=1.21.1+build.1 loader_version=0.15.11 # Mod Properties -mod_version=1.1.9+1.21-1.21.1 +mod_version=1.1.10+1.21-1.21.1 maven_group=one.oth3r archives_base_name=sit!