本文整理匯總了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);
}