private void SetupStencil(bool isBreaking)
{
activeStencil = stencils[stencilIndex];
if (worldManager.creativeMode)
{
activeStencil.Initialize(fillTypeIndex, radiusIndex);
}
else
{
var fillType = 0;
var blocks = BlockManager.Read().blocks;
for (int i = 0; i < blocks.Count; i++)
{
if (isBreaking)
{
fillType = 0;
break;
}
if (uiHotBar.currentItem != null && blocks[i].blockType.ToString() == uiHotBar.currentItem.itemType.ToString())
{
fillType = i;
break;
}
}
activeStencil.Initialize(fillType, radiusIndex);
}
}