Added all stairs
This commit is contained in:
@@ -58,6 +58,10 @@ public final class AppEng
|
||||
{
|
||||
public static final String MOD_ID = "appliedenergistics2";
|
||||
public static final String MOD_NAME = "Applied Energistics 2";
|
||||
|
||||
public static final String MODID = "appliedenergistics2";
|
||||
public static final String ASSETS = "appliedenergistics2:";
|
||||
|
||||
public static final String MOD_DEPENDENCIES =
|
||||
// a few mods, AE should load after, probably.
|
||||
// required-after:AppliedEnergistics2API|all;
|
||||
@@ -70,6 +74,17 @@ public final class AppEng
|
||||
+ net.minecraftforge.common.ForgeVersion.revisionVersion + '.' // revisionVersion
|
||||
+ net.minecraftforge.common.ForgeVersion.buildVersion + ",)"; // buildVersion
|
||||
|
||||
// public static final String nameCustomWall = "custom_wall";
|
||||
// public static final BlockWall blockCustomWall = new BlockWall( Blocks.cobblestone);
|
||||
// public static final ItemMultiTexture itemCustomWall = new ItemMultiTexture(blockCustomWall, blockCustomWall, new Function<ItemStack, String>()
|
||||
// {
|
||||
// @Override
|
||||
// public String apply(ItemStack stack)
|
||||
// {
|
||||
// return BlockWall.EnumType.byMetadata(stack.getMetadata()).getUnlocalizedName();
|
||||
// }
|
||||
// });
|
||||
|
||||
@Nonnull
|
||||
private static final AppEng INSTANCE = new AppEng();
|
||||
|
||||
@@ -138,9 +153,45 @@ public final class AppEng
|
||||
this.startService( "AE2 VersionChecker", versionCheckerThread );
|
||||
}
|
||||
|
||||
// blockCustomWall.setUnlocalizedName(MODID + ".customWall");
|
||||
// GameRegistry.registerBlock( blockCustomWall, null, nameCustomWall );
|
||||
// GameRegistry.registerItem(itemCustomWall, nameCustomWall);
|
||||
// GameData.getBlockItemMap().put( blockCustomWall, itemCustomWall );
|
||||
//
|
||||
// if (event.getSide() == Side.CLIENT)
|
||||
// preInitClient(event);
|
||||
|
||||
AELog.info( "Pre Initialization ( ended after " + watch.elapsed( TimeUnit.MILLISECONDS ) + "ms )" );
|
||||
}
|
||||
|
||||
// @SideOnly(Side.CLIENT)
|
||||
// public void preInitClient(FMLPreInitializationEvent event)
|
||||
// {
|
||||
// ModelLoader.setCustomStateMapper( blockCustomWall, new IStateMapper()
|
||||
// {
|
||||
// StateMap stateMap = new StateMap.Builder().setProperty( BlockWall.VARIANT ).setBuilderSuffix( "_wall" ).build();
|
||||
//
|
||||
// @Override
|
||||
// public Map<IBlockState, ModelResourceLocation> putStateModelLocations( Block block )
|
||||
// {
|
||||
// Map<IBlockState, ModelResourceLocation> map = (Map<IBlockState, ModelResourceLocation>) stateMap.putStateModelLocations( block );
|
||||
// Map<IBlockState, ModelResourceLocation> newMap = Maps.newHashMap();
|
||||
//
|
||||
// for( Map.Entry<IBlockState, ModelResourceLocation> e : map.entrySet() )
|
||||
// {
|
||||
// ModelResourceLocation loc = e.getValue();
|
||||
// newMap.put( e.getKey(), new ModelResourceLocation( ASSETS + loc.getResourcePath(), loc.getVariant() ) );
|
||||
// }
|
||||
//
|
||||
// return newMap;
|
||||
// }
|
||||
// } );
|
||||
// Item customWallItem = Item.getItemFromBlock(blockCustomWall);
|
||||
// ModelLoader.setCustomModelResourceLocation(customWallItem, 0, new ModelResourceLocation(ASSETS + "cobblestone_wall", "inventory"));
|
||||
// ModelLoader.setCustomModelResourceLocation(customWallItem, 1, new ModelResourceLocation(ASSETS + "mossy_cobblestone_wall", "inventory"));
|
||||
// ModelBakery.addVariantName( customWallItem, ASSETS + "cobblestone_wall", ASSETS + "mossy_cobblestone_wall" );
|
||||
// }
|
||||
|
||||
private void startService( String serviceName, Thread thread )
|
||||
{
|
||||
thread.setName( serviceName );
|
||||
|
||||
@@ -212,14 +212,14 @@ public final class ApiBlocks implements IBlocks
|
||||
this.lightDetector = constructor.registerTileDefinition( new BlockLightDetector() );
|
||||
this.paint = constructor.registerTileDefinition( new BlockPaint() );
|
||||
|
||||
this.skyStoneStair = makeStairs( constructor,skyStone_stone, "skystone_stone" ) ;
|
||||
this.skyStoneBlockStair = makeStairs( constructor,skyStone_block, "skystone_block" ) ;
|
||||
this.skyStoneBrickStair = makeStairs( constructor,skyStone_brick, "skystone_brick" ) ;
|
||||
this.skyStoneSmallBrickStair = makeStairs( constructor, skyStone_smallbrick, "skystone_smallbrick" ) ;
|
||||
this.skyStoneStair = makeStairs( constructor,skyStone_stone, "skystone" ) ;
|
||||
this.skyStoneBlockStair = makeStairs( constructor,skyStone_block, "skystone.block" ) ;
|
||||
this.skyStoneBrickStair = makeStairs( constructor,skyStone_brick, "skystone.brick" ) ;
|
||||
this.skyStoneSmallBrickStair = makeStairs( constructor, skyStone_smallbrick, "skystone.brick.small" ) ;
|
||||
this.fluixStair = makeStairs( constructor, fluix, "fluix" ) ;
|
||||
this.quartzStair = makeStairs( constructor,quartz, "quartz" ) ;
|
||||
this.chiseledQuartzStair = makeStairs( constructor, quartzChiseled, "quartz_chiseled" ) ;
|
||||
this.quartzPillarStair = makeStairs( constructor, quartzPillar, "quartz_pillar" ) ;
|
||||
this.quartzStair = makeStairs( constructor,quartz, "quartz.certus" ) ;
|
||||
this.chiseledQuartzStair = makeStairs( constructor, quartzChiseled, "quartz.certus.chiseled" ) ;
|
||||
this.quartzPillarStair = makeStairs( constructor, quartzPillar, "quartz.certus.pillar" ) ;
|
||||
|
||||
// TODO Re-Add Slabs...
|
||||
/*
|
||||
@@ -239,8 +239,7 @@ public final class ApiBlocks implements IBlocks
|
||||
this.cubeGenerator = constructor.registerBlockDefinition( new BlockCubeGenerator() );
|
||||
}
|
||||
|
||||
private IBlockDefinition makeStairs(DefinitionConstructor constructor,
|
||||
IBlockDefinition block, String name )
|
||||
private IBlockDefinition makeStairs(DefinitionConstructor constructor, IBlockDefinition block, String name )
|
||||
{
|
||||
if ( block.maybeBlock().isPresent() )
|
||||
return constructor.registerBlockDefinition( new BlockStairCommon( block.maybeBlock().get(), name ));
|
||||
|
||||
@@ -51,6 +51,10 @@ public class FeatureNameExtractor
|
||||
{
|
||||
name = PATTERN_ITEM_MULTI_MATERIAL.matcher( name ).replaceAll( "ItemMaterial" );
|
||||
}
|
||||
else if ( name.startsWith( "BlockStairCommon" ) )
|
||||
{
|
||||
name = "stair";
|
||||
}
|
||||
|
||||
if( this.subName.isPresent() )
|
||||
{
|
||||
|
||||
@@ -21,14 +21,15 @@ package appeng.core.features;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import net.minecraft.block.BlockStairs;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
|
||||
import appeng.api.definitions.IBlockDefinition;
|
||||
import appeng.core.CreativeTab;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
|
||||
public class StairBlockFeatureHandler implements IFeatureHandler
|
||||
{
|
||||
@@ -60,16 +61,16 @@ public class StairBlockFeatureHandler implements IFeatureHandler
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void register(Side side)
|
||||
public final void register( Side side )
|
||||
{
|
||||
if( this.enabled )
|
||||
{
|
||||
String name = this.extractor.get();
|
||||
this.stairs.setCreativeTab( CreativeTab.instance );
|
||||
this.stairs.setUnlocalizedName( "appliedenergistics2." + name );
|
||||
//this.stairs.setBlockTextureName( "appliedenergistics2:" + name );
|
||||
|
||||
GameRegistry.registerBlock( this.stairs, "tile." + name );
|
||||
// "tile." +
|
||||
GameRegistry.registerBlock( this.stairs, name );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,9 +3,13 @@ package appeng.services.version.github;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Type;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
|
||||
import appeng.core.AELog;
|
||||
@@ -14,9 +18,6 @@ import appeng.services.version.Version;
|
||||
import appeng.services.version.VersionCheckerConfig;
|
||||
import appeng.services.version.VersionParser;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
|
||||
public final class ReleaseFetcher
|
||||
{
|
||||
@@ -49,12 +50,16 @@ public final class ReleaseFetcher
|
||||
|
||||
return latestFitRelease;
|
||||
}
|
||||
catch( Exception e )
|
||||
catch( MalformedURLException e )
|
||||
{
|
||||
AELog.error( e );
|
||||
|
||||
return EXCEPTIONAL_RELEASE;
|
||||
}
|
||||
catch( IOException e )
|
||||
{
|
||||
AELog.warning( "Could not connect to %s.", GITHUB_RELEASES_URL );
|
||||
}
|
||||
|
||||
return EXCEPTIONAL_RELEASE;
|
||||
}
|
||||
|
||||
private String getRawReleases( URL url ) throws IOException
|
||||
|
||||
Reference in New Issue
Block a user