File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -1171,18 +1171,13 @@ void WriteWorldData(Map map) {
11711171 Block maxLegal = supportsCustomBlocks ? Map . MaxCustomBlockType : Map . MaxLegalBlockType ;
11721172 Logger . Log ( LogType . Debug , "Player.JoinWorldNow: Sending compressed map to {0}." , Name ) ;
11731173
1174- using ( LevelChunkStream dst = new LevelChunkStream ( this ) ) {
1175- Stream compressor = null ;
1176- try {
1177- compressor = map . CompressMapHeader ( this , dst ) ;
1178-
1179- if ( supportsCustomBlocks && supportsBlockDefs ) {
1180- map . CompressMap ( dst , compressor ) ;
1181- } else {
1182- map . CompressAndConvertMap ( ( byte ) maxLegal , dst , compressor ) ;
1183- }
1184- } finally {
1185- if ( compressor != null ) compressor . Close ( ) ;
1174+ using ( LevelChunkStream dst = new LevelChunkStream ( this ) )
1175+ using ( Stream compressor = map . CompressMapHeader ( this , dst ) )
1176+ {
1177+ if ( supportsCustomBlocks && supportsBlockDefs ) {
1178+ map . CompressMap ( dst , compressor ) ;
1179+ } else {
1180+ map . CompressAndConvertMap ( ( byte ) maxLegal , dst , compressor ) ;
11861181 }
11871182 }
11881183 }
You can’t perform that action at this time.
0 commit comments