From 9b8b7ce6b4357f6fe92c9b3084955e118b27c5b7 Mon Sep 17 00:00:00 2001 From: cora Date: Thu, 12 May 2022 02:05:30 +0200 Subject: [PATCH 01/13] refactor go home logic --- mods/ENTITIES/mobs_mc/villager.lua | 73 +++++++++++++++++------------- 1 file changed, 41 insertions(+), 32 deletions(-) diff --git a/mods/ENTITIES/mobs_mc/villager.lua b/mods/ENTITIES/mobs_mc/villager.lua index 24fbaccbf..1e350270e 100644 --- a/mods/ENTITIES/mobs_mc/villager.lua +++ b/mods/ENTITIES/mobs_mc/villager.lua @@ -347,6 +347,42 @@ local stand_still = function(self) self.jump = false end +local function set_velocity(self, v) + local yaw = (self.object:get_yaw() or 0) + self.rotate + self.object:set_velocity({ + x = (math.sin(yaw) * -v), + y = self.object:get_velocity().y, + z = (math.cos(yaw) * v), + }) +end + +local function go_to_pos(entity,b) + local s=entity.object:get_pos() + local v = { x = b.x - s.x, z = b.z - s.z } + local yaw = (math.atan(v.z / v.x) + math.pi / 2) - entity.rotate + if b.x > s.x then yaw = yaw + math.pi end + entity.object:set_yaw(yaw) + set_velocity(entity,entity.follow_velocity) + if vector.distance(b,s) < 5 then + return true + end +end + +local function go_home(entity) + entity.state = "go_home" + local b=entity.bed + if not b then return end + if go_to_pos(entity,b) then + entity.state = "stand" + set_velocity(entity,0) + entity.object:set_pos(b) + local n=minetest.get_node(b) + if n and n.name ~= "mcl_beds:bed_red_bottom" then + entity.bed=nil --the stormtroopers have killed uncle owen + end + end +end + local update_max_tradenum = function(self) if not self._trades then return @@ -924,35 +960,6 @@ minetest.register_on_joinplayer(function(player) inv:set_size("offered", 1) end) -local function set_velocity(self, v) - local yaw = (self.object:get_yaw() or 0) + self.rotate - self.object:set_velocity({ - x = (math.sin(yaw) * -v), - y = self.object:get_velocity().y, - z = (math.cos(yaw) * v), - }) -end - -local function go_home(entity) - local b=entity.bed - local s=entity.object:get_pos() - if not b then return end - local v = { x = b.x - s.x, z = b.z - s.z } - local yaw = (math.atan(v.z / v.x) + math.pi / 2) - entity.rotate - if b.x > s.x then yaw = yaw + math.pi end - entity.object:set_yaw(yaw) - set_velocity(entity,entity.follow_velocity) - entity.state = "go_home" - if vector.distance(b,s) < 10 then - entity.state = "stand" - set_velocity(entity,0) - local n=minetest.get_node(b) - if n and n.name ~= "mcl_beds:bed_red_bottom" then - entity.bed=nil --bed is gone, make villager homeless - end - end -end - --[=======[ MOB REGISTRATION AND SPAWNING ]=======] mobs:register_mob("mobs_mc:villager", { @@ -1066,13 +1073,15 @@ mobs:register_mob("mobs_mc:villager", { _player_scan_timer = 0, _trading_players = {}, -- list of playernames currently trading with villager (open formspec) do_custom = function(self, dtime) - if self.bed and ( self.state == "go_home" or vector.distance(self.object:get_pos(),self.bed) > 50 ) then - go_home(self) - end -- Stand still if player is nearby. if not self._player_scan_timer then self._player_scan_timer = 0 end + + if self.bed and ( self.state == "go_home" or vector.distance(self.object:get_pos(),self.bed) > 50 ) then + go_home(self) + end + self._player_scan_timer = self._player_scan_timer + dtime -- Check infrequently to keep CPU load low if self._player_scan_timer > PLAYER_SCAN_INTERVAL then From ba861d7b74e0adcf25539d04989c9ee61e859753 Mon Sep 17 00:00:00 2001 From: cora Date: Thu, 12 May 2022 16:02:07 +0200 Subject: [PATCH 02/13] update farmer trades --- mods/ENTITIES/mobs_mc/villager.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mods/ENTITIES/mobs_mc/villager.lua b/mods/ENTITIES/mobs_mc/villager.lua index 1e350270e..3504c7b20 100644 --- a/mods/ENTITIES/mobs_mc/villager.lua +++ b/mods/ENTITIES/mobs_mc/villager.lua @@ -76,16 +76,19 @@ local professions = { { { { "mcl_farming:pumpkin", 8, 13 }, E1 }, { E1, { "mcl_farming:pumpkin_pie", 2, 3} }, + { E1, { "mcl_core:apple", 2, 3} }, }, { { { "mcl_farming:melon", 7, 12 }, E1 }, - { E1, { "mcl_core:apple", 5, 7 }, }, + { E1, {"mcl_farming:cookie", 5, 7 }, }, }, - { - { E1, { "mcl_farming:cookie", 6, 10 } }, - { E1, { "mcl_cake:cake", 1, 1 } }, + { E1, { "mcl_mushrooms:mushroom_stew", 6, 10 } }, --FIXME: expert level farmer is supposed to sell sus stews. + }, + { + { E1, { "mcl_farming:carrot_item_gold", 3, 10 } }, + { E1, { "mcl_potions:speckled_melon", 4, 1 } }, TRADE_V6_BIRCH_SAPLING, TRADE_V6_DARK_OAK_SAPLING, TRADE_V6_ACACIA_SAPLING, From c28d700cafe84c25e6c06cb80dfc73f9365a6f95 Mon Sep 17 00:00:00 2001 From: cora Date: Thu, 12 May 2022 16:18:33 +0200 Subject: [PATCH 03/13] update fisherman trades --- mods/ENTITIES/mobs_mc/villager.lua | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/mods/ENTITIES/mobs_mc/villager.lua b/mods/ENTITIES/mobs_mc/villager.lua index 3504c7b20..edbf130ae 100644 --- a/mods/ENTITIES/mobs_mc/villager.lua +++ b/mods/ENTITIES/mobs_mc/villager.lua @@ -100,9 +100,32 @@ local professions = { texture = "mobs_mc_villager_farmer.png", trades = { { - { { "mcl_fishing:fish_raw", 6, 6, "mcl_core:emerald", 1, 1 }, { "mcl_fishing:fish_cooked", 6, 6 } }, + { { "mcl_fishing:fish_raw", 6, 6, "mcl_core:emerald", 1, 1 },{ "mcl_fishing:fish_cooked", 6, 6 } }, { { "mcl_mobitems:string", 15, 20 }, E1 }, - { { "mcl_core:emerald", 3, 11 }, { "mcl_fishing:fishing_rod_enchanted", 1, 1} }, + { { "mcl_core:coal_lump", 15, 10 }, E1 }, + -- FIXME missing: bucket of cod + fish should be cod. + }, + { + { { "mcl_fishing:fish_raw", 6, 15,}, E1 }, + { { "mcl_fishing:salmon_raw", 6, 6, "mcl_core:emerald", 1, 1 },{ "mcl_fishing:salmon_cooked", 6, 6 } }, + -- FIXME missing campfire + -- {{ "mcl_core:emerald", 1, 2 },{"mcl_campfires:campfire",1,1} }, + }, + { + { { "mcl_fishing:salmon_raw", 6, 13,}, E1 }, + { { "mcl_core:emerald", 7, 22 }, { "mcl_fishing:fishing_rod_enchanted", 1, 1} }, + }, + { + { { "mcl_fishing:clownfish_raw", 6, 6,}, E1 }, + }, + { + { { "mcl_fishing:pufferfish_raw", 4, 4,}, E1 }, + + { { "mcl_boats:boat", 1, 1,}, E1 }, + { { "mcl_boats:boat_acacia", 1, 1,}, E1 }, + { { "mcl_boats:boat_spruce", 1, 1,}, E1 }, + { { "mcl_boats:boat_dark_oak", 1, 1,}, E1 }, + { { "mcl_boats:boat_birch", 1, 1,}, E1 }, }, }, }, From 2d47ad3e5faa92e54290d2329e830bda11d6ed25 Mon Sep 17 00:00:00 2001 From: cora Date: Thu, 12 May 2022 17:50:57 +0200 Subject: [PATCH 04/13] update fletcher trades --- mods/ENTITIES/mobs_mc/villager.lua | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/mods/ENTITIES/mobs_mc/villager.lua b/mods/ENTITIES/mobs_mc/villager.lua index edbf130ae..557629992 100644 --- a/mods/ENTITIES/mobs_mc/villager.lua +++ b/mods/ENTITIES/mobs_mc/villager.lua @@ -136,12 +136,35 @@ local professions = { { { { "mcl_mobitems:string", 15, 20 }, E1 }, { E1, { "mcl_bows:arrow", 8, 12 } }, - }, - - { { { "mcl_core:gravel", 10, 10, "mcl_core:emerald", 1, 1 }, { "mcl_core:flint", 6, 10 } }, + }, + { + { { "mcl_core:flint", 26, 26 }, E1 }, { { "mcl_core:emerald", 2, 3 }, { "mcl_bows:bow", 1, 1 } }, }, + { + { { "mcl_mobitems:string", 14, 14 }, E1 }, + { { "mcl_core:emerald", 3, 3 }, { "mcl_bows:crossbow", 1, 1 } }, + }, + { + { { "mcl_mobitems:string", 24, 24 }, E1 }, + { { "mcl_core:emerald", 7, 21 } , { "mcl_bows:bow_enchanted", 1, 1 } }, + }, + { + --FIXME: supposed to be tripwire hook{ { "tripwirehook", 24, 24 }, E1 }, + { { "mcl_core:emerald", 8, 22 } , { "mcl_bows:crossbow_enchanted", 1, 1 } }, + { { "mcl_core:emerald", 2, 2, "mcl_bows:arrow", 5, 5 }, { "mcl_potions:healing_arrow", 5, 5 } }, + { { "mcl_core:emerald", 2, 2, "mcl_bows:arrow", 5, 5 }, { "mcl_potions:harming_arrow", 5, 5 } }, + { { "mcl_core:emerald", 2, 2, "mcl_bows:arrow", 5, 5 }, { "mcl_potions:night_vision_arrow", 5, 5 } }, + { { "mcl_core:emerald", 2, 2, "mcl_bows:arrow", 5, 5 }, { "mcl_potions:swiftness_arrow", 5, 5 } }, + { { "mcl_core:emerald", 2, 2, "mcl_bows:arrow", 5, 5 }, { "mcl_potions:slowness_arrow", 5, 5 } }, + { { "mcl_core:emerald", 2, 2, "mcl_bows:arrow", 5, 5 }, { "mcl_potions:leaping_arrow", 5, 5 } }, + { { "mcl_core:emerald", 2, 2, "mcl_bows:arrow", 5, 5 }, { "mcl_potions:poison_arrow", 5, 5 } }, + { { "mcl_core:emerald", 2, 2, "mcl_bows:arrow", 5, 5 }, { "mcl_potions:regeneration_arrow", 5, 5 } }, + { { "mcl_core:emerald", 2, 2, "mcl_bows:arrow", 5, 5 }, { "mcl_potions:invisibility_arrow", 5, 5 } }, + { { "mcl_core:emerald", 2, 2, "mcl_bows:arrow", 5, 5 }, { "mcl_potions:water_breathing_arrow", 5, 5 } }, + { { "mcl_core:emerald", 2, 2, "mcl_bows:arrow", 5, 5 }, { "mcl_potions:fire_resistance_arrow", 5, 5 } }, + }, } }, shepherd ={ From 51cf92a909b75f27b17ac76c579cee0d73e9326e Mon Sep 17 00:00:00 2001 From: cora Date: Thu, 12 May 2022 18:20:59 +0200 Subject: [PATCH 05/13] update librarian trades --- mods/ENTITIES/mobs_mc/villager.lua | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/mods/ENTITIES/mobs_mc/villager.lua b/mods/ENTITIES/mobs_mc/villager.lua index 557629992..90416bcdd 100644 --- a/mods/ENTITIES/mobs_mc/villager.lua +++ b/mods/ENTITIES/mobs_mc/villager.lua @@ -203,29 +203,30 @@ local professions = { { { { "mcl_core:paper", 24, 36 }, E1 }, { { "mcl_books:book", 8, 10 }, E1 }, - { { "mcl_core:emerald", 10, 12 }, { "mcl_compass:compass", 1 ,1 }}, - { { "mcl_core:emerald", 3, 4 }, { "mcl_books:bookshelf", 1 ,1 }}, - { { "mcl_core:emerald", 5, 64 }, { "mcl_enchanting:book_enchanted", 1 ,1 }}, + { { "mcl_core:emerald", 9, 9 }, { "mcl_books:bookshelf", 1 ,1 }}, + { { "mcl_core:emerald", 5, 64, "mcl_books:book", 1, 1 }, { "mcl_enchanting:book_enchanted", 1 ,1 }}, }, - { { { "mcl_books:written_book", 2, 2 }, E1 }, - { { "mcl_core:emerald", 10, 12 }, { "mcl_clock:clock", 1, 1 } }, - { E1, { "mcl_core:glass", 3, 5 } }, - { { "mcl_core:emerald", 5, 64 }, { "mcl_enchanting:book_enchanted", 1 ,1 }}, + { { "mcl_core:emerald", 5, 64, "mcl_books:book", 1, 1 }, { "mcl_enchanting:book_enchanted", 1 ,1 }}, + { E1, { "mcl_lanterns:lantern_floor", 1, 1 } }, }, { - { E1, { "mcl_core:glass", 3, 5 } }, - { { "mcl_core:emerald", 5, 64 }, { "mcl_enchanting:book_enchanted", 1 ,1 }}, + { { "mcl_dye:black", 5, 5 }, E1 }, + { { "mcl_core:emerald", 5, 64, "mcl_books:book", 1, 1 }, { "mcl_enchanting:book_enchanted", 1 ,1 }}, + { E1, { "mcl_core:glass", 4, 4 } }, }, { - { { "mcl_core:emerald", 5, 64 }, { "mcl_enchanting:book_enchanted", 1 ,1 }}, + { E1, { "mcl_books:writable_book", 1, 1 } }, + { { "mcl_core:emerald", 5, 64, "mcl_books:book", 1, 1 }, { "mcl_enchanting:book_enchanted", 1 ,1 }}, + { { "mcl_core:emerald", 4, 4 }, { "mcl_compass:compass", 1 ,1 }}, + { { "mcl_core:emerald", 5, 5 }, { "mcl_clock:clock", 1, 1 } }, }, { - { { "mcl_core:emerald", 20, 22 }, { "mcl_mobs:nametag", 1, 1 } }, + { { "mcl_core:emerald", 20, 20 }, { "mcl_mobs:nametag", 1, 1 } }, } }, }, From 135ee97b21d502c9f407d09d73fe2b348918e4bf Mon Sep 17 00:00:00 2001 From: cora Date: Thu, 12 May 2022 18:57:44 +0200 Subject: [PATCH 06/13] update cartographer trades --- mods/ENTITIES/mobs_mc/villager.lua | 35 ++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/mods/ENTITIES/mobs_mc/villager.lua b/mods/ENTITIES/mobs_mc/villager.lua index 90416bcdd..495c9121a 100644 --- a/mods/ENTITIES/mobs_mc/villager.lua +++ b/mods/ENTITIES/mobs_mc/villager.lua @@ -235,19 +235,40 @@ local professions = { texture = "mobs_mc_villager_librarian.png", trades = { { - { { "mcl_core:paper", 24, 36 }, E1 }, + { { "mcl_core:paper", 24, 24 }, E1 }, + { { "mcl_core:emerald", 7, 7}, { "mcl_maps:empty_map", 1, 1 } }, + }, + { + -- compass subject to special checks + { { "xpanes:pane_natural_flat", 1, 1 }, E1 }, + --{ { "mcl_core:emerald", 13, 13, "mcl_compass:compass", 1, 1 }, { "FIXME:ocean explorer map" 1, 1} }, }, - { - -- subject to special checks { { "mcl_compass:compass", 1, 1 }, E1 }, + --{ { "mcl_core:emerald", 13, 13, "mcl_compass:compass", 1, 1 }, { "FIXME:woodland explorer map" 1, 1} }, }, - { - -- TODO: replace with empty map - { { "mcl_core:emerald", 7, 11}, { "mcl_maps:filled_map", 1, 1 } }, + { { "mcl_core:emerald", 7, 7}, { "mcl_itemframes:item_frame", 1, 1 }}, + + { { "mcl_core:emerald", 7, 7}, { "mcl_banners:banner_item_white", 1, 1 }}, + { { "mcl_core:emerald", 7, 7}, { "mcl_banners:banner_item_grey", 1, 1 }}, + { { "mcl_core:emerald", 7, 7}, { "mcl_banners:banner_item_silver", 1, 1 }}, + { { "mcl_core:emerald", 7, 7}, { "mcl_banners:banner_item_black", 1, 1 }}, + { { "mcl_core:emerald", 7, 7}, { "mcl_banners:banner_item_red", 1, 1 }}, + { { "mcl_core:emerald", 7, 7}, { "mcl_banners:banner_item_green", 1, 1 }}, + { { "mcl_core:emerald", 7, 7}, { "mcl_banners:banner_item_cyan", 1, 1 }}, + { { "mcl_core:emerald", 7, 7}, { "mcl_banners:banner_item_blue", 1, 1 }}, + { { "mcl_core:emerald", 7, 7}, { "mcl_banners:banner_item_magenta", 1, 1 }}, + { { "mcl_core:emerald", 7, 7}, { "mcl_banners:banner_item_orange", 1, 1 }}, + { { "mcl_core:emerald", 7, 7}, { "mcl_banners:banner_item_purple", 1, 1 }}, + { { "mcl_core:emerald", 7, 7}, { "mcl_banners:banner_item_brown", 1, 1 }}, + { { "mcl_core:emerald", 7, 7}, { "mcl_banners:banner_item_pink", 1, 1 }}, + { { "mcl_core:emerald", 7, 7}, { "mcl_banners:banner_item_lime", 1, 1 }}, + { { "mcl_core:emerald", 7, 7}, { "mcl_banners:banner_item_light_blue", 1, 1 }}, + }, + { + --{ { "mcl_core:emerald", 8, 8}, { "FIXME: globe banner pattern", 1, 1 } }, }, - -- TODO: special maps }, }, From 0ce1a9228215f0f9cbc201ab7e1dcccc21cee47e Mon Sep 17 00:00:00 2001 From: cora Date: Thu, 12 May 2022 21:33:53 +0200 Subject: [PATCH 07/13] update armorer trades --- mods/ENTITIES/mobs_mc/villager.lua | 31 +++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/mods/ENTITIES/mobs_mc/villager.lua b/mods/ENTITIES/mobs_mc/villager.lua index 495c9121a..344ee8507 100644 --- a/mods/ENTITIES/mobs_mc/villager.lua +++ b/mods/ENTITIES/mobs_mc/villager.lua @@ -277,25 +277,34 @@ local professions = { texture = "mobs_mc_villager_smith.png", trades = { { - { { "mcl_core:coal_lump", 16, 24 }, E1 }, - { { "mcl_core:emerald", 4, 6 }, { "mcl_armor:helmet_iron", 1, 1 } }, + { { "mcl_core:coal_lump", 15, 15 }, E1 }, + { { "mcl_core:emerald", 5, 5 }, { "mcl_armor:helmet_iron", 1, 1 } }, + { { "mcl_core:emerald", 9, 9 }, { "mcl_armor:chestplate_iron", 1, 1 } }, + { { "mcl_core:emerald", 7, 7 }, { "mcl_armor:leggings_iron", 1, 1 } }, + { { "mcl_core:emerald", 4, 4 }, { "mcl_armor:boots_iron", 1, 1 } }, }, { - { { "mcl_core:iron_ingot", 7, 9 }, E1 }, - { { "mcl_core:emerald", 10, 14 }, { "mcl_armor:chestplate_iron", 1, 1 } }, + { { "mcl_core:iron_ingot", 4, 4 }, E1 }, + --{ { "mcl_core:emerald", 36, 36 }, { "FIXME: Bell", 1, 1 } }, + { { "mcl_core:emerald", 3, 3 }, { "mcl_armor:leggings_chain", 1, 1 } }, + { { "mcl_core:emerald", 1, 1 }, { "mcl_armor:boots_chain", 1, 1 } }, + }, + { + { { "mcl_buckets:bucket_lava", 1, 1 }, E1 }, + { { "mcl_core:diamond", 1, 1 }, E1 }, + { { "mcl_core:emerald", 1, 1 }, { "mcl_armor:helmet_chain", 1, 1 } }, + { { "mcl_core:emerald", 4, 4 }, { "mcl_armor:chestplate_chain", 1, 1 } }, + { { "mcl_core:emerald", 5, 5 }, { "mcl_shields:shield", 1, 1 } }, }, { - { { "mcl_core:diamond", 3, 4 }, E1 }, - { { "mcl_core:emerald", 16, 19 }, { "mcl_armor:chestplate_diamond_enchanted", 1, 1 } }, + { { "mcl_core:emerald", 19, 33 }, { "mcl_armor:leggings_diamond_enchanted", 1, 1 } }, + { { "mcl_core:emerald", 13, 27 }, { "mcl_armor:boots_diamond_enchanted", 1, 1 } }, }, - { - { { "mcl_core:emerald", 5, 7 }, { "mcl_armor:boots_chain", 1, 1 } }, - { { "mcl_core:emerald", 9, 11 }, { "mcl_armor:leggings_chain", 1, 1 } }, - { { "mcl_core:emerald", 5, 7 }, { "mcl_armor:helmet_chain", 1, 1 } }, - { { "mcl_core:emerald", 11, 15 }, { "mcl_armor:chestplate_chain", 1, 1 } }, + { { "mcl_core:emerald", 13, 27 }, { "mcl_armor:helmet_diamond_enchanted", 1, 1 } }, + { { "mcl_core:emerald", 21, 35 }, { "mcl_armor:chestplate_diamond_enchanted", 1, 1 } }, }, }, }, From f09b578034c3e65991af21bd7ed2ae118df58bf2 Mon Sep 17 00:00:00 2001 From: cora Date: Thu, 12 May 2022 21:42:56 +0200 Subject: [PATCH 08/13] update leatherworker trades --- mods/ENTITIES/mobs_mc/villager.lua | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/mods/ENTITIES/mobs_mc/villager.lua b/mods/ENTITIES/mobs_mc/villager.lua index 344ee8507..349554822 100644 --- a/mods/ENTITIES/mobs_mc/villager.lua +++ b/mods/ENTITIES/mobs_mc/villager.lua @@ -314,16 +314,26 @@ local professions = { trades = { { { { "mcl_mobitems:leather", 9, 12 }, E1 }, - { { "mcl_core:emerald", 2, 4 }, { "mcl_armor:leggings_leather", 2, 4 } }, + { { "mcl_core:emerald", 3, 3 }, { "mcl_armor:leggings_leather", 2, 4 } }, + { { "mcl_core:emerald", 7, 7 }, { "mcl_armor:chestplate_leather", 2, 4 } }, }, - { - { { "mcl_core:emerald", 7, 12 }, { "mcl_armor:chestplate_leather_enchanted", 1, 1 } }, + { { "mcl_core:flint", 26, 26 }, E1 }, + { { "mcl_core:emerald", 5, 5 }, { "mcl_armor:helmet_leather", 2, 4 } }, + { { "mcl_core:emerald", 4, 4 }, { "mcl_armor:boots_leather", 2, 4 } }, }, - { + { { "mcl_mobitems:rabbit_hide", 9, 9 }, E1 }, + { { "mcl_core:emerald", 7, 7 }, { "mcl_armor:chestplate_leather", 1, 1 } }, + }, + { + --{ { "FIXME: scute", 4, 4 }, E1 }, { { "mcl_core:emerald", 8, 10 }, { "mcl_mobitems:saddle", 1, 1 } }, }, + { + { { "mcl_core:emerald", 6, 6 }, { "mcl_mobitems:saddle", 1, 1 } }, + { { "mcl_core:emerald", 5, 5 }, { "mcl_armor:helmet_leather", 2, 4 } }, + }, }, }, butcher = { From 89aaf6b70959e54b67dc32e51e725f7e2d70eed1 Mon Sep 17 00:00:00 2001 From: cora Date: Thu, 12 May 2022 21:55:25 +0200 Subject: [PATCH 09/13] update butcher trades --- mods/ENTITIES/mobs_mc/villager.lua | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/mods/ENTITIES/mobs_mc/villager.lua b/mods/ENTITIES/mobs_mc/villager.lua index 349554822..da2f59042 100644 --- a/mods/ENTITIES/mobs_mc/villager.lua +++ b/mods/ENTITIES/mobs_mc/villager.lua @@ -341,14 +341,27 @@ local professions = { texture = "mobs_mc_villager_butcher.png", trades = { { - { { "mcl_mobitems:beef", 14, 18 }, E1 }, - { { "mcl_mobitems:chicken", 14, 18 }, E1 }, + { { "mcl_mobitems:beef", 14, 14 }, E1 }, + { { "mcl_mobitems:chicken", 7, 7 }, E1 }, + { { "mcl_mobitems:rabbit", 4, 4 }, E1 }, + { E1, { "mcl_mobitems:rabbit_stew", 1, 1 } }, }, { - { { "mcl_core:coal_lump", 16, 24 }, E1 }, - { E1, { "mcl_mobitems:cooked_beef", 5, 7 } }, - { E1, { "mcl_mobitems:cooked_chicken", 6, 8 } }, + { { "mcl_core:coal_lump", 15, 15 }, E1 }, + { E1, { "mcl_mobitems:cooked_porkchop", 5, 5 } }, + { E1, { "mcl_mobitems:cooked_chicken", 8, 8 } }, + }, + { + { { "mcl_mobitems:mutton", 7, 7 }, E1 }, + { { "mcl_mobitems:beef", 10, 10 }, E1 }, + }, + { + { { "mcl_mobitems:mutton", 7, 7 }, E1 }, + { { "mcl_mobitems:beef", 10, 10 }, E1 }, + }, + { + --{ { "FIXME: Sweet Berries", 10, 10 }, E1 }, }, }, }, From f073d4d42085e4f4654cf4d9b70dcdd100348461 Mon Sep 17 00:00:00 2001 From: cora Date: Thu, 12 May 2022 22:01:30 +0200 Subject: [PATCH 10/13] update weapon smith trades --- mods/ENTITIES/mobs_mc/villager.lua | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/mods/ENTITIES/mobs_mc/villager.lua b/mods/ENTITIES/mobs_mc/villager.lua index da2f59042..2fa117a8c 100644 --- a/mods/ENTITIES/mobs_mc/villager.lua +++ b/mods/ENTITIES/mobs_mc/villager.lua @@ -370,19 +370,25 @@ local professions = { texture = "mobs_mc_villager_smith.png", trades = { { - { { "mcl_core:coal_lump", 16, 24 }, E1 }, - { { "mcl_core:emerald", 6, 8 }, { "mcl_tools:axe_iron", 1, 1 } }, + { { "mcl_core:coal_lump", 15, 15 }, E1 }, + { { "mcl_core:emerald", 3, 3 }, { "mcl_tools:axe_iron", 1, 1 } }, + { { "mcl_core:emerald", 7, 21 }, { "mcl_tools:sword_iron_enchanted", 1, 1 } }, }, { - { { "mcl_core:iron_ingot", 7, 9 }, E1 }, - { { "mcl_core:emerald", 9, 10 }, { "mcl_tools:sword_iron_enchanted", 1, 1 } }, + { { "mcl_core:iron_ingot", 4, 4 }, E1 }, + --{ { "mcl_core:emerald", 36, 36 }, { "FIXME: Bell", 1, 1 } }, + }, + { + { { "mcl_core:flint", 7, 9 }, E1 }, + }, + { + { { "mcl_core:diamond", 7, 9 }, E1 }, + { { "mcl_core:emerald", 17, 31 }, { "mcl_tools:axe_diamond_enchanted", 1, 1 } }, }, { - { { "mcl_core:diamond", 3, 4 }, E1 }, - { { "mcl_core:emerald", 12, 15 }, { "mcl_tools:sword_diamond_enchanted", 1, 1 } }, - { { "mcl_core:emerald", 9, 12 }, { "mcl_tools:axe_diamond_enchanted", 1, 1 } }, + { { "mcl_core:emerald", 13, 27 }, { "mcl_tools:sword_diamond_enchanted", 1, 1 } }, }, }, }, From 07e0a90051bbf5df66bc113ced4354da8a0a8d62 Mon Sep 17 00:00:00 2001 From: cora Date: Thu, 12 May 2022 22:11:39 +0200 Subject: [PATCH 11/13] update tool smith trades --- mods/ENTITIES/mobs_mc/villager.lua | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/mods/ENTITIES/mobs_mc/villager.lua b/mods/ENTITIES/mobs_mc/villager.lua index 2fa117a8c..8ce577a40 100644 --- a/mods/ENTITIES/mobs_mc/villager.lua +++ b/mods/ENTITIES/mobs_mc/villager.lua @@ -397,18 +397,31 @@ local professions = { texture = "mobs_mc_villager_smith.png", trades = { { - { { "mcl_core:coal_lump", 16, 24 }, E1 }, - { { "mcl_core:emerald", 5, 7 }, { "mcl_tools:shovel_iron_enchanted", 1, 1 } }, + { { "mcl_core:coal_lump", 15, 15 }, E1 }, + { E1, { "mcl_tools:axe_stone", 1, 1 } }, + { E1, { "mcl_tools:shovel_stone", 1, 1 } }, + { E1, { "mcl_tools:pick_stone", 1, 1 } }, + { E1, { "mcl_farming:hoe_stone", 1, 1 } }, }, { - { { "mcl_core:iron_ingot", 7, 9 }, E1 }, - { { "mcl_core:emerald", 9, 11 }, { "mcl_tools:pick_iron_enchanted", 1, 1 } }, + { { "mcl_core:iron_ingot", 4, 4 }, E1 }, + --{ { "mcl_core:emerald", 36, 36 }, { "FIXME: Bell", 1, 1 } }, }, - { - { { "mcl_core:diamond", 3, 4 }, E1 }, - { { "mcl_core:emerald", 12, 15 }, { "mcl_tools:pick_diamond_enchanted", 1, 1 } }, + { { "mcl_core:flint", 30, 30 }, E1 }, + { { "mcl_core:emerald", 6, 20 }, { "mcl_tools:axe_iron_enchanted", 1, 1 } }, + { { "mcl_core:emerald", 7, 21 }, { "mcl_tools:shovel_iron_enchanted", 1, 1 } }, + { { "mcl_core:emerald", 8, 22 }, { "mcl_tools:pick_iron_enchanted", 1, 1 } }, + { { "mcl_core:emerald", 4, 4 }, { "mcl_farming:hoe_diamond", 1, 1 } }, + }, + { + { { "mcl_core:diamond", 1, 1 }, E1 }, + { { "mcl_core:emerald", 17, 31 }, { "mcl_tools:axe_diamond_enchanted", 1, 1 } }, + { { "mcl_core:emerald", 10, 24 }, { "mcl_tools:shovel_diamond_enchanted", 1, 1 } }, + }, + { + { { "mcl_core:emerald", 18, 32 }, { "mcl_tools:pick_diamond_enchanted", 1, 1 } }, }, }, }, From fd6f2be4853aef9d493436fbfd04e23623cf934e Mon Sep 17 00:00:00 2001 From: cora Date: Thu, 12 May 2022 22:18:55 +0200 Subject: [PATCH 12/13] update cleric trades --- mods/ENTITIES/mobs_mc/villager.lua | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/mods/ENTITIES/mobs_mc/villager.lua b/mods/ENTITIES/mobs_mc/villager.lua index 8ce577a40..ac98aebb3 100644 --- a/mods/ENTITIES/mobs_mc/villager.lua +++ b/mods/ENTITIES/mobs_mc/villager.lua @@ -430,21 +430,23 @@ local professions = { texture = "mobs_mc_villager_priest.png", trades = { { - { { "mcl_mobitems:rotten_flesh", 36, 40 }, E1 }, - { { "mcl_core:gold_ingot", 8, 10 }, E1 }, + { { "mcl_mobitems:rotten_flesh", 32, 32 }, E1 }, + { E1, { "mesecons:redstone", 2, 2 } }, }, - { - { E1, { "mesecons:redstone", 1, 4 } }, - { E1, { "mcl_dye:blue", 1, 2 } }, + { { "mcl_core:gold_ingot", 3, 3 }, E1 }, + { E1, { "mcl_dye:blue", 1, 1 } }, }, - { - { E1, { "mcl_nether:glowstone", 1, 3 } }, - { { "mcl_core:emerald", 4, 7 }, { "mcl_throwing:ender_pearl", 1, 1 } }, + { { "mcl_mobitems:rabbit_foot", 2, 2 }, E1 }, + { E1, { "mcl_nether:glowstone", 4, 4 } }, + }, + { + --{ { "FIXME: scute", 4, 4 }, E1 }, + { { "mcl_potions:glass_bottle", 9, 9 }, E1 }, + { { "mcl_core:emerald", 5, 5 }, { "mcl_throwing:ender_pearl", 1, 1 } }, TRADE_V6_RED_SANDSTONE, }, - { { { "mcl_nether:nether_wart_item", 22, 22 }, E1 }, { { "mcl_core:emerald", 3, 3 }, { "mcl_experience:bottle", 1, 1 } }, From 31b8ea26a2b099484038d8495cd089378cbcc59d Mon Sep 17 00:00:00 2001 From: cora Date: Thu, 12 May 2022 22:29:15 +0200 Subject: [PATCH 13/13] add jobsites to professions table --- mods/ENTITIES/mobs_mc/villager.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/mods/ENTITIES/mobs_mc/villager.lua b/mods/ENTITIES/mobs_mc/villager.lua index ac98aebb3..5bab73aaa 100644 --- a/mods/ENTITIES/mobs_mc/villager.lua +++ b/mods/ENTITIES/mobs_mc/villager.lua @@ -62,9 +62,15 @@ if minetest.get_mapgen_setting("mg_name") == "v6" then end local professions = { + unemployed = { + name = N("Unemployed"), + texture = "mobs_mc_villager.png", + trades = nil, + }, farmer = { name = N("Farmer"), texture = "mobs_mc_villager_farmer.png", + jobsite = "mcl_composters:composter", trades = { { { { "mcl_farming:wheat_item", 18, 22, }, E1 }, @@ -98,6 +104,7 @@ local professions = { fisherman = { name = N("Fisherman"), texture = "mobs_mc_villager_farmer.png", + jobsite = "mcl_barrels:barrel_closed", trades = { { { { "mcl_fishing:fish_raw", 6, 6, "mcl_core:emerald", 1, 1 },{ "mcl_fishing:fish_cooked", 6, 6 } }, @@ -132,6 +139,7 @@ local professions = { fletcher = { name = N("Fletcher"), texture = "mobs_mc_villager_farmer.png", + jobsite = "mcl_villages:stonebrickcarved", --FIXME: fletching table trades = { { { { "mcl_mobitems:string", 15, 20 }, E1 }, @@ -170,6 +178,7 @@ local professions = { shepherd ={ name = N("Shepherd"), texture = "mobs_mc_villager_farmer.png", + jobsite = "mcl_villages:stonebrickcarved", --FIXME: loom trades = { { { { "mcl_wool:white", 16, 22 }, E1 }, @@ -199,6 +208,7 @@ local professions = { librarian = { name = N("Librarian"), texture = "mobs_mc_villager_librarian.png", + jobsite = "mcl_villages:stonebrickcarved", --FIXME: lectern trades = { { { { "mcl_core:paper", 24, 36 }, E1 }, @@ -233,6 +243,7 @@ local professions = { cartographer = { name = N("Cartographer"), texture = "mobs_mc_villager_librarian.png", + jobsite = "mcl_villages:stonebrickcarved", --FIXME: cartography table trades = { { { { "mcl_core:paper", 24, 24 }, E1 }, @@ -275,6 +286,7 @@ local professions = { armorer = { name = N("Armorer"), texture = "mobs_mc_villager_smith.png", + jobsite = "mcl_core:lava_source", --FIXME: blast furnace trades = { { { { "mcl_core:coal_lump", 15, 15 }, E1 }, @@ -311,6 +323,7 @@ local professions = { leatherworker = { name = N("Leatherworker"), texture = "mobs_mc_villager_butcher.png", + jobsite = "mcl_cauldrons:cauldron", trades = { { { { "mcl_mobitems:leather", 9, 12 }, E1 }, @@ -339,6 +352,7 @@ local professions = { butcher = { name = N("Butcher"), texture = "mobs_mc_villager_butcher.png", + jobsite = "mcl_villages:stonebrickcarved", --FIXME: smoker trades = { { { { "mcl_mobitems:beef", 14, 14 }, E1 }, @@ -368,6 +382,7 @@ local professions = { weapon_smith = { name = N("Weapon Smith"), texture = "mobs_mc_villager_smith.png", + jobsite = "mcl_villages:stonebrickcarved", --FIXME: grindstone trades = { { { { "mcl_core:coal_lump", 15, 15 }, E1 }, @@ -395,6 +410,7 @@ local professions = { tool_smith = { name = N("Tool Smith"), texture = "mobs_mc_villager_smith.png", + jobsite = "mcl_villages:stonebrickcarved", --FIXME: smithing table trades = { { { { "mcl_core:coal_lump", 15, 15 }, E1 }, @@ -428,6 +444,7 @@ local professions = { cleric = { name = N("Cleric"), texture = "mobs_mc_villager_priest.png", + jobsite = "mcl_brewing:stand", trades = { { { { "mcl_mobitems:rotten_flesh", 32, 32 }, E1 },