--- a/net/minecraft/world/level/GameRules.java
+++ b/net/minecraft/world/level/GameRules.java
@@ -256,8 +256,8 @@
     private static <T extends GameRules.Value<T>> void callVisitorCap(
         GameRules.GameRuleTypeVisitor p_46167_, GameRules.Key<?> p_46168_, GameRules.Type<?> p_46169_
     ) {
-        p_46167_.visit(p_46168_, p_46169_);
-        p_46169_.callVisitor(p_46167_, p_46168_);
+        p_46167_.visit((GameRules.Key<T>)p_46168_, (GameRules.Type<T>)p_46169_);
+        ((GameRules.Type<T>)p_46169_).callVisitor(p_46167_, (GameRules.Key<T>)p_46168_);
     }
 
     public void assignFrom(GameRules p_46177_, @Nullable MinecraftServer p_46178_) {
@@ -427,7 +427,7 @@
         public boolean tryDeserialize(String p_46315_) {
             try {
                 StringReader stringreader = new StringReader(p_46315_);
-                this.value = this.type.argument.get().parse(stringreader);
+                this.value = (int)this.type.argument.get().parse(stringreader);
                 return !stringreader.canRead();
             } catch (CommandSyntaxException commandsyntaxexception) {
                 return false;
