The-Fireplace-Minecraft-Mods / Clans

A Minecraft land protection and PVP mod
https://www.curseforge.com/minecraft/mc-mods/clans
GNU General Public License v3.0
5 stars 10 forks source link

Doesn't seem to count chunks properly when claiming with a formula for claimChunkCostFormula #274

Closed powerjungle closed 2 years ago

powerjungle commented 2 years ago

Describe the bug I start with 10000 gp.

The formula I'm using is:

claimChunkCostFormula: "10000*c"
disbandFeeFormula: 0

I've also setup a 10000 clan creation fee and on creation it adds 10000 to the clan balance.

When doing /clan form asd -> /clan disband, the funds go back to me properly. I have 10000 gp, but here's the issue. If you make 1 claim, it doesn't take any money. If you make 2 claims it takes 10000 and on disband it gives you back 20000. I end up with more money then I started with out of nothing.

What I suspect is that, the chunks get counted initially from 0, not from 1.

When setting the same formula for disbandFeeFormula, it seems to work properly, 2 claims = 20000 gp fee.

To Reproduce Steps to reproduce the behavior (with my config at least):

  1. Start with 10000 gp
  2. /clan form asd
  3. /clan claim
  4. go to another chunk
  5. /clan claim
  6. /clan disband
  7. I now have 20000 gp.

Versions (please complete the following information, do NOT say "latest"):