Modern Industrialization

Modern Industrialization

4M Downloads

[1.20.1] KubeJS recipe builder ignores decimals when using liquids with partial mB in a recipe

KonSola5 opened this issue · 0 comments

commented

Using

ServerEvents.recipes(event => {
    event.recipes.modern_industrialization.mixer(2, 100)
       .fluidIn("tconstruct:molten_iron", 222.22)
       .fluidIn("tconstruct:molten_nickel", 111.11)
       .fluidOut("tconstruct:molten_invar", 333.33)
})

should create a recipe that takes 222 ¹⁸/₈₁ mB of Molten Iron and 111 ⁹/₈₁ mB of Molten Nickel to create 333 ²⁷/₈₁ mB of Molten Invar.
However, that's not the case:
obraz

Note that creating the recipe with a .json file does, what I would except:

ServerEvents.recipes(event => {
    event.custom({
    "type": "modern_industrialization:mixer",
    "eu": 2,
    "duration": 100,
    "fluid_inputs": [
      {
        "fluid": "tconstruct:molten_iron",
        "amount": 222.22
      },
      {
        "fluid": "tconstruct:molten_nickel",
        "amount": 111.11
      }
    ],
    "fluid_outputs": {
      "fluid": "tconstruct:molten_invar",
      "amount": 333.33
    }
  })
})

obraz