1

I'm currently working on a resource pack for 1.17 and I wanted to add custom textures for the lapis block, however when I tried to do that, it gives me an error block instead.

How do I add custom textures for mostly every side of a block while allowing them to be rotated so the front can face where I place it? Do I need to use a datapack or something, or can it just be done in a resource pack?

The texture names (all .png) are:

  • lapis_block_top

  • lapis_block_bottom

  • lapis_block_side

  • lapis_block_front

And the code I wrote for it is:

{
  "parent": "minecraft:block/orientable",
  "display": {
    "firstperson_righthand": {
      "rotation": [ 0, 135, 0 ],
      "translation": [ 0, 0, 0 ],
      "scale": [ 0.40, 0.40, 0.40 ]
    }
  },
  "textures": {
    "top": "minecraft:block/lapis_block_top",
    "bottom": "minecraft:block/lapis_block_bottom",
    "side": "minecraft:block/Lapis_block_side",
    "front": "minecraft:block/Lapis_block_front"
  }
}
4
  • are you certain the filenames are Lapis_block_side not lapis_block_side? files are particular about capitalization
    – Corsaka
    Commented Aug 22, 2022 at 8:44
  • Nope, i changed it to what you recommended and now the texture appears, but it faces north instead of towards the player. i just want it to act like the smoker texture but without the furnace part. Commented Aug 23, 2022 at 21:58
  • can you copy the smoker code and replace it with specific lapis ones?
    – Corsaka
    Commented Aug 24, 2022 at 10:28
  • i did that but it still doesn't face towards me, maybe it has to do with blockstates or something. Commented Aug 24, 2022 at 12:32

1 Answer 1

1

Lapis blocks dont have a "front". Unlike smokers, they are not directional. So unfortunately, it would be impossible to give them a texture only on one side.

The only workaround I can think of would be to use another block that is directional like the smoker (but it has a UI), so the only other blocks I can think of right now that doesn't would be the piston or observer? You could give it custom textures on the side facing you, and could change the recipe as well to that of a lapis block using a datapack. Of course, it would still behave like a piston if powered with redstone but that could work.

EDIT: It apparently is possible to have a texture only on one side of the block using models, but if the block is not directional, it will always be the same one (like jukeboxes top texture for example)

4
  • Maybe logs? Using a particularly uncommon log could be a good way to retexture something.
    – Corsaka
    Commented Aug 30, 2022 at 10:06
  • Logs only have a "top" and a "side" not a "face" dependant on how you place it, but like I said it is still possible to have a texture on one side, it will just always be on the north side for example
    – Aceplante
    Commented Aug 30, 2022 at 22:02
  • Right, but don't they go a certain direction based on how you place them? @Aceplante
    – Corsaka
    Commented Sep 2, 2022 at 9:24
  • Only if they are directional_with_face, like furnaces etc. If they aren't directional by default, I think you still can but the face will always be in one cardinal direction like the top of jukeboxes for example
    – Aceplante
    Commented Sep 2, 2022 at 15:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.