Commits
md_5 authored 62761be294c
13 13 | private final MinecraftKey tag; |
14 14 | // |
15 15 | private net.minecraft.server.Tag<N> handle; |
16 16 | |
17 17 | public CraftTag(Tags<N> registry, MinecraftKey tag) { |
18 18 | this.registry = registry; |
19 19 | this.tag = tag; |
20 20 | } |
21 21 | |
22 22 | protected net.minecraft.server.Tag<N> getHandle() { |
23 + | if (handle == null) { |
24 + | handle = registry.b(tag); |
25 + | } |
26 + | |
23 27 | return handle; |
24 28 | } |
25 29 | |
26 30 | |
27 31 | public NamespacedKey getKey() { |
28 32 | return CraftNamespacedKey.fromMinecraft(tag); |
29 33 | } |
30 34 | } |