Skip to content

Commit

Permalink
Apply our renderer if one isn't attached in MinecraftAudiences#update
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Jul 26, 2024
1 parent 7c44d29 commit a53b638
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,17 @@ public interface MinecraftAudiences {
modified = requireNonNull(modifier).apply(((WrappedComponent) input).wrapped());
partition = ((WrappedComponent) input).partition();
renderer = ((WrappedComponent) input).renderer();
return AdventureCommon.HOOKS.createWrappedComponent(
modified,
partition,
renderer,
new NonWrappingComponentSerializer(((MinecraftAudiencesInternal) this)::registryAccess)
);
} else {
final Component original = this.toAdventure(input);
modified = modifier.apply(original);
partition = null;
renderer = null;
return this.toNative(modified);
}
return AdventureCommon.HOOKS.createWrappedComponent(modified, partition, renderer, new NonWrappingComponentSerializer(((MinecraftAudiencesInternal) this)::registryAccess));
}

/**
Expand Down

0 comments on commit a53b638

Please sign in to comment.