mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Expand Villager Farmer AI to generic crops. (#4745)
This commit is contained in:
1 parent
1d863cdefc
commit
fd201fb690
1 file changed
+13
@@ -1,5 +1,18 @@
|
||||
--- ../src-base/minecraft/net/minecraft/entity/ai/EntityAIHarvestFarmland.java
|
||||
+++ ../src-work/minecraft/net/minecraft/entity/ai/EntityAIHarvestFarmland.java
|
||||
@@ -94,6 +94,12 @@
|
||||
world.func_180501_a(blockpos, Blocks.field_185773_cZ.func_176223_P(), 3);
|
||||
flag = true;
|
||||
}
|
||||
+ else if (itemstack.func_77973_b() instanceof net.minecraftforge.common.IPlantable) {
|
||||
+ if(((net.minecraftforge.common.IPlantable)itemstack.func_77973_b()).getPlantType(world,blockpos) == net.minecraftforge.common.EnumPlantType.Crop) {
|
||||
+ world.func_180501_a(blockpos, ((net.minecraftforge.common.IPlantable)itemstack.func_77973_b()).getPlant(world,blockpos),3);
|
||||
+ flag = true;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
if (flag)
|
||||
@@ -29,7 +29,7 @@
|
||||
{
|
||||
if (this.field_179496_a <= 0)
|
||||
|
||||
Reference in new issue
Block a user