separate types for BlockPosition thats chunk relative #113

Open
opened 2026-09-04 17:30:38 +02:00 by thetxt · 1 comment
Owner

At the moment its possible to call a function that expects an input BlockPosition to be relative to the chunk with a BlockPosition containing a global position. This could be a source of bugs, if someone isnt careful.

Utilize the typesystem to distinguish between the two representations, implement functions to convert between the two

Also implement a type for the abomination returned by position.convert_to_coordinates_of_chunk

At the moment its possible to call a function that expects an input BlockPosition to be relative to the chunk with a BlockPosition containing a global position. This could be a source of bugs, if someone isnt careful. Utilize the typesystem to distinguish between the two representations, implement functions to convert between the two Also implement a type for the abomination returned by position.convert_to_coordinates_of_chunk
Author
Owner

maybe also a type for blockpositions in a chunksection, this could have an impl to get the numeric id used in the chunk sections block arrays

maybe also a type for blockpositions in a chunksection, this could have an impl to get the numeric id used in the chunk sections block arrays
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
thetxt/oxide#113
No description provided.