EndermanofD00M / Project-Tracker

9 stars 4 forks source link

Mobs Teleport To Attack Enemies When On Guard Blocks - Engender 1.12.2 #8

Open Mrbt0907 opened 4 years ago

Mrbt0907 commented 4 years ago

Describe The Bug For some reason, engendered mobs attack hostile mobs far away from the Guard Block that they are assigned to.

Expected Behavior They should not teleport to the enemy if they don't see it.

To Reproduce 1:) Place down a Guard Block 100 blocks in the air with a platform for your mobs 2:) Right click on the Guard Block to assign your mobs up there 3:) Mobs should teleport down despite being far away

Attachments N/A

Mrbt0907 commented 4 years ago

It appears that when an Engendered Mob is assigned to a Guard Block, they can see that entire area that the Guard Block covers. Even if a mob can't see the enemies, if it is withing the Guard Block's range, they attack that enemy.

Furthermore, the issue lies with how the Guard Block sets it's range. The Y value appears to not be a factor as mobs 100+ blocks above can see enemies below. The fix is to set the Y value for the range of the Guard Block.