SpawnerRange

Discussion in 'Plugin Requests' started by Resoluciones, Oct 24, 2019.

  1. Offline

    Resoluciones

    Plugin category: Miscellaneous

    Minecraft version: Paper version git-Paper-221 (MC: 1.14.4) (Implementing API version 1.14.4-R0.1-SNAPSHOT)

    Suggested name: SpawnerRange


    What I want: I would like a command to set the mob spawners activation range.

    Ideas for commands:

    /spawnerrange 19 # it will set the spawner activation range to 19

    Ideas for permissions: No permissions for users, the command should be only valid for console and operators.

    Ideas for configuration: Not needed.

    When I'd like it by: when possible.

    [​IMG]

    Thanks!
     
  2. Offline

    pulsepvp_

  3. Offline

    Reflxction

    Working on it. Give me a few hours

    EDIT: Plugin's done. Download it <Edit by Moderator: Redacted mediafire url> here[/URL].

    Note: What the plugin edits is this one (from the Wiki): [​IMG]
    Do tell me if you want it to change another value.
     
    Last edited by a moderator: Nov 8, 2019
  4. Offline

    Resoluciones

    hi @Reflxction ! Thanks! Can you pls. resend the link? It was edited by the moderator!

    Thanks!!!!!!!!!!!
     
  5. Offline

    KarimAKL

     
  6. Offline

    Reflxction

  7. Offline

    Resoluciones

    thank you @Reflxction for taking the time to do the plugin! Plugin is loading OK.

    When the command is being executed, the following message appears: "The target block is not a spawner". Maybe my explanation was not complete, what I wanted with that command is to change the range of all active spawners of the server. In my server the command won't be executed ingame, it will be executed by other plugins "as" operator.

    In case that can be done, it would great!!!

    Let me know!

    Thanks!
     
  8. Offline

    pulsepvp_

    I’ll do it when I have time, within a week ! :)
     
    Last edited by a moderator: Nov 12, 2019
    Resoluciones likes this.
  9. Offline

    Reflxction

    Oh, the reason it is saying this is that you have to be looking at a certain spawner to change its own spawner range. I guess I misunderstood your request. I'll take a look at how to change all spawners, though I do not make any promises that I'll come with a result
     
  10. Offline

    timtower Moderator Moderator

    Loop over a chunk in the chunk load event and listen for block places.
     
  11. Offline

    Reflxction

    I'm not entirely sure about that, though I came up with a simpler solution: change the spawner range in PreSpawnerSpawnEvent (in Paper API) which should update it if it hadn't changed already. I think this should do the job.

    Do note that it does require Paper to function.

    Download: https://www.dropbox.com/s/n7v3hnkdve92zsq/SpawnerRange-1.0-SNAPSHOT.jar?dl=0
     
  12. Offline

    Resoluciones

    thanks @Reflxction , I've been doing some quick tests with the plugin.

    The command seems to be processed correctly, also it's good you have set a message in console to let us know that the command was executed.

    On the other hand, when you set the spaner range to i.e. 2 and you are at 20 blocks of distance, the spawner keeps spawning anyway. And the idea was to modify (by command) the range at which mobs spawns from all active spawners. This makes me think that the plugin is not working as I expected, or maybe I didn't explain in detail what I need.

    Or maybe the modified range won't be active/modified until some conditions met i.e. chunk unloading and loading again, I don't know, as I only did quick tests until now. I will test it more in deep soon.

    Let me know.
     

Share This Page