v2.0.0
(contains breaking changes)
-
Type Assertions:
- Introduced a new runtime validation module with schema builders for objects, unions, enums, refinements, and more.
- Exposes
TypeBuilder,ValidationError,ValidationIssueCode, etc.
-
Logging System:
- Added timestamp support with
Logger.setTimestampFormatter()andLogger.setBasicTimestampFormatter()(HH:mm:ss.SS). - Updated
Logger.setFormatFunctionsignature to includetimestamp:(level, logger, message, timestamp, tags?) => string. - Initialization now runs inside
system.beforeEvents.startup - Improved wildcard matching (supports middle-wildcards, e.g.,
foo*bar). - Refactored error stack mapping (still compatible with global source mapping).
- Added timestamp support with
-
Vec2 / Vec3 and Math:
- Added mutable vector types
MutVec2andMutVec3with in-place operations for performance.
- Added mutable vector types
-
VariableSender:
sendMolangDatanow passesplayersas an array ofPlayerobjects directly toentity.playAnimation(was mapping to names before).
-
Profiling Utilities:
- Removed
ProfilingUtils(andaddIdleDummy/clearIdleDummy)
- Removed
-
Tests:
- Expanded coverage for
ColorJSON,ColorUtils, math vectors (Vec2,Vec3,MutVec2,MutVec3), and the new Type Assertion module.
- Expanded coverage for
Breaking Changes
- Dropped support for
@minecraft/serverV1 Logger.setFormatFunctionnow receivestimestampas the 4th argument; update custom formatters.- Logger timestamps are off by default; enable via
Logger.setBasicTimestampFormatter()or a customsetTimestampFormatter(). VariableSender.sendMolangDataplayer handling changed:playersprovidesPlayer[]directly (not names).- Removed
ProfilingUtils(includingaddIdleDummy/clearIdleDummy). @minecraft/servermoved from"beta"to"latest"which may impact API compatibility depending on your environment.