[Bug][1.18.1] JEI Compatibility does not call IGuiContainerHandler#getGuiClickableAreas
gisellevonbingen opened this issue ยท 0 comments
Describe the bug
idk has any plan update JEI Compatibility
Anyway, no call this anywhere
As you know, there should be a function that displays 'View Recipes for XXX' when you mouse over the arrow button.
Builtin containers and below code are working
@Override
public void registerGuiHandlers(IGuiHandlerRegistration registration) {
// this is working
registration.addRecipeClickArea(NasaWorkbenchGuiWindow.class, 108, 49, 14, 14, NASAWorkbenchJeiCategory.Uid);
}
but it doesn't show when use IGuiContainerHandler
@Override
public void registerGuiHandlers(IGuiHandlerRegistration registration) {
// not show 'View Recipes for Compressor'
registration.addGuiContainerHandler(CompressorGuiWindow.class, new CompressorGuiContainerHandler());
}
---
public class CompressorGuiContainerHandler implements IGuiContainerHandler<CompressorGuiWindow> {
public CompressorGuiContainerHandler() {
}
@Override
public Collection<IGuiClickableArea> getGuiClickableAreas(CompressorGuiWindow containerScreen, double mouseX, double mouseY) {
return Collections.singleton(new IGuiClickableArea() {
@Override
public Rect2i getArea() {
return new Rect2i(62, 36, 24, 17);
}
@Override
public void onClick(IFocusFactory focusFactory, IRecipesGui recipesGui) {
recipesGui.showCategories(Arrays.asList(CompressorJeiCategory.Uid));
}
@Override
public List<Component> getTooltipStrings() {
List<Component> list = new ArrayList<>();
list.add(GaugeTextHelper.getStorageText(containerScreen.getMenu().getBlockEntity().getCookTimeGaugeValue()).build());
list.add(new TranslatableComponent("jei.tooltip.show.recipes"));
return list;
}
});
}
}
Environment (please complete the following information with the version):
- Minecraft: 1.18.1
- Mod Loader: forge-39.0.19
- RoughlyEnoughItems-7.1.390
- RoughlyEnoughItems-jei-internals-workaround-7.1.390