Posted September 4, 20205 yr I can't seem to find a goal in registerGoals that makes an entity run away from a block, and I don't think any mob in the game does, so I couldn't find an example. Any help would be appreciated.
September 4, 20205 yr 27 minutes ago, BliX5 said: I can't seem to find a goal in registerGoals that makes an entity run away from a block, and I don't think any mob in the game does, so I couldn't find an example. Any help would be appreciated. You could probably create a new goal which is similar to the AvoidEntityGoal, but instead of avoiding entities, you would avoid certain blocks.
September 4, 20205 yr Author I copied the file into my own ai goal directory, but I don't know how to change the target to a block. I tried extending T to Block and Blocks, but I wouldn't really know which terms invoke an entity.
September 4, 20205 yr 22 minutes ago, BliX5 said: I copied the file into my own ai goal directory, but I don't know how to change the target to a block. I tried extending T to Block and Blocks, but I wouldn't really know which terms invoke an entity. Well, it is hard to tell you exactly what needs changing, without just writing the code for you. I think you are going to have to experiment a little on your own. You are on the right track, a good first step is to replace the generic T with Block, and see that needs changing after that.
September 4, 20205 yr Author 15 minutes ago, Silivek said: The Hoglin runs away from Warped Fungus. Maybe try looking into that? I've looked into the HoglinEntity and HoglinTasks java files, but I couldn't find anything specifying warped fungus. It could be located in a different file, but I'm not entirely sure. For now, I'll just stick with making my own goal.
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.