@@ -157,7 +157,7 @@ public void onLivingUpdate() {
157157 fedTimer --;
158158 }
159159 List <Entity > list = this .world .getEntitiesWithinAABBExcludingEntity (this , this .bb .expand (0.2F , 0.0 , 0.2F ));
160- if (list != null && !list .isEmpty ()) {
160+ if (list != null && !list .isEmpty () && ! isMovementCeased () ) {
161161 for (Entity entity : list ) {
162162 if (entity instanceof IBreeding &&
163163 entity .getClass ().isInstance (this ) &&
@@ -172,7 +172,7 @@ public void onLivingUpdate() {
172172 }
173173 }
174174
175- if (tickCount % 40 == 0 ){
175+ if (tickCount % 40 == 0 && ! isMovementCeased () ){
176176 list = this .world .getEntitiesWithinAABBExcludingEntity (this , this .bb .expand (10F , 10F , 10F ));
177177 if (btabreeding$isBaby () && btabreeding$getPassiveTarget () == null ){
178178 for (Entity entity : list ) {
@@ -185,32 +185,26 @@ public void onLivingUpdate() {
185185 }
186186 }
187187 else if (btabreeding$isFed ()){
188- block0 :
189- {
190- for (Entity entity : list ) {
191- if (entity instanceof IBreeding &&
192- entity .getClass ().isInstance (this ) &&
193- this .btabreeding$isFed () &&
194- ((IBreeding ) entity ).btabreeding$isFed () &&
195- this .btabreeding$isBreedable () &&
196- ((IBreeding ) entity ).btabreeding$isBreedable ()) {
197- this .btabreeding$setPassiveTarget (entity );
198- break block0 ;
199- }
188+ this .btabreeding$setPassiveTarget (null );
189+ for (Entity entity : list ) {
190+ if (entity instanceof IBreeding &&
191+ entity .getClass ().isInstance (this ) &&
192+ this .btabreeding$isFed () &&
193+ ((IBreeding ) entity ).btabreeding$isFed () &&
194+ this .btabreeding$isBreedable () &&
195+ ((IBreeding ) entity ).btabreeding$isBreedable ()) {
196+ this .btabreeding$setPassiveTarget (entity );
197+ break ;
200198 }
201- this .btabreeding$setPassiveTarget (null );
202199 }
203200
204201 } else if (btabreeding$isBreedable ()) {
205- block0 :
206- {
207- for (Entity entity : list ) {
208- if (entity instanceof EntityPlayer && btabreeding$isFoodItem (((EntityPlayer ) entity ).getHeldItem ())) {
209- this .btabreeding$setPassiveTarget (entity );
210- break block0 ;
211- }
202+ this .btabreeding$setPassiveTarget (null );
203+ for (Entity entity : list ) {
204+ if (entity instanceof EntityPlayer && btabreeding$isFoodItem (((EntityPlayer ) entity ).getHeldItem ())) {
205+ this .btabreeding$setPassiveTarget (entity );
206+ break ;
212207 }
213- this .btabreeding$setPassiveTarget (null );
214208 }
215209 }
216210
0 commit comments