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

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

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

by jordan4ibanez » Fri Sep 21, 2012 00:40

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
Last edited by jordan4ibanez on Fri Sep 21, 2012 13:21, edited 1 time in total.
If you can think it, you can make it.
 

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Fri Sep 21, 2012 02:07

FIXED AGAIN! so that only walkable nodes push the items up
If you can think it, you can make it.
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Fri Sep 21, 2012 07:21

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?
 

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Fri Sep 21, 2012 13:21

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
If you can think it, you can make it.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Fri Sep 21, 2012 15:48

water moving objects would be cool. Maybe not moving player, yet
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Fri Sep 21, 2012 16:24

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.
 

User avatar
Calinou
Member
 
Posts: 3124
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou

by Calinou » Fri Sep 21, 2012 17:16

rubenwardy wrote:water moving objects would be cool. Maybe not moving player, yet


Floating dropped items underwater would be awesome. :D
 

jordan4ibanez_unlogged
 

by jordan4ibanez_unlogged » Fri Sep 21, 2012 18:12

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
 

leo_rockway
Member
 
Posts: 131
Joined: Tue Jul 31, 2012 20:37

by leo_rockway » Sat Sep 22, 2012 04:49

These are my dancing cubes o.o
http://leorockway.com.ar/effects.ogv
 

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Sat Sep 22, 2012 07:15

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
 

leo_rockway
Member
 
Posts: 131
Joined: Tue Jul 31, 2012 20:37

by leo_rockway » Sat Sep 22, 2012 22:57

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 =]
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 1 guest