Skip to content

Commit

Permalink
feat(ench): modify curses id
Browse files Browse the repository at this point in the history
BREAKING CHANGE: curse_of_rebelling -> rebelling_curse
  curse_of_sacrificing -> sacrificing_curse

Co-authored-by: lainio24 <[email protected]>
  • Loading branch information
WakelessSloth56 and lainio24 committed Feb 24, 2024
1 parent c7aeb74 commit 579caf3
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import net.neoforged.neoforge.registries.DeferredRegister;
import org.auioc.mcmod.harmonicench.HarmonicEnchantments;
import org.auioc.mcmod.harmonicench.enchantment.impl.AimEnchantment;
import org.auioc.mcmod.harmonicench.enchantment.impl.CurseOfRebellingEnchantment;
import org.auioc.mcmod.harmonicench.enchantment.impl.RebellingCurseEnchantment;
import org.auioc.mcmod.harmoniclib.advancement.predicate.HEPerformancePredicateType;
import org.auioc.mcmod.harmoniclib.advancement.predicate.IHEPerformancePredicate;
import org.auioc.mcmod.harmoniclib.core.HLRegistries;
Expand All @@ -40,7 +40,7 @@ private static DeferredHolder<HEPerformancePredicateType, HEPerformancePredicate
}

public static DeferredHolder<HEPerformancePredicateType, HEPerformancePredicateType> AIM = register("aim", AimEnchantment.PerformancePredicate.CODEC);
public static DeferredHolder<HEPerformancePredicateType, HEPerformancePredicateType> CURSE_OF_REBELLING = register("curse_of_rebelling", CurseOfRebellingEnchantment.PerformancePredicate.CODEC);
public static DeferredHolder<HEPerformancePredicateType, HEPerformancePredicateType> REBELLING_CURSE = register("rebelling_curse", RebellingCurseEnchantment.PerformancePredicate.CODEC);


}
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
import org.auioc.mcmod.harmonicench.HarmonicEnchantments;
import org.auioc.mcmod.harmonicench.enchantment.HEEnchantments;
import org.auioc.mcmod.harmonicench.enchantment.impl.AimEnchantment;
import org.auioc.mcmod.harmonicench.enchantment.impl.CurseOfRebellingEnchantment;
import org.auioc.mcmod.harmonicench.enchantment.impl.ProficiencyEnchantment;
import org.auioc.mcmod.harmonicench.enchantment.impl.RebellingCurseEnchantment;
import org.auioc.mcmod.harmoniclib.advancement.criterion.EnchantmentPerformedTrigger;

import java.util.List;
Expand Down Expand Up @@ -310,9 +310,9 @@ private static Builder fishInColdBiomes(Builder b) {
"betrayal",
EnchantmentPerformedTrigger.createCriterion(
null,
HEEnchantments.CURSE_OF_REBELLING.get(),
HEEnchantments.REBELLING_CURSE.get(),
null,
new CurseOfRebellingEnchantment.PerformancePredicate(
new RebellingCurseEnchantment.PerformancePredicate(
Optional.of(true)
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
import org.auioc.mcmod.harmonicench.enchantment.impl.BaneOfChampionsEnchantment;
import org.auioc.mcmod.harmonicench.enchantment.impl.BlessingEnchantment;
import org.auioc.mcmod.harmonicench.enchantment.impl.BluntEnchantment;
import org.auioc.mcmod.harmonicench.enchantment.impl.CurseOfRebellingEnchantment;
import org.auioc.mcmod.harmonicench.enchantment.impl.CurseOfSacrificingEnchantment;
import org.auioc.mcmod.harmonicench.enchantment.impl.DeepStudyEnchantment;
import org.auioc.mcmod.harmonicench.enchantment.impl.DiningEnchantment;
import org.auioc.mcmod.harmonicench.enchantment.impl.EfficacyEnchantment;
Expand All @@ -45,6 +43,8 @@
import org.auioc.mcmod.harmonicench.enchantment.impl.ObserverEnchantment;
import org.auioc.mcmod.harmonicench.enchantment.impl.ProficiencyEnchantment;
import org.auioc.mcmod.harmonicench.enchantment.impl.RapierEnchantment;
import org.auioc.mcmod.harmonicench.enchantment.impl.RebellingCurseEnchantment;
import org.auioc.mcmod.harmonicench.enchantment.impl.SacrificingCurseEnchantment;
import org.auioc.mcmod.harmonicench.enchantment.impl.SafeTeleportingEnchantment;
import org.auioc.mcmod.harmonicench.enchantment.impl.SiphoningEnchantment;
import org.auioc.mcmod.harmonicench.enchantment.impl.SnipingEnchantment;
Expand Down Expand Up @@ -72,7 +72,7 @@ private static <T extends Enchantment> DeferredHolder<Enchantment, T> register(S
public static final DeferredHolder<Enchantment, FreeRidingEnchantment> FREE_RIDING = register("free_riding", FreeRidingEnchantment::new);
public static final DeferredHolder<Enchantment, SafeTeleportingEnchantment> SAFE_TELEPORTING = register("safe_teleporting", SafeTeleportingEnchantment::new);
public static final DeferredHolder<Enchantment, BlessingEnchantment> BLESSING = register("blessing", BlessingEnchantment::new);
public static final DeferredHolder<Enchantment, CurseOfRebellingEnchantment> CURSE_OF_REBELLING = register("curse_of_rebelling", CurseOfRebellingEnchantment::new);
public static final DeferredHolder<Enchantment, RebellingCurseEnchantment> REBELLING_CURSE = register("rebelling_curse", RebellingCurseEnchantment::new);
public static final DeferredHolder<Enchantment, ElectrificationEnchantment> ELECTRIFICATION = register("electrification", ElectrificationEnchantment::new);
public static final DeferredHolder<Enchantment, LuckOfTheSnowEnchantment> LUCK_OF_THE_SNOW = register("luck_of_the_snow", LuckOfTheSnowEnchantment::new);
public static final DeferredHolder<Enchantment, DiningEnchantment> DINING = register("dining", DiningEnchantment::new);
Expand All @@ -82,7 +82,7 @@ private static <T extends Enchantment> DeferredHolder<Enchantment, T> register(S
public static final DeferredHolder<Enchantment, ForgingEnchantment> FORGING = register("forging", ForgingEnchantment::new);
public static final DeferredHolder<Enchantment, ProficiencyEnchantment> PROFICIENCY = register("proficiency", ProficiencyEnchantment::new);
public static final DeferredHolder<Enchantment, SunAffinityEnchantment> SUN_AFFINITY = register("sun_affinity", SunAffinityEnchantment::new);
public static final DeferredHolder<Enchantment, CurseOfSacrificingEnchantment> CURSE_OF_SACRIFICING = register("curse_of_sacrificing", CurseOfSacrificingEnchantment::new);
public static final DeferredHolder<Enchantment, SacrificingCurseEnchantment> SACRIFICING_CURSE = register("sacrificing_curse", SacrificingCurseEnchantment::new);
public static final DeferredHolder<Enchantment, LongEnchantment> LONG = register("long", LongEnchantment::new);
public static final DeferredHolder<Enchantment, AimEnchantment> AIM = register("aim", AimEnchantment::new);
public static final DeferredHolder<Enchantment, BluntEnchantment> BLUNT = register("blunt", BluntEnchantment::new);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
import java.util.Optional;

/**
* <b>叛逆诅咒Curse of Rebelling</b>
* <b>叛逆诅咒 Curse of Rebelling</b>
* <p>
* 物品耐久度降低时,有概率对使用者造成伤害。
* <ul>
Expand All @@ -55,9 +55,9 @@
* @author WakelessSloth56
* @author Libellule505
*/
public class CurseOfRebellingEnchantment extends HLEnchantment implements IItemEnchantment.Hurt {
public class RebellingCurseEnchantment extends HLEnchantment implements IItemEnchantment.Hurt {

public CurseOfRebellingEnchantment() {
public RebellingCurseEnchantment() {
super(
Enchantment.Rarity.RARE,
EnchantmentCategory.BREAKABLE,
Expand Down Expand Up @@ -144,7 +144,7 @@ public boolean matches(boolean isDead) {

@Override
public HEPerformancePredicateType getType() {
return HEEPerformancePredicates.CURSE_OF_REBELLING.get();
return HEEPerformancePredicates.REBELLING_CURSE.get();
}

public static final Codec<PerformancePredicate> CODEC = RecordCodecBuilder.create(instance -> instance.group(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
import java.util.List;

/**
* <b>献祭诅咒Curse of Sacrificing</b>
* <b>献祭诅咒 Curse of Sacrificing</b>
* <p>
* 需要定期杀死生物。
* <ul>
Expand All @@ -57,12 +57,12 @@
* @author WakelessSloth56
* @author Libellule505
*/
public class CurseOfSacrificingEnchantment extends HLEnchantment implements IItemEnchantment.Tick.Inventory, ILivingEnchantment.Death, IItemEnchantment.Tooltip {
public class SacrificingCurseEnchantment extends HLEnchantment implements IItemEnchantment.Tick.Inventory, ILivingEnchantment.Death, IItemEnchantment.Tooltip {

private static final String NBT_TIME = "SacrificingProcess";
private static final int MAX_TIME = 20 * 60;

public CurseOfSacrificingEnchantment() {
public SacrificingCurseEnchantment() {
super(
Enchantment.Rarity.RARE,
EnchantmentCategory.VANISHABLE,
Expand Down
10 changes: 5 additions & 5 deletions src/main/resources/assets/harmonicench/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"enchantment.harmonicench.free_riding": "Free Riding",
"enchantment.harmonicench.safe_teleporting": "Safe Teleporting",
"enchantment.harmonicench.blessing": "Blessing",
"enchantment.harmonicench.curse_of_rebelling": "Curse of Rebelling",
"enchantment.harmonicench.rebelling_curse": "Curse of Rebelling",
"enchantment.harmonicench.electrification": "Electrification",
"enchantment.harmonicench.luck_of_the_snow": "Luck of the Snow",
"enchantment.harmonicench.dining": "Dining",
Expand All @@ -22,7 +22,7 @@
"enchantment.harmonicench.deep_study": "Deep Study",
"enchantment.harmonicench.forging": "Forging",
"enchantment.harmonicench.sun_affinity": "Sun affinity",
"enchantment.harmonicench.curse_of_sacrificing": "Curse of Sacrificing",
"enchantment.harmonicench.sacrificing_curse": "Curse of Sacrificing",
"enchantment.harmonicench.long": "Long",
"enchantment.harmonicench.aim": "Aim",
"enchantment.harmonicench.blunt": "Blunt",
Expand All @@ -39,7 +39,7 @@
"enchantment.harmonicench.free_riding.desc": "When riding pig or strider, boosting speed will not reduce durability.",
"enchantment.harmonicench.safe_teleporting.desc": "Immunified from the damage after using ender pearl, acquire resistance when traveling to different dimensions.",
"enchantment.harmonicench.blessing.desc": "Provide magic resistance based on the summation of all enchantments' levels of the item.",
"enchantment.harmonicench.curse_of_rebelling.desc": "Cause damage to the user in some certain probabilities when durability of the item reduces.",
"enchantment.harmonicench.rebelling_curse.desc": "Cause damage to the user in some certain probabilities when durability of the item reduces.",
"enchantment.harmonicench.electrification.desc": "When raining or thunderstorm, there is possibility that lightning hits the player and generates strength effect on him/her.",
"enchantment.harmonicench.luck_of_the_snow.desc": "Increase the probability of catching treasures and decrease the probability of catching fish and trash, when fishing in snowy or cold biomes.",
"enchantment.harmonicench.dining.desc": "When eating, transform your Hunger value to duability of the item.",
Expand All @@ -49,13 +49,13 @@
"enchantment.harmonicench.deep_study.desc": "Your fortune level doubled when mining deepslate ore.",
"enchantment.harmonicench.forging.desc": "Improve armor and armor toughness based on the operation times of the item on anvil (excluding rename).",
"enchantment.harmonicench.sun_affinity.desc": "Become lighter when flying with an elytra, only in a sunny daylight.",
"enchantment.harmonicench.curse_of_sacrificing.desc": "Need to kill mobs at regular intervals.",
"enchantment.harmonicench.sacrificing_curse.desc": "Need to kill mobs at regular intervals.",
"enchantment.harmonicench.long.desc": "Increase the attack distance of the sword.",
"enchantment.harmonicench.aim.desc": "When using a telescope, mark enemy mobs and increase projectile damage.",
"enchantment.harmonicench.blunt.desc": "Reduce attack speed and significantly increase critical damage.",

"enchantment.harmonicench.proficiency.proficiency": "(Proficiency: %s)",
"enchantment.harmonicench.curse_of_sacrificing.vanished": "%1$s thirsty for sacrifice, then vanished after sucking the life out of %2$s",
"enchantment.harmonicench.sacrificing_curse.vanished": "%1$s thirsty for sacrifice, then vanished after sucking the life out of %2$s",
"enchantment.harmonicench.aim.looking_at": "Found monster %1$s, %3$s m from player %2$s",
"enchantment.harmonicench.blessing.tooltip": "Magic Resistance",

Expand Down
12 changes: 7 additions & 5 deletions src/main/resources/assets/harmonicench/lang/zh_cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"enchantment.harmonicench.free_riding": "无偿骑乘",
"enchantment.harmonicench.safe_teleporting": "传送保护",
"enchantment.harmonicench.blessing": "祝福",
"enchantment.harmonicench.curse_of_rebelling": "叛逆诅咒",
"enchantment.harmonicench.rebelling_curse": "叛逆诅咒",
"enchantment.harmonicench.electrification": "感电",
"enchantment.harmonicench.luck_of_the_snow": "冰雪眷顾",
"enchantment.harmonicench.dining": "饱食修补",
Expand All @@ -22,7 +22,7 @@
"enchantment.harmonicench.deep_study": "深层研究",
"enchantment.harmonicench.forging": "锻打",
"enchantment.harmonicench.sun_affinity": "领航",
"enchantment.harmonicench.curse_of_sacrificing": "献祭诅咒",
"enchantment.harmonicench.sacrificing_curse": "献祭诅咒",
"enchantment.harmonicench.long": "延展之刃",
"enchantment.harmonicench.aim": "瞄准",
"enchantment.harmonicench.blunt": "钝重",
Expand All @@ -39,7 +39,7 @@
"enchantment.harmonicench.free_riding.desc": "骑乘猪或炽足兽时,使用提速不再消耗耐久。",
"enchantment.harmonicench.safe_teleporting.desc": "免疫末影珍珠的传送伤害,并在穿越维度时提供防御。",
"enchantment.harmonicench.blessing.desc": "根据物品的所有魔咒等级之和,提供魔法抗性。",
"enchantment.harmonicench.curse_of_rebelling.desc": "物品耐久度降低时,有概率对使用者造成伤害。",
"enchantment.harmonicench.rebelling_curse.desc": "物品耐久度降低时,有概率对使用者造成伤害。",
"enchantment.harmonicench.electrification.desc": "降雨或雷暴天气时,有概率产生闪电击中持有者并给予力量效果。",
"enchantment.harmonicench.luck_of_the_snow.desc": "在寒冷和积雪生物群系里,提高钓上宝藏的概率,降低钓上鱼和垃圾的概率。",
"enchantment.harmonicench.dining.desc": "食用食物后,将玩家增加的饥饿值转化为该物品的耐久度。",
Expand All @@ -49,15 +49,17 @@
"enchantment.harmonicench.deep_study.desc": "开采深层矿石时,获得两倍等级时运的效果。",
"enchantment.harmonicench.forging.desc": "根据物品在铁砧上的操作次数(重命名除外),增加护甲值和盔甲韧性。",
"enchantment.harmonicench.sun_affinity.desc": "鞘翅滑翔更加轻盈,但只能在晴朗的白天使用。",
"enchantment.harmonicench.curse_of_sacrificing.desc": "需要定期杀死生物。",
"enchantment.harmonicench.sacrificing_curse.desc": "需要定期杀死生物。",
"enchantment.harmonicench.long.desc": "提高剑的攻击距离。",
"enchantment.harmonicench.aim.desc": "使用望远镜时,标记敌对生物并提高弹射物伤害。",
"enchantment.harmonicench.blunt.desc": "降低攻击速度,大幅提高暴击伤害(跳劈)。",

"enchantment.harmonicench.proficiency.proficiency": "(熟练度:%s)",
"enchantment.harmonicench.curse_of_sacrificing.vanished": "%1$s渴求祭品,在抽取了%2$s的生命之后消失了",
"enchantment.harmonicench.sacrificing_curse.vanished": "%1$s渴求祭品,在抽取了%2$s的生命之后消失了",
"enchantment.harmonicench.aim.looking_at": "发现%1$s,距离%2$s %3$s 米",
"enchantment.harmonicench.blessing.tooltip": "魔法抗性",
"enchantment.harmonicench.observer.weather.1": "%1$s观察星星,发现%2$s后会有雷暴",
"enchantment.harmonicench.observer.weather.2": "%1$s观察星星,发现%3$s后会有降雨,%2$s后会有雷暴",

"death.attack.curseOfRebelling": "%1$s死于%2$s的背叛",

Expand Down

0 comments on commit 579caf3

Please sign in to comment.