本文整理汇总了Java中net.minecraft.block.properties.IProperty.getName方法的典型用法代码示例。如果您正苦于以下问题:Java IProperty.getName方法的具体用法?Java IProperty.getName怎么用?Java IProperty.getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.block.properties.IProperty
的用法示例。
在下文中一共展示了IProperty.getName方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: validateProperty
import net.minecraft.block.properties.IProperty; //导入方法依赖的package包/类
public static <T extends Comparable<T>> String validateProperty(Block block, IProperty<T> property)
{
String s = property.getName();
if (!NAME_PATTERN.matcher(s).matches())
{
throw new IllegalArgumentException("Block: " + block.getClass() + " has invalidly named property: " + s);
}
else
{
for (T t : property.getAllowedValues())
{
String s1 = property.getName(t);
if (!NAME_PATTERN.matcher(s1).matches())
{
throw new IllegalArgumentException("Block: " + block.getClass() + " has property: " + s + " with invalidly named value: " + s1);
}
}
return s;
}
}
示例2: apply
import net.minecraft.block.properties.IProperty; //导入方法依赖的package包/类
public String apply(Entry<IProperty, Comparable> p_apply_1_)
{
if (p_apply_1_ == null)
{
return "<NULL>";
}
else
{
IProperty iproperty = (IProperty)p_apply_1_.getKey();
return iproperty.getName() + "=" + iproperty.getName((Comparable)p_apply_1_.getValue());
}
}
示例3: apply
import net.minecraft.block.properties.IProperty; //导入方法依赖的package包/类
public String apply(Entry p_apply_1_)
{
if (p_apply_1_ == null)
{
return "<NULL>";
}
else
{
IProperty iproperty = (IProperty)p_apply_1_.getKey();
return iproperty.getName() + "=" + iproperty.getName((Comparable)p_apply_1_.getValue());
}
}
示例4: add
import net.minecraft.block.properties.IProperty; //导入方法依赖的package包/类
public <T extends Comparable<T>> DelayedBlockStateContainer add(IProperty<T> property) {
if (frozen) throw new IllegalStateException("Tried to add property "+property.getName()+" to an immutable BlockStateContainer.");
validateProperty(this.getBlock(), property);
//properties.put(property.getName(), property);
values.put(property.getName(), new PropertyValueMap<>(property));
return this;
}
示例5: apply
import net.minecraft.block.properties.IProperty; //导入方法依赖的package包/类
@Nullable
public String apply(@Nullable Entry < IProperty<?>, Comparable<? >> p_apply_1_)
{
if (p_apply_1_ == null)
{
return "<NULL>";
}
else
{
IProperty<?> iproperty = (IProperty)p_apply_1_.getKey();
return iproperty.getName() + "=" + this.getPropertyName(iproperty, (Comparable)p_apply_1_.getValue());
}
}
示例6: apply
import net.minecraft.block.properties.IProperty; //导入方法依赖的package包/类
public String apply(IProperty p_apply_1_)
{
return p_apply_1_ == null ? "<NULL>" : p_apply_1_.getName();
}
示例7: getPropertyName
import net.minecraft.block.properties.IProperty; //导入方法依赖的package包/类
private <T extends Comparable<T>> String getPropertyName(IProperty<T> property, Comparable<?> value)
{
return property.getName((T)value);
}
示例8: getName
import net.minecraft.block.properties.IProperty; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
private static <T extends Comparable<T>> String getName(IProperty<T> p_190010_0_, Comparable<?> p_190010_1_)
{
return p_190010_0_.getName((T)p_190010_1_);
}
示例9: apply
import net.minecraft.block.properties.IProperty; //导入方法依赖的package包/类
@Nullable
public String apply(@Nullable IProperty<?> p_apply_1_)
{
return p_apply_1_ == null ? "<NULL>" : p_apply_1_.getName();
}
示例10: removeName
import net.minecraft.block.properties.IProperty; //导入方法依赖的package包/类
private <T extends Comparable<T>> String removeName(IProperty<T> p_187490_1_, Map < IProperty<?>, Comparable<? >> p_187490_2_)
{
return p_187490_1_.getName((T)p_187490_2_.remove(this.name));
}
示例11: getPropertyName
import net.minecraft.block.properties.IProperty; //导入方法依赖的package包/类
private <T extends Comparable<T>> String getPropertyName(IProperty<T> property, Comparable<?> entry)
{
return property.getName((T)entry);
}