From 251daee895c9c0ad839ed9022ea43fb2d369e16c Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Tue, 31 Dec 2024 14:09:45 -0500 Subject: Fix MapLocate for 1.20.6+ --- src/main/java/org/chrisoft/trashyaddon/commands/MapLocateCommand.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/org/chrisoft/trashyaddon/commands/MapLocateCommand.java b/src/main/java/org/chrisoft/trashyaddon/commands/MapLocateCommand.java index a96b52b..6f747df 100644 --- a/src/main/java/org/chrisoft/trashyaddon/commands/MapLocateCommand.java +++ b/src/main/java/org/chrisoft/trashyaddon/commands/MapLocateCommand.java @@ -36,9 +36,9 @@ public class MapLocateCommand extends Command { private void exec(int id, Color color) { try { CEntityArgumentType dummyArgIF = CEntityArgumentType.entities(); - CEntitySelector esIF = dummyArgIF.parse(new StringReader(new Formatter().format("@e[type=minecraft:item_frame,nbt={Item:{tag:{map:%d}}}]", id).toString())); + CEntitySelector esIF = dummyArgIF.parse(new StringReader(new Formatter().format("@e[type=minecraft:item_frame,nbt={Item:{components:{\"minecraft:map_id\":%d}}}]", id).toString())); CEntityArgumentType dummyArgGIF = CEntityArgumentType.entities(); - CEntitySelector esGIF = dummyArgGIF.parse(new StringReader(new Formatter().format("@e[type=minecraft:glow_item_frame,nbt={Item:{tag:{map:%d}}}]", id).toString())); + CEntitySelector esGIF = dummyArgGIF.parse(new StringReader(new Formatter().format("@e[type=minecraft:glow_item_frame,nbt={Item:{components:{\"minecraft:map_id\":%d}}}]", id).toString())); List l1 = esIF.getClientSideEntityMatches(mc.world, mc.player.getPos()); List l2 = esGIF.getClientSideEntityMatches(mc.world, mc.player.getPos()); if (l1.isEmpty() && l2.isEmpty()) { -- cgit v1.2.3