Data Packs Block

Combine Slabs

  • 2.5k views 2 today
  • save_alt 565 downloads
Compatibility
Minecraft 1.21
Changes include
  • Functions
  • 22
  • 22
  • 9
xerneas02
Lvl 52Grandmaster Blob Necromancer
30

🧱 Combine Slabs | Stack any slab on any slab



Hold a slab, click another slab, and watch them stack. No commands. No setup. Just click and build. ✨

Works in singleplayer and on servers. No resource pack required. Made for 1.21.8.




🔬 How It Works



When you aim at a slab while holding another slab, the pack spawns an interaction entity to detect your click.

On click, it removes that helper and summons a block display that shows your held slab on the opposite half.
The pack removes one slab from your inventory in Survival.
Includes simple checks to avoid duplicates and clean up visuals if the base slab changes.




⚠️ Notes & Limitations


The stacked slab is a display entity. It is visual only and do not have a hitbox or collision.
Performance is usually great with display entities, but spawning thousands can still cause lag on some clients or servers. 🐌



💬 Feedback Welcome



I’d love to hear what you think. Questions, bug reports, ideas for improvements, drop a comment on this page and I’ll read it. Your feedback helps make the pack better for everyone. ❤️

1 Update Logs

Made it slightly more lag friendly : by xerneas02 09/17/2025 7:00:24 pmSeptember 17, 2025 @ 11:00 pm UTC

Reduce a bit the number of command

More like this

  Have something to say?

TigeressTail
10/18/2025 9:55 am
Level 9 : Apprentice Dragon
they only sit the one way though? you can't stand them up???
1
xerneas02
10/20/2025 3:29 pm
Level 52 : Grandmaster Blob Necromancer
I am sorry i am not sure i understand what you are trying to say
1
Dermugettum
09/24/2025 12:24 am
Level 26 : Expert Miner
Cool idea!

I bet you could make these interactable (have a hit box) by making the action convert the original slab into a double slab. Then, the item display for the second slab could be scaled at 1.001 so that it's barely larger than the actual block, so that it doesn't have any texture fighting issues. Then add a tick function that updates the item display's brightness levels so that it's not all black from being inside a solid block.

I've been trying to make some custom blocks in a data pack, and I've been using these techniques to make ones that actually have hitboxes/collisions.
1
xerneas02
09/30/2025 4:03 pm
Level 52 : Grandmaster Blob Necromancer
That might be a good idea i will try it but wouldn't that cause some z fighting when there is 2 blocks next to each other ?
2
Dermugettum
10/01/2025 1:25 am
Level 26 : Expert Miner
Yeah, you might encounter that at first. What I've done with my displays posing as non-solid blocks is tweak one of them with the /data modify command until I get the scale just right. The values may end up at 1.001 or even 1.00001, but the point is that they won't be exactly the same size as an actual slab, but you wouldn't even notice any overlap with an adjacent block texture unless you looked real close at the pixels.
1
tollcraft
09/18/2025 2:10 am
He/Him • Level 50 : Grandmaster Steve Demolitionist
So op
2
09/17/2025 7:57 pm
This reply was removed by the poster or a moderator.
tollcraft
09/18/2025 2:10 am
He/Him • Level 50 : Grandmaster Steve Demolitionist
Not so creative self advertising =\
1
CalDoesStuff
09/01/2025 7:41 pm
He/Him • Level 12 : Journeyman Toast Mage
Very creative use of display entities!
2
xerneas02
09/08/2025 4:12 pm
Level 52 : Grandmaster Blob Necromancer
Thanks 😄
2

Welcome