Java Code Examples for net.minecraft.block.properties.PropertyEnum#create()
The following examples show how to use
net.minecraft.block.properties.PropertyEnum#create() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StoneBlock.java From GregTech with GNU Lesser General Public License v3.0 | 5 votes |
@Override protected BlockStateContainer createBlockState() { Class<T> enumClass = GTUtility.getActualTypeParameter(getClass(), StoneBlock.class, 0); this.VARIANT = PropertyEnum.create("variant", enumClass); this.VALUES = enumClass.getEnumConstants(); return new BlockStateContainer(this, VARIANT, CHISELING_VARIANT); }
Example 2
Source File: VariantBlock.java From GregTech with GNU Lesser General Public License v3.0 | 5 votes |
@Override protected BlockStateContainer createBlockState() { Class<T> enumClass = GTUtility.getActualTypeParameter(getClass(), VariantBlock.class, 0); this.VARIANT = PropertyEnum.create("variant", enumClass); this.VALUES = enumClass.getEnumConstants(); return new BlockStateContainer(this, VARIANT); }
Example 3
Source File: BlockHelper.java From customstuff4 with GNU General Public License v3.0 | 4 votes |
private static PropertyEnum<EnumSubtype> createSubtypeProperty(IntArray subtypes) { return PropertyEnum.create("subtype", EnumSubtype.class, EnumSubtype.getValues(subtypes.array)); }