Custom Machinery

Custom Machinery

3M Downloads

Bug - 1.16.5 wrong tooltip render coordinates

andrewchik0 opened this issue ยท 7 comments

commented

Hello, I am making a machine that will melt resources very quickly. I have encountered a bug with the rendering of the tooltip. If I create two "custommachinery:progress" elements with different coordinates in "components" and "jei", then the tooltip with "Show recipes" button will be rendered incorrectly.

My json code:

"gui": [
    {
      "type": "custommachinery:progress",
      "x": 78, // Coordinates different from jei element
      "y": 53,
      "emptyTexture": "custommachinery:textures/fire.png",
      "filledTexture": "custommachinery:textures/empty.png"
    }
    // Other components
  ],
  "jei": [
    {
      "type": "custommachinery:progress",
      "direction": "top",
      "x": 97,
      "y": 50
    }
    // Other components
  ],

My crafttweaker code:

for recipe in smelterRecipes {
  mods.custommachinery.CMRecipeBuilder.create('my_machines:smelter', 1)
    .requireItem(recipe.input)
    .produceItem(recipe.output)
    .build();
}

Normal tooltip rendering in JEI:

image

Wrong tooltip rendering in GUI:

image

I'd be very glad if you provide any solutions or bugfixes.

Also I noticed, that I can't use zero as a recipe duration in craft tweaker recipe builder.
It's unfortunate because I wanted to make machines that would process resources instantly.

commented

I think that bug was fixed in 1.18.2 but the fix wasn't backported to 1.16.5, I will do that in the next update.

commented

Thank you very much. I'll be waiting.

Also wanted to ask if it would be possible to set zero as the recipe processing time in Craft Tweaker:

mods.custommachinery.CMRecipeBuilder.create("namespace:machine", 0) // It does't work with 0 value
    .requireItem(recipe.input)
    .produceItem(recipe.output)
    .build();
commented

Just pushed an update that fix this bug.
About using 0 ticks in recipes that isn't possible because the machine can only process a recipe once a tick (due to the way it's coded), it would also cause a huge risk of lag.
If you want the machine to produce items faster you can just increase the amount of items in the recipe, but anyway 1 tick is already really fast (0.05s), I don't see why you would need something faster than that.

commented

I just realized that this issue may be because we use different versions of JEI.
Could that be the case?

My mod list

image

commented

I'm sorry, but I sill have this issue in newest version.

Maybe I'm doing something wrong?
I can provide full json file if you can't reproduce this bug.
creative_smelter.txt
GitHub does not support .json files so i renamed it into txt.

And also my recipe that i created with CraftTweaker:

mods.custommachinery.CMRecipeBuilder.create('creative_machines:creative_smelter', 1)
  .requireItem(<item:minecraft:gold_ore>)
  .produceItem(<item:minecraft:gold_ingot>)
  .build();
commented

My bad, I messed up in the fix I pushed earlier, I will reupload the file soon.
Re-open this so I won't forget tomorrow ^^"

commented

That time it should be fixed. I reuploaded the file on curseforge under the same name: Custom-Machinery-1.16.5-0.5.8l You might have to delete and re-download it depending on which launcher you use.