# Iron Smeltery
# MC 1.7.10; 28 Dec 2014
# Created by Ruins mod version 14.5 Ingame Parser
# authoring Player: Jordan_Greywolf
# Note: "Reward" of rescuing villager is that he can provide a means of "recycling" intact
# but unwanted iron items as a source of iron when it's otherwise scarce.  If iron rarity is
# critical to a game setting, this might pose a problem.

# Updated to MC 1.8: 26 Feb 2016
# Updated to MC 1.9: 29 Apr 2016
# Updated to MC 1.10: 13 Sep 2016
# Updated to MC 1.11: 11 Jan 2017
# Updated to MC 1.12: 23 Jun 2017
# Updated to MC 1.12.1: 9 Sep 2017

uniqueMinDistance=1000

biomesToSpawnIn=alps,alps forest,badlands,brushland,canyon,crag,dead forest,deadlands,dead swamp,deserthills,dry river,extreme hills,extreme hills edge,fire swamp,gravel beach,mesa,mesa (bryce),mesa plateau,mesa plateau f,mesa plateau f m,mesa plateau m,oasis,ominous woods,outback,shield,sludgepit,stone beach,wasteland,mining biome,mining_biome,extreme_hills,extreme_hills_with_trees,mutated_extreme_hills,mutated_extreme_hills_with_trees,smaller_extreme_hills,stone_beach

weight=1
embed_into_distance=2
acceptable_target_blocks=

unacceptable_target_blocks=flowing_water,water,flowing_lava,lava,cloud,Natura:Cloud,slime_congealed,slime_dirt,slime_grass,command_block

dimensions=13,10,7
allowable_overhang=0
max_leveling=3
leveling_buffer=-1
preserve_water=0
preserve_lava=0

rule1=0,100,minecraft:cobblestone-0
rule2=0,100,minecraft:nether_brick-0
rule3=0,100,minecraft:netherrack-0
rule4=0,100,minecraft:sand-0
rule5=0,100,minecraft:lava-0

rule6=0,100,IInventory;minecraft:trapped_chest;minecraft:flint_and_steel#1#0#0+minecraft:torch#5#0#1+minecraft:coal#5#1#2-5

rule7=0,100,IInventory;minecraft:lit_furnace;minecraft:coal#1#1#1-5
rule8=0,100,minecraft:fire-15
rule9=0,100,minecraft:crafting_table-0

# Forge Spirit
rule10=0,100,CommandBlock:RUINSTRIGGER /summon Skeleton ~0 ~0 ~0 {HandItems:[{Count:1,id:iron_sword},{Count:1,id:shield}],ArmorItems:[{Count:1,id:chainmail_boots},{Count:1,id:chainmail_leggings},{Count:1,id:chainmail_chestplate},{Count:1,id:anvil,Damage:2}],CustomName:"Forge Spirit",Health:40.0f,Attributes:[{Name:generic.knockbackResistance,Base:1}],HandDropChances:[2.0F,0.5F],ArmorDropChances:[0.5F,0.5F,0.5F,2.0F],ActiveEffects:[{Id:22,Amplifier:1,Duration:999999},{Id:12,Amplifier:1,Duration:999999},{Id:21,Amplifier:1,Duration:999999},{Id:14,Amplifier:1,Duration:999999},{Id:8,Amplifier:1,Duration:999999},{Id:10,Amplifier:1,Duration:999999},{Id:11,Amplifier:1,Duration:999999},{Id:5,Amplifier:1,Duration:999999}],Silent:1,PersistenceRequired:1}:@

rule11=0,100,minecraft:iron_bars-0
rule12=0,100,minecraft:cobblestone_wall-0
rule13=0,100,minecraft:ladder-3
rule14=1,100,minecraft:torch-5
rule15=0,100,minecraft:nether_brick_stairs-2
rule16=0,100,minecraft:nether_brick_stairs-3
rule17=0,100,minecraft:nether_brick_stairs-1
rule18=0,100,minecraft:double_stone_slab-0
rule19=0,100,minecraft:stone_slab-8
rule20=0,100,minecraft:double_stone_slab-2
rule21=0,100,minecraft:stone_slab-0
rule22=0,100,minecraft:bed-9

# Villager: Iron Smelter
rule23=0,100,CommandBlock:RUINSTRIGGER /summon Villager ~0 ~0 ~0  {Profession:3,Career:3,CustomName:"Iron Smelter",Offers:{Recipes:[{buy:{id:emerald,Count:1},sell:{id:iron_ingot,Count:1}},{buy:{id:coal,Count:24},sell:{id:emerald,Count:1}},{buy:{id:iron_ore,Count:4},sell:{id:iron_ingot,Count:3}},{buy:{id:cauldron,Count:1},sell:{id:iron_ingot,Count:4}},{buy:{id:iron_bars,Count:16},sell:{id:iron_ingot,Count:3}},{buy:{id:flint_and_steel,Count:2},sell:{id:iron_ingot,Count:1}},{buy:{id:iron_pickaxe,Count:1},sell:{id:iron_ingot,Count:2}},{buy:{id:iron_axe,Count:1},sell:{id:iron_ingot,Count:2}},{buy:{id:iron_sword,Count:1},sell:{id:iron_ingot,Count:1}},{buy:{id:iron_hoe,Count:1},sell:{id:iron_ingot,Count:1}},{buy:{id:iron_helmet,Count:1},sell:{id:iron_ingot,Count:3}},{buy:{id:iron_chestplate,Count:1},sell:{id:iron_ingot,Count:4}},{buy:{id:iron_leggings,Count:1},sell:{id:iron_ingot,Count:4}},{buy:{id:iron_boots,Count:1},sell:{id:iron_ingot,Count:2}},{buy:{id:bucket,Count:1},sell:{id:iron_ingot,Count:2}},{buy:{id:iron_door,Count:1},sell:{id:iron_ingot,Count:3}},{buy:{id:compass,Count:1},sell:{id:iron_ingot,Count:2}},{buy:{id:iron_horse_armor,Count:1},sell:{id:iron_ingot,Count:4}},{buy:{id:anvil,Count:1},sell:{id:iron_ingot,Count:9}},{buy:{id:chainmail_helmet,Count:1},sell:{id:iron_ingot,Count:1}},{buy:{id:chainmail_chestplate,Count:1},sell:{id:iron_ingot,Count:2}},{buy:{id:chainmail_leggings,Count:1},sell:{id:iron_ingot,Count:2}},{buy:{id:chainmail_boots,Count:1},sell:{id:iron_ingot,Count:1}}]}}:@

rule24=0,100,minecraft:bed-1
rule25=0,100,minecraft:trapdoor-1
rule26=0,100,minecraft:spruce_stairs-3
rule27=0,100,minecraft:spruce_stairs-2
rule28=0,100,minecraft:carpet-14

# Forge Spirit
rule29=0,100,CommandBlock:RUINSTRIGGER /summon Skeleton ~0 ~0 ~0 {HandItems:[{Count:1,id:bow,tag:{display:{Name:"Forge Bow"},ench:[{id:50,lvl:5},{id:48,lvl:8}]}},{Count:8,id:arrow}],ArmorItems:[{Count:1,id:chainmail_boots},{Count:1,id:chainmail_leggings},{Count:1,id:chainmail_chestplate},{Count:1,id:iron_block}],CustomName:"Forge Spirit",Health:40.0f,Attributes:[{Name:generic.knockbackResistance,Base:1}],HandDropChances:[2.0F,0.5F],ArmorDropChances:[0.5F,0.5F,0.5F,0.0F],ActiveEffects:[{Id:22,Amplifier:1,Duration:999999},{Id:12,Amplifier:1,Duration:999999},{Id:21,Amplifier:1,Duration:999999},{Id:14,Amplifier:1,Duration:999999},{Id:8,Amplifier:1,Duration:999999},{Id:10,Amplifier:1,Duration:999999},{Id:11,Amplifier:1,Duration:999999},{Id:5,Amplifier:1,Duration:999999}],Silent:1,PersistenceRequired:1}:@

layer
1,1,1,1,1,1,1
1,1,1,1,1,1,1
1,1,1,1,1,1,1
1,1,1,1,1,1,1
1,1,1,1,1,1,1
1,1,1,1,1,1,1
1,1,1,1,1,1,1
1,1,1,1,1,1,1
1,1,1,1,1,1,1
1,1,1,1,1,1,1
endlayer

layer
1,1,2,2,2,1,1
1,1,2,3,2,1,1
1,4,2,5,2,4,1
1,4,2,2,2,4,1
1,4,4,4,4,4,1
1,4,4,4,4,4,1
1,4,4,4,4,4,1
4,4,4,4,4,4,4
4,1,4,4,4,1,4
4,1,4,4,4,1,4
endlayer

layer
1,1,2,2,2,1,1
1,9,7,8,7,6,1
1,10,11,0,11,29,1
1,0,11,11,11,0,1
1,0,0,0,0,0,1
1,0,0,0,0,0,1
1,0,0,0,0,0,1
0,0,0,0,0,0,0
0,12,0,0,0,12,0
0,12,0,0,0,12,0
endlayer

layer
1,11,2,2,2,11,1
11,0,7,0,7,0,11
1,0,0,0,0,0,1
11,0,0,0,0,0,11
1,0,0,0,0,13,1
11,0,0,0,0,0,11
1,0,0,0,0,0,1
0,0,0,0,0,0,0
0,12,0,0,0,12,0
0,14,0,0,0,14,0
endlayer

layer
1,1,2,2,2,1,1
1,0,2,0,2,0,1
1,0,16,2,15,0,1
1,0,17,17,17,0,1
1,0,0,0,0,13,1
1,0,0,0,0,0,1
1,0,0,0,0,0,1
0,0,0,0,0,0,0
0,12,0,0,0,12,0
0,0,0,0,0,0,0
endlayer

layer
1,18,18,2,18,18,1
18,19,19,2,19,19,18
18,19,19,19,19,19,18
18,19,19,19,19,18,18
18,19,19,19,19,13,18
18,19,19,19,19,19,18
1,20,20,20,20,20,1
21,19,0,0,0,19,21
21,18,20,20,20,18,21
21,18,19,0,19,18,21
endlayer

layer
1,20,20,2,20,20,1
20,9,19,17,23,22,20
20,0,0,0,0,24,20
20,0,0,0,0,0,20
20,0,0,0,0,25,20
20,0,27,12,26,0,20
1,20,20,20,20,20,1
0,0,21,19,21,0,0
0,0,21,18,21,0,0
0,0,21,18,21,0,0
endlayer

layer
1,20,20,2,20,20,1
20,0,0,12,0,0,20
0,0,0,0,0,0,0
20,0,0,0,0,0,20
0,0,0,0,0,0,0
20,0,0,28,0,0,20
1,20,0,20,0,20,1
0,0,0,0,0,0,0
0,0,0,0,0,0,0
0,0,0,0,0,0,0
endlayer

layer
1,20,20,2,20,20,1
20,0,0,14,0,0,20
11,0,0,0,0,0,11
20,0,0,0,0,0,20
11,0,0,0,0,0,11
20,0,0,0,0,0,20
1,20,11,20,11,20,1
0,0,0,0,0,0,0
0,0,0,0,0,0,0
0,0,0,0,0,0,0
endlayer

layer
1,20,20,2,20,20,1
20,0,0,0,0,0,20
20,0,0,0,0,0,20
20,0,0,0,0,0,20
20,0,0,0,0,0,20
20,0,0,0,0,0,20
1,20,20,20,20,20,1
0,0,0,0,0,0,0
0,0,0,0,0,0,0
0,0,0,0,0,0,0
endlayer

layer
21,18,20,2,20,18,21
21,18,19,0,19,18,21
21,18,19,0,19,18,21
21,18,19,0,19,18,21
21,18,19,0,19,18,21
21,18,19,0,19,18,21
21,18,20,20,20,18,21
21,18,19,0,19,18,21
0,0,0,0,0,0,0
0,0,0,0,0,0,0
endlayer

layer
0,0,21,2,21,0,0
0,0,21,18,21,0,0
0,0,21,18,21,0,0
0,0,21,18,21,0,0
0,0,21,18,21,0,0
0,0,21,18,21,0,0
0,0,21,18,21,0,0
0,0,21,18,21,0,0
0,0,0,0,0,0,0
0,0,0,0,0,0,0
endlayer

layer
0,0,0,2,0,0,0
0,0,0,0,0,0,0
0,0,0,0,0,0,0
0,0,0,0,0,0,0
0,0,0,0,0,0,0
0,0,0,0,0,0,0
0,0,0,0,0,0,0
0,0,0,0,0,0,0
0,0,0,0,0,0,0
0,0,0,0,0,0,0
endlayer

