-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
src/main/java/com/dreammaster/NHTradeHandler/NHTradeHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.dreammaster.NHTradeHandler; | ||
|
||
import java.util.Random; | ||
|
||
import net.minecraft.entity.passive.EntityVillager; | ||
import net.minecraft.init.Items; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.village.MerchantRecipe; | ||
import net.minecraft.village.MerchantRecipeList; | ||
|
||
import cpw.mods.fml.common.registry.VillagerRegistry.IVillageTradeHandler; | ||
|
||
public class NHTradeHandler implements IVillageTradeHandler { | ||
|
||
@Override | ||
public void manipulateTradesForVillager(final EntityVillager villager, final MerchantRecipeList recipeList, | ||
final Random random) { | ||
recipeList.addToListWithCheck( | ||
new MerchantRecipe(new ItemStack(Items.emerald, 1), new ItemStack(Items.ender_pearl, 1))); | ||
recipeList.addToListWithCheck( | ||
new MerchantRecipe(new ItemStack(Items.emerald, 1), new ItemStack(Items.dye, 1, 4))); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters