Skip to content

Commit

Permalink
feat: impl dining
Browse files Browse the repository at this point in the history
  • Loading branch information
lainio24 committed Jan 26, 2025
1 parent 8e8cb07 commit ec72edd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
import net.minecraft.world.entity.EquipmentSlotGroup;
import net.minecraft.world.item.enchantment.Enchantments;
import org.auioc.mcmod.harmonicench.api.HEEnchantment;
import org.auioc.mcmod.harmonicench.enchantment.HEEnchantmentEffectComponents;
import org.auioc.mcmod.harmonicench.enchantment.HEEnchantments;
import org.auioc.mcmod.harmonicench.enchantment.effect.EatingEffect;

/**
* <b>TODO 饱食修补 Dining</b>
Expand All @@ -50,6 +52,8 @@ public class DiningEnchantment extends HEEnchantment {
*/
private static final Cost COST = constantCost(25, 75);

private static final int REPAIR_PRE_FOOD_POINT = 10;

private static final BuilderFunction BUILDER = define(
ItemTags.DURABILITY_ENCHANTABLE,
PRIMARY_ITEMS,
Expand All @@ -60,7 +64,10 @@ public class DiningEnchantment extends HEEnchantment {
4,
EquipmentSlotGroup.ANY
).andThen((key, ctx, builder) -> builder

.withEffect(
HEEnchantmentEffectComponents.EATING.get(),
EatingEffect.repairWithFood(REPAIR_PRE_FOOD_POINT)
)
);

public static Bootstrap.Builder bootstrap() {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/harmonicench/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"enchantment.harmonicench.blessing": "Blessing (WIP)",
"enchantment.harmonicench.blunt": "Blunt",
"enchantment.harmonicench.deep_study": "Deep Study",
"enchantment.harmonicench.dining": "Dining (WIP)",
"enchantment.harmonicench.dining": "Dining",
"enchantment.harmonicench.efficacy": "Efficacy",
"enchantment.harmonicench.electrification": "Electrification (WIP)",
"enchantment.harmonicench.forging": "Forging",
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/harmonicench/lang/zh_cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"enchantment.harmonicench.blessing": "祝福(未实现)",
"enchantment.harmonicench.blunt": "钝重",
"enchantment.harmonicench.deep_study": "深层研究",
"enchantment.harmonicench.dining": "饱食修补(未实现)",
"enchantment.harmonicench.dining": "饱食修补",
"enchantment.harmonicench.efficacy": "效能",
"enchantment.harmonicench.electrification": "感电(未实现)",
"enchantment.harmonicench.forging": "锻打",
Expand Down

0 comments on commit ec72edd

Please # to comment.