/*
 * Aeronica's mxTune MOD
 * Copyright 2018, Paul Boese a.k.a. Aeronica
 *
 *   Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
 *   You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 */
package net.aeronica.mods.mxtune.world;

import net.aeronica.mods.mxtune.init.ModItems;
import net.aeronica.mods.mxtune.util.VillagerUtils;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.registry.VillagerRegistry.VillagerCareer;
import net.minecraftforge.fml.common.registry.VillagerRegistry.VillagerProfession;

public class VillageMusician
{
    private VillageMusician() { /* NOP */ }

    @EventBusSubscriber
    public static class RegistrationHandler
    {
        private RegistrationHandler() { /* NOP */ }

        @SubscribeEvent
        public static void registerVillagers(final RegistryEvent.Register<VillagerProfession> event)
        {
            event.getRegistry().register(villagerMusician());
        }

        private static VillagerProfession villagerMusician()
        {
            VillagerProfession musician = new VillagerProfession("mxtune:musician", "mxtune:textures/entity/musican.png",
                                                                 "minecraft:textures/entity/zombie_villager/zombie_villager.png");
            VillagerCareer musicianCareer = new VillagerCareer(musician, "mxtune:musician");
            VillagerUtils.addSellTrade(musicianCareer, new ItemStack(Items.LEATHER, 1), 1, 2);
            VillagerUtils.addSellTrade(musicianCareer, new ItemStack(Items.STRING, 1), 1, 2);
            VillagerUtils.addSellTrade(musicianCareer, new ItemStack(ModItems.ITEM_MUSIC_PAPER, 1), 1, 2);
            VillagerUtils.addSellTrade(musicianCareer, new ItemStack(Blocks.CLAY, 1), 1, 2);
            VillagerUtils.addSellTrade(2, musicianCareer, new ItemStack(Items.REDSTONE, 1), 2, 4);
            VillagerUtils.addSellTrade(5, musicianCareer, new ItemStack(ModItems.ITEM_SPINET_PIANO), 6, 10);
            VillagerUtils.addSellTrade(5, musicianCareer, new ItemStack(ModItems.ITEM_BAND_AMP), 8, 12);
            return musician;
        }
    }
}

@@ -790,42 +790,8 @@
 ls;%0A
-import net.minecraft.init.Blocks;%0A
 impo
@@ -2100,18 +2100,16 @@
 ems.
-LEATH
+PAP
 ER, 
-1
+2
 ), 1
@@ -2193,17 +2193,17 @@
 ems.
-STRING, 1
+DYE, 1, 0
 ), 1
@@ -2304,24 +2304,24 @@
 _PAPER, 
-1), 1, 2
+3), 2, 3
 );%0A     
@@ -2346,32 +2346,35 @@
 ls.addSellTrade(
+2, 
 musicianCareer, 
@@ -2391,29 +2391,159 @@
 ack(
-Blocks.CLAY
+ModItems.ITEM_INGREDIENTS, 1, 0), 3, 5);%0A            VillagerUtils.addSellTrade(2, musicianCareer, new ItemStack(ModItems.ITEM_INGREDIENTS, 1
 , 1), 
-1, 2
+3, 5
 );%0A 
@@ -2640,16 +2640,129 @@
  2, 4);%0A
+            VillagerUtils.addSellTrade(3, musicianCareer, new ItemStack(ModItems.ITEM_MULTI_INST, 1, 28), 4, 8);%0A
         

Update village musician trade items