Java Code Examples for net.minecraft.block.properties.IProperty#getName()
The following examples show how to use
net.minecraft.block.properties.IProperty#getName() .
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: State.java From OpenModsLib with MIT License | 5 votes |
@SuppressWarnings("unchecked") private static <T extends Comparable<T>> Function<Map.Entry<IProperty<?>, Comparable<?>>, String> createConverter() { return entry -> { final IProperty<T> property = (IProperty<T>)entry.getKey(); final T value = (T)entry.getValue(); return property.getName() + "=" + property.getName(value); }; }
Example 2
Source File: MetaBlocks.java From GregTech with GNU Lesser General Public License v3.0 | 4 votes |
@SuppressWarnings("unchecked") private static <T extends Comparable<T>> String getPropertyName(IProperty<T> property, Comparable<?> value) { return property.getName((T) value); }