HHZJ
版本1.12.2
有没有什么Mod可以单独调整空手攻击力或者禁用空手攻击?
如果没有,
如何使用Crt编写?
import crafttweaker.event.PlayerAttackEntityEvent;
import crafttweaker.event.IEventCancelable;
import crafttweaker.entity.IEntity;
import crafttweaker.player.IPlayer;
import crafttweaker.item.IItemStack;
import crafttweaker.entity.IEntityLivingBase;

events.onPlayerAttackEntity(function(event as PlayerAttackEntityEvent){
    var entity as IEntity = event.target;
        var player as IPlayer = event.player;
    if(!isNull(entity.definition)){
                if(!isNull(player.mainHandHeldItem)){
            event.cancel();
                }
        }
});
这段脚本能禁用,但功能反过来了(拿着物品不能攻击,空手能攻击)

minecraftLYC
虽然我没有找到模组,但是原版的命令就能实现: 先检测谁空手,再给空手的人虚弱。

无敌三脚猫
if(!isNull(player.mainHandHeldItem))
这段,去掉感叹号

HHZJ
无敌三脚猫 发表于 2022-7-27 08:55
if(!isNull(player.mainHandHeldItem))
这段,去掉感叹号

有没有可以修改伤害的参数?

第一页 上一页 下一页 最后一页