From 93a6dc36263b2ec6e702332a4c4c4be81d1d1e0f Mon Sep 17 00:00:00 2001 From: teknomunk Date: Tue, 18 Jun 2024 20:31:27 -0500 Subject: [PATCH] Switch over to using vl_legacy for item conversion in player inventories --- mods/ENTITIES/mcl_minecarts/rails.lua | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/mods/ENTITIES/mcl_minecarts/rails.lua b/mods/ENTITIES/mcl_minecarts/rails.lua index 6cdb18142..b76b7bf03 100644 --- a/mods/ENTITIES/mcl_minecarts/rails.lua +++ b/mods/ENTITIES/mcl_minecarts/rails.lua @@ -412,8 +412,6 @@ for old,new in pairs(STRAIGHT_RAILS_MAP) do }) vl_legacy.register_item_conversion(old, new) end -local TRANSLATE_RAILS_MAP = table.copy(STRAIGHT_RAILS_MAP) -table_merge(TRANSLATE_RAILS_MAP, CURVY_RAILS_MAP) minetest.register_lbm({ name = "mcl_minecarts:update_legacy_straight_rails", @@ -440,18 +438,3 @@ minetest.register_lbm({ end }) --- Convert old rail in the player's inventory to new rail -minetest.register_on_joinplayer(function(player) - local inv = player:get_inventory() - local size = inv:get_size("main") - for i=1,size do - local stack = inv:get_stack("main", i) - - local new_name = TRANSLATE_RAILS_MAP[stack:get_name()] - if new_name then - stack:set_name(new_name) - inv:set_stack("main", i, stack) - end - end -end) -