Posted February 27, 20223 yr I am currently trying to create a mob which is an extension of skeleton. The problem I am running into is that skeletons vision is limited to 15 blocks. I would like to increase that distance to at-least 100 blocks. Before I was using minecraft.getInstance().player.canSee(entity) but this does not work on server side as the server can have multiple players I wanted to implement this on the mob side. There are no instance I have found online that show this type of Behavior in execution. does anyone know what I method I should look into? or Do you know of an example that has this in execution? Thank you for any help
February 28, 20223 yr i'm not 100% sure, but try setting FOLLOW_RANGE attribute to a different value when you set attributes.
February 28, 20223 yr Author Quote i'm not 100% sure, but try setting FOLLOW_RANGE attribute to a different value when you set attributes. Yea, I tried setting the follow_range. the skeleton just navigates towards the player. I want the skeleton to be able to shoot from further away. I have the shooting long distance figured out. I just want the ability for the skeleton to be able to detect the player. Maybe to rephrase the question, I would like the skeleton to be able to detect the player as target for far away. Edited February 28, 20223 yr by Grandma
March 1, 20223 yr did you examine NearestAttackableTargetGoal? it seems to me that it uses follow range, but i'm not going to do deep investigation instead of you.
March 16, 20223 yr Author If anyone has the same problem in the future. I resolved it by creating a custom goal. Added the custom goal to the mob. In the custom goal -> tick() I used: 1000 is the distance in blocks... I think. PlayerEntity player = world.getNearestPlayer(this.mob,1000); this.mob.canSee(player);
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.