Fix some null warnings

This commit is contained in:
mezz committed 2016-10-20 23:51:14 -07:00
1 parent c6783e573c
commit 3178aa890d
22 files changed
+114 -95

No files matched your search

+1 -4
View File
@@ -174,13 +174,10 @@ public class Botany extends AbstractMod {
if (event.getEntityPlayer() != null && event.getEntityPlayer().getHeldItemMainhand() != null) {
BlockPos down = event.getPos();
Block block = event.getWorld().getBlockState(event.getPos()).getBlock();
if (block == null || !Gardening.isSoil(block)) {
if (!Gardening.isSoil(block)) {
down = down.down();
block = event.getWorld().getBlockState(down).getBlock();
}
if (block == null) {
return;
}
if (Gardening.isSoil(block)) {
final IBlockSoil soil = (IBlockSoil) block;
// if (Gardening.isNutrientFertiliser(event.getEntityPlayer().getHeldItemMainhand()) && soil.getType(event.getWorld(), down) != EnumSoilType.FLOWERBED) {