Перейти к содержимому
Mineforgian

VoxLib

Gone are the days when you must create a new voxel shape for every direction your block faces! With the help of this library, with can be done with the use a simple function.

Загрузки
464
Подписчики
2
Обновлён
1 августа 2026 г.
Лицензия
Minecraft-Modding-Public-License

Опубликован 2 декабря 2023 г.

VoxLib

VoxLib is a Fabric library for Minecraft 1.19.4 that makes working with block voxel shapes less repetitive. Create a shape once, combine its pieces, rotate it for each direction, and inspect the result in-game.

VoxLib is primarily intended for mod developers. Install it when another mod lists it as a dependency, or add it directly to your development environment.

Features

  • Create cuboid and common block shapes
  • Combine shapes with concise Kotlin helpers
  • Build shapes conditionally
  • Rotate and flip shapes for directional blocks
  • Simplify complex collision and outline shapes
  • Cache repeated shape operations
  • Display targeted outline and collision shapes in-game
  • Log and compare shapes in client or server environments

Quick Example

val northShape = createCuboidShape(5, 0, 0, 11, 16, 8)

val eastShape = northShape.rotateRight()
val southShape = northShape.flip()
val westShape = northShape.rotateLeft()

Using VoxLib from Modrinth Maven

repositories {
    maven {
        url = "https://api.modrinth.com/maven"
    }
}

dependencies {
    modImplementation "maven.modrinth:voxlib:1.6.0+1.19.4"
}

Dependencies

  • Fabric API — required
  • Fabric Language Kotlin — required
  • Mod Menu — optional; provides access to the debug settings screen

Compatibility

  • Minecraft 1.19.4
  • Fabric
  • Java 17 or newer
  • Client and dedicated server

Shape utilities work on both sides. Rendering overlays and the configuration screen are client-only.

For complete examples and documentation, visit the GitHub repository.

Ченджлог

1.6.1+1.19.4Релиз1.19.4 · 1 августа 2026 г.

VoxLib 1.6.1

A targeted performance and memory update that preserves VoxLib’s existing public API and exact voxel-shape behavior.

Improved

  • Added specialized identity-based caching for repeated unions and transformations.
  • Reduced allocation on cached transformations and repeated shape operations.
  • Reduced temporary allocation when simplifying large shapes. In the measured 256-box benchmark, allocation dropped from approximately 10.9 MB to 1.9 MB per operation.
  • Reduced union and rotation overhead by avoiding unnecessary collections and temporary coordinate arrays.
  • Added lazy memoization for finite CommonShapes factories.
  • Canonicalized chairs without backrests, reducing the number of possible memoized common-shape instances.
  • Improved cache admission for interleaved repeated binary unions.
  • Centralized Minecraft 1.19.4-specific shape operations to make future version ports easier.

Tooling and verification

  • Added a reproducible JMH benchmark suite with vanilla and legacy implementation comparisons.
  • Added exact occupied-volume and JVM API compatibility coverage.
  • Verified union, transformation, caching, common-shape, and simplifier behavior.

Compatibility

  • Minecraft 1.19.4
  • Fabric
  • Java 17 or newer
  • No public API changes
  • Existing source and binary usage remains compatible

VoxLib remains convenience-first. Fixed shapes should still normally be created once and stored as constants.

1.6.0+1.19.4Релиз1.19.4 · 30 июля 2026 г.

VoxLib 1.6.0

Changes since 1.4.0:

  • Added client-side voxel shape debugging tools
  • Added configurable targeted block outline and collision overlays
  • Added persistent settings for debug mode, color, transparency, and overlay selection
  • Added a native Mod Menu configuration screen
  • Added client-environment guards to prevent dedicated-server crashes
  • Fixed shape-cache collisions returning unrelated shapes
  • Improved handling of empty shapes and invalid simplification limits
  • Fixed defaults when loading partial configuration files
  • Made configuration updates and file writes safer
  • Fixed debug transparency being affected by the configured RGB color
  • Added better test coverage for asymmetric shape rotations
1.4.0+1.19.4Релиз1.19.4 · 30 декабря 2025 г.

Added

  • Comprehensive unit tests for VoxLib APIs
  • fabric.mod.json for test environment

Changed

  • Updated dependencies for Minecraft 1.19.4
  • Updated Fabric Language Kotlin to 1.13.8+kotlin.2.3.0
  • Fixed Gradle deprecation warnings
  • Applied Kotlin best practices
  • Improved type safety in VoxLib APIs
  • Enhanced documentation
1.2.0+1.19.4Релиз1.19.4 · 23 мая 2025 г.

VoxLib 1.2.0

New Features

  • New transformation methods: flipVertical(), flipZ(), rotate(transformation)
  • High-performance caching using Caffeine library
  • New utility class CommonShapes with pre-defined shape generators
  • Shape simplification utilities
  • Debug utilities in VoxelShapeDebug

Improvements

  • Optimized shape combination algorithms
  • Special case handling for empty and full shapes
  • Automatic cache eviction with time-based expiration
  • Improved documentation
  • Updated dependencies

Full Changelog

See the CHANGELOG.md for complete details.

1.1+1.19.4Релиз1.19.4 · 15 марта 2024 г.
  • Updated fabric loader from 0.14.23 to 1.15.7.
  • Updated fabric language kotlin from 1.10.14+kotlin.1.9.20 to >=1.10.19+kotlin.1.9.23.
  • Updated Kotlin from 1.9.20 to 1.9.23.
  • Updated mod version from 1.0.0+1.19.4 to 1.1+1.19.4

Комментарии

Загружаем…