5

I'm trying to make a texture for connected stone slabs (no, not the double stone slabs that would be seamless). I'm talking placing two slabs next to each other, and the light gray being carried across, and only using the dark gray as a border, similar to the way logs do.

My question is: how can I do this? I know it has to do with a file in the texture pack, but have no idea what file it is, or how to do this.

Any help would be greatly appreciated.

12
  • I have used resource packs, and I don't believe you can do this. You'd have to change how the textures work for slabs, in which would be rather difficult. Jul 13, 2017 at 20:37
  • @TheMattbat999 I'm fairly certain it can be done, because blocks like connected glass, wood, and others do exist.
    – David
    Jul 13, 2017 at 20:55
  • 1
    And so much more with Microsoft now owning Minecraft. Heard they're bringing it to 4K ;3 @finnrayment
    – David
    Jul 15, 2017 at 7:18
  • 1
    I hope they migrate to C++... As of 1.12 for PC, Java is still the only supported version across all OS-es @finnrayment
    – David
    Jul 15, 2017 at 7:57
  • 1
    @David As a programmer of both (or though I'm useless in C++) It's a shame to see them leave Java, it's much easier to deal with cross-platform natives rather than dealing with multi-os binaries. Still, atleast it will run better ;)
    – user129374
    Jul 15, 2017 at 8:00

2 Answers 2

4

This looks like a job for Superman Connected Textures Mod (CTM), which is included in OptiFine. If you haven't already, go ahead and download the latest version of OptiFine before you continue reading this.

In order for this mod to work, you'll have to create three .properties files; one for the side texture, another one for the top texture and one for the bottom texture. The names of the files doesn't really matter, but it's good to know what the different files are used for.

Edited for 1.15.2:

smooth_stone_slab_side.properties

matchBlocks=smooth_stone_slab smooth_stone
method=horizontal
tiles=100-103
connect=block
faces=sides

smooth_stone_slab_top.properties

matchBlocks=smooth_stone_slab smooth_stone
method=ctm_compact
tiles=104-108
faces=top

smooth_stone_slab_bottom.properties

matchBlocks=smooth_stone_slab smooth_stone
method=ctm_compact
tiles=104-108
faces=bottom

After that we need to add textures for the connecting slabs but since I don't know how many images I can add to this answer, I've decided to merge all textures as one image so you'll have to split them up in nine 16×16px PNG images yourself. Make sure to name them according to the table below in order to make everything work out.

100.png | 101.png | 102.png

103.png | 104.png | 105.png

106.png | 107.png | 108.png

Sprite of all stone slab textures

Now we have to create a resource pack and add some folders where all these files and images should be. In the resource pack, open the assets and minecraft folders, then you have to create a new folder called optifine. Inside this new folder, create another folder named ctm. And inside this folder, you must create yet another folder which you name default.

Add the .properties files and images to the default folder. If done correctly, you should have this folder structure:

| assets/
| - minecraft/
| -- optifine/
| --- ctm/
| ---- default/

When you start Minecraft, go to Options -> Video Settings -> Quality and set Connected Textures to either Fast or Fancy and apply your newly created resource pack. When you are done, it should look like this:

Image depicting the wonders of CTM

Have fun!

Edit: Added a .properties file for the bottom texture of the slabs.
Edit 2: Added the metadata parameter for the files so the texture is only applied to top and bottom stone slabs.

20
  • All of my slabs are now a pale white - link - what went wrong?
    – David
    Jul 15, 2017 at 20:19
  • @David I've been trying to reproduce your result without any success - it looks good on my end. I see that you are using Faithful, so I've created textures for Faithful here. Can you replace your images and try it out to check if there is any difference? Also, I noticed that I missed to add a file to provide a connected bottom texture for the slabs.
    – Spitz
    Jul 15, 2017 at 22:59
  • Would any of this be changed by me using 1.10.2?
    – David
    Jul 15, 2017 at 23:30
  • @David Maybe, maybe not. Can you use 1.12 to check if it works?
    – Spitz
    Jul 15, 2017 at 23:39
  • Same thing is happening in 1.12...
    – David
    Jul 15, 2017 at 23:49
2

matchblocks was changed somewhat recently in optifine -- instead of matchBlocks=44 it should be matchBlocks=stone_slab or alternatively minecraft:stone_slab see this demo file for details https://github.com/sp614x/optifine/blob/master/OptiFineDoc/doc/ctm.properties

3
  • You are talking about The Flattening, which happened in 1.13 and affected vanilla Minecraft, not only OptiFine.
    – Spitz
    Feb 23, 2019 at 0:01
  • You’re right, I’m sorry to have forgotten the 1.13 caveat — however, the flattening also seems like affects optifine — or maybe block ids still works as well? Pretty sure I’ve seen people complains that they had to change to block names for optifine CTM as well Feb 24, 2019 at 1:52
  • No need to apologize. As far as I know, numerical block ids doesn't work at all in OptiFine 1.13+, since I had to change all .properties files for my CTM resource pack. Speaking of changes, minecraft:stone_slab will be renamed to smooth_stone_slab‌ in 1.14.
    – Spitz
    Feb 24, 2019 at 15:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .