Add more null annotations

This commit is contained in:
mezz committed 2016-11-16 21:56:31 -08:00
1 parent 60d2820ed6
commit 4dfa29b1ad
11 files changed
+42 -7

No files matched your search

@@ -53,11 +53,13 @@ public class TreeGenome extends Genome implements ITreeGenome {
}
@Override
@Nonnull
public IAlleleTreeSpecies getPrimary() {
return (IAlleleTreeSpecies) getActiveAllele(EnumTreeChromosome.SPECIES);
}
@Override
@Nonnull
public IAlleleTreeSpecies getSecondary() {
return (IAlleleTreeSpecies) getInactiveAllele(EnumTreeChromosome.SPECIES);
}
@@ -104,6 +106,7 @@ public class TreeGenome extends Genome implements ITreeGenome {
}
@Override
@Nonnull
public ISpeciesRoot getSpeciesRoot() {
return TreeManager.treeRoot;
}
@@ -10,6 +10,7 @@
******************************************************************************/
package forestry.arboriculture.genetics;
import javax.annotation.Nonnull;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -239,7 +240,7 @@ public class TreeRoot extends SpeciesRoot implements ITreeRoot {
}
@Override
public boolean setFruitBlock(World world, IAlleleFruit allele, float sappiness, BlockPos pos) {
public boolean setFruitBlock(@Nonnull World world, @Nonnull IAlleleFruit allele, float sappiness, BlockPos pos) {
EnumFacing facing = BlockUtil.getValidPodFacing(world, pos);
if (facing == null) {
@@ -53,7 +53,7 @@ public class TileFruitPod extends TileEntity implements IFruitBearer, IStreamabl
Log.debug("Made a fruit pod");
}
public void setProperties(IAlleleFruit allele, float sappiness) {
public void setProperties(@Nonnull IAlleleFruit allele, float sappiness) {
this.allele = allele;
this.sappiness = sappiness;
}
@@ -74,6 +74,7 @@ public class TileFruitPod extends TileEntity implements IFruitBearer, IStreamabl
sappiness = nbttagcompound.getFloat("SP");
}
@Nonnull
@Override
public NBTTagCompound writeToNBT(NBTTagCompound nbttagcompound) {
nbttagcompound = super.writeToNBT(nbttagcompound);