From 82feb2f7ec278184c79c41b8d6f0d21d23017d3e Mon Sep 17 00:00:00 2001 From: afamiliarquiet Date: Thu, 31 Oct 2024 16:05:38 -0700 Subject: [PATCH] btw, level key translations --- .../client/gooey/SummoningRequestLayer.java | 8 ++++---- src/main/resources/assets/familiar_magic/lang/en_us.json | 6 +++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/main/java/io/github/afamiliarquiet/familiar_magic/client/gooey/SummoningRequestLayer.java b/src/main/java/io/github/afamiliarquiet/familiar_magic/client/gooey/SummoningRequestLayer.java index ce2239d..2c516e1 100644 --- a/src/main/java/io/github/afamiliarquiet/familiar_magic/client/gooey/SummoningRequestLayer.java +++ b/src/main/java/io/github/afamiliarquiet/familiar_magic/client/gooey/SummoningRequestLayer.java @@ -1,7 +1,6 @@ package io.github.afamiliarquiet.familiar_magic.client.gooey; import io.github.afamiliarquiet.familiar_magic.FamiliarMagicClient; -import io.github.afamiliarquiet.familiar_magic.data.FamiliarAttachments; import io.github.afamiliarquiet.familiar_magic.data.SummoningRequestData; import net.minecraft.client.DeltaTracker; import net.minecraft.client.Minecraft; @@ -57,7 +56,8 @@ public void render(GuiGraphics guiGraphics, DeltaTracker deltaTracker) { ); // i have a hunch this may not exist but we shall see! maybe neoforge is nice to me today - Component levelComponent = Component.translatable(requestData.tableLevelKey().location().toLanguageKey()); + // ya didnt exist. so i make it my own and it's fine enough, compat with other mod dimensions should be easy enough + Component levelComponent = Component.translatable("familiar_magic.level_key." + requestData.tableLevelKey().location().toLanguageKey()); BlockPos destinationPos = requestData.tablePos(); Component positionComponent = Component.translatable( "gui.familiar_magic.summoning_request.position", @@ -68,8 +68,8 @@ public void render(GuiGraphics guiGraphics, DeltaTracker deltaTracker) { List offerings = requestData.offerings().orElse(List.of()); // *should* always be present but w/e this.drawCenteredStringAtHeight(guiGraphics, minecraft.font, top, left, titleComponent, 0); - guiGraphics.drawWordWrap(minecraft.font, blurb, left + this.spacing, top + 26, this.imageWidth - 2 * this.spacing, 0x492f5b); - this.drawCenteredStringAtHeight(guiGraphics, minecraft.font, top, left, levelComponent, 60); + guiGraphics.drawWordWrap(minecraft.font, blurb, left + this.spacing, top + 26, this.imageWidth - 2 * this.spacing, 0x382414); + this.drawCenteredStringAtHeight(guiGraphics, minecraft.font, top, left, levelComponent, 62); this.drawCenteredStringAtHeight(guiGraphics, minecraft.font, top, left, positionComponent, 72); this.drawItems(guiGraphics, minecraft.font, top, left, offerings); diff --git a/src/main/resources/assets/familiar_magic/lang/en_us.json b/src/main/resources/assets/familiar_magic/lang/en_us.json index 3e0f94c..12aaea8 100644 --- a/src/main/resources/assets/familiar_magic/lang/en_us.json +++ b/src/main/resources/assets/familiar_magic/lang/en_us.json @@ -12,5 +12,9 @@ "commands.familiar_magic.success": "Placed candles for %s at %s %s %s", "category.familiar_magic.familiar_magic": "Familiar Magic", "key.familiar_magic.focus": "Focus", - "key.familiar_magic.focus_toggle": "Toggle Focus" + "key.familiar_magic.focus_toggle": "Toggle Focus", + + "familiar_magic.level_key.minecraft.overworld": "The Overworld", + "familiar_magic.level_key.minecraft.the_nether": "The Nether", + "familiar_magic.level_key.minecraft.the_end": "The End" }