Skip to content
This repository was archived by the owner on Jan 3, 2020. It is now read-only.

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RecursiveG committed May 17, 2016
1 parent bfbe41d commit 8bbf9b9
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/main/java/org/devinprogress/autoharvest/TickListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.AxisAlignedBB;
Expand Down Expand Up @@ -269,12 +270,14 @@ private void feedTick() {
p.posX + range, p.posY + range, p.posZ + range);
for (Class<? extends EntityAnimal> type : animalList) {
for (EntityAnimal e : p.getEntityWorld().getEntitiesWithinAABB(type, box)) {
if (e.getGrowingAge() == 0 && !e.isInLove()) {
FMLClientHandler.instance().getClient().playerController
if (e.getGrowingAge() >= 0 && !e.isInLove()) {
EnumActionResult result = FMLClientHandler.instance().getClient().playerController
.interactWithEntity(p, e, handItem, EnumHand.MAIN_HAND);
lastUsedItem = handItem;
minusOneInHand();
return;
if (result == EnumActionResult.SUCCESS) {
lastUsedItem = handItem;
minusOneInHand();
return;
}
}
}
}
Expand Down

0 comments on commit 8bbf9b9

Please # to comment.