Search in sources :

Example 1 with PandaGene

use of simplepets.brainsynder.wrapper.PandaGene in project SimplePets by brainsynder-Dev.

the class EntityPandaPet method setGene.

@Override
public void setGene(PandaGene gene) {
    this.datawatcher.set(MAIN_GENE, (byte) gene.ordinal());
    // Makes sure that "brown" and "weak" pandas can be seen (not as regular pandas)
    PandaGene hidden = PandaGene.byId(datawatcher.get(HIDDEN_GENE));
    if ((gene == PandaGene.BROWN) || (gene == PandaGene.WEAK)) {
        this.datawatcher.set(HIDDEN_GENE, (byte) gene.ordinal());
    } else if ((hidden != PandaGene.BROWN) && (hidden != PandaGene.WEAK)) {
        if (hidden != PandaGene.NORMAL)
            datawatcher.set(HIDDEN_GENE, (byte) 0);
    }
}
Also used : PandaGene(simplepets.brainsynder.wrapper.PandaGene)

Example 2 with PandaGene

use of simplepets.brainsynder.wrapper.PandaGene in project SimplePets by brainsynder-Dev.

the class EntityPandaPet method setGene.

@Override
public void setGene(PandaGene gene) {
    this.datawatcher.set(MAIN_GENE, (byte) gene.ordinal());
    // Makes sure that "brown" and "weak" pandas can be seen (not as regular pandas)
    PandaGene hidden = PandaGene.byId(datawatcher.get(HIDDEN_GENE));
    if ((gene == PandaGene.BROWN) || (gene == PandaGene.WEAK)) {
        this.datawatcher.set(HIDDEN_GENE, (byte) gene.ordinal());
    } else if ((hidden != PandaGene.BROWN) && (hidden != PandaGene.WEAK)) {
        if (hidden != PandaGene.NORMAL)
            datawatcher.set(HIDDEN_GENE, (byte) 0);
    }
}
Also used : PandaGene(simplepets.brainsynder.wrapper.PandaGene)

Aggregations

PandaGene (simplepets.brainsynder.wrapper.PandaGene)2