use of net.devtech.arrp.json.recipe.JIngredient 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