mirror of
https://github.com/encounter/dynmap.git
synced 2026-03-30 11:08:39 -07:00
Compare commits
134 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 67b5b7509f | |||
| 886248e115 | |||
| bc17045196 | |||
| 7cf9f2f1e4 | |||
| 7d89fe094a | |||
| 8524eecad5 | |||
| bee5da8e9f | |||
| e15d3cd8cc | |||
| 33add48697 | |||
| 98d18260c4 | |||
| 910be17c42 | |||
| 6299deee82 | |||
| ff57c9e183 | |||
| ea5f9a8a96 | |||
| afc6f429f0 | |||
| 36ea3c20ca | |||
| aacdd77f3e | |||
| a369f02083 | |||
| 09637f293e | |||
| e81564c1ae | |||
| ebfe2a004b | |||
| 3076b28c24 | |||
| e2746b7cbc | |||
| 62bc4f2cd0 | |||
| fd14f9bc84 | |||
| f824a17704 | |||
| ba98145086 | |||
| 571c2acfc3 | |||
| cab056ef5c | |||
| 8c4315be40 | |||
| c808ddcc45 | |||
| d5153a6f4c | |||
| 352d1843e0 | |||
| 0f986b4c87 | |||
| b55989f696 | |||
| b0227d5ce7 | |||
| 32ccbf4792 | |||
| df3027dc8a | |||
| d53ef57ae1 | |||
| 00f16304a4 | |||
| 3f19c1ab3a | |||
| 9570f03ec6 | |||
| 03f62bd8f6 | |||
| 6d2193d597 | |||
| 3d868d4700 | |||
| 4c50bd502c | |||
| e54c1fa7d8 | |||
| d6b5524aca | |||
| 996343c5a3 | |||
| 8a4e1ebfc2 | |||
| 2f53b72779 | |||
| 009c3a9429 | |||
| cfa5f187e6 | |||
| 91bc59d7f8 | |||
| a77f002054 | |||
| 402d7f9542 | |||
| 6181aa8ba9 | |||
| 9322c5426d | |||
| 6de49f89d6 | |||
| 5adbe6bd5e | |||
| 9da159f842 | |||
| 89f63a9db2 | |||
| 771059bf5a | |||
| e7f30153b8 | |||
| 21c68fa1b2 | |||
| 37a9809f67 | |||
| 7bee1dcae5 | |||
| dcb3e8e2ff | |||
| 2f7890a40b | |||
| 36d983ba28 | |||
| 20e409b71f | |||
| 34ae7d21fd | |||
| 25f7dbb312 | |||
| 7d2d0b4d87 | |||
| e0fcca4b7f | |||
| b51da5d401 | |||
| 754bc6c51e | |||
| f99700d863 | |||
| 270f64c594 | |||
| e86aa352df | |||
| f950fb4d85 | |||
| f0db205eb9 | |||
| 9f8ab5da03 | |||
| c034a10951 | |||
| 6b301b2208 | |||
| 83642a6291 | |||
| cbe4ca0377 | |||
| eee6476d6a | |||
| 8bdce005c3 | |||
| 3f585c84b7 | |||
| dd8a84165b | |||
| c486c42de8 | |||
| cdffc5824f | |||
| f6a4f3e619 | |||
| dcdcdd88aa | |||
| a476b66c2f | |||
| fba69e3d19 | |||
| 0bd55b76d8 | |||
| 704fc7fb32 | |||
| d88763f179 | |||
| 56faab71e2 | |||
| 9da3180e38 | |||
| 85a564aa45 | |||
| b9170db1c1 | |||
| 0e1158c77b | |||
| 8ac000abec | |||
| f371cff011 | |||
| 5088adb7eb | |||
| d1ff472bda | |||
| 7e37817b86 | |||
| 611a935232 | |||
| 974cd33853 | |||
| fc1fec4af8 | |||
| 13bf8d7733 | |||
| f4de63e85e | |||
| af1f47df23 | |||
| 0755dd3377 | |||
| f20c4a25a9 | |||
| cfc758fe7d | |||
| b20b9e1436 | |||
| 0c292dde12 | |||
| ac650656b4 | |||
| a3573c7a64 | |||
| 069d4c0ce5 | |||
| 3d385106e9 | |||
| ace7fbf838 | |||
| aee7ea2d49 | |||
| c6cccf6899 | |||
| 1a128a6d74 | |||
| bfb12e4f81 | |||
| 625b62fa36 | |||
| c65b17d80b | |||
| 627cef720c | |||
| 586c41d23c |
@@ -30,8 +30,13 @@ Iron Ore
|
||||
15 136 130 127 255 108 104 101 255 68 65 63 255 54 52 50 255
|
||||
Coal Ore
|
||||
16 115 115 115 255 92 92 92 255 57 57 57 255 46 46 46 255
|
||||
Wood
|
||||
17 102 81 51 255 81 64 40 255 51 40 25 255 40 32 20 255
|
||||
Wood - Normal
|
||||
17 102 81 51 255 125 102 63 255 78 64 39 255 40 32 20 255
|
||||
17:0 102 81 51 255 125 102 63 255 78 64 39 255 40 32 20 255
|
||||
Wood - Spruce (Red/dark wood)
|
||||
17:1 75 44 24 255 125 102 63 255 78 64 39 255 30 18 10 255
|
||||
Wood - Birch (light wood)
|
||||
17:2 191 191 191 255 125 102 63 255 78 64 39 255 76 76 76 255
|
||||
Leaves
|
||||
18 60 192 41 100 48 153 32 100 30 96 20 100 24 76 16 100
|
||||
Sponge
|
||||
@@ -120,6 +125,10 @@ Double Stone Slab - Wood
|
||||
43:2 157 128 79 255 125 102 63 255 78 64 39 255 62 51 31 255
|
||||
Double Stone Slab - Cobblestone
|
||||
43:3 115 115 115 255 92 92 92 255 57 57 57 255 46 46 46 255
|
||||
Double Stone Slab - Brick
|
||||
43:4 170 86 62 255 136 68 49 255 85 43 31 255 68 34 24 255
|
||||
Double Stone Slab - Stone Brick
|
||||
43:5 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255
|
||||
Stone Slab
|
||||
44 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255
|
||||
44:0 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255
|
||||
@@ -129,6 +138,10 @@ Stone Slab - Wood
|
||||
44:2 157 128 79 255 125 102 63 255 78 64 39 255 62 51 31 255
|
||||
Stone Slab - Cobblestone
|
||||
44:3 115 115 115 255 92 92 92 255 57 57 57 255 46 46 46 255
|
||||
Stone Slab - Brick
|
||||
44:4 170 86 62 255 136 68 49 255 85 43 31 255 68 34 24 255
|
||||
Stone Slab - Stone Brick
|
||||
44:5 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255
|
||||
Brick
|
||||
45 170 86 62 255 136 68 49 255 85 43 31 255 68 34 24 255
|
||||
TNT
|
||||
@@ -233,6 +246,32 @@ Locked Chest
|
||||
95 125 91 38 255 100 72 30 255 62 45 19 255 50 36 15 255
|
||||
Trap Door
|
||||
96 111 91 54 255 88 72 43 255 55 45 27 255 44 36 21 255
|
||||
Stone - Sliverfish
|
||||
97 120 120 120 255 96 96 96 255 60 60 60 255 48 48 48 255
|
||||
Stone Brick
|
||||
98 120 120 120 255 96 96 96 255 60 60 60 255 48 48 48 255
|
||||
Huge Brown Mushroom
|
||||
99 204 153 120 255 145 109 85 255 114 86 67 255 73 64 58 255
|
||||
Huge Red Mushroom
|
||||
100 255 43 43 255 196 29 38 255 186 105 109 255 124 64 64 255
|
||||
Iron Bars
|
||||
101 191 191 191 96 152 152 152 96 95 95 95 96 76 76 76 96
|
||||
Glass Pane
|
||||
102 255 255 255 64 204 204 204 64 127 127 127 64 102 102 102 64
|
||||
Melon
|
||||
103 193 193 65 255 174 174 47 255 97 97 5 255 76 76 20 255
|
||||
Pumpkin Stem
|
||||
104 146 192 0 255 116 153 0 255 73 96 0 255 58 76 0 255
|
||||
Melon Stem
|
||||
105 146 192 0 255 116 153 0 255 73 96 0 255 58 76 0 255
|
||||
Vines
|
||||
106 60 192 41 100 48 153 32 100 30 96 20 100 24 76 16 100
|
||||
Fence Gate
|
||||
107 127 98 49 96 95 72 33 96 48 34 9 96 32 21 21 96
|
||||
Brick Stairs
|
||||
108 170 86 62 255 136 68 49 255 85 43 31 255 68 34 24 255
|
||||
Stone Stairs
|
||||
109 120 120 120 255 96 96 96 255 60 60 60 255 48 48 48 255
|
||||
Biome Rainforest - Dark Green
|
||||
[RAINFOREST] 49 67 21 255 39 53 17 255 24 34 10 255 19 27 8 255
|
||||
Biome Swampland - Brown
|
||||
@@ -259,6 +298,12 @@ Biome Hell - Pink
|
||||
[HELL] 190 115 135 255 151 92 108 255 95 57 67 255 75 46 53 255
|
||||
Biome Sky - Blue
|
||||
[SKY] 34 44 134 255 27 35 107 255 17 22 67 255 13 18 53 255
|
||||
Biome Ocean - Blue
|
||||
[OCEAN] 34 44 134 255 27 35 107 255 17 22 67 255 13 18 53 255
|
||||
Biome River - Medium Blue
|
||||
[RIVER] 44 54 154 144 36 45 127 255 25 32 77 255 20 28 65 255
|
||||
Biome Extreme Hills - Dark Brown
|
||||
[EXTREME_HILLS] 38 22 12 255 30 18 10 255 19 11 6 255 15 9 5 255
|
||||
[RAINFALL-0.0] 120 120 120 255 96 96 96 255 60 60 60 255 48 48 48 255
|
||||
[RAINFALL-1.0] 38 92 255 255 30 73 204 255 19 46 127 255 15 36 102 255
|
||||
[TEMPERATURE-0.0] 38 92 255 255 30 73 204 255 19 46 127 255 15 36 102 255
|
||||
|
||||
+47
-2
@@ -30,8 +30,13 @@ Iron Ore
|
||||
15 136 130 127 255 108 104 101 255 68 65 63 255 54 52 50 255
|
||||
Coal Ore
|
||||
16 115 115 115 255 92 92 92 255 57 57 57 255 46 46 46 255
|
||||
Wood
|
||||
17 102 81 51 255 81 64 40 255 51 40 25 255 40 32 20 255
|
||||
Wood - Normal
|
||||
17 102 81 51 255 125 102 63 255 78 64 39 255 40 32 20 255
|
||||
17:0 102 81 51 255 125 102 63 255 78 64 39 255 40 32 20 255
|
||||
Wood - Spruce (Red/dark wood)
|
||||
17:1 75 44 24 255 125 102 63 255 78 64 39 255 30 18 10 255
|
||||
Wood - Birch (light wood)
|
||||
17:2 191 191 191 255 125 102 63 255 78 64 39 255 76 76 76 255
|
||||
Leaves
|
||||
18 27 69 37 180 22 57 31 180 19 48 25 180 22 57 31 180
|
||||
Sponge
|
||||
@@ -120,6 +125,10 @@ Double Stone Slab - Wood
|
||||
43:2 157 128 79 255 125 102 63 255 78 64 39 255 62 51 31 255
|
||||
Double Stone Slab - Cobblestone
|
||||
43:3 115 115 115 255 92 92 92 255 57 57 57 255 46 46 46 255
|
||||
Double Stone Slab - Brick
|
||||
43:4 170 86 62 255 136 68 49 255 85 43 31 255 68 34 24 255
|
||||
Double Stone Slab - Stone Brick
|
||||
43:5 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255
|
||||
Stone Slab
|
||||
44 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255
|
||||
44:0 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255
|
||||
@@ -129,6 +138,10 @@ Stone Slab - Wood
|
||||
44:2 157 128 79 255 125 102 63 255 78 64 39 255 62 51 31 255
|
||||
Stone Slab - Cobblestone
|
||||
44:3 115 115 115 255 92 92 92 255 57 57 57 255 46 46 46 255
|
||||
Stone Slab - Brick
|
||||
44:4 170 86 62 255 136 68 49 255 85 43 31 255 68 34 24 255
|
||||
Stone Slab - Stone Brick
|
||||
44:5 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255
|
||||
Brick
|
||||
45 170 86 62 255 136 68 49 255 85 43 31 255 68 34 24 255
|
||||
TNT
|
||||
@@ -233,6 +246,32 @@ Locked Chest
|
||||
95 125 91 38 255 100 72 30 255 62 45 19 255 50 36 15 255
|
||||
Trap Door
|
||||
96 111 91 54 255 88 72 43 255 55 45 27 255 44 36 21 255
|
||||
Stone - Sliverfish
|
||||
97 120 120 120 255 96 96 96 255 60 60 60 255 48 48 48 255
|
||||
Stone Brick
|
||||
98 120 120 120 255 96 96 96 255 60 60 60 255 48 48 48 255
|
||||
Huge Brown Mushroom
|
||||
99 204 153 120 255 145 109 85 255 114 86 67 255 73 64 58 255
|
||||
Huge Red Mushroom
|
||||
100 255 43 43 255 196 29 38 255 186 105 109 255 124 64 64 255
|
||||
Iron Bars
|
||||
101 191 191 191 96 152 152 152 96 95 95 95 96 76 76 76 96
|
||||
Glass Pane
|
||||
102 255 255 255 64 204 204 204 64 127 127 127 64 102 102 102 64
|
||||
Melon
|
||||
103 193 193 65 255 174 174 47 255 97 97 5 255 76 76 20 255
|
||||
Pumpkin Stem
|
||||
104 146 192 0 255 116 153 0 255 73 96 0 255 58 76 0 255
|
||||
Melon Stem
|
||||
105 146 192 0 255 116 153 0 255 73 96 0 255 58 76 0 255
|
||||
Vines
|
||||
106 60 192 41 100 48 153 32 100 30 96 20 100 24 76 16 100
|
||||
Fence Gate
|
||||
107 127 98 49 96 95 72 33 96 48 34 9 96 32 21 21 96
|
||||
Brick Stairs
|
||||
108 170 86 62 255 136 68 49 255 85 43 31 255 68 34 24 255
|
||||
Stone Stairs
|
||||
109 120 120 120 255 96 96 96 255 60 60 60 255 48 48 48 255
|
||||
Biome Rainforest - Dark Green
|
||||
[RAINFOREST] 49 67 21 255 39 53 17 255 24 34 10 255 19 27 8 255
|
||||
Biome Swampland - Brown
|
||||
@@ -259,6 +298,12 @@ Biome Hell - Pink
|
||||
[HELL] 190 115 135 255 151 92 108 255 95 57 67 255 75 46 53 255
|
||||
Biome Sky - Blue
|
||||
[SKY] 34 44 134 255 27 35 107 255 17 22 67 255 13 18 53 255
|
||||
Biome Ocean - Blue
|
||||
[OCEAN] 34 44 134 255 27 35 107 255 17 22 67 255 13 18 53 255
|
||||
Biome River - Medium Blue
|
||||
[RIVER] 44 54 154 144 36 45 127 255 25 32 77 255 20 28 65 255
|
||||
Biome Extreme Hills - Dark Brown
|
||||
[EXTREME_HILLS] 38 22 12 255 30 18 10 255 19 11 6 255 15 9 5 255
|
||||
[RAINFALL-0.0] 120 120 120 255 96 96 96 255 60 60 60 255 48 48 48 255
|
||||
[RAINFALL-1.0] 38 92 255 255 30 73 204 255 19 46 127 255 15 36 102 255
|
||||
[TEMPERATURE-0.0] 38 92 255 255 30 73 204 255 19 46 127 255 15 36 102 255
|
||||
|
||||
@@ -30,8 +30,13 @@ Iron Ore
|
||||
15 136 130 127 255 108 104 101 255 68 65 63 255 54 52 50 255
|
||||
Coal Ore
|
||||
16 115 115 115 255 92 92 92 255 57 57 57 255 46 46 46 255
|
||||
Wood
|
||||
17 102 81 51 255 81 64 40 255 51 40 25 255 40 32 20 255
|
||||
Wood - Normal
|
||||
17 102 81 51 255 125 102 63 255 78 64 39 255 40 32 20 255
|
||||
17:0 102 81 51 255 125 102 63 255 78 64 39 255 40 32 20 255
|
||||
Wood - Spruce (Red/dark wood)
|
||||
17:1 75 44 24 255 125 102 63 255 78 64 39 255 30 18 10 255
|
||||
Wood - Birch (light wood)
|
||||
17:2 191 191 191 255 125 102 63 255 78 64 39 255 76 76 76 255
|
||||
Leaves
|
||||
18 47 99 32 255 34 86 20 255 24 66 14 255 23 57 13 255
|
||||
Sponge
|
||||
@@ -120,6 +125,10 @@ Double Stone Slab - Wood
|
||||
43:2 157 128 79 255 125 102 63 255 78 64 39 255 62 51 31 255
|
||||
Double Stone Slab - Cobblestone
|
||||
43:3 115 115 115 255 92 92 92 255 57 57 57 255 46 46 46 255
|
||||
Double Stone Slab - Brick
|
||||
43:4 170 86 62 255 136 68 49 255 85 43 31 255 68 34 24 255
|
||||
Double Stone Slab - Stone Brick
|
||||
43:5 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255
|
||||
Stone Slab
|
||||
44 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255
|
||||
44:0 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255
|
||||
@@ -129,6 +138,10 @@ Stone Slab - Wood
|
||||
44:2 157 128 79 255 125 102 63 255 78 64 39 255 62 51 31 255
|
||||
Stone Slab - Cobblestone
|
||||
44:3 115 115 115 255 92 92 92 255 57 57 57 255 46 46 46 255
|
||||
Stone Slab - Brick
|
||||
44:4 170 86 62 255 136 68 49 255 85 43 31 255 68 34 24 255
|
||||
Stone Slab - Stone Brick
|
||||
44:5 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255
|
||||
Brick
|
||||
45 170 86 62 255 136 68 49 255 85 43 31 255 68 34 24 255
|
||||
TNT
|
||||
@@ -233,6 +246,32 @@ Locked Chest
|
||||
95 125 91 38 255 100 72 30 255 62 45 19 255 50 36 15 255
|
||||
Trap Door
|
||||
96 111 91 54 255 88 72 43 255 55 45 27 255 44 36 21 255
|
||||
Stone - Sliverfish
|
||||
97 120 120 120 255 96 96 96 255 60 60 60 255 48 48 48 255
|
||||
Stone Brick
|
||||
98 120 120 120 255 96 96 96 255 60 60 60 255 48 48 48 255
|
||||
Huge Brown Mushroom
|
||||
99 204 153 120 255 145 109 85 255 114 86 67 255 73 64 58 255
|
||||
Huge Red Mushroom
|
||||
100 255 43 43 255 196 29 38 255 186 105 109 255 124 64 64 255
|
||||
Iron Bars
|
||||
101 191 191 191 96 152 152 152 96 95 95 95 96 76 76 76 96
|
||||
Glass Pane
|
||||
102 255 255 255 64 204 204 204 64 127 127 127 64 102 102 102 64
|
||||
Melon
|
||||
103 193 193 65 255 174 174 47 255 97 97 5 255 76 76 20 255
|
||||
Pumpkin Stem
|
||||
104 146 192 0 255 116 153 0 255 73 96 0 255 58 76 0 255
|
||||
Melon Stem
|
||||
105 146 192 0 255 116 153 0 255 73 96 0 255 58 76 0 255
|
||||
Vines
|
||||
106 60 192 41 100 48 153 32 100 30 96 20 100 24 76 16 100
|
||||
Fence Gate
|
||||
107 127 98 49 96 95 72 33 96 48 34 9 96 32 21 21 96
|
||||
Brick Stairs
|
||||
108 170 86 62 255 136 68 49 255 85 43 31 255 68 34 24 255
|
||||
Stone Stairs
|
||||
109 120 120 120 255 96 96 96 255 60 60 60 255 48 48 48 255
|
||||
Biome Rainforest - Dark Green
|
||||
[RAINFOREST] 49 67 21 255 39 53 17 255 24 34 10 255 19 27 8 255
|
||||
Biome Swampland - Brown
|
||||
@@ -259,6 +298,12 @@ Biome Hell - Pink
|
||||
[HELL] 190 115 135 255 151 92 108 255 95 57 67 255 75 46 53 255
|
||||
Biome Sky - Blue
|
||||
[SKY] 34 44 134 255 27 35 107 255 17 22 67 255 13 18 53 255
|
||||
Biome Ocean - Blue
|
||||
[OCEAN] 34 44 134 255 27 35 107 255 17 22 67 255 13 18 53 255
|
||||
Biome River - Medium Blue
|
||||
[RIVER] 44 54 154 144 36 45 127 255 25 32 77 255 20 28 65 255
|
||||
Biome Extreme Hills - Dark Brown
|
||||
[EXTREME_HILLS] 38 22 12 255 30 18 10 255 19 11 6 255 15 9 5 255
|
||||
[RAINFALL-0.0] 120 120 120 255 96 96 96 255 60 60 60 255 48 48 48 255
|
||||
[RAINFALL-1.0] 38 92 255 255 30 73 204 255 19 46 127 255 15 36 102 255
|
||||
[TEMPERATURE-0.0] 38 92 255 255 30 73 204 255 19 46 127 255 15 36 102 255
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
15 231 174 113 255 193 145 94 255 161 121 79 255 193 145 94 255
|
||||
16 56 60 70 255 46 50 58 255 39 42 49 255 46 50 58 255
|
||||
17 119 97 74 255 99 81 62 255 83 68 52 255 99 81 62 255
|
||||
17:0 119 97 74 255 99 81 62 255 83 68 52 255 99 81 62 255
|
||||
17:1 75 44 24 255 125 102 63 255 78 64 39 255 30 18 10 255
|
||||
17:2 191 191 191 255 125 102 63 255 78 64 39 255 76 76 76 255
|
||||
18 27 69 37 180 22 57 31 180 19 48 25 180 22 57 31 180
|
||||
19 193 193 65 255 174 174 47 255 97 97 5 255 76 76 20 255
|
||||
20 178 217 223 90 148 181 186 90 124 151 155 90 148 181 186 90
|
||||
@@ -59,11 +62,15 @@
|
||||
43:1 192 178 110 255 160 148 92 255 134 124 77 255 160 148 92 255
|
||||
43:2 109 80 60 255 91 67 50 255 76 56 41 255 91 67 50 255
|
||||
43:3 118 112 96 255 98 93 80 255 82 78 67 255 98 93 80 255
|
||||
43:4 170 86 62 255 136 68 49 255 85 43 31 255 68 34 24 255
|
||||
43:5 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255
|
||||
44 122 112 99 254 101 93 82 254 85 78 69 254 101 93 82 254
|
||||
44:0 122 112 99 254 101 93 82 254 85 78 69 254 101 93 82 254
|
||||
44:1 192 178 110 255 160 148 92 255 134 124 77 255 160 148 92 255
|
||||
44:2 109 80 60 255 91 67 50 255 76 56 41 255 91 67 50 255
|
||||
44:3 118 112 96 255 98 93 80 255 82 78 67 255 98 93 80 255
|
||||
44:4 170 86 62 255 136 68 49 255 85 43 31 255 68 34 24 255
|
||||
44:5 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255
|
||||
45 230 103 73 255 192 86 61 255 160 71 50 255 192 86 61 255
|
||||
46 255 79 30 255 231 72 27 255 193 60 22 255 231 72 27 255
|
||||
47 125 91 38 192 100 72 30 192 62 45 19 192 50 36 15 192
|
||||
@@ -116,6 +123,19 @@
|
||||
94 159 127 80 255 102 0 0 0 255 0 0 255 204 0 0 0
|
||||
95 125 91 38 255 100 72 30 255 62 45 19 255 50 36 15 255
|
||||
96 111 91 54 255 88 72 43 255 55 45 27 255 44 36 21 255
|
||||
97 120 120 120 255 96 96 96 255 60 60 60 255 48 48 48 255
|
||||
98 120 120 120 255 96 96 96 255 60 60 60 255 48 48 48 255
|
||||
99 204 153 120 255 145 109 85 255 114 86 67 255 73 64 58 255
|
||||
100 255 43 43 255 196 29 38 255 186 105 109 255 124 64 64 255
|
||||
101 191 191 191 96 152 152 152 96 95 95 95 96 76 76 76 96
|
||||
102 255 255 255 64 204 204 204 64 127 127 127 64 102 102 102 64
|
||||
103 193 193 65 255 174 174 47 255 97 97 5 255 76 76 20 255
|
||||
104 146 192 0 255 116 153 0 255 73 96 0 255 58 76 0 255
|
||||
105 146 192 0 255 116 153 0 255 73 96 0 255 58 76 0 255
|
||||
106 60 192 41 100 48 153 32 100 30 96 20 100 24 76 16 100
|
||||
107 127 98 49 96 95 72 33 96 48 34 9 96 32 21 21 96
|
||||
108 170 86 62 255 136 68 49 255 85 43 31 255 68 34 24 255
|
||||
109 120 120 120 255 96 96 96 255 60 60 60 255 48 48 48 255
|
||||
Biome Rainforest - Dark Green
|
||||
[RAINFOREST] 49 67 21 255 39 53 17 255 24 34 10 255 19 27 8 255
|
||||
Biome Swampland - Brown
|
||||
@@ -142,6 +162,12 @@ Biome Hell - Pink
|
||||
[HELL] 190 115 135 255 151 92 108 255 95 57 67 255 75 46 53 255
|
||||
Biome Sky - Blue
|
||||
[SKY] 34 44 134 255 27 35 107 255 17 22 67 255 13 18 53 255
|
||||
Biome Ocean - Blue
|
||||
[OCEAN] 34 44 134 255 27 35 107 255 17 22 67 255 13 18 53 255
|
||||
Biome River - Medium Blue
|
||||
[RIVER] 44 54 154 144 36 45 127 255 25 32 77 255 20 28 65 255
|
||||
Biome Extreme Hills - Dark Brown
|
||||
[EXTREME_HILLS] 38 22 12 255 30 18 10 255 19 11 6 255 15 9 5 255
|
||||
[RAINFALL-0.0] 120 120 120 255 96 96 96 255 60 60 60 255 48 48 48 255
|
||||
[RAINFALL-1.0] 38 92 255 255 30 73 204 255 19 46 127 255 15 36 102 255
|
||||
[TEMPERATURE-0.0] 38 92 255 255 30 73 204 255 19 46 127 255 15 36 102 255
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.dynmap</groupId>
|
||||
<artifactId>dynmap</artifactId>
|
||||
<version>0.21</version>
|
||||
<version>0.22.1</version>
|
||||
<name>dynmap</name>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
@@ -13,6 +13,24 @@
|
||||
<url>https://github.com/FrozenCow/dynmap/issues</url>
|
||||
</issueManagement>
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
<includes>
|
||||
<include>*.yml</include>
|
||||
<include>*.txt</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>false</filtering>
|
||||
<excludes>
|
||||
<exclude>*.yml</exclude>
|
||||
<exclude>*.txt</exclude>
|
||||
</excludes>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
|
||||
@@ -15,9 +15,20 @@
|
||||
<include>CHANGELOG*</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${project.basedir}/web/</directory>
|
||||
<outputDirectory>/dynmap/web/</outputDirectory>
|
||||
<includes>
|
||||
<include>version.js</include>
|
||||
</includes>
|
||||
<filtered>true</filtered>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${project.basedir}/web</directory>
|
||||
<outputDirectory>/dynmap/web</outputDirectory>
|
||||
<excludes>
|
||||
<exclude>version.js</exclude>
|
||||
</excludes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${project.basedir}/colorschemes</directory>
|
||||
@@ -32,7 +43,9 @@
|
||||
</fileSets>
|
||||
<files>
|
||||
<file>
|
||||
<source>${project.build.directory}/${artifactId}-${version}.jar</source>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<destName>dynmap.jar</destName></file></files>
|
||||
<source>${project.build.directory}/${artifactId}-${version}.jar</source>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<destName>dynmap.jar</destName>
|
||||
</file>
|
||||
</files>
|
||||
</assembly>
|
||||
|
||||
@@ -4,6 +4,8 @@ import java.io.IOException;
|
||||
import java.io.Writer;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.dynmap.markers.Marker;
|
||||
import org.dynmap.markers.MarkerSet;
|
||||
import org.json.simple.JSONAware;
|
||||
import org.json.simple.JSONStreamAware;
|
||||
|
||||
@@ -77,4 +79,8 @@ public class Client {
|
||||
}
|
||||
}
|
||||
|
||||
public static class ComponentMessage extends Update {
|
||||
public String type = "component";
|
||||
/* Each subclass must provide 'ctype' string for component 'type' */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,8 @@ public class ClientConfigurationComponent extends Component {
|
||||
s(t, "spammessage", c.getString("spammessage", "You may only chat once every %interval% seconds."));
|
||||
s(t, "webprefix", unescapeString(c.getString("webprefix", "[WEB] ")));
|
||||
s(t, "defaultzoom", c.getInteger("defaultzoom", 0));
|
||||
s(t, "sidebaropened", c.getBoolean("sidebaropened", false));
|
||||
s(t, "sidebaropened", c.getString("sidebaropened", "false"));
|
||||
s(t, "dynmapversion", plugin.getDescription().getVersion());
|
||||
|
||||
DynmapWorld defaultWorld = null;
|
||||
String defmap = null;
|
||||
|
||||
@@ -18,6 +18,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.World.Environment;
|
||||
import org.bukkit.block.Block;
|
||||
@@ -39,6 +40,7 @@ import org.bukkit.event.block.BlockPistonRetractEvent;
|
||||
import org.bukkit.event.block.BlockPlaceEvent;
|
||||
import org.bukkit.event.block.BlockSpreadEvent;
|
||||
import org.bukkit.event.block.LeavesDecayEvent;
|
||||
import org.bukkit.event.block.SignChangeEvent;
|
||||
import org.bukkit.event.entity.EntityExplodeEvent;
|
||||
import org.bukkit.event.entity.EntityListener;
|
||||
import org.bukkit.event.player.PlayerChatEvent;
|
||||
@@ -49,6 +51,7 @@ import org.bukkit.event.player.PlayerMoveEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.event.world.ChunkLoadEvent;
|
||||
import org.bukkit.event.world.ChunkPopulateEvent;
|
||||
import org.bukkit.event.world.SpawnChangeEvent;
|
||||
import org.bukkit.event.world.WorldListener;
|
||||
import org.bukkit.event.world.WorldLoadEvent;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
@@ -59,6 +62,8 @@ import org.dynmap.debug.Debug;
|
||||
import org.dynmap.debug.Debugger;
|
||||
import org.dynmap.hdmap.HDBlockModels;
|
||||
import org.dynmap.hdmap.TexturePack;
|
||||
import org.dynmap.markers.MarkerAPI;
|
||||
import org.dynmap.markers.impl.MarkerAPIImpl;
|
||||
import org.dynmap.permissions.BukkitPermissions;
|
||||
import org.dynmap.permissions.NijikokunPermissions;
|
||||
import org.dynmap.permissions.OpPermissions;
|
||||
@@ -85,6 +90,8 @@ public class DynmapPlugin extends JavaPlugin {
|
||||
|
||||
private HashMap<Event.Type, List<Listener>> event_handlers = new HashMap<Event.Type, List<Listener>>();
|
||||
|
||||
private MarkerAPIImpl markerapi;
|
||||
|
||||
public static File dataDirectory;
|
||||
public static File tilesDirectory;
|
||||
|
||||
@@ -208,6 +215,7 @@ public class DynmapPlugin extends JavaPlugin {
|
||||
permissions = new OpPermissions(new String[] { "fullrender", "cancelrender", "radiusrender", "resetstats", "reload" });
|
||||
|
||||
dataDirectory = this.getDataFolder();
|
||||
|
||||
/* Load block models */
|
||||
HDBlockModels.loadModels(dataDirectory);
|
||||
/* Load texture mappings */
|
||||
@@ -278,11 +286,11 @@ public class DynmapPlugin extends JavaPlugin {
|
||||
if (!configuration.getBoolean("disable-webserver", false)) {
|
||||
startWebserver();
|
||||
}
|
||||
|
||||
|
||||
/* Print version info */
|
||||
PluginDescriptionFile pdfFile = this.getDescription();
|
||||
Log.info("version " + pdfFile.getVersion() + " is enabled" );
|
||||
|
||||
|
||||
events.<Object>trigger("initialized", null);
|
||||
}
|
||||
|
||||
@@ -303,6 +311,19 @@ public class DynmapPlugin extends JavaPlugin {
|
||||
boolean checkbannedips = configuration.getBoolean("check-banned-ips", true);
|
||||
int maxconnections = configuration.getInteger("max-sessions", 30);
|
||||
if(maxconnections < 2) maxconnections = 2;
|
||||
/* Load customized response headers, if any */
|
||||
ConfigurationNode custhttp = configuration.getNode("http-response-headers");
|
||||
HashMap<String, String> custhdrs = new HashMap<String,String>();
|
||||
if(custhttp != null) {
|
||||
for(String k : custhttp.keySet()) {
|
||||
String v = custhttp.getString(k);
|
||||
if(v != null) {
|
||||
custhdrs.put(k, v);
|
||||
}
|
||||
}
|
||||
}
|
||||
HttpServer.setCustomHeaders(custhdrs);
|
||||
|
||||
if(allow_symlinks)
|
||||
Log.verboseinfo("Web server is permitting symbolic links");
|
||||
else
|
||||
@@ -348,6 +369,8 @@ public class DynmapPlugin extends JavaPlugin {
|
||||
}
|
||||
playerfacemgr = null;
|
||||
|
||||
/* Don't clean up markerAPI - other plugins may still be accessing it */
|
||||
|
||||
Debug.clearDebuggers();
|
||||
}
|
||||
|
||||
@@ -455,9 +478,14 @@ public class DynmapPlugin extends JavaPlugin {
|
||||
Block b = event.getBlock();
|
||||
Location loc = b.getLocation();
|
||||
mapManager.sscache.invalidateSnapshot(loc);
|
||||
BlockFace dir = event.getDirection();
|
||||
BlockFace dir;
|
||||
try { /* Workaround Bukkit bug = http://leaky.bukkit.org/issues/1227 */
|
||||
dir = event.getDirection();
|
||||
} catch (ClassCastException ccx) {
|
||||
dir = BlockFace.NORTH;
|
||||
}
|
||||
if(onpiston) {
|
||||
mapManager.touchVolume(loc, b.getRelative(dir, 2).getLocation());
|
||||
mapManager.touchVolume(loc, b.getRelative(dir, 2).getLocation());
|
||||
}
|
||||
for(int i = 0; i < 2; i++) {
|
||||
b = b.getRelative(dir, 1);
|
||||
@@ -471,7 +499,12 @@ public class DynmapPlugin extends JavaPlugin {
|
||||
Block b = event.getBlock();
|
||||
Location loc = b.getLocation();
|
||||
mapManager.sscache.invalidateSnapshot(loc);
|
||||
BlockFace dir = event.getDirection();
|
||||
BlockFace dir;
|
||||
try { /* Workaround Bukkit bug = http://leaky.bukkit.org/issues/1227 */
|
||||
dir = event.getDirection();
|
||||
} catch (ClassCastException ccx) {
|
||||
dir = BlockFace.NORTH;
|
||||
}
|
||||
if(onpiston) {
|
||||
mapManager.touchVolume(loc, b.getRelative(dir, 1+event.getLength()).getLocation());
|
||||
}
|
||||
@@ -556,13 +589,13 @@ public class DynmapPlugin extends JavaPlugin {
|
||||
/* Touch extreme corners */
|
||||
int x = event.getChunk().getX() << 4;
|
||||
int z = event.getChunk().getZ() << 4;
|
||||
mapManager.touchVolume(new Location(event.getWorld(), x, 0, z), new Location(event.getWorld(), x+15, 127, z+15));
|
||||
mapManager.touchVolume(new Location(event.getWorld(), x, 0, z), new Location(event.getWorld(), x+16, 128, z+16));
|
||||
}
|
||||
@Override
|
||||
public void onChunkPopulate(ChunkPopulateEvent event) {
|
||||
int x = event.getChunk().getX() << 4;
|
||||
int z = event.getChunk().getZ() << 4;
|
||||
mapManager.touchVolume(new Location(event.getWorld(), x, 0, z), new Location(event.getWorld(), x+15, 127, z+15));
|
||||
mapManager.touchVolume(new Location(event.getWorld(), x, 0, z), new Location(event.getWorld(), x+16, 128, z+16));
|
||||
}
|
||||
@Override
|
||||
public void onWorldLoad(WorldLoadEvent event) {
|
||||
@@ -614,6 +647,44 @@ public class DynmapPlugin extends JavaPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
/* Parse argument strings : handle quoted strings */
|
||||
public static String[] parseArgs(String[] args, CommandSender snd) {
|
||||
ArrayList<String> rslt = new ArrayList<String>();
|
||||
/* Build command line, so we can parse our way - make sure there is trailing space */
|
||||
String cmdline = "";
|
||||
for(int i = 0; i < args.length; i++) {
|
||||
cmdline += args[i] + " ";
|
||||
}
|
||||
boolean inquote = false;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for(int i = 0; i < cmdline.length(); i++) {
|
||||
char c = cmdline.charAt(i);
|
||||
if(inquote) { /* If in quote, accumulate until end or another quote */
|
||||
if(c == '\"') { /* End quote */
|
||||
inquote = false;
|
||||
}
|
||||
else {
|
||||
sb.append(c);
|
||||
}
|
||||
}
|
||||
else if(c == '\"') { /* Start of quote? */
|
||||
inquote = true;
|
||||
}
|
||||
else if(c == ' ') { /* Ending space? */
|
||||
rslt.add(sb.toString());
|
||||
sb.setLength(0);
|
||||
}
|
||||
else {
|
||||
sb.append(c);
|
||||
}
|
||||
}
|
||||
if(inquote) { /* If still in quote, syntax error */
|
||||
snd.sendMessage("Error: unclosed doublequote");
|
||||
return null;
|
||||
}
|
||||
return rslt.toArray(new String[rslt.size()]);
|
||||
}
|
||||
|
||||
private static final Set<String> commands = new HashSet<String>(Arrays.asList(new String[] {
|
||||
"render",
|
||||
"hide",
|
||||
@@ -627,11 +698,20 @@ public class DynmapPlugin extends JavaPlugin {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
|
||||
if(cmd.getName().equalsIgnoreCase("dmarker")) {
|
||||
return MarkerAPIImpl.onCommand(this, sender, cmd, commandLabel, args);
|
||||
}
|
||||
if (!cmd.getName().equalsIgnoreCase("dynmap"))
|
||||
return false;
|
||||
Player player = null;
|
||||
if (sender instanceof Player)
|
||||
player = (Player) sender;
|
||||
/* Re-parse args - handle doublequotes */
|
||||
args = parseArgs(args, sender);
|
||||
|
||||
if(args == null)
|
||||
return false;
|
||||
|
||||
if (args.length > 0) {
|
||||
String c = args[0];
|
||||
if (!commands.contains(c)) {
|
||||
@@ -755,7 +835,7 @@ public class DynmapPlugin extends JavaPlugin {
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean checkPlayerPermission(CommandSender sender, String permission) {
|
||||
public boolean checkPlayerPermission(CommandSender sender, String permission) {
|
||||
if (!(sender instanceof Player) || sender.isOp()) {
|
||||
return true;
|
||||
} else if (!permissions.has(sender, permission.toLowerCase())) {
|
||||
@@ -1073,6 +1153,16 @@ public class DynmapPlugin extends JavaPlugin {
|
||||
}
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onSpawnChange(SpawnChangeEvent event) {
|
||||
/* Call listeners */
|
||||
List<Listener> ll = event_handlers.get(event.getType());
|
||||
if(ll != null) {
|
||||
for(Listener l : ll) {
|
||||
((WorldListener)l).onSpawnChange(event);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private CustomEventListener ourCustomEventHandler = new CustomEventListener() {
|
||||
@@ -1128,11 +1218,12 @@ public class DynmapPlugin extends JavaPlugin {
|
||||
case BLOCK_SPREAD:
|
||||
case BLOCK_PISTON_EXTEND:
|
||||
case BLOCK_PISTON_RETRACT:
|
||||
pm.registerEvent(type, ourBlockEventHandler, Event.Priority.Monitor, this);
|
||||
pm.registerEvent(type, ourBlockEventHandler, Event.Priority.Monitor, this);
|
||||
break;
|
||||
case WORLD_LOAD:
|
||||
case CHUNK_LOAD:
|
||||
case CHUNK_POPULATED:
|
||||
case SPAWN_CHANGE:
|
||||
pm.registerEvent(type, ourWorldEventHandler, Event.Priority.Monitor, this);
|
||||
break;
|
||||
case CUSTOM_EVENT:
|
||||
@@ -1150,4 +1241,26 @@ public class DynmapPlugin extends JavaPlugin {
|
||||
}
|
||||
ll.add(listener);
|
||||
}
|
||||
/**
|
||||
* ** This is the public API for other plugins to use for accessing the Marker API **
|
||||
* This method can return null if the 'markers' component has not been configured -
|
||||
* a warning message will be issued to the server.log in this event.
|
||||
*
|
||||
* @return MarkerAPI, or null if not configured
|
||||
*/
|
||||
public MarkerAPI getMarkerAPI() {
|
||||
if(markerapi == null) {
|
||||
Log.warning("Marker API has been requested, but is not enabled. Uncomment or add 'markers' component to configuration.txt.");
|
||||
}
|
||||
return markerapi;
|
||||
}
|
||||
public boolean markerAPIInitialized() {
|
||||
return (markerapi != null);
|
||||
}
|
||||
/**
|
||||
* Register markers API - used by component to supply marker API to plugin
|
||||
*/
|
||||
public void registerMarkerAPI(MarkerAPIImpl api) {
|
||||
markerapi = api;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package org.dynmap;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.Location;
|
||||
import org.dynmap.MapType.ImageFormat;
|
||||
import org.dynmap.debug.Debug;
|
||||
import org.dynmap.utils.DynmapBufferedImage;
|
||||
import org.dynmap.utils.FileLockManager;
|
||||
@@ -151,6 +153,7 @@ public class DynmapWorld {
|
||||
boolean neg_step_y;
|
||||
String baseprefix;
|
||||
int zoomlevel;
|
||||
int background;
|
||||
String zoomprefix;
|
||||
String fnprefix;
|
||||
String zfnprefix;
|
||||
@@ -233,7 +236,7 @@ public class DynmapWorld {
|
||||
/* If level is above top needed for this map, skip */
|
||||
if(zoomlevel > (this.extrazoomoutlevels + mt.getMapZoomOutLevels()))
|
||||
continue;
|
||||
List<String> pfx = mt.baseZoomFilePrefixes();
|
||||
List<MapType.ZoomInfo> pfx = mt.baseZoomFileInfo();
|
||||
int stepsize = mt.baseZoomFileStepSize();
|
||||
int bigworldshift = mt.getBigWorldShift();
|
||||
boolean neg_step_x = false;
|
||||
@@ -252,13 +255,14 @@ public class DynmapWorld {
|
||||
break;
|
||||
}
|
||||
int[] stepseq = mt.zoomFileStepSequence();
|
||||
for(String p : pfx) {
|
||||
for(MapType.ZoomInfo p : pfx) {
|
||||
PrefixData pd = new PrefixData();
|
||||
pd.stepsize = stepsize;
|
||||
pd.neg_step_x = neg_step_x;
|
||||
pd.neg_step_y = neg_step_y;
|
||||
pd.stepseq = stepseq;
|
||||
pd.baseprefix = p;
|
||||
pd.baseprefix = p.prefix;
|
||||
pd.background = p.background_argb;
|
||||
pd.zoomlevel = zoomlevel;
|
||||
pd.zoomprefix = "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz".substring(0, zoomlevel);
|
||||
pd.bigworldshift = bigworldshift;
|
||||
@@ -279,7 +283,7 @@ public class DynmapWorld {
|
||||
pd.zfnprefix = "z" + pd.fnprefix;
|
||||
}
|
||||
|
||||
maptab.put(p, pd);
|
||||
maptab.put(p.prefix, pd);
|
||||
}
|
||||
}
|
||||
return maptab;
|
||||
@@ -430,6 +434,16 @@ public class DynmapWorld {
|
||||
/* blit scaled rendered tile onto zoom-out tile */
|
||||
zIm.setRGB(((i>>1) != 0)?0:width/2, (i & 1) * height/2, width/2, height/2, argb, 0, width);
|
||||
}
|
||||
else if((pd.background != 0) && (pd.fmt != ImageFormat.FORMAT_PNG)) {
|
||||
Arrays.fill(argb, pd.background);
|
||||
/* blit scaled rendered tile onto zoom-out tile */
|
||||
zIm.setRGB(((i>>1) != 0)?0:width/2, (i & 1) * height/2, width/2, height/2, argb, 0, width);
|
||||
}
|
||||
}
|
||||
else if((pd.background != 0) && (pd.fmt != ImageFormat.FORMAT_PNG)) {
|
||||
Arrays.fill(argb, pd.background);
|
||||
/* blit scaled rendered tile onto zoom-out tile */
|
||||
zIm.setRGB(((i>>1) != 0)?0:width/2, (i & 1) * height/2, width/2, height/2, argb, 0, width);
|
||||
}
|
||||
}
|
||||
FileLockManager.getWriteLock(zf);
|
||||
|
||||
@@ -268,12 +268,15 @@ public class MapManager {
|
||||
activemaplist = map.getMapNamesSharingRender(world);
|
||||
/* Build active map list */
|
||||
activemaps = "";
|
||||
for(String n : activemaplist) {
|
||||
if((mapname != null) && (!mapname.equals(n)))
|
||||
continue;
|
||||
if(activemaps.length() > 0)
|
||||
activemaps += ",";
|
||||
activemaps += n;
|
||||
if(mapname != null) {
|
||||
activemaps = mapname;
|
||||
}
|
||||
else {
|
||||
for(String n : activemaplist) {
|
||||
if(activemaps.length() > 0)
|
||||
activemaps += ",";
|
||||
activemaps += n;
|
||||
}
|
||||
}
|
||||
/* Mark all the concurrently rendering maps rendered */
|
||||
renderedmaps.addAll(map.getMapsSharingRender(world));
|
||||
@@ -285,6 +288,14 @@ public class MapManager {
|
||||
renderQueue.add(mt);
|
||||
}
|
||||
}
|
||||
/* Add spawn location too (helps with some worlds where 0,64,0 may not be generated */
|
||||
Location sloc = world.world.getSpawnLocation();
|
||||
for (MapTile mt : map.getTiles(sloc)) {
|
||||
if (!found.getFlag(mt.tileOrdinalX(), mt.tileOrdinalY())) {
|
||||
found.setFlag(mt.tileOrdinalX(), mt.tileOrdinalY(), true);
|
||||
renderQueue.add(mt);
|
||||
}
|
||||
}
|
||||
if(world.seedloc != null) {
|
||||
for(Location seed : world.seedloc) {
|
||||
for (MapTile mt : map.getTiles(seed)) {
|
||||
@@ -790,7 +801,8 @@ public class MapManager {
|
||||
|
||||
public void pushUpdate(String worldName, Object update) {
|
||||
DynmapWorld world = getWorld(worldName);
|
||||
world.updates.pushUpdate(update);
|
||||
if(world != null)
|
||||
world.updates.pushUpdate(update);
|
||||
}
|
||||
|
||||
public Object[] getWorldUpdates(String worldName, long since) {
|
||||
|
||||
@@ -28,6 +28,12 @@ public abstract class MapType {
|
||||
public String getFileExt() { return ext; }
|
||||
public float getQuality() { return qual; }
|
||||
};
|
||||
|
||||
public static class ZoomInfo {
|
||||
public String prefix;
|
||||
public int background_argb;
|
||||
public ZoomInfo(String pre, int bg) { prefix = pre; background_argb = bg; }
|
||||
}
|
||||
|
||||
public abstract MapTile[] getTiles(Location l);
|
||||
|
||||
@@ -54,7 +60,7 @@ public abstract class MapType {
|
||||
X_MINUS_Y_MINUS
|
||||
}
|
||||
public abstract MapStep zoomFileMapStep();
|
||||
public abstract List<String> baseZoomFilePrefixes();
|
||||
public abstract List<ZoomInfo> baseZoomFileInfo();
|
||||
public abstract int baseZoomFileStepSize();
|
||||
/* How many bits of coordinate are shifted off to make big world directory name */
|
||||
public abstract int getBigWorldShift();
|
||||
@@ -64,7 +70,11 @@ public abstract class MapType {
|
||||
public int getMapZoomOutLevels() { return 0; }
|
||||
|
||||
public ImageFormat getImageFormat() { return ImageFormat.FORMAT_PNG; }
|
||||
|
||||
|
||||
public int getBackgroundARGBNight() { return 0; }
|
||||
|
||||
public int getBackgroundARGBDay() { return 0; }
|
||||
|
||||
/**
|
||||
* Step sequence for creating zoomed file: first index is top-left, second top-right, third bottom-left, forth bottom-right
|
||||
* Values correspond to tile X,Y (0), X+step,Y (1), X,Y+step (2), X+step,Y+step (3)
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
package org.dynmap;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.event.world.SpawnChangeEvent;
|
||||
import org.bukkit.event.world.WorldListener;
|
||||
import org.bukkit.event.world.WorldLoadEvent;
|
||||
import org.dynmap.markers.Marker;
|
||||
import org.dynmap.markers.MarkerIcon;
|
||||
import org.dynmap.markers.MarkerSet;
|
||||
import org.dynmap.markers.impl.MarkerAPIImpl;
|
||||
import org.dynmap.markers.impl.MarkerSignManager;
|
||||
|
||||
/**
|
||||
* Markers component - ties in the component system, both on the server and client
|
||||
*/
|
||||
public class MarkersComponent extends ClientComponent {
|
||||
private MarkerAPIImpl api;
|
||||
private MarkerSignManager signmgr;
|
||||
private MarkerIcon spawnicon;
|
||||
private String spawnlbl;
|
||||
|
||||
public MarkersComponent(DynmapPlugin plugin, ConfigurationNode configuration) {
|
||||
super(plugin, configuration);
|
||||
/* Register API with plugin, if needed */
|
||||
api = (MarkerAPIImpl)plugin.getMarkerAPI();
|
||||
if(plugin.markerAPIInitialized()) {
|
||||
api = (MarkerAPIImpl)plugin.getMarkerAPI();
|
||||
}
|
||||
else {
|
||||
api = MarkerAPIImpl.initializeMarkerAPI(plugin);
|
||||
plugin.registerMarkerAPI(api);
|
||||
}
|
||||
/* If configuration has enabled sign support, prime it too */
|
||||
if(configuration.getBoolean("enablesigns", false)) {
|
||||
signmgr = MarkerSignManager.initializeSignManager(plugin);
|
||||
}
|
||||
/* If we're posting spawn point markers, initialize and add world listener */
|
||||
if(configuration.getBoolean("showspawn", false)) {
|
||||
String ico = configuration.getString("spawnicon", MarkerIcon.WORLD);
|
||||
spawnlbl = configuration.getString("spawnlabel", "Spawn");
|
||||
spawnicon = api.getMarkerIcon(ico); /* Load it */
|
||||
if(spawnicon == null) {
|
||||
spawnicon = api.getMarkerIcon(MarkerIcon.WORLD);
|
||||
}
|
||||
WorldListener wl = new WorldListener() {
|
||||
public void onWorldLoad(WorldLoadEvent event) {
|
||||
World w = event.getWorld(); /* Get the world */
|
||||
Location loc = w.getSpawnLocation(); /* Get location of spawn */
|
||||
if(loc != null)
|
||||
addUpdateWorld(w, loc);
|
||||
}
|
||||
public void onSpawnChange(SpawnChangeEvent event) {
|
||||
World w = event.getWorld(); /* Get the world */
|
||||
Location loc = w.getSpawnLocation(); /* Get location of spawn */
|
||||
if(loc != null)
|
||||
addUpdateWorld(w, loc);
|
||||
}
|
||||
};
|
||||
plugin.registerEvent(org.bukkit.event.Event.Type.WORLD_LOAD, wl);
|
||||
plugin.registerEvent(org.bukkit.event.Event.Type.SPAWN_CHANGE, wl);
|
||||
/* Initialize already loaded worlds */
|
||||
for(DynmapWorld w : plugin.getMapManager().getWorlds()) {
|
||||
World world = w.world;
|
||||
Location loc = world.getSpawnLocation();
|
||||
if(loc != null)
|
||||
addUpdateWorld(world, loc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void addUpdateWorld(World w, Location loc) {
|
||||
MarkerSet ms = api.getMarkerSet(MarkerSet.DEFAULT);
|
||||
if(ms != null) {
|
||||
String spawnid = "_spawn_" + w.getName();
|
||||
Marker m = ms.findMarker(spawnid); /* See if defined */
|
||||
if(m == null) { /* Not defined yet, add it */
|
||||
ms.createMarker(spawnid, spawnlbl, w.getName(), loc.getX(), loc.getY(), loc.getZ(),
|
||||
spawnicon, false);
|
||||
}
|
||||
else {
|
||||
m.setLocation(w.getName(), loc.getX(), loc.getY(), loc.getZ());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
if(signmgr != null) {
|
||||
MarkerSignManager.terminateSignManager(this.plugin);
|
||||
signmgr = null;
|
||||
}
|
||||
/* Don't unregister API - other plugins might be using it, and we want to keep non-persistent markers */
|
||||
}
|
||||
}
|
||||
@@ -56,16 +56,21 @@ public class PlayerFaces {
|
||||
int[] faceaccessory = new int[64]; /* 8x8 of face accessory */
|
||||
/* Get buffered image for face at 8x8 */
|
||||
DynmapBufferedImage face8x8 = DynmapBufferedImage.allocateBufferedImage(8, 8);
|
||||
int[] bgcolor = new int[1];
|
||||
img.getRGB(0, 0, 1, 1, bgcolor, 0, 1); /* Get BG color (for accessory face) */
|
||||
img.getRGB(8, 8, 8, 8, face8x8.argb_buf, 0, 8); /* Read face from image */
|
||||
img.getRGB(40, 8, 8, 8, faceaccessory, 0, 8); /* Read face accessory from image */
|
||||
/* Apply accessory to face: first element is transparency color so only ones not matching it */
|
||||
/* Apply accessory to face: see if anything is transparent (if so, apply accessory */
|
||||
boolean transp = false;
|
||||
for(int i = 0; i < 64; i++) {
|
||||
if(faceaccessory[i] != bgcolor[0])
|
||||
face8x8.argb_buf[i] = faceaccessory[i];
|
||||
else if(face8x8.argb_buf[i] == bgcolor[0])
|
||||
face8x8.argb_buf[i] = 0;
|
||||
if((faceaccessory[i] & 0xFF000000) == 0) {
|
||||
transp = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(transp) {
|
||||
for(int i = 0; i < 64; i++) {
|
||||
if((faceaccessory[i] & 0xFF000000) != 0)
|
||||
face8x8.argb_buf[i] = faceaccessory[i];
|
||||
}
|
||||
}
|
||||
/* Write 8x8 file */
|
||||
File img_8x8 = new File(faces8x8dir, playername + ".png");
|
||||
|
||||
@@ -454,11 +454,11 @@ public class FlatMap extends MapType {
|
||||
return Collections.singletonList(name);
|
||||
}
|
||||
|
||||
public List<String> baseZoomFilePrefixes() {
|
||||
ArrayList<String> s = new ArrayList<String>();
|
||||
s.add(getPrefix() + "_128");
|
||||
public List<ZoomInfo> baseZoomFileInfo() {
|
||||
ArrayList<ZoomInfo> s = new ArrayList<ZoomInfo>();
|
||||
s.add(new ZoomInfo(getPrefix() + "_128", 0));
|
||||
if(night_and_day)
|
||||
s.add(getPrefix()+"_day_128");
|
||||
s.add(new ZoomInfo(getPrefix()+"_day_128", 0));
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,11 +31,11 @@ public class HDBlockModels {
|
||||
public static class HDScaledBlockModels {
|
||||
private short[][][] modelvectors;
|
||||
|
||||
public final short[] getScaledModel(int blocktype, int blockdata) {
|
||||
public final short[] getScaledModel(int blocktype, int blockdata, int blockrenderdata) {
|
||||
if(modelvectors[blocktype] == null) {
|
||||
return null;
|
||||
}
|
||||
return modelvectors[blocktype][blockdata];
|
||||
return modelvectors[blocktype][(blockrenderdata>=0)?blockrenderdata:blockdata];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,8 @@ public class HDMap extends MapType {
|
||||
private ConfigurationNode configuration;
|
||||
private int mapzoomout;
|
||||
private MapType.ImageFormat imgformat;
|
||||
private int bgcolornight;
|
||||
private int bgcolorday;
|
||||
|
||||
public static final String IMGFORMAT_PNG = "png";
|
||||
public static final String IMGFORMAT_JPG = "jpg";
|
||||
@@ -100,7 +102,20 @@ public class HDMap extends MapType {
|
||||
if(imgformat == null) {
|
||||
Log.severe("HDMap '"+name+"' set invalid image-format: " + fmt);
|
||||
imgformat = ImageFormat.FORMAT_PNG;
|
||||
}
|
||||
}
|
||||
/* Get color info */
|
||||
String c = configuration.getString("background");
|
||||
if(c != null) {
|
||||
bgcolorday = bgcolornight = parseColor(c);
|
||||
}
|
||||
c = configuration.getString("backgroundday");
|
||||
if(c != null) {
|
||||
bgcolorday = parseColor(c);
|
||||
}
|
||||
c = configuration.getString("backgroundnight");
|
||||
if(c != null) {
|
||||
bgcolornight = parseColor(c);
|
||||
}
|
||||
}
|
||||
|
||||
public HDShader getShader() { return shader; }
|
||||
@@ -128,11 +143,11 @@ public class HDMap extends MapType {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> baseZoomFilePrefixes() {
|
||||
ArrayList<String> s = new ArrayList<String>();
|
||||
s.add(prefix);
|
||||
public List<ZoomInfo> baseZoomFileInfo() {
|
||||
ArrayList<ZoomInfo> s = new ArrayList<ZoomInfo>();
|
||||
s.add(new ZoomInfo(prefix, getBackgroundARGBNight()));
|
||||
if(lighting.isNightAndDayEnabled())
|
||||
s.add(prefix + "_day");
|
||||
s.add(new ZoomInfo(prefix + "_day", getBackgroundARGBDay()));
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -222,4 +237,37 @@ public class HDMap extends MapType {
|
||||
a(worldObject, "maps", o);
|
||||
|
||||
}
|
||||
|
||||
private static int parseColor(String c) {
|
||||
int v = 0;
|
||||
if(c.startsWith("#")) {
|
||||
c = c.substring(1);
|
||||
if(c.length() == 3) { /* #rgb */
|
||||
try {
|
||||
v = Integer.valueOf(c, 16);
|
||||
} catch (NumberFormatException nfx) {
|
||||
return 0;
|
||||
}
|
||||
v = 0xFF000000 | ((v & 0xF00) << 12) | ((v & 0x0F0) << 8) | ((v & 0x00F) << 4);
|
||||
}
|
||||
else if(c.length() == 6) { /* #rrggbb */
|
||||
try {
|
||||
v = Integer.valueOf(c, 16);
|
||||
} catch (NumberFormatException nfx) {
|
||||
return 0;
|
||||
}
|
||||
v = 0xFF000000 | (v & 0xFFFFFF);
|
||||
}
|
||||
}
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
public int getBackgroundARGBDay() {
|
||||
return bgcolorday;
|
||||
}
|
||||
|
||||
public int getBackgroundARGBNight() {
|
||||
return bgcolornight;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,10 @@ public interface HDPerspectiveState {
|
||||
* Get current block data
|
||||
*/
|
||||
int getBlockData();
|
||||
/**
|
||||
* Get current block render data
|
||||
*/
|
||||
int getBlockRenderData();
|
||||
/**
|
||||
* Get direction of last block step
|
||||
*/
|
||||
|
||||
@@ -22,6 +22,7 @@ import org.dynmap.Log;
|
||||
import org.dynmap.MapManager;
|
||||
import org.dynmap.MapTile;
|
||||
import org.dynmap.MapType;
|
||||
import org.dynmap.MapType.ImageFormat;
|
||||
import org.dynmap.TileHashManager;
|
||||
import org.dynmap.debug.Debug;
|
||||
import org.dynmap.utils.MapIterator.BlockStep;
|
||||
@@ -79,7 +80,9 @@ public class IsoHDPerspective implements HDPerspective {
|
||||
private static final int CHEST_BLKTYPEID = 54;
|
||||
private static final int FENCE_BLKTYPEID = 85;
|
||||
private static final int REDSTONE_BLKTYPEID = 55;
|
||||
|
||||
private static final int IRONFENCE_BLKTYPEID = 101;
|
||||
private static final int GLASSPANE_BLKTYPEID = 102;
|
||||
private static final int FENCEGATE_BLKTYPEID = 107;
|
||||
private enum ChestData {
|
||||
SINGLE_WEST, SINGLE_SOUTH, SINGLE_EAST, SINGLE_NORTH, LEFT_WEST, LEFT_SOUTH, LEFT_EAST, LEFT_NORTH, RIGHT_WEST, RIGHT_SOUTH, RIGHT_EAST, RIGHT_NORTH
|
||||
};
|
||||
@@ -95,6 +98,7 @@ public class IsoHDPerspective implements HDPerspective {
|
||||
private class OurPerspectiveState implements HDPerspectiveState {
|
||||
int blocktypeid = 0;
|
||||
int blockdata = 0;
|
||||
int blockrenderdata = -1;
|
||||
int lastblocktypeid = 0;
|
||||
Vector3D top, bottom;
|
||||
int px, py;
|
||||
@@ -133,39 +137,51 @@ public class IsoHDPerspective implements HDPerspective {
|
||||
mapiter = mi;
|
||||
this.isnether = isnether;
|
||||
}
|
||||
private final void updateSemitransparentLight() {
|
||||
BlockStep [] steps = { BlockStep.Y_PLUS, BlockStep.X_MINUS, BlockStep.X_PLUS,
|
||||
BlockStep.Z_MINUS, BlockStep.Z_PLUS };
|
||||
emitlevel = skylevel = 0;
|
||||
for(BlockStep s : steps) {
|
||||
mapiter.stepPosition(s);
|
||||
int v = mapiter.getBlockEmittedLight();
|
||||
if(v > emitlevel) emitlevel = v;
|
||||
v = mapiter.getBlockSkyLight();
|
||||
if(v > skylevel) skylevel = v;
|
||||
mapiter.unstepPosition(s);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Update sky and emitted light
|
||||
*/
|
||||
private final void updateLightLevel() {
|
||||
/* Look up transparency for current block */
|
||||
BlockTransparency bt = HDTextureMap.getTransparency(blocktypeid);
|
||||
if(bt == BlockTransparency.TRANSPARENT) {
|
||||
skylevel = mapiter.getBlockSkyLight();
|
||||
emitlevel = mapiter.getBlockEmittedLight();
|
||||
}
|
||||
else if(HDTextureMap.getTransparency(lastblocktypeid) != BlockTransparency.SEMITRANSPARENT) {
|
||||
mapiter.unstepPosition(laststep); /* Back up to block we entered on */
|
||||
if(mapiter.getY() < 128) {
|
||||
emitlevel = mapiter.getBlockEmittedLight();
|
||||
skylevel = mapiter.getBlockSkyLight();
|
||||
} else {
|
||||
emitlevel = 0;
|
||||
skylevel = 15;
|
||||
}
|
||||
mapiter.stepPosition(laststep);
|
||||
}
|
||||
else {
|
||||
mapiter.unstepPosition(laststep); /* Back up to block we entered on */
|
||||
if(mapiter.getY() < 128) {
|
||||
mapiter.stepPosition(BlockStep.Y_PLUS); /* Look above */
|
||||
emitlevel = mapiter.getBlockEmittedLight();
|
||||
skylevel = mapiter.getBlockSkyLight();
|
||||
mapiter.stepPosition(BlockStep.Y_MINUS);
|
||||
} else {
|
||||
emitlevel = 0;
|
||||
skylevel = 15;
|
||||
}
|
||||
mapiter.stepPosition(laststep);
|
||||
switch(bt) {
|
||||
case TRANSPARENT:
|
||||
skylevel = mapiter.getBlockSkyLight();
|
||||
emitlevel = mapiter.getBlockEmittedLight();
|
||||
break;
|
||||
case OPAQUE:
|
||||
if(HDTextureMap.getTransparency(lastblocktypeid) != BlockTransparency.SEMITRANSPARENT) {
|
||||
mapiter.unstepPosition(laststep); /* Back up to block we entered on */
|
||||
if(mapiter.getY() < 128) {
|
||||
emitlevel = mapiter.getBlockEmittedLight();
|
||||
skylevel = mapiter.getBlockSkyLight();
|
||||
} else {
|
||||
emitlevel = 0;
|
||||
skylevel = 15;
|
||||
}
|
||||
mapiter.stepPosition(laststep);
|
||||
}
|
||||
else {
|
||||
mapiter.unstepPosition(laststep); /* Back up to block we entered on */
|
||||
updateSemitransparentLight();
|
||||
mapiter.stepPosition(laststep);
|
||||
}
|
||||
break;
|
||||
case SEMITRANSPARENT:
|
||||
updateSemitransparentLight();
|
||||
break;
|
||||
}
|
||||
}
|
||||
/**
|
||||
@@ -193,6 +209,10 @@ public class IsoHDPerspective implements HDPerspective {
|
||||
* Get current block data
|
||||
*/
|
||||
public final int getBlockData() { return blockdata; }
|
||||
/**
|
||||
* Get current block render data
|
||||
*/
|
||||
public final int getBlockRenderData() { return blockrenderdata; }
|
||||
/**
|
||||
* Get direction of last block step
|
||||
*/
|
||||
@@ -320,20 +340,25 @@ public class IsoHDPerspective implements HDPerspective {
|
||||
}
|
||||
private int generateFenceBlockData(MapIterator mapiter) {
|
||||
int blockdata = 0;
|
||||
int id;
|
||||
/* Check north */
|
||||
if(mapiter.getBlockTypeIDAt(BlockStep.X_MINUS) == FENCE_BLKTYPEID) { /* Fence? */
|
||||
id = mapiter.getBlockTypeIDAt(BlockStep.X_MINUS);
|
||||
if((id == FENCE_BLKTYPEID) || (id == FENCEGATE_BLKTYPEID)) { /* Fence? */
|
||||
blockdata |= 1;
|
||||
}
|
||||
/* Look east */
|
||||
if(mapiter.getBlockTypeIDAt(BlockStep.Z_MINUS) == FENCE_BLKTYPEID) { /* Fence? */
|
||||
id = mapiter.getBlockTypeIDAt(BlockStep.Z_MINUS);
|
||||
if((id == FENCE_BLKTYPEID) || (id == FENCEGATE_BLKTYPEID)) { /* Fence? */
|
||||
blockdata |= 2;
|
||||
}
|
||||
/* Look south */
|
||||
if(mapiter.getBlockTypeIDAt(BlockStep.X_PLUS) == FENCE_BLKTYPEID) { /* Fence? */
|
||||
id = mapiter.getBlockTypeIDAt(BlockStep.X_PLUS);
|
||||
if((id == FENCE_BLKTYPEID) || (id == FENCEGATE_BLKTYPEID)) { /* Fence? */
|
||||
blockdata |= 4;
|
||||
}
|
||||
/* Look west */
|
||||
if(mapiter.getBlockTypeIDAt(BlockStep.Z_PLUS) == FENCE_BLKTYPEID) { /* Fence? */
|
||||
id = mapiter.getBlockTypeIDAt(BlockStep.Z_PLUS);
|
||||
if((id == FENCE_BLKTYPEID) || (id == FENCEGATE_BLKTYPEID)) { /* Fence? */
|
||||
blockdata |= 8;
|
||||
}
|
||||
return blockdata;
|
||||
@@ -443,6 +468,42 @@ public class IsoHDPerspective implements HDPerspective {
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/**
|
||||
* Generate block render data for glass pane and iron fence.
|
||||
* - bit 0 = X-minus axis
|
||||
* - bit 1 = Z-minus axis
|
||||
* - bit 2 = X-plus axis
|
||||
* - bit 3 = Z-plus axis
|
||||
*
|
||||
* @param mapiter - iterator
|
||||
* @param typeid - ID of our material (test is for adjacent material OR nontransparent)
|
||||
* @return
|
||||
*/
|
||||
private int generateIronFenceGlassBlockData(MapIterator mapiter, int typeid) {
|
||||
int blockdata = 0;
|
||||
int id;
|
||||
/* Check north */
|
||||
id = mapiter.getBlockTypeIDAt(BlockStep.X_MINUS);
|
||||
if((id == typeid) || ((id > 0) && (HDTextureMap.getTransparency(id) == BlockTransparency.OPAQUE))) {
|
||||
blockdata |= 1;
|
||||
}
|
||||
/* Look east */
|
||||
id = mapiter.getBlockTypeIDAt(BlockStep.Z_MINUS);
|
||||
if((id == typeid) || ((id > 0) && (HDTextureMap.getTransparency(id) == BlockTransparency.OPAQUE))) {
|
||||
blockdata |= 2;
|
||||
}
|
||||
/* Look south */
|
||||
id = mapiter.getBlockTypeIDAt(BlockStep.X_PLUS);
|
||||
if((id == typeid) || ((id > 0) && (HDTextureMap.getTransparency(id) == BlockTransparency.OPAQUE))) {
|
||||
blockdata |= 4;
|
||||
}
|
||||
/* Look west */
|
||||
id = mapiter.getBlockTypeIDAt(BlockStep.Z_PLUS);
|
||||
if((id == typeid) || ((id > 0) && (HDTextureMap.getTransparency(id) == BlockTransparency.OPAQUE))) {
|
||||
blockdata |= 8;
|
||||
}
|
||||
return blockdata;
|
||||
}
|
||||
private final boolean handleSubModel(short[] model, HDShaderState[] shaderstate, boolean[] shaderdone) {
|
||||
boolean firststep = true;
|
||||
|
||||
@@ -473,22 +534,27 @@ public class IsoHDPerspective implements HDPerspective {
|
||||
skiptoair = false;
|
||||
}
|
||||
else if(nonairhit || (blocktypeid != 0)) {
|
||||
blockdata = mapiter.getBlockData();
|
||||
switch(blocktypeid) {
|
||||
case FENCE_BLKTYPEID: /* Special case for fence - need to fake data so we can render properly */
|
||||
blockdata = generateFenceBlockData(mapiter);
|
||||
blockrenderdata = generateFenceBlockData(mapiter);
|
||||
break;
|
||||
case CHEST_BLKTYPEID: /* Special case for chest - need to fake data so we can render */
|
||||
blockdata = generateChestBlockData(mapiter);
|
||||
blockrenderdata = generateChestBlockData(mapiter);
|
||||
break;
|
||||
case REDSTONE_BLKTYPEID: /* Special case for redstone - fake data for wire pattern */
|
||||
blockdata = generateRedstoneWireBlockData(mapiter);
|
||||
blockrenderdata = generateRedstoneWireBlockData(mapiter);
|
||||
break;
|
||||
case IRONFENCE_BLKTYPEID: /* Special case for iron fence - fake data for adjacent block info */
|
||||
case GLASSPANE_BLKTYPEID: /* Special case for glass pane - fake data for adjacent block info */
|
||||
blockrenderdata = generateIronFenceGlassBlockData(mapiter, blocktypeid);
|
||||
break;
|
||||
default:
|
||||
blockdata = mapiter.getBlockData();
|
||||
break;
|
||||
blockrenderdata = -1;
|
||||
break;
|
||||
}
|
||||
/* Look up to see if block is modelled */
|
||||
short[] model = scalemodels.getScaledModel(blocktypeid, blockdata);
|
||||
short[] model = scalemodels.getScaledModel(blocktypeid, blockdata, blockrenderdata);
|
||||
if(model != null) {
|
||||
return handleSubModel(model, shaderstate, shaderdone);
|
||||
}
|
||||
@@ -733,27 +799,27 @@ public class IsoHDPerspective implements HDPerspective {
|
||||
Vector3D blocks[] = new Vector3D[] { new Vector3D(), new Vector3D() };
|
||||
/* Get ordered point - 0=minX,Y,Z, 1=maxX,Y,Z */
|
||||
if(loc0.getBlockX() < loc1.getBlockX()) {
|
||||
blocks[0].x = loc0.getBlockX();
|
||||
blocks[0].x = loc0.getBlockX() - 1;
|
||||
blocks[1].x = loc1.getBlockX() + 1;
|
||||
}
|
||||
else {
|
||||
blocks[0].x = loc1.getBlockX();
|
||||
blocks[0].x = loc1.getBlockX() - 1;
|
||||
blocks[1].x = loc0.getBlockX() + 1;
|
||||
}
|
||||
if(loc0.getBlockY() < loc1.getBlockY()) {
|
||||
blocks[0].y = loc0.getBlockY();
|
||||
blocks[0].y = loc0.getBlockY() - 1;
|
||||
blocks[1].y = loc1.getBlockY() + 1;
|
||||
}
|
||||
else {
|
||||
blocks[0].y = loc1.getBlockY();
|
||||
blocks[0].y = loc1.getBlockY() - 1;
|
||||
blocks[1].y = loc0.getBlockY() + 1;
|
||||
}
|
||||
if(loc0.getBlockZ() < loc1.getBlockZ()) {
|
||||
blocks[0].z = loc0.getBlockZ();
|
||||
blocks[0].z = loc0.getBlockZ() - 1;
|
||||
blocks[1].z = loc1.getBlockZ() + 1;
|
||||
}
|
||||
else {
|
||||
blocks[0].z = loc1.getBlockZ();
|
||||
blocks[0].z = loc1.getBlockZ() - 1;
|
||||
blocks[1].z = loc0.getBlockZ() + 1;
|
||||
}
|
||||
Vector3D corner = new Vector3D();
|
||||
@@ -965,6 +1031,9 @@ public class IsoHDPerspective implements HDPerspective {
|
||||
DynmapBufferedImage dayim[] = new DynmapBufferedImage[numshaders];
|
||||
int[][] argb_buf = new int[numshaders][];
|
||||
int[][] day_argb_buf = new int[numshaders][];
|
||||
boolean isjpg[] = new boolean[numshaders];
|
||||
int bgday[] = new int[numshaders];
|
||||
int bgnight[] = new int[numshaders];
|
||||
|
||||
for(int i = 0; i < numshaders; i++) {
|
||||
HDShader shader = shaderstate[i].getShader();
|
||||
@@ -979,6 +1048,9 @@ public class IsoHDPerspective implements HDPerspective {
|
||||
dayim[i] = DynmapBufferedImage.allocateBufferedImage(tileWidth, tileHeight);
|
||||
day_argb_buf[i] = dayim[i].argb_buf;
|
||||
}
|
||||
isjpg[i] = shaderstate[i].getMap().getImageFormat() != ImageFormat.FORMAT_PNG;
|
||||
bgday[i] = shaderstate[i].getMap().getBackgroundARGBDay();
|
||||
bgnight[i] = shaderstate[i].getMap().getBackgroundARGBNight();
|
||||
}
|
||||
|
||||
/* Create perspective state object */
|
||||
@@ -990,6 +1062,7 @@ public class IsoHDPerspective implements HDPerspective {
|
||||
double ybase = tile.ty * tileHeight;
|
||||
boolean shaderdone[] = new boolean[numshaders];
|
||||
boolean rendered[] = new boolean[numshaders];
|
||||
|
||||
for(int x = 0; x < tileWidth; x++) {
|
||||
ps.px = x;
|
||||
for(int y = 0; y < tileHeight; y++) {
|
||||
@@ -1012,10 +1085,20 @@ public class IsoHDPerspective implements HDPerspective {
|
||||
rendered[i] = true;
|
||||
}
|
||||
shaderstate[i].getRayColor(rslt, 0);
|
||||
argb_buf[i][(tileHeight-y-1)*tileWidth + x] = rslt.getARGB();
|
||||
if(isjpg[i] && rslt.isTransparent()) {
|
||||
argb_buf[i][(tileHeight-y-1)*tileWidth + x] = bgnight[i];
|
||||
}
|
||||
else {
|
||||
argb_buf[i][(tileHeight-y-1)*tileWidth + x] = rslt.getARGB();
|
||||
}
|
||||
if(day_argb_buf[i] != null) {
|
||||
shaderstate[i].getRayColor(rslt, 1);
|
||||
day_argb_buf[i][(tileHeight-y-1)*tileWidth + x] = rslt.getARGB();
|
||||
if(isjpg[i] && rslt.isTransparent()) {
|
||||
day_argb_buf[i][(tileHeight-y-1)*tileWidth + x] = bgday[i];
|
||||
}
|
||||
else {
|
||||
day_argb_buf[i][(tileHeight-y-1)*tileWidth + x] = rslt.getARGB();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,6 +74,7 @@ public class TexturePack {
|
||||
private static final int BLOCKINDEX_BLANK = -1;
|
||||
private static final int BLOCKINDEX_GRASSMASK = 38;
|
||||
private static final int BLOCKINDEX_PISTONSIDE = 108;
|
||||
private static final int BLOCKINDEX_GLASSPANETOP = 148;
|
||||
private static final int BLOCKINDEX_REDSTONE_NSEW_TONE = 164;
|
||||
private static final int BLOCKINDEX_REDSTONE_EW_TONE = 165;
|
||||
private static final int BLOCKINDEX_REDSTONE_NSEW = 180;
|
||||
@@ -84,7 +85,8 @@ public class TexturePack {
|
||||
private static final int BLOCKINDEX_MOVINGLAVA = 260;
|
||||
private static final int BLOCKINDEX_PISTONEXTSIDE = 261;
|
||||
private static final int BLOCKINDEX_PISTONSIDE_EXT = 262;
|
||||
private static final int MAX_BLOCKINDEX = 262;
|
||||
private static final int BLOCKINDEX_PANETOP_X = 263;
|
||||
private static final int MAX_BLOCKINDEX = 263;
|
||||
private static final int BLOCKTABLELEN = MAX_BLOCKINDEX+1;
|
||||
|
||||
private static class LoadedImage {
|
||||
@@ -120,12 +122,15 @@ public class TexturePack {
|
||||
private List<Integer> blockids;
|
||||
private int databits;
|
||||
private BlockTransparency bt;
|
||||
private boolean userender;
|
||||
private static HDTextureMap[] texmaps;
|
||||
private static BlockTransparency transp[];
|
||||
private static boolean userenderdata[];
|
||||
|
||||
private static void initializeTable() {
|
||||
texmaps = new HDTextureMap[16*BLOCKTABLELEN];
|
||||
transp = new BlockTransparency[BLOCKTABLELEN];
|
||||
userenderdata = new boolean[BLOCKTABLELEN];
|
||||
HDTextureMap blank = new HDTextureMap();
|
||||
for(int i = 0; i < texmaps.length; i++)
|
||||
texmaps[i] = blank;
|
||||
@@ -136,6 +141,7 @@ public class TexturePack {
|
||||
private HDTextureMap() {
|
||||
blockids = Collections.singletonList(Integer.valueOf(0));
|
||||
databits = 0xFFFF;
|
||||
userender = false;
|
||||
faces = new int[] { BLOCKINDEX_BLANK, BLOCKINDEX_BLANK, BLOCKINDEX_BLANK, BLOCKINDEX_BLANK, BLOCKINDEX_BLANK, BLOCKINDEX_BLANK };
|
||||
|
||||
for(int i = 0; i < texmaps.length; i++) {
|
||||
@@ -143,11 +149,12 @@ public class TexturePack {
|
||||
}
|
||||
}
|
||||
|
||||
public HDTextureMap(List<Integer> blockids, int databits, int[] faces, BlockTransparency trans) {
|
||||
public HDTextureMap(List<Integer> blockids, int databits, int[] faces, BlockTransparency trans, boolean userender) {
|
||||
this.faces = faces;
|
||||
this.blockids = blockids;
|
||||
this.databits = databits;
|
||||
this.bt = trans;
|
||||
this.userender = userender;
|
||||
}
|
||||
|
||||
public void addToTable() {
|
||||
@@ -159,11 +166,15 @@ public class TexturePack {
|
||||
}
|
||||
}
|
||||
transp[blkid] = bt; /* Transparency is only blocktype based right now */
|
||||
userenderdata[blkid] = userender; /* Ditto for using render data */
|
||||
}
|
||||
}
|
||||
|
||||
public static HDTextureMap getMap(int blkid, int blkdata) {
|
||||
return texmaps[(blkid<<4) + blkdata];
|
||||
public static HDTextureMap getMap(int blkid, int blkdata, int blkrenderdata) {
|
||||
if(userenderdata[blkid])
|
||||
return texmaps[(blkid<<4) + blkrenderdata];
|
||||
else
|
||||
return texmaps[(blkid<<4) + blkdata];
|
||||
}
|
||||
|
||||
public static BlockTransparency getTransparency(int blkid) {
|
||||
@@ -424,6 +435,15 @@ public class TexturePack {
|
||||
terrain_argb[BLOCKINDEX_PISTONSIDE][native_scale*i + j];
|
||||
}
|
||||
}
|
||||
/* Build glass pane top in NSEW config (we use model to clip it) */
|
||||
terrain_argb[BLOCKINDEX_PANETOP_X] = new int[native_scale*native_scale];
|
||||
System.arraycopy(terrain_argb[BLOCKINDEX_GLASSPANETOP], 0, terrain_argb[BLOCKINDEX_PANETOP_X], 0, native_scale*native_scale);
|
||||
for(i = native_scale*7/16; i < native_scale*9/16; i++) {
|
||||
for(j = 0; j < native_scale; j++) {
|
||||
terrain_argb[BLOCKINDEX_PANETOP_X][native_scale*i + j] = terrain_argb[BLOCKINDEX_PANETOP_X][native_scale*j + i];
|
||||
}
|
||||
}
|
||||
|
||||
img.flush();
|
||||
}
|
||||
|
||||
@@ -704,6 +724,7 @@ public class TexturePack {
|
||||
line = line.substring(6);
|
||||
BlockTransparency trans = BlockTransparency.OPAQUE;
|
||||
String[] args = line.split(",");
|
||||
boolean userenderdata = false;
|
||||
for(String a : args) {
|
||||
String[] av = a.split("=");
|
||||
if(av.length < 2) continue;
|
||||
@@ -759,12 +780,15 @@ public class TexturePack {
|
||||
Log.severe("Texture mapping has invalid transparency setting - " + av[1] + " - line " + rdr.getLineNumber() + " of " + txtname);
|
||||
}
|
||||
}
|
||||
else if(av[0].equals("userenderdata")) {
|
||||
userenderdata = av[1].equals("true");
|
||||
}
|
||||
}
|
||||
/* If no data bits, assume all */
|
||||
if(databits < 0) databits = 0xFFFF;
|
||||
/* If we have everything, build block */
|
||||
if(blkids.size() > 0) {
|
||||
HDTextureMap map = new HDTextureMap(blkids, databits, faces, trans);
|
||||
HDTextureMap map = new HDTextureMap(blkids, databits, faces, trans, userenderdata);
|
||||
map.addToTable();
|
||||
cnt++;
|
||||
}
|
||||
@@ -795,7 +819,7 @@ public class TexturePack {
|
||||
*/
|
||||
public final void readColor(final HDPerspectiveState ps, final MapIterator mapiter, final Color rslt, final int blkid, final int lastblocktype, final boolean biome_shaded) {
|
||||
int blkdata = ps.getBlockData();
|
||||
HDTextureMap map = HDTextureMap.getMap(blkid, blkdata);
|
||||
HDTextureMap map = HDTextureMap.getMap(blkid, blkdata, ps.getBlockRenderData());
|
||||
BlockStep laststep = ps.getLastBlockStep();
|
||||
int textid = map.faces[laststep.ordinal()]; /* Get index of texture source */
|
||||
if(textid < 0) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user