Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6b18d8f
commit bae7301
Showing
23 changed files
with
1,261 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
src/main/java/crazypants/enderzoo/entity/genes/OwlBeakColor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package crazypants.enderzoo.entity.genes; | ||
|
||
import info.loenwind.owlgen.IGene; | ||
import info.loenwind.owlgen.IMutationProvider; | ||
import info.loenwind.owlgen.IWeightedGene; | ||
import info.loenwind.owlgen.impl.MutationProvider; | ||
|
||
import java.util.List; | ||
|
||
public enum OwlBeakColor implements IGene { | ||
MEDIUM(10), | ||
DARK(10), | ||
BROWN(5), | ||
GRAY(10), | ||
BLACK(5); | ||
|
||
private static final IMutationProvider mut = new MutationProvider(); | ||
|
||
static { | ||
for (OwlBeakColor value : values()) { | ||
mut.registerMutation(value, null, value, value.weight); | ||
} | ||
} | ||
|
||
private final int weight; | ||
|
||
private OwlBeakColor(int weight) { | ||
this.weight = weight; | ||
} | ||
|
||
@Override | ||
public List<IWeightedGene> getChildrenGenes() { | ||
return mut.getChildrenGenes(this, null); | ||
} | ||
|
||
@Override | ||
public List<IWeightedGene> getChildrenGenes(IGene partner) { | ||
return mut.getChildrenGenes(this, partner); | ||
} | ||
|
||
public static int count() { | ||
return values().length + 1; | ||
} | ||
} |
64 changes: 64 additions & 0 deletions
64
src/main/java/crazypants/enderzoo/entity/genes/OwlCoatColor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
package crazypants.enderzoo.entity.genes; | ||
|
||
import info.loenwind.owlgen.IGene; | ||
import info.loenwind.owlgen.IMutationProvider; | ||
import info.loenwind.owlgen.IWeightedGene; | ||
import info.loenwind.owlgen.impl.MutationProvider; | ||
|
||
import java.util.List; | ||
|
||
public enum OwlCoatColor implements IGene { | ||
LIGHT(10), | ||
DARK(2), | ||
GOLD(3), | ||
WHITE(1); | ||
|
||
private static final IMutationProvider mut = new MutationProvider(); | ||
|
||
static { | ||
for (OwlCoatColor value : values()) { | ||
mut.registerMutation(value, null, value, value.weight); | ||
} | ||
mut.registerMutation(LIGHT, DARK, DARK, 20); | ||
mut.registerMutation(LIGHT, DARK, LIGHT, 100); | ||
mut.registerMutation(LIGHT, DARK, GOLD, 1); | ||
|
||
mut.registerMutation(LIGHT, GOLD, DARK, 20); | ||
mut.registerMutation(LIGHT, GOLD, LIGHT, 100); | ||
mut.registerMutation(LIGHT, GOLD, GOLD, 50); | ||
|
||
mut.registerMutation(LIGHT, WHITE, LIGHT, 100); | ||
mut.registerMutation(LIGHT, WHITE, WHITE, 10); | ||
|
||
mut.registerMutation(DARK, GOLD, DARK, 50); | ||
mut.registerMutation(DARK, GOLD, GOLD, 100); | ||
|
||
mut.registerMutation(DARK, WHITE, LIGHT, 100); | ||
mut.registerMutation(DARK, WHITE, DARK, 50); | ||
mut.registerMutation(DARK, WHITE, WHITE, 50); | ||
|
||
mut.registerMutation(GOLD, WHITE, WHITE, 50); | ||
mut.registerMutation(GOLD, WHITE, GOLD, 50); | ||
mut.registerMutation(GOLD, WHITE, LIGHT, 10); | ||
} | ||
|
||
private final int weight; | ||
|
||
private OwlCoatColor(int weight) { | ||
this.weight = weight; | ||
} | ||
|
||
@Override | ||
public List<IWeightedGene> getChildrenGenes() { | ||
return mut.getChildrenGenes(this, null); | ||
} | ||
|
||
@Override | ||
public List<IWeightedGene> getChildrenGenes(IGene partner) { | ||
return mut.getChildrenGenes(this, partner); | ||
} | ||
|
||
public static int count() { | ||
return values().length + 1; | ||
} | ||
} |
52 changes: 52 additions & 0 deletions
52
src/main/java/crazypants/enderzoo/entity/genes/OwlLegColor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package crazypants.enderzoo.entity.genes; | ||
|
||
import info.loenwind.owlgen.IGene; | ||
import info.loenwind.owlgen.IMutationProvider; | ||
import info.loenwind.owlgen.IWeightedGene; | ||
import info.loenwind.owlgen.impl.MutationProvider; | ||
|
||
import java.util.List; | ||
|
||
public enum OwlLegColor implements IGene { | ||
NORMAL(10), | ||
BROWN(5), | ||
RED(5), | ||
GRAY(1), | ||
BLACK(3); | ||
|
||
private static final IMutationProvider mut = new MutationProvider(); | ||
|
||
static { | ||
for (OwlLegColor value : values()) { | ||
mut.registerMutation(value, null, value, value.weight); | ||
} | ||
mut.registerMutation(NORMAL, NORMAL, BROWN, 5); | ||
mut.registerMutation(NORMAL, NORMAL, RED, 5); | ||
mut.registerMutation(NORMAL, NORMAL, GRAY, 5); | ||
|
||
mut.registerMutation(BROWN, BROWN, BLACK, 5); | ||
|
||
mut.registerMutation(RED, GRAY, BROWN, 5); | ||
mut.registerMutation(RED, GRAY, NORMAL, 5); | ||
} | ||
|
||
private final int weight; | ||
|
||
private OwlLegColor(int weight) { | ||
this.weight = weight; | ||
} | ||
|
||
@Override | ||
public List<IWeightedGene> getChildrenGenes() { | ||
return mut.getChildrenGenes(this, null); | ||
} | ||
|
||
@Override | ||
public List<IWeightedGene> getChildrenGenes(IGene partner) { | ||
return mut.getChildrenGenes(this, partner); | ||
} | ||
|
||
public static int count() { | ||
return values().length + 1; | ||
} | ||
} |
Oops, something went wrong.