用户:
屑蛋挞查看:6 回复:2 评论:6 创建时间:2022-05-22T12:28:58
1.求玩家碰到某个模型就能飞行的代码
2.求玩家碰到某个模型就能变色的代码
FML饭米粒world.onEntityContact(({entity, other})=>{
if(!other.isplayer) return // 如果不是玩家碰上去就不管
if(entity.id=='飞行'){ // 如果碰到的模型名叫飞行
other.player.canFly = true // 能飞了
}else if(entity.id=='变色'){ // 碰到模型叫做变色
other.player.color.set(1,0,0) // 变红(颜色自己挑
}
})点赞0
评论