Custom Entity Slime without Jumps?

Discussion in 'Spigot Plugin Development' started by CoooopaTV, Apr 18, 2017.

  1. Write your own ControllerMoveSlime. You need to remove line 38 in the original ControllerMoveSlime.
    Extend the class, overwrite that one method and copy the original contents in there without line 38.
  2. Example? When i try this, my class is filled by Errors.
    #3 CoooopaTV, Apr 18, 2017
    Last edited: Apr 18, 2017
  3. I think you should be able to figure it out with the hints I gave you. As I said, just create your own move controller or rather extend the existing one and override that one method where the slime jumps (look at line 38 in this code file, the original slime move controller), copy the existing method and remove that one line.

    Wait, after looking at the code a bit more, I just noticed that you just need to remove the PathfinderGoalSlimeRandomJump pathfinder goal.
  4. Instead of asking here, try it on your test server and depending on the result, come back here and write "thank you" or your problem :)
    But it looks like it could work
  5. But it doesn't work and that's the reason for asking.
  6. I don't think you can add goal/target selectors twice. Try clearing the sets first and then adding all again.
    (By the sets, I mean the sets used in the background in the PathfinderGoalSelector class to store the goals. Just use some reflections to get them and call clear() on them)
  7. ** Done with NMS.
  8. WAS


    I'm wondering if reflection is seriously needed? (For reference)
  9. The goal selectors store the goal in a set which is private so yes reflection is needed to remove the existing object in the set.
  10. No, instead create a new instance of goalselector an set it.
    • Agree Agree x 1