[−][src]Struct rna::Extension
Extension Script of MeguScript
Extension
will follow /loot command's path convention.
To refer to creeper
loot table use minecraft:entities/creeper
Examples
let creeper_extend = Extension::get_extension("minecraft:entities/creeper", "resource").unwrap();
If the input string is not a vanilla's path it will panic
let should_panic = Extension::get_extension("this/path/does/not/exists", "resource").unwrap();
Methods
impl Extension
[src]
pub fn new(location: impl Into<PathBuf>) -> Extension
[src]
pub fn get_extension(
value: impl Into<String>,
base_path: impl Into<PathBuf>
) -> Result<Extension, ExtensionError>
[src]
value: impl Into<String>,
base_path: impl Into<PathBuf>
) -> Result<Extension, ExtensionError>
Get extension from given Namespace
Setting up
You need to include the source files for the loot table database yourself.
Which you need to place the file in this order: {base_path}/{prefix}/{suffix}.ult
where prefix
and suffix
refer to Namespace
pub fn compile(
&self,
base_path: impl Into<PathBuf>
) -> Result<MeguScript, ReadError>
[src]
&self,
base_path: impl Into<PathBuf>
) -> Result<MeguScript, ReadError>
Create MeguScript from this Extension
Trait Implementations
impl Clone for Extension
[src]
impl Debug for Extension
[src]
impl Eq for Extension
[src]
impl PartialEq<Extension> for Extension
[src]
impl PartialOrd<Extension> for Extension
[src]
fn partial_cmp(&self, other: &Extension) -> Option<Ordering>
[src]
fn lt(&self, other: &Extension) -> bool
[src]
fn le(&self, other: &Extension) -> bool
[src]
fn gt(&self, other: &Extension) -> bool
[src]
fn ge(&self, other: &Extension) -> bool
[src]
impl StructuralEq for Extension
[src]
impl StructuralPartialEq for Extension
[src]
Auto Trait Implementations
impl RefUnwindSafe for Extension
impl Send for Extension
impl Sync for Extension
impl Unpin for Extension
impl UnwindSafe for Extension
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,