mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-18 03:15:28 +00:00
Make the cocoonprovider to a allele
This commit is contained in:
1 parent
31bd519eaf
commit
0349890ddd
17 files changed
+177
-111
No files matched your search
@@ -68,7 +68,9 @@ public enum EnumButterflyChromosome implements IChromosomeType {
|
||||
/**
|
||||
* Extra effect to surroundings. (?)
|
||||
*/
|
||||
EFFECT(IAlleleButterflyEffect.class);
|
||||
EFFECT(IAlleleButterflyEffect.class),
|
||||
|
||||
COCOON(IAlleleButterflyCocoon.class);
|
||||
|
||||
Class<? extends IAllele> clss;
|
||||
|
||||
|
||||
+6
-2
@@ -10,8 +10,12 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.lepidopterology;
|
||||
|
||||
public interface IButterflyCocoonProvider {
|
||||
import forestry.api.genetics.IAllele;
|
||||
|
||||
public interface IAlleleButterflyCocoon extends IAllele {
|
||||
|
||||
EnumCocoonType getCocoonType();
|
||||
|
||||
String getCocoonTexture(int age);
|
||||
|
||||
|
||||
}
|
||||
@@ -66,11 +66,6 @@ public interface IAlleleButterflySpecies extends IAlleleSpecies {
|
||||
|
||||
ISpriteProvider getSpriteProvider();
|
||||
|
||||
/**
|
||||
* @return the IButterflyCocoonProvider
|
||||
*/
|
||||
IButterflyCocoonProvider getCocoonProvider();
|
||||
|
||||
/**
|
||||
* @return The modid from the mod of the species.
|
||||
*/
|
||||
|
||||
@@ -30,8 +30,7 @@ public interface IButterflyFactory {
|
||||
* @param branch Classification of this species
|
||||
* @param binomial Binomial name of the species sans genus. "humboldti" will have the bee species flavour name be "Apis humboldti". Feel free to use fun names or null.
|
||||
* @param serumColour The color of this butterfly's serum.
|
||||
* @param cocoonProvider A IButterflyCocoonProvider for the butterfly
|
||||
* @return a new butterfly species allele.
|
||||
*/
|
||||
IAlleleButterflySpeciesBuilder createSpecies(String uid, String unlocalizedName, String authority, String unlocalizedDescription, String modID, String texturePath, boolean dominant, IClassification branch, String binomial, Color serumColour, IButterflyCocoonProvider cocoonProvider);
|
||||
IAlleleButterflySpeciesBuilder createSpecies(String uid, String unlocalizedName, String authority, String unlocalizedDescription, String modID, String texturePath, boolean dominant, IClassification branch, String binomial, Color serumColour);
|
||||
}
|
||||
@@ -40,5 +40,7 @@ public interface IButterflyGenome extends IGenome {
|
||||
IFlowerProvider getFlowerProvider();
|
||||
|
||||
IAlleleButterflyEffect getEffect();
|
||||
|
||||
IAlleleButterflyCocoon getCocoon();
|
||||
|
||||
}
|
||||
@@ -42,14 +42,14 @@ public class ButterflySpawner implements ILeafTickHandler {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (world.isAirBlock(pos.add(-1, 0, 0))) {
|
||||
attemptButterflySpawn(world, spawn, pos.add(-1, 0, 0));
|
||||
} else if (world.isAirBlock(pos.add(1, 0, 0))) {
|
||||
attemptButterflySpawn(world, spawn, pos.add(1, 0, 0));
|
||||
} else if (world.isAirBlock(pos.add(0, 0, -1))) {
|
||||
attemptButterflySpawn(world, spawn, pos.add(0, 0, -1));
|
||||
} else if (world.isAirBlock(pos.add(0, 0, 1))) {
|
||||
attemptButterflySpawn(world, spawn, pos.add(0, 0, 1));
|
||||
if (world.isAirBlock(pos.north())) {
|
||||
attemptButterflySpawn(world, spawn, pos.north());
|
||||
} else if (world.isAirBlock(pos.south())) {
|
||||
attemptButterflySpawn(world, spawn, pos.south());
|
||||
} else if (world.isAirBlock(pos.west())) {
|
||||
attemptButterflySpawn(world, spawn, pos.west());
|
||||
} else if (world.isAirBlock(pos.east())) {
|
||||
attemptButterflySpawn(world, spawn, pos.east());
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -48,6 +48,7 @@ import forestry.lepidopterology.genetics.ButterflyFactory;
|
||||
import forestry.lepidopterology.genetics.ButterflyMutationFactory;
|
||||
import forestry.lepidopterology.genetics.ButterflyRoot;
|
||||
import forestry.lepidopterology.genetics.MothDefinition;
|
||||
import forestry.lepidopterology.genetics.alleles.AlleleButterflyCocoon;
|
||||
import forestry.lepidopterology.genetics.alleles.AlleleButterflyEffect;
|
||||
import forestry.lepidopterology.items.ItemButterflyGE;
|
||||
import forestry.lepidopterology.items.ItemRegistryLepidopterology;
|
||||
@@ -78,6 +79,8 @@ public class PluginLepidopterology extends BlankForestryPlugin {
|
||||
|
||||
ButterflyManager.butterflyFactory = new ButterflyFactory();
|
||||
ButterflyManager.butterflyMutationFactory = new ButterflyMutationFactory();
|
||||
|
||||
AlleleButterflyCocoon.createAlleles();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -107,9 +107,6 @@ public class BlockCocoon extends Block implements ITileEntityProvider, IStateMap
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(Item itemIn, CreativeTabs tab, List<ItemStack> list) {
|
||||
super.getSubBlocks(itemIn, tab, list);
|
||||
list.add(new ItemStack(itemIn, 1, 1));
|
||||
list.add(new ItemStack(itemIn, 1, 2));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -20,6 +20,7 @@ import forestry.api.lepidopterology.EnumButterflyChromosome;
|
||||
import forestry.core.genetics.IBranchDefinition;
|
||||
import forestry.core.genetics.alleles.AlleleHelper;
|
||||
import forestry.core.genetics.alleles.EnumAllele;
|
||||
import forestry.lepidopterology.genetics.alleles.AlleleButterflyCocoon;
|
||||
import forestry.lepidopterology.genetics.alleles.AlleleButterflyEffect;
|
||||
|
||||
public enum ButterflyBranchDefinition implements IBranchDefinition {
|
||||
@@ -74,6 +75,7 @@ public enum ButterflyBranchDefinition implements IBranchDefinition {
|
||||
AlleleHelper.instance.set(defaultTemplate, EnumButterflyChromosome.FIRE_RESIST, false);
|
||||
AlleleHelper.instance.set(defaultTemplate, EnumButterflyChromosome.FLOWER_PROVIDER, EnumAllele.Flowers.VANILLA);
|
||||
AlleleHelper.instance.set(defaultTemplate, EnumButterflyChromosome.EFFECT, AlleleButterflyEffect.butterflyNone);
|
||||
AlleleHelper.instance.set(defaultTemplate, EnumButterflyChromosome.COCOON, AlleleButterflyCocoon.cocoonDefault);
|
||||
}
|
||||
return Arrays.copyOf(defaultTemplate, defaultTemplate.length);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ import forestry.api.lepidopterology.EnumFlutterType;
|
||||
import forestry.api.lepidopterology.IAlleleButterflySpecies;
|
||||
import forestry.api.lepidopterology.IAlleleButterflySpeciesBuilder;
|
||||
import forestry.api.lepidopterology.IButterfly;
|
||||
import forestry.api.lepidopterology.IButterflyCocoonProvider;
|
||||
import forestry.api.lepidopterology.IButterflyGenome;
|
||||
import forestry.api.lepidopterology.IButterflyMutationCustom;
|
||||
import forestry.core.config.Constants;
|
||||
@@ -34,52 +33,52 @@ import forestry.core.genetics.alleles.AlleleHelper;
|
||||
import forestry.core.genetics.alleles.EnumAllele;
|
||||
|
||||
public enum ButterflyDefinition implements IButterflyDefinition {
|
||||
CabbageWhite(ButterflyBranchDefinition.Pieris, "cabbageWhite", "rapae", new Color(0xccffee), true, 1.0f, EnumCocoonType.DEFAULT) {
|
||||
CabbageWhite(ButterflyBranchDefinition.Pieris, "cabbageWhite", "rapae", new Color(0xccffee), true, 1.0f) {
|
||||
@Override
|
||||
protected void setAlleles(IAllele[] alleles) {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.SIZE, EnumAllele.Size.AVERAGE);
|
||||
}
|
||||
},
|
||||
Brimstone(ButterflyBranchDefinition.Gonepteryx, "brimstone", "rhamni", new Color(0xf0ee38), true, 1.0f, EnumCocoonType.DEFAULT),
|
||||
Aurora(ButterflyBranchDefinition.Anthocharis, "orangeTip", "cardamines", new Color(0xe34f05), true, 0.5f, EnumCocoonType.DEFAULT) {
|
||||
Brimstone(ButterflyBranchDefinition.Gonepteryx, "brimstone", "rhamni", new Color(0xf0ee38), true, 1.0f),
|
||||
Aurora(ButterflyBranchDefinition.Anthocharis, "orangeTip", "cardamines", new Color(0xe34f05), true, 0.5f) {
|
||||
@Override
|
||||
protected void setAlleles(IAllele[] alleles) {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.SIZE, EnumAllele.Size.SMALLER);
|
||||
}
|
||||
},
|
||||
Postillion(ButterflyBranchDefinition.Colias, "postillion", "croceus", new Color(0xd77e04), true, 0.5f, EnumCocoonType.DEFAULT) {
|
||||
Postillion(ButterflyBranchDefinition.Colias, "postillion", "croceus", new Color(0xd77e04), true, 0.5f) {
|
||||
@Override
|
||||
protected void setAlleles(IAllele[] alleles) {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.SPEED, EnumAllele.Speed.SLOW);
|
||||
}
|
||||
},
|
||||
PalaenoSulphur(ButterflyBranchDefinition.Colias, "palaenoSulphur", "palaeno", new Color(0xf8fba3), true, 0.4f, EnumCocoonType.DEFAULT) {
|
||||
PalaenoSulphur(ButterflyBranchDefinition.Colias, "palaenoSulphur", "palaeno", new Color(0xf8fba3), true, 0.4f) {
|
||||
@Override
|
||||
protected void setAlleles(IAllele[] alleles) {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.SPEED, EnumAllele.Speed.SLOWER);
|
||||
}
|
||||
},
|
||||
Reseda(ButterflyBranchDefinition.Pontia, "reseda", "edusa", new Color(0x747d48), true, 0.3f, EnumCocoonType.DEFAULT) {
|
||||
Reseda(ButterflyBranchDefinition.Pontia, "reseda", "edusa", new Color(0x747d48), true, 0.3f) {
|
||||
@Override
|
||||
protected void setAlleles(IAllele[] alleles) {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.SPEED, EnumAllele.Speed.SLOWER);
|
||||
}
|
||||
},
|
||||
SpringAzure(ButterflyBranchDefinition.Celastrina, "springAzure", "argiolus", new Color(0xb8cae2), true, 0.3f, EnumCocoonType.DEFAULT) {
|
||||
SpringAzure(ButterflyBranchDefinition.Celastrina, "springAzure", "argiolus", new Color(0xb8cae2), true, 0.3f) {
|
||||
@Override
|
||||
protected void setAlleles(IAllele[] alleles) {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.SIZE, EnumAllele.Size.SMALLER);
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.LIFESPAN, EnumAllele.Lifespan.SHORT);
|
||||
}
|
||||
},
|
||||
GozoraAzure(ButterflyBranchDefinition.Celastrina, "gozoraAzure", "gozora", new Color(0x6870e7), true, 0.2f, EnumCocoonType.DEFAULT) {
|
||||
GozoraAzure(ButterflyBranchDefinition.Celastrina, "gozoraAzure", "gozora", new Color(0x6870e7), true, 0.2f) {
|
||||
@Override
|
||||
protected void setAlleles(IAllele[] alleles) {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.SIZE, EnumAllele.Size.SMALLER);
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.LIFESPAN, EnumAllele.Lifespan.SHORT);
|
||||
}
|
||||
},
|
||||
CitrusSwallow(ButterflyBranchDefinition.Papilio, "swallowtailC", "demodocus", new Color(0xeae389), false, 1.0f, EnumCocoonType.DEFAULT) {
|
||||
CitrusSwallow(ButterflyBranchDefinition.Papilio, "swallowtailC", "demodocus", new Color(0xeae389), false, 1.0f) {
|
||||
@Override
|
||||
protected void setSpeciesProperties(IAlleleButterflySpeciesBuilder species) {
|
||||
species.setTemperature(EnumTemperature.WARM)
|
||||
@@ -97,7 +96,7 @@ public enum ButterflyDefinition implements IButterflyDefinition {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.HUMIDITY_TOLERANCE, EnumAllele.Tolerance.DOWN_1);
|
||||
}
|
||||
},
|
||||
EmeraldPeacock(ButterflyBranchDefinition.Papilio, "emeraldPeacock", "palinurus", new Color(0x7cfe80), true, 0.1f, EnumCocoonType.DEFAULT) {
|
||||
EmeraldPeacock(ButterflyBranchDefinition.Papilio, "emeraldPeacock", "palinurus", new Color(0x7cfe80), true, 0.1f) {
|
||||
@Override
|
||||
protected void setSpeciesProperties(IAlleleButterflySpeciesBuilder species) {
|
||||
species.setTemperature(EnumTemperature.WARM)
|
||||
@@ -113,7 +112,7 @@ public enum ButterflyDefinition implements IButterflyDefinition {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.HUMIDITY_TOLERANCE, EnumAllele.Tolerance.DOWN_1);
|
||||
}
|
||||
},
|
||||
ThoasSwallow(ButterflyBranchDefinition.Papilio, "swallowtailT", "thoas", new Color(0xeac783), false, 0.2f, EnumCocoonType.DEFAULT) {
|
||||
ThoasSwallow(ButterflyBranchDefinition.Papilio, "swallowtailT", "thoas", new Color(0xeac783), false, 0.2f) {
|
||||
@Override
|
||||
protected void setSpeciesProperties(IAlleleButterflySpeciesBuilder species) {
|
||||
species.setTemperature(EnumTemperature.WARM)
|
||||
@@ -127,13 +126,13 @@ public enum ButterflyDefinition implements IButterflyDefinition {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.LIFESPAN, EnumAllele.Lifespan.SHORTEST);
|
||||
}
|
||||
},
|
||||
Spicebush(ButterflyBranchDefinition.Papilio, "swallowtailS", "troilus", new Color(0xeefeff), true, 0.5f, EnumCocoonType.DEFAULT) {
|
||||
Spicebush(ButterflyBranchDefinition.Papilio, "swallowtailS", "troilus", new Color(0xeefeff), true, 0.5f) {
|
||||
@Override
|
||||
protected void setAlleles(IAllele[] alleles) {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.SIZE, EnumAllele.Size.AVERAGE);
|
||||
}
|
||||
},
|
||||
BlackSwallow(ButterflyBranchDefinition.Papilio, "swallowtailB", "polyxenes", new Color(0xeac783), true, 1.0f, EnumCocoonType.DEFAULT) {
|
||||
BlackSwallow(ButterflyBranchDefinition.Papilio, "swallowtailB", "polyxenes", new Color(0xeac783), true, 1.0f) {
|
||||
@Override
|
||||
protected void setAlleles(IAllele[] alleles) {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.SPEED, EnumAllele.Speed.SLOW);
|
||||
@@ -143,14 +142,14 @@ public enum ButterflyDefinition implements IButterflyDefinition {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.HUMIDITY_TOLERANCE, EnumAllele.Tolerance.DOWN_1);
|
||||
}
|
||||
},
|
||||
ZebraSwallow(ButterflyBranchDefinition.Protographium, "swallowtailZ", "marcellus", new Color(0xeafeff), true, 0.5f, EnumCocoonType.DEFAULT) {
|
||||
ZebraSwallow(ButterflyBranchDefinition.Protographium, "swallowtailZ", "marcellus", new Color(0xeafeff), true, 0.5f) {
|
||||
@Override
|
||||
protected void setAlleles(IAllele[] alleles) {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.SPEED, EnumAllele.Speed.SLOWER);
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.SIZE, EnumAllele.Size.AVERAGE);
|
||||
}
|
||||
},
|
||||
Glasswing(ButterflyBranchDefinition.Greta, "glasswing", "oto", new Color(0x583732), true, 0.1f, EnumCocoonType.DEFAULT) {
|
||||
Glasswing(ButterflyBranchDefinition.Greta, "glasswing", "oto", new Color(0x583732), true, 0.1f) {
|
||||
@Override
|
||||
protected void setSpeciesProperties(IAlleleButterflySpeciesBuilder species) {
|
||||
species.setTemperature(EnumTemperature.WARM);
|
||||
@@ -164,25 +163,25 @@ public enum ButterflyDefinition implements IButterflyDefinition {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.TEMPERATURE_TOLERANCE, EnumAllele.Tolerance.DOWN_1);
|
||||
}
|
||||
},
|
||||
SpeckledWood(ButterflyBranchDefinition.Pararge, "speckledWood", "aegeria", new Color(0x947245), true, 1.0f, EnumCocoonType.DEFAULT) {
|
||||
SpeckledWood(ButterflyBranchDefinition.Pararge, "speckledWood", "aegeria", new Color(0x947245), true, 1.0f) {
|
||||
@Override
|
||||
protected void setAlleles(IAllele[] alleles) {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.FERTILITY, 2);
|
||||
}
|
||||
},
|
||||
MSpeckledWood(ButterflyBranchDefinition.Pararge, "speckledWoodM", "xiphia", new Color(0x402919), true, 0.5f, EnumCocoonType.DEFAULT) {
|
||||
MSpeckledWood(ButterflyBranchDefinition.Pararge, "speckledWoodM", "xiphia", new Color(0x402919), true, 0.5f) {
|
||||
@Override
|
||||
protected void setAlleles(IAllele[] alleles) {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.FERTILITY, 2);
|
||||
}
|
||||
},
|
||||
CSpeckledWood(ButterflyBranchDefinition.Pararge, "speckledWoodC", "xiphioides", new Color(0x51372a), true, 0.5f, EnumCocoonType.DEFAULT) {
|
||||
CSpeckledWood(ButterflyBranchDefinition.Pararge, "speckledWoodC", "xiphioides", new Color(0x51372a), true, 0.5f) {
|
||||
@Override
|
||||
protected void setAlleles(IAllele[] alleles) {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.FERTILITY, 2);
|
||||
}
|
||||
},
|
||||
MBlueMorpho(ButterflyBranchDefinition.Morpho, "blueMorphoM", "menelaus", new Color(0x72e1fd), true, 0.5f, EnumCocoonType.DEFAULT) {
|
||||
MBlueMorpho(ButterflyBranchDefinition.Morpho, "blueMorphoM", "menelaus", new Color(0x72e1fd), true, 0.5f) {
|
||||
@Override
|
||||
protected void setSpeciesProperties(IAlleleButterflySpeciesBuilder species) {
|
||||
species.setTemperature(EnumTemperature.WARM)
|
||||
@@ -196,7 +195,7 @@ public enum ButterflyDefinition implements IButterflyDefinition {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.FERTILITY, 2);
|
||||
}
|
||||
},
|
||||
PBlueMorpho(ButterflyBranchDefinition.Morpho, "blueMorphoP", "peleides", new Color(0x6ecce8), true, 0.25f, EnumCocoonType.DEFAULT) {
|
||||
PBlueMorpho(ButterflyBranchDefinition.Morpho, "blueMorphoP", "peleides", new Color(0x6ecce8), true, 0.25f) {
|
||||
@Override
|
||||
protected void setSpeciesProperties(IAlleleButterflySpeciesBuilder species) {
|
||||
species.setTemperature(EnumTemperature.WARM)
|
||||
@@ -210,7 +209,7 @@ public enum ButterflyDefinition implements IButterflyDefinition {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.FERTILITY, 2);
|
||||
}
|
||||
},
|
||||
RBlueMorpho(ButterflyBranchDefinition.Morpho, "blueMorphoR", "rhetenor", new Color(0x00bef8), true, 0.1f, EnumCocoonType.DEFAULT) {
|
||||
RBlueMorpho(ButterflyBranchDefinition.Morpho, "blueMorphoR", "rhetenor", new Color(0x00bef8), true, 0.1f) {
|
||||
@Override
|
||||
protected void setSpeciesProperties(IAlleleButterflySpeciesBuilder species) {
|
||||
species.setTemperature(EnumTemperature.WARM)
|
||||
@@ -224,13 +223,13 @@ public enum ButterflyDefinition implements IButterflyDefinition {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.FERTILITY, 2);
|
||||
}
|
||||
},
|
||||
Comma(ButterflyBranchDefinition.Polygonia, "comma", "c-album", new Color(0xf89505), true, 0.3f, EnumCocoonType.DEFAULT) {
|
||||
Comma(ButterflyBranchDefinition.Polygonia, "comma", "c-album", new Color(0xf89505), true, 0.3f) {
|
||||
@Override
|
||||
protected void setAlleles(IAllele[] alleles) {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.SPEED, EnumAllele.Speed.SLOWER);
|
||||
}
|
||||
},
|
||||
Batesia(ButterflyBranchDefinition.Batesia, "paintedBeauty", "hypochlora", new Color(0xfe7763), true, 0.3f, EnumCocoonType.DEFAULT) {
|
||||
Batesia(ButterflyBranchDefinition.Batesia, "paintedBeauty", "hypochlora", new Color(0xfe7763), true, 0.3f) {
|
||||
@Override
|
||||
protected void setSpeciesProperties(IAlleleButterflySpeciesBuilder species) {
|
||||
species.setTemperature(EnumTemperature.WARM)
|
||||
@@ -242,20 +241,20 @@ public enum ButterflyDefinition implements IButterflyDefinition {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.SIZE, EnumAllele.Size.LARGE);
|
||||
}
|
||||
},
|
||||
BlueWing(ButterflyBranchDefinition.Myscelia, "blueWing", "ethusa", new Color(0x3a93cc), true, 0.3f, EnumCocoonType.DEFAULT) {
|
||||
BlueWing(ButterflyBranchDefinition.Myscelia, "blueWing", "ethusa", new Color(0x3a93cc), true, 0.3f) {
|
||||
@Override
|
||||
protected void setAlleles(IAllele[] alleles) {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.SIZE, EnumAllele.Size.AVERAGE);
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.METABOLISM, 5);
|
||||
}
|
||||
},
|
||||
Monarch(ButterflyBranchDefinition.Danaus, "monarch", "plexippus", new Color(0xffa722), true, 0.2f, EnumCocoonType.DEFAULT) {
|
||||
Monarch(ButterflyBranchDefinition.Danaus, "monarch", "plexippus", new Color(0xffa722), true, 0.2f) {
|
||||
@Override
|
||||
protected void setAlleles(IAllele[] alleles) {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.SIZE, EnumAllele.Size.AVERAGE);
|
||||
}
|
||||
},
|
||||
BlueDuke(ButterflyBranchDefinition.Bassarona, "blueDuke", "durga", new Color(0x304240), true, 0.5f, EnumCocoonType.DEFAULT) {
|
||||
BlueDuke(ButterflyBranchDefinition.Bassarona, "blueDuke", "durga", new Color(0x304240), true, 0.5f) {
|
||||
@Override
|
||||
protected void setSpeciesProperties(IAlleleButterflySpeciesBuilder species) {
|
||||
species.setTemperature(EnumTemperature.COLD);
|
||||
@@ -266,14 +265,14 @@ public enum ButterflyDefinition implements IButterflyDefinition {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.TEMPERATURE_TOLERANCE, EnumAllele.Tolerance.BOTH_1);
|
||||
}
|
||||
},
|
||||
GlassyTiger(ButterflyBranchDefinition.Parantica, "glassyTiger", "aglea", new Color(0x5b3935), true, 0.3f, EnumCocoonType.DEFAULT) {
|
||||
GlassyTiger(ButterflyBranchDefinition.Parantica, "glassyTiger", "aglea", new Color(0x5b3935), true, 0.3f) {
|
||||
@Override
|
||||
protected void setAlleles(IAllele[] alleles) {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.SIZE, EnumAllele.Size.AVERAGE);
|
||||
}
|
||||
},
|
||||
Postman(ButterflyBranchDefinition.Heliconius, "postman", "melpomene", new Color(0xf7302d), true, 0.3f, EnumCocoonType.DEFAULT),
|
||||
Malachite(ButterflyBranchDefinition.Siproeta, "malachite", "stelenes", new Color(0xbdff53), true, 0.5f, EnumCocoonType.DEFAULT) {
|
||||
Postman(ButterflyBranchDefinition.Heliconius, "postman", "melpomene", new Color(0xf7302d), true, 0.3f),
|
||||
Malachite(ButterflyBranchDefinition.Siproeta, "malachite", "stelenes", new Color(0xbdff53), true, 0.5f) {
|
||||
@Override
|
||||
protected void setSpeciesProperties(IAlleleButterflySpeciesBuilder species) {
|
||||
species.setTemperature(EnumTemperature.WARM)
|
||||
@@ -287,14 +286,14 @@ public enum ButterflyDefinition implements IButterflyDefinition {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.HUMIDITY_TOLERANCE, EnumAllele.Tolerance.DOWN_1);
|
||||
}
|
||||
},
|
||||
LLacewing(ButterflyBranchDefinition.Cethosia, "leopardLacewing", "cyane", new Color(0xfb8a06), true, 0.7f, EnumCocoonType.DEFAULT) {
|
||||
LLacewing(ButterflyBranchDefinition.Cethosia, "leopardLacewing", "cyane", new Color(0xfb8a06), true, 0.7f) {
|
||||
@Override
|
||||
protected void setAlleles(IAllele[] alleles) {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.TEMPERATURE_TOLERANCE, EnumAllele.Tolerance.UP_1);
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.HUMIDITY_TOLERANCE, EnumAllele.Tolerance.UP_1);
|
||||
}
|
||||
},
|
||||
DianaFrit(ButterflyBranchDefinition.Speyeria, "dianaFritillary", "diana", new Color(0xffac05), true, 0.6f, EnumCocoonType.DEFAULT) {
|
||||
DianaFrit(ButterflyBranchDefinition.Speyeria, "dianaFritillary", "diana", new Color(0xffac05), true, 0.6f) {
|
||||
@Override
|
||||
protected void setAlleles(IAllele[] alleles) {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.SPEED, EnumAllele.Speed.SLOWER);
|
||||
@@ -307,7 +306,7 @@ public enum ButterflyDefinition implements IButterflyDefinition {
|
||||
private IAllele[] template;
|
||||
private IButterflyGenome genome;
|
||||
|
||||
ButterflyDefinition(ButterflyBranchDefinition branchDefinition, String speciesName, String binomial, Color serumColor, boolean dominant, float rarity, EnumCocoonType cocoonType) {
|
||||
ButterflyDefinition(ButterflyBranchDefinition branchDefinition, String speciesName, String binomial, Color serumColor, boolean dominant, float rarity) {
|
||||
this.branch = branchDefinition;
|
||||
|
||||
String uid = "lepi" + name();
|
||||
@@ -316,9 +315,8 @@ public enum ButterflyDefinition implements IButterflyDefinition {
|
||||
String unlocalizedDescription = "for.description." + uid;
|
||||
|
||||
String texture = "butterflies/" + uid;
|
||||
IButterflyCocoonProvider cocoonProvider = new DefaultCocoonProvider(cocoonType.name().toLowerCase(Locale.ENGLISH));
|
||||
|
||||
IAlleleButterflySpeciesBuilder speciesBuilder = ButterflyManager.butterflyFactory.createSpecies(Constants.MOD_ID + '.' + uid, unlocalizedName, "Sengir", unlocalizedDescription, Constants.RESOURCE_ID, texture, dominant, branchDefinition.getBranch(), binomial, serumColor, cocoonProvider);
|
||||
IAlleleButterflySpeciesBuilder speciesBuilder = ButterflyManager.butterflyFactory.createSpecies(Constants.MOD_ID + '.' + uid, unlocalizedName, "Sengir", unlocalizedDescription, Constants.RESOURCE_ID, texture, dominant, branchDefinition.getBranch(), binomial, serumColor);
|
||||
speciesBuilder.setRarity(rarity);
|
||||
setSpeciesProperties(speciesBuilder);
|
||||
this.species = speciesBuilder.build();
|
||||
@@ -354,8 +352,20 @@ public enum ButterflyDefinition implements IButterflyDefinition {
|
||||
|
||||
}
|
||||
|
||||
protected final IButterflyMutationCustom registerMutation(ButterflyDefinition parent1, ButterflyDefinition parent2, int chance) {
|
||||
return ButterflyManager.butterflyMutationFactory.createMutation(parent1.species, parent2.species, getTemplate(), chance);
|
||||
protected final IButterflyMutationCustom registerMutation(IButterflyDefinition parent1, IButterflyDefinition parent2, int chance) {
|
||||
IAlleleButterflySpecies species1 = null;
|
||||
IAlleleButterflySpecies species2 = null;
|
||||
if(parent1 instanceof ButterflyDefinition){
|
||||
species1 = ((ButterflyDefinition) parent1).species;
|
||||
}else if(parent1 instanceof MothDefinition){
|
||||
species1 = ((MothDefinition) parent1).getSpecies();
|
||||
}
|
||||
if(parent2 instanceof ButterflyDefinition){
|
||||
species2 = ((ButterflyDefinition) parent2).species;
|
||||
}else if(parent2 instanceof MothDefinition){
|
||||
species2 = ((MothDefinition) parent2).getSpecies();
|
||||
}
|
||||
return ButterflyManager.butterflyMutationFactory.createMutation(species1, species2, getTemplate(), chance);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -378,4 +388,8 @@ public enum ButterflyDefinition implements IButterflyDefinition {
|
||||
IButterfly butterfly = getIndividual();
|
||||
return ButterflyManager.butterflyRoot.getMemberStack(butterfly, flutterType);
|
||||
}
|
||||
|
||||
public IAlleleButterflySpecies getSpecies() {
|
||||
return species;
|
||||
}
|
||||
}
|
||||
@@ -14,13 +14,12 @@ import java.awt.Color;
|
||||
|
||||
import forestry.api.genetics.IClassification;
|
||||
import forestry.api.lepidopterology.IAlleleButterflySpeciesBuilder;
|
||||
import forestry.api.lepidopterology.IButterflyCocoonProvider;
|
||||
import forestry.api.lepidopterology.IButterflyFactory;
|
||||
import forestry.lepidopterology.genetics.alleles.AlleleButterflySpecies;
|
||||
|
||||
public class ButterflyFactory implements IButterflyFactory {
|
||||
@Override
|
||||
public IAlleleButterflySpeciesBuilder createSpecies(String uid, String unlocalizedName, String authority, String unlocalizedDescription, String modID, String texturePath, boolean isDominant, IClassification branch, String binomial, Color serumColour, IButterflyCocoonProvider cocoonProvider) {
|
||||
return new AlleleButterflySpecies(uid, unlocalizedName, authority, unlocalizedDescription, modID, texturePath, isDominant, branch, binomial, serumColour, cocoonProvider);
|
||||
public IAlleleButterflySpeciesBuilder createSpecies(String uid, String unlocalizedName, String authority, String unlocalizedDescription, String modID, String texturePath, boolean isDominant, IClassification branch, String binomial, Color serumColour) {
|
||||
return new AlleleButterflySpecies(uid, unlocalizedName, authority, unlocalizedDescription, modID, texturePath, isDominant, branch, binomial, serumColour);
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,7 @@ import forestry.api.genetics.IFlowerProvider;
|
||||
import forestry.api.genetics.ISpeciesRoot;
|
||||
import forestry.api.lepidopterology.ButterflyManager;
|
||||
import forestry.api.lepidopterology.EnumButterflyChromosome;
|
||||
import forestry.api.lepidopterology.IAlleleButterflyCocoon;
|
||||
import forestry.api.lepidopterology.IAlleleButterflyEffect;
|
||||
import forestry.api.lepidopterology.IAlleleButterflySpecies;
|
||||
import forestry.api.lepidopterology.IButterflyGenome;
|
||||
@@ -124,6 +125,11 @@ public class ButterflyGenome extends Genome implements IButterflyGenome {
|
||||
public IAlleleButterflyEffect getEffect() {
|
||||
return (IAlleleButterflyEffect) getActiveAllele(EnumButterflyChromosome.EFFECT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IAlleleButterflyCocoon getCocoon() {
|
||||
return (IAlleleButterflyCocoon) getActiveAllele(EnumButterflyChromosome.COCOON);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ISpeciesRoot getSpeciesRoot() {
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2011-2014 SirSengir.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the GNU Lesser Public License v3
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* Various Contributors including, but not limited to:
|
||||
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
|
||||
******************************************************************************/
|
||||
package forestry.lepidopterology.genetics;
|
||||
|
||||
import forestry.api.lepidopterology.IButterflyCocoonProvider;
|
||||
|
||||
public class DefaultCocoonProvider implements IButterflyCocoonProvider {
|
||||
|
||||
private String cocoonType;
|
||||
|
||||
public DefaultCocoonProvider(String cocoonType) {
|
||||
this.cocoonType = cocoonType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCocoonTexture(int age) {
|
||||
return "textures/blocks/lepidopterology/cocoons/" + cocoonType + "_" + age + ".png";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -24,28 +24,28 @@ import forestry.api.lepidopterology.EnumFlutterType;
|
||||
import forestry.api.lepidopterology.IAlleleButterflySpecies;
|
||||
import forestry.api.lepidopterology.IAlleleButterflySpeciesBuilder;
|
||||
import forestry.api.lepidopterology.IButterfly;
|
||||
import forestry.api.lepidopterology.IButterflyCocoonProvider;
|
||||
import forestry.api.lepidopterology.IButterflyGenome;
|
||||
import forestry.api.lepidopterology.IButterflyMutationCustom;
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.genetics.alleles.AlleleHelper;
|
||||
import forestry.core.genetics.alleles.EnumAllele;
|
||||
import forestry.lepidopterology.genetics.alleles.AlleleButterflyCocoon;
|
||||
|
||||
public enum MothDefinition implements IButterflyDefinition {
|
||||
Brimstone(ButterflyBranchDefinition.Opisthograptis, "brimstone", "luteolata", new Color(0xffea40), true, 1.0f, EnumCocoonType.DEFAULT),
|
||||
LatticedHeath(ButterflyBranchDefinition.Chiasmia, "latticeHeath", "clathrata", new Color(0xf2f0be), true, 0.5f, EnumCocoonType.DEFAULT) {
|
||||
Brimstone(ButterflyBranchDefinition.Opisthograptis, "brimstone", "luteolata", new Color(0xffea40), true, 1.0f),
|
||||
LatticedHeath(ButterflyBranchDefinition.Chiasmia, "latticeHeath", "clathrata", new Color(0xf2f0be), true, 0.5f) {
|
||||
@Override
|
||||
protected void setAlleles(IAllele[] alleles) {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.SIZE, EnumAllele.Size.SMALLEST);
|
||||
}
|
||||
},
|
||||
Atlas(ButterflyBranchDefinition.Attacus, "atlas", "atlas", new Color(0xd96e3d), false, 0.1f, EnumCocoonType.DEFAULT) {
|
||||
Atlas(ButterflyBranchDefinition.Attacus, "atlas", "atlas", new Color(0xd96e3d), false, 0.1f) {
|
||||
@Override
|
||||
protected void setAlleles(IAllele[] alleles) {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.SIZE, EnumAllele.Size.LARGEST);
|
||||
}
|
||||
},
|
||||
BombyxMori(ButterflyBranchDefinition.Bombyx, "bombyxMori", "bombyxMori", new Color(0xDADADA), false, 0.05f, EnumCocoonType.SILK){
|
||||
BombyxMori(ButterflyBranchDefinition.Bombyx, "bombyxMori", "bombyxMori", new Color(0xDADADA), false, 0.05f){
|
||||
|
||||
@Override
|
||||
protected void setSpeciesProperties(IAlleleButterflySpeciesBuilder species) {
|
||||
@@ -56,6 +56,12 @@ public enum MothDefinition implements IButterflyDefinition {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.SIZE, EnumAllele.Size.SMALLEST);
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.SPEED, EnumAllele.Speed.SLOWER);
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.METABOLISM, 4);
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.COCOON, AlleleButterflyCocoon.cocoonSilk);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerMutations() {
|
||||
registerMutation(MothDefinition.LatticedHeath, ButterflyDefinition.Brimstone, 7);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -64,7 +70,7 @@ public enum MothDefinition implements IButterflyDefinition {
|
||||
private IAllele[] template;
|
||||
private IButterflyGenome genome;
|
||||
|
||||
MothDefinition(ButterflyBranchDefinition branchDefinition, String speciesName, String binomial, Color serumColor, boolean dominant, float rarity, EnumCocoonType cocoonType) {
|
||||
MothDefinition(ButterflyBranchDefinition branchDefinition, String speciesName, String binomial, Color serumColor, boolean dominant, float rarity) {
|
||||
branch = branchDefinition;
|
||||
|
||||
String uid = "moth" + name();
|
||||
@@ -73,10 +79,8 @@ public enum MothDefinition implements IButterflyDefinition {
|
||||
String unlocalizedDescription = "for.description." + uid;
|
||||
|
||||
String texture = "butterflies/" + uid;
|
||||
|
||||
IButterflyCocoonProvider cocoonProvider = new DefaultCocoonProvider(cocoonType.name().toLowerCase(Locale.ENGLISH));
|
||||
|
||||
IAlleleButterflySpeciesBuilder speciesBuilder = ButterflyManager.butterflyFactory.createSpecies("forestry." + uid, unlocalizedName, "Sengir", unlocalizedDescription, Constants.RESOURCE_ID, texture, dominant, branchDefinition.getBranch(), binomial, serumColor, cocoonProvider);
|
||||
IAlleleButterflySpeciesBuilder speciesBuilder = ButterflyManager.butterflyFactory.createSpecies("forestry." + uid, unlocalizedName, "Sengir", unlocalizedDescription, Constants.RESOURCE_ID, texture, dominant, branchDefinition.getBranch(), binomial, serumColor);
|
||||
speciesBuilder.setRarity(rarity);
|
||||
speciesBuilder.setNocturnal();
|
||||
setSpeciesProperties(speciesBuilder);
|
||||
@@ -114,8 +118,20 @@ public enum MothDefinition implements IButterflyDefinition {
|
||||
|
||||
}
|
||||
|
||||
protected final IButterflyMutationCustom registerMutation(MothDefinition parent1, MothDefinition parent2, int chance) {
|
||||
return ButterflyManager.butterflyMutationFactory.createMutation(parent1.species, parent2.species, getTemplate(), chance);
|
||||
protected final IButterflyMutationCustom registerMutation(IButterflyDefinition parent1, IButterflyDefinition parent2, int chance) {
|
||||
IAlleleButterflySpecies species1 = null;
|
||||
IAlleleButterflySpecies species2 = null;
|
||||
if(parent1 instanceof MothDefinition){
|
||||
species1 = ((MothDefinition) parent1).species;
|
||||
}else if(parent1 instanceof ButterflyDefinition){
|
||||
species1 = ((ButterflyDefinition) parent1).getSpecies();
|
||||
}
|
||||
if(parent2 instanceof MothDefinition){
|
||||
species2 = ((MothDefinition) parent2).species;
|
||||
}else if(parent2 instanceof ButterflyDefinition){
|
||||
species2 = ((ButterflyDefinition) parent2).getSpecies();
|
||||
}
|
||||
return ButterflyManager.butterflyMutationFactory.createMutation(species1, species2, getTemplate(), chance);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -138,4 +154,8 @@ public enum MothDefinition implements IButterflyDefinition {
|
||||
IButterfly butterfly = getIndividual();
|
||||
return ButterflyManager.butterflyRoot.getMemberStack(butterfly, flutterType);
|
||||
}
|
||||
|
||||
public IAlleleButterflySpecies getSpecies() {
|
||||
return species;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2011-2014 SirSengir.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the GNU Lesser Public License v3
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* Various Contributors including, but not limited to:
|
||||
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
|
||||
******************************************************************************/
|
||||
package forestry.lepidopterology.genetics.alleles;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.lepidopterology.EnumButterflyChromosome;
|
||||
import forestry.api.lepidopterology.EnumCocoonType;
|
||||
import forestry.api.lepidopterology.IAlleleButterflyCocoon;
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.genetics.alleles.AlleleCategorized;
|
||||
|
||||
public class AlleleButterflyCocoon extends AlleleCategorized implements IAlleleButterflyCocoon {
|
||||
|
||||
public static IAlleleButterflyCocoon cocoonDefault;
|
||||
public static IAlleleButterflyCocoon cocoonSilk;
|
||||
private static List<IAlleleButterflyCocoon> cocoonAlleles;
|
||||
|
||||
public static void createAlleles() {
|
||||
List<IAlleleButterflyCocoon> cocoonAlleles = Arrays.asList(
|
||||
cocoonDefault = new AlleleButterflyCocoon("default", EnumCocoonType.DEFAULT, false),
|
||||
cocoonSilk = new AlleleButterflyCocoon("silk", EnumCocoonType.SILK, false)
|
||||
);
|
||||
|
||||
for (IAlleleButterflyCocoon cocoonAllele : cocoonAlleles) {
|
||||
AlleleManager.alleleRegistry.registerAllele(cocoonAllele, EnumButterflyChromosome.COCOON);
|
||||
}
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
private EnumCocoonType type;
|
||||
|
||||
public AlleleButterflyCocoon(String name, @Nonnull EnumCocoonType type, boolean isDominant) {
|
||||
super(Constants.MOD_ID, "fruit", name, isDominant);
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumCocoonType getCocoonType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCocoonTexture(int age) {
|
||||
return "textures/blocks/lepidopterology/cocoons/" + type + "_" + age + ".png";
|
||||
}
|
||||
|
||||
}
|
||||
+1
-10
@@ -37,7 +37,6 @@ import forestry.api.lepidopterology.EnumButterflyChromosome;
|
||||
import forestry.api.lepidopterology.EnumFlutterType;
|
||||
import forestry.api.lepidopterology.IAlleleButterflySpecies;
|
||||
import forestry.api.lepidopterology.IAlleleButterflySpeciesBuilder;
|
||||
import forestry.api.lepidopterology.IButterflyCocoonProvider;
|
||||
import forestry.api.lepidopterology.IButterflyRoot;
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.genetics.alleles.AlleleSpecies;
|
||||
@@ -55,16 +54,13 @@ public class AlleleButterflySpecies extends AlleleSpecies implements IAlleleButt
|
||||
|
||||
private final Map<ItemStack, Float> butterflyLoot = new HashMap<>();
|
||||
private final Map<ItemStack, Float> caterpillarLoot = new HashMap<>();
|
||||
|
||||
private final IButterflyCocoonProvider cocoonProvider;
|
||||
|
||||
public AlleleButterflySpecies(String uid, String unlocalizedName, String authority, String unlocalizedDescription, String modID, String texturePath, boolean isDominant, IClassification branch, String binomial, Color serumColour, IButterflyCocoonProvider cocoonProvider) {
|
||||
public AlleleButterflySpecies(String uid, String unlocalizedName, String authority, String unlocalizedDescription, String modID, String texturePath, boolean isDominant, IClassification branch, String binomial, Color serumColour) {
|
||||
super(uid, unlocalizedName, authority, unlocalizedDescription, isDominant, branch, binomial);
|
||||
this.serumColour = serumColour;
|
||||
|
||||
this.modID = modID;
|
||||
this.texture = texturePath;
|
||||
this.cocoonProvider = cocoonProvider;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -223,9 +219,4 @@ public class AlleleButterflySpecies extends AlleleSpecies implements IAlleleButt
|
||||
public String getModID() {
|
||||
return modID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IButterflyCocoonProvider getCocoonProvider() {
|
||||
return cocoonProvider;
|
||||
}
|
||||
}
|
||||
@@ -49,7 +49,7 @@ public class RendererCocoon extends TileEntitySpecialRenderer<TileCocoon> {
|
||||
GL11.glTranslated((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F);
|
||||
GL11.glRotated(180, 0F, 0F, 1F);
|
||||
GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
|
||||
Proxies.render.bindTexture(new ResourceLocation(species.getModID(), species.getCocoonProvider().getCocoonTexture(age)));
|
||||
Proxies.render.bindTexture(new ResourceLocation(species.getModID(), butterfly.getGenome().getCocoon().getCocoonTexture(age)));
|
||||
modelCocoon.renderCucoon(age);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user