Reduces visibility of internal fields/methods
Reduces the visibility of all fields to private and create setters/getters when necessary. Exceptions are fields with GuiSync as these need to be public. Reduces the visibility of internal methods to private/protected/default when possible.
This commit is contained in:
@@ -89,12 +89,12 @@ public final class CompassService
|
||||
}
|
||||
}
|
||||
|
||||
public int jobSize()
|
||||
private int jobSize()
|
||||
{
|
||||
return this.jobSize;
|
||||
}
|
||||
|
||||
public void cleanUp()
|
||||
private void cleanUp()
|
||||
{
|
||||
for( final CompassReader cr : this.worldSet.values() )
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@ public class CompassException extends RuntimeException
|
||||
|
||||
private static final long serialVersionUID = 8825268683203860877L;
|
||||
|
||||
public final Throwable inner;
|
||||
private final Throwable inner;
|
||||
|
||||
public CompassException( final Throwable t )
|
||||
{
|
||||
|
||||
@@ -61,7 +61,7 @@ public final class CompassRegion
|
||||
this.openFile( false );
|
||||
}
|
||||
|
||||
public void close()
|
||||
void close()
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -79,7 +79,7 @@ public final class CompassRegion
|
||||
}
|
||||
}
|
||||
|
||||
public boolean hasBeacon( int cx, int cz )
|
||||
boolean hasBeacon( int cx, int cz )
|
||||
{
|
||||
if( this.hasFile )
|
||||
{
|
||||
@@ -96,7 +96,7 @@ public final class CompassRegion
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setHasBeacon( int cx, int cz, final int cdy, final boolean hasBeacon )
|
||||
void setHasBeacon( int cx, int cz, final int cdy, final boolean hasBeacon )
|
||||
{
|
||||
cx &= 0x3FF;
|
||||
cz &= 0x3FF;
|
||||
|
||||
@@ -22,17 +22,17 @@ package appeng.services.export;
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.base.Stopwatch;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.ModContainer;
|
||||
import cpw.mods.fml.common.registry.FMLControlledNamespacedRegistry;
|
||||
import cpw.mods.fml.common.registry.GameData;
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
import net.minecraftforge.fml.common.ModContainer;
|
||||
import net.minecraftforge.fml.common.registry.FMLControlledNamespacedRegistry;
|
||||
import net.minecraftforge.fml.common.registry.GameData;
|
||||
|
||||
import appeng.core.AELog;
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ import java.io.OutputStreamWriter;
|
||||
import java.io.Writer;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@@ -43,8 +44,7 @@ import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import cpw.mods.fml.common.registry.FMLControlledNamespacedRegistry;
|
||||
import net.minecraftforge.fml.common.registry.FMLControlledNamespacedRegistry;
|
||||
|
||||
import appeng.core.AELog;
|
||||
|
||||
@@ -73,7 +73,8 @@ final class MinecraftItemCSVExporter implements Exporter
|
||||
|
||||
/**
|
||||
* @param exportDirectory directory of the resulting export file. Non-null required.
|
||||
* @param itemRegistry the registry with minecraft items. Needs to be populated at that time, thus the exporting can only happen in init (pre-init is the
|
||||
* @param itemRegistry the registry with minecraft items. Needs to be populated at that time, thus the exporting can
|
||||
* only happen in init (pre-init is the
|
||||
* phase when all items are determined)
|
||||
* @param mode mode in which the export should be operated. Resulting CSV will change depending on this.
|
||||
*/
|
||||
@@ -103,7 +104,7 @@ final class MinecraftItemCSVExporter implements Exporter
|
||||
{
|
||||
FileUtils.forceMkdir( this.exportDirectory );
|
||||
|
||||
final Writer writer = new BufferedWriter( new OutputStreamWriter( new FileOutputStream( file ), Charset.forName("UTF-8") ) );
|
||||
final Writer writer = new BufferedWriter( new OutputStreamWriter( new FileOutputStream( file ), Charset.forName( "UTF-8" ) ) );
|
||||
|
||||
final String header = this.mode == ExportMode.MINIMAL ? MINIMAL_HEADER : VERBOSE_HEADER;
|
||||
writer.write( header );
|
||||
@@ -186,7 +187,6 @@ final class MinecraftItemCSVExporter implements Exporter
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* transforms an item into a row representation of the CSV file
|
||||
*/
|
||||
@@ -229,7 +229,7 @@ final class MinecraftItemCSVExporter implements Exporter
|
||||
AELog.debug( EXPORTING_SUBTYPES_MESSAGE, input.getUnlocalizedName(), input.getHasSubtypes() );
|
||||
}
|
||||
|
||||
final String itemName = this.itemRegistry.getNameForObject( input );
|
||||
final String itemName = this.itemRegistry.getNameForObject( input ).toString();
|
||||
final boolean hasSubtypes = input.getHasSubtypes();
|
||||
if( hasSubtypes )
|
||||
{
|
||||
|
||||
@@ -20,13 +20,14 @@ package appeng.services.export;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
|
||||
import cpw.mods.fml.common.ModContainer;
|
||||
import net.minecraftforge.fml.common.ModContainer;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user