/// Removes the tile at the given coordinate
///
/// This method is preferred over handling the removal manually as it will also account for
/// any Auto Tiles and handle their removal accordingly.
///
/// # Arguments
///
/// * `pos`: The tile position
/// * `map_id`: The tile map
/// * `layer_id`: The layer within the tile map
///
Removes the tile at the given coordinate
This method is preferred over handling the removal manually as it will also account for
any Auto Tiles and handle their removal accordingly.
Removes the tile at the given coordinate This method is preferred over handling the removal manually as it will also account for any Auto Tiles and handle their removal accordingly .
pub fn remove<Pos: Into<TilePos>, MId: MapId>(
		&mut self,
		pos: Pos,
		map_id: MId,
		layer_id: u16,
	) -> Result<(), TilePlacementError> {
		let pos = pos.into();
		#[cfg(feature = "auto-tile")]
		{
			// Get the current tile entity
			let entity = self
				.map_query
				.get_tile_entity(pos, map_id, layer_id)
				.map_err(|err| TilePlacementError::MapError(err))?;
			// Attempt to remove the auto tile
			self.try_remove_auto_tile(entity);
		}
		// Despawn the tile and notify the chunk
		self.map_query
			.despawn_tile(&mut self.commands, pos, map_id, layer_id)
			.map_err(|err| TilePlacementError::MapError(err))?;
		self.map_query.notify_chunk_for_tile(pos, map_id, layer_id);
		Ok(())
	}
pub fn remove < Pos : Into < TilePos > , MId : MapId > ( & mut self , pos : Pos , map_id : MId , layer_id : u16 , ) -> Result < ( ) , TilePlacementError > { let pos = pos . into ( ) ; # [ cfg ( feature " " ) ] { // Get the current tile entity let entity = self . map_query . get_tile_entity ( pos , map_id , layer_id ) . map_err ( | err | TilePlacementError :: MapError ( err ) ) ? ; // Attempt to remove the auto tile self . try_remove_auto_tile ( entity ) ; } // Despawn the tile and notify the chunk self . map_query . despawn_tile ( & mut self . commands , pos , map_id , layer_id ) . map_err ( | err | TilePlacementError :: MapError ( err ) ) ? ; self . map_query . notify_chunk_for_tile ( pos , map_id , layer_id ) ; Ok ( ( ) ) }
Removes the tile at the given coordinate
This method is preferred over handling the removal manually as it will also account for
any Auto Tiles and handle their removal accordingly.
Removes the tile at the given coordinate This method is preferred over handling the removal manually as it will also account for any Auto Tiles and handle their removal accordingly .
&mut self
pos
Pos
map_id
MId
layer_id
u16