Skip to content

Commit

Permalink
Update initialization.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
JaylyDev committed May 26, 2024
1 parent f8015de commit 10d820c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/terminator/initialization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import { MinecraftColor } from "../minecraft-color";
// naming tag
terminatorSpawn.subscribe(({ entity }) => {
system.runTimeout(() => {
const nameTag = entity.nameTag ?? "Terminator";
const nameTag = entity.nameTag || "Terminator";
entity.nameTag = nameTag;
const terminators = entity.dimension.getEntities({
type: "entity:terminator",
});
Expand All @@ -27,8 +28,8 @@ terminatorSpawn.subscribe(({ entity }) => {
);
if (terminatorsWithSameName.length > 0)
entity.nameTag = `${nameTag} (${terminatorsWithSameName.length})`;
else entity.nameTag = nameTag;
}

// broadcast to world
const rawtext: RawText = {
rawtext: [
Expand Down

0 comments on commit 10d820c

Please sign in to comment.