public boolean givePlayerRecipe(EntityPlayer ep, CastingRecipe cr) {
   if (!this.playerHasUsedRecipe(ep, cr)) {
     this.getNBTRecipes(ep).appendTag(new NBTTagInt(cr.getIDCode()));
     if (ep instanceof EntityPlayerMP) ReikaPlayerAPI.syncCustomData((EntityPlayerMP) ep);
     return true;
   }
   return false;
 }
 public boolean setPlayerResearchLevel(EntityPlayer ep, ResearchLevel r, boolean notify) {
   if (r.movePlayerTo(ep)) {
     if (ep instanceof EntityPlayerMP) ReikaPlayerAPI.syncCustomData((EntityPlayerMP) ep);
     if (notify) this.notifyPlayerOfProgression(ep, r);
     ProgressionCacher.instance.updateProgressCache(ep);
     return true;
   }
   return false;
 }
 public void maxPlayerResearch(EntityPlayer ep, boolean notify) {
   this.setPlayerResearchLevel(
       ep, ResearchLevel.levelList[ResearchLevel.levelList.length - 1], notify);
   for (ChromaResearch r : ChromaResearch.getAllObtainableFragments()) {
     this.givePlayerFragment(ep, r, notify);
   }
   for (CastingRecipe r : RecipesCastingTable.instance.getAllRecipes()) {
     this.givePlayerRecipe(ep, r);
   }
   if (ep instanceof EntityPlayerMP) ReikaPlayerAPI.syncCustomData((EntityPlayerMP) ep);
 }
 public boolean givePlayerFragment(EntityPlayer ep, ChromaResearch r, boolean notify) {
   if (!this.playerHasFragment(ep, r)) {
     this.getNBTFragments(ep).appendTag(new NBTTagString(r.name()));
     this.checkForUpgrade(ep);
     if (ep instanceof EntityPlayerMP) ReikaPlayerAPI.syncCustomData((EntityPlayerMP) ep);
     if (notify) this.notifyPlayerOfProgression(ep, r);
     ProgressionCacher.instance.updateProgressCache(ep);
     MinecraftForge.EVENT_BUS.post(new ProgressionEvent(ep, r.name(), ResearchType.FRAGMENT));
     return true;
   }
   return false;
 }
 public boolean removePlayerFragment(EntityPlayer ep, ChromaResearch r, boolean notify) {
   if (this.playerHasFragment(ep, r)) {
     NBTTagList li = this.getNBTFragments(ep);
     Iterator<NBTTagString> it = li.tagList.iterator();
     while (it.hasNext()) {
       NBTTagString s = it.next();
       if (s.func_150285_a_().equals(r.name())) it.remove();
     }
     if (ep instanceof EntityPlayerMP) ReikaPlayerAPI.syncCustomData((EntityPlayerMP) ep);
     ProgressionCacher.instance.updateProgressCache(ep);
     return true;
   }
   return false;
 }
 public void resetPlayerResearch(EntityPlayer ep, boolean notify) {
   ReikaPlayerAPI.getDeathPersistentNBT(ep).removeTag(NBT_TAG);
   if (ep instanceof EntityPlayerMP) ReikaPlayerAPI.syncCustomData((EntityPlayerMP) ep);
 }