Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public class ConfigHandler {
public static boolean allowBonusGen = false;
public static boolean allowGolemGen = true;
public static boolean allowPigmanGen = false;
public static boolean disableVillagerTrade = true;

public static boolean chatSpam = true;

Expand Down Expand Up @@ -331,6 +332,8 @@ private static void loadConfiguration() {
"worldgen",
false,
"Allow generation of Pigman Backpacks in dungeon loot and villager trades");
disableVillagerTrade = config
.getBoolean("Disable Villager Trade", "worldgen", true, "Disables trade for Villager Backpacks");

// Experimental
bossBarIndent = config.getInt(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
public class ModWorldGen {

public static void init() {
{
if (!ConfigHandler.disableVillagerTrade) {
ItemStack backpack = BackpackUtils.createBackpackStack(VILLAGER);
VillagerRegistry.instance().registerVillageTradeHandler(1, new ModWorldGen.TradeHandler(backpack));
VillagerRegistry.instance().registerVillageTradeHandler(2, new ModWorldGen.TradeHandler(backpack));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,23 @@ public BackpackRecipesList() {
Squid = reviewRecipe("BIB", "IaI", "BIB", 'a', backpack, 'B', woolBlue, 'I', new ItemStack(Items.dye, 1, 0));

Sponge = reviewRecipe(covered, 'X', Blocks.sponge, 'a', backpack);

Villager = reviewRecipe(
"LGL",
"DaD",
"CEC",
'L',
new ItemStack(Blocks.log, 1, 0),
'G',
Blocks.glass,
'D',
Items.wooden_door,
'a',
backpack,
'C',
Blocks.cobblestone,
'E',
Blocks.emerald_block);
}

public final Object[] Silverfish;
Expand Down Expand Up @@ -581,6 +598,7 @@ public BackpackRecipesList() {
public final Object[] Yellow;
public final Object[] Zombie;
public final Object[] ModdedNetwork;
public final Object[] Villager;

public static Object[] reviewRecipe(Object... objects) {
return objects;
Expand Down