Breaking
- Removed
TempScoreSource (add0eda)
- Removed
ConstantScoreSource (add0eda)
ExpressionNode objects now require a ctx parameter that can either be beet's Context or Expression. This includes ScoreSource and DataSource. (add0eda)
- Removed the
ExpressionNode.create factory method. Use the constructor as expected (add0eda)
- Renamed
Score class to Objective (awkward name for the object returned by Scoreboard) (72afafe)
- The internal optimizer now works with a restricted IR (
690eb40)
- Replaced resolver with a serializer to produce command strings (
8252db4)
Feature
- Specify data source types using square brackets (score/data casting only) (
b7b96fb)
from nbtlib import Double, Byte
storage.x[Double] = obj["@s"]
# execute store result storage ... double 1 run scoreboard players get @s obj
# applying a scale
storage.x[Double] = obj["@s"] / 100
count = storage.item.Count[Byte]
# right side is casted to byte
count = obj["$count"]
count = storage.value
value = storage.value[Byte]
# no casting happens when both sides have the same type
count = value
# data modify ... count set from storage ... value
- Added
DataSource merge operation as | (binary or) (add0eda)
storage.result = storage.a | storage.b | storage.c
# data modify storage ... result set from storage ... a
# data modify storage ... result merge from storage ... b
# data modify storage ... result merge from storage ... c
Fix
- Reuse temporary score names (
0eb9556)
- Make api not dependent of Context object (
72afafe)
- Reduce number of temporaries used for score and data operations (
8756e50)