final variables and parameters
This commit is contained in:
@@ -119,12 +119,12 @@ public final class Registration
|
||||
this.recipeHandler = new RecipeHandler();
|
||||
}
|
||||
|
||||
public void preInitialize( FMLPreInitializationEvent event )
|
||||
public void preInitialize( final FMLPreInitializationEvent event )
|
||||
{
|
||||
this.registerSpatial( false );
|
||||
|
||||
final Api api = Api.INSTANCE;
|
||||
IRecipeHandlerRegistry recipeRegistry = api.registries().recipes();
|
||||
final IRecipeHandlerRegistry recipeRegistry = api.registries().recipes();
|
||||
this.registerCraftHandlers( recipeRegistry );
|
||||
|
||||
RecipeSorter.register( "AE2-Facade", FacadeRecipe.class, Category.SHAPED, "" );
|
||||
@@ -136,25 +136,25 @@ public final class Registration
|
||||
final ApiDefinitions definitions = api.definitions();
|
||||
|
||||
// Register all detected handlers and features (items, blocks) in pre-init
|
||||
for( IFeatureHandler handler : definitions.getFeatureHandlerRegistry().getRegisteredFeatureHandlers() )
|
||||
for( final IFeatureHandler handler : definitions.getFeatureHandlerRegistry().getRegisteredFeatureHandlers() )
|
||||
{
|
||||
handler.register(event.getSide() );
|
||||
}
|
||||
|
||||
for( IAEFeature feature : definitions.getFeatureRegistry().getRegisteredFeatures() )
|
||||
for( final IAEFeature feature : definitions.getFeatureRegistry().getRegisteredFeatures() )
|
||||
{
|
||||
feature.postInit();
|
||||
}
|
||||
}
|
||||
|
||||
private void registerSpatial( boolean force )
|
||||
private void registerSpatial( final boolean force )
|
||||
{
|
||||
if( !AEConfig.instance.isFeatureEnabled( AEFeature.SpatialIO ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
AEConfig config = AEConfig.instance;
|
||||
final AEConfig config = AEConfig.instance;
|
||||
|
||||
if( this.storageBiome == null )
|
||||
{
|
||||
@@ -194,7 +194,7 @@ public final class Registration
|
||||
}
|
||||
}
|
||||
|
||||
private void registerCraftHandlers( IRecipeHandlerRegistry registry )
|
||||
private void registerCraftHandlers( final IRecipeHandlerRegistry registry )
|
||||
{
|
||||
registry.addNewSubItemResolver( new AEItemResolver() );
|
||||
|
||||
@@ -215,7 +215,7 @@ public final class Registration
|
||||
registry.addNewCraftHandler( "shapeless", Shapeless.class );
|
||||
}
|
||||
|
||||
public void initialize( FMLInitializationEvent event )
|
||||
public void initialize( final FMLInitializationEvent event )
|
||||
{
|
||||
final IAppEngApi api = AEApi.instance();
|
||||
final IPartHelper partHelper = api.partHelper();
|
||||
@@ -251,11 +251,11 @@ public final class Registration
|
||||
FMLCommonHandler.instance().bus().register( TickHandler.INSTANCE );
|
||||
MinecraftForge.EVENT_BUS.register( TickHandler.INSTANCE );
|
||||
|
||||
PartPlacement pp = new PartPlacement();
|
||||
final PartPlacement pp = new PartPlacement();
|
||||
MinecraftForge.EVENT_BUS.register( pp );
|
||||
FMLCommonHandler.instance().bus().register( pp );
|
||||
|
||||
IGridCacheRegistry gcr = registries.gridCache();
|
||||
final IGridCacheRegistry gcr = registries.gridCache();
|
||||
gcr.registerGridCache( ITickManager.class, TickManagerCache.class );
|
||||
gcr.registerGridCache( IEnergyGrid.class, EnergyGridCache.class );
|
||||
gcr.registerGridCache( IPathingGrid.class, PathGridCache.class );
|
||||
@@ -270,7 +270,7 @@ public final class Registration
|
||||
registries.cell().addCellHandler( new BasicCellHandler() );
|
||||
registries.cell().addCellHandler( new CreativeCellHandler() );
|
||||
|
||||
for( ItemStack ammoStack : api.definitions().materials().matterBall().maybeStack( 1 ).asSet() )
|
||||
for( final ItemStack ammoStack : api.definitions().materials().matterBall().maybeStack( 1 ).asSet() )
|
||||
{
|
||||
final double weight = 32;
|
||||
|
||||
@@ -296,7 +296,7 @@ public final class Registration
|
||||
}
|
||||
}
|
||||
|
||||
public void postInit( FMLPostInitializationEvent event )
|
||||
public void postInit( final FMLPostInitializationEvent event )
|
||||
{
|
||||
this.registerSpatial( true );
|
||||
|
||||
@@ -315,7 +315,7 @@ public final class Registration
|
||||
GuiText.values();
|
||||
|
||||
Api.INSTANCE.partHelper().initFMPSupport();
|
||||
for( Block block : blocks.multiPart().maybeBlock().asSet() )
|
||||
for( final Block block : blocks.multiPart().maybeBlock().asSet() )
|
||||
{
|
||||
( (BlockCableBus) block ).setupTile();
|
||||
}
|
||||
@@ -385,22 +385,22 @@ public final class Registration
|
||||
// Inscriber
|
||||
Upgrades.SPEED.registerItem( blocks.inscriber(), 3 );
|
||||
|
||||
for( Item wirelessTerminalItem : items.wirelessTerminal().maybeItem().asSet() )
|
||||
for( final Item wirelessTerminalItem : items.wirelessTerminal().maybeItem().asSet() )
|
||||
{
|
||||
registries.wireless().registerWirelessHandler( (IWirelessTermHandler) wirelessTerminalItem );
|
||||
}
|
||||
|
||||
if( AEConfig.instance.isFeatureEnabled( AEFeature.ChestLoot ) )
|
||||
{
|
||||
ChestGenHooks d = ChestGenHooks.getInfo( ChestGenHooks.MINESHAFT_CORRIDOR );
|
||||
final ChestGenHooks d = ChestGenHooks.getInfo( ChestGenHooks.MINESHAFT_CORRIDOR );
|
||||
|
||||
final IMaterials materials = definitions.materials();
|
||||
|
||||
for( ItemStack crystal : materials.certusQuartzCrystal().maybeStack( 1 ).asSet() )
|
||||
for( final ItemStack crystal : materials.certusQuartzCrystal().maybeStack( 1 ).asSet() )
|
||||
{
|
||||
d.addItem( new WeightedRandomChestContent( crystal, 1, 4, 2 ) );
|
||||
}
|
||||
for( ItemStack dust : materials.certusQuartzDust().maybeStack( 1 ).asSet() )
|
||||
for( final ItemStack dust : materials.certusQuartzDust().maybeStack( 1 ).asSet() )
|
||||
{
|
||||
d.addItem( new WeightedRandomChestContent( dust, 1, 4, 2 ) );
|
||||
}
|
||||
@@ -423,7 +423,7 @@ public final class Registration
|
||||
GameRegistry.registerWorldGenerator( new MeteoriteWorldGen(), 0 );
|
||||
}
|
||||
|
||||
IMovableRegistry mr = registries.movable();
|
||||
final IMovableRegistry mr = registries.movable();
|
||||
|
||||
/**
|
||||
* You can't move bed rock.
|
||||
@@ -461,7 +461,7 @@ public final class Registration
|
||||
/**
|
||||
* world gen
|
||||
*/
|
||||
for( WorldGenType type : WorldGenType.values() )
|
||||
for( final WorldGenType type : WorldGenType.values() )
|
||||
{
|
||||
registries.worldgen().disableWorldGenForProviderID( type, StorageWorldProvider.class );
|
||||
|
||||
@@ -473,7 +473,7 @@ public final class Registration
|
||||
}
|
||||
|
||||
// whitelist from config
|
||||
for( int dimension : AEConfig.instance.meteoriteDimensionWhitelist )
|
||||
for( final int dimension : AEConfig.instance.meteoriteDimensionWhitelist )
|
||||
{
|
||||
registries.worldgen().enableWorldGenForDimension( WorldGenType.Meteorites, dimension );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user