Package cn.nukkit.blockproperty
Class ArrayBlockProperty<E extends Serializable>
java.lang.Object
cn.nukkit.blockproperty.BlockProperty<E>
cn.nukkit.blockproperty.ArrayBlockProperty<E>
- All Implemented Interfaces:
Serializable
@PowerNukkitOnly
@Since("1.4.0.0-PN")
@ParametersAreNonnullByDefault
public final class ArrayBlockProperty<E extends Serializable>
extends BlockProperty<E>
- See Also:
-
Constructor Summary
ConstructorDescriptionArrayBlockProperty
(String name, boolean exportedToItem, E[] universe) ArrayBlockProperty
(String name, boolean exportedToItem, E[] universe, int bitSize) ArrayBlockProperty
(String name, boolean exportedToItem, E[] universe, int bitSize, String persistenceName) ArrayBlockProperty
(String name, boolean exportedToItem, E[] universe, int bitSize, String persistenceName, boolean ordinal) ArrayBlockProperty
(String name, boolean exportedToItem, E[] universe, int bitSize, String persistenceName, boolean ordinal, String[] persistenceNames) ArrayBlockProperty
(String name, boolean exportedToItem, Class<E> enumClass) -
Method Summary
Modifier and TypeMethodDescriptioncopy()
exportingToItems
(boolean exportedToItem) int
getIntValueForMeta
(int meta) int
getMetaForPersistenceValue
(String persistenceValue) int
getMetaForValue
(E value) getPersistenceValueForMeta
(int meta) E[]
getValueForMeta
(int meta) boolean
isDefaultValue
(E value) boolean
ordinal
(boolean ordinal) protected void
validateDirectly
(E value) protected void
validateMetaDirectly
(int meta) Methods inherited from class cn.nukkit.blockproperty.BlockProperty
getBitSize, getDefaultBooleanValue, getDefaultIntValue, getIntValue, getIntValue, getIntValue, getMetaFromBigInt, getMetaFromInt, getMetaFromLong, getName, getPersistenceName, getPersistenceValue, getPersistenceValue, getPersistenceValue, getValue, getValue, getValue, isDefaultBooleanValue, isDefaultIntValue, isDefaultPersistentValue, isExportedToItem, setValue, setValue, setValue, toString, validateMeta, validateMeta, validateMeta
-
Constructor Details
-
ArrayBlockProperty
@PowerNukkitOnly @Since("1.4.0.0-PN") public ArrayBlockProperty(String name, boolean exportedToItem, E[] universe, int bitSize, String persistenceName) -
ArrayBlockProperty
@PowerNukkitOnly @Since("1.4.0.0-PN") public ArrayBlockProperty(String name, boolean exportedToItem, E[] universe, int bitSize, String persistenceName, boolean ordinal) -
ArrayBlockProperty
-
ArrayBlockProperty
@PowerNukkitOnly @Since("1.4.0.0-PN") public ArrayBlockProperty(String name, boolean exportedToItem, E[] universe, int bitSize) -
ArrayBlockProperty
@PowerNukkitOnly @Since("1.4.0.0-PN") public ArrayBlockProperty(String name, boolean exportedToItem, E[] universe) -
ArrayBlockProperty
@PowerNukkitOnly @Since("1.4.0.0-PN") public ArrayBlockProperty(String name, boolean exportedToItem, Class<E> enumClass)
-
-
Method Details
-
copy
- Specified by:
copy
in classBlockProperty<E extends Serializable>
-
exportingToItems
@Since("1.4.0.0-PN") @PowerNukkitOnly public ArrayBlockProperty<E> exportingToItems(boolean exportedToItem) - Specified by:
exportingToItems
in classBlockProperty<E extends Serializable>
-
ordinal
-
getMetaForValue
- Specified by:
getMetaForValue
in classBlockProperty<E extends Serializable>
-
getValueForMeta
- Specified by:
getValueForMeta
in classBlockProperty<E extends Serializable>
-
getIntValueForMeta
- Specified by:
getIntValueForMeta
in classBlockProperty<E extends Serializable>
-
getPersistenceValueForMeta
- Specified by:
getPersistenceValueForMeta
in classBlockProperty<E extends Serializable>
-
getMetaForPersistenceValue
@Since("1.4.0.0-PN") @PowerNukkitOnly public int getMetaForPersistenceValue(String persistenceValue) - Specified by:
getMetaForPersistenceValue
in classBlockProperty<E extends Serializable>
-
validateDirectly
- Overrides:
validateDirectly
in classBlockProperty<E extends Serializable>
-
validateMetaDirectly
- Specified by:
validateMetaDirectly
in classBlockProperty<E extends Serializable>
-
getValueClass
- Specified by:
getValueClass
in classBlockProperty<E extends Serializable>
-
getUniverse
-
isOrdinal
-
getDefaultValue
- Specified by:
getDefaultValue
in classBlockProperty<E extends Serializable>
-
isDefaultValue
- Specified by:
isDefaultValue
in classBlockProperty<E extends Serializable>
-