mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-21 04:32:24 +00:00
More null annotations
This commit is contained in:
1 parent
da8a833485
commit
a5daa93bf1
163 files changed
+952
-849
No files matched your search
@@ -261,14 +261,14 @@ public class Botany extends AbstractMod {
|
||||
return;
|
||||
}
|
||||
|
||||
if (player != null && heldItem != null) {
|
||||
if (heldItem != null) {
|
||||
Block block = world.getBlockState(pos).getBlock();
|
||||
int py = -1;
|
||||
if (block instanceof IBlockSoil && (world.isAirBlock(pos.up()) || block.isReplaceable(world, pos))) {
|
||||
py = 1;
|
||||
}
|
||||
if (py >= 0) {
|
||||
IFlower flower = BotanyCore.getFlowerRoot().getConversion(event.getEntityPlayer().getHeldItemMainhand());
|
||||
IFlower flower = BotanyCore.getFlowerRoot().getConversion(heldItem);
|
||||
if (flower != null && Gardening.plant(world, pos.add(0, py, 0), flower, player.getGameProfile()) && !player.capabilities.isCreativeMode) {
|
||||
--heldItem.stackSize;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user