Skip to content

Commit

Permalink
Reverted Manaphy/Phoine to use hardcoded 10k meters.
Browse files Browse the repository at this point in the history
  • Loading branch information
Waterpicker committed Oct 30, 2024
1 parent 2d5240d commit f8c69b1
Showing 1 changed file with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@ public class LegendaryEggItem extends DistanceTraveledImplItem implements LangTo
private final SpeciesKey speciesKey;

public LegendaryEggItem(Properties properties, SpeciesKey speciesKey) {
super(properties, -1);
super(properties, 10_000);
this.speciesKey = speciesKey;
}

@Override
public double getMaxDistance() {
return PokemonSpecies.INSTANCE.getByIdentifier(speciesKey.species()).getEggCycles() * GenerationsCore.CONFIG.breeding.blocksPerEggCcyle;
}
// @Override
// public double getMaxDistance() {
// var species = PokemonSpecies.INSTANCE.getByIdentifier(speciesKey.species());
// return species.getEggCycles() * GenerationsCore.CONFIG.breeding.blocksPerEggCcyle;
// }

@Override
protected void onCompletion(ServerLevel level, Player player, InteractionHand usedHand) {
Expand All @@ -47,7 +48,9 @@ public void appendHoverText(@NotNull ItemStack stack, @Nullable Level level, Lis
var distance = remainingNeededDistance(stack);

if(distance > 0) tooltipComponents.add(Component.nullToEmpty("Distance needed to hatch: %.2f".formatted(distance)));
else tooltipComponents.add(Component.nullToEmpty("Ready to Hatch. Right Click to hatch " + PokemonSpecies.INSTANCE.getByIdentifier(speciesKey.species()).getName() + "!"));

else {
var species = PokemonSpecies.INSTANCE.getByIdentifier(speciesKey.species());
tooltipComponents.add(Component.nullToEmpty("Ready to Hatch. Right Click to hatch " + (species != null ? species.getName() : "Redacted") + "!"));
}
}
}

0 comments on commit f8c69b1

Please sign in to comment.