Small code cosmetics and null checks update.
This commit is contained in:
parent
1975c3c262
commit
76e19874cf
|
@ -246,7 +246,7 @@ public final class ApiBlocks implements IBlocks
|
|||
{
|
||||
// if(this.registeredClasses.contains( teClass ) )
|
||||
// {
|
||||
// AELog.debug( "Already registered " + teClass.getName() +" to Forge!" );
|
||||
// AELog.debug( "Already registered " + teClass.getName() + " to Forge!" );
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
|
|
|
@ -38,9 +38,7 @@ import net.minecraft.creativetab.CreativeTabs;
|
|||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
@ -209,19 +207,19 @@ public final class ItemMaterial extends AEBaseItem implements IStorageComponent,
|
|||
{
|
||||
if( mt.getOreName() != null )
|
||||
{
|
||||
ItemStack replacement = null;
|
||||
ItemStack replacement = ItemStack.EMPTY;
|
||||
|
||||
final String[] names = mt.getOreName().split( "," );
|
||||
|
||||
for( final String name : names )
|
||||
{
|
||||
if( replacement != null )
|
||||
if( !replacement.isEmpty() )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
final List<ItemStack> options = OreDictionary.getOres( name );
|
||||
if( options != null && options.size() > 0 )
|
||||
if( options != OreDictionary.EMPTY_LIST && options.size() > 0 )
|
||||
{
|
||||
for( final ItemStack is : options )
|
||||
{
|
||||
|
@ -234,7 +232,7 @@ public final class ItemMaterial extends AEBaseItem implements IStorageComponent,
|
|||
}
|
||||
}
|
||||
|
||||
if( replacement == null || AEConfig.instance().useAEVersion( mt ) )
|
||||
if( replacement.isEmpty() || AEConfig.instance().useAEVersion( mt ) )
|
||||
{
|
||||
// continue using the AE2 item.
|
||||
for( final String name : names )
|
||||
|
|
|
@ -40,7 +40,7 @@ import appeng.worldgen.meteorite.ChunkOnly;
|
|||
public final class MeteoriteWorldGen implements IWorldGenerator
|
||||
{
|
||||
@Override
|
||||
public void generate(final Random r, final int chunkX, final int chunkZ, final World w, final IChunkGenerator chunkGenerator, final IChunkProvider chunkProvider )
|
||||
public void generate( final Random r, final int chunkX, final int chunkZ, final World w, final IChunkGenerator chunkGenerator, final IChunkProvider chunkProvider )
|
||||
{
|
||||
if( WorldGenRegistry.INSTANCE.isWorldGenEnabled( WorldGenType.METEORITES, w ) )
|
||||
{
|
||||
|
|
|
@ -56,7 +56,7 @@ public final class QuartzWorldGen implements IWorldGenerator
|
|||
}
|
||||
|
||||
@Override
|
||||
public void generate(final Random r, final int chunkX, final int chunkZ, final World w, final IChunkGenerator chunkGenerator, final IChunkProvider chunkProvider )
|
||||
public void generate( final Random r, final int chunkX, final int chunkZ, final World w, final IChunkGenerator chunkGenerator, final IChunkProvider chunkProvider )
|
||||
{
|
||||
int seaLevel = w.provider.getAverageGroundLevel() + 1;
|
||||
|
||||
|
|
Loading…
Reference in a new issue