Skip to content

Commit

Permalink
[1.21.4] Fix TagsCommand tag cast error (#1851)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhyces authored Jan 14, 2025
1 parent f145fbe commit 9d2c3aa
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ private static int listTagElements(final CommandContext<CommandSourceStack> ctx,
final TagKey<?> tagKey = TagKey.create(cast(registryKey), tagLocation);

@SuppressWarnings({ "unchecked", "rawtypes" })
Optional<HolderSet.Named<?>> optional = registry.get(TagsCommand.<ResourceKey>cast(tagKey));
Optional<HolderSet.Named<?>> optional = registry.get(TagsCommand.<TagKey>cast(tagKey));
final HolderSet.Named<?> tag = optional.orElseThrow(() -> UNKNOWN_TAG.create(tagKey.location(), registryKey.location()));

ctx.getSource().sendSuccess(() -> createMessage(
Expand Down

0 comments on commit 9d2c3aa

Please sign in to comment.