--- a/net/minecraft/tags/TagLoader.java
+++ b/net/minecraft/tags/TagLoader.java
@@ -85,7 +85,7 @@
             @Nullable
             @Override
             public T element(ResourceLocation p_216039_) {
-                return TagLoader.this.idToValue.apply(p_216039_).orElse((T)null);
+                return TagLoader.this.idToValue.apply(p_216039_).orElse(null);
             }
 
             @Nullable
