--- a/net/minecraft/util/ExtraCodecs.java
+++ b/net/minecraft/util/ExtraCodecs.java
@@ -214,7 +214,7 @@
                 P p1 = p_184445_.get(1);
                 return p_184365_.apply(p, p1);
             }), p_184459_ -> ImmutableList.of(p_184366_.apply(p_184459_), p_184367_.apply(p_184459_)));
-        Codec<I> codec1 = RecordCodecBuilder.<Pair>create(
+        Codec<I> codec1 = RecordCodecBuilder.<Pair<P, P>>create(
                 p_184360_ -> p_184360_.group(p_184362_.fieldOf(p_184363_).forGetter(Pair::getFirst), p_184362_.fieldOf(p_184364_).forGetter(Pair::getSecond))
                         .apply(p_184360_, Pair::of)
             )
@@ -492,8 +492,8 @@
                 return p_312297_;
             }
 
-            private <T, V2 extends V> DataResult<T> encode(Codec<V2> p_312014_, V p_312190_, DynamicOps<T> p_312075_) {
-                return p_312014_.encodeStart(p_312075_, p_312190_);
+            private <T, V2 extends V> DataResult<T> encode(Codec<? extends V> p_312014_, V p_312190_, DynamicOps<T> p_312075_) {
+                return ((Codec<V2>)p_312014_).encodeStart(p_312075_, (V2)p_312190_);
             }
         };
     }
