This Article is up to date with Custom Stuff 2 CS2

A single slab and its double slab counterpart.

A double slab is two slabs stacked on top of one another to make a single block. This behavior is common in all slabs available in the vanilla game, and can be mimiced by Custom Stuff slabs by using the following attributes:
  • doubleSlabId
  • doubleSlabMeta

These are attributes exclusive to slab-type blocks. An example setup for these attributes is:

doubleSlabId = config.getBlockId("exampleSlabID");

Note that you only need the doubleSlabMeta if the double slab block you're using has a Metadata. In addition, although a slab-type block can only have eight total metadata values (0-7), a double slab is a normal-type block, and thus can have a full 16 metadata values. This means you can use a single block ID for two block IDs worth of slabs.

Setting up a Double Slab

In order to make slabs stack, you must have a "Double Slab" block set up. This block needs to be a different ID since it must have a different type. Usually you'll want this to be a normal type block.

The double slab block should generally use the same texture files as the slab it's from. Textures set up in this way should keep in mind that the sides of a slab block only use the bottom half of the texture index it references. Likewise, a slab placed in the upper half of the block's space will use the top half of a side-facing texture.

The other big thing to consider is how you set up the drop attribute of the double slab block. If you're mimicking the vanilla slabs, you'll want to have these attributes set to drop two of the slab, rather than the double slab itself (which is the default).

Finally, setting up the "pick" attribute to call the Block Id of the Slab, rather than the double slab block. This will help builders who use Creative Mode.

Here is the double slab block code to go with the example shown on the slab page.

id = config.getBlockId("cobaltDoubleSlabID");
name = "cobaltDoubleSlab";
material = "iron";
stepSound = "metal";
creativeTab = "buildingBlocks";
pick[0] = config.getBlockId("cobaltSlabID"); 

displayName[0] = "Cobalt Double Slab";
hardness[0] = 5;
resistance[0] = 30;
drop[0] = config.getBlockId("cobaltSlabID") + ":0 2";
toolClass[0] = "pickaxe";
harvestLevel[0] = 2;
textureFileXP[0] = "cobaltSlab.png";
textureFileXN[0] = "cobaltSlab.png";
textureFileYP[0] = "cobaltBlock.png";
textureFileYN[0] = "cobaltBlock.png";
textureFileZP[0] = "cobaltSlab.png";
textureFileZN[0] = "cobaltSlab.png";
addToCreative[0] = true;

toolClass[8] = "pickaxe";
harvestLevel[8] = 2;

Older Examples and Information for Custom Stuff 1.

Example Double Slab (CS1)

In Custom Stuff 1, you can use the doubleSlabId and DoubleSlabDamage attributes on your slab block file to create a double slab. Here is an example of how those attributes will look:


And here is the accompanying double slab, normal-type block file:


Obsidian slabs using the bottom of the enchanting table for the top and bottom textures.

name="Obsidian Double Slab";

If you're using damagevalues you'll also need to set the doubleslabdamage attribute value in the slab block, and the damagedropped attribute in the double slab block.