Restrict the radius to 20 #188

Closed
ncurran02 wants to merge 1 commits from patch-1 into master
ncurran02 commented 2021-04-10 21:41:04 -04:00 (Migrated from github.com)

If it is any larger, it would cause a server to crash.

If it is any larger, it would cause a server to crash.
Wild1145 (Migrated from github.com) approved these changes 2021-04-11 07:27:16 -04:00
Wild1145 (Migrated from github.com) left a comment

This is an issue we've ran into on our server a few times, and is currently the only thing we have to customise before we can use this plugin, if we can get it fixed on here it would be greatly appreciated :)

This is an issue we've ran into on our server a few times, and is currently the only thing we have to customise before we can use this plugin, if we can get it fixed on here it would be greatly appreciated :)
Jikoo commented 2021-04-11 16:54:46 -04:00 (Migrated from github.com)

I'm now maintaining OpenInv over at https://github.com/Jikoo/OpenInv - needed owner access to add secrets, and I feel impolite sending lishid an email that amounts to "pls op"

While I get that this is a problem, 20 is a limit based on your hardware's capabilities. Others may not be able to handle that. I've been in the process of rewriting search (guess I should probably push out what I've got so people can see where it stands) and ideally this won't be a concern at all as of next release.

I'm now maintaining OpenInv over at https://github.com/Jikoo/OpenInv - needed owner access to add secrets, and I feel impolite sending lishid an email that amounts to "pls op" While I get that this is a problem, 20 is a limit based on your hardware's capabilities. Others may not be able to handle that. I've been in the process of rewriting search (guess I should probably push out what I've got so people can see where it stands) and ideally this won't be a concern at all as of next release.
Wild1145 commented 2021-04-11 16:59:14 -04:00 (Migrated from github.com)

Thanks for that, (Might be worth adding something to the README or something on here to make that more obvious, because it's not clear this is no longer the supported repo).

We've experimented with various options, and 20 seemed to do the trick, but either way for us having something to restrict the max radius, right now we're maintaining a fork of this repo just to add these lines of code, which quite frankly is a headache I don't really want for the sake of this!

But yeah, whatever can be done to make this not a problem would be ideal, the less custom stuff I have to worry about and the dev team need to be worried about the better as far as I'm concerned. Cheers.

Thanks for that, (Might be worth adding something to the README or something on here to make that more obvious, because it's not clear this is no longer the supported repo). We've experimented with various options, and 20 seemed to do the trick, but either way for us having *something* to restrict the max radius, right now we're maintaining a fork of this repo just to add these lines of code, which quite frankly is a headache I don't really want for the sake of this! But yeah, whatever can be done to make this not a problem would be ideal, the less custom stuff I have to worry about and the dev team need to be worried about the better as far as I'm concerned. Cheers.
Jikoo commented 2021-04-11 18:09:11 -04:00 (Migrated from github.com)

Yeah, I should probably add a notice to the readme.

Basically, search is consolidated into one system. Player search includes ender chest. Chunks and players are searchable simultaneously, but only X (default 5) are searched per tick (totaling 100 players and/or chunks per second) up to a cap of Y (default 40) results. This leverages Paper's async chunk loading if possible. Console is allowed to search, though this has limited use because it's read-only. Search results include (for players, at least) clickable text components with relevant commands (teleports for containers, /open commands for player/ender) for ease of use.

I've pushed my incomplete work in 916a8c0c55a7a5989bfd00731312bb6d12c19f3a. It's not usable yet - parsing item matching details isn't written at all - but it should give a rough feel for the direction I'm trying to take it. Suggestions are welcome for additions or changes.

Command usage looks like this:
/search chunk <some way to identify items>
/search player <some way to identify items>
/search players,chunk <some way to identify items>
/search chunks;load:true;r:5,players;offline:true <some way to identify items>
/search chunks;r:10 <some way to identify items>

I'm particularly open to suggestions regarding command formatting. It's clunky to type (a fully optioned-out chunk search looks like chunks;world:world_the_end;x:10;z:-3;r:10;load:false), but the potential available parameters make parsing details a nightmare otherwise. I'm basically hoping tab completion will save my bacon in terms of usability - if I can get that good enough it won't matter as much how awful setting up the options is.

Yeah, I should probably add a notice to the readme. Basically, search is consolidated into one system. Player search includes ender chest. Chunks and players are searchable simultaneously, but only X (default 5) are searched per tick (totaling 100 players and/or chunks per second) up to a cap of Y (default 40) results. This leverages Paper's async chunk loading if possible. Console is allowed to search, though this has limited use because it's read-only. Search results include (for players, at least) clickable text components with relevant commands (teleports for containers, /open commands for player/ender) for ease of use. I've pushed my incomplete work in 916a8c0c55a7a5989bfd00731312bb6d12c19f3a. It's not usable yet - parsing item matching details isn't written at all - but it should give a rough feel for the direction I'm trying to take it. Suggestions are welcome for additions or changes. Command usage looks like this: `/search chunk <some way to identify items>` `/search player <some way to identify items>` `/search players,chunk <some way to identify items>` `/search chunks;load:true;r:5,players;offline:true <some way to identify items>` `/search chunks;r:10 <some way to identify items>` I'm particularly open to suggestions regarding command formatting. It's clunky to type (a fully optioned-out chunk search looks like `chunks;world:world_the_end;x:10;z:-3;r:10;load:false`), but the potential available parameters make parsing details a nightmare otherwise. I'm basically hoping tab completion will save my bacon in terms of usability - if I can get that good enough it won't matter as much how awful setting up the options is.

Pull request closed

Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: minster586/OpenInv#188
No description provided.