mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-22 05:02:34 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
29d8fed2a3 | ||
|
|
9b05c7e7d2 |
No files matched your search
@@ -3,9 +3,9 @@ name: Build and test
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master, main ]
|
branches: [ master, main, release/** ]
|
||||||
push:
|
push:
|
||||||
branches: [ master, main ]
|
branches: [ master, main, release/** ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-test:
|
build-and-test:
|
||||||
|
|||||||
@@ -39,6 +39,13 @@ public class Inoculator {
|
|||||||
NBTTagList chromosomes = genomeNBT.getTagList("Chromosomes", 10);
|
NBTTagList chromosomes = genomeNBT.getTagList("Chromosomes", 10);
|
||||||
NBTTagCompound chromosomeNBT = chromosomes.getCompoundTagAt(chromosomeID);
|
NBTTagCompound chromosomeNBT = chromosomes.getCompoundTagAt(chromosomeID);
|
||||||
chromosomeNBT.setString("UID" + chromoN, gene.getAllele().getUID());
|
chromosomeNBT.setString("UID" + chromoN, gene.getAllele().getUID());
|
||||||
|
if (gene.getChromosome() == EnumBeeChromosome.LIFESPAN && gene.getSpeciesRoot() instanceof IBeeRoot beeRoot) {
|
||||||
|
int lifespan = beeRoot.getMember(target).getGenome().getLifespan();
|
||||||
|
beeNBT.setInteger(
|
||||||
|
"Health",
|
||||||
|
Math.max(0, beeNBT.getInteger("Health") + lifespan - beeNBT.getInteger("MaxH")));
|
||||||
|
beeNBT.setInteger("MaxH", lifespan);
|
||||||
|
}
|
||||||
target.setTagCompound(beeNBT);
|
target.setTagCompound(beeNBT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -37,6 +37,13 @@ public class Splicer {
|
|||||||
NBTTagList chromosomes = genomeNBT.getTagList("Chromosomes", 10);
|
NBTTagList chromosomes = genomeNBT.getTagList("Chromosomes", 10);
|
||||||
NBTTagCompound chromosomeNBT = chromosomes.getCompoundTagAt(chromosomeID);
|
NBTTagCompound chromosomeNBT = chromosomes.getCompoundTagAt(chromosomeID);
|
||||||
chromosomeNBT.setString("UID" + chromoN, gene.getAllele().getUID());
|
chromosomeNBT.setString("UID" + chromoN, gene.getAllele().getUID());
|
||||||
|
if (gene.getChromosome() == EnumBeeChromosome.LIFESPAN && gene.getSpeciesRoot() instanceof IBeeRoot beeRoot) {
|
||||||
|
int lifespan = beeRoot.getMember(target).getGenome().getLifespan();
|
||||||
|
beeNBT.setInteger(
|
||||||
|
"Health",
|
||||||
|
Math.max(0, beeNBT.getInteger("Health") + lifespan - beeNBT.getInteger("MaxH")));
|
||||||
|
beeNBT.setInteger("MaxH", lifespan);
|
||||||
|
}
|
||||||
target.setTagCompound(beeNBT);
|
target.setTagCompound(beeNBT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user