PaperMC / Paper

The most widely used, high performance Minecraft server that aims to fix gameplay and mechanics inconsistencies
https://papermc.io/
Other
9.67k stars 2.25k forks source link

gamerule naturalRegeneration false not working in the nether #4656

Closed tattan closed 3 years ago

tattan commented 3 years ago

What behaviour is expected:

Setting /gamerule naturalRegeneration false on a server should prevent players from healing without the use of special items, ie potions, golden apples, or a beacon. This should be the case across all dimensions.

What behaviour is observed:

With the gamerule set to false, natural regen does not occur in the overworld, but travelling to the nether causes hunger/stamina to be used up and heath to be regained as though the gamerule were set to true. I have not tested the end dimension.

Steps/models to reproduce:

Start up a server, run the command /gamerule naturalRegeneration false and make a nether portal. Set gamemode to survival and jump off a small cliff. Watch your health increase.

Plugin list:

None

Paper version:

`$ /version

....=>.... [14:32:05 INFO]: This server is running Paper version git-Paper-231 (MC: 1.16.3) (Implementing API version 1.16.3-R0.1-SNAPSHOT) [14:32:05 INFO]: Previous version: git-Paper-230 (MC: 1.16.3) [14:32:05 INFO]: You are running the latest version`

electronicboy commented 3 years ago

Gamerules are per-world in craftbukkit, you'll need to set it in all of them

On Fri, 16 Oct 2020, 19:33 Louis, notifications@github.com wrote:

What behaviour is expected:

Setting /gamerule naturalRegeneration false on a server should prevent players from healing without the use of special items, ie potions, golden apples, or a beacon. This should be the case across all biomes What behaviour is observed:

With the gamerule set to false, natural regen does not occur in the overworld, but travelling to the nether causes hunger/stamina to be used up and heath to be regained as though the gamerule were set to true. I have not tested the end dimension. Steps/models to reproduce:

Start up a server, run the command /gamerule naturalRegeneration false and make a nether portal. Set gamemode to survival and jump off a small cliff. Watch your health increase. Plugin list:

None Paper version:

`$ /version

....=>.... [14:32:05 INFO]: This server is running Paper version git-Paper-231 (MC: 1.16.3) (Implementing API version 1.16.3-R0.1-SNAPSHOT) [14:32:05 INFO]: Previous version: git-Paper-230 (MC: 1.16.3) [14:32:05 INFO]: You are running the latest version`

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/PaperMC/Paper/issues/4656, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJMAZDDNUWFSW3A47LVISLSLCGXFANCNFSM4STVRKKA .

tattan commented 3 years ago

Wow.. not sure how I didn't try that. Is there a way to set game rules without visiting a dimension? ie from the console?

tattan commented 3 years ago

For anyone who finds this in the future, you use \execute in minecraft:the_end run gamerule naturalRegeneration false and replace the_end with your dimension.