Войти или зарегистрироваться
  • Вы находитесь в сообществе Rubukkit. Мы - администраторы серверов Minecraft, разрабатываем собственные плагины и переводим на различные языки плагины наших коллег из других стран.

Помогите Как запретить мобу двигаться?

NoAI:1 выставляешь и моб неподвижен.
 
Можно атрибутами

Код:
private static final UUID movementSpeedUUID = UUID.fromString("206a89dc-ae78-4c4d-b42c-3b31db3f5a7c");

Код:
EntityInsentient nmsEntity = (EntityInsentient) ((CraftLivingEntity) entity).getHandle();
          
            AttributeInstance speedattributes = nmsEntity.getAttributeInstance(GenericAttributes.d);
            AttributeModifier speedmodifier = new AttributeModifier(movementSpeedUUID, "Movement speed multiplier", 0, 1);
            speedattributes.b(speedmodifier);
            speedattributes.a(speedmodifier);
 
Можно атрибутами

Код:
private static final UUID movementSpeedUUID = UUID.fromString("206a89dc-ae78-4c4d-b42c-3b31db3f5a7c");

Код:
EntityInsentient nmsEntity = (EntityInsentient) ((CraftLivingEntity) entity).getHandle();
         
            AttributeInstance speedattributes = nmsEntity.getAttributeInstance(GenericAttributes.d);
            AttributeModifier speedmodifier = new AttributeModifier(movementSpeedUUID, "Movement speed multiplier", 0, 1);
            speedattributes.b(speedmodifier);
            speedattributes.a(speedmodifier);
Но не через NMS же
 

Поделиться этой страницей

Назад
Верх