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