Blood Magic

Blood Magic

90M Downloads

Make the arc additional outputs also accept integers as a chance

VampireTechnologyLord opened this issue ยท 3 comments

commented

Issue Description:

The arc currently only accepts additional outputs, if their chance is a float.

What happens:

When trying to add custom recipes via JSON, the JSON parser transforms 1.0 (a float) into 1 (an int) which thus breaks the recipe, leading to it not being added.

What you expected to happen:

Accept 1 as an integer to be a valid chance, not only a float.

Steps to reproduce:

  1. try to add a custom recipe via JSON, with for example a mod like KubeJS and using event.custom().

Affected Versions (Do not use "latest"):

  • BloodMagic: 1.18.2-3.2.5-40
  • Minecraft: 1.18.2
  • Forge: 40.1.73
commented

You sure? What's the output of the log? My reversion recipes for the reinforced ritual stones have a 1.0 chance of the additional outputs, and they work fine.

https://github.com/WayofTime/BloodMagic/blob/1.18.2/src/generated/resources/data/bloodmagic/recipes/arc/reversion/aug_capacity.json

image

Edit: Is part of the issue that KubeJS is casting the 1.0 as a float, so it isn't generating the .json properly?

commented

It seems like the source of the issue is on my side (probably rhino or the JSON parser). I think it would work, if 1 or 0 would be supported as ints anyways, since it seems like i cant force the JSON on my side to have a 1.0 as a float ;)

commented

Turns out I am kinda stupid and just got the mainchance in the wrong place. Sorry for the confusion.