stacks.add(nstack);
if(dd.append)
append = true;
}
BlockCustomDropDefinition converted = new BlockCustomDropDefinition(sourceId + "" + data + "" + this.converted++,stacks, null, new ItemInfo(sourceId, data));
converted.setAppend(append);
((CustomDrops) CraftBookPlugin.inst().getMechanic(CustomDrops.class)).addDefinition(converted);
} else {
itemsSource = ChatColor.translateAlternateColorCodes('&', itemsSource.toLowerCase(Locale.ENGLISH));
if (mobDropDefinitions.containsKey(itemsSource)) {
reader.close();
throw new CustomDropParseException(prelude + "double drop definition");
}
mobDropDefinitions.put(itemsSource, drops);
}
}
reader.close();
if (isMobDrop) {
this.mobDropDefinitions = mobDropDefinitions;
for(Entry<String, DropDefinition[]> def : mobDropDefinitions.entrySet()) {
List<DropItemStack> stacks = new ArrayList<DropItemStack>();
boolean append = false;
for(DropDefinition dd : def.getValue()) {
DropItemStack nstack = new DropItemStack(dd.stack);
nstack.setChance(dd.chance);
nstack.setMaximum(dd.countMax);
nstack.setMinimum(dd.countMin);
stacks.add(nstack);
if(dd.append)
append = true;
}
EntityCustomDropDefinition converted = new EntityCustomDropDefinition(def.getKey().toUpperCase() + "" + this.converted++, stacks, null, EntityType.valueOf(def.getKey().toUpperCase()));
converted.setAppend(append);
((CustomDrops) CraftBookPlugin.inst().getMechanic(CustomDrops.class)).addDefinition(converted);
}
} else {
this.blockDropDefinitions = blockDropDefinitions;