@Override public void setPattern(MCHorsePattern pattern) { h.setStyle(BukkitMCHorsePattern.getConvertor().getConcreteEnum(pattern)); }
@Override public void apply(Entity entity) { if (!(entity instanceof Horse)) return; Horse horse = (Horse)entity; horse.getInventory().setSaddle(saddle == null ? null : saddle.getItemStack(1)); horse.getInventory().setArmor(armor == null ? null : armor.getItemStack(1)); if (color != null) { horse.setColor(color); } if (style != null) { horse.setStyle(style); } if (domestication != null) { horse.setDomestication(domestication); } if (maxDomestication != null) { horse.setMaxDomestication(maxDomestication); } if (jumpStrength != null) { horse.setJumpStrength(jumpStrength); } if (tamed != null) { horse.setTamed(tamed); } }
} catch (IllegalArgumentException e) {} if (style != null) { ((Horse) creature).setStyle(style); continue;
ConfigurationSection inv = ent.getConfigurationSection(INVENTORY); inv.getKeys(false).forEach(i -> horse.getInventory().setItem(Integer.valueOf(i), (ItemStack)inv.get(i))); horse.setStyle(Horse.Style.valueOf(ent.getString("style", "NONE")));
entity.setHealth(entity.getMaxHealth()); horse.setColor(Horse.Color.values()[Misc.getRandom().nextInt(Horse.Color.values().length)]); horse.setStyle(Horse.Style.values()[Misc.getRandom().nextInt(Horse.Style.values().length)]); horse.setJumpStrength(Math.max(AdvancedConfig.getInstance().getMinHorseJumpStrength(), Math.min(Math.min(Misc.getRandom().nextDouble(), Misc.getRandom().nextDouble()) * 2, AdvancedConfig.getInstance().getMaxHorseJumpStrength())));
h.setStyle(BukkitMCHorse.BukkitMCHorsePattern.getConvertor().getConcreteEnum(hpattern)); } catch (IllegalArgumentException notAnything) { throw new CREFormatException("Type " + type + " did not match any horse variants,"
Horse ee = (Horse) equine; ee.setColor(tmhor.getHorseColour()); ee.setStyle(tmhor.getHorseStyle());
Horse pony = (Horse) equine; pony.setColor(e.getHorseColour()); pony.setStyle(e.getHorseStyle());
horse.setOwner(player); horse.setAdult(); horse.setStyle(mountHorseStyle);
horseStyle = styleValues[(horseStyle.ordinal() + 1) % styleValues.length]; horse.setStyle(horseStyle); horse.setColor(color); break;
horseStyle = styleValues[(horseStyle.ordinal() + 1) % styleValues.length]; horse.setStyle(horseStyle); horse.setColor(color); break;
((Horse) normalEntity).setStyle(style); ((Horse) normalEntity).setCarryingChest(((MyHorse) myPet).hasChest());