feather-rs / feather

A Minecraft server implementation in Rust
Apache License 2.0
2.58k stars 143 forks source link

Add `ValidatedBlockPosition` #483

Closed ambeeeeee closed 2 years ago

ambeeeeee commented 2 years ago

Add ValidatedBlockPosition

Status

Description

Adds ValidatedBlockPosition which checks if a block position is valid in order to increase runtime safety. I've updated all internal code to use this type where applicable,

Relevant Issues

Closes #476

Checklist

ambeeeeee commented 2 years ago

It should be noted for future development involving BlockPosition, Plugins should likely never be allowed to have anything to do with ValidBlockPosition because they could maliciously inject invalid data.