mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-25 14:24:42 +00:00
Update for 1.11. Missing assets, unstable.
This commit is contained in:
1 parent
30d7365518
commit
9611ae08ae
1145 files changed
+15561
-18107
No files matched your search
@@ -10,9 +10,9 @@
|
||||
******************************************************************************/
|
||||
package forestry.apiculture.genetics;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.cache.CacheBuilder;
|
||||
import com.google.common.cache.CacheLoader;
|
||||
import com.google.common.cache.LoadingCache;
|
||||
@@ -60,16 +60,12 @@ public class BeeGenome extends Genome implements IBeeGenome {
|
||||
.expireAfterAccess(1, TimeUnit.MINUTES)
|
||||
.build(new CacheLoader<NBTTagCompound, BeeGenome>() {
|
||||
@Override
|
||||
public BeeGenome load(@Nonnull NBTTagCompound tagCompound) {
|
||||
public BeeGenome load(NBTTagCompound tagCompound) {
|
||||
return new BeeGenome(tagCompound);
|
||||
}
|
||||
});
|
||||
|
||||
public static BeeGenome fromNBT(NBTTagCompound nbtTagCompound) {
|
||||
if (nbtTagCompound == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return beeGenomeCache.getUnchecked(nbtTagCompound);
|
||||
}
|
||||
|
||||
@@ -84,9 +80,7 @@ public class BeeGenome extends Genome implements IBeeGenome {
|
||||
|
||||
// NBT RETRIEVAL
|
||||
public static IAlleleBeeSpecies getSpecies(ItemStack itemStack) {
|
||||
if (!BeeManager.beeRoot.isMember(itemStack)) {
|
||||
return null;
|
||||
}
|
||||
Preconditions.checkArgument(BeeManager.beeRoot.isMember(itemStack), "itemStack must be a bee");
|
||||
|
||||
IAlleleSpecies species = getSpeciesDirectly(BeeManager.beeRoot, itemStack);
|
||||
if (species instanceof IAlleleBeeSpecies) {
|
||||
@@ -98,13 +92,11 @@ public class BeeGenome extends Genome implements IBeeGenome {
|
||||
|
||||
// / INFORMATION RETRIEVAL
|
||||
@Override
|
||||
@Nonnull
|
||||
public IAlleleBeeSpecies getPrimary() {
|
||||
return (IAlleleBeeSpecies) getActiveAllele(EnumBeeChromosome.SPECIES);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
public IAlleleBeeSpecies getSecondary() {
|
||||
return (IAlleleBeeSpecies) getInactiveAllele(EnumBeeChromosome.SPECIES);
|
||||
}
|
||||
@@ -170,7 +162,6 @@ public class BeeGenome extends Genome implements IBeeGenome {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
public ISpeciesRoot getSpeciesRoot() {
|
||||
return BeeManager.beeRoot;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user