mojira.dev
MC-275468

Gamerule minecartMaxSpeed can't be set through functions

Trying to set minecartMaxSpeed through a function such as

gamerule minecartMaxSpeed 1000

fails, even when the experimental minecart improvements feature flag is enabled.

 

I tried a workaround using a macro, in case the experimental pack is activated after the function is loaded, but this didn't work.

What I expected to happen was...: it to be set like any other gamerule would be
What actually happened was...: the function failed to load
Steps to Reproduce:

  1. Create a world with the attached datapack

  2. Try running the either of these commands (they are equivalent) 
    /function rennen:set_macro_post {key_1:"minecartMaxSpeed"}
    /function rennen:set_macro_pre

  3. View to log file to see why rennen:set_direct, which just does: 

    gamerule minecartMaxSpeed 1000

    was unable to load

Also attached is a related log file

Attachments

Comments 2

Worth noting that while datapacks cannot normally do this, they can still be set! Here's the method:

  1. Forceload a chunk

  2. Set one of the blocks in that chunk to a repeating command block running the desired command

  3. set the block back to what it previously was

  4. un-forceload the chunk

 

Mostly just a band-aid fix until they fix it themselves. Hope this helps

Rennen_Rig

gegy

Community Consensus

Platform

Normal

Commands, Data Packs

24w33a, 24w36a

24w37a

Retrieved