yog_event/world/
actions.rs1use yog_core::{BlockHit, BlockPos, PlacedBlock};
4use yog_ids as ids;
5
6use crate::Point;
7
8actions! {
9 GetBlock { dim: String, pos: BlockPos } -> Option<String> = ids::service_world::GET_BLOCK, "YogWorldActions.getBlock";
11 SetBlock { dim: String, pos: BlockPos, block: String } -> bool = ids::service_world::SET_BLOCK, "YogWorldActions.setBlock";
13 Time { dim: String } -> Option<i64> = ids::service_world::TIME, "YogWorldActions.worldTime";
15 SetTime { dim: String, time: i64 } -> bool = ids::service_world::SET_TIME, "YogWorldActions.worldSetTime";
17 IsRaining { dim: String } -> bool = ids::service_world::IS_RAINING, "YogWorldActions.worldIsRaining";
19 SetWeather { dim: String, raining: bool, duration: i32 } -> bool = ids::service_world::SET_WEATHER, "YogWorldActions.worldSetWeather";
21 IsThundering { dim: String } -> bool = ids::service_world::IS_THUNDERING, "YogWorldActions.worldIsThundering";
23 SetThunder { dim: String, thundering: bool, duration: i32 } -> bool = ids::service_world::SET_THUNDER, "YogWorldActions.worldSetThunder";
25 FillRegion { dim: String, from: BlockPos, to: BlockPos, state: String } -> Option<u32> = ids::service_world::FILL_REGION, "YogQueries.fillRegion";
27 ScanRegion { dim: String, from: BlockPos, to: BlockPos } -> Vec<PlacedBlock> = ids::service_world::SCAN_REGION, "YogQueries.scanRegion";
29 PlaceFeature { dim: String, pos: BlockPos, feature: String } -> bool = ids::service_world::PLACE_FEATURE, "YogWorldActions.placeFeature";
31 Explode { dim: String, pos: Point, power: f32, fire: bool, source: String } -> bool = ids::service_world::EXPLODE, "YogWorldActions.explode";
33 DropLoot { table: String, dim: String, pos: Point } -> bool = ids::service_world::DROP_LOOT, "YogWorldActions.dropLoot";
35 EntityCount { dim: String, entity_type: String } -> Option<u32> = ids::service_world::ENTITY_COUNT, "YogQueries.worldEntityCount";
37 EntitiesInBox { dim: String, min: Point, max: Point } -> Vec<String> = ids::service_world::ENTITIES_IN_BOX, "YogQueries.entitiesInBox";
39 RaycastBlock { dim: String, from: Point, to: Point } -> Option<BlockHit> = ids::service_world::RAYCAST_BLOCK, "YogQueries.raycastBlock";
41 RaycastEntity { dim: String, from: Point, to: Point, exclude: String } -> Option<String> = ids::service_world::RAYCAST_ENTITY, "YogWorldActions.raycastEntity";
43}