Compare commits

..

359 Commits

Author SHA1 Message Date
Mike Primm f62d46cfbd Add hidebydefault setting to playermarkers component too 2011-08-26 14:23:32 +08:00
Mike Primm bc357dd188 Handle multiple instances of same component type (regions) 2011-08-26 13:57:05 +08:00
Mike Primm c353d9aae6 Add hidebydefault option for regions layers 2011-08-26 13:57:05 +08:00
Mike Primm 106e470898 Add playermarkers to hide/show-able layer group 2011-08-26 06:34:37 +08:00
Mike Primm 59b095628d Add control for hide/show of component layers (only regions for now) 2011-08-26 06:34:37 +08:00
Mike Primm d9ad51edd6 Use towns list in Towny worlds/* files to get valid towns (old towns
still in towns/* directory)
2011-08-26 03:59:35 +08:00
Mike Primm 316440a4e0 Disable IOImage cache use for image loads 2011-08-26 03:59:35 +08:00
Mike Primm 04cc6aba43 Towny fixes - multiple areas on multiple worlds per town 2011-08-25 11:15:26 +08:00
Mike Primm ff4b036c6a Fix accessory face mixing 2011-08-24 14:25:42 +08:00
Mike Primm 76c8bc861d Merge remote branch 'upstream/master' 2011-08-24 01:02:47 -05:00
Mike Primm da32c2f0bd Add server-side generation of faces : fixes face accessory issues, IE8 2011-08-24 00:51:54 -05:00
Mike Primm 9564bd8a89 Add customstyle settings for per-region style, nation style for Towny, lots for Residence 2011-08-23 11:17:40 +08:00
Mike Primm 074952265f Add customstyle settings for per-region style, nation style for Towny, lots for Residence 2011-08-22 22:16:38 -05:00
Mike Primm 669d52f01b Merge remote branch 'upstream/master' 2011-08-22 20:34:34 -05:00
Mike Primm c37680b62c Add support for superperms/PermissionsBukkit/whatever-you-wanna-call-it 2011-08-23 08:21:38 +08:00
Mike Primm fae27f4cea Add support for superperms/PermissionsBukkit/whatever-you-wanna-call-it 2011-08-22 19:21:03 -05:00
Mike Primm 3b7fcc67ad Fix regionstyle attributes for region outlines and fill 2011-08-22 23:32:19 +08:00
Mike Primm 75d7068fbf Fix regionstyle attributes for region outlines and fill 2011-08-22 10:31:27 -05:00
Mike Primm 0ebabf5b61 First pass of Towny region support 2011-08-22 14:19:54 +08:00
Mike Primm d349a76660 First pass of Towny region support 2011-08-22 01:17:28 -05:00
Mike Primm 7e12574bd8 Add support in regions component for 'hiddenregions' (blacklist for regions) 2011-08-22 08:19:38 +08:00
Mike Primm 1284a8a6ed Merge remote branch 'upstream/master' 2011-08-21 19:00:14 -05:00
Mike Primm 8e22e40c16 Add support in regions component for 'hiddenregions' (blacklist for regions) 2011-08-21 18:58:38 -05:00
Mike Primm 929ca8911e Fix naming on Residence regions, make infowindow setting control popup content again 2011-08-22 04:58:21 +08:00
Mike Primm 82b0f2c4cd Fix naming on Residence regions, make infowindow setting control popup content again 2011-08-21 15:57:21 -05:00
Mike Primm 6e5482466d Switch chunkgenerate to onChunkPopulate event: chunk is better "cooked" by then 2011-08-21 10:33:09 +08:00
Mike Primm 45369006c3 Switch chunkgenerate to onChunkPopulate event: chunk is better "cooked" by then 2011-08-20 21:31:14 -05:00
Mike Primm 58d359fc1d Add setting for progressloginterval 2011-08-21 05:46:05 +08:00
Mike Primm c5c136a30d Add setting for progressloginterval 2011-08-20 16:45:21 -05:00
Mike Primm c327b98b97 Add progressloginterval setting - control how often progress messages done 2011-08-21 05:43:43 +08:00
Mike Primm 3f3ccf5344 Add progressloginterval setting - control how often progress messages done 2011-08-20 16:43:18 -05:00
Mike Primm 9b191bb3ab Add 'explosion' update trigger, add updated tile queue accelerator (to speed up processing if queue gets above a given threshold) 2011-08-21 05:31:07 +08:00
Mike Primm 43df59a88c Make sure we can clean up event listeners during reload (make /dynmap reload work) 2011-08-21 05:30:52 +08:00
Mike Primm 972d9b2ab7 Add 'explosion' update trigger, add updated tile queue accelerator (to speed up processing if queue gets above a given threshold) 2011-08-20 16:28:37 -05:00
Mike Primm 5ed6cf830b Make sure we can clean up event listeners during reload (make /dynmap reload work) 2011-08-20 15:21:39 -05:00
Mike Primm e8e4aa67ce Fix boundary condition that was causing some missed tiles on chunk triggers 2011-08-20 11:38:55 +08:00
Mike Primm e643292a7e Fix boundary condition that was causing some missed tiles on chunk triggers 2011-08-19 22:38:08 -05:00
Mike Primm f0a8300632 Merge remote branch 'upstream/master' 2011-08-19 21:36:35 -05:00
Mike Primm f24141587f Fix Residence region output in JSON mode 2011-08-20 00:29:55 +08:00
Mike Primm e2616c9159 Fix Residence region output in JSON mode 2011-08-19 11:27:38 -05:00
Mike Primm 83a9ff80d0 Add 'parallelrendercnt' - multi-core fullrender support (experimental) 2011-08-18 12:14:56 +08:00
Mike Primm fd2085b511 Add 'parallelrendercnt' - multi-core fullrender support (experimental) 2011-08-17 23:14:05 -05:00
Mike Primm ae9d1fde90 Turn off using temp file in ImageIO - our images are too small to do that 2011-08-17 10:26:07 +08:00
Mike Primm 7fd2d5bf10 Turn off using temp file in ImageIO - our images are too small to do that 2011-08-16 21:25:16 -05:00
Mike Primm e479d04c85 Merge remote branch 'origin/master' 2011-08-16 18:19:43 -05:00
Mike Primm 55dc6397e1 Fix logic on scroll buttons 2011-08-17 01:00:32 +08:00
Mike Primm d5d01cf5af Fix logic on scroll buttons 2011-08-16 11:59:08 -05:00
Mike Primm 98b3bdfde3 Add triggered update queue length to /dynmap stats 2011-08-16 13:48:00 +08:00
Mike Primm 4be423cfb8 Add triggered update queue length to /dynmap stats 2011-08-16 00:46:41 -05:00
Mike Primm 477a7d13de Add multiple quality levels for JPG encoding - adjust default to 0.85 2011-08-16 12:32:01 +08:00
Mike Primm 4616f6a5be Fix window resize exception - Leaflet expects 'map' at top level... 2011-08-16 08:08:59 +08:00
Mike Primm 829e1339a8 Change console fullrender to seed from world's center setting, vs 0,0,0 2011-08-15 21:10:44 +08:00
Mike Primm c9494a312d Fix exception if initial update has stale logoff for player+chat 2011-08-15 21:10:44 +08:00
Mike Primm 5b7ad0f4c9 Fix IE exceptions from debug code, canvas calls 2011-08-15 10:10:08 +08:00
Mike Primm 55720cfd4d Avoid exception try-catch on nominal path 2011-08-15 07:25:18 +08:00
Mike Primm 4cb5b9a956 Fix initial zoomout processing (unnecessary updates), extra tile invalidates 2011-08-15 07:25:17 +08:00
Mike Primm 6860d8952f More invalidate tightening up 2011-08-15 04:49:58 +08:00
Mike Primm 1aa3d07e6a Fix break in namedTile during integrate of updated Leaflet 2011-08-15 04:49:42 +08:00
Mike Primm 0c9cfedb6e Handle tile invalidates better for bigger-than-one-block cases (chunks) 2011-08-15 04:49:42 +08:00
Mike Primm 042544f22e Reapply updated Leaflet patch 2011-08-14 14:59:53 +08:00
Mike Primm f5d5171f86 Improve scaling of memory use with large numbers of tiles, prep for suspend/resume support 2011-08-14 14:27:20 +08:00
Mike Primm fb366ce36b Update rail and ladder models - work better with non-default textures 2011-08-14 13:13:24 +08:00
Mike Primm 9f4df9a76e Switch to using continuousWorld option in newer Leaflet - saves on override 2011-08-14 13:12:58 +08:00
Mike Primm 0bc760230f Update Leaflet (lots of fixes) 2011-08-14 13:12:58 +08:00
Mike Primm c524c39901 Add pistonmoved event handling, full rendering for piston and extension 2011-08-14 10:36:47 +08:00
Mike Primm 3da03c978b Add model for redstone repeater 2011-08-13 12:32:09 +08:00
Mike Primm 4316e1f3e4 Add support for single map render via /dynmap fullrender world:map, /dynmap radiusrender radius mapname 2011-08-13 11:48:26 +08:00
Mike Primm b800984e3f Fix alpha-blending on scaled textures, and mask textures 2011-08-13 11:03:16 +08:00
Mike Primm 17c2072b82 Fix armor calculation - bring in line with funky method used in MC UI 2011-08-13 05:36:48 +08:00
Mike Primm d008548306 Add support for JPEG encoding option for HDMaps 2011-08-12 14:48:52 +08:00
mikeprimm 49b38c10b7 Merge pull request #401 from mikeprimm/master
Fix typo in 'sendposition' setting - allow both 'sendposition' and 'sendpositon' in case someone worked around it
2011-08-10 20:38:52 -07:00
Mike Primm 053bd0e561 Fix typo in 'sendposition' setting - allow both 'sendposition' and 'sendpositon' in case someone worked around it 2011-08-10 22:37:41 -05:00
mikeprimm 4d3931709b Merge pull request #400 from mikeprimm/master
Add support for selectively hiding portions of worlds (opposite of visibilitylimits)
2011-08-10 20:18:20 -07:00
Mike Primm 166a5272fb Add support for selectively hiding portions of world (hiddenlimits) 2011-08-10 22:15:18 -05:00
mikeprimm 7e8e0411d9 Merge pull request #399 from mikeprimm/master
Add poly2d region support back to WorldGuard support
2011-08-10 18:48:36 -07:00
Mike Primm 6616b3eae5 Add poly2d region support back to WorldGuard 2011-08-10 20:47:14 -05:00
mikeprimm 0c99a6e7f4 Merge pull request #398 from mikeprimm/master
IE8 doesn't have indexOf, if you can believe that....
2011-08-10 16:10:35 -07:00
Mike Primm a5e3f36d97 Fix IE8 - missing indexOf(), if you can believe that.... fix is per
https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/IndexOf
2011-08-10 18:07:59 -05:00
FrozenCow f5f9c3bb31 Use shift, not pop, for queue. 2011-08-10 23:32:33 +02:00
FrozenCow 91b9b456b5 Added tile queueing. 2011-08-10 22:39:57 +02:00
mikeprimm 0a60c35be0 Merge pull request #395 from mikeprimm/master
Handle texture packs that do not include all required files
2011-08-10 12:58:30 -07:00
Mike Primm 641406a68e Merge remote branch 'upstream/master' 2011-08-10 14:55:07 -05:00
Mike Primm 334f3d983a Add handling for texture packs that don't provide all needed files -
fall through to standard pack when needed
2011-08-10 14:54:25 -05:00
FrozenCow 04c3a432e1 Added extra configuration for maven-assembly to fix directory-permissions. 2011-08-10 15:54:19 +02:00
FrozenCow fdbce8df36 Only handle cuboid regions. 2011-08-10 15:14:48 +02:00
mikeprimm 81d68d5ac9 Merge pull request #391 from mikeprimm/master
Add permissions info to plugin.yml
2011-08-09 22:55:24 -07:00
Mike Primm 6383a7ef22 Add permissions info to plugin.yml 2011-08-10 00:52:55 -05:00
mikeprimm 1fcef60768 Merge pull request #390 from mikeprimm/master
Model for cactus - fix seams on edges, since cactus aren't quite full block
2011-08-09 18:46:19 -07:00
Mike Primm 3a38b44e79 Make model for cactus - they aren't quite full block 2011-08-09 20:45:08 -05:00
mikeprimm 82b7a87a7c Merge pull request #389 from mikeprimm/master
Check for raw biome lookup overflows - prevent array exceptions on some worlds
2011-08-08 22:20:06 -07:00
Mike Primm 48ba43aae5 Check for overflow on biome lookup - prevent exceptions on some worlds 2011-08-09 00:18:38 -05:00
Mike Primm 89525c38d5 Merge remote branch 'origin/master' 2011-08-08 23:41:15 -05:00
mikeprimm d468abe5a1 Merge pull request #387 from mikeprimm/master
Add id=3 leaves: apparently, alpha-map leaves migrated to this value
2011-08-08 07:21:27 -07:00
Mike Primm 9c44843884 Add leaves id=3: apparently alpha-map leaves migrated to this? 2011-08-08 09:20:10 -05:00
mikeprimm 2b26bdd5a4 Merge pull request #384 from mikeprimm/master
Add leafid + 12 values - not sure if needed, but no harm in it (for 0.20.1)
2011-08-07 21:01:13 -07:00
Mike Primm a76a734e16 Add mappings for leaves for +12 - not sure if needed, but can't hurt 2011-08-07 22:58:51 -05:00
mikeprimm 4fd3382493 Merge pull request #383 from mikeprimm/master
Fix subblock rendering of scaled down models (esp flat ones like rails, redstone) (for 0.20.1)
2011-08-07 20:12:43 -07:00
Mike Primm 4209a2c54d Fix subblock rendering of flat, scaled-down models (for 0.20.1) 2011-08-07 22:11:00 -05:00
mikeprimm 154057adcc Merge pull request #381 from mikeprimm/master
Handle leaf fade processing flag values in texture mapping
2011-08-07 08:35:17 -07:00
Mike Primm a641d2d831 Handle fade-processing bit values on leaves (N, N+4, N+8) 2011-08-07 10:29:54 -05:00
FrozenCow cd7e04fec3 Added another data-value (8) for leaves that occurs in parts of the trees in Skylands. 2011-08-07 16:55:22 +02:00
FrozenCow 4381d5838c Changed version to 0.21. 2011-08-06 20:04:53 +02:00
mikeprimm 1cb79e41cb Merge pull request #375 from mikeprimm/master
Add maximumheight and minimumheight attributes for IsoHDPerspective
2011-08-03 22:27:50 -07:00
Mike Primm d95189a7c1 Add maximumheight and minimumheight options to IsoHDPerspective 2011-08-04 00:26:08 -05:00
mikeprimm 42c95012ef Merge pull request #374 from mikeprimm/master
Fix detection of new blockspread, blockform, blockfaded triggers
2011-08-03 21:43:45 -07:00
Mike Primm 571c66a189 Fix detection of blockformed, blockfaded, blockspread 2011-08-03 23:40:25 -05:00
mikeprimm 2f7e7ad87b Merge pull request #373 from mikeprimm/master
Fix armor calculation - round vs truncate
2011-08-03 20:46:09 -07:00
Mike Primm ba9e27f451 Fix armor calculation - round vs truncate 2011-08-03 22:45:18 -05:00
mikeprimm 8d5233befd Merge pull request #372 from mikeprimm/master
Remove default Leaflet attribution
2011-08-03 19:34:52 -07:00
Mike Primm c865ecb673 Remove default leaflet attribute 2011-08-03 21:33:53 -05:00
mikeprimm bb2f21b44c Merge pull request #371 from mikeprimm/master
Handle Leaflet freak-out on removed layers during tile load, clean up panning
2011-08-03 19:20:34 -07:00
Mike Primm 132bfc539b Handle Leaflet freak-out on removed layers during tile load, clean up panning 2011-08-03 21:14:15 -05:00
mikeprimm 852df86ad1 Merge pull request #370 from mikeprimm/master
Make Kzed setting for mapzoomout match existing behavior (2 levels below native, not 3)
2011-08-03 13:10:50 -07:00
Mike Primm 612cdf0c98 Make mapzoomin for Kzed consistent with previous versions (2 below
native)
2011-08-03 15:09:28 -05:00
mikeprimm d6388aab31 Merge pull request #368 from mikeprimm/master
Go back to pixel by pixel blit - makes webkit browsers less fuzzy
2011-08-03 11:19:53 -07:00
Mike Primm bffc56dd20 Fix blit back to original - stop fuzzy webkit browsers 2011-08-03 13:18:53 -05:00
mikeprimm bb279d7e2f Merge pull request #367 from mikeprimm/master
Fix map center consistency between map changes, add fromLatLngToLocation to Projection
2011-08-03 08:26:57 -07:00
Mike Primm 64bd846115 Fix map center consistency on map changes 2011-08-03 10:21:29 -05:00
mikeprimm db0fadc5de Merge pull request #366 from mikeprimm/master
Fix defaultzoom: 0 not working
2011-08-03 06:14:53 -07:00
Mike Primm 1d0b28c069 Fix defaultzoom: 0 not working 2011-08-03 08:13:59 -05:00
mikeprimm e6e07bf421 Merge pull request #365 from mikeprimm/master
Don't include face accessory overlay on faces for now - causes 'white face'
2011-08-02 22:49:12 -07:00
Mike Primm 091752aaae Drop accessory face overlay - hardly seems used and causes white faces 2011-08-03 00:40:53 -05:00
mikeprimm 6d75c9ea44 Merge pull request #364 from mikeprimm/master
Fix zoom range and marker position calculation on Kzed and Flat
2011-08-02 19:54:06 -07:00
Mike Primm ee790f86ed Fix marker position logic and zoom range calculation on Kzed and Flat 2011-08-02 21:51:00 -05:00
mikeprimm 4bf9f9a978 Merge pull request #363 from mikeprimm/master
And another KzedMap Zoom fix - for non-bigworld this time
2011-08-02 14:11:12 -07:00
Mike Primm 257b1c37f1 Fix zoom on KzedMap when bigworld=false 2011-08-02 16:10:04 -05:00
mikeprimm 8cef3fb478 Merge pull request #361 from mikeprimm/master
Fix flat and kzed 'bigworld' support
2011-08-02 08:48:45 -07:00
Mike Primm 40e2b1eb4d Fix bigworld on kzed and flat 2011-08-02 10:48:04 -05:00
mikeprimm 49978e3ac5 Merge pull request #358 from mikeprimm/master
Fix background color support, fix junk on map switches
2011-08-01 22:08:23 -07:00
Mike Primm e08a2d4407 Fix background color support, provide blank tile to fix refresh junk 2011-08-02 00:07:17 -05:00
mikeprimm b0a7a6b748 Merge pull request #357 from mikeprimm/master
Update leaflet, lots of little fixes to make IE sane
2011-08-01 21:25:26 -07:00
Mike Primm 0bbcf6510e Make IE sane 2011-08-01 23:21:36 -05:00
Mike Primm 37c9d4b9cd Update leaflet 2011-08-01 21:03:43 -05:00
mikeprimm 9cc51e4cc0 Merge pull request #356 from mikeprimm/master
Band-aid for playermarkers on IE8 - avoid lack of canvas support
2011-08-01 16:32:17 -07:00
Mike Primm 17af53ee1f Band-aid playermarkers on IE8 2011-08-01 18:31:04 -05:00
mikeprimm f592f5a3bf Merge pull request #355 from mikeprimm/master
Force 'z-order' in 'map' style to zero to make sure components don't wind up behind it
2011-08-01 07:13:05 -07:00
Mike Primm 2fa68b2992 Force z-order for map to prevent components winding up behind it 2011-08-01 09:11:58 -05:00
mikeprimm fdbd4ab2d1 Merge pull request #354 from mikeprimm/master
Fix zoomout processing problem on kzedmaps due to inconsistent use of name vs prefix
2011-07-31 20:46:47 -07:00
Mike Primm d845ed207d Get name and prefix use consistent 2011-07-31 22:40:18 -05:00
Mike Primm 4d285b475a Fix zoom out processing for kzed maps - used name not prefix 2011-07-31 22:30:02 -05:00
FrozenCow 05f09f7bb4 Fixed image of popup close button. 2011-07-31 22:24:28 +02:00
mikeprimm fea152a914 Merge pull request #353 from mikeprimm/master
Clean up player icon transitions to/from visible map
2011-07-31 10:44:24 -07:00
Mike Primm 95c9520cc9 Clean up player marker transitions to/from visible map 2011-07-31 12:41:01 -05:00
mikeprimm e792bcc7a1 Merge pull request #351 from mikeprimm/master
Avoid trap in regions when 'basenode' in region file cannot be found or is bad
2011-07-31 09:16:47 -07:00
Mike Primm 58df3a8441 Fix trap when bad basenode in region component 2011-07-31 11:14:36 -05:00
mikeprimm 98dee3b404 Merge pull request #350 from mikeprimm/master
Fix biome shading on normal worlds
2011-07-31 08:40:23 -07:00
Mike Primm 2ee49fd82e Merge remote branch 'origin/master' 2011-07-31 10:37:09 -05:00
Mike Primm c2fe0f772c Fix bug with not doing biome shading on normal worlds 2011-07-31 10:36:43 -05:00
mikeprimm 65f20df60c Merge pull request #349 from mikeprimm/master
Make JSON unicode encoding more thorough - don't assume anything outside ASCII should not be escaped
2011-07-30 00:16:24 -07:00
Mike Primm b4ce28fd9a Make JSON unicode encoding more thorough - don't assume anything outside ASCII should not be escaped 2011-07-30 02:13:45 -05:00
mikeprimm 5a39ba5d5a Merge pull request #348 from mikeprimm/master
Improve rendering of textures for redstone wire
2011-07-29 23:41:38 -07:00
Mike Primm 6c42b399f4 Improve texture rendering for redstone wire 2011-07-30 01:22:05 -05:00
mikeprimm f9958fbff8 Merge pull request #346 from mikeprimm/master
Fix autopan on chatballoons - always was on
2011-07-29 12:30:49 -07:00
Mike Primm 29e42137c9 Fix autopan on chatbaloons - can be off now :) 2011-07-29 14:28:29 -05:00
mikeprimm 181e3dccbd Merge pull request #345 from mikeprimm/master
Fix nesting on residence subzones
2011-07-29 08:32:09 -07:00
Mike Primm 95128df6b9 Fix nesting - iterating over areas versus residences 2011-07-29 10:30:59 -05:00
FrozenCow 5bf8010bbb Fixed styling and owner/member texts of regions. 2011-07-29 17:16:27 +02:00
mikeprimm 6259da4e0f Merge pull request #344 from mikeprimm/master
Add subzones for Residence regions support
2011-07-29 07:52:14 -07:00
Mike Primm 47194defca Add support for Subzones (1 tier) 2011-07-29 09:50:50 -05:00
mikeprimm f8f1e77153 Merge pull request #342 from mikeprimm/master
Fix zoom range to match selected map
2011-07-28 21:53:13 -07:00
Mike Primm 4824388c6b Update zoom range to match selected map 2011-07-28 23:51:53 -05:00
mikeprimm ee0ad7c3d5 Merge pull request #341 from mikeprimm/master
Fix skylands premature-end-of-render issue
2011-07-28 08:15:30 -07:00
Mike Primm 4622b42aed Fix map edge detection to only use lack-of-chunks: fix skylands
premature end-of-render issue
2011-07-28 10:11:34 -05:00
mikeprimm bec6b0aec5 Merge pull request #340 from mikeprimm/master
Retire 'snowform' trigger, add 'blockformed', 'blockfaded', 'blockspread' triggers
2011-07-28 08:04:03 -07:00
Mike Primm 8957ab7c31 Fix message - blockform -> blockformed 2011-07-28 10:01:54 -05:00
Mike Primm b1272d18f8 Retired 'snowformed' event, added 'blockformed', 'blockfaded', 'blockspread' 2011-07-28 08:08:08 -05:00
mikeprimm 832a79eb1f Merge pull request #337 from mikeprimm/master
Fix compass rose on new UI
2011-07-27 22:44:22 -07:00
Mike Primm 6d66d45d43 Fix compass with new UI 2011-07-28 00:43:13 -05:00
mikeprimm 1a24217a98 Merge pull request #336 from mikeprimm/master
Fix Residence support with new web UI
2011-07-27 20:44:02 -07:00
Mike Primm d483eb1e6f Fix Residence support in updated UI 2011-07-27 22:42:55 -05:00
mikeprimm f13b0b6c46 Merge pull request #335 from mikeprimm/master
Fix various new map issues
2011-07-27 19:30:11 -07:00
Mike Primm 08192df906 Various map update fixes (keeping zoom, center on map change, repaint) 2011-07-27 21:27:35 -05:00
FrozenCow 5aa961388d Removed unnecessary !important from css. 2011-07-27 19:49:43 +02:00
FrozenCow bea269e8df Fixed zoomin/out icons again. 2011-07-27 19:34:42 +02:00
FrozenCow 0abc944c6e Added logo-component. 2011-07-27 18:51:26 +02:00
FrozenCow e90087390a Fixed flatmap. 2011-07-27 17:07:28 +02:00
FrozenCow ce00242253 Made use of mapzoomout+mapzoomin on all maptypes + simplified the client code of the individual maps. 2011-07-27 16:49:49 +02:00
FrozenCow 4f75bf691a Fixed nightday and making use of options.mapzoomin and options.mapzoomout. 2011-07-27 16:49:49 +02:00
FrozenCow 9f19ccf50c Removed old comments. 2011-07-27 16:49:49 +02:00
FrozenCow 2242c0643b Added/upgraded jquery as a local file and moved js and css to their directories. 2011-07-27 16:49:49 +02:00
FrozenCow 31b849683a Upgraded leaflet to latest version. 2011-07-27 16:49:48 +02:00
FrozenCow 5a5fa147d3 Removed some debug messages. 2011-07-27 16:49:48 +02:00
FrozenCow b944b3b729 Fixed previous maptype/layer being visible in the background. 2011-07-27 16:49:48 +02:00
FrozenCow 90acf73976 Added regions-compatiblity with old configuration. 2011-07-27 16:49:48 +02:00
FrozenCow 51457464c2 Made zoom-in/out for changing tilesizes look better. 2011-07-27 16:49:48 +02:00
FrozenCow 369317ea45 Added styling to regions (thereby also changing the configuration a bit, editing HTML in configuration is not possible anymore) 2011-07-27 16:49:48 +02:00
FrozenCow 0fb56c95bb Reworked Residence to work with Leaflet (and new regions-structure). 2011-07-27 15:50:08 +02:00
FrozenCow fd542d2b33 Fixed chatballoons for Leaflet. 2011-07-27 15:39:22 +02:00
FrozenCow 8ba8bcfc59 Added worldguard support for Leaflet. 2011-07-27 15:39:22 +02:00
FrozenCow 48683b972a Removed comment. 2011-07-27 15:39:22 +02:00
FrozenCow eaf6ecde26 Fixed tabs. 2011-07-27 15:39:22 +02:00
FrozenCow cce30da6be Removed old commented code. 2011-07-27 15:39:22 +02:00
FrozenCow fc3c5be36c Removed debug. 2011-07-27 15:39:22 +02:00
FrozenCow 8b40a9761b Fixed hdmap tiling and LocationToLatLng 2011-07-27 15:39:22 +02:00
FrozenCow 674b92003c Added (proper) initial Leaflet support. 2011-07-27 15:39:22 +02:00
mikeprimm b9225b3ed3 Merge pull request #332 from mikeprimm/master
Add help text for new commands
2011-07-27 06:20:58 -07:00
Mike Primm d862d1aa70 Add new commands to help text 2011-07-27 08:18:12 -05:00
mikeprimm 9005b68fdb Merge pull request #331 from mikeprimm/master
Tighten up cleanup during /reload or shutdown
2011-07-27 06:07:40 -07:00
Mike Primm df9d3494c3 Tighten up shutdown of zoom file processing during reload 2011-07-27 08:04:53 -05:00
mikeprimm 8bac8b0d23 Merge pull request #329 from mikeprimm/master
Add updated regions support for current Residence (2.3.x)
2011-07-26 21:08:52 -07:00
Mike Primm c135a669a8 Add updated Residence support (2.3.z) 2011-07-26 23:07:20 -05:00
mikeprimm 1465795f97 Merge pull request #327 from mikeprimm/master
Make "server update failed" red banner happen after 3rd consecutive read fail,not first
2011-07-26 14:27:47 -07:00
Mike Primm e1160f623f Add retry count to updates request - don't show red until 3rd miss 2011-07-26 16:24:04 -05:00
mikeprimm 7e0124e849 Merge pull request #325 from mikeprimm/master
Add cancelrender command
2011-07-26 13:16:59 -07:00
Mike Primm 096d2fe72e Add cancelrender command 2011-07-26 10:29:50 -05:00
mikeprimm ef59612dad Merge pull request #324 from mikeprimm/master
Flesh out comments on selecting template sets, and which files are used for each
2011-07-25 20:05:52 -07:00
Mike Primm f9393d70ea Flesh out comments on selecting template sets, and which files are used for each 2011-07-25 22:04:53 -05:00
mikeprimm 5762340238 Merge pull request #323 from mikeprimm/master
Add support for 'defaultmap' setting in configuration.txt
2011-07-25 19:29:12 -07:00
Mike Primm beb3165bbe Make default consistent with existing behaviors 2011-07-25 21:26:01 -05:00
mikeprimm 1e9cfe3bc7 Merge pull request #322 from mikeprimm/master
Add max-sessions setting to configuration.txt - limits concurrent threads and sessions on internal web server
2011-07-25 19:22:34 -07:00
Mike Primm 5a9c28ae27 Add support for 'defaultmap' setting in configuration.txt 2011-07-25 21:16:42 -05:00
Mike Primm aa29ddf141 Add max-sessions setting to configuration.txt - limits concurrent threads and sessions on internal web server 2011-07-25 20:34:37 -05:00
mikeprimm 641ce05767 Merge pull request #320 from mikeprimm/master
Render and shader performance tuning
2011-07-25 00:41:53 -07:00
Mike Primm 42132328cd Shader fine tuning 2011-07-25 02:38:30 -05:00
Mike Primm 9e7e333cc5 Tune render performance 2011-07-25 02:16:00 -05:00
mikeprimm 23db0c62fc Merge pull request #319 from mikeprimm/master
Use memory buffer for ImageIO encoding - avoid re-encoding when lock retry needed
2011-07-24 22:14:27 -07:00
Mike Primm cf08f243d0 Modify ImageIO use to avoid re-encoding on retry, do better buffering 2011-07-25 00:12:07 -05:00
mikeprimm 31623a0676 Merge pull request #318 from mikeprimm/master
Tighten up cleanup during /reload or shutdown
2011-07-24 21:27:09 -07:00
Mike Primm 737bcb98d9 Improve handling of /reload, clean up dead code 2011-07-24 23:23:24 -05:00
mikeprimm e0ddbcd27d Merge pull request #317 from mikeprimm/master
Make HDMap fall back to default perspective, shader or lighting as needed if unable to find configured preset
2011-07-24 18:37:58 -07:00
Mike Primm 3ddce85f89 Make HDMap fall back to default perspective, shader or lighting as needed if unable to find configured preset. 2011-07-24 20:34:39 -05:00
mikeprimm 4cacc3f92c Merge pull request #316 from mikeprimm/master
Add escape sequence '&color;' support for webprefix/websuffix - avoid frequent editor code page problems
2011-07-24 18:32:45 -07:00
Mike Primm abd7c25d80 Add escape sequence '&color;' support for webprefix/websuffix - avoid frequent editor code page problems. 2011-07-24 20:31:12 -05:00
mikeprimm 39a6bee3ca Merge pull request #315 from mikeprimm/master
Add shader option to disable biome shading, disable biome shading on non-normal worlds
2011-07-24 15:17:03 -07:00
Mike Primm 78f571a68b Add shader option to disable biome shading, disable biome shading on non-normal worlds 2011-07-24 17:14:45 -05:00
mikeprimm a65fd601ac Merge pull request #313 from mikeprimm/master
Add 'dynmap radiusrender <radius>' command to allow player-initiated render in radius from position
2011-07-23 22:04:26 -07:00
Mike Primm 62b42aa302 Add 'radiusrender' command to allow limited render by player in radius 2011-07-24 00:00:32 -05:00
mikeprimm c7e176b56d Merge pull request #312 from mikeprimm/master
Fix for bedrock texture (thanks to Graloth)
2011-07-23 20:54:37 -07:00
Mike Primm a07c03081d Fix bedrock texture (thanks, Graloth!) 2011-07-23 22:53:12 -05:00
mikeprimm 60f7773e76 Merge pull request #310 from mikeprimm/master
Sweep default files into JAR, extract as defaults when needed - prevent unneeded stomping of user customized configuration
2011-07-23 13:37:53 -07:00
Mike Primm ddeded3e9c Package more of default data/config in JAR, lay down when needed, to avoid stomping customized configuration when unneeded 2011-07-23 15:29:47 -05:00
mikeprimm e601a2c661 Merge pull request #309 from mikeprimm/master
Put model and texture data into own subdirectory (renderdata)
2011-07-23 07:34:26 -07:00
Mike Primm 357e46280c Merge remote branch 'origin/master' 2011-07-23 09:30:57 -05:00
Mike Primm 9992aa7628 Shift models and texture data into 'renderdata' directory 2011-07-23 09:30:22 -05:00
mikeprimm 869d6a701f Merge pull request #308 from mikeprimm/master
Add single/double chest type support, single chest orientation detection
2011-07-22 22:51:02 -07:00
Mike Primm 4be9ccb1b2 Add single chest orientation calculation 2011-07-23 00:49:09 -05:00
Mike Primm 1c6ececd62 Detect chest type (double, single) and base orientation 2011-07-22 23:20:58 -05:00
mikeprimm d746102963 Merge pull request #307 from mikeprimm/hdrender
Split templates.txt into multiple files in templates directory, support loading templates from directory
2011-07-22 19:52:59 -07:00
Mike Primm 6e1768f544 Drop mapzoomin on flat maps 2011-07-22 21:36:17 -05:00
Mike Primm 9bb9012f9c Make the hires surface maps from 30 degrees - might as well go pretty! 2011-07-22 21:31:14 -05:00
Mike Primm 0fba601063 Switch flat maps in hires template set to lowres - seems excessive 2011-07-22 21:28:39 -05:00
Mike Primm ec13742c85 Restructure templates into template directory, multiple files 2011-07-22 21:18:02 -05:00
mikeprimm 2c1d078272 Merge pull request #306 from mikeprimm/hdrender
Add support for enforcing banned-ips.txt on internal web server
2011-07-22 15:01:27 -07:00
Mike Primm e613fb14d7 Add support for enforcing banned-ips.txt on internal web server 2011-07-22 16:56:08 -05:00
mikeprimm 0e6dfc1adf Merge pull request #305 from mikeprimm/hdrender
Make subblock rendering of scaled down models more accurate (esp for torches, small stuff)
2011-07-22 12:49:39 -07:00
Mike Primm 436fac707f Improve handling of scaled down models in subblock renderer 2011-07-22 13:11:03 -05:00
Mike Primm 0ee5c3db04 Avoid overflows during model scale down 2011-07-22 08:49:50 -05:00
mikeprimm 9c1a744431 Merge pull request #304 from mikeprimm/hdrender
Add smallplayerfaces option for playermarkers component
2011-07-22 00:35:21 -07:00
Mike Primm 5ad9d7bf90 Add smallplayerfaces option for playermarkers component 2011-07-22 02:34:35 -05:00
mikeprimm ce76cfd695 Merge pull request #303 from mikeprimm/hdrender
Improve progress messages, make sure HDMaps that share render only render
2011-07-21 23:47:17 -07:00
Mike Primm a878ce7cd1 Improve progress messages, make sure HDMaps that share render only render once 2011-07-22 01:42:10 -05:00
mikeprimm 9197290910 Merge pull request #302 from mikeprimm/hdrender
Add mapzoomin attribute, to adjust zoom in levels beyond native tile reso
2011-07-21 21:28:48 -07:00
Mike Primm 559f251d50 Add mapzoomin attribute, to adjust zoom in levels beyond native tile resolution 2011-07-21 23:25:59 -05:00
mikeprimm 43dba33db9 Merge pull request #301 from mikeprimm/hdrender
Make incremental update zoom processing more disk I/O efficient
2011-07-21 16:38:14 -07:00
Mike Primm 8c134edce3 Make incremental update zoom processing more disk I/O efficient 2011-07-21 18:33:04 -05:00
mikeprimm 2e96cf88e2 Merge pull request #300 from mikeprimm/hdrender
Stop using Bukkit scheduler - isn't working reliably
2011-07-21 13:36:27 -07:00
Mike Primm da566cdecc Stop using Bukkit scheduler - isn't working reliably 2011-07-21 15:33:38 -05:00
mikeprimm 1115963ab7 Merge pull request #299 from mikeprimm/hdrender
Add support for compass rose in all 8 cardinal directions
2011-07-21 00:51:27 -07:00
Mike Primm ee3f07c6cd Add support for compass rose in all 8 cardinal directions 2011-07-21 02:50:29 -05:00
mikeprimm edc97fe399 Merge pull request #298 from mikeprimm/hdrender
Start restructure of configuration.txt, but without breaking folks - and stop stomping user configuration
2011-07-20 22:10:56 -07:00
Mike Primm b9882955af start move to break up configuration.txt, stop stomping user configurations on upgrade 2011-07-20 23:55:05 -05:00
Mike Primm bf4f8a84f0 Add support for custom-perspectives.txt, custom-shaders.txt, custom-lightings.txt 2011-07-20 21:52:43 -05:00
mikeprimm 2935080bdf Merge pull request #296 from mikeprimm/hdrender
Add proper Connection response to keep-alive handling
2011-07-19 23:54:17 -07:00
Mike Primm 4987ac3fe1 Add proper Connection response to keep-alive handling 2011-07-20 01:37:31 -05:00
mikeprimm a1536d03cd Merge pull request #295 from mikeprimm/hdrender
Add block transparency attributes to improve lighting accuracy
2011-07-19 21:35:26 -07:00
Mike Primm 644c8d0213 Add block transparency attributes to improve lighting accuracy 2011-07-19 23:34:01 -05:00
mikeprimm b277663705 Merge pull request #294 from mikeprimm/hdrender
Handle snow lighting special case
2011-07-19 15:45:59 -07:00
Mike Primm 913a92a010 Handle snow lighting special case 2011-07-19 17:45:05 -05:00
mikeprimm 976f8cd334 Merge pull request #293 from mikeprimm/hdrender
Undo bad fix - broke some models
2011-07-19 14:43:34 -07:00
Mike Primm 3ef3f6cb61 Undo bad fix - broke some models 2011-07-19 16:39:09 -05:00
mikeprimm b212908a13 Merge pull request #292 from mikeprimm/hdrender
Add nether support to HDMap
2011-07-19 14:20:05 -07:00
Mike Primm 537c6d3f25 Add nether support to HDMap 2011-07-19 15:11:44 -05:00
mikeprimm 06b7a5dd57 Merge pull request #289 from mikeprimm/hdrender
Fix wool coloring in texture support
2011-07-18 23:48:36 -07:00
Mike Primm f58092167f Fix wool coloring in texture support 2011-07-19 01:47:46 -05:00
mikeprimm 71a8195fc2 Merge pull request #288 from mikeprimm/hdrender
Performance tuning
2011-07-18 23:03:34 -07:00
Mike Primm 73825b4558 Merge remote branch 'upstream/master' into HEAD 2011-07-19 00:53:02 -05:00
Mike Primm 2c16c800e9 Performance tuning, improve workaround for bukkit scheduler bugs 2011-07-19 00:52:05 -05:00
FrozenCow 929a34656b Added webchat-interval for JsonFileClientUpdateComponent (which should fix sendmessage.php) 2011-07-18 13:13:02 +02:00
mikeprimm 910b963fcd Merge pull request #286 from mikeprimm/hdrender
Add handling for custom_still_water, custom_still_lava, etc
2011-07-17 19:24:27 -07:00
Mike Primm b51bb22b9e Add handling for custom_still_water, custom_still_lava, etc 2011-07-17 20:51:51 -05:00
mikeprimm 1adbe45c27 Merge pull request #285 from mikeprimm/hdrender
Fix texture pack scaling support, remove assumption that watercolor.png is present
2011-07-17 16:14:47 -07:00
Mike Primm ff07b6f343 Fix texture pack scaling support 2011-07-17 18:13:03 -05:00
Mike Primm c74dd49f67 Make workaround for adaptive - be faster when bukkit isn't tripping up 2011-07-17 16:32:34 -05:00
Mike Primm 1862dc918c Different Bukkit schedule spin workaround, that isn't so slow
Generalize texture image loading
2011-07-17 16:19:24 -05:00
mikeprimm d4ecd05af9 Merge pull request #283 from mikeprimm/hdrender
Add texture pack shader support
2011-07-17 09:38:37 -07:00
Mike Primm 4e810fc9d8 Woraround bukkit schedule spin, add custom-models.txt, custom-texture.txt 2011-07-17 11:02:22 -05:00
Mike Primm 4bc3030637 Correct wood grain orientation from top 2011-07-17 02:42:35 -05:00
Mike Primm 9133d03489 Finish first pass of texture mapping 2011-07-17 02:20:13 -05:00
Mike Primm d21d640eae First pass functional texture pack shader :) 2011-07-16 16:51:46 -05:00
Mike Primm edac2e5cd9 Start on texture pack shader 2011-07-15 23:19:05 -05:00
Mike Primm 0323c98938 More texture pack work 2011-07-15 17:37:54 -05:00
Mike Primm a91060dc95 Fix non-power-of-two scaling on models and textures 2011-07-15 09:29:27 -05:00
Mike Primm c958da0ae0 Start on texture pack loader/scaler 2011-07-15 08:28:09 -05:00
mikeprimm 862c219d7d Merge pull request #281 from mikeprimm/hdrender
Add weakref based chunk snapshot cache
2011-07-13 23:10:20 -07:00
Mike Primm 66ca5199e3 Add weak reference based cache for chunk snapshots 2011-07-14 01:08:28 -05:00
Mike Primm eb87231926 Fix scroll buttons in player list 2011-07-13 16:05:08 -05:00
mikeprimm b4d7568e61 Merge pull request #278 from mikeprimm/hdrender
More models (doors, levers)
2011-07-12 23:06:14 -07:00
Mike Primm e4edb91f3d More models (doors, levers) 2011-07-13 01:05:20 -05:00
mikeprimm 281005f1f8 Merge pull request #277 from mikeprimm/hdrender
More models (beds, etc), proper fence support, lighting fixes for steps and slabs
2011-07-12 21:44:42 -07:00
Mike Primm c81c8cbaa6 More models (beds, etc), proper fence support, lighting fixes for steps and slabs 2011-07-12 23:32:18 -05:00
mikeprimm d764598bde Merge pull request #276 from mikeprimm/hdrender
More models, fixes to make HD shader defaults more consistent with Kzed shader
2011-07-12 16:23:28 -07:00
Mike Primm 9c1479b922 Add models for flowers, mushrooms, fire 2011-07-12 18:22:12 -05:00
Mike Primm bd69a69aff Make default shader more consistent with Kzed shader 2011-07-12 18:02:01 -05:00
mikeprimm 8df180313e Merge pull request #273 from mikeprimm/hdrender
Add models.txt, and code to load models from it, and lots of models
2011-07-12 00:21:32 -07:00
Mike Primm de2cdf5411 Add models.txt, and code to load models from it, and lots of models 2011-07-12 02:08:48 -05:00
mikeprimm 2db0d76950 Merge pull request #270 from mikeprimm/hdrender
Fix biome rendering
2011-07-11 07:39:29 -07:00
Mike Primm 57ea6aefd6 Fix biome rendering 2011-07-11 09:37:03 -05:00
mikeprimm 2cb8d9e3a1 Merge pull request #269 from mikeprimm/hdrender
Add support for non-cube block models, subblock tracing for them
2011-07-11 00:19:13 -07:00
Mike Primm b72cc2063a Add support for non-cube block models, subblock tracing for them 2011-07-11 02:14:55 -05:00
mikeprimm d8052d4196 Merge pull request #268 from mikeprimm/hdrender
Fix worldtomap conversion (y coordinate off by 1 tile)
2011-07-10 21:14:20 -07:00
Mike Primm c5c699ae61 Fix worldtomap conversion 2011-07-10 23:12:24 -05:00
mikeprimm 86e5b0c4f8 Merge pull request #267 from mikeprimm/hdrender
Fix orientation of sample flat maps to be north-top (view from south)
2011-07-10 19:13:57 -07:00
Mike Primm 9faad7397b Fix orientation of sample flat maps to be north-top (view from south) 2011-07-10 21:12:11 -05:00
mikeprimm 20028096c7 Merge pull request #266 from mikeprimm/hdrender
Add configuration.txt.sample-hd as sample of HD render with existing defa
2011-07-10 12:44:26 -07:00
Mike Primm 0f0fb22074 Add configuration.txt.sample-hd as sample of HD render with existing default map structure 2011-07-10 14:42:36 -05:00
mikeprimm b85e8f9151 Merge pull request #265 from mikeprimm/hdrender
Add cancelable custom event for reporting of messages received from web
2011-07-09 19:42:39 -07:00
Mike Primm f4e9b8ffce Add cancelable custom event for reporting of messages received from web 2011-07-09 21:39:49 -05:00
mikeprimm 88fde1fcd6 Merge pull request #264 from mikeprimm/hdrender
First drop of HD Renderer
2011-07-09 16:43:43 -07:00
Mike Primm e9c72e1cd9 Merge remote branch 'upstream/master' into HEAD 2011-07-09 18:18:26 -05:00
mikeprimm dcca317b2f Merge pull request #263 from mikeprimm/master
Cleanup event synchronize, so that web config request is more parallel
2011-07-09 16:17:08 -07:00
Mike Primm 874bf9da8d Fix marker/player world-to-map coordinate transform in hdmap.js 2011-07-09 18:04:42 -05:00
Mike Primm 02329673b2 Add adaptive zoomout levels for HDMaps, change zoomout processing to handle it properly 2011-07-09 17:01:40 -05:00
Mike Primm 898f4a6740 Handle bigmap versus bigworld, allows HDMap to be big-map-style independent of bigworld setting. Add bigmap setting on KzedMap and FlatMap too. 2011-07-09 15:51:32 -05:00
Mike Primm 02fa9384ac Add HD cave shader 2011-07-09 02:19:56 -05:00
Mike Primm a3c00a1026 Split lighting and shading - add lightings.txt 2011-07-09 01:26:47 -05:00
Mike Primm 69baafe597 Refactor HDMap configuration - add shaders, perspectives 2011-07-08 22:40:40 -05:00
Mike Primm 7e5865a899 Merge remote branch 'origin/hdrender' into HEAD 2011-07-08 01:36:19 -05:00
Mike Primm 52f23f5e2d Start structuring for shaders and perspectives 2011-07-08 01:34:22 -05:00
Mike Primm ae190b3c57 Merge branch 'master' into HEAD 2011-07-08 00:41:39 -05:00
Mike Primm 137b6af6d5 Fix tile render timmes, split out utility class 2011-07-08 00:40:52 -05:00
Mike Primm 56e5f6fbb3 Split perspective state out, to let shaders better interact with it 2011-07-07 08:41:31 -05:00
Mike Primm 4f73d2cbd6 Clean up HDMap dither, fix tile update events 2011-07-07 00:35:59 -05:00
Mike Primm ee8718d083 Merge remote branch 'upstream/master' into HEAD 2011-07-06 09:44:13 -05:00
Mike Primm 225b348154 Get day/night workding with HDMap 2011-07-05 23:24:25 -05:00
Mike Primm 1f2722b249 Get full existing shader function working on HDMap 2011-07-05 22:17:22 -05:00
FrozenCow 9afe25b449 Changed version to 0.20. 2011-07-05 09:59:17 +02:00
Mike Primm f3f871df3c Finish correction of zoom file coordinate correction for HDMap 2011-07-04 22:34:30 -05:00
Mike Primm 961eb17536 Fix zoom-out coordinate consistency on HDMaps 2011-07-04 10:18:05 -05:00
Mike Primm e2244ddda5 Merge remote branch 'upstream/master' into HEAD 2011-07-04 09:30:04 -05:00
Mike Primm 4086291ce2 Merge remote branch 'origin/master' into HEAD 2011-07-04 09:29:02 -05:00
Mike Primm 630759c87b HD renderer prototype 2011-07-04 09:28:06 -05:00
mikeprimm bf1f8a8f65 Merge pull request #258 from mikeprimm/master
Setting to 0.19.2 for support release for 1.7 related issues
2011-07-03 16:07:24 -07:00
Mike Primm 4152337568 Set to 0.19.2 for bug-fix release for 1.7 items 2011-07-03 18:03:04 -05:00
mikeprimm 9942327531 Merge pull request #257 from mikeprimm/master
Workaround for CB953 furnace freak-out
2011-07-03 10:06:42 -07:00
Mike Primm c393eec159 Workaround for CB 953 furnace freakout (fixed in CB955) 2011-07-03 12:03:06 -05:00
mikeprimm 9b9320f9c0 Merge pull request #256 from mikeprimm/master
More 1.7 stuff: add sticky piston to colorschemes, fix spurrious read lock timeouts on web
2011-07-03 09:36:53 -07:00
Mike Primm e724a7bccb Fix premature timeouts on tile read waits, causing missed tile loads 2011-07-03 11:30:48 -05:00
Mike Primm 97ff6a2c2d Add sticky piston block, too 2011-07-03 11:28:09 -05:00
mikeprimm e8aab6e257 Merge pull request #255 from mikeprimm/master
Add color definitions to schemas for pistons and piston-heads
2011-06-30 13:30:33 -07:00
Mike Primm 33206e089f Add piston and piston-head block color definitions 2011-06-30 15:29:47 -05:00
FrozenCow cb4f6aaf82 Changed version to 0.20. 2011-06-30 12:38:02 +02:00
mikeprimm c978d87fef Merge pull request #254 from mikeprimm/master
Set head branch back to 0.19.1 - need bug fix build
2011-06-29 19:11:58 -07:00
Mike Primm 00a660d019 Don't throw exception on bogus absolute path (http://xxx//blah) 2011-06-30 03:19:04 +08:00
mikeprimm 3875486fbf Merge pull request #253 from mikeprimm/master
Add better URI path normalization, option to allow symlinks in web path
2011-06-29 11:44:58 -07:00
mikeprimm e0f9a2f1e2 Merge pull request #251 from mikeprimm/master
Add some cleanup to help avoid exceptions on /reload and shutdown/disable
2011-06-28 23:38:04 -07:00
mikeprimm be983825ab Merge pull request #250 from mikeprimm/master
Fix WorldGuard regions code to handle polygon regions (WG5)
2011-06-28 22:45:15 -07:00
mikeprimm aa796deeff Merge pull request #249 from mikeprimm/master
Tighten up logic for assuring unlock of locked files during exceptions, fix version number display
2011-06-28 20:39:00 -07:00
mikeprimm b4b11329c2 Merge pull request #248 from mikeprimm/master
Fix 'visibleregions' option on JSON implementation of WorldGuard regions
2011-06-28 09:07:28 -07:00
mikeprimm 1a23f24b81 Merge pull request #247 from mikeprimm/master
Fix break in processing center: coordinates due to mistake in url-parameter code
2011-06-27 18:49:40 -07:00
141 changed files with 13731 additions and 2450 deletions
+9
View File
@@ -22,6 +22,15 @@
<jar jarfile="${dist}/${pluginname}.jar">
<fileset dir="${bin}"/>
<fileset file="${src}/main/resources/plugin.yml"/>
<fileset file="${src}/main/resources/configuration.txt"/>
<fileset file="${src}/main/resources/custom-lightings.txt"/>
<fileset file="${src}/main/resources/custom-perspectives.txt"/>
<fileset file="${src}/main/resources/custom-shaders.txt"/>
<fileset file="${src}/main/resources/lightings.txt"/>
<fileset file="${src}/main/resources/models.txt"/>
<fileset file="${src}/main/resources/perspectives.txt"/>
<fileset file="${src}/main/resources/texture.txt"/>
<fileset file="${src}/main/resources/worlds.txt"/>
<zipfileset file="${src}/main/resources/colors.txt"/>
</jar>
</target>
+6
View File
@@ -54,12 +54,18 @@ Powered Rail
27 150 134 102 180 120 107 81 180 75 67 51 180 60 53 40 180
Detector Rail
28 150 134 102 180 120 107 81 180 75 67 51 180 60 53 40 180
Sticky Piston
29 157 128 79 255 96 96 96 255 78 64 39 255 48 48 48 255
Cobweb
30 138 145 145 255 110 115 115 255 69 72 72 255 55 57 57 255
Tall Grass
31 97 156 53 255 73 120 38 255 38 68 16 255 26 50 9 255
Dead Shrubs
32 75 44 24 255 60 35 19 255 37 22 12 255 30 18 10 255
Piston
33 157 128 79 255 96 96 96 255 78 64 39 255 48 48 48 255
Piston Head
34 157 128 79 255 96 96 96 255 78 64 39 255 48 48 48 255
Wool
35 222 222 222 255 177 177 177 255 111 111 111 255 88 88 88 255
35:0 222 222 222 255 177 177 177 255 111 111 111 255 88 88 88 255
+6
View File
@@ -54,12 +54,18 @@ Powered Rail
27 150 134 102 180 120 107 81 180 75 67 51 180 60 53 40 180
Detector Rail
28 150 134 102 180 120 107 81 180 75 67 51 180 60 53 40 180
Sticky Piston
29 157 128 79 255 96 96 96 255 78 64 39 255 48 48 48 255
Cobweb
30 138 145 145 255 110 115 115 255 69 72 72 255 55 57 57 255
Tall Grass
31 97 156 53 255 73 120 38 255 38 68 16 255 26 50 9 255
Dead Shrubs
32 75 44 24 255 60 35 19 255 37 22 12 255 30 18 10 255
Piston
33 157 128 79 255 96 96 96 255 78 64 39 255 48 48 48 255
Piston Head
34 157 128 79 255 96 96 96 255 78 64 39 255 48 48 48 255
Wool
35 247 255 239 255 244 251 236 255 204 210 197 255 244 251 236 255
35:0 247 255 239 255 244 251 236 255 204 210 197 255 244 251 236 255
+6
View File
@@ -54,12 +54,18 @@ Powered Rail
27 150 134 102 180 120 107 81 180 75 67 51 180 60 53 40 180
Detector Rail
28 150 134 102 180 120 107 81 180 75 67 51 180 60 53 40 180
Sticky Piston
29 157 128 79 255 125 122 116 255 78 64 39 255 88 85 81 255
Cobweb
30 138 145 145 255 110 115 115 255 69 72 72 255 55 57 57 255
Tall Grass
31 111 185 79 255 86 158 53 255 65 131 40 255 57 105 21 255
Dead Shrubs
32 75 44 24 255 60 35 19 255 37 22 12 255 30 18 10 255
Piston
33 157 128 79 255 125 122 116 255 78 64 39 255 88 85 81 255
Piston Head
34 157 128 79 255 125 122 116 255 78 64 39 255 88 85 81 255
Wool
35 222 222 222 255 177 177 177 255 111 111 111 255 88 88 88 255
35:0 222 222 222 255 177 177 177 255 111 111 111 255 88 88 88 255
+3
View File
@@ -25,9 +25,12 @@
26 200 20 20 255 160 16 16 255 100 10 10 255 80 8 8 255
27 150 134 102 180 120 107 81 180 75 67 51 180 60 53 40 180
28 150 134 102 180 120 107 81 180 75 67 51 180 60 53 40 180
29 109 80 60 255 111 108 98 255 76 56 41 255 111 108 98 255
30 138 145 145 255 110 115 115 255 69 72 72 255 55 57 57 255
31 97 156 53 255 73 120 38 255 38 68 16 255 26 50 9 255
32 75 44 24 255 60 35 19 255 37 22 12 255 30 18 10 255
33 109 80 60 255 111 108 98 255 76 56 41 255 111 108 98 255
34 109 80 60 255 111 108 98 255 76 56 41 255 111 108 98 255
35 247 255 239 255 244 251 236 255 204 210 197 255 244 251 236 255
35:0 247 255 239 255 244 251 236 255 204 210 197 255 244 251 236 255
35:1 227 128 52 255 224 126 51 255 187 105 42 255 224 126 51 255
-429
View File
@@ -1,429 +0,0 @@
# All paths in this configuration file are relative to Dynmap's data-folder: minecraft_server/plugins/dynmap/
components:
- class: org.dynmap.ClientConfigurationComponent
- class: org.dynmap.InternalClientUpdateComponent
sendhealth: true
sendposition: true
allowwebchat: true
webchat-interval: 5
hidewebchatip: false
trustclientname: false
#- class: org.dynmap.JsonFileClientUpdateComponent
# writeinterval: 1
# sendhealth: true
# sendposition: true
# allowwebchat: false
# hidewebchatip: false
- class: org.dynmap.SimpleWebChatComponent
allowchat: true
#- class: org.dynmap.herochat.HeroWebChatComponent
# # Control which HeroChat channel messages from web are directed to
# herochatwebchannel: Global
# # Control which channels are monitored and reported to the web
# herochatchannels:
# - Global
# #- Trade
# #- Haggle
- class: org.dynmap.ClientComponent
type: chat
- class: org.dynmap.ClientComponent
type: chatballoon
focuschatballoons: false
- class: org.dynmap.ClientComponent
type: chatbox
showplayerfaces: true
messagettl: 5
- class: org.dynmap.ClientComponent
type: playermarkers
showplayerfaces: true
showplayerhealth: true
#- class: org.dynmap.ClientComponent
# type: digitalclock
- class: org.dynmap.ClientComponent
type: timeofdayclock
showdigitalclock: true
#showweather: true
#- class: org.dynmap.regions.RegionsComponent
# type: regions
# name: WorldGuard
# useworldpath: true
# filename: regions.yml
# basenode: regions
# use3dregions: true
# infowindow: '<div class="infowindow"><span style="font-size:120%;">%regionname% - %priority% (%parent%)</span><br /> Owners <span style="font-weight:bold;">%playerowners% %groupowners%</span><br />Members <span style="font-weight:bold;">%playermembers% %groupmembers%</span><br />Flags<br /><span style="font-weight:bold;">%flags%</span></div>'
# regionstyle:
# strokeColor: "#FF0000"
# strokeOpacity: 0.8
# strokeWeight: 3
# fillColor: "#FF0000"
# fillOpacity: 0.35
# # Optional setting to limit which regions to show, by name - if commented out, all regions are shown
# visibleregions:
# - homebase
# - miningsite
#- class: org.dynmap.TestComponent
# stuff: "This is some configuration-value"
# Treat hiddenplayers.txt as a whitelist for players to be shown on the map? (Default false)
display-whitelist: false
# How often a tile gets rendered (in seconds).
renderinterval: 1
# Zoom-out tile update period - how often to scan for and process tile updates into zoom-out tiles (in seconds)
zoomoutperiod: 60
# Tile hashing is used to minimize tile file updates when no changes have occurred - set to false to disable
enabletilehash: true
render-triggers:
#- chunkloaded
#- playermove
#- playerjoin
- blockplaced
- blockbreak
- snowform
- leavesdecay
- blockburn
- chunkgenerated
# The path where the tile-files are placed.
tilespath: web/tiles
# The path where the web-files are located.
webpath: web
# The network-interface the webserver will bind to (0.0.0.0 for all interfaces, 127.0.0.1 for only local access).
webserver-bindaddress: 0.0.0.0
# The TCP-port the webserver will listen on.
webserver-port: 8123
# Disables Webserver portion of Dynmap (Advanced users only)
disable-webserver: false
# Enable/disable having the web server allow symbolic links (true=compatible with existing code, false=more secure (default))
allow-symlinks: true
# Period between tile renders for fullrender, in seconds (non-zero to pace fullrenders, lessen CPU load)
timesliceinterval: 0.0
# Maximum chunk loads per server tick (1/20th of a second) - reducing this below 90 will impact render performance, but also will reduce server thread load
maxchunkspertick: 200
# Interval the browser should poll for updates.
updaterate: 2000
showplayerfacesinmenu: true
# Set sidebaropened: true to pin menu sidebar opened
#sidebaropened: true
joinmessage: "%playername% joined"
quitmessage: "%playername% quit"
spammessage: "You may only chat once every %interval% seconds."
webprefix: "§2[WEB] "
websuffix: "§f"
defaultzoom: 0
defaultworld: world
# template world - this is used for worlds that exist but aren't defined in the worlds section.
# Also, it supplies the "maps" section for worlds lacking a maps section, and the "center"
# for worlds lacking a "center" section.
templates:
# Template for normal world
normal:
enabled: true
# # If bigworld set to true, use alternate directory layout better suited to large worlds
# bigworld: true
# # Number of extra zoom-out levels for world (each level is twice as big as the previous one)
# extrazoomout: 3
center:
x: 0
y: 64
z: 0
maps:
- class: org.dynmap.flat.FlatMap
name: flat
title: "Flat"
prefix: flat
colorscheme: default
# The textured setting makes the flat render toning much more consistent with the other maps: set to 'none' for the original flat texture, 'smooth' for blended tile top colors, 'dither' for dither pattern
textured: smooth
# # To render a world as a "night view", set shadowstrength and ambientlight
# shadowstrength: 1.0
# ambientlight: 4
# # To render both night and day versions of tiles (when ambientlight is set), set true
# night-and-day: true
# # Option to turn on transparency support (off by default) - slows render
# transparency: true
# # Background color for map during the day
# backgroundday: "#153E7E"
# # Background color for map during the night
# backgroundnight: "#000000"
# # Background color for map (independent of night/day)
# background: "#000000"
- class: org.dynmap.kzedmap.KzedMap
renderers:
- class: org.dynmap.kzedmap.DefaultTileRenderer
name: surface
title: "Surface"
prefix: t
maximumheight: 127
colorscheme: default
# # Add shadows to world (based on top-down shadows from chunk data)
# shadowstrength: 1.0
# # To render a world as a "night view", set shadowstrength and ambientlight
# ambientlight: 4
# # To render both night and day versions of tiles (when ambientlight is set), set true
# night-and-day: true
# # Option to turn off transparency support (on by default) - speeds render
# transparency: false
# # Background color for map during the day
# backgroundday: "#153E7E"
# # Background color for map during the night
# backgroundnight: "#000000"
# # Background color for map (independent of night/day)
# background: "#000000"
# # Sets the icon to 'images/block_custom.png'
# icon: custom
# # Biome-based mapping
# - class: org.dynmap.kzedmap.DefaultTileRenderer
# name: biome
# title: "Biome"
# prefix: b
# maximumheight: 127
# colorscheme: default
# # Biome-based coloring : biome=biome type, temperature=biome-temperature, rainfall=biome-rainfall
# biomecolored: biome
# - class: org.dynmap.kzedmap.HighlightTileRenderer
# prefix: ht
# maximumheight: 127
# colorscheme: default
# highlight: # For highlighting multiple block-types.
# - 56 # Highlight diamond-ore
# - 66 # Highlight minecart track
# highlight: 56 # For highlighting a single block-type.
- class: org.dynmap.kzedmap.CaveTileRenderer
name: cave
title: "Cave"
prefix: ct
maximumheight: 127
# Nether world template
nether:
enabled: true
# # If bigworld set to true, use alternate directory layout better suited to large worlds
# bigworld: true
# # Number of extra zoom-out levels for world (each level is twice as big as the previous one)
# extrazoomout: 3
center:
x: 0
y: 64
z: 0
maps:
- class: org.dynmap.flat.FlatMap
name: flat
title: "Flat"
prefix: flat
colorscheme: default
# Map background color (day or night)
background: "#300806"
# The textured setting makes the flat render toning much more consistent with the other maps: set to 'none' for the original flat texture, 'smooth' for blended tile top colors, 'dither' for dither pattern
textured: smooth
- class: org.dynmap.kzedmap.KzedMap
renderers:
- class: org.dynmap.kzedmap.DefaultTileRenderer
name: nether
title: "Surface"
prefix: nt
maximumheight: 127
colorscheme: default
# Map background color (day or night)
background: "#300806"
# Skylands world template
skylands:
enabled: true
# # If bigworld set to true, use alternate directory layout better suited to large worlds
# bigworld: true
# # Number of extra zoom-out levels for world (each level is twice as big as the previous one)
# extrazoomout: 3
center:
x: 0
y: 64
z: 0
maps:
- class: org.dynmap.flat.FlatMap
name: flat
title: "Flat"
prefix: flat
colorscheme: default
# Background color for map during the day
backgroundday: "#153E7E"
# Background color for map during the night
backgroundnight: "#000000"
# The textured setting makes the flat render toning much more consistent with the other maps: set to 'none' for the original flat texture, 'smooth' for blended tile top colors, 'dither' for dither pattern
textured: smooth
- class: org.dynmap.kzedmap.KzedMap
renderers:
- class: org.dynmap.kzedmap.DefaultTileRenderer
name: skylands
title: "Surface"
prefix: st
maximumheight: 127
colorscheme: default
# Background color for map during the day
backgroundday: "#153E7E"
# Background color for map during the night
backgroundnight: "#000000"
night-and-day: true
shadowstrength: 1.0
ambientlight: 4
# The maptypes Dynmap will use to render.
worlds:
# Worlds can be handled by templates, based on world type
# You can override the properties of the template by specifying them in this section
# for example 'Title: "My Awesome World"'
#- name: world
# title: "World"
# Use 'enabled: false' to disable a certain world.
# enabled: false
# Use sendposition: false to prevent player positions from showing when on this world (if sendposition is globally enabled)
# sendposition: false
# Use sendhealth: false ot prevent player health from showing when on this world (if sendhealth is globally enabled)
# sendhealth: false
# # If world isn't contiguous chunks (due to teleporting, for example), fullrender needs to be given other locations to scan for tiles on each patch of chunks
# fullrenderlocations:
# - x: 10000
# y: 64
# z: 20000
# - x: -15000
# y: 64
# z: -5000
# # Use visibilitylimits to restrict which areas of maps on your world to render (zero or more rectangles can be defined)
# visibilitylimits:
# - x0: -1000
# z0: -1000
# x1: 1000
# z1: 1000
# - x0: -2000
# z0: -1000
# x1: -1000
# z1: -500
# # Use hidestyle to control how hidden-but-existing chunks are to be rendered (air=empty air (same as ungenerated), stone=a flat stone plain, ocean=a flat ocean)
# hidestyle: stone
# # Use 'autogenerate-to-visibilitylimits: true' to choose to force the generation of ungenerated chunks while rendering maps on this world, for any chunks within the defined
# # visibilitylimits (limits must be set). The three options here are: none (default - no autogenerate), map-only (temporarily generate chunks for map, but don't save them (no world change),
# # permanent (generate and save chunks - this permanently adds the chunks to the world, as if a player had visited them - BE SURE THIS IS WHAT YOU WANT)
# autogenerate-to-visibilitylimits: map-only
# Use 'template: mycustomtemplate' to use the properties specified in the template 'mycustomtemplate' to this world. Default it is set to the environment-name (normal or nether).
# template: mycustomtemplate
# Rest of comes from template - uncomment to tailor for world specifically
# center:
# x: 0
# y: 64
# z: 0
# # If bigworld set to true, use alternate directory layout better suited to large worlds
# bigworld: true
# # Number of extra zoom-out levels for world (each level is twice as big as the previous one)
# extrazoomout: 3
# maps:
# - class: org.dynmap.flat.FlatMap
# name: flat
# title: "Flat"
# prefix: flat
# colorscheme: default
# # The textured setting makes the flat render toning much more consistent with the other maps: set to 'none' for the original flat texture, 'smooth' for blended tile top colors, 'dither' for dither pattern
# textured: smooth
# # To render a world as a "night view", set shadowstrength and ambientlight
# shadowstrength: 1.0
# ambientlight: 4
# # To render both night and day versions of tiles (when ambientlight is set), set true
# night-and-day: true
# # Option to turn on transparency support (off by default) - slows render
# transparency: true
# # Background color for map during the day
# backgroundday: "#153E7E"
# # Background color for map during the night
# backgroundnight: "#000000"
# # Backgrounc color for map (independent of night/day)
# background: "#000000"
# - class: org.dynmap.kzedmap.KzedMap
# renderers:
# - class: org.dynmap.kzedmap.DefaultTileRenderer
# name: surface
# title: "Surface"
# prefix: t
# maximumheight: 127
# colorscheme: default
# # Add shadows to world (based on top-down shadows from chunk data)
# shadowstrength: 1.0
# # To render a world as a "night view", set shadowstrength and ambientlight
# ambientlight: 4
# # To render both night and day versions of tiles (when ambientlight is set), set true
# night-and-day: true
# # Option to turn off transparency support (on by default) - speeds render
# transparency: false
# # Background color for map during the day
# backgroundday: "#153E7E"
# # Background color for map during the night
# backgroundnight: "#000000"
# # Backgrounc color for map (independent of night/day)
# background: "#000000"
# # Sets the icon to 'images/block_custom.png'
# icon: custom
# - class: org.dynmap.kzedmap.HighlightTileRenderer
# prefix: ht
# maximumheight: 127
# colorscheme: default
# highlight: # For highlighting multiple block-types.
# - 56 # Highlight diamond-ore
# - 66 # Highlight minecart track
# highlight: 56 # For highlighting a single block-type.
# - class: org.dynmap.kzedmap.CaveTileRenderer
# name: cave
# title: "Cave"
# prefix: ct
# maximumheight: 127
#
# To just label world, and inherit rest from template, just provide name and title
#- name: world2
# title: "Second World"
#
#- name: nether
# title: "Nether"
# center:
# x: 0
# y: 64
# z: 0
# # Number of extra zoom-out levels for world (each level is twice as big as the previous one)
# extrazoomout: 3
# maps:
# - class: org.dynmap.flat.FlatMap
# name: flat
# title: "Flat"
# prefix: flat
# colorscheme: default
# # The textured setting makes the flat render toning much more consistent with the other maps: set to 'none' for the original flat texture, 'smooth' for blended tile top colors, 'dither' for dither pattern
# textured: smooth
# - class: org.dynmap.kzedmap.KzedMap
# renderers:
# - class: org.dynmap.kzedmap.DefaultTileRenderer
# name: nether
# title: "Surface"
# prefix: nt
# maximumheight: 127
# colorscheme: default
# Set to true to enable verbose startup messages - can help with debugging map configuration problems
# Set to false for a much quieter startup log
verbose: true
# Enables debugging.
#debuggers:
# - class: org.dynmap.debug.LogDebugger
+7 -1
View File
@@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.dynmap</groupId>
<artifactId>dynmap</artifactId>
<version>0.19.1</version>
<version>0.21</version>
<name>dynmap</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -29,6 +29,12 @@
<descriptors>
<descriptor>src/main/assembly/package.xml</descriptor>
</descriptors>
<!-- Hack for bug in maven-assembly: http://jira.codehaus.org/browse/MASSEMBLY-449 -->
<archiverConfig>
<fileMode>420</fileMode> <!-- 420(dec) = 644(oct) -->
<directoryMode>493</directoryMode> <!-- 493(dec) = 755(oct) -->
<defaultDirectoryMode>493</defaultDirectoryMode>
</archiverConfig>
</configuration>
<executions>
<execution>
+5 -4
View File
@@ -24,10 +24,11 @@
<outputDirectory>/dynmap/colorschemes</outputDirectory>
</fileSet>
<fileSet>
<directory>${project.basedir}</directory>
<outputDirectory>/dynmap/</outputDirectory>
<includes>
<include>configuration.txt</include></includes></fileSet>
<directory>${project.basedir}/texturepacks</directory>
<outputDirectory>/dynmap/texturepacks</outputDirectory></fileSet>
<fileSet>
<directory>${project.basedir}/renderdata</directory>
<outputDirectory>/dynmap/renderdata</outputDirectory></fileSet>
</fileSets>
<files>
<file>
+25 -17
View File
@@ -2,6 +2,7 @@ package org.dynmap;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
import org.bukkit.Material;
public class Armor {
@@ -10,27 +11,34 @@ public class Armor {
* We rely on getArmorContents() to return 4 armor pieces in the order
* of: boots, pants, chest, helmet
*/
private static final double armorPoints[] = {1.5, 3.0, 4.0, 1.5};
private static final int armorPoints[] = {3, 6, 8, 3};
public static final int getArmorPoints(Player player) {
int currentDurability = 0;
int baseDurability = 0;
double baseArmorPoints = 0;
ItemStack inventory[] = player.getInventory().getArmorContents();
for(int i=0;i<inventory.length;i++) {
if(inventory[i] == null)
continue;
Material m = inventory[i].getType();
if(m == null)
continue;
final short maxDurability = m.getMaxDurability();
if(maxDurability < 0)
continue;
final short durability = inventory[i].getDurability();
baseDurability += maxDurability;
currentDurability += maxDurability - durability;
baseArmorPoints += armorPoints[i];
int baseArmorPoints = 0;
ItemStack[] itm = new ItemStack[4];
PlayerInventory inv = player.getInventory();
itm[0] = inv.getBoots();
itm[1]= inv.getLeggings();
itm[2] = inv.getChestplate();
itm[3] = inv.getHelmet();
for(int i = 0; i < 4; i++) {
if(itm[i] == null) continue;
int dur = itm[i].getDurability();
int max = itm[i].getType().getMaxDurability();
if(max <= 0) continue;
if(i == 2)
max = max + 1; /* Always 1 too low for chestplate */
else
max = max - 3; /* Always 3 too high, versus how client calculates it */
baseDurability += max;
currentDurability += max - dur;
baseArmorPoints += armorPoints[i];
}
return (int)(2*baseArmorPoints*currentDurability/baseDurability);
int ap = 0;
if(baseDurability > 0)
ap = ((baseArmorPoints - 1) * currentDurability) / baseDurability + 1;
return ap;
}
}
+14 -12
View File
@@ -12,10 +12,14 @@ public class AsynchronousQueue<T> {
private Set<T> set = new HashSet<T>();
private Handler<T> handler;
private int dequeueTime;
public AsynchronousQueue(Handler<T> handler, int dequeueTime) {
private int accelDequeueTime;
private int accelDequeueThresh;
public AsynchronousQueue(Handler<T> handler, int dequeueTime, int accelDequeueThresh, int accelDequeueTime) {
this.handler = handler;
this.dequeueTime = dequeueTime;
this.accelDequeueTime = accelDequeueTime;
this.accelDequeueThresh = accelDequeueThresh;
}
public boolean push(T t) {
@@ -30,15 +34,10 @@ public class AsynchronousQueue<T> {
private T pop() {
synchronized (lock) {
try {
T t = queue.removeFirst();
if (!set.remove(t)) {
// This should never happen.
}
return t;
} catch (NoSuchElementException e) {
return null;
}
T t = queue.pollFirst();
if(t != null)
set.remove(t);
return t;
}
}
@@ -88,7 +87,10 @@ public class AsynchronousQueue<T> {
if (t != null) {
handler.handle(t);
}
sleep(dequeueTime);
if(set.size() >= accelDequeueThresh)
sleep(accelDequeueTime);
else
sleep(dequeueTime);
}
} catch (Exception ex) {
-111
View File
@@ -1,111 +0,0 @@
package org.dynmap;
import java.util.HashMap;
public class Cache<K, V> {
private final int size;
private int len;
private CacheNode head;
private CacheNode tail;
private class CacheNode {
public CacheNode prev;
public CacheNode next;
public K key;
public V value;
public CacheNode(K key, V value) {
this.key = key;
this.value = value;
prev = null;
next = null;
}
public void unlink() {
if (prev == null) {
head = next;
} else {
prev.next = next;
}
if (next == null) {
tail = prev;
} else {
next.prev = prev;
}
prev = null;
next = null;
len--;
}
public void append() {
if (tail == null) {
head = this;
tail = this;
} else {
tail.next = this;
prev = tail;
tail = this;
}
len++;
}
}
private HashMap<K, CacheNode> map;
public Cache(int size) {
this.size = size;
len = 0;
head = null;
tail = null;
map = new HashMap<K, CacheNode>();
}
/*
* returns value for key, if key exists in the cache otherwise null
*/
public V get(K key) {
CacheNode n = map.get(key);
if (n == null)
return null;
return n.value;
}
/*
* puts a new key-value pair in the cache if the key existed already, the
* value is updated, and the old value is returned if the key didn't exist,
* it is added; the oldest value (now pushed out of the cache) may be
* returned, or null if the cache isn't yet full
*/
public V put(K key, V value) {
CacheNode n = map.get(key);
if (n == null) {
V ret = null;
if (len >= size) {
CacheNode first = head;
first.unlink();
map.remove(first.key);
ret = first.value;
}
CacheNode add = new CacheNode(key, value);
add.append();
map.put(key, add);
return ret;
} else {
n.unlink();
V old = n.value;
n.value = value;
n.append();
return old;
}
}
}
@@ -18,11 +18,12 @@ public class ClientConfigurationComponent extends Component {
s(t, "joinmessage", c.getString("joinmessage", "%playername% joined"));
s(t, "quitmessage", c.getString("quitmessage", "%playername% quit"));
s(t, "spammessage", c.getString("spammessage", "You may only chat once every %interval% seconds."));
s(t, "webprefix", c.getString("webprefix", "[WEB] "));
s(t, "webprefix", unescapeString(c.getString("webprefix", "[WEB] ")));
s(t, "defaultzoom", c.getInteger("defaultzoom", 0));
s(t, "sidebaropened", c.getBoolean("sidebaropened", false));
DynmapWorld defaultWorld = null;
String defmap = null;
for(DynmapWorld world : plugin.mapManager.getWorlds()) {
if (defaultWorld == null) defaultWorld = world;
ConfigurationNode wn = world.configuration;
@@ -37,10 +38,12 @@ public class ClientConfigurationComponent extends Component {
a(t, "worlds", wo);
for(MapType mt : world.maps) {
mt.buildClientConfiguration(wo);
mt.buildClientConfiguration(wo, world);
if(defmap == null) defmap = mt.getName();
}
}
s(t, "defaultworld", c.getString("defaultworld", defaultWorld == null ? "world" : defaultWorld.world.getName()));
s(t, "defaultmap", c.getString("defaultmap", defmap == null ? "surface" : defmap));
}
});
}
@@ -42,7 +42,9 @@ public class ClientUpdateComponent extends Component {
s(jp, "account", p.getName());
/* Don't leak player location for world not visible on maps, or if sendposition disbaled */
DynmapWorld pworld = MapManager.mapman.worldsLookup.get(p.getWorld().getName());
if(configuration.getBoolean("sendpositon", true) && (pworld != null) && pworld.sendposition) {
/* Fix typo on 'sendpositon' to 'sendposition', keep bad one in case someone used it */
if(configuration.getBoolean("sendposition", true) && configuration.getBoolean("sendpositon", true) &&
(pworld != null) && pworld.sendposition) {
s(jp, "world", p.getWorld().getName());
s(jp, "x", pl.getX());
s(jp, "y", pl.getY());
+20 -1
View File
@@ -32,7 +32,7 @@ public class Color {
return ((val >> 24) & 0xFF);
}
public final boolean isTransparent() {
return (val == TRANSPARENT);
return ((val & 0xFF000000) == TRANSPARENT);
}
public final void setTransparent() {
val = TRANSPARENT;
@@ -52,4 +52,23 @@ public class Color {
public final int getComponent(int idx) {
return 0xFF & (val >> ((3-idx)*8));
}
public final void setAlpha(int v) {
val = (val & 0x00FFFFFF) | (v << 24);
}
/**
* Scale each color component, based on the corresponding component
*/
public final void blendColor(Color c) {
blendColor(c.val);
}
/**
* Scale each color component, based on the corresponding component
*/
public final void blendColor(int argb) {
int nval = (((((val >> 24) & 0xFF) * ((argb >> 24) & 0xFF)) / 255) << 24);
nval = nval | (((((val >> 16) & 0xFF) * ((argb >> 16) & 0xFF)) / 255) << 16);
nval = nval | (((((val >> 8) & 0xFF) * ((argb >> 8) & 0xFF)) / 255) << 8);
nval = nval | (((val & 0xFF) * (argb & 0xFF)) / 255);
val = nval;
}
}
+4 -1
View File
@@ -132,7 +132,7 @@ public class ColorScheme {
c[1] = new Color(Integer.parseInt(split[9]), Integer.parseInt(split[10]), Integer.parseInt(split[11]), Integer.parseInt(split[12]));
c[2] = new Color(Integer.parseInt(split[13]), Integer.parseInt(split[14]), Integer.parseInt(split[15]), Integer.parseInt(split[16]));
/* Blended color - for 'smooth' option on flat map */
c[4] = new Color((c[0].getRed()+c[2].getRed())/2, (c[0].getGreen()+c[2].getGreen())/2, (c[0].getBlue()+c[2].getBlue())/2, (c[0].getAlpha()+c[2].getAlpha())/2);
c[4] = new Color((c[1].getRed()+c[3].getRed())/2, (c[1].getGreen()+c[3].getGreen())/2, (c[1].getBlue()+c[3].getBlue())/2, (c[1].getAlpha()+c[3].getAlpha())/2);
if(isbiome) {
if(istemp) {
@@ -235,4 +235,7 @@ public class ColorScheme {
else
return null;
}
public static void reset() {
cache.clear();
}
}
+8
View File
@@ -10,4 +10,12 @@ public abstract class Component {
public void dispose() {
}
/* Substitute proper values for escape sequences */
public static String unescapeString(String v) {
/* Replace color code &color; */
v = v.replaceAll("&color;", "\u00A7");
return v;
}
}
@@ -15,19 +15,22 @@ public class DynmapPlayerChatListener extends PlayerListener {
@Override
public void onPlayerChat(PlayerChatEvent event) {
if(event.isCancelled()) return;
plugin.mapManager.pushUpdate(new Client.ChatMessage("player", "",
if(plugin.mapManager != null)
plugin.mapManager.pushUpdate(new Client.ChatMessage("player", "",
event.getPlayer().getDisplayName(), event.getMessage(),
event.getPlayer().getName()));
}
@Override
public void onPlayerJoin(PlayerJoinEvent event) {
plugin.mapManager.pushUpdate(new Client.PlayerJoinMessage(event.getPlayer().getDisplayName(), event.getPlayer().getName()));
if(plugin.mapManager != null)
plugin.mapManager.pushUpdate(new Client.PlayerJoinMessage(event.getPlayer().getDisplayName(), event.getPlayer().getName()));
}
@Override
public void onPlayerQuit(PlayerQuitEvent event) {
plugin.mapManager.pushUpdate(new Client.PlayerQuitMessage(event.getPlayer().getDisplayName(), event.getPlayer().getName()));
if(plugin.mapManager != null)
plugin.mapManager.pushUpdate(new Client.PlayerQuitMessage(event.getPlayer().getDisplayName(), event.getPlayer().getName()));
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,31 @@
package org.dynmap;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
/**
* Custom bukkit event, corresponding to the receiving of a web-chat message from a web UI user
*/
public class DynmapWebChatEvent extends Event implements Cancellable {
private String source;
private String name;
private String message;
private boolean cancelled;
public DynmapWebChatEvent(String source, String name, String message) {
super("org.dynmap.DynmapWebChatEvent");
this.source = source;
this.name = name;
this.message = message;
this.cancelled = false;
}
public boolean isCancelled() { return cancelled; }
public void setCancelled(boolean cancel) { cancelled = cancel; }
public String getSource() { return source; }
public String getName() { return name; }
public String getMessage() { return message; }
}
+166 -64
View File
@@ -6,8 +6,7 @@ import java.util.List;
import org.bukkit.World;
import org.bukkit.Location;
import org.dynmap.debug.Debug;
import org.dynmap.kzedmap.KzedMap;
import org.dynmap.kzedmap.KzedMap.KzedBufferedImage;
import org.dynmap.utils.DynmapBufferedImage;
import org.dynmap.utils.FileLockManager;
import org.dynmap.utils.MapChunkCache;
@@ -32,6 +31,7 @@ public class DynmapWorld {
public ConfigurationNode configuration;
public List<Location> seedloc;
public List<MapChunkCache.VisibilityLimit> visibility_limits;
public List<MapChunkCache.VisibilityLimit> hidden_limits;
public AutoGenerateOption do_autogenerate;
public MapChunkCache.HiddenChunkStyle hiddenchunkstyle;
public int servertime;
@@ -41,8 +41,10 @@ public class DynmapWorld {
private int extrazoomoutlevels; /* Number of additional zoom out levels to generate */
public File worldtilepath;
private Object lock = new Object();
private HashSet<String> zoomoutupdates[];
@SuppressWarnings("unchecked")
private HashSet<String> zoomoutupdates[] = new HashSet[0];
private boolean checkts = true; /* Check timestamps on first run with new configuration */
private boolean cancelled;
@SuppressWarnings("unchecked")
public void setExtraZoomOutLevels(int lvl) {
@@ -59,21 +61,39 @@ public class DynmapWorld {
}
private void enqueueZoomOutUpdate(File f, int level) {
if(level >= extrazoomoutlevels)
return;
synchronized(lock) {
if(level >= zoomoutupdates.length) {
@SuppressWarnings("unchecked")
HashSet<String> new_zoomout[] = new HashSet[level+1];
System.arraycopy(zoomoutupdates, 0, new_zoomout, 0, zoomoutupdates.length);
for(int i = 0; i < new_zoomout.length; i++) {
if(i < zoomoutupdates.length)
new_zoomout[i] = zoomoutupdates[i];
else
new_zoomout[i] = new HashSet<String>();
}
zoomoutupdates = new_zoomout;
}
zoomoutupdates[level].add(f.getPath());
}
}
private boolean popQueuedUpdate(File f, int level) {
if(level >= extrazoomoutlevels)
if(level >= zoomoutupdates.length)
return false;
synchronized(lock) {
return zoomoutupdates[level].remove(f.getPath());
}
}
private String[] peekQueuedUpdates(int level) {
if(level >= zoomoutupdates.length)
return new String[0];
synchronized(lock) {
return zoomoutupdates[level].toArray(new String[zoomoutupdates[level].size()]);
}
}
private static class DirFilter implements FilenameFilter {
public boolean accept(File f, String n) {
if(!n.equals("..") && !n.equals(".")) {
@@ -84,11 +104,21 @@ public class DynmapWorld {
}
}
private static final String COORDSTART = "-0123456789";
private static class PNGFileFilter implements FilenameFilter {
String prefix;
public PNGFileFilter(String pre) { prefix = pre; }
String suffix;
public PNGFileFilter(String pre, MapType.ImageFormat fmt) {
if((pre != null) && (pre.length() > 0))
prefix = pre;
suffix = "." + fmt.getFileExt();
}
public boolean accept(File f, String n) {
if(n.endsWith(".png") && n.startsWith(prefix)) {
if(n.endsWith(suffix)) {
if((prefix != null) && (!n.startsWith(prefix)))
return false;
if((prefix == null) && (COORDSTART.indexOf(n.charAt(0)) < 0))
return false;
File fn = new File(f, n);
return fn.isFile();
}
@@ -97,76 +127,144 @@ public class DynmapWorld {
}
public void freshenZoomOutFiles() {
for(int i = 0; i < extrazoomoutlevels; i++) {
freshenZoomOutFilesByLevel(i);
boolean done = false;
int last_done = 0;
for(int i = 0; (!cancelled) && (!done); i++) {
done = freshenZoomOutFilesByLevel(i);
last_done = i;
}
/* Purge updates for levels above what any map needs */
for(int i = last_done; i < zoomoutupdates.length; i++) {
zoomoutupdates[i].clear();
}
checkts = false; /* Just handle queued updates after first scan */
}
public void cancelZoomOutFreshen() {
cancelled = true;
}
private static class PrefixData {
int stepsize;
int[] stepseq;
boolean neg_step_x;
boolean neg_step_y;
String baseprefix;
int zoomlevel;
String zoomprefix;
String fnprefix;
String zfnprefix;
int bigworldshift;
boolean isbigmap;
MapType.ImageFormat fmt;
}
public void freshenZoomOutFilesByLevel(int zoomlevel) {
public boolean freshenZoomOutFilesByLevel(int zoomlevel) {
int cnt = 0;
Debug.debug("freshenZoomOutFiles(" + world.getName() + "," + zoomlevel + ")");
if(worldtilepath.exists() == false) /* Quit if not found */
return;
return true;
HashMap<String, PrefixData> maptab = buildPrefixData(zoomlevel);
if(bigworld) { /* If big world, next directories are map name specific */
DirFilter df = new DirFilter();
for(String pfx : maptab.keySet()) { /* Walk through prefixes, as directories */
PrefixData pd = maptab.get(pfx);
File dname = new File(worldtilepath, pfx);
/* Now, go through subdirectories under this one, and process them */
String[] subdir = dname.list(df);
if(subdir == null) continue;
for(String s : subdir) {
File sdname = new File(dname, s);
cnt += processZoomDirectory(sdname, pd);
if(checkts) { /* If doing timestamp based scan (initial) */
DirFilter df = new DirFilter();
for(String pfx : maptab.keySet()) { /* Walk through prefixes */
if(cancelled) return true;
PrefixData pd = maptab.get(pfx);
if(pd.isbigmap) { /* If big world, next directories are map name specific */
File dname = new File(worldtilepath, pfx);
/* Now, go through subdirectories under this one, and process them */
String[] subdir = dname.list(df);
if(subdir == null) continue;
for(String s : subdir) {
if(cancelled) return true;
File sdname = new File(dname, s);
cnt += processZoomDirectory(sdname, pd);
}
}
else { /* Else, classic file layout */
cnt += processZoomDirectory(worldtilepath, maptab.get(pfx));
}
}
Debug.debug("freshenZoomOutFiles(" + world.getName() + "," + zoomlevel + ") - done (" + cnt + " updated files)");
}
else { /* Else, only process updates */
String[] paths = peekQueuedUpdates(zoomlevel); /* Get pending updates */
HashMap<String, ProcessTileRec> toprocess = new HashMap<String, ProcessTileRec>();
/* Accumulate zoomed tiles to be processed (combine triggering subtiles) */
for(String p : paths) {
if(cancelled) return true;
File f = new File(p); /* Make file */
/* Find matching prefix */
for(PrefixData pd : maptab.values()) { /* Walk through prefixes */
if(cancelled) return true;
ProcessTileRec tr = null;
/* If big map and matches name pattern */
if(pd.isbigmap && f.getName().startsWith(pd.fnprefix) &&
f.getParentFile().getParentFile().getName().equals(pd.baseprefix)) {
tr = processZoomFile(f, pd);
}
/* If not big map and matches name pattern */
else if((!pd.isbigmap) && f.getName().startsWith(pd.fnprefix)) {
tr = processZoomFile(f, pd);
}
if(tr != null) {
String zfpath = tr.zf.getPath();
if(!toprocess.containsKey(zfpath)) {
toprocess.put(zfpath, tr);
}
}
}
}
}
else { /* Else, classic file layout */
for(String pfx : maptab.keySet()) { /* Walk through prefixes, as directories */
cnt += processZoomDirectory(worldtilepath, maptab.get(pfx));
/* Do processing */
for(ProcessTileRec s : toprocess.values()) {
if(cancelled) return true;
processZoomTile(s.pd, s.zf, s.zfname, s.x, s.y);
}
}
Debug.debug("freshenZoomOutFiles(" + world.getName() + "," + zoomlevel + ") - done (" + cnt + " updated files)");
/* Return true when we have none left at the level */
return (maptab.size() == 0);
}
private HashMap<String, PrefixData> buildPrefixData(int zoomlevel) {
HashMap<String, PrefixData> maptab = new HashMap<String, PrefixData>();
/* Build table of file prefixes and step sizes */
for(MapType mt : maps) {
/* If level is above top needed for this map, skip */
if(zoomlevel > (this.extrazoomoutlevels + mt.getMapZoomOutLevels()))
continue;
List<String> pfx = mt.baseZoomFilePrefixes();
int stepsize = mt.baseZoomFileStepSize();
int bigworldshift = mt.getBigWorldShift();
boolean neg_step_x = false;
if(stepsize < 0) {
stepsize = -stepsize;
neg_step_x = true;
boolean neg_step_y = false;
switch(mt.zoomFileMapStep()) {
case X_PLUS_Y_PLUS:
break;
case X_MINUS_Y_PLUS:
neg_step_x = true;
break;
case X_PLUS_Y_MINUS:
neg_step_y = true;
break;
case X_MINUS_Y_MINUS:
neg_step_x = neg_step_y = true;
break;
}
int[] stepseq = mt.zoomFileStepSequence();
for(String 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.zoomlevel = zoomlevel;
pd.zoomprefix = "zzzzzzzzzzzz".substring(0, zoomlevel);
pd.zoomprefix = "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz".substring(0, zoomlevel);
pd.bigworldshift = bigworldshift;
if(bigworld) {
pd.isbigmap = mt.isBigWorldMap(this);
pd.fmt = mt.getImageFormat();
if(pd.isbigmap) {
if(zoomlevel > 0) {
pd.zoomprefix += "_";
pd.zfnprefix = "z" + pd.zoomprefix;
@@ -191,19 +289,20 @@ public class DynmapWorld {
File zf;
String zfname;
int x, y;
PrefixData pd;
}
private String makeFilePath(PrefixData pd, int x, int y, boolean zoomed) {
if(bigworld)
return pd.baseprefix + "/" + (x >> pd.bigworldshift) + "_" + (y >> pd.bigworldshift) + "/" + (zoomed?pd.zfnprefix:pd.fnprefix) + x + "_" + y + ".png";
if(pd.isbigmap)
return pd.baseprefix + "/" + (x >> pd.bigworldshift) + "_" + (y >> pd.bigworldshift) + "/" + (zoomed?pd.zfnprefix:pd.fnprefix) + x + "_" + y + "." + pd.fmt.getFileExt();
else
return (zoomed?pd.zfnprefix:pd.fnprefix) + "_" + x + "_" + y + ".png";
return (zoomed?pd.zfnprefix:pd.fnprefix) + "_" + x + "_" + y + "." + pd.fmt.getFileExt();
}
private int processZoomDirectory(File dir, PrefixData pd) {
Debug.debug("processZoomDirectory(" + dir.getPath() + "," + pd.baseprefix + ")");
HashMap<String, ProcessTileRec> toprocess = new HashMap<String, ProcessTileRec>();
String[] files = dir.list(new PNGFileFilter(pd.fnprefix));
String[] files = dir.list(new PNGFileFilter(pd.fnprefix, pd.fmt));
if(files == null)
return 0;
for(String fn : files) {
@@ -218,7 +317,7 @@ public class DynmapWorld {
int cnt = 0;
/* Do processing */
for(ProcessTileRec s : toprocess.values()) {
processZoomTile(pd, dir, s.zf, s.zfname, s.x, s.y);
processZoomTile(s.pd, s.zf, s.zfname, s.x, s.y);
cnt++;
}
Debug.debug("processZoomDirectory(" + dir.getPath() + "," + pd.baseprefix + ") - done (" + cnt + " files)");
@@ -255,10 +354,12 @@ public class DynmapWorld {
else
x = x + (x % (2*step));
if(pd.neg_step_x) x = -x;
if(pd.neg_step_y) y = -y;
if(y >= 0)
y = y - (y % (2*step));
else
y = y + (y % (2*step));
if(pd.neg_step_y) y = -y;
/* Make name of corresponding zoomed tile */
String zfname = makeFilePath(pd, x, y, true);
File zf = new File(worldtilepath, zfname);
@@ -273,22 +374,25 @@ public class DynmapWorld {
rec.x = x;
rec.y = y;
rec.zfname = zfname;
rec.pd = pd;
Debug.debug("Process " + zf.getPath() + " due to " + f.getPath());
return rec;
}
private void processZoomTile(PrefixData pd, File dir, File zf, String zfname, int tx, int ty) {
Debug.debug("processZoomFile(" + pd.baseprefix + "," + dir.getPath() + "," + zf.getPath() + "," + tx + "," + ty + ")");
private void processZoomTile(PrefixData pd, File zf, String zfname, int tx, int ty) {
Debug.debug("processZoomFile(" + pd.baseprefix + "," + zf.getPath() + "," + tx + "," + ty + ")");
int width = 128, height = 128;
BufferedImage zIm = null;
KzedBufferedImage kzIm = null;
DynmapBufferedImage kzIm = null;
int[] argb = new int[width*height];
int step = pd.stepsize << pd.zoomlevel;
int ztx = tx;
int zty = ty;
tx = tx - (pd.neg_step_x?step:0); /* Adjust for negative step */
ty = ty - (pd.neg_step_y?step:0); /* Adjust for negative step */
/* create image buffer */
kzIm = KzedMap.allocateBufferedImage(width, height);
kzIm = DynmapBufferedImage.allocateBufferedImage(width, height);
zIm = kzIm.buf_img;
for(int i = 0; i < 4; i++) {
@@ -308,24 +412,19 @@ public class DynmapWorld {
im.getRGB(0, 0, width, height, argb, 0, width); /* Read data */
im.flush();
/* Do binlinear scale to 64x64 */
Color c1 = new Color();
int off = 0;
for(int y = 0; y < height; y += 2) {
for(int x = 0; x < width; x += 2) {
int red = 0;
int green = 0;
int blue = 0;
int alpha = 0;
for(int yy = y; yy < y+2; yy++) {
for(int xx = x; xx < x+2; xx++) {
c1.setARGB(argb[(yy*width)+xx]);
red += c1.getRed();
green += c1.getGreen();
blue += c1.getBlue();
alpha += c1.getAlpha();
}
}
c1.setRGBA(red>>2, green>>2, blue>>2, alpha>>2);
argb[(y*width/2) + (x/2)] = c1.getARGB();
off = y*width;
for(int x = 0; x < width; x += 2, off += 2) {
int p0 = argb[off];
int p1 = argb[off+1];
int p2 = argb[off+width];
int p3 = argb[off+width+1];
int alpha = ((p0 >> 24) & 0xFF) + ((p1 >> 24) & 0xFF) + ((p2 >> 24) & 0xFF) + ((p3 >> 24) & 0xFF);
int red = ((p0 >> 16) & 0xFF) + ((p1 >> 16) & 0xFF) + ((p2 >> 16) & 0xFF) + ((p3 >> 16) & 0xFF);
int green = ((p0 >> 8) & 0xFF) + ((p1 >> 8) & 0xFF) + ((p2 >> 8) & 0xFF) + ((p3 >> 8) & 0xFF);
int blue = (p0 & 0xFF) + (p1 & 0xFF) + (p2 & 0xFF) + (p3 & 0xFF);
argb[off>>1] = (((alpha>>2)&0xFF)<<24) | (((red>>2)&0xFF)<<16) | (((green>>2)&0xFF)<<8) | ((blue>>2)&0xFF);
}
}
/* blit scaled rendered tile onto zoom-out tile */
@@ -335,16 +434,19 @@ public class DynmapWorld {
}
FileLockManager.getWriteLock(zf);
try {
TileHashManager hashman = MapManager.mapman.hashman;
MapManager mm = MapManager.mapman;
if(mm == null)
return;
TileHashManager hashman = mm.hashman;
long crc = hashman.calculateTileHash(kzIm.argb_buf); /* Get hash of tile */
int tilex = ztx/step/2;
int tiley = ty/step/2;
int tiley = zty/step/2;
String key = world.getName()+".z"+pd.zoomprefix+pd.baseprefix;
if((!zf.exists()) || (crc != MapManager.mapman.hashman.getImageHashCode(key, null, tilex, tiley))) {
if((!zf.exists()) || (crc != mm.hashman.getImageHashCode(key, null, tilex, tiley))) {
try {
if(!zf.getParentFile().exists())
zf.getParentFile().mkdirs();
FileLockManager.imageIOWrite(zIm, "png", zf);
FileLockManager.imageIOWrite(zIm, pd.fmt, zf);
Debug.debug("Saved zoom-out tile at " + zf.getPath());
} catch (IOException e) {
Debug.error("Failed to save zoom-out tile: " + zf.getName(), e);
@@ -357,7 +459,7 @@ public class DynmapWorld {
}
} finally {
FileLockManager.releaseWriteLock(zf);
KzedMap.freeBufferedImage(kzIm);
DynmapBufferedImage.freeBufferedImage(kzIm);
}
}
}

Some files were not shown because too many files have changed in this diff Show More