{"id":15104780,"url":"https://github.com/mystery2099/voxlib","last_synced_at":"2026-01-19T07:04:13.726Z","repository":{"id":200576516,"uuid":"705835956","full_name":"Mystery2099/VoxLib","owner":"Mystery2099","description":"This Minecraft library mod adds some tools which help modders to more easily manipulate, create, and rotate voxel shapes in their code!","archived":false,"fork":false,"pushed_at":"2025-12-30T17:31:09.000Z","size":456,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-03T07:22:31.761Z","etag":null,"topics":["api","fabric-mod","fabric-mods","fabricmc-mod","fabricmc-mods","library","minecraft-fabric-mod","minecraft-fabric-mods","minecraft-mod"],"latest_commit_sha":null,"homepage":"https://modrinth.com/mod/voxlib/","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mystery2099.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-16T19:31:45.000Z","updated_at":"2025-12-30T17:31:12.000Z","dependencies_parsed_at":"2024-03-15T17:51:48.533Z","dependency_job_id":"f05df9f7-d32e-4dc1-9589-8e6c9988fcfa","html_url":"https://github.com/Mystery2099/VoxLib","commit_stats":{"total_commits":26,"total_committers":2,"mean_commits":13.0,"dds":"0.038461538461538436","last_synced_commit":"3ff8accc46e6d7f47eb50f06b06db52a6bd1eca0"},"previous_names":["mystery2099/voxelshapeutils"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Mystery2099/VoxLib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mystery2099%2FVoxLib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mystery2099%2FVoxLib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mystery2099%2FVoxLib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mystery2099%2FVoxLib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mystery2099","download_url":"https://codeload.github.com/Mystery2099/VoxLib/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mystery2099%2FVoxLib/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28562700,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T03:31:16.861Z","status":"ssl_error","status_checked_at":"2026-01-19T03:31:15.069Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","fabric-mod","fabric-mods","fabricmc-mod","fabricmc-mods","library","minecraft-fabric-mod","minecraft-fabric-mods","minecraft-mod"],"created_at":"2024-09-25T20:02:20.019Z","updated_at":"2026-01-19T07:04:13.721Z","avatar_url":"https://github.com/Mystery2099.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VoxLib\n\nA Minecraft Fabric library mod that provides utilities for manipulating, creating, and rotating voxel shapes in your code!\n\n![Minecraft Version](https://img.shields.io/badge/Minecraft-1.19.4-green)\n![Mod Loader](https://img.shields.io/badge/Mod%20Loader-Fabric-blue)\n![Language](https://img.shields.io/badge/Language-Kotlin-purple)\n\n## Features\n\n- **Create** voxel shapes with intuitive syntax\n- **Combine** shapes using operator overloading (`+`) and conditional assembly\n- **Transform** shapes with rotation and flipping utilities\n- **Simplify** your block collision and outline code\n- **Optimize** performance with high-performance caching (using Caffeine) and shape simplification utilities\n- **Debug** shapes with visualization tools\n\n## Getting Started\n\n### Installation\n\nThere are several ways to add VoxLib as a dependency to your project:\n\n#### Option 1: CurseForge Maven (Recommended for Minecraft Mods)\n\nAdd VoxLib as a dependency using CurseForge Maven in your `build.gradle` file:\n\n```gradle\nrepositories {\n    maven {\n        name = \"CurseForge\"\n        url = \"https://cursemaven.com\"\n    }\n}\n\ndependencies {\n    modImplementation \"curse.maven:voxlib-PROJECT_ID:FILE_ID\"\n}\n```\n\nReplace:\n- `PROJECT_ID` with the CurseForge project ID for VoxLib\n- `FILE_ID` with the file ID of the specific version you want to use\n\nYou can find these IDs on the VoxLib CurseForge page under the \"Files\" tab.\n\n#### Option 2: JitPack (Easiest Setup)\n\nJitPack makes it easy to use any GitHub repository as a dependency:\n\n```gradle\nrepositories {\n    maven { url 'https://jitpack.io' }\n}\n\ndependencies {\n    modImplementation 'com.github.Mystery2099:VoxLib:TAG'\n}\n```\n\nReplace `TAG` with a version tag like `v1.4.0` or use `master-SNAPSHOT` for the latest development version.\n\n#### Option 3: GitHub Packages\n\nFor projects that use GitHub Packages:\n\n```gradle\nrepositories {\n    maven {\n        name = \"GitHubPackages\"\n        url = \"https://maven.pkg.github.com/Mystery2099/VoxLib\"\n        credentials {\n            username = project.findProperty(\"gpr.user\") ?: System.getenv(\"GITHUB_ACTOR\")\n            password = project.findProperty(\"gpr.key\") ?: System.getenv(\"GITHUB_TOKEN\")\n        }\n    }\n}\n\ndependencies {\n    modImplementation \"com.github.mystery2099:voxlib:VERSION\"\n}\n```\n\nYou'll need to:\n1. Set `gpr.user` and `gpr.key` in your `~/.gradle/gradle.properties` file, or\n2. Set `GITHUB_ACTOR` and `GITHUB_TOKEN` environment variables\n\nFor more information on GitHub Packages, see [Working with a GitHub Packages Registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry#using-a-published-package)\n\n## Usage Examples\n\n### Creating Shapes\n\n```kotlin\nimport com.github.mystery2099.voxlib.combination.VoxelAssembly.createCuboidShape\n\n// Create a simple cuboid shape (parameters: minX, minY, minZ, maxX, maxY, maxZ)\nval baseShape = createCuboidShape(0, 0, 0, 16, 1, 16) // A slab at the bottom of the block\n```\n\n### Pre-defined Common Shapes\n\n```kotlin\nimport com.github.mystery2099.voxlib.shapes.CommonShapes\n\n// Common pre-defined shapes for quick use\nval slab = CommonShapes.createSlab(8)           // Half-height slab\nval slabTop = CommonShapes.createTopSlab(8)     // Top half slab\nval pillar = CommonShapes.createPillar(6)       // 6-wide centered pillar\nval table = CommonShapes.createTable()          // Default table\nval chair = CommonShapes.createChair()          // Default chair with backrest\nval stairsShape = CommonShapes.createStairs(Direction.NORTH) // Stairs facing north\nval fencePost = CommonShapes.createFencePost()  // Standard fence post\n\n// Fence with connections\nval fenceWithSides = CommonShapes.createFenceConnections(\n    north = true, east = true, south = false, west = false\n)\n```\n\n### Combining Shapes\n\n```kotlin\nimport com.github.mystery2099.voxlib.combination.VoxelAssembly.createCuboidShape\n\n// Create individual shapes\nval base = createCuboidShape(0, 0, 0, 16, 1, 16)  // Bottom slab\nval post = createCuboidShape(7, 1, 7, 9, 15, 9)   // Center post\nval top = createCuboidShape(6, 15, 6, 10, 16, 10) // Top piece\n\n// Combine them using the + operator\nval tableShape = base + post + top\n```\n\n### Conditional Shape Assembly\n\n```kotlin\nimport com.github.mystery2099.voxlib.combination.VoxelAssembly.appendShapes\nimport com.github.mystery2099.voxlib.combination.VoxelAssembly.createCuboidShape\n\nfun createChairShape(hasBackrest: Boolean): VoxelShape {\n    val seat = createCuboidShape(2, 8, 2, 14, 10, 14)  // Seat\n    val legs = createCuboidShape(3, 0, 3, 13, 8, 13)   // Legs\n\n    return seat appendShapes {\n        // Only add backrest if the condition is true\n        createCuboidShape(3, 10, 12, 13, 20, 14) case hasBackrest\n\n        // Always add legs\n        append(legs)\n    }\n}\n```\n\n### Rotating Shapes\n\n```kotlin\nimport com.github.mystery2099.voxlib.rotation.VoxelRotation.rotateLeft\nimport com.github.mystery2099.voxlib.rotation.VoxelRotation.rotateRight\nimport com.github.mystery2099.voxlib.rotation.VoxelRotation.flip\n\n// Create a shape for a directional block\nval northFacingShape = createCuboidShape(5, 0, 0, 11, 16, 8)\n\n// Rotate for different directions\nval eastFacingShape = northFacingShape.rotateRight()\nval southFacingShape = northFacingShape.flip()\nval westFacingShape = northFacingShape.rotateLeft()\n```\n\n### Performance Optimization\n\n```kotlin\nimport com.github.mystery2099.voxlib.combination.VoxelAssembly.createSimplifiedOutlineShape\nimport com.github.mystery2099.voxlib.combination.VoxelAssembly.createOutlineShape\nimport com.github.mystery2099.voxlib.combination.VoxelAssembly.simplifyForOutline\n\n// Create a complex collision shape\nval complexCollisionShape = createComplexShape()\n\n// Create a simplified outline shape for better performance\nval outlineShape = complexCollisionShape.simplifyForOutline(maxBoxes = 8)\n\n// Or create a bounding box shape (even simpler)\nval boundingBoxShape = complexCollisionShape.toBoundingBoxShape()\n\n// Create an efficient hollow outline shape directly\nval efficientOutline = createOutlineShape(\n    minX = 0, minY = 0, minZ = 0,\n    maxX = 16, maxY = 16, maxZ = 16,\n    thickness = 1\n)\n\n// All transformations use Caffeine caching by default for better performance\nval rotatedShape = complexShape.rotateRight() // Uses cache automatically\n\n// Caffeine provides automatic cache eviction and time-based expiration\n// so you don't need to worry about memory leaks\n\n// You can also use the VoxelAssembly utilities for optimized shape operations\nval optimizedUnion = VoxelAssembly.union(shape1, shape2, shape3) // Optimized union operation\n```\n\n### Debug Tools\n\nVoxLib provides debugging utilities to help you visualize and diagnose voxel shapes during development.\n\n**Note:** Some debug tools are client-only. The `@Environment(EnvType.CLIENT)` annotation ensures they only load on the client, preventing server crashes.\n\n#### Client-Side Rendering\n\n```kotlin\nimport com.github.mystery2099.voxlib.debug.VoxelShapeDebug\nimport com.github.mystery2099.voxlib.combination.VoxelAssembly.createCuboidShape\nimport net.minecraft.util.math.BlockPos\nimport java.awt.Color\n\n// Create a shape to debug\nval shape = createCuboidShape(0, 0, 0, 16, 8, 16)\n\n// Render it at a block position (client-side only)\nVoxelShapeDebug.renderShape(\n    matrices,\n    vertexConsumers,\n    shape,\n    BlockPos(x, y, z),\n    color = Color.GREEN,\n    alpha = 0.5f\n)\n```\n\n#### Server-Side Logging\n\nFor debugging on servers or in headless environments:\n\n```kotlin\nimport com.github.mystery2099.voxlib.debug.VoxelShapeDebug\n\n// Log shape information to console\nVoxelShapeDebug.logShapeInfo(shape, \"MyShape\")\n\n// Compare two shapes\nVoxelShapeDebug.compareShapes(shape1, shape2, \"Original\", \"Rotated\")\n```\n\nThese logging functions work on both client and server environments.\n\n## Documentation\n\nFor full documentation of all available utilities, see the KDoc comments in the source code or visit the [GitHub repository](https://github.com/Mystery2099/VoxLib).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmystery2099%2Fvoxlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmystery2099%2Fvoxlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmystery2099%2Fvoxlib/lists"}