BentoBoxWorld / BentoBox

Expandable Minecraft server plugin for island-type games like SkyBlock or AcidIsland.
https://bentobox.world
Eclipse Public License 2.0
328 stars 137 forks source link

Case By Case Entity Spawn Blocking #1133

Open BONNe opened 4 years ago

BONNe commented 4 years ago

Description

Is your feature request related to a problem?

Currently, we have 2 options: Block passive entities and block aggressive entities. But the BentoBox settings menu is improved a lot, and it can handle categories much better, I would suggest implementing the ability to block mob spawning case by case.

Describe the solution you'd like us to implement.

I would like an ability to limit mob spawning case by case, while also keeping 2 general categories.

If a player left-clicks on the current setting, it will toggle the general enabling/disabling option for all passive/hostile mobs, like it is now. If a player right-clicks on the current setting, it will open sub-menu with an ability to select different mob spawning rules. It should list all mobs that relate to the given category, and with a click, he should be able to enable/disable entity natural spawning.

If a user disables general rule but enables spawning rule for one (or several) entities, then the difference should be displayed while hovering on the main category. If a user disables general rule but enables spawning rule for all inside, then a general rule should update to true :) If a user changes a general rule option, it should update the value to all subelements.

Poslovitch commented 4 years ago

It will need #424 to be implemented first.

Nedjii commented 4 years ago

I'd better like an option in the config, I don't want to let players choose what they want to spawn or not, disabled the flag for players.

wellnesscookie commented 4 years ago

Skyblock is one of the servers we have on our network for many years. We never had the feature for animals to spawn on green areas turned on (at least we thought it was off due to no animals on sight), but Iron Golems were spawning just fine without it. I think BBox handles this for a long time already, but I think it was problem on 1.13.2 because animals were not spawning at all on green areas. Now that it magically started to work, it became noticable, so we had to turn off the feature, so our players don't get animals we didn't intend them to have.

Now we have no possibility of Iron Golems spawning for our players at the moment, because other animals are not welcome at the moment.

Nedjii commented 4 years ago

I'm using Askyblock for years and animal spawning never worked but iron golem spawning was working so I got the exact same issue as above with bentobox.

tastybento commented 4 years ago

This feature is best done as a world setting and kept separate from the island-based mobs/monster spawning flags because it is a global/world filter on what mobs an admin wants to allow on their server.

Here's a suggested implementation:

/bsb settings command -> World Settings tab. Similar to geo limited mobs and invincible visitors options that already exist. Admin just clicks which mobs/animals should be allowed to spawn or not.

The config would end up looking something like this:

protection:
  # Geo restrict mobs.
  # Mobs that exit the island space where they were spawned will be removed.
  geo-limit-settings:
  - GHAST
  - BAT
  - BLAZE
  # Animals that will be blocked from spawning naturally
  - BAT
  - LLAMA
  # Monsters that will be blocked from spawning in any way.
  - WITHER
  # Invincible visitors. List of damages that will not affect visitors.
  # Make list blank if visitors should receive all damages
  invincible-visitors:
  - BLOCK_EXPLOSION
  - CONTACT
  - CUSTOM
  - DROWNING
  - ENTITY_ATTACK
  - ENTITY_EXPLOSION
  - FALL
  - FALLING_BLOCK
  - FIRE
  - FIRE_TICK
  - LAVA
  - LIGHTNING
  - MAGIC
  - POISON
  - PROJECTILE
  - STARVATION
  - SUFFOCATION
  - THORNS
  - WITHER
  - DRAGON_BREATH
  - FLY_INTO_WALL
  - HOT_FLOOR
  - CRAMMING
  - VOID

This is pretty simple to do and could operate independently from any island settings. Thoughts?

wellnesscookie commented 4 years ago

Until a few days ago, we thought it toggles on and off for all islands and not per individual. So definitely yes.

tastybento commented 4 years ago

I think the original idea was to make it flexible and control the global state via the default settings. Anyway, if there’s no objection, I can work on this.

Poslovitch commented 4 years ago

Why wouldn't that be part of the island settings? Why should it only be an admin option?

BONNe commented 4 years ago

I think it would be good functionality, to have ability to block mobs from the server-side and island-side.

F.e. As tasty suggested... global setting to disable a certain mob. This setting is not overwritable.

Then there is island based mob spawning, as I suggested: 2 global categories- hostile and passive, and in each category, there are all mobs that fall under it.

Poslovitch commented 4 years ago

But then that would relate to #1053 as well.

Poslovitch commented 4 years ago

Reopening the issue, as #1155 does not entirely fulfill the request.

I.e. we still need to implement this:

there is island based mob spawning, as I suggested: 2 global categories- hostile and passive, and in each category, there are all mobs that fall under it.