Raytrace 'block modes' explained

Started by SnailsAttack on

Topic category: User side tutorials

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Raytrace 'block modes' explained
Wed, 04/02/2025 - 14:31 (edited)

MCreator's block raytracing procedure blocks come with three 'block modes', internally referred to as 'clip contexts'.

The three modes can be explained as follows:

'Outline' - Intersects with the hitbox (aka bounding box) of any block, regardless of whether or not it's solid. Examples of blocks that occlude this mode of raytracing include every (non-fluid) block, such as stone, slabs, torches, fence gates (closed or open) and glass (stained glass, panes, tinted glass, etc.).

'Visual' - Examples of blocks that occlude this mode of raytracing include stone, slabs and closed fence gates (but not open fence gates). Not occluded by any type of glass, although it is occluded by ice despite its similarity to stained glass.

'Collider' - Similar to 'visual' except it's occluded by all types of glass, and not occluded by the non-colliding portion of 'non-full' blocks (e.g. the uppermost 1/8th of soul sand).


A block's 'hitbox' is identical to the selection / outline box which is shown when the player looks at a block.

'Non-full' blocks include soul sand, snow layers, mud, and a few other blocks that have collision boxes which don't match their selection box.

What counts as a block is defined by the size of their hitbox, not their model or texture; for instance the raytrace targeting cannot go through the 'empty' spaces in a row of fences or the transparent pixels of glass blocks.

Edited by SnailsAttack on Wed, 04/02/2025 - 14:31