Skip to content

Commit

Permalink
fix missed errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Boxadactle committed Feb 20, 2024
1 parent a7f31d7 commit 40bf1aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

import com.mojang.datafixers.util.Pair;
import dev.architectury.injectables.annotations.ExpectPlatform;
import dev.boxadactle.coordinatesdisplay.config.ModConfig;
import dev.boxadactle.coordinatesdisplay.position.Position;
import dev.boxadactle.boxlib.math.geometry.Vec3;
import dev.boxadactle.boxlib.util.ClientUtils;
import dev.boxadactle.boxlib.util.GuiUtils;
import net.minecraft.client.Minecraft;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Holder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void build(LiteralArgumentBuilder<CommandSourceStack> builder) {

private int sendPosInChat(CommandContext<CommandSourceStack> context) {

Position pos = Position.of(WorldUtils.getCamera());
Position pos = Position.of(WorldUtils.getPlayer());

CoordinatesDisplay.LOGGER.player.publicChat(ModUtil.parseText(CoordinatesDisplay.CONFIG.get().posChatMessage, pos));
CoordinatesDisplay.LOGGER.info("Sent position as chat message");
Expand All @@ -48,7 +48,7 @@ private int sendPosInChat(CommandContext<CommandSourceStack> context) {

private int copyPos(CommandContext<CommandSourceStack> context) {

Position pos = Position.of(WorldUtils.getCamera());
Position pos = Position.of(WorldUtils.getPlayer());

Minecraft.getInstance().keyboardHandler.setClipboard(ModUtil.parseText(CoordinatesDisplay.CONFIG.get().copyPosMessage, pos));
CoordinatesDisplay.LOGGER.player.info(super.translatable("command.coordinatesdisplay.position.copy"));
Expand All @@ -59,9 +59,8 @@ private int copyPos(CommandContext<CommandSourceStack> context) {
}

private int copyPosTp(CommandContext<CommandSourceStack> context) {

try {
Position pos = Position.of(WorldUtils.getCamera());
Position pos = Position.of(WorldUtils.getPlayer());

Minecraft.getInstance().keyboardHandler.setClipboard(CoordinatesDisplay.getConfig().teleportMode.toCommand(pos));

Expand Down

0 comments on commit 40bf1aa

Please sign in to comment.