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 3fb8f62 commit 436d339
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"frame": "goal",
"icon": {
"count": 1,
"id": "minecraft:diamond_sword"
"id": "touhou_little_maid:kill_100"
},
"title": {
"translate": "advancements.touhou_little_maid.challenge.kill_100.title"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"icon": {
"count": 1,
"id": "touhou_little_maid:hakurei_gohei"
"id": "minecraft:feather"
},
"title": {
"translate": "advancements.touhou_little_maid.maid_base.switch_task.title"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ private static void generateProtect(AdvancementHolder root, Consumer<Advancement
}

private static void generateKill(AdvancementHolder root, Consumer<AdvancementHolder> saver, ExistingFileHelper existingFileHelper) {
AdvancementHolder kill = makeGoal(Items.DIAMOND_SWORD, "kill_100").parent(root)
AdvancementHolder 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<AdvancementHolder> saver, ExistingFileHelper existingFileHelper) {
AdvancementHolder root = make(InitItems.HAKUREI_GOHEI.get(), "switch_task")
AdvancementHolder 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 @@ -900,6 +900,9 @@ public void thunderHit(ServerLevel world, LightningBolt lightning) {
setStruckByLightning(true);
if (this.getOwner() instanceof ServerPlayer serverPlayer) {
InitTrigger.MAID_EVENT.get().trigger(serverPlayer, TriggerType.LIGHTNING_BOLT);
if (this.getMaxHealth() >= 100) {
InitTrigger.MAID_EVENT.get().trigger(serverPlayer, TriggerType.MAID_100_HEALTHY);
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public final class InitItems {
public static DeferredItem<Item> CHANGE_CHAIR_MODEL = ITEMS.register("change_chair_model", ItemAdvancementIcon::new);
public static DeferredItem<Item> CHANGE_MAID_MODEL = ITEMS.register("change_maid_model", ItemAdvancementIcon::new);
public static DeferredItem<Item> MAID_100_HEALTHY = ITEMS.register("maid_100_healthy", ItemAdvancementIcon::new);
public static DeferredItem<Item> KILL_100 = ITEMS.register("kill_100", ItemAdvancementIcon::new);
public static DeferredItem<Item> KILL_SLIME_300 = ITEMS.register("kill_slime_300", ItemAdvancementIcon::new);
public static DeferredItem<Item> ALL_NETHERITE_EQUIPMENT = ITEMS.register("all_netherite_equipment", ItemAdvancementIcon::new);
public static DeferredItem<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 436d339

Please sign in to comment.