漏洞反馈
MOD版本: |
Avaritia-1.18.2-4.0.1.6-universal |
MC版本: |
1.7.10(?)~1.20.2 |
身穿含有耐久附魔的护甲时,受到极高伤害,会导致1tick时间超过60秒触发看门狗
目前测试,受到2e10的伤害 即可在服务端稳定触发看门狗(1 tick 超过60秒)
发现途径
无尽贪婪官方更新的1.18.2版本 -> Avaritia-1.18.2-4.0.1.6-universal.jar
这个版本修改了寰宇支配之剑的伤害计算方式,由原有的setHealth(0)改为了hurt(3e34),导致出现了这个问题
- <blockquote><div style="line-height: 19px;"><div>public boolean hurt(int damage, RandomSource random, ServerPlayer player) {</div><div> if (!this.isDamageableItem()) { return false; } </div><div> else {</div><div> if (damage > 0) {</div><div> int i = EnchantmentHelper.getItemEnchantmentLevel(Enchantments.UNBREAKING, this);</div><div> int j = 0;</div><div> for(int k = 0; i > 0 && k < damage; ++k) {</div><div> if (DigDurabilityEnchantment.shouldIgnoreDurabilityDrop(this, i, random)) {</div><div> ++j;</div><div> }</div><div> }</div><div> //...</div><div> }</div><div> // ...</div><div> }</div><div> // ...</div><div>}</div></div>
复制代码
1.7.10
- net.minecraft.item.ItemStack#attemptDamageItem
- net.minecraft.item.ItemStack#damageItem
- net.minecraftforge.common.ISpecialArmor.ArmorProperties#ApplyArmor
- net.minecraft.entity.player.EntityPlayer#damageEntity
- net.minecraft.entity.EntityLivingBase#attackEntityFrom
- net.minecraft.entity.player.EntityPlayer#attackEntityFrom
- net.minecraft.entity.player.EntityPlayerMP#attackEntityFrom
复制代码1.18.2
- net.minecraft.world.item.ItemStack#hurt
- net.minecraft.world.item.ItemStack#hurtAndBreak
- net.minecraft.world.entity.player.Inventory#hurtArmor
- net.minecraft.world.entity.player.Player#hurtArmor
- net.minecraft.world.entity.LivingEntity#getDamageAfterArmorAbsorb
- net.minecraft.world.entity.player.Player#actuallyHurt
- net.minecraft.world.entity.LivingEntity#hurt
- net.minecraft.world.entity.player.Player#hurt
- net.minecraft.server.level.ServerPlayer#hurt
复制代码1.20.2
- net.minecraft.world.item.ItemStack#hurt
- net.minecraft.world.item.ItemStack#hurtAndBreak
- net.minecraft.world.entity.player.Inventory#hurtArmor
- net.minecraft.world.entity.player.Player#hurtArmor
- net.minecraft.world.entity.LivingEntity#getDamageAfterArmorAbsorb
- net.minecraft.world.entity.player.Player#actuallyHurt
- net.minecraft.world.entity.LivingEntity#hurt
- net.minecraft.world.entity.player.Player#hurt
- net.minecraft.server.level.ServerPlayer#hurt
复制代码
1.18.2
- player.hurt(new EntityDamageSource("",player),2e10f);
复制代码1.20.2
- player.hurt(level.damageSources().playerAttack(player), 2e10f);
复制代码
|
|