New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changed CreatureSpawnEvent to be EntitySpawnEvent and attempted to ed… #1635
Changed CreatureSpawnEvent to be EntitySpawnEvent and attempted to ed… #1635
Conversation
…it the gui to match
…this probably needs a better test.
Although looping back to my original idea, would this be more suitable as an addon that would not be compatible with addons that required getRemoveWhenFarAway()? |
For testing you can summon all entities.... F.e. if you have enables dragons for your island. But they have a large flying arch. As soon as he flies outside protection range, he is removed from world... That is just wrong. Also, be aware that every pet will be removed as soon as player goes to spawn or visits other players islands. |
I disagree that no persistent entities should be removed, those such as Armour stands, Falling blocks and to some extent primed Tnt should never be leaving the bounds of an island as for this to happen would generally be done by a player and usually is in a griefing attempt which it seems the plugin cannot stop at the moment as far as I'm aware. However I do very much agree that dragons should never be removed, I assume that what you are requesting is that the entire functionality of that entity being deleted be removed. However as I feel it could still have some use being toggleable by the config, so just removing it from the GUI could be useful therefore leaving it as a feature that can be accessed by the few that need it, however will not affect those who do not know what they are doing that could break things. |
However an idea that could possibly suit all needs is setting the velocity of the entity in the direction that it is trying to leave to 0 and hence create a sort of wall, but again I'm not sure of a very clean way to do this. |
I'm wondering what the goals of the geo limit feature are supposed to be and what problems it is supposed to solve. If only entities with The BentoBox documentation itself states:
I guess the documentation doesn't include the case of geo-limiting non-living entities like TNT or armorstands, but those can also be used to create clutter on neighboring plots. I do agree that there is probably a better solution than to simply kill ender dragons, phantoms, and other flying entities that move between islands without being moved by players, but if this worries server admins, one can simply disable geo-limiting for these entities. For pets, maybe we could check To provide a little background for this patch, on our server, people have used slimeblock catapults or TNT cannons to send boats, minecarts, and other unwanted entities to neighboring islands, as a sort of mischief. For this reason, we made sure that TNT would not explode at all as a workaround. But that still doesn't preclude the use of slimeblock catapults to send things over. Now, we want to let people use TNT for farming but not to tamper with others' plots. In the current state, it looks like geo limit can't handle this use-case. |
Ok, what I think can be implemented:
If someone will like to limit all entities, they will be able to do it, but by default it should not be enabled. |
Simple change in an attempt to make TNT be geo limitable.
(Based on chat with tastybento in discord it sounds like this isn't the change you are looking for as many of the entities added do not have getRemoveWhenFarAway(), and I do not currently know a clean way to implement a toggle for this that would be safe from the configs).
Also has the added bonus of being able to geo limit armour stands, falling blocks, fire charges #973 and I assume a number of other entities that weren't caught by CreatureSpawnEvent.
In addition I attempted to change the GUI to match this new ability of geo limit, however this seems to have caused errors in the automated tests and I'm unsure why that is.
In addition I tested every entity that is now available in the geo limit tab and got these results (A number of entities may
need removing from this GUI marked as Needs removing in testing, but I could not come up with a clean way to do this)
(In addition a small addon hack that I made when I was originally testing which makes the same changes can be found here:
https://github.com/Zorua162/GeoLimitEntitesTest)