From f6f8c3e5bc7fdd8fdf5cb142953ed458538bfe23 Mon Sep 17 00:00:00 2001 From: teknomunk Date: Sat, 9 Nov 2024 12:36:57 -0600 Subject: [PATCH] Make powered rails always accelerate moving carts --- mods/ENTITIES/mcl_minecarts/rails/powered.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mods/ENTITIES/mcl_minecarts/rails/powered.lua b/mods/ENTITIES/mcl_minecarts/rails/powered.lua index 94bb4f1d9..f63b091f6 100644 --- a/mods/ENTITIES/mcl_minecarts/rails/powered.lua +++ b/mods/ENTITIES/mcl_minecarts/rails/powered.lua @@ -44,6 +44,10 @@ mod.register_straight_rail("mcl_minecarts:golden_rail_v2",{ "mcl_minecarts_rail_ mod.register_straight_rail("mcl_minecarts:golden_rail_v2_on",{ "mcl_minecarts_rail_golden_powered.png" },{ _doc_items_create_entry = false, _rail_acceleration = function(pos, staticdata) + if staticdata.velocity ~= 0 then + return 4 + end + local dir = mod.get_rail_direction(pos, staticdata.dir, nil, nil, staticdata.railtype) local node_a = minetest.get_node(vector.add(pos, dir)) local node_b = minetest.get_node(vector.add(pos, -dir))