PixelGuys / Cubyz

Voxel sandbox game with a large render distance, procedurally generated content and some cool graphical effects.
GNU General Public License v3.0
436 stars 55 forks source link

Block inventory item textures #345

Closed careeoki closed 3 months ago

careeoki commented 5 months ago

Let blocks declare a 2D item texture for the inventory. Helpful for non-cube blocks like cross models, torches, fences, etc.

IntegratedQuantum commented 3 months ago

Example (oak_fence.json):

{
    "class" : "wood",
    "hardness" : 7,
    "drops" : [
        "auto"
    ],
    "absorbedLight" : 0x202830,
    "rotation" : "fence",
    "model" : "fence",
    "texture" : "cubyz:oak_fence",
    "texture_top" : "cubyz:oak_fence_top",
    "texture_bottom" : "cubyz:oak_fence_top",
    "item": {
        "texture" : "materials/stick.png",
    },
}

The texture needs to be inside the items folder.