-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
72825c1
commit 9100d11
Showing
5 changed files
with
59 additions
and
4 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
src/main/java/miyucomics/hexical/advancements/HexxyCriterion.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package miyucomics.hexical.advancements | ||
|
||
import com.google.gson.JsonObject | ||
import miyucomics.hexical.HexicalMain | ||
import net.minecraft.advancement.criterion.AbstractCriterion | ||
import net.minecraft.advancement.criterion.AbstractCriterionConditions | ||
import net.minecraft.predicate.entity.AdvancementEntityPredicateDeserializer | ||
import net.minecraft.predicate.entity.EntityPredicate | ||
import net.minecraft.server.network.ServerPlayerEntity | ||
import net.minecraft.util.Identifier | ||
|
||
class HexxyCriterion : AbstractCriterion<HexxyCriterion.Condition>() { | ||
override fun conditionsFromJson(obj: JsonObject, playerPredicate: EntityPredicate.Extended, predicateDeserializer: AdvancementEntityPredicateDeserializer) = Condition() | ||
fun trigger(player: ServerPlayerEntity) = trigger(player) { true } | ||
override fun getId() = ID | ||
|
||
class Condition : AbstractCriterionConditions(ID, EntityPredicate.Extended.EMPTY) | ||
companion object { | ||
val ID: Identifier = HexicalMain.id("summon_hexxy") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/main/resources/data/hexical/advancements/conjure_hexxy.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"parent": "hexcasting:root", | ||
"criteria": { | ||
"hexxy": { | ||
"trigger": "hexical:summon_hexxy" | ||
} | ||
}, | ||
"display": { | ||
"announce_to_chat": true, | ||
"title": { | ||
"translate": "advancements.hexical.conjure_hexxy.title" | ||
}, | ||
"description": { | ||
"translate": "advancements.hexical.conjure_hexxy.description" | ||
}, | ||
"frame": "challenge", | ||
"hidden": true, | ||
"icon": { | ||
"item": "hexcasting:lens" | ||
}, | ||
"show_toast": true | ||
}, | ||
"requirements": [["hexxy"]] | ||
} |