Skip to content

Commit

Permalink
Update ModAdvancement.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
EngineMachiner authored Sep 29, 2024
1 parent 8e101ea commit 57f2d41
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/main/kotlin/com/enginemachiner/harmony/ModAdvancement.kt
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,16 @@ abstract class ModAdvancement : ModID {

fun build( consumer: Consumer<Advancement>, criterion: String = name ): Advancement {

val advancement = Advancement.Task.create()
val builder = Advancement.Task.create()
.display( icon, title(), description(), background, frame, toast, announce, hidden )
.parent( parent?.advancement ).criterion( criterion, conditions() )
.build( consumer, "$MOD_NAME/$name" )
.criterion( criterion, conditions() )

if ( parent != null ) builder.parent( parent!!.advancement )

val advancement = builder.build( consumer, "$MOD_NAME/$name" )

this.advancement = advancement; return advancement

}

}
}

0 comments on commit 57f2d41

Please sign in to comment.