use of net.fabricmc.fabric.api.item.v1.FabricItemSettings in project winterly by tyap-lyap.
the class WinterlyItems method settings.
private static FabricItemSettings settings() {
FabricItemSettings settings = new FabricItemSettings();
settings.group(WinterlyMod.ITEM_GROUP);
return settings;
}
use of net.fabricmc.fabric.api.item.v1.FabricItemSettings in project BCLib by paulevsGitch.
the class WoodenComplexMaterial method initStorage.
protected final void initStorage(FabricBlockSettings blockSettings, FabricItemSettings itemSettings) {
addBlockEntry(new BlockEntry(BLOCK_CHEST, (complexMaterial, settings) -> new BaseChestBlock(getBlock(BLOCK_PLANKS))).setBlockTags(NamedCommonBlockTags.CHEST, NamedCommonBlockTags.WOODEN_CHEST).setItemTags(NamedCommonItemTags.CHEST, NamedCommonItemTags.WOODEN_CHEST));
addBlockEntry(new BlockEntry(BLOCK_BARREL, (complexMaterial, settings) -> new BaseBarrelBlock(getBlock(BLOCK_PLANKS))).setBlockTags(NamedCommonBlockTags.BARREL, NamedCommonBlockTags.WOODEN_BARREL).setItemTags(NamedCommonItemTags.BARREL, NamedCommonItemTags.WOODEN_BARREL));
}
use of net.fabricmc.fabric.api.item.v1.FabricItemSettings in project BCLib by paulevsGitch.
the class WoodenComplexMaterial method initDecorations.
protected final void initDecorations(FabricBlockSettings blockSettings, FabricItemSettings itemSettings) {
addBlockEntry(new BlockEntry(BLOCK_CRAFTING_TABLE, (complexMaterial, settings) -> new BaseCraftingTableBlock(getBlock(BLOCK_PLANKS))).setBlockTags(NamedCommonBlockTags.WORKBENCHES).setItemTags(NamedCommonItemTags.WORKBENCHES));
addBlockEntry(new BlockEntry(BLOCK_BOOKSHELF, (complexMaterial, settings) -> new BaseBookshelfBlock(getBlock(BLOCK_PLANKS))).setBlockTags(NamedCommonBlockTags.BOOKSHELVES));
addBlockEntry(new BlockEntry(BLOCK_COMPOSTER, (complexMaterial, settings) -> new BaseComposterBlock(getBlock(BLOCK_PLANKS))));
}
use of net.fabricmc.fabric.api.item.v1.FabricItemSettings in project Terracraft by SimplyCmd.
the class BlockRegistry method register.
public static void register() {
// Blocks
hellstone_block = new SimpleBlock(ID("hellstone_block"), new Block(FabricBlockSettings.of(Material.METAL).strength(1.5f, 6.0f).requiresTool())).withItem(ItemModel.BLOCK, (block) -> new BlockItem(block, new FabricItemSettings().group(ItemGroup.BUILDING_BLOCKS)));
grass_bale = new SimpleBlock(ID("grass_bale"), new HayBlock(FabricBlockSettings.of(Material.SOLID_ORGANIC, MapColor.PALE_GREEN).strength(0.5F).sounds(BlockSoundGroup.GRASS))).withItem(ItemModel.BLOCK, (block) -> new BlockItem(block, new FabricItemSettings().group(ItemGroup.BUILDING_BLOCKS)));
dart_trap = new SimpleBlock(ID("dart_trap"), new DartTrapBlock(FabricBlockSettings.of(Material.STONE).strength(1.5f, 6.0f).requiresTool())).withItem(ItemModel.BLOCK, (block) -> new BlockItem(block, new FabricItemSettings().group(ItemGroup.REDSTONE)));
blue_berry_bush = new SimpleBlock(ID("blue_berry_bush"), new BlueBerryBushBlock(FabricBlockSettings.of(Material.PLANT).ticksRandomly().noCollision().sounds(BlockSoundGroup.SWEET_BERRY_BUSH)));
daybloom = new SimpleBlock(ID("daybloom"), new DaybloomBlock(FabricBlockSettings.of(Material.PLANT).ticksRandomly().noCollision().sounds(BlockSoundGroup.CROP)));
life_crystal = new SimpleBlock(ID("life_crystal"), new Block(FabricBlockSettings.of(Material.AMETHYST, MapColor.BRIGHT_RED).sounds(BlockSoundGroup.LARGE_AMETHYST_BUD))).defaultBlockstate().withItem(ItemModel.ITEM, (block) -> new LifeCrystalBlockItem(block, new FabricItemSettings().group(ItemGroup.DECORATIONS)));
ice_torch = torch("ice", ParticleTypes.SOUL_FIRE_FLAME, tr(Items.ICE));
bone_torch = torch("bone", ParticleTypes.SOUL_FIRE_FLAME, tr(Items.BONE));
ultrabright_torch = torch("ultrabright", ParticleTypes.SOUL_FIRE_FLAME, tr(Items.GLOW_BERRIES));
demon_torch = torch("demon", ParticleTypes.SOUL_FIRE_FLAME, tr(Items.GHAST_TEAR));
cursed_torch = torch("cursed", ParticleTypes.SOUL_FIRE_FLAME, tr(Items.PHANTOM_MEMBRANE));
ichor_torch = torch("ichor", ParticleTypes.SOUL_FIRE_FLAME, tr(Items.DANDELION));
rainbow_torch = torch("rainbow", ParticleTypes.SOUL_FIRE_FLAME, tr(Items.PRISMARINE_SHARD));
desert_torch = torch("desert", ParticleTypes.SOUL_FIRE_FLAME, tr(Items.SANDSTONE));
coral_torch = torch("coral", ParticleTypes.SOUL_FIRE_FLAME, tr(Items.SEA_PICKLE));
corrupt_torch = torch("corrupt", ParticleTypes.SOUL_FIRE_FLAME, tr(Items.BLACKSTONE));
crimson_torch = torch("crimson", ParticleTypes.SOUL_FIRE_FLAME, tr(Items.NETHER_WART));
hallowed_torch = torch("hallowed", ParticleTypes.SOUL_FIRE_FLAME, tr(Items.SWEET_BERRIES));
jungle_torch = torch("jungle", ParticleTypes.SOUL_FIRE_FLAME, tr(Items.BAMBOO));
forest_pot = new SimpleBlock(ID("forest_pot"), new PotBlock(4, 1 / 500.0, Items.TORCH, 1.0F)).withItem(ItemModel.BLOCK, (block) -> new BlockItem(block, new FabricItemSettings().group(ItemGroup.DECORATIONS)));
tundra_pot = new SimpleBlock(ID("tundra_pot"), new PotBlock(3, 1 / 461.0, BlockRegistry.ice_torch.getItem().getItem(), 1.25F)).withItem(ItemModel.BLOCK, (block) -> new BlockItem(block, new FabricItemSettings().group(ItemGroup.DECORATIONS)));
jungle_pot = new SimpleBlock(ID("jungle_pot"), new PotBlock(3, 1 / 400.0, BlockRegistry.jungle_torch.getItem().getItem(), 1.75F)).withItem(ItemModel.BLOCK, (block) -> new BlockItem(block, new FabricItemSettings().group(ItemGroup.DECORATIONS)));
dungeon_pot = new SimpleBlock(ID("dungeon_pot"), new PotBlock(3, 1 / 384.0, Items.TORCH, 1.9F)).withItem(ItemModel.BLOCK, (block) -> new BlockItem(block, new FabricItemSettings().group(ItemGroup.DECORATIONS)));
underworld_pot = new SimpleBlock(ID("underworld_pot"), new PotBlock(3, 1 / 365.0, Items.TORCH, 2.1F)).withItem(ItemModel.BLOCK, (block) -> new BlockItem(block, new FabricItemSettings().group(ItemGroup.DECORATIONS)));
corrupt_pot = new SimpleBlock(ID("corrupt_pot"), new PotBlock(3, 1 / 365.0, BlockRegistry.corrupt_torch.getItem().getItem(), 1.6F)).withItem(ItemModel.BLOCK, (block) -> new BlockItem(block, new FabricItemSettings().group(ItemGroup.DECORATIONS)));
crimson_pot = new SimpleBlock(ID("crimson_pot"), new PotBlock(3, 1 / 365.0, BlockRegistry.crimson_torch.getItem().getItem(), 1.6F)).withItem(ItemModel.BLOCK, (block) -> new BlockItem(block, new FabricItemSettings().group(ItemGroup.DECORATIONS)));
hallowed_pot = new SimpleBlock(ID("hallowed_pot"), new PotBlock(3, 1 / 365.0, BlockRegistry.hallowed_torch.getItem().getItem(), 1.6F)).withItem(ItemModel.BLOCK, (block) -> new BlockItem(block, new FabricItemSettings().group(ItemGroup.DECORATIONS)));
spider_pot = new SimpleBlock(ID("spider_pot"), new PotBlock(3, 1 / 272.0, Items.TORCH, 3.5F)).withItem(ItemModel.BLOCK, (block) -> new BlockItem(block, new FabricItemSettings().group(ItemGroup.DECORATIONS)));
pyramid_pot = new SimpleBlock(ID("pyramid_pot"), new PotBlock(3, 1 / 125.0, Items.TORCH, 10.0F)).withItem(ItemModel.BLOCK, (block) -> new BlockItem(block, new FabricItemSettings().group(ItemGroup.DECORATIONS)));
lihzahrd_pot = // TODO: Portal values are 1/250 for hm and 1/500 for pre-hm AND modifier is 4.0F hm and 1.0F pre-hm
new SimpleBlock(ID("lihzahrd_pot"), new PotBlock(3, 1 / 250.0, Items.TORCH, 4.0F)).withItem(ItemModel.BLOCK, (block) -> new BlockItem(block, new FabricItemSettings().group(ItemGroup.DECORATIONS)));
marble_pot = new SimpleBlock(ID("marble_pot"), new PotBlock(3, 1 / 375.0, Items.TORCH, 2.0F)).withItem(ItemModel.BLOCK, (block) -> new BlockItem(block, new FabricItemSettings().group(ItemGroup.DECORATIONS)));
desert_pot = new SimpleBlock(ID("desert_pot"), new PotBlock(3, 1 / 461.0, BlockRegistry.desert_torch.getItem().getItem(), 1.25F)).withItem(ItemModel.BLOCK, (block) -> new BlockItem(block, new FabricItemSettings().group(ItemGroup.DECORATIONS)));
}
use of net.fabricmc.fabric.api.item.v1.FabricItemSettings in project Terracraft by SimplyCmd.
the class BlockRegistry method torch.
private static Torch torch(String prefix, ParticleType<?> particle, JIngredient resource) {
final String torch = prefix + "_torch";
final String wallTorch = prefix + "_wall_torch";
final SimpleBlock block1 = new SimpleBlock(ID(torch), new CustomTorchBlock(FabricBlockSettings.of(Material.DECORATION).noCollision().breakInstantly().luminance((state) -> 10).sounds(BlockSoundGroup.WOOD), ParticleTypes.SOUL_FIRE_FLAME));
final SimpleBlock block2 = new SimpleBlock(ID(wallTorch), new CustomWallTorchBlock(FabricBlockSettings.of(Material.DECORATION).noCollision().breakInstantly().luminance((state) -> 10).sounds(BlockSoundGroup.WOOD), ParticleTypes.SOUL_FIRE_FLAME));
final SimpleItem item1 = new SimpleItem(ID(torch), new WallStandingBlockItem(block1.getBlock(), block2.getBlock(), new FabricItemSettings().group(ItemGroup.DECORATIONS))).blockItemModel(block1.getBlock());
// Delay this until after said items are registered
Resources.RESOURCE_PACK.addRecipe(ID(torch), JRecipe.shaped(JPattern.pattern("X", "#", "S"), JKeys.keys().key("X", JIngredient.ingredient().item(Items.COAL).item(Items.CHARCOAL)).key("#", JIngredient.ingredient().item(Items.STICK)).key("S", resource), JResult.itemStack(item1.getItem(), 4)));
return new Torch(block1, block2, item1);
}
Aggregations