use of com.teamresourceful.resourcefulbees.block.HoneycombBlock in project ResourcefulBees by Resourceful-Bees.
the class ColorHandler method onItemColors.
public static void onItemColors(ColorHandlerEvent.Item event) {
ItemColors colors = event.getItemColors();
BEE_REGISTRY.getBees().forEach(((s, beeData) -> {
HoneycombData honeycombData = beeData.getHoneycombData();
if (honeycombData.getHoneycombType().equals(HoneycombType.DEFAULT) && !honeycombData.getColor().isDefault()) {
registerItems(colors, HoneycombItem::getColor, BeeInfoUtils.getItem(ResourcefulBees.MOD_ID + ":" + s + "_honeycomb"));
registerItems(colors, HoneycombBlock::getItemColor, BeeInfoUtils.getItem(ResourcefulBees.MOD_ID + ":" + s + "_honeycomb_block"));
}
if (!beeData.getRenderData().getColorData().getSpawnEggPrimaryColor().isDefault() && !beeData.getRenderData().getColorData().getSpawnEggSecondaryColor().isDefault()) {
registerItems(colors, BeeSpawnEggItem::getColor, BeeInfoUtils.getItem(ResourcefulBees.MOD_ID + ":" + s + "_bee_spawn_egg"));
}
}));
HoneyRegistry.getRegistry().getHoneyBottles().forEach((h, honeyData) -> {
registerItems(colors, CustomHoneyBottleItem::getColor, honeyData.getHoneyBottleRegistryObject().get());
if (Config.HONEY_GENERATE_BLOCKS.get() && honeyData.doGenerateHoneyBlock()) {
registerItems(colors, CustomHoneyBlock::getItemColor, honeyData.getHoneyBlockItemRegistryObject().get());
}
if (Config.HONEY_GENERATE_FLUIDS.get() && honeyData.doGenerateHoneyFluid()) {
registerItems(colors, CustomHoneyBucketItem::getColor, honeyData.getHoneyBucketItemRegistryObject().get());
}
});
registerItems(colors, BeeJar::getColor, ModItems.BEE_JAR.get());
}
use of com.teamresourceful.resourcefulbees.block.HoneycombBlock in project ResourcefulBees by Resourceful-Bees.
the class RegistryHandler method registerHoneycomb.
private static void registerHoneycomb(String name, HoneycombData honeycombData) {
final RegistryObject<Block> customHoneycombBlock = ModBlocks.BLOCKS.register(name + "_honeycomb_block", () -> new HoneycombBlock(name, honeycombData, BlockBehaviour.Properties.copy(Blocks.HONEYCOMB_BLOCK)));
ModItems.ITEMS.register(name + "_honeycomb", () -> new HoneycombItem(name, honeycombData, new Item.Properties().tab(ItemGroupResourcefulBees.RESOURCEFUL_BEES)));
ModItems.ITEMS.register(name + "_honeycomb_block", () -> new BlockItem(customHoneycombBlock.get(), new Item.Properties().tab(ItemGroupResourcefulBees.RESOURCEFUL_BEES)));
}
use of com.teamresourceful.resourcefulbees.block.HoneycombBlock in project ResourcefulBees by Resourceful-Bees.
the class ColorHandler method onBlockColors.
public static void onBlockColors(ColorHandlerEvent.Block event) {
BlockColors colors = event.getBlockColors();
BEE_REGISTRY.getBees().forEach(((s, beeData) -> {
HoneycombData honeycombData = beeData.getHoneycombData();
if (honeycombData.getHoneycombType().equals(HoneycombType.DEFAULT) && (!honeycombData.getColor().isDefault())) {
registerBlocks(colors, HoneycombBlock::getBlockColor, BeeInfoUtils.getBlock(ResourcefulBees.MOD_ID + ":" + s + "_honeycomb_block"));
}
}));
HoneyRegistry.getRegistry().getHoneyBottles().forEach((h, honeyData) -> {
if (Config.HONEY_GENERATE_BLOCKS.get() && honeyData.doGenerateHoneyBlock()) {
registerBlocks(colors, CustomHoneyBlock::getBlockColor, honeyData.getHoneyBlockRegistryObject().get());
}
});
}
Aggregations