ofs | hex dump | ascii |
---|
0000 | 50 4b 03 04 0a 00 00 08 08 00 00 00 41 00 00 00 00 00 02 00 00 00 00 00 00 00 09 00 00 00 4d 45 | PK..........A.................ME |
0020 | 54 41 2d 49 4e 46 2f 03 00 50 4b 03 04 0a 00 00 08 08 00 00 00 41 00 6d b1 3e 3d 40 00 00 00 3f | TA-INF/..PK..........A.m.>=@...? |
0040 | 00 00 00 14 00 00 00 4d 45 54 41 2d 49 4e 46 2f 4d 41 4e 49 46 45 53 54 2e 4d 46 f3 4d cc cb 4c | .......META-INF/MANIFEST.MF.M..L |
0060 | 4b 2d 2e d1 0d 4b 2d 2a ce cc cf b3 52 30 d4 33 e0 e5 f2 cc 2d c8 49 cd 4d cd 2b 49 2c 01 0a ea | K-...K-*....R0.3....-.I.M.+I,... |
0080 | 86 64 96 e4 a4 5a 29 b8 17 25 a6 e4 a4 2a 84 17 25 16 14 a4 16 f1 72 f1 72 01 00 50 4b 03 04 0a | .d...Z)..%...*..%.....r.r..PK... |
00a0 | 00 00 08 08 00 00 00 41 00 00 00 00 00 02 00 00 00 00 00 00 00 04 00 00 00 6f 72 67 2f 03 00 50 | .......A.................org/..P |
00c0 | 4b 03 04 0a 00 00 08 08 00 00 00 41 00 00 00 00 00 02 00 00 00 00 00 00 00 0b 00 00 00 6f 72 67 | K..........A.................org |
00e0 | 2f 67 72 61 64 6c 65 2f 03 00 50 4b 03 04 0a 00 00 08 08 00 00 00 41 00 00 00 00 00 02 00 00 00 | /gradle/..PK..........A......... |
0100 | 00 00 00 00 13 00 00 00 6f 72 67 2f 67 72 61 64 6c 65 2f 77 72 61 70 70 65 72 2f 03 00 50 4b 03 | ........org/gradle/wrapper/..PK. |
0120 | 04 0a 00 00 08 08 00 00 00 41 00 aa d9 66 d8 03 05 00 00 ea 09 00 00 2d 00 00 00 6f 72 67 2f 67 | .........A...f.........-...org/g |
0140 | 72 61 64 6c 65 2f 77 72 61 70 70 65 72 2f 42 6f 6f 74 73 74 72 61 70 4d 61 69 6e 53 74 61 72 74 | radle/wrapper/BootstrapMainStart |
0160 | 65 72 2e 63 6c 61 73 73 8d 56 5b 57 13 57 14 fe 8e 99 64 60 1c 05 63 40 83 8a 83 37 12 2e 89 b5 | er.class.V[W.W....d`..c@...7.... |
0180 | d6 56 b0 b4 4a bd 20 01 2d 01 6c 44 db 0e c9 21 8c 4e 66 d2 c9 c4 4b ef 17 7b fd 07 be f6 a5 4f | .V..J...-.lD...!.Nf...K..{.....O |
01a0 | 5d ab 7d 09 b4 ae da d5 d7 fe 8b fe 8b 3e 69 f7 99 c9 40 12 82 ab 2c d6 99 33 fb ec db f7 ed 7d | ].}..........>i...@...,..3.....} |
/*
Minetest
Copyright (C) 2013-2015 celeron55, Perttu Ahola <celeron55@gmail.com>
Copyright (C) 2013-2016 kwolekr, Ryan Kwolek <kwolekr@minetest.net>
Copyright (C) 2015-2017 paramat
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "mapgen_singlenode.h"
#include "voxel.h"
#include "mapblock.h"
#include "mapnode.h"
#include "map.h"
#include "nodedef.h"
#include "voxelalgorithms.h"
#include "emerge.h"
MapgenSinglenode::MapgenSinglenode(int mapgenid,
MapgenParams *params, EmergeManager *emerge)
: Mapgen(mapgenid, params, emerge)
{
flags = params->flags;
INodeDefManager *ndef = emerge->ndef;
c_node = ndef->getId("mapgen_singlenode");
if (c_node == CONTENT_IGNORE)
c_node = CONTENT_AIR;
MapNode n_node(c_node);
set_light = (ndef->get(n_node).sunlight_propagates) ? LIGHT_SUN : 0x00;
}
MapgenSinglenode::~MapgenSinglenode()
{
}
//////////////////////// Map generator
void MapgenSinglenode::makeChunk(BlockMakeData *data)
{
// Pre-conditions
assert(data->vmanip);
assert(data->nodedef);
assert(data->blockpos_requested.X >= data->blockpos_min.X &&
data->blockpos_requested.Y >= data->blockpos_min.Y &&
data->blockpos_requested.Z >= data->blockpos_min.Z);
assert(data->blockpos_requested.X <= data->blockpos_max.X &&
data->blockpos_requested.Y <= data->blockpos_max.Y &&
data->blockpos_requested.Z <= data->blockpos_max.Z);
this->generating = true;
this->vm = data->vmanip;
this->ndef = data->nodedef;
v3s16 blockpos_min = data->blockpos_min;
v3s16 blockpos_max = data->blockpos_max;
// Area of central chunk
v3s16 node_min = blockpos_min * MAP_BLOCKSIZE;
v3s16 node_max = (blockpos_max + v3s16(1, 1, 1)) * MAP_BLOCKSIZE - v3s16(1, 1, 1);
blockseed = getBlockSeed2(node_min, data->seed);
MapNode n_node(c_node);
for (s16 z = node_min.Z; z <= node_max.Z; z++)
for (s16 y = node_min.Y; y <= node_max.Y; y++) {
u32 i = vm->m_area.index(node_min.X, y, z);
for (s16 x = node_min.X; x <= node_max.X; x++) {
if (vm->m_data[i].getContent() == CONTENT_IGNORE)
vm->m_data[i] = n_node;
i++;
}
}
// Add top and bottom side of water to transforming_liquid queue
updateLiquid(&data->transforming_liquid, node_min, node_max);
// Set lighting
if ((flags & MG_LIGHT) && set_light == LIGHT_SUN)
setLighting(LIGHT_SUN, node_min, node_max);
this->generating = false;
}
int MapgenSinglenode::getSpawnLevelAtPoint(v2s16 p)
{
return 0;
}
|