diff options
| author | Unknown <shekwancheung0528@gmail.com> | 2019-06-08 00:20:05 +0800 |
|---|---|---|
| committer | Unknown <shekwancheung0528@gmail.com> | 2019-06-08 00:20:05 +0800 |
| commit | 28adfa726bcdb27eea4ffa39962c881d5c3d929b (patch) | |
| tree | 47976693fe01ae4b81b18dae50cb61589dcf70d9 /src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java | |
| parent | f893515dd0c8b6bd54acde91fd1000ca984a81cd (diff) | |
| download | RoughlyEnoughItems-28adfa726bcdb27eea4ffa39962c881d5c3d929b.tar.gz RoughlyEnoughItems-28adfa726bcdb27eea4ffa39962c881d5c3d929b.tar.bz2 RoughlyEnoughItems-28adfa726bcdb27eea4ffa39962c881d5c3d929b.zip | |
Adds Composting Recipes
Diffstat (limited to 'src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java b/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java index 5d754fb91..6a39f06d9 100644 --- a/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java +++ b/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java @@ -102,7 +102,7 @@ public class VillagerRecipeViewingScreen extends Screen { if (!workingStations.isEmpty()) { int ww = MathHelper.floor((bounds.width - 16) / 18f); int w = Math.min(ww, workingStations.size()); - int h = MathHelper.ceil(workingStations.size() / ((float)ww)); + int h = MathHelper.ceil(workingStations.size() / ((float) ww)); int xx = bounds.x + 16; int yy = bounds.y + bounds.height + 5; widgets.add(new CategoryBaseWidget(new Rectangle(xx - 6, bounds.y + bounds.height - 5, 11 + w * 18, 15 + h * 18))); @@ -133,7 +133,7 @@ public class VillagerRecipeViewingScreen extends Screen { this.widgets.addAll(category.setupDisplay(() -> display, recipeBounds)); Optional<ButtonAreaSupplier> supplier = RecipeHelper.getInstance().getSpeedCraftButtonArea(category); final SpeedCraftFunctional functional = getSpeedCraftFunctionalByCategory(ScreenHelper.getLastContainerScreen(), category); - if (supplier.isPresent()) + if (supplier.isPresent() && supplier.get().get(recipeBounds) != null) this.widgets.add(new SpeedCraftingButtonWidget(supplier.get().get(recipeBounds), supplier.get().getButtonText(), functional, () -> display)); int index = 0; |
