From b4c5805afea7cf9f17cc671438e559c1e8c2f1b1 Mon Sep 17 00:00:00 2001 From: MysticTempest Date: Fri, 3 Jun 2022 05:46:27 -0500 Subject: [PATCH] Make items flowing in water use acceleration for movement. --- mods/ENTITIES/mcl_item_entity/init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mods/ENTITIES/mcl_item_entity/init.lua b/mods/ENTITIES/mcl_item_entity/init.lua index 1e781ef27..c0fbf4b15 100644 --- a/mods/ENTITIES/mcl_item_entity/init.lua +++ b/mods/ENTITIES/mcl_item_entity/init.lua @@ -783,11 +783,11 @@ minetest.register_entity(":__builtin:item", { -- Just to make sure we don't manipulate the speed for no reason if vec.x ~= 0 or vec.y ~= 0 or vec.z ~= 0 then -- Minecraft Wiki: Flowing speed is "about 1.39 meters per second" - local f = 1.39 + local f = 1.2 -- Set new item moving speed into the direciton of the liquid local newv = vector.multiply(vec, f) - self.object:set_acceleration({x = 0, y = 0, z = 0}) - self.object:set_velocity({x = newv.x, y = -0.22, z = newv.z}) + -- Swap to acceleration instead of a static speed to better mimic MC mechanics. + self.object:set_acceleration({x = newv.x, y = -0.22, z = newv.z}) self.physical_state = true self._flowing = true