Skip to content

Commit

Permalink
修正部分成就错误问题
Browse files Browse the repository at this point in the history
  • Loading branch information
TartaricAcid committed Oct 22, 2024
1 parent f4c25cc commit 95f3ed1
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
"frame": "goal",
"hidden": false,
"icon": {
"item": "minecraft:diamond_sword",
"nbt": "{Damage:0}"
"item": "touhou_little_maid:kill_100"
},
"show_toast": true,
"title": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"frame": "task",
"hidden": false,
"icon": {
"item": "touhou_little_maid:hakurei_gohei",
"nbt": "{Damage:0}"
"item": "minecraft:feather"
},
"show_toast": true,
"title": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ private static void generateProtect(Advancement root, Consumer<Advancement> save
}

private static void generateKill(Advancement root, Consumer<Advancement> saver, ExistingFileHelper existingFileHelper) {
Advancement kill = makeGoal(Items.DIAMOND_SWORD, "kill_100").parent(root)
Advancement kill = makeGoal(InitItems.KILL_100.get(), "kill_100").parent(root)
.addCriterion("maid_event", MaidEventTrigger.create(TriggerType.KILL_100))
.rewards(AdvancementRewards.Builder.experience(50))
.save(saver, id("challenge/kill_100"), existingFileHelper);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

public class MaidBaseAdvancement {
public static void generate(Consumer<Advancement> saver, ExistingFileHelper existingFileHelper) {
Advancement root = make(InitItems.HAKUREI_GOHEI.get(), "switch_task")
Advancement root = make(Items.FEATHER, "switch_task")
.addCriterion("maid_event", MaidEventTrigger.create(TriggerType.SWITCH_TASK))
.save(saver, id("maid_base/switch_task"), existingFileHelper);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,9 @@ public void thunderHit(ServerLevel world, LightningBolt lightning) {
setStruckByLightning(true);
if (this.getOwner() instanceof ServerPlayer serverPlayer) {
InitTrigger.MAID_EVENT.trigger(serverPlayer, TriggerType.LIGHTNING_BOLT);
if (this.getMaxHealth() >= 100) {
InitTrigger.MAID_EVENT.trigger(serverPlayer, TriggerType.MAID_100_HEALTHY);
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public final class InitItems {
public static RegistryObject<Item> CHANGE_CHAIR_MODEL = ITEMS.register("change_chair_model", ItemAdvancementIcon::new);
public static RegistryObject<Item> CHANGE_MAID_MODEL = ITEMS.register("change_maid_model", ItemAdvancementIcon::new);
public static RegistryObject<Item> MAID_100_HEALTHY = ITEMS.register("maid_100_healthy", ItemAdvancementIcon::new);
public static RegistryObject<Item> KILL_100 = ITEMS.register("kill_100", ItemAdvancementIcon::new);
public static RegistryObject<Item> KILL_SLIME_300 = ITEMS.register("kill_slime_300", ItemAdvancementIcon::new);
public static RegistryObject<Item> ALL_NETHERITE_EQUIPMENT = ITEMS.register("all_netherite_equipment", ItemAdvancementIcon::new);
public static RegistryObject<Item> KILL_WITHER = ITEMS.register("kill_wither", ItemAdvancementIcon::new);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"advancements.touhou_little_maid.challenge.kill_dragon.title": "Dra-gone with a Bang",
"advancements.touhou_little_maid.challenge.kill_slime_300.description": "Maid Kills 300 slimes, either regular or magma cube",
"advancements.touhou_little_maid.challenge.kill_slime_300.title": "Ooey-Gooey Goodness",
"advancements.touhou_little_maid.challenge.lightning_bolt.description": "Summon a lightning bolt from an altar",
"advancements.touhou_little_maid.challenge.lightning_bolt.description": "Summon a lightning bolt from an altar,and let the lightning strike the maid",
"advancements.touhou_little_maid.challenge.lightning_bolt.title": "Tojiko is Mad!",
"advancements.touhou_little_maid.challenge.maid_100_healthy.description": "The maid's HP reaches 100",
"advancements.touhou_little_maid.challenge.maid_100_healthy.title": "100% Healthy",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"advancements.touhou_little_maid.challenge.kill_dragon.title": "屠龙勇士",
"advancements.touhou_little_maid.challenge.kill_slime_300.description": "女仆杀死 300 只史莱姆",
"advancements.touhou_little_maid.challenge.kill_slime_300.title": "杀了三百只史莱姆,不知不觉就满级了",
"advancements.touhou_little_maid.challenge.lightning_bolt.description": "从祭坛中合成出闪电",
"advancements.touhou_little_maid.challenge.lightning_bolt.description": "从祭坛中合成出闪电,并用闪电击中女仆",
"advancements.touhou_little_maid.challenge.lightning_bolt.title": "何方道友在此渡劫?",
"advancements.touhou_little_maid.challenge.maid_100_healthy.description": "女仆血量达到一百点",
"advancements.touhou_little_maid.challenge.maid_100_healthy.title": "百分百健康",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "touhou_little_maid:item/kill_100"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 95f3ed1

Please sign in to comment.