diff --git a/src/test/java/net/minestom/server/tag/TagUpdateTest.java b/src/test/java/net/minestom/server/tag/TagUpdateTest.java index 662e9c70d..708a1981d 100644 --- a/src/test/java/net/minestom/server/tag/TagUpdateTest.java +++ b/src/test/java/net/minestom/server/tag/TagUpdateTest.java @@ -1,5 +1,6 @@ package net.minestom.server.tag; +import net.minestom.server.coordinate.Vec; import org.junit.jupiter.api.Test; import static net.minestom.server.api.TestUtils.assertEqualsSNBT; @@ -97,4 +98,18 @@ public class TagUpdateTest { }); assertEquals(5, result); } + + @Test + public void updateInner() { + var tag = Tag.Structure("vec", Vec.class); + var tagX = Tag.Double("x").path("vec"); + var handler = TagHandler.newHandler(); + handler.setTag(tag, new Vec(5, 10, 15)); + handler.updateTag(tagX, x -> { + assertEquals(5, x); + return 7d; + }); + assertEquals(7d, handler.getTag(tagX)); + assertEquals(new Vec(7, 10, 15), handler.getTag(tag)); + } }