Lightman's Currency

Lightman's Currency

331k Downloads

BUG: Sometimes trading machines make mistakes while calculating discounts.

Pietropil15418 opened this issue ยท 3 comments

commented

Minecraft Version

1.19.4

Forge Version

45.1.2

Lightman's Currency Version

2.1.1.5a

Environment Type

Minecraft Client (Bug/crash happened in a single-player world or while the game was booting)

Other relevant Mods

No other mods were present except for Lightman's Currency.

Describe the bug

in some cases, when configuring trade rules, and either starting a sale or setting discounts for specific people, the trading machine may make slight errors in calculating discounted prices.

To Reproduce

  1. Place any trading machine.
  2. Place any item in it and set a (preferably) high price, for example of 1 netherite coin.
  3. Set a discount for specific people or a sale in the trading machine.
  4. in some cases, the discounted price will be wrong by a slight amount.

Screenshots/Logs/Crash Reports

Example:

item cost: 1 netherite coin
discount: 80%
error: 1 copper coin
image

commented

Update: I appear to have gotten it calculating the discount properly (using the example discount provided)
image

Note that in order to fix this it did make some internal changes and some changes to how discounts are applied, so multiple rules that give discounts will now be additive instead of multiplicative like they used to be (formerly two 20% discounts would result in a 36% total discount, but now two 20% discounts will result in a straight 40% total discount).

I'll hopefully have a build out soon with this fix, but before I can publish any fixes for older versions (1.18.2/1.19.4) I'll need to finish my 1.20 port (this is nearly done, I'm mostly just testing and updating/validating that all of the tags are in order and that everything still works as intended, etc.)

commented

I will look into this and hopefully fix this before the next update is released.

commented

Fix has been applied to all supported versions. Closing the issue.