Skip to content

Commit e7ac323

Browse files
authored
Deprecate the TagKey constructor (#854)
1 parent 6a54c9b commit e7ac323

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
--- a/net/minecraft/tags/TagKey.java
2+
+++ b/net/minecraft/tags/TagKey.java
3+
@@ -12,6 +_,12 @@
4+
public record TagKey<T>(ResourceKey<? extends Registry<T>> f_203867_, ResourceLocation f_203868_) {
5+
private static final Interner<TagKey<?>> f_203869_ = Interners.newWeakInterner();
6+
7+
+ /**
8+
+ * @deprecated Neo: Use {@link TagKey#create} instead.
9+
+ */
10+
+ @Deprecated
11+
+ public TagKey {}
12+
+
13+
public static <T> Codec<TagKey<T>> m_203877_(ResourceKey<? extends Registry<T>> p_203878_) {
14+
return ResourceLocation.f_135803_.xmap((p_203893_) -> {
15+
return m_203882_(p_203878_, p_203893_);

0 commit comments

Comments
 (0)