-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made Desert Wolfs only follow owner while unsaddled (#66)
- Loading branch information
1 parent
05599c2
commit a89b66f
Showing
2 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
src/main/java/com/teammetallurgy/atum/entity/ai/EntityAIFollowOwnerWithoutSaddle.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.teammetallurgy.atum.entity.ai; | ||
|
||
import com.teammetallurgy.atum.entity.animal.EntityDesertWolf; | ||
import net.minecraft.entity.ai.EntityAIFollowOwner; | ||
|
||
public class EntityAIFollowOwnerWithoutSaddle extends EntityAIFollowOwner { | ||
private final EntityDesertWolf wolf; | ||
|
||
public EntityAIFollowOwnerWithoutSaddle(EntityDesertWolf tameableIn, double followSpeedIn, float minDistIn, float maxDistIn) { | ||
super(tameableIn, followSpeedIn, minDistIn, maxDistIn); | ||
this.wolf = tameableIn; | ||
} | ||
|
||
@Override | ||
public boolean shouldExecute() { | ||
if (wolf.isSaddled()) return false; | ||
return super.shouldExecute(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters