use yog_core::{BlockHit, BlockPos, PlacedBlock};
use yog_ids as ids;
use crate::Point;
actions! {
GetBlock { dim: String, pos: BlockPos } -> Option<String> = ids::service_world::GET_BLOCK, "YogWorldActions.getBlock";
SetBlock { dim: String, pos: BlockPos, block: String } -> bool = ids::service_world::SET_BLOCK, "YogWorldActions.setBlock";
Time { dim: String } -> Option<i64> = ids::service_world::TIME, "YogWorldActions.worldTime";
SetTime { dim: String, time: i64 } -> bool = ids::service_world::SET_TIME, "YogWorldActions.worldSetTime";
IsRaining { dim: String } -> bool = ids::service_world::IS_RAINING, "YogWorldActions.worldIsRaining";
SetWeather { dim: String, raining: bool, duration: i32 } -> bool = ids::service_world::SET_WEATHER, "YogWorldActions.worldSetWeather";
IsThundering { dim: String } -> bool = ids::service_world::IS_THUNDERING, "YogWorldActions.worldIsThundering";
SetThunder { dim: String, thundering: bool, duration: i32 } -> bool = ids::service_world::SET_THUNDER, "YogWorldActions.worldSetThunder";
FillRegion { dim: String, from: BlockPos, to: BlockPos, state: String } -> Option<u32> = ids::service_world::FILL_REGION, "YogQueries.fillRegion";
ScanRegion { dim: String, from: BlockPos, to: BlockPos } -> Vec<PlacedBlock> = ids::service_world::SCAN_REGION, "YogQueries.scanRegion";
PlaceFeature { dim: String, pos: BlockPos, feature: String } -> bool = ids::service_world::PLACE_FEATURE, "YogWorldActions.placeFeature";
Explode { dim: String, pos: Point, power: f32, fire: bool, source: String } -> bool = ids::service_world::EXPLODE, "YogWorldActions.explode";
DropLoot { table: String, dim: String, pos: Point } -> bool = ids::service_world::DROP_LOOT, "YogWorldActions.dropLoot";
EntityCount { dim: String, entity_type: String } -> Option<u32> = ids::service_world::ENTITY_COUNT, "YogQueries.worldEntityCount";
EntitiesInBox { dim: String, min: Point, max: Point } -> Vec<String> = ids::service_world::ENTITIES_IN_BOX, "YogQueries.entitiesInBox";
RaycastBlock { dim: String, from: Point, to: Point } -> Option<BlockHit> = ids::service_world::RAYCAST_BLOCK, "YogQueries.raycastBlock";
RaycastEntity { dim: String, from: Point, to: Point, exclude: String } -> Option<String> = ids::service_world::RAYCAST_ENTITY, "YogWorldActions.raycastEntity";
}