# Terrain(ロブロックス クラス) > 山・水・草原などの地形を表すクラスです。Workspaceの中に1つだけあり、スクリプトで地形を作ることもできます。 - URL:https://roblox.minecraft-okinawa.com/reference/classes/Terrain/ - 公式:https://create.roblox.com/docs/reference/engine/classes/Terrain - 受け継いでいるクラス:BasePart ## プロパティ - `Terrain.Decoration: boolean`:Enables or disables terrain decoration. - `Terrain.GrassLength: float`:Specifies the length of animated grass. - `Terrain.MaterialColors: BinaryString`:Represents the editor for the **Material Color** feature and cannot be edited by scripts. - `Terrain.MaxExtents: Region3int16`:Displays the boundaries of the largest possible editable region. - `Terrain.WaterColor: Color3`:The tint of Terrain water. - `Terrain.WaterReflectance: float`:Controls how opaque Terrain water reflections are. - `Terrain.WaterTransparency: float`:The transparency of Terrain water. - `Terrain.WaterWaveSize: float`:Sets the maximum height of Terrain water waves in studs. - `Terrain.WaterWaveSpeed: float`:Sets how many times Terrain water waves will move up and down per minute. ## メソッド - `Terrain:CellCenterToWorld(x: int, y: int, z: int): Vector3`:Returns the world position of the center of the terrain cell. - `Terrain:CellCornerToWorld(x: int, y: int, z: int): Vector3`:Returns the position of the lower-left-forward corner of the grid cell. - `Terrain:Clear(): ()`:Clears all terrain. - `Terrain:CopyRegion(region: Region3int16): TerrainRegion`:Stores a chunk of terrain into a TerrainRegion object so it can be loaded back later. - `Terrain:CountCells(): int`:Returns the number of non-empty cells in the terrain. - `Terrain:FillBall(center: Vector3, radius: float, material: Material): ()`:球の範囲を、指定した素材の地形で埋めます。 - `Terrain:FillBlock(cframe: CFrame, size: Vector3, material: Material): ()`:直方体の範囲を、指定した素材の地形で埋めます。 - `Terrain:FillCylinder(cframe: CFrame, height: float, radius: float, material: Material): ()`:Fills a cylinder of smooth terrain in a given space. - `Terrain:FillRegion(region: Region3, resolution: float, material: Material): ()`:Fills a Region3 space with smooth terrain. - `Terrain:FillWedge(cframe: CFrame, size: Vector3, material: Material): ()`:Fills a wedge-shaped volume of terrain with the given Material. - `Terrain:GetMaterialColor(material: Material): Color3`:Returns current terrain material color for specified terrain material. - `Terrain:GetMaterialSlot(slotIndex: int): Tuple`:Returns the base material, MaterialVariant, and color configured for a material slot. - `Terrain:PasteRegion(region: TerrainRegion, corner: Vector3int16, pasteEmptyCells: boolean): ()`:Applies a chunk of terrain to the Terrain object. - `Terrain:ReadVoxelChannels(region: Region3, resolution: float, channelIds: Array): Dictionary`:Returns a region of terrain voxel data in table format based on the channel names. - `Terrain:ReadVoxels(region: Region3, resolution: float): Tuple`:Returns a certain region of smooth terrain in table format. - `Terrain:ReplaceMaterial(region: Region3, resolution: float, sourceMaterial: Material, targetMaterial: Material): ()`:Replaces the terrain of a material within a region with another material. - `Terrain:ResetMaterialSlot(slotIndex: int): ()`:Clears a material slot. - `Terrain:SetMaterialColor(material: Material, value: Color3): ()`:Sets current terrain material color for specified terrain material. - `Terrain:SetMaterialSlot(slotIndex: int, baseMaterial: Material, materialVariant: string, color: Color3): ()`:Configures a material slot with a base material, an optional MaterialVariant, and a color. - `Terrain:WorldToCell(position: Vector3): Vector3`:Returns the grid cell location that contains the position point. - `Terrain:WorldToCellPreferEmpty(position: Vector3): Vector3`:Returns the grid cell location that contains the position point, preferring empty grid cells when position is on a grid edge. - `Terrain:WorldToCellPreferSolid(position: Vector3): Vector3`:Returns the grid cell location that contains the point position, preferring non-empty grid cells when position is on a grid edge. - `Terrain:WriteVoxelChannels(region: Region3, resolution: float, channels: Dictionary): ()`:Sets a region of terrain using a dictionary of voxel channel data. - `Terrain:WriteVoxels(region: Region3, resolution: float, materials: Array, occupancy: Array): ()`:Sets a certain region of smooth terrain using table format. 英語の説明とメンバー一覧:Roblox Creator Documentation(CC BY 4.0)。日本語の解説はこのサイト独自のものです。 執筆:鈴木孝昌(現役プロジェクトマネージャー/プログラミング講師)/運営:沖縄マイクラ部 プログラミングスクール「クロスウェーブ」(https://minecraft-okinawa.com/)