Page 1 of 1

Lava destroying blocks/items get pushed up when inside of blocks

PostPosted: Fri Sep 21, 2012 00:40
by jordan4ibanez
All that is required to push items that are inside blocks up, and to destroy items that are thrown into lava is that this line is added to line 85 of item_entity.lua
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
local nn = minetest.env:get_node(p).name
if nn == "default:lava_source" or nn == "default:lava_flowing" then
    self.object:remove()
end
if minetest.registered_nodes[nn].walkable then
    self.object:setvelocity({x=0,y=4,z=0})
end

PostPosted: Fri Sep 21, 2012 02:07
by jordan4ibanez
FIXED AGAIN! so that only walkable nodes push the items up

PostPosted: Fri Sep 21, 2012 07:21
by Topywo
jordan4ibanez wrote:All that is required to push items that are inside blocks up, and to destroy items that are thrown into lava is that this line is added to line 85 of init.lua


Init.lua of which (mod)folder?

PostPosted: Fri Sep 21, 2012 13:21
by jordan4ibanez
Topywo wrote:
jordan4ibanez wrote:All that is required to push items that are inside blocks up, and to destroy items that are thrown into lava is that this line is added to line 85 of init.lua


Init.lua of which (mod)folder?

i meant item_entity.lua

PostPosted: Fri Sep 21, 2012 15:48
by rubenwardy
water moving objects would be cool. Maybe not moving player, yet

PostPosted: Fri Sep 21, 2012 16:24
by PilzAdam
rubenwardy wrote:water moving objects would be cool. Maybe not moving player, yet

This is possible (i think). Just check the param2 of water_flowing.

PostPosted: Fri Sep 21, 2012 17:16
by Calinou
rubenwardy wrote:water moving objects would be cool. Maybe not moving player, yet


Floating dropped items underwater would be awesome. :D

PostPosted: Fri Sep 21, 2012 18:12
by jordan4ibanez_unlogged
Calinou wrote:
rubenwardy wrote:water moving objects would be cool. Maybe not moving player, yet


Floating dropped items underwater would be awesome. :D

i will design that later with some variables so you can change it to your liking :3

PostPosted: Sat Sep 22, 2012 04:49
by leo_rockway
These are my dancing cubes o.o
http://leorockway.com.ar/effects.ogv

PostPosted: Sat Sep 22, 2012 07:15
by cornernote
leo_rockway wrote:These are my dancing cubes o.o
http://leorockway.com.ar/effects.ogv


u need some of RBA's music in the background

PostPosted: Sat Sep 22, 2012 22:57
by leo_rockway
cornernote wrote:
leo_rockway wrote:These are my dancing cubes o.o
http://leorockway.com.ar/effects.ogv


u need some of RBA's music in the background


I literally laughed out loud!

I had changed the code back to default, but with your comment I might modify it again and laugh to MT all day long =]