Carpet TIS Addition

Carpet TIS Addition

519k Downloads

Error in parsing dimension in suggested tp command

CommandLeo opened this issue ยท 1 comments

commented

Description
Dimension isn't parsed correctly when a tp command is suggested by a logger.
Related code:

return fancy(style, Messenger.s(posStr), hoverText, new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, command));
}
public static BaseText coord(String style, Vec3d pos, DimensionWrapper dim) {return __coord(style, dim, TextUtil.coord(pos), TextUtil.tp(pos, dim));}
public static BaseText coord(String style, Vec3i pos, DimensionWrapper dim) {return __coord(style, dim, TextUtil.coord(pos), TextUtil.tp(pos, dim));}
public static BaseText coord(String style, ChunkPos pos, DimensionWrapper dim) {return __coord(style, dim, TextUtil.coord(pos), TextUtil.tp(pos, dim));}
public static BaseText coord(String style, Vec3d pos) {return __coord(style, null, TextUtil.coord(pos), TextUtil.tp(pos));}
public static BaseText coord(String style, Vec3i pos) {return __coord(style, null, TextUtil.coord(pos), TextUtil.tp(pos));}
public static BaseText coord(String style, ChunkPos pos) {return __coord(style, null, TextUtil.coord(pos), TextUtil.tp(pos));}

Steps to reproduce

  • Turn on item (creation) logging with /log item create
  • Drop an item
  • Click on the coordinates
    image
    A command should pop up in chat

Expected Result
The suggested command looks like this: /execute in minecraft:overworld run tp 176.0698523481682 16.602718537233475 714.2538320022973

Actual Result
The dimension is parsed incorrectly and the command looks like this: /execute in ResourceKey[minecraft:dimension / minecraft:overworld] run tp 176.0698523481682 16.602718537233475 714.2538320022973

commented

What's your mod version? This issue should already be fixed in v1.27.3 and above