Sponge: Gamerules not being respected in custom worlds

Created on 17 Aug 2016  路  4Comments  路  Source: SpongePowered/Sponge

When creating a custom world, calling WorldProperties.setGameRule("doMobSpawning", "false"), still spawns mobs in the generated world.
Vanilla minecraft shares the GameRules between each world. This way, sponge has no control over gamerules in other worlds.

Most helpful comment

A default-on mixin plugin making the vanilla commands multi-world friendly is in my opinion the most user friendly option.

All 4 comments

Adding to that, the /gamerule command always changes and views gamerules for the default world only

Handling this isn't cut and dry.

Some would argue for this affecting only the world executed in. Some would argue it ought to affect all worlds. We have a split mind happening in the current codebase as some commands affect all worlds, some affect only the one executed in.

I'm leaning towards returning to Vanilla spec and having it affect all worlds but with an optional mixin plugin (which there is a PR for on SpongeCommon) that turns the Vanilla commands into ones that are multi-world friendly. Though even with that, I am tempted to keep it Vanilla-only in Sponge itself and let your commands plugin you are likely using handle doing per-world variants.

@SpongePowered/developers

Could use some feedback here.

A default-on mixin plugin making the vanilla commands multi-world friendly is in my opinion the most user friendly option.

As long as the gamerule checks are performed on the worlds that those rules apply to, then it can indeed be on a commands to decide how to handle the commands. That works for me

Was this page helpful?
0 / 5 - 0 ratings

Related issues

randombyte-developer picture randombyte-developer  路  5Comments

XakepSDK picture XakepSDK  路  5Comments

DarkArc picture DarkArc  路  3Comments

JoeSGT picture JoeSGT  路  5Comments

XakepSDK picture XakepSDK  路  5Comments