Slightly better texture for trees
parent
3edcc7ca63
commit
b781e89238
Binary file not shown.
Before Width: | Height: | Size: 410 B After Width: | Height: | Size: 413 B |
Binary file not shown.
Before Width: | Height: | Size: 431 B After Width: | Height: | Size: 360 B |
|
@ -1025,7 +1025,7 @@ minetest.register_abm({
|
||||||
-- Portal Stuff
|
-- Portal Stuff
|
||||||
minetest.register_node("nether:nether_portal", {
|
minetest.register_node("nether:nether_portal", {
|
||||||
description = "Nether Portal",
|
description = "Nether Portal",
|
||||||
drawtype = "glasslike",
|
drawtype = "normal",
|
||||||
tile_images = {"nether_portal_stuff.png"},
|
tile_images = {"nether_portal_stuff.png"},
|
||||||
inventory_image = "nether_portal_stuff.png",
|
inventory_image = "nether_portal_stuff.png",
|
||||||
wield_image = "nether_portal_stuff.png",
|
wield_image = "nether_portal_stuff.png",
|
||||||
|
|
33
src/map.cpp
33
src/map.cpp
|
@ -1637,22 +1637,32 @@ void Map::transformLiquids(core::map<v3s16, MapBlock*> & modified_blocks)
|
||||||
s8 liquid_level = -1;
|
s8 liquid_level = -1;
|
||||||
u8 liquid_kind = CONTENT_IGNORE;
|
u8 liquid_kind = CONTENT_IGNORE;
|
||||||
LiquidType liquid_type = nodemgr->get(n0).liquid_type;
|
LiquidType liquid_type = nodemgr->get(n0).liquid_type;
|
||||||
switch (liquid_type) {
|
switch (liquid_type)
|
||||||
|
{
|
||||||
case LIQUID_SOURCE:
|
case LIQUID_SOURCE:
|
||||||
|
{
|
||||||
liquid_level = LIQUID_LEVEL_SOURCE;
|
liquid_level = LIQUID_LEVEL_SOURCE;
|
||||||
liquid_kind = nodemgr->getId(nodemgr->get(n0).liquid_alternative_flowing);
|
liquid_kind = nodemgr->getId(nodemgr->get(n0).liquid_alternative_flowing);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case LIQUID_FLOWING:
|
case LIQUID_FLOWING:
|
||||||
|
{
|
||||||
liquid_level = (n0.param2 & LIQUID_LEVEL_MASK);
|
liquid_level = (n0.param2 & LIQUID_LEVEL_MASK);
|
||||||
liquid_kind = n0.getContent();
|
liquid_kind = n0.getContent();
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
case LIQUID_JELLO:
|
||||||
case LIQUID_NONE:
|
case LIQUID_NONE:
|
||||||
|
{
|
||||||
// if this is an air node, it *could* be transformed into a liquid. otherwise,
|
// if this is an air node, it *could* be transformed into a liquid. otherwise,
|
||||||
// continue with the next node.
|
// continue with the next node.
|
||||||
if (n0.getContent() != CONTENT_AIR)
|
if (n0.getContent() != CONTENT_AIR)
|
||||||
|
{
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
liquid_kind = CONTENT_AIR;
|
liquid_kind = CONTENT_AIR;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1680,8 +1690,11 @@ void Map::transformLiquids(core::map<v3s16, MapBlock*> & modified_blocks)
|
||||||
}
|
}
|
||||||
v3s16 npos = p0 + dirs[i];
|
v3s16 npos = p0 + dirs[i];
|
||||||
NodeNeighbor nb = {getNodeNoEx(npos), nt, npos};
|
NodeNeighbor nb = {getNodeNoEx(npos), nt, npos};
|
||||||
switch (nodemgr->get(nb.n.getContent()).liquid_type) {
|
switch (nodemgr->get(nb.n.getContent()).liquid_type)
|
||||||
|
{
|
||||||
|
case LIQUID_JELLO:
|
||||||
case LIQUID_NONE:
|
case LIQUID_NONE:
|
||||||
|
{
|
||||||
if (nb.n.getContent() == CONTENT_AIR) {
|
if (nb.n.getContent() == CONTENT_AIR) {
|
||||||
airs[num_airs++] = nb;
|
airs[num_airs++] = nb;
|
||||||
// if the current node is a water source the neighbor
|
// if the current node is a water source the neighbor
|
||||||
|
@ -1697,7 +1710,9 @@ void Map::transformLiquids(core::map<v3s16, MapBlock*> & modified_blocks)
|
||||||
neutrals[num_neutrals++] = nb;
|
neutrals[num_neutrals++] = nb;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case LIQUID_SOURCE:
|
case LIQUID_SOURCE:
|
||||||
|
{
|
||||||
// if this node is not (yet) of a liquid type, choose the first liquid type we encounter
|
// if this node is not (yet) of a liquid type, choose the first liquid type we encounter
|
||||||
if (liquid_kind == CONTENT_AIR)
|
if (liquid_kind == CONTENT_AIR)
|
||||||
liquid_kind = nodemgr->getId(nodemgr->get(nb.n).liquid_alternative_flowing);
|
liquid_kind = nodemgr->getId(nodemgr->get(nb.n).liquid_alternative_flowing);
|
||||||
|
@ -1709,7 +1724,9 @@ void Map::transformLiquids(core::map<v3s16, MapBlock*> & modified_blocks)
|
||||||
sources[num_sources++] = nb;
|
sources[num_sources++] = nb;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case LIQUID_FLOWING:
|
case LIQUID_FLOWING:
|
||||||
|
{
|
||||||
// if this node is not (yet) of a liquid type, choose the first liquid type we encounter
|
// if this node is not (yet) of a liquid type, choose the first liquid type we encounter
|
||||||
if (liquid_kind == CONTENT_AIR)
|
if (liquid_kind == CONTENT_AIR)
|
||||||
liquid_kind = nodemgr->getId(nodemgr->get(nb.n).liquid_alternative_flowing);
|
liquid_kind = nodemgr->getId(nodemgr->get(nb.n).liquid_alternative_flowing);
|
||||||
|
@ -1721,6 +1738,7 @@ void Map::transformLiquids(core::map<v3s16, MapBlock*> & modified_blocks)
|
||||||
flowing_down = true;
|
flowing_down = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1811,7 +1829,8 @@ void Map::transformLiquids(core::map<v3s16, MapBlock*> & modified_blocks)
|
||||||
setNode(p0, n0);
|
setNode(p0, n0);
|
||||||
v3s16 blockpos = getNodeBlockPos(p0);
|
v3s16 blockpos = getNodeBlockPos(p0);
|
||||||
MapBlock *block = getBlockNoCreateNoEx(blockpos);
|
MapBlock *block = getBlockNoCreateNoEx(blockpos);
|
||||||
if(block != NULL) {
|
if(block != NULL)
|
||||||
|
{
|
||||||
modified_blocks.insert(blockpos, block);
|
modified_blocks.insert(blockpos, block);
|
||||||
// If node emits light, MapBlock requires lighting update
|
// If node emits light, MapBlock requires lighting update
|
||||||
if(nodemgr->get(n0).light_source != 0)
|
if(nodemgr->get(n0).light_source != 0)
|
||||||
|
@ -1821,9 +1840,11 @@ void Map::transformLiquids(core::map<v3s16, MapBlock*> & modified_blocks)
|
||||||
/*
|
/*
|
||||||
enqueue neighbors for update if neccessary
|
enqueue neighbors for update if neccessary
|
||||||
*/
|
*/
|
||||||
switch (nodemgr->get(n0.getContent()).liquid_type) {
|
switch (nodemgr->get(n0.getContent()).liquid_type)
|
||||||
|
{
|
||||||
case LIQUID_SOURCE:
|
case LIQUID_SOURCE:
|
||||||
case LIQUID_FLOWING:
|
case LIQUID_FLOWING:
|
||||||
|
{
|
||||||
// make sure source flows into all neighboring nodes
|
// make sure source flows into all neighboring nodes
|
||||||
for (u16 i = 0; i < num_flows; i++)
|
for (u16 i = 0; i < num_flows; i++)
|
||||||
if (flows[i].t != NEIGHBOR_UPPER)
|
if (flows[i].t != NEIGHBOR_UPPER)
|
||||||
|
@ -1832,11 +1853,15 @@ void Map::transformLiquids(core::map<v3s16, MapBlock*> & modified_blocks)
|
||||||
if (airs[i].t != NEIGHBOR_UPPER)
|
if (airs[i].t != NEIGHBOR_UPPER)
|
||||||
m_transforming_liquid.push_back(airs[i].p);
|
m_transforming_liquid.push_back(airs[i].p);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
case LIQUID_JELLO:
|
||||||
case LIQUID_NONE:
|
case LIQUID_NONE:
|
||||||
|
{
|
||||||
// this flow has turned to air; neighboring flows might need to do the same
|
// this flow has turned to air; neighboring flows might need to do the same
|
||||||
for (u16 i = 0; i < num_flows; i++)
|
for (u16 i = 0; i < num_flows; i++)
|
||||||
m_transforming_liquid.push_back(flows[i].p);
|
m_transforming_liquid.push_back(flows[i].p);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//infostream<<"Map::transformLiquids(): loopcount="<<loopcount<<std::endl;
|
//infostream<<"Map::transformLiquids(): loopcount="<<loopcount<<std::endl;
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
/*
|
/*
|
||||||
|
BlockPlanet
|
||||||
|
Copyright (C) 2012 MiJyn, Joel Leclerc <mijyn@mail.com>
|
||||||
|
Licensed under GPLv3
|
||||||
|
|
||||||
|
|
||||||
|
Based on:
|
||||||
Minetest-c55
|
Minetest-c55
|
||||||
Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
|
Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
/*
|
/*
|
||||||
|
BlockPlanet
|
||||||
|
Copyright (C) 2012 MiJyn, Joel Leclerc <mijyn@mail.com>
|
||||||
|
Licensed under GPLv3
|
||||||
|
|
||||||
|
|
||||||
|
Based on:
|
||||||
Minetest-c55
|
Minetest-c55
|
||||||
Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
|
Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue