How to place half-block slabs in Minecraft with MakeCode

672 Views Asked by At

This is a bit of a long-shot. I really don't know where to ask this question.

I've been trying out CodeConnection + MakeCode with Minecraft and I haven't been able to figure out if there is correct way to place half-slabs at 0.5 step y axes increments.

I tried using a line between 2 points, but it left gaps between each slab.

If I try moving up 0.5, then it rounds it up to 1, and again leaves gaps.

It appears that all of the builder functions seem operate at a resolution of 1 block. However in-game I can obviously place slabs in 0.5 block increments to make stairs etc.

1

There are 1 best solutions below

2
On BEST ANSWER

Blocks only exist at integer coordinates. Half slabs that exist in the top half of their space are still at a full integer coordinate. They just have a BlockState value of bottom=top (or top_slot_bit=true on Bedrock, represented by the integer value 8 as a bitflag, eg: 0b1... where the . bits are the integer representation of what type of slab (wood, stone, quartz...)).

What you're looking for is this widget, under Blocks:

MakeCode data values

You can set the block and then an integer representation of the desired data value (see the wiki on data values) in the numerical slot. This widget can then be dragged into the (block) portion of any block widget:

Complete widget

You'll probably have to some variable fiddling to get the data value to swap back and forth as you need it to, but that should solve the hurdle you've been facing.