Apply BCLib (WIP)

This commit is contained in:
Aleksey 2021-05-28 16:42:14 +03:00
parent 746613cbf1
commit 006dc63583
65 changed files with 122 additions and 775 deletions

View file

@ -1,6 +1,9 @@
package ru.betterend.tab;
import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder;
import net.minecraft.core.Registry;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
@ -8,6 +11,8 @@ import ru.betterend.BetterEnd;
import ru.betterend.registry.EndBlocks;
import ru.betterend.registry.EndItems;
import java.util.stream.Collectors;
public class CreativeTabs {
public static final CreativeModeTab TAB_BLOCKS;
public static final CreativeModeTab TAB_ITEMS;
@ -15,15 +20,13 @@ public class CreativeTabs {
static {
TAB_BLOCKS = FabricItemGroupBuilder.create(BetterEnd.makeID("end_blocks"))
.icon(() -> new ItemStack(EndBlocks.END_MYCELIUM)).appendItems(stacks -> {
for (Item i : EndItems.getModBlocks()) {
stacks.add(new ItemStack(i));
}
stacks.addAll(EndItems.getModBlocks(BetterEnd.MOD_ID).stream()
.map(ItemStack::new).collect(Collectors.toList()));
}).build();
TAB_ITEMS = FabricItemGroupBuilder.create(BetterEnd.makeID("end_items"))
.icon(() -> new ItemStack(EndItems.ETERNAL_CRYSTAL)).appendItems(stacks -> {
for (Item i : EndItems.getModItems()) {
stacks.add(new ItemStack(i));
}
stacks.addAll(EndItems.getModItems(BetterEnd.MOD_ID).stream()
.map(ItemStack::new).collect(Collectors.toList()));
}).build();
}
}