Smash the typos

This commit is contained in:
thatsIch 2014-11-06 22:08:14 +01:00
parent ea10da6f69
commit c7bae7f448
2 changed files with 54 additions and 36 deletions

@ -1 +1 @@
Subproject commit bbe2ad8e709a366faf34e6efac9aef37cb3d8013 Subproject commit 5dd2dd9d4cf50eeeb1b6d57d4770cbff82ebe935

View file

@ -1,5 +1,24 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.services.helpers; package appeng.services.helpers;
import java.io.File; import java.io.File;
import java.io.RandomAccessFile; import java.io.RandomAccessFile;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
@ -7,9 +26,9 @@ import java.nio.channels.FileChannel;
import appeng.core.AELog; import appeng.core.AELog;
public class CompassRegion public class CompassRegion
{ {
final int low_x; final int low_x;
final int low_z; final int low_z;
@ -17,12 +36,29 @@ public class CompassRegion
final int hi_z; final int hi_z;
final int world; final int world;
boolean hasFile = false;
final File rootFolder; final File rootFolder;
boolean hasFile = false;
RandomAccessFile raf = null; RandomAccessFile raf = null;
ByteBuffer buffer; ByteBuffer buffer;
public CompassRegion( int cx, int cz, int worldID, File rootFolder )
{
world = worldID;
this.rootFolder = rootFolder;
int region_x = cx >> 10;
int region_z = cz >> 10;
low_x = region_x << 10;
low_z = region_z << 10;
hi_x = low_x + 1024;
hi_z = low_z + 1024;
openFile( false );
}
public void close() public void close()
{ {
try try
@ -41,23 +77,6 @@ public class CompassRegion
} }
} }
public CompassRegion(int cx, int cz, int worldID, File rootFolder) {
world = worldID;
this.rootFolder = rootFolder;
int region_x = cx >> 10;
int region_z = cz >> 10;
low_x = region_x << 10;
low_z = region_z << 10;
hi_x = low_x + 1024;
hi_z = low_z + 1024;
openFile( false );
}
public boolean hasBeacon( int cx, int cz ) public boolean hasBeacon( int cx, int cz )
{ {
if ( hasFile ) if ( hasFile )
@ -163,10 +182,9 @@ public class CompassRegion
if ( !folderFile.exists() || !folderFile.isDirectory() ) if ( !folderFile.exists() || !folderFile.isDirectory() )
{ {
if ( !folderFile.mkdir() ) if ( !folderFile.mkdir() )
AELog.info( "Failed to created AE2/compass/" ); AELog.info( "Failed to create AE2/compass/" );
} }
return new File( folder + File.separatorChar + world + "_" + low_x + "_" + low_z + ".dat" ); return new File( folder + File.separatorChar + world + "_" + low_x + "_" + low_z + ".dat" );
} }
} }