Add tile data coloring (aka colored wool support), combine rendering
of default tiles and their zoomed counterparts (saves reloading the default tile, and keeps the scale levels of the map consistent during a fullrender and otherwise)
This commit is contained in:
parent
71e873f5c5
commit
bc155e7a05
10 changed files with 241 additions and 106 deletions
|
|
@ -31,6 +31,10 @@ public class HighlightTileRenderer extends DefaultTileRenderer {
|
|||
}
|
||||
|
||||
int id = world.getBlockTypeIdAt(x, y, z);
|
||||
byte data = 0;
|
||||
if(colorScheme.datacolors[id] != null) { /* If data colored */
|
||||
data = world.getBlockAt(x, y, z).getData();
|
||||
}
|
||||
|
||||
switch (seq) {
|
||||
case 0:
|
||||
|
|
@ -50,7 +54,11 @@ public class HighlightTileRenderer extends DefaultTileRenderer {
|
|||
seq = (seq + 1) & 3;
|
||||
|
||||
if (id != 0) {
|
||||
Color[] colors = colorScheme.colors.get(id);
|
||||
Color[] colors;
|
||||
if(data != 0)
|
||||
colors = colorScheme.datacolors[id][data];
|
||||
else
|
||||
colors = colorScheme.colors[id];
|
||||
if (colors != null) {
|
||||
Color c = colors[seq];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue