#[repr(u32)]pub enum SensorKind {
Show 26 variants
Dummy = 0,
NearestItems = 1,
NearestLivingEntities = 2,
NearestPlayers = 3,
NearestBed = 4,
HurtBy = 5,
VillagerHostiles = 6,
VillagerBabies = 7,
SecondaryPois = 8,
GolemDetected = 9,
ArmadilloScareDetected = 10,
PiglinSpecificSensor = 11,
PiglinBruteSpecificSensor = 12,
HoglinSpecificSensor = 13,
NearestAdult = 14,
AxolotlAttackables = 15,
AxolotlTemptations = 16,
GoatTemptations = 17,
FrogTemptations = 18,
CamelTemptations = 19,
ArmadilloTemptations = 20,
FrogAttackables = 21,
IsInWater = 22,
WardenEntitySensor = 23,
SnifferTemptations = 24,
BreezeAttackEntitySensor = 25,
}
Variants§
Dummy = 0
NearestItems = 1
NearestLivingEntities = 2
NearestPlayers = 3
NearestBed = 4
HurtBy = 5
VillagerHostiles = 6
VillagerBabies = 7
SecondaryPois = 8
GolemDetected = 9
ArmadilloScareDetected = 10
PiglinSpecificSensor = 11
PiglinBruteSpecificSensor = 12
HoglinSpecificSensor = 13
NearestAdult = 14
AxolotlAttackables = 15
AxolotlTemptations = 16
GoatTemptations = 17
FrogTemptations = 18
CamelTemptations = 19
ArmadilloTemptations = 20
FrogAttackables = 21
IsInWater = 22
WardenEntitySensor = 23
SnifferTemptations = 24
BreezeAttackEntitySensor = 25
Implementations§
Source§impl SensorKind
impl SensorKind
pub fn read_from_id( buf: &mut Cursor<&[u8]>, id: u32, ) -> Result<Self, BufReadError>
Source§impl SensorKind
impl SensorKind
Sourcepub unsafe fn from_u32_unchecked(id: u32) -> Self
pub unsafe fn from_u32_unchecked(id: u32) -> Self
pub fn is_valid_id(id: u32) -> bool
Trait Implementations§
Source§impl Clone for SensorKind
impl Clone for SensorKind
Source§fn clone(&self) -> SensorKind
fn clone(&self) -> SensorKind
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SensorKind
impl Debug for SensorKind
Source§impl<'de> Deserialize<'de> for SensorKind
impl<'de> Deserialize<'de> for SensorKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for SensorKind
impl Display for SensorKind
Source§impl FromNbtTag for SensorKind
impl FromNbtTag for SensorKind
fn from_nbt_tag(tag: NbtTag<'_, '_>) -> Option<Self>
fn from_optional_nbt_tag( tag: Option<NbtTag<'_, '_>>, ) -> Result<Option<Self>, DeserializeError>
Source§impl FromStr for SensorKind
impl FromStr for SensorKind
Source§impl Hash for SensorKind
impl Hash for SensorKind
Source§impl McBufReadable for SensorKind
impl McBufReadable for SensorKind
Source§impl McBufWritable for SensorKind
impl McBufWritable for SensorKind
Source§impl PartialEq for SensorKind
impl PartialEq for SensorKind
Source§impl Registry for SensorKind
impl Registry for SensorKind
Source§impl Serialize for SensorKind
impl Serialize for SensorKind
Source§impl ToNbtTag for SensorKind
impl ToNbtTag for SensorKind
fn to_nbt_tag(self) -> NbtTag
fn to_optional_nbt_tag(self) -> Option<NbtTag>
Source§impl TryFrom<u32> for SensorKind
impl TryFrom<u32> for SensorKind
impl Copy for SensorKind
impl Eq for SensorKind
impl StructuralPartialEq for SensorKind
Auto Trait Implementations§
impl Freeze for SensorKind
impl RefUnwindSafe for SensorKind
impl Send for SensorKind
impl Sync for SensorKind
impl Unpin for SensorKind
impl UnwindSafe for SensorKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)