From e66d66caf9b272cbcde8169a08258f3db727f506 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Thu, 28 Jan 2021 19:02:44 +0100 Subject: [PATCH] Fix #399 --- mods/ENTITIES/mcl_boats/init.lua | 11 ++++++++++- mods/ITEMS/mcl_flowers/init.lua | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/mods/ENTITIES/mcl_boats/init.lua b/mods/ENTITIES/mcl_boats/init.lua index 12e86a350a..c878dc2867 100644 --- a/mods/ENTITIES/mcl_boats/init.lua +++ b/mods/ENTITIES/mcl_boats/init.lua @@ -134,7 +134,7 @@ function boat.on_death(self, killer) self._driver = nil end -function boat.on_step(self, dtime) +function boat.on_step(self, dtime, moveresult) self._v = get_v(self.object:get_velocity()) * get_sign(self._v) local on_water = true local in_water = false @@ -152,6 +152,15 @@ function boat.on_step(self, dtime) v_slowdown = 0.05 end + if moveresult and moveresult.collides then + for _, collision in ipairs(moveresult.collisions) do + local pos = collision.node_pos + if collision.type == "node" and minetest.get_node_group(minetest.get_node(pos).name, "dig_by_boat") > 0 then + minetest.dig_node(pos) + end + end + end + if self._driver then local ctrl = self._driver:get_player_control() if ctrl.sneak then diff --git a/mods/ITEMS/mcl_flowers/init.lua b/mods/ITEMS/mcl_flowers/init.lua index af892bfa1a..d60cb1e3ba 100644 --- a/mods/ITEMS/mcl_flowers/init.lua +++ b/mods/ITEMS/mcl_flowers/init.lua @@ -390,7 +390,7 @@ minetest.register_node("mcl_flowers:waterlily", { liquids_pointable = true, walkable = true, sunlight_propagates = true, - groups = {dig_immediate = 3, plant=1, dig_by_water = 1,destroy_by_lava_flow=1, dig_by_piston = 1, deco_block=1}, + groups = {dig_immediate = 3, plant=1, dig_by_water = 1,destroy_by_lava_flow=1, dig_by_piston = 1, deco_block=1, dig_by_boat=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), node_placement_prediction = "", node_box = {