File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed
src/main/kotlin/dev/aaronhowser/mods/geneticsresequenced/command/gene Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import dev.aaronhowser.mods.geneticsresequenced.util.OtherUtil
1111import net.minecraft.commands.CommandSourceStack
1212import net.minecraft.commands.Commands
1313import net.minecraft.commands.arguments.EntityArgument
14+ import net.minecraft.network.chat.Component
1415import net.minecraft.world.entity.Entity
1516import net.minecraft.world.entity.LivingEntity
1617
@@ -97,15 +98,19 @@ object ListGenesCommand {
9798 target.displayName
9899 )
99100
100- messageComponent.append(
101- OtherUtil .componentList(
102- tempGenes.map {
103- ModLanguageProvider .Commands .TEMPORARY_GENE_WITH_DURATION .toComponent(
104- it.geneHolder.getName(),
105- it.ticksRemaining
106- )
107- }
101+ val componentList = mutableListOf<Component >()
102+
103+ for (tempGene in tempGenes) {
104+ val tempComponent = ModLanguageProvider .Commands .TEMPORARY_GENE_WITH_DURATION .toComponent(
105+ tempGene.geneHolder.getName(),
106+ tempGene.ticksRemaining
108107 )
108+
109+ componentList.add(tempComponent)
110+ }
111+
112+ messageComponent.append(
113+ OtherUtil .componentList(componentList)
109114 )
110115 },
111116 false
You can’t perform that action at this time.
0 commit comments