mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-19 11:49:14 +00:00
Fix #775 Found Chromosome with invalid Alleles
This commit is contained in:
1 parent
63ba9903ea
commit
7cda899bef
3 files changed
+12
No files matched your search
@@ -73,6 +73,10 @@ public class BeeGenome extends Genome implements IBeeGenome {
|
||||
|
||||
// NBT RETRIEVAL
|
||||
public static IAlleleBeeSpecies getSpecies(ItemStack itemStack) {
|
||||
if (!BeeManager.beeRoot.isMember(itemStack)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
IAlleleSpecies species = getSpeciesDirectly(itemStack);
|
||||
if (species instanceof IAlleleBeeSpecies) {
|
||||
return (IAlleleBeeSpecies) species;
|
||||
|
||||
@@ -46,6 +46,10 @@ public class TreeGenome extends Genome implements ITreeGenome {
|
||||
|
||||
// NBT RETRIEVAL
|
||||
public static IAlleleTreeSpecies getSpecies(ItemStack itemStack) {
|
||||
if (!TreeManager.treeRoot.isMember(itemStack)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
IAlleleSpecies species = getSpeciesDirectly(itemStack);
|
||||
if (species instanceof IAlleleTreeSpecies) {
|
||||
return (IAlleleTreeSpecies) species;
|
||||
|
||||
@@ -43,6 +43,10 @@ public class ButterflyGenome extends Genome implements IButterflyGenome {
|
||||
|
||||
// NBT RETRIEVAL
|
||||
public static IAlleleButterflySpecies getSpecies(ItemStack itemStack) {
|
||||
if (!PluginLepidopterology.butterflyInterface.isMember(itemStack)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
IAlleleSpecies species = getSpeciesDirectly(itemStack);
|
||||
if (species instanceof IAlleleButterflySpecies) {
|
||||
return (IAlleleButterflySpecies) species;
|
||||
|
||||
Reference in new issue
Block a user