Package cn.nukkit.blockproperty
Class IntBlockProperty
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
ConstructorDescriptionIntBlockProperty
(String name, boolean exportedToItem, int maxValue) IntBlockProperty
(String name, boolean exportedToItem, int maxValue, int minValue) IntBlockProperty
(String name, boolean exportedToItem, int maxValue, int minValue, int bitSize) IntBlockProperty
(String name, boolean exportedToItem, int maxValue, int minValue, int bitSize, String persistenceName) -
Method Summary
Modifier and TypeMethodDescriptionint
clamp
(int value) copy()
exportingToItems
(boolean exportedToItem) int
int
getIntValueForMeta
(int meta) int
int
getMetaForPersistenceValue
(String persistenceValue) int
getMetaForValue
(int value) int
getMetaForValue
(Integer value) int
getPersistenceValueForMeta
(int meta) getValueForMeta
(int meta) boolean
isDefaultIntValue
(int value) boolean
isDefaultValue
(Integer value) protected void
validateDirectly
(Integer value) protected void
validateMetaDirectly
(int meta) Methods inherited from class cn.nukkit.blockproperty.BlockProperty
getBitSize, getDefaultBooleanValue, getIntValue, getIntValue, getIntValue, getMetaFromBigInt, getMetaFromInt, getMetaFromLong, getName, getPersistenceName, getPersistenceValue, getPersistenceValue, getPersistenceValue, getValue, getValue, getValue, isDefaultBooleanValue, isDefaultPersistentValue, isExportedToItem, setValue, setValue, setValue, toString, validateMeta, validateMeta, validateMeta
-
Constructor Details
-
IntBlockProperty
@PowerNukkitOnly @Since("1.4.0.0-PN") public IntBlockProperty(String name, boolean exportedToItem, int maxValue, int minValue, int bitSize, String persistenceName) -
IntBlockProperty
@PowerNukkitOnly @Since("1.4.0.0-PN") public IntBlockProperty(String name, boolean exportedToItem, int maxValue, int minValue, int bitSize) -
IntBlockProperty
@PowerNukkitOnly @Since("1.4.0.0-PN") public IntBlockProperty(String name, boolean exportedToItem, int maxValue, int minValue) -
IntBlockProperty
@PowerNukkitOnly @Since("1.4.0.0-PN") public IntBlockProperty(String name, boolean exportedToItem, int maxValue)
-
-
Method Details
-
copy
- Specified by:
copy
in classBlockProperty<Integer>
-
exportingToItems
@Since("1.4.0.0-PN") @PowerNukkitOnly public IntBlockProperty exportingToItems(boolean exportedToItem) - Specified by:
exportingToItems
in classBlockProperty<Integer>
-
getMetaForValue
- Specified by:
getMetaForValue
in classBlockProperty<Integer>
-
getMetaForValue
-
getValueForMeta
- Specified by:
getValueForMeta
in classBlockProperty<Integer>
-
getIntValueForMeta
- Specified by:
getIntValueForMeta
in classBlockProperty<Integer>
-
getPersistenceValueForMeta
- Specified by:
getPersistenceValueForMeta
in classBlockProperty<Integer>
-
getMetaForPersistenceValue
@Since("1.4.0.0-PN") @PowerNukkitOnly public int getMetaForPersistenceValue(@Nonnull String persistenceValue) - Specified by:
getMetaForPersistenceValue
in classBlockProperty<Integer>
-
validateDirectly
- Overrides:
validateDirectly
in classBlockProperty<Integer>
-
validateMetaDirectly
- Specified by:
validateMetaDirectly
in classBlockProperty<Integer>
-
clamp
-
getMaxValue
-
getMinValue
-
getDefaultValue
- Specified by:
getDefaultValue
in classBlockProperty<Integer>
-
isDefaultIntValue
- Overrides:
isDefaultIntValue
in classBlockProperty<Integer>
-
getDefaultIntValue
- Overrides:
getDefaultIntValue
in classBlockProperty<Integer>
-
isDefaultValue
- Specified by:
isDefaultValue
in classBlockProperty<Integer>
-
getValueClass
- Specified by:
getValueClass
in classBlockProperty<Integer>
-