Skip to content

2.0.0

Latest

Choose a tag to compare

@stirante stirante released this 14 Oct 10:45
· 8 commits to main since this release

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() and Logger.setBasicTimestampFormatter() (HH:mm:ss.SS).
    • Updated Logger.setFormatFunction signature to include timestamp: (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).
  • Vec2 / Vec3 and Math:

    • Added mutable vector types MutVec2 and MutVec3 with in-place operations for performance.
  • VariableSender:

    • sendMolangData now passes players as an array of Player objects directly to entity.playAnimation (was mapping to names before).
  • Profiling Utilities:

    • Removed ProfilingUtils (and addIdleDummy / clearIdleDummy)
  • Tests:

    • Expanded coverage for ColorJSON, ColorUtils, math vectors (Vec2, Vec3, MutVec2, MutVec3), and the new Type Assertion module.

Breaking Changes

  • Dropped support for @minecraft/server V1
  • Logger.setFormatFunction now receives timestamp as the 4th argument; update custom formatters.
  • Logger timestamps are off by default; enable via Logger.setBasicTimestampFormatter() or a custom setTimestampFormatter().
  • VariableSender.sendMolangData player handling changed: players provides Player[] directly (not names).
  • Removed ProfilingUtils (including addIdleDummy / clearIdleDummy).
  • @minecraft/server moved from "beta" to "latest" which may impact API compatibility depending on your environment.