Skip to content

Commit e437901

Browse files
committed
Fix eval order error.
Signed-off-by: 秋雨落 <i@rain.cx>
1 parent b3a77dd commit e437901

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
package games.moegirl.sinocraft.sinocore.api.injectable;
22

33
import net.minecraft.world.item.CreativeModeTab;
4-
import net.minecraft.world.item.Item;
54
import net.minecraft.world.item.ItemStack;
5+
import net.minecraft.world.level.ItemLike;
66

77
import java.util.Objects;
88
import java.util.function.Supplier;
99

1010
public interface ISinoCreativeModeTab_Builder {
11-
default CreativeModeTab.Builder sino$icon(Supplier<Item> icon) {
11+
default CreativeModeTab.Builder sino$icon(Supplier<Supplier<? extends ItemLike>> icon) {
1212
Objects.requireNonNull(icon);
13-
return ((CreativeModeTab.Builder) this).icon(() -> new ItemStack(icon.get()));
13+
return ((CreativeModeTab.Builder) this).icon(() -> new ItemStack(icon.get().get()));
1414
}
1515
}

test/src/main/java/games/moegirl/sinocraft/sinocore_test/registry/TestRegistry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public static void registerAll() {
4646

4747
private static void register() {
4848
TEST_TAB = TABS.register("sinocore_test_tab", builder -> {
49-
builder.sino$icon(() -> TestRegistry.TEST_ITEM_TAB_1.get());
49+
builder.sino$icon(() -> TestRegistry.TEST_ITEM_TAB_1);
5050
});
5151

5252
TEST_ITEM_TAB_1 = ITEMS.register("test_item_tab_1", () -> new Item(new Item.Properties().sino$tab(TEST_TAB)));

0 commit comments

Comments
 (0)