▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Моды/Commander
Commander

Commander

An extension of the data pack system.

72.2K
11
Все версии0.8.0 (1.20.4)

0.8.0 (1.20.4)

Beta1 г. назад

Список изменений

What's New:

User Changes:

  • Added ?. and ? null safe operators.
    • ?. Used on structures. Same as ., but returns null if there's no such field in structure.
    • ? Used with anything that can be null. Returns the right operand if left is null or left if not.

These operators allow you to quickly check for nulls in your expressions. Let's image a situation like this:

You have a variable struct.x which might not exist and maybe null. Before, you'd have to write something like this:

if(structContainsKey(struct, 'x') && struct.x != null, struct.x, valueElse())'

Now this can be shortened to: struct?.x ? valueElse(). Do note that ? has a very low precedence, so in ambiguous cases you'll have to wrap it in parentheses. e.g. 23 + struct?.x ? 23 -> 23 + (struct?.x ? 23).

  • Java Optionals are now unwrapped in expressions.
  • Minecraft Identifiers are now converted to strings in expressions.
  • Gson elements can now be used in expressions.

Dev Changes:

  • Fixed equals on CustomDataAccessors.
  • Added LootContext as an argument for the CustomFields#addVirtualField function.

Other Changes:

  • Updated mEvalEx to fix expression inlining.

Файлы

commander-0.8.0-1.20.4-build.21.jar(881.98 KiB)
Основной
Скачать
commander-0.8.0-1.20.4-build.21-sources.jar(100.46 KiB)
Скачать

Метаданные

Канал релиза

Beta

Номер версии

0.8.0-1.20.4-build.21

Загрузчики

Fabric

Версии игры

1.20.4

Загрузок

151

Дата публикации

1 г. назад

Загрузил

ID версии

Главная