mirror of
https://github.com/Shiewk/Widgets.git
synced 2026-04-28 11:34:17 +02:00
World time widget (#7)
This commit is contained in:
@@ -69,6 +69,7 @@ public class WidgetsModClient implements ClientModInitializer {
|
|||||||
WidgetManager.register(new SpeedWidget(Identifier.of(WidgetsMod.MOD_ID, "speed")));
|
WidgetManager.register(new SpeedWidget(Identifier.of(WidgetsMod.MOD_ID, "speed")));
|
||||||
WidgetManager.register(new ArmorHudWidget(Identifier.of(WidgetsMod.MOD_ID, "armor")));
|
WidgetManager.register(new ArmorHudWidget(Identifier.of(WidgetsMod.MOD_ID, "armor")));
|
||||||
WidgetManager.register(new InventoryWidget(Identifier.of(WidgetsMod.MOD_ID, "inventory")));
|
WidgetManager.register(new InventoryWidget(Identifier.of(WidgetsMod.MOD_ID, "inventory")));
|
||||||
|
WidgetManager.register(new WorldTimeWidget(Identifier.of(WidgetsMod.MOD_ID, "worldtime")));
|
||||||
WidgetManager.register(TPSWidget.INSTANCE);
|
WidgetManager.register(TPSWidget.INSTANCE);
|
||||||
|
|
||||||
ComboWidget comboWidget = new ComboWidget(Identifier.of(WidgetsMod.MOD_ID, "combo"));
|
ComboWidget comboWidget = new ComboWidget(Identifier.of(WidgetsMod.MOD_ID, "combo"));
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ public class BandwidthWidget extends BasicTextWidget {
|
|||||||
if (t >= tickRate || fastUpdate){
|
if (t >= tickRate || fastUpdate){
|
||||||
t = 0;
|
t = 0;
|
||||||
long avgBytesPerSecond = getAvgBytesPerSecond(MinecraftClient.getInstance(), tickRate);
|
long avgBytesPerSecond = getAvgBytesPerSecond(MinecraftClient.getInstance(), tickRate);
|
||||||
formatAndSetRenderText(literal(unit.sizeFormatter.apply(avgBytesPerSecond)));
|
formatAndSetRenderText(unit.sizeFormatter.apply(avgBytesPerSecond));
|
||||||
if (this.dynamicColor){
|
if (this.dynamicColor){
|
||||||
if (avgBytesPerSecond < 100000){
|
if (avgBytesPerSecond < 100000){
|
||||||
this.textColor = GradientOptions.solidColor(0xff00ff00);
|
this.textColor = GradientOptions.solidColor(0xff00ff00);
|
||||||
|
|||||||
@@ -146,6 +146,10 @@ public abstract class BasicTextWidget extends ResizableWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void formatAndSetRenderText(String renderText) {
|
||||||
|
formatAndSetRenderText(literal(renderText));
|
||||||
|
}
|
||||||
|
|
||||||
public abstract void tickWidget();
|
public abstract void tickWidget();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import net.minecraft.world.biome.Biome;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static net.minecraft.text.Text.literal;
|
|
||||||
import static net.minecraft.text.Text.translatable;
|
import static net.minecraft.text.Text.translatable;
|
||||||
|
|
||||||
public class BiomeWidget extends BasicTextWidget {
|
public class BiomeWidget extends BasicTextWidget {
|
||||||
@@ -44,12 +43,12 @@ public class BiomeWidget extends BasicTextWidget {
|
|||||||
},
|
},
|
||||||
(b) -> "[unregistered " + b + "]"
|
(b) -> "[unregistered " + b + "]"
|
||||||
);
|
);
|
||||||
formatAndSetRenderText(literal(text));
|
formatAndSetRenderText(text);
|
||||||
} else {
|
} else {
|
||||||
if (showLabel){
|
if (showLabel){
|
||||||
formatAndSetRenderText(translatable("widgets.widgets.biome.label", "?"));
|
formatAndSetRenderText(translatable("widgets.widgets.biome.label", "?"));
|
||||||
} else {
|
} else {
|
||||||
formatAndSetRenderText(literal("?"));
|
formatAndSetRenderText("?");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,8 +12,6 @@ import java.time.Instant;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static net.minecraft.text.Text.literal;
|
|
||||||
|
|
||||||
public class ClockWidget extends BasicTextWidget {
|
public class ClockWidget extends BasicTextWidget {
|
||||||
|
|
||||||
public enum TimeOption {
|
public enum TimeOption {
|
||||||
@@ -26,6 +24,10 @@ public class ClockWidget extends BasicTextWidget {
|
|||||||
TimeOption(String key) {
|
TimeOption(String key) {
|
||||||
this.key = key;
|
this.key = key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Text getName() {
|
||||||
|
return Text.translatable("widgets.widgets.clock.hourFormat."+key);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum DateOption {
|
public enum DateOption {
|
||||||
@@ -75,7 +77,7 @@ public class ClockWidget extends BasicTextWidget {
|
|||||||
Text.translatable("widgets.widgets.clock.hourFormat"),
|
Text.translatable("widgets.widgets.clock.hourFormat"),
|
||||||
TimeOption.class,
|
TimeOption.class,
|
||||||
TimeOption.HOUR_24,
|
TimeOption.HOUR_24,
|
||||||
timeOption -> Text.translatable("widgets.widgets.clock.hourFormat."+timeOption.key)),
|
TimeOption::getName),
|
||||||
new ToggleWidgetSetting("show_seconds",
|
new ToggleWidgetSetting("show_seconds",
|
||||||
Text.translatable("widgets.widgets.clock.showSeconds"),
|
Text.translatable("widgets.widgets.clock.showSeconds"),
|
||||||
true),
|
true),
|
||||||
@@ -97,7 +99,7 @@ public class ClockWidget extends BasicTextWidget {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tickWidget() {
|
public void tickWidget() {
|
||||||
formatAndSetRenderText(literal(dateFormat.format(Date.from(Instant.now()))));
|
formatAndSetRenderText(dateFormat.format(Date.from(Instant.now())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ import net.minecraft.util.Identifier;
|
|||||||
import net.minecraft.util.hit.EntityHitResult;
|
import net.minecraft.util.hit.EntityHitResult;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
import org.jspecify.annotations.NonNull;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static net.minecraft.text.Text.literal;
|
|
||||||
import static net.minecraft.text.Text.translatable;
|
import static net.minecraft.text.Text.translatable;
|
||||||
|
|
||||||
public class ComboWidget extends BasicTextWidget implements AttackEntityCallback {
|
public class ComboWidget extends BasicTextWidget implements AttackEntityCallback {
|
||||||
@@ -40,7 +40,7 @@ public class ComboWidget extends BasicTextWidget implements AttackEntityCallback
|
|||||||
private int displayThreshold = 0;
|
private int displayThreshold = 0;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ActionResult interact(PlayerEntity playerEntity, World world, Hand hand, Entity entity, @Nullable EntityHitResult entityHitResult) {
|
public @NonNull ActionResult interact(@NonNull PlayerEntity playerEntity, @NonNull World world, @NonNull Hand hand, Entity entity, @Nullable EntityHitResult entityHitResult) {
|
||||||
clientHitEntity(entity.getId());
|
clientHitEntity(entity.getId());
|
||||||
return ActionResult.PASS;
|
return ActionResult.PASS;
|
||||||
}
|
}
|
||||||
@@ -89,7 +89,7 @@ public class ComboWidget extends BasicTextWidget implements AttackEntityCallback
|
|||||||
if (showLabel){
|
if (showLabel){
|
||||||
formatAndSetRenderText(translatable("widgets.widgets.combo.combo", combo));
|
formatAndSetRenderText(translatable("widgets.widgets.combo.combo", combo));
|
||||||
} else {
|
} else {
|
||||||
formatAndSetRenderText(literal(""+combo));
|
formatAndSetRenderText(""+combo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import net.minecraft.util.Identifier;
|
|||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static net.minecraft.text.Text.literal;
|
|
||||||
import static net.minecraft.text.Text.translatable;
|
import static net.minecraft.text.Text.translatable;
|
||||||
|
|
||||||
public class FPSWidget extends BasicTextWidget {
|
public class FPSWidget extends BasicTextWidget {
|
||||||
@@ -32,7 +31,7 @@ public class FPSWidget extends BasicTextWidget {
|
|||||||
while (timedFrames.getFirst() < n - 500_000_100L){
|
while (timedFrames.getFirst() < n - 500_000_100L){
|
||||||
timedFrames.removeFirst();
|
timedFrames.removeFirst();
|
||||||
}
|
}
|
||||||
formatAndSetRenderText(literal(timedFrames.size() * 2 + " FPS"));
|
formatAndSetRenderText(timedFrames.size() * 2 + " FPS");
|
||||||
}
|
}
|
||||||
super.renderScaled(context, n, textRenderer, posX, posY);
|
super.renderScaled(context, n, textRenderer, posX, posY);
|
||||||
}
|
}
|
||||||
@@ -40,7 +39,7 @@ public class FPSWidget extends BasicTextWidget {
|
|||||||
@Override
|
@Override
|
||||||
public void tickWidget() {
|
public void tickWidget() {
|
||||||
if (!realtime){
|
if (!realtime){
|
||||||
formatAndSetRenderText(literal(MinecraftClient.getInstance().getCurrentFps() + " FPS"));
|
formatAndSetRenderText(MinecraftClient.getInstance().getCurrentFps() + " FPS");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import net.minecraft.util.Identifier;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static net.minecraft.text.Text.literal;
|
|
||||||
import static net.minecraft.text.Text.translatable;
|
import static net.minecraft.text.Text.translatable;
|
||||||
|
|
||||||
public class MemoryUsageWidget extends BasicTextWidget {
|
public class MemoryUsageWidget extends BasicTextWidget {
|
||||||
@@ -48,9 +47,9 @@ public class MemoryUsageWidget extends BasicTextWidget {
|
|||||||
mib(memUsed) + "MiB / " + mib(memTotal) + "MiB (" + memUsagePercent + "%)" :
|
mib(memUsed) + "MiB / " + mib(memTotal) + "MiB (" + memUsagePercent + "%)" :
|
||||||
mib(memUsed) + "MiB / " + mib(memTotal) + "MiB";
|
mib(memUsed) + "MiB / " + mib(memTotal) + "MiB";
|
||||||
if (showLabel){
|
if (showLabel){
|
||||||
formatAndSetRenderText(literal(translatable("widgets.widgets.memory.withLabel", memUsageString).getString()));
|
formatAndSetRenderText(translatable("widgets.widgets.memory.withLabel", memUsageString).getString());
|
||||||
} else {
|
} else {
|
||||||
formatAndSetRenderText(literal(memUsageString));
|
formatAndSetRenderText(memUsageString);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,8 +13,6 @@ import net.minecraft.util.profiler.MultiValueDebugSampleLogImpl;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static net.minecraft.text.Text.literal;
|
|
||||||
|
|
||||||
public class PingWidget extends BasicTextWidget {
|
public class PingWidget extends BasicTextWidget {
|
||||||
|
|
||||||
public PingWidget(Identifier id) {
|
public PingWidget(Identifier id) {
|
||||||
@@ -51,12 +49,12 @@ public class PingWidget extends BasicTextWidget {
|
|||||||
valuesRead++;
|
valuesRead++;
|
||||||
}
|
}
|
||||||
if (valuesRead == 0){
|
if (valuesRead == 0){
|
||||||
formatAndSetRenderText(literal("??? ms"));
|
formatAndSetRenderText("??? ms");
|
||||||
if (this.dynamicColor) this.textColor = GradientOptions.solidColor(0xff00ff00);
|
if (this.dynamicColor) this.textColor = GradientOptions.solidColor(0xff00ff00);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
long avgPing = ping / valuesRead;
|
long avgPing = ping / valuesRead;
|
||||||
formatAndSetRenderText(literal(avgPing + " ms"));
|
formatAndSetRenderText(avgPing + " ms");
|
||||||
if (this.dynamicColor){
|
if (this.dynamicColor){
|
||||||
if (avgPing < 50){
|
if (avgPing < 50){
|
||||||
this.textColor = GradientOptions.solidColor(0xff00ff00);
|
this.textColor = GradientOptions.solidColor(0xff00ff00);
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ import net.minecraft.util.Identifier;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static net.minecraft.text.Text.literal;
|
|
||||||
|
|
||||||
public class PlainTextWidget extends BasicTextWidget {
|
public class PlainTextWidget extends BasicTextWidget {
|
||||||
public PlainTextWidget(Identifier id) {
|
public PlainTextWidget(Identifier id) {
|
||||||
super(id, List.of(
|
super(id, List.of(
|
||||||
@@ -32,6 +30,6 @@ public class PlainTextWidget extends BasicTextWidget {
|
|||||||
@Override
|
@Override
|
||||||
public void onSettingsChanged(WidgetSettings settings) {
|
public void onSettingsChanged(WidgetSettings settings) {
|
||||||
super.onSettingsChanged(settings);
|
super.onSettingsChanged(settings);
|
||||||
formatAndSetRenderText(literal((String) settings.optionById("text").getValue()));
|
formatAndSetRenderText((String) settings.optionById("text").getValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import net.minecraft.util.Identifier;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static net.minecraft.text.Text.literal;
|
|
||||||
import static net.minecraft.text.Text.translatable;
|
import static net.minecraft.text.Text.translatable;
|
||||||
|
|
||||||
public class ServerIPWidget extends BasicTextWidget {
|
public class ServerIPWidget extends BasicTextWidget {
|
||||||
@@ -34,7 +33,7 @@ public class ServerIPWidget extends BasicTextWidget {
|
|||||||
if (!shouldRender) return;
|
if (!shouldRender) return;
|
||||||
final ServerInfo serverEntry = MinecraftClient.getInstance().getCurrentServerEntry();
|
final ServerInfo serverEntry = MinecraftClient.getInstance().getCurrentServerEntry();
|
||||||
if (serverEntry != null){
|
if (serverEntry != null){
|
||||||
formatAndSetRenderText(literal(serverEntry.address));
|
formatAndSetRenderText(serverEntry.address);
|
||||||
} else {
|
} else {
|
||||||
formatAndSetRenderText(translatable("menu.singleplayer"));
|
formatAndSetRenderText(translatable("menu.singleplayer"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,8 +13,6 @@ import net.minecraft.util.math.Vec3d;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static net.minecraft.text.Text.literal;
|
|
||||||
|
|
||||||
public class SpeedWidget extends BasicTextWidget {
|
public class SpeedWidget extends BasicTextWidget {
|
||||||
|
|
||||||
public enum Unit {
|
public enum Unit {
|
||||||
@@ -82,7 +80,7 @@ public class SpeedWidget extends BasicTextWidget {
|
|||||||
avg += v;
|
avg += v;
|
||||||
}
|
}
|
||||||
avg /= averagingWindow.length;
|
avg /= averagingWindow.length;
|
||||||
formatAndSetRenderText(literal(reduceDigits(avg) + unit.displayName));
|
formatAndSetRenderText(reduceDigits(avg) + unit.displayName);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String reduceDigits(double v) {
|
private String reduceDigits(double v) {
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import net.minecraft.util.Identifier;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static net.minecraft.text.Text.literal;
|
|
||||||
import static net.minecraft.text.Text.translatable;
|
import static net.minecraft.text.Text.translatable;
|
||||||
|
|
||||||
public class TPSWidget extends BasicTextWidget {
|
public class TPSWidget extends BasicTextWidget {
|
||||||
@@ -82,17 +81,17 @@ public class TPSWidget extends BasicTextWidget {
|
|||||||
private void updateTPS(float tps, float targetTickRate, boolean loadingFinished) {
|
private void updateTPS(float tps, float targetTickRate, boolean loadingFinished) {
|
||||||
if (!loadingFinished){
|
if (!loadingFinished){
|
||||||
if (showLabel){
|
if (showLabel){
|
||||||
formatAndSetRenderText(literal(translatable("widgets.widgets.tps.tps", "???").getString()));
|
formatAndSetRenderText(translatable("widgets.widgets.tps.tps", "???").getString());
|
||||||
} else {
|
} else {
|
||||||
formatAndSetRenderText(literal("???"));
|
formatAndSetRenderText("???");
|
||||||
}
|
}
|
||||||
if (dynamicColor) this.textColor = GradientOptions.solidColor(0xff00ff00);
|
if (dynamicColor) this.textColor = GradientOptions.solidColor(0xff00ff00);
|
||||||
} else {
|
} else {
|
||||||
tps = Math.round(tps * 10f) / 10f;
|
tps = Math.round(tps * 10f) / 10f;
|
||||||
if (showLabel){
|
if (showLabel){
|
||||||
formatAndSetRenderText(literal(translatable("widgets.widgets.tps.tps", tps).getString()));
|
formatAndSetRenderText(translatable("widgets.widgets.tps.tps", tps).getString());
|
||||||
} else {
|
} else {
|
||||||
formatAndSetRenderText(literal(String.valueOf(tps)));
|
formatAndSetRenderText(String.valueOf(tps));
|
||||||
}
|
}
|
||||||
if (dynamicColor){
|
if (dynamicColor){
|
||||||
if (tps >= targetTickRate * 0.990){
|
if (tps >= targetTickRate * 0.990){
|
||||||
|
|||||||
@@ -0,0 +1,88 @@
|
|||||||
|
package de.shiewk.widgets.widgets;
|
||||||
|
|
||||||
|
import de.shiewk.widgets.WidgetSettings;
|
||||||
|
import de.shiewk.widgets.widgets.settings.EnumWidgetSetting;
|
||||||
|
import de.shiewk.widgets.widgets.settings.ToggleWidgetSetting;
|
||||||
|
import net.minecraft.client.MinecraftClient;
|
||||||
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static net.minecraft.text.Text.*;
|
||||||
|
|
||||||
|
public class WorldTimeWidget extends BasicTextWidget {
|
||||||
|
|
||||||
|
public WorldTimeWidget(Identifier id) {
|
||||||
|
super(id, List.of(
|
||||||
|
new ToggleWidgetSetting("show_day", translatable("widgets.widgets.worldtime.showDay"), true),
|
||||||
|
new EnumWidgetSetting<>(
|
||||||
|
"time_format",
|
||||||
|
translatable("widgets.widgets.worldtime.timeFormat"),
|
||||||
|
ClockWidget.TimeOption.class,
|
||||||
|
ClockWidget.TimeOption.HOUR_24,
|
||||||
|
ClockWidget.TimeOption::getName
|
||||||
|
)
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected boolean showDay;
|
||||||
|
protected ClockWidget.TimeOption timeFormat;
|
||||||
|
|
||||||
|
public Text getDayLabel(long day) {
|
||||||
|
return translatable("widgets.widgets.worldtime.day", day);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Text getTimeLabel(long hour, long minute) {
|
||||||
|
return switch (timeFormat) {
|
||||||
|
case NO_TIME -> empty();
|
||||||
|
case HOUR_24 -> literal(hour + ":" + (minute < 10 ? "0" + minute : minute));
|
||||||
|
case AM_PM -> {
|
||||||
|
long displayHour = (hour % 12 == 0) ? 12 : hour % 12;
|
||||||
|
String suffix = (hour < 12) ? " AM" : " PM";
|
||||||
|
yield literal(displayHour + ":" + (minute < 10 ? "0" + minute : minute) + suffix);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void tickWidget() {
|
||||||
|
final World world = MinecraftClient.getInstance().world;
|
||||||
|
if (world == null) {
|
||||||
|
formatAndSetRenderText("?");
|
||||||
|
} else {
|
||||||
|
long time = world.getTimeOfDay() + 6000;
|
||||||
|
long day = time / 24000;
|
||||||
|
long hour = time / 1000 % 24;
|
||||||
|
long minute = (long) ((time % 1000) / 16.6666);
|
||||||
|
if (showDay && timeFormat != ClockWidget.TimeOption.NO_TIME) {
|
||||||
|
formatAndSetRenderText(translatable("widgets.widgets.worldtime.dayAndTime", getDayLabel(day), getTimeLabel(hour, minute)).getString());
|
||||||
|
} else if (showDay) {
|
||||||
|
formatAndSetRenderText(getDayLabel(day).getString());
|
||||||
|
} else if (timeFormat != ClockWidget.TimeOption.NO_TIME) {
|
||||||
|
formatAndSetRenderText(getTimeLabel(hour, minute).getString());
|
||||||
|
} else {
|
||||||
|
formatAndSetRenderText(getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSettingsChanged(WidgetSettings settings) {
|
||||||
|
super.onSettingsChanged(settings);
|
||||||
|
this.showDay = (boolean) settings.optionById("show_day").getValue();
|
||||||
|
this.timeFormat = (ClockWidget.TimeOption) settings.optionById("time_format").getValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Text getName() {
|
||||||
|
return translatable("widgets.widgets.worldtime");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Text getDescription() {
|
||||||
|
return translatable("widgets.widgets.worldtime.description");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -165,5 +165,11 @@
|
|||||||
"widgets.widgets.tps.description": "Zeigt die TPS im Einzelspielermodus an oder schätzt die TPS im Mehrspielermodus",
|
"widgets.widgets.tps.description": "Zeigt die TPS im Einzelspielermodus an oder schätzt die TPS im Mehrspielermodus",
|
||||||
"widgets.widgets.tps.dynamicColor": "Farbe dynamisch anzeigen",
|
"widgets.widgets.tps.dynamicColor": "Farbe dynamisch anzeigen",
|
||||||
"widgets.widgets.tps.tps": "%s TPS",
|
"widgets.widgets.tps.tps": "%s TPS",
|
||||||
"widgets.widgets.tps.windowSize": "Durchschnittsfenstergröße (Sekunden)"
|
"widgets.widgets.tps.windowSize": "Durchschnittsfenstergröße (Sekunden)",
|
||||||
|
"widgets.widgets.worldtime": "Weltzeit",
|
||||||
|
"widgets.widgets.worldtime.day": "Tag %s",
|
||||||
|
"widgets.widgets.worldtime.dayAndTime": "%1$s, %2$s",
|
||||||
|
"widgets.widgets.worldtime.description": "Zeigt die Uhrzeit und Tageszahl der Welt, in der du bist, an",
|
||||||
|
"widgets.widgets.worldtime.showDay": "Tag anzeigen",
|
||||||
|
"widgets.widgets.worldtime.timeFormat": "Zeitformat"
|
||||||
}
|
}
|
||||||
@@ -165,5 +165,11 @@
|
|||||||
"widgets.widgets.tps.description": "Shows the current TPS when in singleplayer and estimates server TPS when in multiplayer.",
|
"widgets.widgets.tps.description": "Shows the current TPS when in singleplayer and estimates server TPS when in multiplayer.",
|
||||||
"widgets.widgets.tps.dynamicColor": "Dynamic Color",
|
"widgets.widgets.tps.dynamicColor": "Dynamic Color",
|
||||||
"widgets.widgets.tps.tps": "%s TPS",
|
"widgets.widgets.tps.tps": "%s TPS",
|
||||||
"widgets.widgets.tps.windowSize": "Averaging window size (seconds)"
|
"widgets.widgets.tps.windowSize": "Averaging window size (seconds)",
|
||||||
|
"widgets.widgets.worldtime": "World time",
|
||||||
|
"widgets.widgets.worldtime.day": "Day %s",
|
||||||
|
"widgets.widgets.worldtime.dayAndTime": "%1$s, %2$s",
|
||||||
|
"widgets.widgets.worldtime.description": "Shows the in-game time and day of the world you're in",
|
||||||
|
"widgets.widgets.worldtime.showDay": "Show day",
|
||||||
|
"widgets.widgets.worldtime.timeFormat": "Time format"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user