FoodStatus(ConfigurationSection section){
abso = section.getInt(Node.ABSORPTION.get(), -1);
defaultAbso = abso;
food = section.getInt(Node.FOOD.get(), 0);
defaultFood = food;
saturation = section.getInt(Node.SATURATION.get(), 0);
defaultSaturation = saturation;
volume = (float) section.getDouble("VOLUME", 1);
pitch = (float) section.getDouble("SPEED", 1);
sound = Utils.matchEnum(Sound.values(), section.getString("SOUND"), true);
ConfigurationSection potion = section.getConfigurationSection(Node.EFFECT.getList());
effects = new ArrayList<PotionEffect>();
if(potion == null)
return;
for(String key : potion.getKeys(false)){
ConfigurationSection sub = potion.getConfigurationSection(key);
if(sub == null){
ErrorLogger.addError(key + " invalid !");
continue;
}
PotionEffect effect = MinecraftUtils.craftPotionEffect(key, sub);
if(effect.getType().equals(PotionEffectType.ABSORPTION)) {
absoEffect = effect;
reset();
}else
this.effects.add(effect);
}
}
ExtraManager.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:VanillaPlus
作者:
评论列表
文章目录