Interface IPlatformHelper
- All Superinterfaces:
AfterAssigningTraitSolver,UnpairedChromosomesToBreedSolver
public interface IPlatformHelper
extends UnpairedChromosomesToBreedSolver, AfterAssigningTraitSolver
REMEMBER: Only call these methods in mod initializer.
-
Method Summary
Modifier and TypeMethodDescriptionregisterChromosome(net.minecraft.resources.ResourceLocation id, Supplier<Chromosome> chromosome) registerGene(net.minecraft.resources.ResourceLocation id, Supplier<Gene> gene) registerGeneLocus(net.minecraft.resources.ResourceLocation id, Supplier<GeneLocus> geneLocus) registerTrait(net.minecraft.resources.ResourceLocation id, Supplier<Trait> trait) registerTraitType(net.minecraft.resources.ResourceLocation id, Supplier<TraitType> traitType) voidsolveAfterAssigningTrait(net.minecraft.world.entity.LivingEntity livingEntity, Map<net.minecraft.core.Holder<TraitType>, net.minecraft.core.Holder<Trait>> map, Predicate<net.minecraft.core.Holder<Trait>> hasTrait) booleansolveUnpairedChromosomesToBreed(net.minecraft.world.entity.EntityType<?> entityType, Collection<ChromosomeInstance> chromosomeInstances, net.minecraft.util.RandomSource random, com.google.common.collect.ImmutableCollection.Builder<ChromosomeInstance> builder)
-
Method Details
-
registerChromosome
AbstractRegisterEntry<Chromosome> registerChromosome(net.minecraft.resources.ResourceLocation id, Supplier<Chromosome> chromosome) -
registerGeneLocus
AbstractRegisterEntry<GeneLocus> registerGeneLocus(net.minecraft.resources.ResourceLocation id, Supplier<GeneLocus> geneLocus) -
registerGene
AbstractRegisterEntry<Gene> registerGene(net.minecraft.resources.ResourceLocation id, Supplier<Gene> gene) -
registerTrait
AbstractRegisterEntry<Trait> registerTrait(net.minecraft.resources.ResourceLocation id, Supplier<Trait> trait) -
registerTraitType
AbstractRegisterEntry<TraitType> registerTraitType(net.minecraft.resources.ResourceLocation id, Supplier<TraitType> traitType) -
solveUnpairedChromosomesToBreed
boolean solveUnpairedChromosomesToBreed(net.minecraft.world.entity.EntityType<?> entityType, Collection<ChromosomeInstance> chromosomeInstances, net.minecraft.util.RandomSource random, com.google.common.collect.ImmutableCollection.Builder<ChromosomeInstance> builder) - Specified by:
solveUnpairedChromosomesToBreedin interfaceUnpairedChromosomesToBreedSolver- Parameters:
entityType- the entity type with unpaired chromosomeschromosomeInstances- the chromosome instances of this entityrandom- random sourcebuilder- chromosomes builder, do NOT modify it until you decide to returntrue- Returns:
trueif we just solved this situation.falseotherwise. If false, the builder should NOT be modified.
-
solveAfterAssigningTrait
void solveAfterAssigningTrait(net.minecraft.world.entity.LivingEntity livingEntity, Map<net.minecraft.core.Holder<TraitType>, net.minecraft.core.Holder<Trait>> map, Predicate<net.minecraft.core.Holder<Trait>> hasTrait) - Specified by:
solveAfterAssigningTraitin interfaceAfterAssigningTraitSolver- Parameters:
livingEntity- the living entitymap- the trait maphasTrait- whether the living entity has the trait
-