@Override public NonNullList<ItemStack> getResearchBounty(World world, GameProfile researcher, IIndividual individual, int bountyLevel) { if (world.rand.nextFloat() < bountyLevel / 16.0f) { List<? extends IMutation> allMutations = getRoot().getCombinations(this); if (!allMutations.isEmpty()) { List<IMutation> unresearchedMutations = new ArrayList<>(); IBreedingTracker tracker = individual.getGenome().getSpeciesRoot().getBreedingTracker(world, researcher); for (IMutation mutation : allMutations) { if (!tracker.isResearched(mutation)) { unresearchedMutations.add(mutation); } } IMutation chosenMutation; if (!unresearchedMutations.isEmpty()) { chosenMutation = unresearchedMutations.get(world.rand.nextInt(unresearchedMutations.size())); } else { chosenMutation = allMutations.get(world.rand.nextInt(allMutations.size())); } ItemStack researchNote = AlleleManager.alleleRegistry.getMutationNoteStack(researcher, chosenMutation); NonNullList<ItemStack> bounty = NonNullList.create(); bounty.add(researchNote); return bounty; } } return NonNullList.create(); }
boolean researched = breedingTracker.isResearched(combination); if (researched) { element.label("+", x + 9, y + 1, 10, 10, GuiElementAlignment.TOP_LEFT, GuiConstants.DEFAULT_STYLE);
drawTexturedModalRect(x, y, column, line, 15, 9); boolean researched = breedingTracker.isResearched(combination); if (researched) { fontRenderer.drawString("+", x + 9, y + 1, 0);
if (tracker.isResearched(encoded)) { player.sendMessage(new TextComponentTranslation("for.chat.cannotmemorizeagain")); return false;