Topywo
Member
Posts: 1721 Joined: Fri May 18, 2012 20:27
by Topywo » Sun Feb 17, 2013 20:45
Post
Evergreen wrote: Do I need to get rid of just this part of the code?
Because if the block that it checks is air, it will continue, but if it isn't it won't generate a tree.
No, better not remove it. Otherwise the tree will grow through everything.
I tried the rubber tree out on a world with moretrees on it (with the random set at 1,1). There were rubber trees between the other trees. However I noticed too them preferring the desert. Probably because since a while there's a lot more mixture of desert sand and dirt with grass.
Evergreen
Member
Posts: 2135 Joined: Sun Jan 06, 2013 01:22
GitHub:
4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:
by Evergreen » Mon Feb 18, 2013 12:37
Post
Topywo wrote: Evergreen wrote: Do I need to get rid of just this part of the code?
Because if the block that it checks is air, it will continue, but if it isn't it won't generate a tree.
No, better not remove it. Otherwise the tree will grow through everything.
I tried the rubber tree out on a world with moretrees on it (with the random set at 1,1). There were rubber trees between the other trees. However I noticed too them preferring the desert. Probably because since a while there's a lot more mixture of desert sand and dirt with grass.
Why do they seem to like the desert so much?
Back from the dead!
Evergreen
Member
Posts: 2135 Joined: Sun Jan 06, 2013 01:22
GitHub:
4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:
by Evergreen » Mon Feb 18, 2013 13:10
Post
I did remove that piece of code, and it seemed to help.
Back from the dead!
Casimir
Member
Posts: 1206 Joined: Fri Aug 03, 2012 16:59
GitHub:
CasimirKaPazi
by Casimir » Mon Feb 18, 2013 14:53
Post
PilzAdam wrote: pandaro wrote: type:
self:getpos()
Nope, its:
First thing is what I did. Thank you.
VanessaE
Moderator
Posts: 4655 Joined: Sun Apr 01, 2012 12:38
GitHub:
VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:
by VanessaE » Mon Feb 18, 2013 15:04
Post
Trees grow in biomes, and it probably just happens that the settings I chose for rubber trees cause them to grow near deserts. :-)
Take a look in moretrees/tree_biomes.lua and see if maybe the biome settings need tweaked.
Evergreen
Member
Posts: 2135 Joined: Sun Jan 06, 2013 01:22
GitHub:
4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:
by Evergreen » Mon Feb 18, 2013 17:16
Post
VanessaE wrote: Trees grow in biomes, and it probably just happens that the settings I chose for rubber trees cause them to grow near deserts. :-)
Take a look in moretrees/tree_biomes.lua and see if maybe the biome settings need tweaked.
I used the code for rubber trees from PilzAdam's farming mod. Not the moretrees mod.
Back from the dead!
VanessaE
Moderator
Posts: 4655 Joined: Sun Apr 01, 2012 12:38
GitHub:
VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:
by VanessaE » Mon Feb 18, 2013 17:52
Post
Ah, gotchya.
Traxie21
Member
Posts: 753 Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.
Contact:
by Traxie21 » Mon Feb 18, 2013 19:20
Post
How exactly would one use minetest.env:find_nodes_in_area()?
I have this on an ABM for sand (testing), but it always prints {}, nothing else.
Code: Select all
print(dump(minetest.env:find_nodes_in_area({x=pos.x+1, y=pos.y, z=pos.z+1}, {x=pos.x-1, y=0, z=pos.z-1}, {"default:dirt"})))
Heres the setup:
DDD
DSD
DDD
pandaro
Member
Posts: 327 Joined: Sun Jan 08, 2012 21:34
GitHub:
pandaro
Location: behind
by pandaro » Mon Feb 18, 2013 19:31
Post
print(dump(minetest.env:find_nodes_in_area({x=pos.x+1, y=pos.y, z=pos.z+1}, {x=pos.x-1, y=0, z=pos.z-1}, {"default:dirt"})))
sobstitute
print(dump(minetest.env:find_nodes_in_area({x=self.x-1, y=0, z=self.z-1},{x=self.x+1, y=self.y, z=self.z+1}, {"default:dirt"})))
invert the 2 table of coordinate
sorry for bad english
Linux debian 7 wheezy 64
kde
Traxie21
Member
Posts: 753 Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.
Contact:
by Traxie21 » Mon Feb 18, 2013 19:57
Post
pandaro wrote: print(dump(minetest.env:find_nodes_in_area({x=pos.x+1, y=pos.y, z=pos.z+1}, {x=pos.x-1, y=0, z=pos.z-1}, {"default:dirt"})))
sobstitute
print(dump(minetest.env:find_nodes_in_area({x=self.x-1, y=0, z=self.z-1},{x=self.x+1, y=self.y, z=self.z+1}, {"default:dirt"})))
invert the 2 table of coordinate
Ty, but thanks to VanessaE, I figured it out :3
Traxie21
Member
Posts: 753 Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.
Contact:
by Traxie21 » Tue Feb 19, 2013 21:06
Post
DP
Another question:
How does one force a chunk to be generated, and add blocks to that chunk without having the player in them?
I'm trying to make a skyportal mod (kinda like aether) but if the chunk I add the second portal to is not loaded/generated, the second portal is not built and causes the player to FAAAAAAAAALLL.
I have really messy and unoptomised code of this, just started and trying to get the basics down.
http://pastebin.com/bhGXbgTt
Blocks
New member
Posts: 2 Joined: Fri Feb 22, 2013 12:48
by Blocks » Fri Feb 22, 2013 13:42
Post
Oh do I make a ore show up, in the map?
Topywo
Member
Posts: 1721 Joined: Fri May 18, 2012 20:27
by Topywo » Fri Feb 22, 2013 20:32
Post
Blocks wrote: Oh do I make a ore show up, in the map?
Take a look at the games/minetest_game/mods/default/mapgen.lua
or for example Calinous moreores mod.
prestidigitator
Member
Posts: 647 Joined: Thu Feb 21, 2013 23:54
by prestidigitator » Fri Feb 22, 2013 21:18
Post
Usually it should suffice to wait until the chunk is loaded. You could even keep some kind of hash of positions for portals and check it when each chunk is loaded. However, if you REALLY need to load the chunks ahead of time, see this discussion on
block loading .
Casimir
Member
Posts: 1206 Joined: Fri Aug 03, 2012 16:59
GitHub:
CasimirKaPazi
by Casimir » Mon Feb 25, 2013 00:48
Post
My windows is no more working, so I use Linux Mint at the moment. One simple question: The window where all the serverstuff is shown, how do I get it?
VanessaE
Moderator
Posts: 4655 Joined: Sun Apr 01, 2012 12:38
GitHub:
VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:
by VanessaE » Mon Feb 25, 2013 02:04
Post
Run your minetest instance from a terminal e.g. gnome-terminal, xterm, whatever it's called in Mint.
Casimir
Member
Posts: 1206 Joined: Fri Aug 03, 2012 16:59
GitHub:
CasimirKaPazi
by Casimir » Wed Feb 27, 2013 20:25
Post
Thank you.
A new one:
Code: Select all
if minetest.setting_get("new_style_leaves") == false then
end
I want to check if "fancy trees" is enabled, but it always returns false (or true, depending on the way you read it).
PilzAdam
Member
Posts: 4026 Joined: Fri Jul 20, 2012 16:19
GitHub:
PilzAdam
IRC: PilzAdam
Location: Germany
by PilzAdam » Wed Feb 27, 2013 20:33
Post
Casimir wrote: Thank you.
A new one:
Code: Select all
if minetest.setting_get("new_style_leaves") == false then
end
I want to check if "fancy trees" is enabled, but it always returns false (or true, depending on the way you read it).
Use setting_getbool()
deivan
Member
Posts: 452 Joined: Fri Feb 15, 2013 10:16
Location: Brazil. :D
by deivan » Thu Feb 28, 2013 23:49
Post
Don't is possible have a little change in the API in the function "get_craft_recipe" to return all recipes don't the last one only?
deivan
Member
Posts: 452 Joined: Fri Feb 15, 2013 10:16
Location: Brazil. :D
by deivan » Fri Mar 01, 2013 10:01
Post
Another point, if the function will be altered or a second one added (for retro compatibility) then, maybe, is good return all recipes and the dimensions of this, well, if is a torch is a 1x2, if is a door is a 2x3. This make more easier the mod task. Thanks.
pandaro
Member
Posts: 327 Joined: Sun Jan 08, 2012 21:34
GitHub:
pandaro
Location: behind
by pandaro » Sat Mar 02, 2013 22:07
Post
how to manipulate images through lua?
sorry for bad english
Linux debian 7 wheezy 64
kde
prestidigitator
Member
Posts: 647 Joined: Thu Feb 21, 2013 23:54
by prestidigitator » Sun Mar 03, 2013 05:59
Post
Actual manipulation of images may not be possible. For example, I don't think you can get a pixel array and set pixels or draw arbitrary shapes. However, in places you are asked for a texture name, you may be able to do some simple manipulations using a custom Minetest
texture specification language in place of a simple filename.
1244
Member
Posts: 45 Joined: Fri Jul 13, 2012 16:40
Location: Poland
by 1244 » Sat Mar 16, 2013 20:45
Post
In which way I can add meta float from node to formspec this node? Example:
Code: Select all
x_formspec =
"invsize[8,9;]"..
"label[1,3;Variable_from_node]"
minetest.register_node("X:x", {
local Variable_from_node = 10
})
In which way I can do this?
kaeza
Moderator
Posts: 2162 Joined: Thu Oct 18, 2012 05:00
GitHub:
kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza
Location: Montevideo, Uruguay
Contact:
by kaeza » Sat Mar 16, 2013 20:58
Post
1244 wrote: In which way I can add meta float from node to formspec this node? Example:
Code: Select all
x_formspec =
"invsize[8,9;]"..
"label[1,3;Variable_from_node]"
minetest.register_node("X:x", {
local Variable_from_node = 10
})
In which way I can do this?
I think you can do something like this:
Code: Select all
"label[1,3;$(Variable_from_node)]"
Also, the 'local' inside the table is wrong; remove it.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!
Check out my stuff! | Donations greatly appreciated!
PayPal
10twenty4
Member
Posts: 40 Joined: Tue Mar 12, 2013 20:54
by 10twenty4 » Sun Mar 17, 2013 21:57
Post
I'm trying to remove whatever you're holding onto when you punch a node. I'm not seeing any change occur, however. Should I be using something besides take_item()?
Code: Select all
on_punch = function(pos, node, puncher)
wield = puncher:get_wielded_item()
print(wield: get_count())
wield:take_item()
print(wield: get_count())
end
edit: scratch that, I fixed it by adding puncher: set_wielded_item(wield)
Last edited by
10twenty4 on Sun Mar 17, 2013 22:50, edited 1 time in total.
Users browsing this forum: No registered users and 5 guests