本文整理汇总了Java中org.bukkit.entity.Horse.getVariant方法的典型用法代码示例。如果您正苦于以下问题:Java Horse.getVariant方法的具体用法?Java Horse.getVariant怎么用?Java Horse.getVariant使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.bukkit.entity.Horse
的用法示例。
在下文中一共展示了Horse.getVariant方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import org.bukkit.entity.Horse; //导入方法依赖的package包/类
@Override
protected boolean init(final @Nullable Class<? extends Horse> c, final @Nullable Horse e) {
if (e != null) {
variant = e.getVariant();
color = e.getColor();
style = e.getStyle();
}
return true;
}
示例2: EntityHorseData
import org.bukkit.entity.Horse; //导入方法依赖的package包/类
public EntityHorseData(Horse horse) {
color = horse.getColor();
variant = horse.getVariant();
style = horse.getStyle();
saddle = horse.getInventory().getSaddle();
armor = horse.getInventory().getArmor();
domestication = horse.getDomestication();
maxDomestication = horse.getMaxDomestication();
jumpStrength = horse.getJumpStrength();
}
示例3: HorseAnimal
import org.bukkit.entity.Horse; //导入方法依赖的package包/类
public HorseAnimal(Entity entity) {
PreCon.notNull(entity);
PreCon.isValid(entity instanceof Horse, "org.bukkit.entity.Horse expected.");
Horse horse = (Horse) entity;
_color = horse.getColor();
_variant = horse.getVariant();
_style = horse.getStyle();
_domestication = horse.getDomestication();
_maxDomestication = horse.getMaxDomestication();
_hasChest = horse.isCarryingChest();
_jumpStrength = horse.getJumpStrength();
}
示例4: match
import org.bukkit.entity.Horse; //导入方法依赖的package包/类
@Override
protected boolean match(final Horse entity) {
return (variant == null || variant == entity.getVariant())
&& (color == null || color == entity.getColor())
&& (style == null || style == entity.getStyle());
}