物品命令:/give @p endless:infinity_sword 1
具有无穷大的攻击伤害(+∞点)单精度浮点数的正无穷。右击对32格范围内所有怪物造成10000点( × 5000)无尽伤害,潜行右击则可攻击所有生物。范围伤害可直接攻击末影龙和正在生成的凋零,可攻击创造玩家。
在玩家持有无尽剑时将会清除挖掘疲劳Debuff,同普通武器一样可附魔,也可触发横扫,暴击和击退效果。
如开启配置项(是否破坏龙研的混沌水晶),左击可直接破坏龙之进化/龙之研究的混沌水晶。相关代码:
if (entity instanceof DraconicGuardianEntity){
DraconicGuardianEntity draconicGuardian = (DraconicGuardianEntity) entity;
draconicGuardian.attackEntityPartFrom(draconicGuardian.dragonPartHead, new InfinityDamageSource(player), Float.POSITIVE_INFINITY);
draconicGuardian.setHealth(-1);
draconicGuardian.onDeath(new InfinityDamageSource(player));
}else if (entity instanceof GuardianCrystalEntity && Config.SERVER.isBreakDECrystal.get()){
GuardianCrystalEntity crystal = (GuardianCrystalEntity) entity;
crystal.func_174812_G();
}
在攻击一般生物时,直接对其造成+∞点无尽伤害,后将其生命值设置为-1,设置死亡来演为无尽伤害等。攻击末影龙时伤害来演为玩家,攻击凋零时先将凋零无敌时间设置为0,然后造成伤害。如果被攻击实体是盔甲架,则造成10点()普通类型伤害。
对于玩家若没有穿戴全套无尽则正常攻击,如果有则值造成10点()无尽伤害,若同时持有无尽武器则进一步降至4点()。
相关代码如下:
if (target instanceof EnderDragonEntity && attacker instanceof PlayerEntity){
EnderDragonEntity dragon = (EnderDragonEntity) target; //攻击末影龙
dragon.attackEntityPartFrom(dragon.dragonPartHead, new InfinityDamageSource(attacker), Float.POSITIVE_INFINITY);
}else if (target instanceof WitherEntity){
WitherEntity wither = (WitherEntity) target;
wither.setInvulTime(0);
wither.attackEntityFrom(new InfinityDamageSource(attacker), Float.POSITIVE_INFINITY);
} else if (target instanceof ArmorStandEntity){
target.attackEntityFrom(DamageSource.GENERIC, 10);
return true;
}else {
if (target instanceof PlayerEntity){
PlayerEntity player = (PlayerEntity) target;
if (EventHandler.isInfinite(player)){ //被攻击玩家有全套无尽 减免至10点
if (EventHandler.isInfinityItem(player)) //玩家在持有无尽剑或弓时 减免至4点
target.attackEntityFrom(new InfinityDamageSource(attacker), Config.SERVER.infinityBearDamage.get());
else target.attackEntityFrom(new InfinityDamageSource(attacker), Config.SERVER.infinityArmorBearDamage.get());
} else target.attackEntityFrom(new InfinityDamageSource(attacker), Float.POSITIVE_INFINITY);
} else target.attackEntityFrom(new InfinityDamageSource(attacker), Float.POSITIVE_INFINITY);
}
if (target instanceof PlayerEntity){
PlayerEntity player = (PlayerEntity) target;
if (EventHandler.isInfinite(player)){ //玩家穿戴全套无尽 则不执行死亡
return true;
}
}
if (target.isAlive() || target.getHealth() > 0){
target.setHealth(-1);
target.onDeath(new InfinityDamageSource(attacker));
target.onKillCommand();
target.deathTime = 20;
target.remove(true);
}
资料分类: | 武器 |
最大耐久: | 10000 |
最大叠加: | 1个 / 组 |