St-ructure-Mods / BuildingGadgets-Fabric

Fabric port of Building Gadgets
MIT License
16 stars 2 forks source link

The config change of energy doesn't applied #19

Closed LiXuanqi closed 2 years ago

LiXuanqi commented 2 years ago

Building Gadgets version

1.0.6

Minecraft Version

1.18.1

Modpack & Version

No response

Do you have optifine installed?

No

Describe the issue

Even I changed the energyCost of gadgets in configs. the settings don't apply in game.

Steps to reproduce

  1. Change the energyCost / maxEnergy in mod menu or config file. This is my config after change.
    {
    "general": {
    "rayTraceRange": 32.0,
    "allowAbsoluteCoords": true,
    "absoluteCoordDefault": false,
    "allowOverwriteBlocks": true
    },
    "gadgets": {
    "maxRange": 15,
    "placeSteps": 1024,
    "gadgetBuilding": {
      "maxEnergy": 0,
      "energyCost": 0
    },
    "gadgetExchanger": {
      "maxEnergy": 0,
      "energyCost": 0
    },
    "gadgetDestruction": {
      "maxEnergy": 0,
      "energyCost": 0,
      "destroySize": 16,
      "nonFuzzyMultiplier": 2,
      "nonFuzzyEnabled": false
    },
    "gadgetCopyPaste": {
      "maxEnergy": 0,
      "energyCost": 0,
      "copySteps": 32768,
      "maxCopySize": 256,
      "maxBuildSize": 256
    },
    "undoSize": 128,
    "undoExpiry": 300000
    }
    }
  2. Create a new game.
  3. Change to creative mode and get a building gadget with 0 energy.
  4. Change back to survival mode and use it.
  5. Because the energyCost is 0, so I expect it works without energy. but it doesn't.

Expected behaviour

Because the energyCost is 0, so I expect it works without energy. but it doesn't.

Screenshots

No response

Log files

No response

Additional information

No response

Information

ProjectET commented 2 years ago

have you restarted your game?

LiXuanqi commented 2 years ago

Thanks for your quick reply.

Yes, I restarted the game and recreated the world. does it work on your side?

ProjectET commented 2 years ago

you dont need to recreate the world, yes the way the config gadget energy cost works is at register time so restarting should work

LiXuanqi commented 2 years ago

屏幕截图 2021-12-26 165525 hope this helpful.

For the setting I posted, the "maxEnergy": 0, so I hope the max energy should also be 0k. but it's 500.0k now, which makes me feel the config change is not applied.

ProjectET commented 2 years ago

hmm ill have a look

LiXuanqi commented 2 years ago

cool, thanks for fixing it. I will test it

LiXuanqi commented 2 years ago

works. thanks again!

ProjectET commented 2 years ago

np