Skip to content

Commit d8f8b1f

Browse files
committed
i'm seeing stars tonight
1 parent a14b5d7 commit d8f8b1f

3 files changed

Lines changed: 13 additions & 6 deletions

File tree

src/main/java/turing/tmb/client/ScreenTMBRecipe.java

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -303,17 +303,21 @@ public void render(int mx, int my, float partialTick) {
303303
}
304304
}
305305
}
306-
if(defaultRecipe){
307-
slot.draw(TMB.getRuntime().getGuiHelper(),1,1,0,1);
308-
} else {
309-
slot.draw(TMB.getRuntime().getGuiHelper());
306+
slot.draw(TMB.getRuntime().getGuiHelper());
307+
if (defaultRecipe) {
308+
GLRenderer.pushFrame();
309+
GLRenderer.modelM4f().translate(0, 0, 2);
310+
mc.textureManager.loadTexture("/assets/tmb/textures/gui/star.png").bind();
311+
drawTexturedModalRect(12D, 1, 0, 0, 6, 6, 256, 256);
312+
GLRenderer.popFrame();
310313
}
311314
if (ingredients.size() > I) {
312315
GLRenderer.modelM4f().translate(1, 1, 0);
313316
X++;
314317
Y++;
315318
IIngredientList list = ingredients.get(I);
316319
ITypedIngredient<?> ingredient = TMB.getRuntime().getGuiHelper().getCycleTimer().getCycledItem(list.getIngredients());
320+
boolean isItemGroup = (list instanceof IngredientList Ingredientlist && Ingredientlist.itemGroup != null);
317321

318322
if (lookupContext != null) {
319323
Optional<ITypedIngredient<?>> found = list.getIngredients().stream().filter((t) -> t.hashCode() == lookupContext.getIngredient().hashCode()).findFirst();
@@ -327,13 +331,16 @@ public void render(int mx, int my, float partialTick) {
327331
new DrawableIngredient<>(ingredient.getIngredient(), renderer).draw(TMB.getRuntime().getGuiHelper());
328332
drawnIngredients.add(Pair.of(ingredient, Pair.of(X, Y)));
329333
recipeIngredients.add(new RecipeIngredient(ingredient, recipe, category, slot.getRole()));
334+
if (isItemGroup) {
335+
drawStringNoShadow(mc.font, "*", 1, 10, 0xFFFFFF);
336+
}
330337
if (mx >= X && mx < X + 16 && my >= Y && my < Y + 16) {
331338
int mouseX = mx - ((this.width - this.xSize) / 2) - 4;
332339
int mouseY = my - ((this.height - this.ySize) / 2) - 14 - ((category.getBackground().getHeight() + 4) * i);
333340
renderer.getTooltip(tooltipBuilder, ingredient.getIngredient(), isCtrl, isShift);
334341
slot.getTooltips(tooltipBuilder, ingredient.getIngredient(), mouseX, mouseY, isCtrl, isShift);
335342
tooltipBuilder.addAll(category.getTooltips(recipe, slot, mouseX, mouseY));
336-
if (list instanceof IngredientList && ((IngredientList) list).itemGroup != null) {
343+
if (isItemGroup) {
337344
tooltipBuilder.add(TextFormatting.formatted(I18n.getInstance().translateKeyAndFormat("tmb.tooltip.itemGroup", ((IngredientList) list).itemGroup), TextFormatting.LIGHT_GRAY));
338345
}
339346
if(slot.getRole() == RecipeIngredientRole.OUTPUT){

src/main/resources/assets/tmb/lang/en_US/en_US.lang

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ tmb.category.shapedCrafting=Shaped Crafting
22
tmb.category.shapelessCrafting=Shapeless Crafting
33
tmb.category.info=Info
44

5-
tmb.tooltip.itemGroup=Accepts any: %s
5+
tmb.tooltip.itemGroup=* Accepts any: %s
66
tmb.tooltip.allCategories=Click to see all categories
77
tmb.tooltip.fillRecipe=Press %s to autofill recipe.
88

496 Bytes
Loading

0 commit comments

Comments
 (0)