|
| 1 | +import { Block, EquipmentSlot, ItemStack, Player, RawMessage } from "@minecraft/server"; |
1 | 2 | import { |
2 | 3 | ChunkTickEvent, |
3 | 4 | DirectionUtils, |
4 | 5 | EntityTickEvent, |
5 | | - Identifier, |
6 | 6 | PlayerChunkLoadEvent, |
7 | 7 | PlayerChunkUnloadEvent, |
8 | | - Settings, |
9 | 8 | } from "@lpsmods/mc-utils"; |
10 | | -import { Block, EquipmentSlot, ItemStack, Player, RawMessage } from "@minecraft/server"; |
| 9 | +import { Identifier, Settings, TextUtils } from "@lpsmods/mc-common"; |
11 | 10 |
|
12 | 11 | export interface DevToolOptions { |
13 | 12 | name?: string; |
@@ -176,7 +175,7 @@ class BlockInfoTool extends DevTool { |
176 | 175 |
|
177 | 176 | if (this.store.get("dimension")) { |
178 | 177 | const dimId = Identifier.parse(block.dimension.id).path; |
179 | | - texts.push({ text: `Dimension: §7${dimId.toTitleCase()}§r` }); |
| 178 | + texts.push({ text: `Dimension: §7${TextUtils.smartTitleCase(dimId)}§r` }); |
180 | 179 | } |
181 | 180 |
|
182 | 181 | if (this.store.get("position")) { |
@@ -283,11 +282,11 @@ class PlayerInfoTool extends DevTool { |
283 | 282 |
|
284 | 283 | if (this.store.get("dimension")) { |
285 | 284 | const dimId = Identifier.parse(dim.id).path; |
286 | | - texts.push({ text: `Dimension: §7${dimId.toTitleCase()}§r` }); |
| 285 | + texts.push({ text: `Dimension: §7${TextUtils.smartTitleCase(dimId)}§r` }); |
287 | 286 | } |
288 | 287 | if (this.store.get("biome")) { |
289 | 288 | const b = dim.getBiome({ x, y, z }).id.replace("minecraft:", ""); |
290 | | - texts.push({ text: `Biome: §7${b.toTitleCase()}§r` }); |
| 289 | + texts.push({ text: `Biome: §7${TextUtils.smartTitleCase(b)}§r` }); |
291 | 290 | } |
292 | 291 | if (this.store.get("position")) { |
293 | 292 | const text = `Position: ${this.store.get("position_coloring") ? `§c${x.toFixed(2)}§7, §a${y.toFixed(2)}§7, §9${z.toFixed(2)}§r` : `§7${x.toFixed(2)}, ${y.toFixed(2)}, ${z.toFixed(2)}§r`}`; |
|
0 commit comments