Skip to content

Commit

Permalink
Merged 1.10.5 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Majrusz authored Dec 10, 2023
2 parents dfecf8d + b68bc45 commit 8d3eb78
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 91 deletions.
5 changes: 4 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
- changed required Majrusz Library version from 6.1.7+ to 7.0.0+
- updated Chinese translation (thanks to @UDTakerBean)
- made Misanthropy not obtainable via enchanting table on axes to match other vanilla enchantments
- changed final Fishing Fanatic level text formatting
- optimized Horse Frost Walker enchantment
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ public static CustomEnchantment create() {
@Override
public Component getFullname( int level ) {
if( level == this.getMaxLevel() ) {
return TextHelper.translatable( "enchantment.majruszsenchantments.fishing_fanatic.true" )
.withStyle( ChatFormatting.GRAY, ChatFormatting.BOLD );
return TextHelper.translatable( "enchantment.majruszsenchantments.fishing_fanatic.true" ).withStyle( ChatFormatting.GRAY );
}

return super.getFullname( level );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ public HorseFrostWalkerEnchantment() {

OnEntityTicked.listen( this::freezeNearbyWater )
.addCondition( Condition.isLogicalServer() )
.addCondition( data->EnchantmentHelper.has( this.enchantment, data.entity ) )
.addCondition( Condition.predicate( data->data.entity instanceof Animal ) );
.addCondition( Condition.cooldown( 0.1f ) )
.addCondition( data->data.entity instanceof Animal )
.addCondition( data->EnchantmentHelper.has( this.enchantment, data.entity ) );

OnEntityPreDamaged.listen( OnEntityPreDamaged::cancelDamage )
.addCondition( Condition.isLogicalServer() )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import com.majruszlibrary.math.Range;
import com.majruszsenchantments.MajruszsEnchantments;
import com.majruszsenchantments.common.Handler;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.SwordItem;
import net.minecraft.world.item.enchantment.DamageEnchantment;
import net.minecraft.world.item.enchantment.Enchantment;

Expand All @@ -19,7 +21,13 @@ public class MisanthropyEnchantment extends Handler {
float damage = 2.5f;

public static CustomEnchantment create() {
return new CustomEnchantment()
return new CustomEnchantment() {
@Override
public boolean canEnchantUsingEnchantingTable( ItemStack itemStack ) {
return super.canEnchantUsingEnchantingTable( itemStack )
&& itemStack.getItem() instanceof SwordItem;
}
}
.rarity( Enchantment.Rarity.UNCOMMON )
.category( MajruszsEnchantments.IS_MELEE_MINECRAFT )
.slots( EquipmentSlots.MAINHAND )
Expand Down
174 changes: 90 additions & 84 deletions common/src/main/resources/assets/majruszsenchantments/lang/zh_cn.json
Original file line number Diff line number Diff line change
@@ -1,85 +1,91 @@
{
"enchantment.majruszsenchantments.death_wish": "死神祝福",
"enchantment.majruszsenchantments.death_wish.desc": "持有者生命值越低伤害越高,按损失的生命值百分比增加伤害,并会受到25%的额外伤害。",
"enchantment.majruszsenchantments.death_wish.description": "持有者生命值越低伤害越高,按损失的生命值百分比增加伤害,并会受到25%的额外伤害。",
"enchantment.majruszsenchantments.dodge": "规避",
"enchantment.majruszsenchantments.dodge.desc": "有一定概率完全规避一次伤害。",
"enchantment.majruszsenchantments.dodge.description": "有一定概率完全规避一次伤害。",
"enchantment.majruszsenchantments.enlightenment": "启迪",
"enchantment.majruszsenchantments.enlightenment.desc": "增加所获得的经验,并在使用附魔台时提高可附魔的等级,即使没有书架(上限为30级)。",
"enchantment.majruszsenchantments.enlightenment.description": "增加所获得的经验,并在使用附魔台时提高可附魔的等级,即使没有书架(上限为30级)。",
"enchantment.majruszsenchantments.fishing_fanatic": "垂钓狂热",
"enchantment.majruszsenchantments.fishing_fanatic.desc": "有概率在钓鱼时获得额外的战利品,在下雨概率翻倍。",
"enchantment.majruszsenchantments.fishing_fanatic.description": "有概率在钓鱼时获得额外的战利品,在下雨概率翻倍。",
"enchantment.majruszsenchantments.fishing_fanatic.level_up": "你已经成为更伟大的钓鱼爱好者!",
"enchantment.majruszsenchantments.fishing_fanatic.true": "真正的钓鱼爱好者",
"enchantment.majruszsenchantments.fuse_cutter": "导火线切割器",
"enchantment.majruszsenchantments.fuse_cutter.desc": "当玩家持盾格挡时将取消附近所有的爆炸且不会受到任何伤害。",
"enchantment.majruszsenchantments.fuse_cutter.description": "当玩家持盾格挡时将取消附近所有的爆炸且不会受到任何伤害。",
"enchantment.majruszsenchantments.gold_fuelled": "黄金燃料",
"enchantment.majruszsenchantments.gold_fuelled.desc": "当一个金制工具或盔甲即将被摧毁时,消耗金锭把它完全修复。",
"enchantment.majruszsenchantments.gold_fuelled.description": "当一个金制工具或盔甲即将被摧毁时,消耗金锭把它完全修复。",
"enchantment.majruszsenchantments.harvester": "收获者",
"enchantment.majruszsenchantments.harvester.desc": "右击收割作物时,会有概率加速附近作物的生长。",
"enchantment.majruszsenchantments.harvester.description": "右击收割作物时,会有概率加速附近作物的生长。",
"enchantment.majruszsenchantments.horse_frost_walker": "霜冻之旅",
"enchantment.majruszsenchantments.horse_frost_walker.desc": "当马匹在水面上行走时将下方的水变成冰,在岩浆块上行走时不会受到伤害。",
"enchantment.majruszsenchantments.horse_frost_walker.description": "当马匹在水面上行走时将下方的水变成冰,在岩浆块上行走时不会受到伤害。",
"enchantment.majruszsenchantments.horse_protection": "装甲马邦",
"enchantment.majruszsenchantments.horse_protection.desc": "减少马匹受到的伤害。",
"enchantment.majruszsenchantments.horse_protection.description": "减少马匹受到的伤害。",
"enchantment.majruszsenchantments.horse_swiftness": "迅捷",
"enchantment.majruszsenchantments.horse_swiftness.desc": "增加马匹的移动速度。",
"enchantment.majruszsenchantments.horse_swiftness.description": "增加马匹的移动速度。",
"enchantment.majruszsenchantments.hunter": "猎人",
"enchantment.majruszsenchantments.hunter.desc": "距离目标越远,持有者对其造成的伤害就越大。",
"enchantment.majruszsenchantments.hunter.description": "距离目标越远,持有者对其造成的伤害就越大。",
"enchantment.majruszsenchantments.immortality": "不朽",
"enchantment.majruszsenchantments.immortality.desc": "手持带有该附魔的盾牌时死亡将免除死亡,但盾牌会被立刻摧毁。",
"enchantment.majruszsenchantments.immortality.description": "手持带有该附魔的盾牌时死亡将免除死亡,但盾牌会被立刻摧毁。",
"enchantment.majruszsenchantments.leech": "汲取",
"enchantment.majruszsenchantments.leech.desc": "每次攻击都有概率窃取目标的随机正面效果或1点生命值。",
"enchantment.majruszsenchantments.leech.description": "每次攻击都有概率窃取目标的随机正面效果或1点生命值。",
"enchantment.majruszsenchantments.magic_protection": "魔法保护",
"enchantment.majruszsenchantments.magic_protection.desc": "提供对魔法伤害的抗性,例如唤魔者尖牙、守护者激光、瞬间伤害药水。",
"enchantment.majruszsenchantments.magic_protection.description": "提供对魔法伤害的抗性,例如唤魔者尖牙、守护者激光、瞬间伤害药水。",
"enchantment.majruszsenchantments.misanthropy": "人类克星",
"enchantment.majruszsenchantments.misanthropy.desc": "增加对村民、掠夺者、女巫和其他玩家的伤害。",
"enchantment.majruszsenchantments.misanthropy.description": "增加对村民、掠夺者、女巫和其他玩家的伤害。",
"enchantment.majruszsenchantments.smelter": "自动冶炼",
"enchantment.majruszsenchantments.smelter.desc": "采集矿石时会自动冶炼成锭。",
"enchantment.majruszsenchantments.smelter.description": "采集矿石时会自动冶炼成锭。",
"enchantment.majruszsenchantments.telekinesis": "心灵感应",
"enchantment.majruszsenchantments.telekinesis.desc": "在破坏方块时,物品会自动进入物品栏而不会掉落在地上。",
"enchantment.majruszsenchantments.telekinesis.description": "在破坏方块时,物品会自动进入物品栏而不会掉落在地上。",
"enchantment.majruszsenchantments.absorber": "吸收",
"enchantment.majruszsenchantments.absorber.desc": "玩家受到负面效果时,盾牌会通过消耗耐久度来吸收负面效果。",
"enchantment.majruszsenchantments.absorber.description": "玩家受到负面效果时,盾牌会通过消耗耐久度来吸收负面效果。",
"enchantment.majruszsenchantments.sixth_sense": "第六感",
"enchantment.majruszsenchantments.sixth_sense.desc": "原地停留几秒后,会高亮显示附近的敌对生物。",
"enchantment.majruszsenchantments.sixth_sense.description": "原地停留几秒后,会高亮显示附近的敌对生物。",
"enchantment.majruszsenchantments.breaking_curse": "锈斑诅咒",
"enchantment.majruszsenchantments.breaking_curse.desc": "使物品损坏的更快。",
"enchantment.majruszsenchantments.breaking_curse.description": "使物品损坏的更快。",
"enchantment.majruszsenchantments.corrosion_curse": "腐蚀诅咒",
"enchantment.majruszsenchantments.corrosion_curse.desc": "带有该附魔的护甲接触水时会逐渐损坏耐久并对持有者造成伤害。",
"enchantment.majruszsenchantments.corrosion_curse.description": "带有该附魔的护甲接触水时会逐渐损坏耐久并对持有者造成伤害。",
"enchantment.majruszsenchantments.fatigue_curse": "疲劳诅咒",
"enchantment.majruszsenchantments.fatigue_curse.desc": "随附魔等级降低工具的挖掘效率。",
"enchantment.majruszsenchantments.fatigue_curse.description": "随附魔等级降低工具的挖掘效率。",
"enchantment.majruszsenchantments.incompatibility_curse": "麻瓜诅咒",
"enchantment.majruszsenchantments.incompatibility_curse.desc": "使物品不能再被附魔。",
"enchantment.majruszsenchantments.incompatibility_curse.description": "使物品不能再被附魔。",
"enchantment.majruszsenchantments.vampirism_curse": "吸血鬼诅咒",
"enchantment.majruszsenchantments.vampirism_curse.desc": "玩家装备带有该附魔的护甲时将在阳光下燃烧,虚弱。但会增强“汲取”附魔的效果。",
"enchantment.majruszsenchantments.vampirism_curse.description": "玩家装备带有该附魔的护甲时将在阳光下燃烧,虚弱。但会增强“汲取”附魔的效果。",
"enchantment.majruszsenchantments.vampirism_curse.block_sleep": "你不会觉得需要睡觉...",
"advancements.majruszsenchantments.scholar.title": "学者",
"advancements.majruszsenchantments.scholar.description": "在所有盔甲上获得启迪II",
"advancements.majruszsenchantments.fishing_fanatic.title": "嘿,好极了!",
"advancements.majruszsenchantments.fishing_fanatic.description": "获得垂钓狂热I",
"advancements.majruszsenchantments.fishing_fanatic_rain.title": "没有什么可以阻止我",
"advancements.majruszsenchantments.fishing_fanatic_rain.description": "在下雨时获得垂钓狂热II",
"advancements.majruszsenchantments.fishing_fanatic_true.title": "好吧...我上瘾了",
"advancements.majruszsenchantments.fishing_fanatic_true.description": "获得垂钓狂热VIII"
{
"enchantment.majruszsenchantments.absorber": "吸收",
"enchantment.majruszsenchantments.absorber.desc": "盾牌会消耗耐久度以吸收所有负面效果。",
"enchantment.majruszsenchantments.absorber.description": "盾牌会通过消耗耐久度来吸收负面效果。",
"enchantment.majruszsenchantments.death_wish": "死亡之愿",
"enchantment.majruszsenchantments.death_wish.desc": "造成的伤害增加,等比于已损失的生命值。",
"enchantment.majruszsenchantments.death_wish.description": "造成的伤害增加,等比于已损失的生命值。",
"enchantment.majruszsenchantments.dodge": "躲闪",
"enchantment.majruszsenchantments.dodge.desc": "有概率完全规避一次任意类型的伤害。",
"enchantment.majruszsenchantments.dodge.description": "有概率完全规避一次任意类型的伤害。",
"enchantment.majruszsenchantments.enlightenment": "启迪",
"enchantment.majruszsenchantments.enlightenment.desc": "增加从任意来源获得的经验。",
"enchantment.majruszsenchantments.enlightenment.description": "增加从任意来源获得的经验。",
"enchantment.majruszsenchantments.fishing_fanatic": "垂钓狂热",
"enchantment.majruszsenchantments.fishing_fanatic.desc": "钓鱼有概率获得额外物品。",
"enchantment.majruszsenchantments.fishing_fanatic.description": "钓鱼有概率获得额外物品。",
"enchantment.majruszsenchantments.fishing_fanatic.level_up": "你对钓鱼越来越上瘾了!",
"enchantment.majruszsenchantments.fishing_fanatic.true": "真·垂钓狂热",
"enchantment.majruszsenchantments.fuse_cutter": "熔断",
"enchantment.majruszsenchantments.fuse_cutter.desc": "附近的爆炸不会破坏方块和造成伤害。",
"enchantment.majruszsenchantments.fuse_cutter.description": "附近的爆炸不会破坏方块和造成伤害。",
"enchantment.majruszsenchantments.gold_fuelled": "金光填补",
"enchantment.majruszsenchantments.gold_fuelled.desc": "金制工具或盔甲即将损坏时用一块金锭将其完全修复。",
"enchantment.majruszsenchantments.gold_fuelled.description": "金制工具或盔甲即将损坏时用一块金锭将其完全修复。",
"enchantment.majruszsenchantments.harvester": "收割",
"enchantment.majruszsenchantments.harvester.desc": "提供右击收获作物的功能,并有概率使附近作物生长。",
"enchantment.majruszsenchantments.harvester.description": "提供右击收获作物的功能,并有概率使附近作物生长。",
"enchantment.majruszsenchantments.horse_frost_walker": "冰霜骑手",
"enchantment.majruszsenchantments.horse_frost_walker.desc": "在水面上骑行时会形成冰路。",
"enchantment.majruszsenchantments.horse_frost_walker.description": "在水面上骑行时会形成冰路。",
"enchantment.majruszsenchantments.horse_protection": "马匹保护",
"enchantment.majruszsenchantments.horse_protection.desc": "减少马受到的伤害。",
"enchantment.majruszsenchantments.horse_protection.description": "减少马受到的伤害。",
"enchantment.majruszsenchantments.horse_swiftness": "马匹迅捷",
"enchantment.majruszsenchantments.horse_swiftness.desc": "提高马的移动速度。",
"enchantment.majruszsenchantments.horse_swiftness.description": "提高马的移动速度。",
"enchantment.majruszsenchantments.hunter": "猎手",
"enchantment.majruszsenchantments.hunter.desc": "增加生物掉落,使造成的伤害与距离成比例。",
"enchantment.majruszsenchantments.hunter.description": "增加生物掉落,使造成的伤害与距离成比例。",
"enchantment.majruszsenchantments.immortality": "不朽",
"enchantment.majruszsenchantments.immortality.desc": "以消耗盾牌为代价,在致命伤害中避免死亡。",
"enchantment.majruszsenchantments.immortality.description": "以消耗盾牌为代价,在致命伤害中避免死亡。",
"enchantment.majruszsenchantments.leech": "汲取",
"enchantment.majruszsenchantments.leech.desc": "有概率偷取敌人的正面效果、生命值或饥饿值。",
"enchantment.majruszsenchantments.leech.description": "有概率偷取敌人的正面效果、生命值或饥饿值。",
"enchantment.majruszsenchantments.magic_protection": "魔法保护",
"enchantment.majruszsenchantments.magic_protection.desc": "减少魔法伤害,包括唤魔者尖牙、守卫者激光、瞬间伤害药水等。",
"enchantment.majruszsenchantments.magic_protection.description": "减少魔法伤害,包括唤魔者尖牙、守卫者激光、瞬间伤害药水等。",
"enchantment.majruszsenchantments.misanthropy": "人类杀手",
"enchantment.majruszsenchantments.misanthropy.desc": "增加对村民、掠夺者、女巫和其他玩家的伤害。",
"enchantment.majruszsenchantments.misanthropy.description": "增加对村民、掠夺者、女巫和其他玩家的伤害。",
"enchantment.majruszsenchantments.repulsion": "斥力",
"enchantment.majruszsenchantments.repulsion.desc": "格挡生物攻击时将其击退。",
"enchantment.majruszsenchantments.repulsion.description": "格挡生物攻击时将其击退。",
"enchantment.majruszsenchantments.sixth_sense": "直觉",
"enchantment.majruszsenchantments.sixth_sense.desc": "若玩家潜行,高亮显示附近发出声音的任何生物。",
"enchantment.majruszsenchantments.sixth_sense.description": "若玩家潜行,高亮显示附近发出声音的任何生物。",
"enchantment.majruszsenchantments.smelter": "熔炼",
"enchantment.majruszsenchantments.smelter.desc": "自动熔炼被挖掘的方块。",
"enchantment.majruszsenchantments.smelter.description": "自动冶炼被挖掘的方块。",
"enchantment.majruszsenchantments.telekinesis": "念力",
"enchantment.majruszsenchantments.telekinesis.desc": "获取的物品会直接进入玩家的库存中。",
"enchantment.majruszsenchantments.telekinesis.description": "获取的物品会直接进入玩家的库存中。",
"enchantment.majruszsenchantments.breaking_curse": "破裂诅咒",
"enchantment.majruszsenchantments.breaking_curse.desc": "使物品更快损坏。",
"enchantment.majruszsenchantments.breaking_curse.description": "使物品更快损坏。",
"enchantment.majruszsenchantments.corrosion_curse": "水蚀诅咒",
"enchantment.majruszsenchantments.corrosion_curse.desc": "在水中会逐渐损坏盔甲并对装备者造成伤害。",
"enchantment.majruszsenchantments.corrosion_curse.description": "在水中会逐渐损坏盔甲并对装备者造成伤害。",
"enchantment.majruszsenchantments.fatigue_curse": "疲劳诅咒",
"enchantment.majruszsenchantments.fatigue_curse.desc": "降低玩家的移动速度与使用物品的效率。",
"enchantment.majruszsenchantments.fatigue_curse.description": "降低玩家的移动速度与使用物品的效率。",
"enchantment.majruszsenchantments.incompatibility_curse": "矛盾诅咒",
"enchantment.majruszsenchantments.incompatibility_curse.desc": "使物品无法附魔。",
"enchantment.majruszsenchantments.incompatibility_curse.description": "使物品无法附魔。",
"enchantment.majruszsenchantments.slippery_curse": "滑落诅咒",
"enchantment.majruszsenchantments.slippery_curse.desc": "使物品偶尔脱手。",
"enchantment.majruszsenchantments.slippery_curse.description": "使物品偶尔脱手。",
"enchantment.majruszsenchantments.vampirism_curse": "血族诅咒",
"enchantment.majruszsenchantments.vampirism_curse.desc": "白天时削弱并点燃玩家,但会使汲取附魔更强。",
"enchantment.majruszsenchantments.vampirism_curse.description": "白天时削弱并点燃玩家,但会使汲取附魔更强。",
"enchantment.majruszsenchantments.vampirism_curse.block_sleep": "你认为没必要睡觉…",
"advancements.majruszsenchantments.scholar.title": "学者",
"advancements.majruszsenchantments.scholar.description": "整套盔甲都获得启迪II附魔",
"advancements.majruszsenchantments.fishing_fanatic.title": "嘿,这真是棒极了!",
"advancements.majruszsenchantments.fishing_fanatic.description": "获得第一级垂钓狂热",
"advancements.majruszsenchantments.fishing_fanatic_rain.title": "没什么能阻止我",
"advancements.majruszsenchantments.fishing_fanatic_rain.description": "在下雨时得到垂钓狂热的下一级",
"advancements.majruszsenchantments.fishing_fanatic_true.title": "好吧…我上瘾了",
"advancements.majruszsenchantments.fishing_fanatic_true.description": "获得第八级垂钓狂热"
}
Loading

0 comments on commit 8d3eb78

Please sign in to comment.