Skip to content

Commit 1849373

Browse files
committedJul 26, 2015
Compatible with Minecraft 1.8
1 parent 830600a commit 1849373

File tree

6 files changed

+81
-20
lines changed

6 files changed

+81
-20
lines changed
 

‎changelog.txt

+10
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@ mcmap changelog
22
Latest version is available at: http://wrim.pl/mcmap/
33
------------------------------------------------------
44

5+
2.4.3 (jul 26 2015) - Minecraft 1.8.X compatible
6+
added:
7+
-color for sponge
8+
-all wooden door types
9+
-all fences and fence gates
10+
-red sandstone recognized as red sand
11+
-inverted daylight sensor
12+
-prismarine and sea lantern (ID's 232 and 236)
13+
-granite, diorite and andesite (ID's 140, 144 and 157)
14+
515
2.4.2e (feb 20 2014) - snapshot 14w08a compatible (MC 1.7.4)
616
added:
717
-iron trapdoor

‎colors.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,15 @@ void loadColors()
239239
SETCOLOR(174, 159, 189, 239, 255 ); //packed ice
240240
SETCOLOR(175, 0, 255, 0, 254 ); //Large flower
241241
SETCOLOR(206, 54, 24, 30, 255 ); //nether bricks slab
242+
243+
//1.8+
242244
SETCOLOR(165, 61, 255, 61, 96 ); //slime block
245+
SETCOLOR(19, 224, 240, 48, 255 ); //sponge
246+
SETCOLOR(232, 25, 146, 132, 255 ); //prismarine
247+
SETCOLOR(236, 75, 196, 152, 255 ); //sea lantern
248+
SETCOLOR(140, 208, 128, 128, 255 ); //granite
249+
SETCOLOR(144, 228, 228, 228, 255 ); //diorite
250+
SETCOLOR(157, 160, 160, 160, 255 ); //andesite
243251

244252
// carpets
245253
SETCOLOR(36 , 255, 255, 255, 254 ); //White carpet

‎colors.txt

+9
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,12 @@
9696

9797
# nether
9898
238 206 206 201 255 5 # Birch Wood / quartz slab (sic!)
99+
100+
# 1.8
101+
19 224 220 48 255 0 # sponge
102+
232 25 146 132 255 0 # prismarine
103+
236 75 196 152 255 0 # sea lantern
104+
140 208 128 128 255 0 # granite
105+
144 228 228 228 255 0 # diorite
106+
157 160 160 160 255 0 # andesite
107+

‎globals.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef _GLOBALS_H_
22
#define _GLOBALS_H_
33

4-
#define VERSION "2.4.2e (compatible with Minecraft 1.7.4)"
4+
#define VERSION "2.4.3 (compatible with Minecraft 1.8.X)"
55

66
#include <stdint.h>
77
#include <cstdlib>

‎main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,7 @@ void printHelp(char *binary)
11441144
" format by using file extensions .xml, .json or .txt (default)\n"
11451145
" -split PATH create tiled output (128x128 to 4096x4096) in given PATH\n"
11461146
" -marker c x z place marker at x z with color c (r g b w)\n"
1147-
"\n WORLDPATH is the path of the desired alpha/beta world.\n\n"
1147+
"\n WORLDPATH is the path of the desired Minecraft world.\n\n"
11481148
////////////////////////////////////////////////////////////////////////////////
11491149
"Examples:\n\n"
11501150
#ifdef _WIN32

‎worldloader.cpp

+52-18
Original file line numberDiff line numberDiff line change
@@ -1031,9 +1031,9 @@ static void loadBiomeChunk(const char* path, const int chunkX, const int chunkZ)
10311031
static inline void assignBlock(const uint8_t &block, uint8_t* &targetBlock, int &x, int &y, int &z, uint8_t* &justData)
10321032
{
10331033
if (block == WOOL || block == LOG || block == LEAVES || block == STEP || block == DOUBLESTEP || block == WOOD || block == WOODEN_STEP || block == WOODEN_DOUBLE_STEP
1034-
|| block == 95 || block == 160 || block == 159 || block == 171 || block == 38 || block == 175 || block == SAND || block == 153 || block == 166 || block == 167
1035-
|| (g_NoWater && (block == WATER || block == STAT_WATER))
1036-
|| block == 141 || block == 142 || block == 158 || block == 149 || block == 157
1034+
|| block == 95 || block == 160 || block == 159 || block == 171 || block == 38 || block == 175 || block == SAND || block == 153
1035+
|| (g_NoWater && (block == WATER || block == STAT_WATER)) || (block >= 176 && block <= 197) || (block >= 166 && block <= 169) || block == STONE
1036+
|| block == 141 || block == 142 || block == 158 || block == 149 || block == 157 || block == 140 || block == 144
10371037
|| block == 131 || block == 132 || block == 150 || block == 147 || block == 148 || block == 68 || block == 69 || block == 70
10381038
|| block == 72 || block == 77 || block == 143 || block == 36) { //three last lines contains colors for carpets
10391039
uint8_t col;
@@ -1043,21 +1043,29 @@ static inline void assignBlock(const uint8_t &block, uint8_t* &targetBlock, int
10431043
col = (justData[(y + (z + (x * CHUNKSIZE_Z)) * CHUNKSIZE_Y) / 2] >> ((y % 2) * 4)) & 0xF;
10441044
}
10451045
if (block == 131 || block == 132 || block == 150 || block == 147 || block == 148 || block == 68 || block == 69 || block == 70
1046-
|| block == 72 || block == 77 || block == 143 || block == 36 || block == 166
1046+
|| block == 72 || block == 77 || block == 143 || block == 36 || block == 166 || block == 140 || block == 144
10471047
|| block == WATER || block == STAT_WATER) { //not visible blocks replaced to air, therefore we have few ID's more
10481048
*targetBlock++ = 0;
1049-
} else if (block == 141 || block == 142) { //carrots and potatoes -> wheat
1050-
*targetBlock++ = 59;
1051-
} else if (block == 158) { //dropper -> dispenser
1052-
*targetBlock++ = 23;
1053-
} else if (block == 149) { //comparator -> repeater
1054-
*targetBlock++ = 93;
1055-
} else if (block == 153) { //nether ore -> netherrack
1056-
*targetBlock++ = 87;
1057-
} else if (block == 157) { //activator rail -> detector rail
1058-
*targetBlock++ = 28;
1059-
} else if (block == 167) { //iron trapdoor -> wooden trapdoor
1060-
*targetBlock++ = 96;
1049+
} else if (block == STONE) {
1050+
switch (col)
1051+
{
1052+
case 0:
1053+
*targetBlock++ = 1;
1054+
break;
1055+
case 1:
1056+
case 2:
1057+
*targetBlock++ = 140;
1058+
break;
1059+
case 3:
1060+
case 4:
1061+
*targetBlock++ = 144;
1062+
break;
1063+
case 5:
1064+
case 6:
1065+
*targetBlock++ = 157;
1066+
break;
1067+
}
1068+
10611069
} else if (block == LEAVES) {
10621070
if ((col & 0x3) != 0) { // Map to pine or birch
10631071
*targetBlock++ = 228 + (col & 0x3);
@@ -1231,7 +1239,7 @@ static inline void assignBlock(const uint8_t &block, uint8_t* &targetBlock, int
12311239
} else {
12321240
*targetBlock++ = block;
12331241
}
1234-
} else /*if (block == DOUBLESTEP)*/ {
1242+
} else if (block == DOUBLESTEP) {
12351243
if (col == 1) {
12361244
*targetBlock++ = SANDSTONE;
12371245
} else if (col == 2) {
@@ -1241,7 +1249,33 @@ static inline void assignBlock(const uint8_t &block, uint8_t* &targetBlock, int
12411249
} else {
12421250
*targetBlock++ = block;
12431251
}
1244-
}
1252+
} else if (block == 141 || block == 142) { //carrots and potatoes -> wheat
1253+
*targetBlock++ = 59;
1254+
} else if (block == 158) { //dropper -> dispenser
1255+
*targetBlock++ = 23;
1256+
} else if (block == 149) { //comparator -> repeater
1257+
*targetBlock++ = 93;
1258+
} else if (block == 153) { //nether ore -> netherrack
1259+
*targetBlock++ = 87;
1260+
} else if (block == 157) { //activator rail -> detector rail
1261+
*targetBlock++ = 28;
1262+
} else if (block == 167) { //iron trapdoor -> wooden trapdoor
1263+
*targetBlock++ = 96;
1264+
} else if (block == 179 || block == 180 || block == 181 || block == 182) { //red sandstone -> red sand
1265+
*targetBlock++ = 153;
1266+
} else if (block == 178) { //daylight detector inverted -> daylight detector
1267+
*targetBlock++ = 151;
1268+
} else if (block == 168) { //prismarine
1269+
*targetBlock++ = 232;
1270+
} else if (block == 169) { //sea lantern
1271+
*targetBlock++ = 236;
1272+
} else if (block >= 193 && block <= 197) { //doors 1.8+
1273+
*targetBlock++ = 64;
1274+
} else if (block >= 188 && block <= 192) { //fences 1.8+
1275+
*targetBlock++ = 85;
1276+
} else if (block >= 183 && block <= 187) { //fence gates 1.8+
1277+
*targetBlock++ = 107;
1278+
} else *targetBlock++ = block;
12451279
} else {
12461280
*targetBlock++ = block;
12471281
}

0 commit comments

Comments
 (0)
Please sign in to comment.