KubeJS Additions

KubeJS Additions

2M Downloads

[bug] Trouble with render background

Closed this issue · 5 comments

commented

I wrote this code for my category:
JEIAddedEvents.registerCategories((event) => {
const guiHelper = event.JEI_HELPERS.guiHelper
event.custom("kubejsadditions:advanced_assembly", (category) => {
category.title("Suka Blyat")
.background(guiHelper.createBlankDrawable(200, 100))
.icon(guiHelper.createDrawableItemStack(Item.of('immersiveengineering:screwdriver')))
.isRecipeHandled((recipe) => {
if (!recipe) return false;
if (!recipe.data) return false;
if (!recipe.data.needItems) return false;
if (!recipe.data.needBlock) return false;
if (!recipe.data.resultBlock) return false;
return true;
})
.handleLookup((builder, recipe, focuses) => {
let slotX = 10;
let slotY = 10;
for (let [comp, compCount] of Object.entries(recipe.data.needItems)) {
builder.addSlot("INPUT", slotX, slotY).addItemStack(Item.of(comp, compCount)).setSlotName(${slotX}${slotY});
slotX += 20
if (slotX > 60) {
slotX = 10
slotY += 20
}
}
})
.setDrawHandler((recipe, recipeSlotsView, guiGraphics, mouseX, mouseY) => {
})
});
});
But in game Size of background equals 10x10.
https://imgur.com/a/ziMTWyn
Restart of game didnt help.
Maybe i made a mistake in the code... Or this is just bug.

commented

Game ver 1.20.1 forge
Forge ver 47.4.0
JEI ver 15.20.0.106
KubeJS ver 2001.6.5-build.16
KubeJS Additions ver 4.3.4

commented

https://imgur.com/a/mLtk8mJ
Example is not working too(

commented

same here with the newest version

commented

same here with the newest version

There was a change in JEI version that changes how each category define’s its dimensions.

The default size is no longer based on the background image size.

If you explicitly set the category size this should fix the issue.

commented

same here with the newest version

There was a change in JEI version that changes how each category define’s its dimensions.

The default size is no longer based on the background image size.

If you explicitly set the category size this should fix the issue.

Yeah! It worked! thx so much