Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
import me.cominixo.betterf3.utils.Utils;
import net.minecraft.ChatFormatting;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.language.I18n;
import net.minecraft.core.BlockPos;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.TextColor;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.Level;
import net.minecraft.world.phys.Vec3;

/**
Expand Down Expand Up @@ -59,6 +61,7 @@ public CoordsModule() {
lines.add(new DebugLine("chunk_coords", "format.betterf3.coords", true));
lines.add(new DebugLine("velocity", "format.betterf3.coords", true));
lines.add(new DebugLine("abs_velocity"));
lines.add(new DebugLine("other_dimension_coords", "format.betterf3.coords", true));

lines.get(2).inReducedDebug = true;
}
Expand Down Expand Up @@ -105,6 +108,22 @@ public void update(final Minecraft client) {
lines.get(4).value(Arrays.asList(Utils.styledText(vX, this.colorX),
Utils.styledText(vY, this.colorY), Utils.styledText(vZ, this.colorZ)));
lines.get(5).value(Utils.styledText(String.format("%.3f", velocity.length() * ticksPerSecond), this.defaultNameColor));

// Other dimension coords (nether coords when in overworld and vise versa)
final var dimension = client.level.dimension();
if (dimension == Level.OVERWORLD || dimension == Level.NETHER) {
final float dimensionalMultiplier = dimension == Level.OVERWORLD ? 1f / 8f : 8f;
final String lable = I18n.get("text.betterf3.line." +
(dimension == Level.OVERWORLD ? "nether" : "overworld"));

final String cameraOtherDimX = String.format("%.3f", cameraEntity.getX() * dimensionalMultiplier);
final String cameraOtherDimZ = String.format("%.3f", cameraEntity.getZ() * dimensionalMultiplier);

lines.get(6).value(Arrays.asList(lable, Utils.styledText(cameraOtherDimX, this.colorX),
Utils.styledText(cameraY, this.colorY), Utils.styledText(cameraOtherDimZ, this.colorZ)));
} else {
lines.get(6).active = false;
}
}
}
}
11 changes: 7 additions & 4 deletions common/src/main/resources/assets/betterf3/lang/de_de.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
"config.betterf3.always_enable_profiler.tooltip": "Immer den Profiler aktivieren, wenn F3 verwendet wird.",
"config.betterf3.always_enable_tps_graph": "TPS Graph aktivieren",
"config.betterf3.always_enable_tps_graph.tooltip": "Immer den TPS Graph aktivieren, wenn F3 verwendet wird.",
"config.betterf3.always_enable_tps_graph.tooltip_new": "Always enable the TPS graph when using F3. Cannot be used with the ping graph.",
"config.betterf3.always_enable_ping_graph": "Always Enable the Ping Graph",
"config.betterf3.always_enable_ping_graph.tooltip": "Always enable the ping graph when using F3. Cannot be used with the TPS graph.",
"config.betterf3.always_enable_tps_graph.tooltip_new": "Immer den TPS Graph anzeigen, wenn F3 verwendet wird. Kann nicht gleichzeitig mit dem Ping Graph verwendet werden.",
"config.betterf3.always_enable_ping_graph": "Immer den Ping Graph aktivieren",
"config.betterf3.always_enable_ping_graph.tooltip": "Immer den Ping Graph aktivieren, wenn F3 verwendet wird. Kann nicht gleichzeitig mit dem TPS Graph verwendet werden.",
"config.betterf3.fontScale": "Schriftskalierung",
"config.betterf3.fontScale.tooltip": "Legt die Skalierung der Schrift fest.",
"config.betterf3.category.modules": "Module",
Expand Down Expand Up @@ -115,7 +115,7 @@
"text.betterf3.module.empty": "Trenner",
"text.betterf3.line.minecraft": "Minecraft",
"text.betterf3.line.chunk_sections": "Chunk-Abschnitte",
"text.betterf3.line.chunk_culling": "Chunkkeulung",
"text.betterf3.line.chunk_culling": "Chunk Culling",
"text.betterf3.line.pending_chunks": "Ausstehende Chunks",
"text.betterf3.line.pending_uploads": "Ausstehende Uploads zur GPU",
"text.betterf3.line.available_buffers": "Verfügbare Puffer",
Expand All @@ -135,6 +135,9 @@
"text.betterf3.line.chunk_coords": "Chunk-Koordinaten",
"text.betterf3.line.velocity": "Velocity",
"text.betterf3.line.abs_velocity": "Absolute Velocity",
"text.betterf3.line.other_dimension_coords": "",
"text.betterf3.line.nether": "Nether",
"text.betterf3.line.overworld": "Oberwelt",
"text.betterf3.line.particles": "Partikel",
"text.betterf3.line.entities": "Entitäten",
"text.betterf3.line.monster": "Monster",
Expand Down
3 changes: 3 additions & 0 deletions common/src/main/resources/assets/betterf3/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@
"text.betterf3.line.chunk_coords": "Chunk Coordinates",
"text.betterf3.line.velocity": "Velocity",
"text.betterf3.line.abs_velocity": "Absolute Velocity",
"text.betterf3.line.other_dimension_coords": "",
"text.betterf3.line.nether": "Nether",
"text.betterf3.line.overworld": "Overworld",
"text.betterf3.line.particles": "Particles",
"text.betterf3.line.entities": "Entities",
"text.betterf3.line.monster": "Monsters",
Expand Down