valence_world_border
Contains the plugin for working with Minecraft's world border.
To enable world border functionality for a layer, insert the [WorldBorderBundle
] component on the layer entity.
Note that the layer entity must have the [ChunkLayer
] component for this to work.
Example
use bevy_ecs::prelude::*;
use valence_world_border::*;
fn example_system(mut world_borders: Query<(&mut WorldBorderCenter, &mut WorldBorderLerp)>) {
for (mut center, mut lerp) in &mut world_borders {
center.x = 123.0;
center.z = 456.0;
lerp.target_diameter = 100.0;
lerp.current_diameter = 50.0;
lerp.remaining_ticks = 200;
}
}