Add widget size to recipe event (#1053)

This commit is contained in:
slprime authored and GitHub committed 2026-09-27 14:13:27 +03:00
1 parent 5868187410
commit 18abb880f8
2 files changed
+14 -5

No files matched your search

@@ -163,6 +163,8 @@ public class RecipeWidget extends Widget {
final UpdateRecipeButtonsEvent.Pre preEvent = new UpdateRecipeButtonsEvent.Pre(
guiRecipe,
ref,
this.w,
this.h,
this.handlerInfo);
if (MinecraftForge.EVENT_BUS.post(preEvent)) {
@@ -171,6 +173,8 @@ public class RecipeWidget extends Widget {
final UpdateRecipeButtonsEvent.Post postEvent = new UpdateRecipeButtonsEvent.Post(
guiRecipe,
ref,
this.w,
this.h,
getDefaultButtons(ref));
MinecraftForge.EVENT_BUS.post(postEvent);
return postEvent.buttonList;