Module facedirutil
Various functions and constants for working with the facedir value.
NEGATIVE_X |
Attached to the node in the negative x direction. |
NEGATIVE_Z |
Attached to the node in the negative z direction. |
POSITIVE_X |
Attached to the node in the positive x direction. |
POSITIVE_Z |
Attached to the node in the positive z direction. |
Functions
-
create_after_node_placed_upsidedown_handler (pseudo_mirroring, needed_pitch)
-
Creates a handler for the after_node_place callback which turns the placed
node upside down if the placer was looking at underside of another node or
if the placer looks upwards.
Parameters:
- pseudo_mirroring
Optional. If pseudo mirroring should be performed,
defaults to false.
- needed_pitch
Optional. The needed pitch to turn the node upside down,
defaults to 0.45.
Returns:
The handler for the after_node_place callback.
-
get_vector (id)
-
Gets the vector for the given ID.
Parameters:
- id
The ID for which to get the vector.
Returns:
The vector for the given ID.
-
to_wallmounted (facedir_id)
-
Gets the corresponding wallmounted value for the given facedir value.
Parameters:
- facedir_id
The facedir value/ID.
Returns:
The wallmounted value/ID.
-
upsidedown (facedir, pseudo_mirroring)
-
Gets the facedir for the given rotation as upside down.
Parameters:
- facedir
The facedir value.
- pseudo_mirroring
Optional. Performs rotations to imitate mirroring
of the node, defaults to false.
Returns:
The facedir value upside down.
Tables
-
NEGATIVE_X_VECTOR
-
The vector for the negative x direction.
Fields:
-
NEGATIVE_Z_VECTOR
-
The vector for the negative z direction.
Fields:
-
POSITIVE_X_VECTOR
-
The vector for the positive x direction.
Fields:
-
POSITIVE_Z_VECTOR
-
The vector for the positive z direction.
Fields:
Fields
-
NEGATIVE_X
-
Attached to the node in the negative x direction.
-
NEGATIVE_Z
-
Attached to the node in the negative z direction.
-
POSITIVE_X
-
Attached to the node in the positive x direction.
-
POSITIVE_Z
-
Attached to the node in the positive z direction.