--- a/net/minecraft/util/datafix/fixes/TrappedChestBlockEntityFix.java
+++ b/net/minecraft/util/datafix/fixes/TrappedChestBlockEntityFix.java
@@ -80,7 +80,7 @@
                                         Dynamic<?> dynamic = p_145746_.get(DSL.remainderFinder());
                                         int k = dynamic.get("xPos").asInt(0);
                                         int l = dynamic.get("zPos").asInt(0);
-                                        TaggedChoiceType<String> taggedchoicetype = this.getInputSchema().findChoiceType(References.BLOCK_ENTITY);
+                                        TaggedChoiceType<String> taggedchoicetype = (TaggedChoiceType<String>)this.getInputSchema().findChoiceType(References.BLOCK_ENTITY);
                                         return p_145746_.updateTyped(
                                             opticfinder,
                                             p_145752_ -> p_145752_.updateTyped(
