状态效果命令:/effect give @p unstable_fall 30 0
在拥有此效果时,玩家会不断向前行走(除非被方块阻挡或按住潜行键),并自带缓降效果。
在源代码内,此效果被注册为正面效果。另附源代码:
public void m_6742_(LivingEntity livingEntity, int amplifier) {
if (livingEntity.m_6047_())
return;
Vec3 movement = livingEntity.m_20184_();
if (movement.f_82480_ < -0.079D) {
livingEntity.m_20256_(movement.m_82492_(0.0D, movement.f_82480_ * 0.3D, 0.0D));
livingEntity.f_19789_ = 0.0F;
}
Vec3 look = livingEntity.m_20154_();
livingEntity.m_20256_(new Vec3(look.f_82479_ * 0.3D, movement.f_82480_, look.f_82481_ * 0.3D));
}
public boolean m_6584_(int duration, int amplifier) {
return true;
}
}
资料分类: | BUFF |